]>
Commit | Line | Data |
---|---|---|
1 | diff -uNr NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c NVIDIA-Linux-x86-1.0-5336-pkg1.fixed/usr/src/nv/nv.c | |
2 | --- NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c 2004-01-15 04:29:11.000000000 +0100 | |
3 | +++ NVIDIA-Linux-x86-1.0-5336-pkg1.fixed/usr/src/nv/nv.c 2004-02-17 20:53:36.000000000 +0100 | |
4 | @@ -1103,7 +1103,7 @@ | |
5 | * addresses by the CPU. This nopage handler will fault on CPU | |
6 | * accesses to AGP memory and map the address to the correct page. | |
7 | */ | |
8 | -struct page *nv_kern_vma_nopage(struct vm_area_struct *vma, unsigned long address, int write_access) | |
9 | +struct page *nv_kern_vma_nopage(struct vm_area_struct *vma, unsigned long address, int *write_access) | |
10 | { | |
11 | #if defined(NVCPU_IA64) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 9)) | |
12 | nv_alloc_t *at, *tmp; | |
13 | @@ -1183,6 +1183,7 @@ | |
14 | nv_kern_vma_open, | |
15 | nv_kern_vma_release, /* "close" */ | |
16 | nv_kern_vma_nopage, | |
17 | + 0 | |
18 | }; | |
19 | ||
20 | static nv_file_private_t * | |
21 | @@ -2558,7 +2559,7 @@ | |
22 | * so use the first page, which is page-aligned. this way, our | |
23 | * allocated page table does not need to be page-aligned | |
24 | */ | |
25 | - *pAddress = (void *) at->page_table[0].dma_addr; | |
26 | + *pAddress = (void *)(NV_UINTPTR_T) at->page_table[0].dma_addr; | |
27 | at->flags = NV_ALLOC_TYPE_PCI; | |
28 | nvl_add_alloc(nvl, at); | |
29 | } else | |
30 | diff -uNr NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv-linux.h NVIDIA-Linux-x86-1.0-5336-pkg1.fixed/usr/src/nv/nv-linux.h | |
31 | --- NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv-linux.h 2004-01-15 04:29:11.000000000 +0100 | |
32 | +++ NVIDIA-Linux-x86-1.0-5336-pkg1.fixed/usr/src/nv/nv-linux.h 2004-02-17 20:57:55.438110888 +0100 | |
33 | @@ -143,7 +143,7 @@ | |
34 | } | |
35 | #define NV_MEM_TRACKING_RETRIEVE_SIZE(ptr, size) \ | |
36 | { \ | |
37 | - (char *) (ptr) -= sizeof(void *); \ | |
38 | + ptr -= sizeof(void *); \ | |
39 | size = *(int *) (ptr); \ | |
40 | } | |
41 | #else | |
42 | @@ -293,13 +293,13 @@ | |
43 | #if defined(NVCPU_IA64) | |
44 | #define NV_VMALLOC(ptr, size) \ | |
45 | { \ | |
46 | - (void *) (ptr) = vmalloc_dma(size); \ | |
47 | + ptr = vmalloc_dma(size); \ | |
48 | VM_ALLOC_RECORD(ptr, size, "vm_alloc"); \ | |
49 | } | |
50 | #else | |
51 | #define NV_VMALLOC(ptr, size) \ | |
52 | { \ | |
53 | - (void *) (ptr) = vmalloc_32(size); \ | |
54 | + ptr = vmalloc_32(size); \ | |
55 | VM_ALLOC_RECORD(ptr, size, "vm_alloc"); \ | |
56 | } | |
57 | #endif | |
58 | @@ -312,13 +312,13 @@ | |
59 | ||
60 | #define NV_IOREMAP(ptr, physaddr, size) \ | |
61 | { \ | |
62 | - (void *) (ptr) = ioremap(physaddr, size); \ | |
63 | + ptr = ioremap(physaddr, size); \ | |
64 | VM_ALLOC_RECORD(ptr, size, "vm_ioremap"); \ | |
65 | } | |
66 | ||
67 | #define NV_IOREMAP_NOCACHE(ptr, physaddr, size) \ | |
68 | { \ | |
69 | - (void *) (ptr) = ioremap_nocache(physaddr, size); \ | |
70 | + ptr = ioremap_nocache(physaddr, size); \ | |
71 | VM_ALLOC_RECORD(ptr, size, "vm_ioremap_nocache"); \ | |
72 | } | |
73 | ||
74 | @@ -333,13 +333,13 @@ | |
75 | */ | |
76 | #define NV_KMALLOC(ptr, size) \ | |
77 | { \ | |
78 | - (void *) (ptr) = kmalloc(size, GFP_KERNEL); \ | |
79 | + ptr = kmalloc(size, GFP_KERNEL); \ | |
80 | KM_ALLOC_RECORD(ptr, size, "km_alloc"); \ | |
81 | } | |
82 | ||
83 | #define NV_KMALLOC_ATOMIC(ptr, size) \ | |
84 | { \ | |
85 | - (void *) (ptr) = kmalloc(size, GFP_ATOMIC); \ | |
86 | + ptr = kmalloc(size, GFP_ATOMIC); \ | |
87 | KM_ALLOC_RECORD(ptr, size, "km_alloc_atomic"); \ | |
88 | } | |
89 | ||
90 | @@ -352,7 +352,7 @@ | |
91 | ||
92 | #define NV_GET_FREE_PAGES(ptr, order) \ | |
93 | { \ | |
94 | - (void *) (ptr) = __get_free_pages(NV_GFP_HW, order); \ | |
95 | + ptr = __get_free_pages(NV_GFP_HW, order); \ | |
96 | } | |
97 | ||
98 | #define NV_FREE_PAGES(ptr, order) \ | |
99 | @@ -690,7 +690,7 @@ | |
100 | ||
101 | /* for the card devices */ | |
102 | #define NVL_FROM_FILEP(filep) \ | |
103 | - ((nv_linux_state_t*) (NV_GET_NVFP(filep))->nvptr) | |
104 | + ((NV_GET_NVFP(filep))->nvptr) | |
105 | ||
106 | #define NV_GET_NVL_FROM_NV_STATE(nv) \ | |
107 | ((nv_linux_state_t *) nv->os_state) |