aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/setup.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-04-16 18:25:12 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:25:12 -0400
commita1e9778203b15b86bc2219e87478d3be9acce735 (patch)
tree15141c5b56a4e39fa8e879812785e957ea720c9b /arch/x86_64/kernel/setup.c
parentcf94b62f7005805be0a3ba02c624cb8cd3595bac (diff)
[PATCH] x86_64: Port over e820 gap detection from i386
Look for gaps in the e820 memory map to put PCI resources in. This hopefully fixes problems with the PCI code assigning 32bit BARs MMIO resources which are >32bit. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/setup.c')
-rw-r--r--arch/x86_64/kernel/setup.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index b06221e31952..57f619052bad 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -76,9 +76,6 @@ int __initdata acpi_force = 0;
76 76
77int acpi_numa __initdata; 77int acpi_numa __initdata;
78 78
79/* For PCI or other memory-mapped resources */
80unsigned long pci_mem_start = 0x10000000;
81
82/* Boot loader ID as an integer, for the benefit of proc_dointvec */ 79/* Boot loader ID as an integer, for the benefit of proc_dointvec */
83int bootloader_type; 80int bootloader_type;
84 81
@@ -495,7 +492,6 @@ static void __init reserve_ebda_region(void)
495 492
496void __init setup_arch(char **cmdline_p) 493void __init setup_arch(char **cmdline_p)
497{ 494{
498 unsigned long low_mem_size;
499 unsigned long kernel_end; 495 unsigned long kernel_end;
500 496
501 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 497 ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
@@ -654,13 +650,7 @@ void __init setup_arch(char **cmdline_p)
654 request_resource(&ioport_resource, &standard_io_resources[i]); 650 request_resource(&ioport_resource, &standard_io_resources[i]);
655 } 651 }
656 652
657 /* Will likely break when you have unassigned resources with more 653 e820_setup_gap();
658 than 4GB memory and bridges that don't support more than 4GB.
659 Doing it properly would require to use pci_alloc_consistent
660 in this case. */
661 low_mem_size = ((end_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
662 if (low_mem_size > pci_mem_start)
663 pci_mem_start = low_mem_size;
664 654
665#ifdef CONFIG_GART_IOMMU 655#ifdef CONFIG_GART_IOMMU
666 iommu_hole_init(); 656 iommu_hole_init();