1 ia32/syscall32.c | 3 ++-
2 kernel/aperture.c | 27 +++++++++++++++++----------
3 kernel/bluesmoke.c | 8 +++++---
5 kernel/pci-gart.c | 15 +++++++--------
8 lib/csum-partial.c | 5 +++--
9 mm/fault.c | 9 ++++++---
10 mm/ioremap.c | 10 ++++++----
11 10 files changed, 51 insertions(+), 35 deletions(-)
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
17 int map_syscall32(struct mm_struct *mm, unsigned long address)
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) {
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
33 /* Find a PCI capability */
34 static __u32 __init find_cap(int num, int slot, int func, int cap)
38 if (!(read_pci_config_16(num,slot,func,PCI_STATUS) & PCI_STATUS_CAP_LIST))
40 - u8 pos = read_pci_config_byte(num,slot,func,PCI_CAPABILITY_LIST);
42 + pos = read_pci_config_byte(num,slot,func,PCI_CAPABILITY_LIST);
43 for (bytes = 0; bytes < 48 && pos >= 0x40; bytes++) {
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);
52 /* Read a standard AGPv3 bridge header */
53 static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order)
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;
61 + printk("AGP bridge at %02x:%02x:%02x\n", num, slot, func);
63 if (apsizereg == 0xffffffff) {
64 printk("APSIZE in AGP bridge unreadable\n");
68 - u32 apsize = apsizereg & 0xfff;
69 + apsize = apsizereg & 0xfff;
70 /* Some BIOS use weird encodings not in the AGPv3 table. */
73 - int nbits = hweight16(apsize);
74 + nbits = hweight16(apsize);
76 if ((int)*order < 0) /* < 32MB */
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);
86 printk("Aperture from AGP @ %Lx size %u MB (APSIZE %x)\n",
87 aper, 32 << *order, apsizereg);
89 for (slot = 0; slot < 32; slot++) {
90 for (func = 0; func < 8; func++) {
93 class = read_pci_config(num,slot,func,
95 if (class == 0xffffffff)
99 /* No multi-function device? */
100 - u8 type = read_pci_config_byte(num,slot,func,
101 + type = read_pci_config_byte(num,slot,func,
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)
112 + u32 statuslow, statushigh;
113 + unsigned short errcode;
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)))
125 printk(KERN_ERR "Northbridge status %08x%08x\n",
126 statushigh,statuslow);
128 - unsigned short errcode = statuslow & 0xffff;
129 + errcode = statuslow & 0xffff;
130 switch (errcode >> 8) {
132 printk(KERN_ERR " GART TLB error %s %s\n",
134 /* should only print when it was a HyperTransport related error. */
135 printk(KERN_ERR " link number %x\n", (statushigh >> 4) & 3);
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 @@
146 void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason)
148 + int sum, cpu = safe_smp_processor_id();
150 if (nmi_watchdog_disabled)
153 - int sum, cpu = safe_smp_processor_id();
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 @@
162 static void free_iommu(unsigned long offset, int size)
164 + unsigned long flags;
166 clear_bit(offset, iommu_gart_bitmap);
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);
175 unsigned long npages = to_pages(phys_mem, size);
176 unsigned long iommu_page = alloc_iommu(npages);
178 if (iommu_page == -1) {
179 if (!nonforced_iommu(dev, phys_mem, size))
182 return bad_dma_address;
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)
192 unsigned long iommu_start = alloc_iommu(pages);
193 - if (iommu_start == -1)
196 unsigned long iommu_page = iommu_start;
199 + if (iommu_start == -1)
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);
211 sout->length += s->length;
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)
220 unsigned long iommu_page;
223 if (dma_addr < iommu_bus_base + EMERGENCY_PAGES*PAGE_SIZE ||
224 dma_addr > iommu_bus_base + iommu_size)
226 iommu_page = (dma_addr - iommu_bus_base)>>PAGE_SHIFT;
227 npages = to_pages(dma_addr, size);
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
236 void __init setup_arch(char **cmdline_p)
238 unsigned long low_mem_size;
239 + unsigned long kernel_end;
241 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
242 drive_info = DRIVE_INFO;
244 (table_end - table_start) << PAGE_SHIFT);
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);
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 @@
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);
261 if (sp >= (u64)cpu_pda[cpu].irqstackptr - IRQSTACKSIZE &&
262 sp <= (u64)cpu_pda[cpu].irqstackptr)
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)))
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
275 count = len >> 1; /* nr of 16-bit words.. */
277 + unsigned long zero = 0;
279 if (2 & (unsigned long) buff) {
280 result += *(unsigned short *)buff;
283 count >>= 1; /* nr of 64-bit words.. */
285 /* main loop using 64byte blocks */
286 - unsigned long zero = 0;
287 - unsigned count64 = count >> 3;
288 + count64 = count >> 3;
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
297 void dump_pagetable(unsigned long address)
303 asm("movq %%cr3,%0" : "=r" (pml4));
305 @@ -152,17 +155,17 @@
306 if (bad_address(pml4)) goto bad;
307 if (!pml4_present(*pml4)) goto ret;
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;
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;
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));
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);
332 #ifndef CONFIG_DISCONTIGMEM
334 - for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++)
335 - if(!PageReserved(page))
339 + for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++)
340 + if(!PageReserved(page))