x86: revert: reserve dma32 early for gart

Revert

commit f62f1fc9ef94f74fda2b456d935ba2da69fa0a40
Author: Yinghai Lu <yhlu.kernel@gmail.com>
Date: Fri Mar 7 15:02:50 2008 -0800

x86: reserve dma32 early for gart

The patch has a dependency on bootmem modifications which are not .25
material that late in the -rc cycle. The problem which is addressed by
the patch is limited to machines with 256G and more memory booted with
NUMA disabled. This is not a .25 regression and the audience which is
affected by this problem is very limited, so it's safer to do the
revert than pulling in intrusive bootmem changes right now.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

-52
-49
arch/x86/kernel/pci-dma_64.c
··· 8 8 #include <linux/pci.h> 9 9 #include <linux/module.h> 10 10 #include <linux/dmar.h> 11 - #include <linux/bootmem.h> 12 - #include <asm/proto.h> 13 11 #include <asm/io.h> 14 12 #include <asm/gart.h> 15 13 #include <asm/calgary.h> ··· 286 288 } 287 289 early_param("iommu", iommu_setup); 288 290 289 - static __initdata void *dma32_bootmem_ptr; 290 - static unsigned long dma32_bootmem_size __initdata = (128ULL<<20); 291 - 292 - static int __init parse_dma32_size_opt(char *p) 293 - { 294 - if (!p) 295 - return -EINVAL; 296 - dma32_bootmem_size = memparse(p, &p); 297 - return 0; 298 - } 299 - early_param("dma32_size", parse_dma32_size_opt); 300 - 301 - void __init dma32_reserve_bootmem(void) 302 - { 303 - unsigned long size, align; 304 - if (end_pfn <= MAX_DMA32_PFN) 305 - return; 306 - 307 - align = 64ULL<<20; 308 - size = round_up(dma32_bootmem_size, align); 309 - dma32_bootmem_ptr = __alloc_bootmem_nopanic(size, align, 310 - __pa(MAX_DMA_ADDRESS)); 311 - if (dma32_bootmem_ptr) 312 - dma32_bootmem_size = size; 313 - else 314 - dma32_bootmem_size = 0; 315 - } 316 - static void __init dma32_free_bootmem(void) 317 - { 318 - int node; 319 - 320 - if (end_pfn <= MAX_DMA32_PFN) 321 - return; 322 - 323 - if (!dma32_bootmem_ptr) 324 - return; 325 - 326 - for_each_online_node(node) 327 - free_bootmem_node(NODE_DATA(node), __pa(dma32_bootmem_ptr), 328 - dma32_bootmem_size); 329 - 330 - dma32_bootmem_ptr = NULL; 331 - dma32_bootmem_size = 0; 332 - } 333 - 334 291 void __init pci_iommu_alloc(void) 335 292 { 336 - /* free the range so iommu could get some range less than 4G */ 337 - dma32_free_bootmem(); 338 293 /* 339 294 * The order of these functions is important for 340 295 * fall-back/fail-over reasons
-2
arch/x86/kernel/setup_64.c
··· 389 389 390 390 early_res_to_bootmem(); 391 391 392 - dma32_reserve_bootmem(); 393 - 394 392 #ifdef CONFIG_ACPI_SLEEP 395 393 /* 396 394 * Reserve low memory region for sleep support.
-1
include/asm-x86/pci_64.h
··· 25 25 26 26 27 27 28 - extern void dma32_reserve_bootmem(void); 29 28 extern void pci_iommu_alloc(void); 30 29 31 30 /* The PCI address space does equal the physical memory