aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/apic_64.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 7d8ffdaa0ab3..ac2405ed504d 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -881,11 +881,6 @@ void __init init_apic_mappings(void)
881 apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n", 881 apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n",
882 APIC_BASE, apic_phys); 882 APIC_BASE, apic_phys);
883 883
884 /* Put local APIC into the resource map. */
885 lapic_resource.start = apic_phys;
886 lapic_resource.end = lapic_resource.start + PAGE_SIZE - 1;
887 insert_resource(&iomem_resource, &lapic_resource);
888
889 /* 884 /*
890 * Fetch the APIC ID of the BSP in case we have a 885 * Fetch the APIC ID of the BSP in case we have a
891 * default configuration (or the MP table is broken). 886 * default configuration (or the MP table is broken).
@@ -1300,3 +1295,21 @@ static __init int setup_apicpmtimer(char *s)
1300} 1295}
1301__setup("apicpmtimer", setup_apicpmtimer); 1296__setup("apicpmtimer", setup_apicpmtimer);
1302 1297
1298static int __init lapic_insert_resource(void)
1299{
1300 if (!apic_phys)
1301 return -1;
1302
1303 /* Put local APIC into the resource map. */
1304 lapic_resource.start = apic_phys;
1305 lapic_resource.end = lapic_resource.start + PAGE_SIZE - 1;
1306 insert_resource(&iomem_resource, &lapic_resource);
1307
1308 return 0;
1309}
1310
1311/*
1312 * need call insert after e820_reserve_resources()
1313 * that is using request_resource
1314 */
1315late_initcall(lapic_insert_resource);