[PATCH] x86: use request instead of insert resource for e820 - 64bit to prevent acpi pnp messing it up later with request. otherwise some system will show 00000000-0009ffff : pnp 00:09 000f0000-000fffff : pnp 00:09 00100000-d7feffff : pnp 00:09 d7ff0000-d7ffffff : pnp 00:09 instead of System RAM... Signed-off-by: Yinghai Lu Index: linux-2.6/arch/x86/kernel/e820_64.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/e820_64.c +++ linux-2.6/arch/x86/kernel/e820_64.c @@ -88,7 +88,7 @@ void __init e820_reserve_resources(void) res->start = e820.map[i].addr; res->end = res->start + e820.map[i].size - 1; res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; - insert_resource(&iomem_resource, res); + request_resource(&iomem_resource, res); res++; } } Index: linux-2.6/arch/x86/kernel/setup_64.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/setup_64.c +++ linux-2.6/arch/x86/kernel/setup_64.c @@ -361,11 +361,6 @@ void __init setup_arch(char **cmdline_p) finish_e820_parsing(); - /* after parse_early_param, so could debug it */ - insert_resource(&iomem_resource, &code_resource); - insert_resource(&iomem_resource, &data_resource); - insert_resource(&iomem_resource, &bss_resource); - early_gart_iommu_check(); e820_register_active_regions(0, 0, -1UL); @@ -471,6 +466,11 @@ void __init setup_arch(char **cmdline_p) } } #endif + e820_reserve_resources(); + insert_resource(&iomem_resource, &code_resource); + insert_resource(&iomem_resource, &data_resource); + insert_resource(&iomem_resource, &bss_resource); + reserve_crashkernel(); reserve_ibft_region(); @@ -502,7 +502,6 @@ void __init setup_arch(char **cmdline_p) /* * We trust e820 completely. No explicit ROM probing in memory. */ - e820_reserve_resources(); e820_mark_nosave_regions(); /* request I/O space for devices used on all i[345]86 PCs */