]> git.pld-linux.org Git - packages/kernel.git/blob - 2.6.0-t8-x86_64-declaration_fix-lkml.patch
- obsolete
[packages/kernel.git] / 2.6.0-t8-x86_64-declaration_fix-lkml.patch
1  ia32/syscall32.c   |    3 ++-
2  kernel/aperture.c  |   27 +++++++++++++++++----------
3  kernel/bluesmoke.c |    8 +++++---
4  kernel/nmi.c       |    4 ++--
5  kernel/pci-gart.c  |   15 +++++++--------
6  kernel/setup.c     |    2 +-
7  kernel/smp.c       |    3 ++-
8  lib/csum-partial.c |    5 +++--
9  mm/fault.c         |    9 ++++++---
10  mm/ioremap.c       |   10 ++++++----
11  10 files changed, 51 insertions(+), 35 deletions(-)
12
13 ===== arch/x86_64/ia32/syscall32.c 1.4 vs edited =====
14 --- 1.4/arch/x86_64/ia32/syscall32.c    Fri May 23 03:22:07 2003
15 +++ edited/arch/x86_64/ia32/syscall32.c Tue Oct 21 15:33:29 2003
16 @@ -30,10 +30,11 @@
17  int map_syscall32(struct mm_struct *mm, unsigned long address) 
18  { 
19         pte_t *pte;
20 +       pmd_t *pmd;
21         int err = 0;
22         down_read(&mm->mmap_sem);
23         spin_lock(&mm->page_table_lock); 
24 -       pmd_t *pmd = pmd_alloc(mm, pgd_offset(mm, address), address); 
25 +       pmd = pmd_alloc(mm, pgd_offset(mm, address), address); 
26         if (pmd && (pte = pte_alloc_map(mm, pmd, address)) != NULL) { 
27                 if (pte_none(*pte)) { 
28                         set_pte(pte, 
29 ===== arch/x86_64/kernel/aperture.c 1.5 vs edited =====
30 --- 1.5/arch/x86_64/kernel/aperture.c   Fri Aug  8 18:31:35 2003
31 +++ edited/arch/x86_64/kernel/aperture.c        Tue Oct 21 16:10:35 2003
32 @@ -87,13 +87,15 @@
33  /* Find a PCI capability */ 
34  static __u32 __init find_cap(int num, int slot, int func, int cap) 
35  { 
36 +       u8 pos;
37 +       int bytes;
38         if (!(read_pci_config_16(num,slot,func,PCI_STATUS) & PCI_STATUS_CAP_LIST))
39                 return 0;
40 -       u8 pos = read_pci_config_byte(num,slot,func,PCI_CAPABILITY_LIST);
41 -       int bytes;
42 +       pos = read_pci_config_byte(num,slot,func,PCI_CAPABILITY_LIST);
43         for (bytes = 0; bytes < 48 && pos >= 0x40; bytes++) { 
44 +               u8 id;
45                 pos &= ~3; 
46 -               u8 id = read_pci_config_byte(num,slot,func,pos+PCI_CAP_LIST_ID); 
47 +               id = read_pci_config_byte(num,slot,func,pos+PCI_CAP_LIST_ID); 
48                 if (id == 0xff)
49                         break;
50                 if (id == cap) 
51 @@ -106,26 +108,30 @@
52  /* Read a standard AGPv3 bridge header */
53  static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order)
54  { 
55 -       printk("AGP bridge at %02x:%02x:%02x\n", num, slot, func); 
56         u32 apsizereg = read_pci_config_16(num,slot,func, cap + 0x14);
57 +       u32 apsize, aper_low, aper_hi;
58 +       int nbits;
59 +       u64 aper;
60 +
61 +       printk("AGP bridge at %02x:%02x:%02x\n", num, slot, func); 
62  
63         if (apsizereg == 0xffffffff) {
64                 printk("APSIZE in AGP bridge unreadable\n");
65                 return 0;
66         }
67  
68 -       u32 apsize = apsizereg & 0xfff;
69 +       apsize = apsizereg & 0xfff;
70         /* Some BIOS use weird encodings not in the AGPv3 table. */
71         if (apsize & 0xff) 
72                 apsize |= 0xf00; 
73 -       int nbits = hweight16(apsize);
74 +       nbits = hweight16(apsize);
75         *order = 7 - nbits;
76         if ((int)*order < 0) /* < 32MB */
77                 *order = 0;
78         
79 -       u32 aper_low = read_pci_config(num,slot,func, 0x10); 
80 -       u32 aper_hi = read_pci_config(num,slot,func,0x14); 
81 -       u64 aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32); 
82 +       aper_low = read_pci_config(num,slot,func, 0x10); 
83 +       aper_hi = read_pci_config(num,slot,func,0x14); 
84 +       aper = (aper_low & ~((1<<22)-1)) | ((u64)aper_hi << 32); 
85  
86         printk("Aperture from AGP @ %Lx size %u MB (APSIZE %x)\n", 
87                aper, 32 << *order, apsizereg);
88 @@ -155,6 +161,7 @@
89                 for (slot = 0; slot < 32; slot++) { 
90                         for (func = 0; func < 8; func++) { 
91                                 u32 class, cap;
92 +                               u8 type;
93                                 class = read_pci_config(num,slot,func,
94                                                         PCI_CLASS_REVISION);
95                                 if (class == 0xffffffff)
96 @@ -172,7 +179,7 @@
97                                 } 
98                                 
99                                 /* No multi-function device? */
100 -                               u8 type = read_pci_config_byte(num,slot,func,
101 +                               type = read_pci_config_byte(num,slot,func,
102                                                                PCI_HEADER_TYPE);
103                                 if (!(type & 0x80))
104                                         break;
105 ===== arch/x86_64/kernel/bluesmoke.c 1.14 vs edited =====
106 --- 1.14/arch/x86_64/kernel/bluesmoke.c Fri Jul 11 04:34:21 2003
107 +++ edited/arch/x86_64/kernel/bluesmoke.c       Tue Oct 21 14:57:45 2003
108 @@ -200,11 +200,14 @@
109  static void check_k8_nb(int header)
110  {
111         struct pci_dev *nb;
112 +       u32 statuslow, statushigh;
113 +       unsigned short errcode;
114 +       int i;
115 +
116         nb = find_k8_nb(); 
117         if (nb == NULL)
118                 return;
119  
120 -       u32 statuslow, statushigh;
121         pci_read_config_dword(nb, 0x48, &statuslow);
122         pci_read_config_dword(nb, 0x4c, &statushigh);
123         if (!(statushigh & (1<<31)))
124 @@ -215,7 +218,7 @@
125         printk(KERN_ERR "Northbridge status %08x%08x\n",
126                statushigh,statuslow); 
127  
128 -       unsigned short errcode = statuslow & 0xffff;    
129 +       errcode = statuslow & 0xffff;   
130         switch (errcode >> 8) { 
131         case 0:                                         
132                 printk(KERN_ERR "    GART TLB error %s %s\n", 
133 @@ -249,7 +252,6 @@
134         /* should only print when it was a HyperTransport related error. */
135         printk(KERN_ERR "    link number %x\n", (statushigh >> 4) & 3);
136  
137 -       int i;
138         for (i = 0; i < 32; i++) 
139                 if (highbits[i] && (statushigh & (1<<i)))
140                         printk(KERN_ERR "    %s\n", highbits[i]); 
141 ===== arch/x86_64/kernel/nmi.c 1.17 vs edited =====
142 --- 1.17/arch/x86_64/kernel/nmi.c       Fri Sep 26 06:53:38 2003
143 +++ edited/arch/x86_64/kernel/nmi.c     Tue Oct 21 15:05:11 2003
144 @@ -311,10 +311,10 @@
145  
146  void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason)
147  {
148 +       int sum, cpu = safe_smp_processor_id();
149 +
150         if (nmi_watchdog_disabled)
151                 return;
152 -
153 -       int sum, cpu = safe_smp_processor_id();
154  
155         sum = read_pda(apic_timer_irqs);
156         if (last_irq_sums[cpu] == sum) {
157 ===== arch/x86_64/kernel/pci-gart.c 1.22 vs edited =====
158 --- 1.22/arch/x86_64/kernel/pci-gart.c  Thu Sep 11 16:32:36 2003
159 +++ edited/arch/x86_64/kernel/pci-gart.c        Tue Oct 21 15:10:43 2003
160 @@ -112,11 +112,11 @@
161  
162  static void free_iommu(unsigned long offset, int size)
163  { 
164 +       unsigned long flags;
165         if (size == 1) { 
166                 clear_bit(offset, iommu_gart_bitmap); 
167                 return;
168         }
169 -       unsigned long flags;
170         spin_lock_irqsave(&iommu_bitmap_lock, flags);
171         __clear_bit_string(iommu_gart_bitmap, offset, size);
172         spin_unlock_irqrestore(&iommu_bitmap_lock, flags);
173 @@ -319,6 +319,7 @@
174  { 
175         unsigned long npages = to_pages(phys_mem, size);
176         unsigned long iommu_page = alloc_iommu(npages);
177 +       int i;
178         if (iommu_page == -1) {
179                 if (!nonforced_iommu(dev, phys_mem, size))
180                         return phys_mem; 
181 @@ -328,7 +329,6 @@
182                 return bad_dma_address;
183         }
184  
185 -       int i;
186         for (i = 0; i < npages; i++) {
187                 iommu_gatt_base[iommu_page + i] = GPTE_ENCODE(phys_mem);
188                 SET_LEAK(iommu_page + i);
189 @@ -386,15 +386,16 @@
190                       struct scatterlist *sout, unsigned long pages)
191  {
192         unsigned long iommu_start = alloc_iommu(pages);
193 -       if (iommu_start == -1)
194 -               return -1;
195 -
196         unsigned long iommu_page = iommu_start; 
197         int i;
198         
199 +       if (iommu_start == -1)
200 +               return -1;
201 +
202         for (i = start; i < stopat; i++) {
203                 struct scatterlist *s = &sg[i];
204                 unsigned long start_addr = s->dma_address;
205 +               unsigned long addr = start_addr;
206                 BUG_ON(i > 0 && s->offset);
207                 if (i == start) {
208                         *sout = *s; 
209 @@ -403,7 +404,6 @@
210                 } else { 
211                         sout->length += s->length; 
212                 }
213 -               unsigned long addr = start_addr;
214                 while (addr < start_addr + s->length) { 
215                         iommu_gatt_base[iommu_page] = GPTE_ENCODE(addr); 
216                         SET_LEAK(iommu_page);
217 @@ -503,13 +503,12 @@
218                       size_t size, int direction)
219  {
220         unsigned long iommu_page; 
221 -       int npages;
222 +       int npages, i;
223         if (dma_addr < iommu_bus_base + EMERGENCY_PAGES*PAGE_SIZE || 
224             dma_addr > iommu_bus_base + iommu_size)
225                 return;
226         iommu_page = (dma_addr - iommu_bus_base)>>PAGE_SHIFT;   
227         npages = to_pages(dma_addr, size);
228 -       int i;
229         for (i = 0; i < npages; i++) { 
230                 iommu_gatt_base[iommu_page + i] = 0; 
231                 CLEAR_LEAK(iommu_page + i);
232 ===== arch/x86_64/kernel/setup.c 1.24 vs edited =====
233 --- 1.24/arch/x86_64/kernel/setup.c     Tue Oct  7 16:33:05 2003
234 +++ edited/arch/x86_64/kernel/setup.c   Tue Oct 21 14:55:34 2003
235 @@ -332,6 +332,7 @@
236  void __init setup_arch(char **cmdline_p)
237  {
238         unsigned long low_mem_size;
239 +       unsigned long kernel_end;
240  
241         ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
242         drive_info = DRIVE_INFO;
243 @@ -380,7 +381,6 @@
244                                 (table_end - table_start) << PAGE_SHIFT);
245  
246         /* reserve kernel */
247 -       unsigned long kernel_end;
248         kernel_end = round_up(__pa_symbol(&_end),PAGE_SIZE);
249         reserve_bootmem_generic(HIGH_MEMORY, kernel_end - HIGH_MEMORY);
250  
251 ===== arch/x86_64/kernel/smp.c 1.17 vs edited =====
252 --- 1.17/arch/x86_64/kernel/smp.c       Mon Aug 18 19:46:23 2003
253 +++ edited/arch/x86_64/kernel/smp.c     Tue Oct 21 14:59:03 2003
254 @@ -496,13 +496,14 @@
255         int offset = 0, cpu;
256  
257         for (offset = 0; next_cpu(offset, cpu_online_map) < NR_CPUS; offset = cpu + 1) {
258 +               unsigned long estack;
259                 cpu = next_cpu(offset, cpu_online_map);
260  
261                 if (sp >= (u64)cpu_pda[cpu].irqstackptr - IRQSTACKSIZE && 
262                     sp <= (u64)cpu_pda[cpu].irqstackptr)
263                         return cpu;
264  
265 -               unsigned long estack = init_tss[cpu].ist[0] - EXCEPTION_STKSZ;
266 +               estack = init_tss[cpu].ist[0] - EXCEPTION_STKSZ;
267                 if (sp >= estack && sp <= estack+(1<<(PAGE_SHIFT+EXCEPTION_STK_ORDER)))
268                         return cpu;                     
269         }
270 ===== arch/x86_64/lib/csum-partial.c 1.4 vs edited =====
271 --- 1.4/arch/x86_64/lib/csum-partial.c  Tue Oct  7 19:53:42 2003
272 +++ edited/arch/x86_64/lib/csum-partial.c       Tue Oct 21 15:35:50 2003
273 @@ -48,6 +48,8 @@
274         }
275         count = len >> 1;               /* nr of 16-bit words.. */
276         if (count) {
277 +               unsigned long zero = 0; 
278 +               unsigned count64;
279                 if (2 & (unsigned long) buff) {
280                         result += *(unsigned short *)buff;
281                         count--;
282 @@ -65,8 +67,7 @@
283                         count >>= 1;    /* nr of 64-bit words.. */
284  
285                         /* main loop using 64byte blocks */
286 -                               unsigned long zero = 0; 
287 -                       unsigned count64 = count >> 3; 
288 +                       count64 = count >> 3; 
289                         while (count64) { 
290                                 asm("addq 0*8(%[src]),%[res]\n\t"
291                                     "adcq 1*8(%[src]),%[res]\n\t"
292 ===== arch/x86_64/mm/fault.c 1.15 vs edited =====
293 --- 1.15/arch/x86_64/mm/fault.c Thu Sep 25 19:27:11 2003
294 +++ edited/arch/x86_64/mm/fault.c       Tue Oct 21 15:23:02 2003
295 @@ -143,6 +143,9 @@
296  
297  void dump_pagetable(unsigned long address)
298  {
299 +       pgd_t *pgd;
300 +       pmd_t *pmd;
301 +       pte_t *pte;
302         pml4_t *pml4;
303         asm("movq %%cr3,%0" : "=r" (pml4));
304  
305 @@ -152,17 +155,17 @@
306         if (bad_address(pml4)) goto bad;
307         if (!pml4_present(*pml4)) goto ret; 
308  
309 -       pgd_t *pgd = __pgd_offset_k((pgd_t *)pml4_page(*pml4), address); 
310 +       pgd = __pgd_offset_k((pgd_t *)pml4_page(*pml4), address); 
311         if (bad_address(pgd)) goto bad;
312         printk("PGD %lx ", pgd_val(*pgd)); 
313         if (!pgd_present(*pgd)) goto ret;
314  
315 -       pmd_t *pmd = pmd_offset(pgd, address); 
316 +       pmd = pmd_offset(pgd, address); 
317         if (bad_address(pmd)) goto bad;
318         printk("PMD %lx ", pmd_val(*pmd));
319         if (!pmd_present(*pmd)) goto ret;        
320  
321 -       pte_t *pte = pte_offset_kernel(pmd, address);
322 +       pte = pte_offset_kernel(pmd, address);
323         if (bad_address(pte)) goto bad;
324         printk("PTE %lx", pte_val(*pte)); 
325  ret:
326 ===== arch/x86_64/mm/ioremap.c 1.11 vs edited =====
327 --- 1.11/arch/x86_64/mm/ioremap.c       Thu Oct  2 00:11:59 2003
328 +++ edited/arch/x86_64/mm/ioremap.c     Tue Oct 21 15:32:49 2003
329 @@ -138,10 +138,12 @@
330                 t_end = t_addr + (size - 1);
331            
332  #ifndef CONFIG_DISCONTIGMEM     
333 -               struct page *page;
334 -               for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++)
335 -                       if(!PageReserved(page))
336 -                               return NULL;
337 +               {
338 +                       struct page *page;
339 +                       for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++)
340 +                               if(!PageReserved(page))
341 +                                       return NULL;
342 +               }
343  #endif
344         }
345  
This page took 0.115089 seconds and 3 git commands to generate.