aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-24 05:01:49 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:02 -0400
commitf28c0ae21d80ffd6eb0987901c5273843387e341 (patch)
tree30e5d497a5deefdcfaf862f9c5c7a78dfc825cec /arch/x86/kernel/apic_64.c
parent3491998dd54f6d4ef7344518fe5463b299fdf537 (diff)
x86: make apic_32/64.c more like
except x2apic, detec_init_APIC, and calibrating_APIC_clock Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r--arch/x86/kernel/apic_64.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index eeb69838c2f8..dca6c246e731 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -69,6 +69,9 @@ static int __init parse_lapic(char *arg)
69 return 0; 69 return 0;
70} 70}
71early_param("lapic", parse_lapic); 71early_param("lapic", parse_lapic);
72/* Local APIC was disabled by the BIOS and enabled by the kernel */
73static int enabled_via_apicbase;
74
72#endif 75#endif
73 76
74#ifdef CONFIG_X86_64 77#ifdef CONFIG_X86_64
@@ -1279,6 +1282,7 @@ static int __init detect_init_APIC(void)
1279 return 0; 1282 return 0;
1280} 1283}
1281 1284
1285#ifdef CONFIG_X86_64
1282void __init early_init_lapic_mapping(void) 1286void __init early_init_lapic_mapping(void)
1283{ 1287{
1284 unsigned long phys_addr; 1288 unsigned long phys_addr;
@@ -1302,6 +1306,7 @@ void __init early_init_lapic_mapping(void)
1302 */ 1306 */
1303 boot_cpu_physical_apicid = read_apic_id(); 1307 boot_cpu_physical_apicid = read_apic_id();
1304} 1308}
1309#endif
1305 1310
1306/** 1311/**
1307 * init_apic_mappings - initialize APIC mappings 1312 * init_apic_mappings - initialize APIC mappings
@@ -1334,7 +1339,8 @@ void __init init_apic_mappings(void)
1334 * Fetch the APIC ID of the BSP in case we have a 1339 * Fetch the APIC ID of the BSP in case we have a
1335 * default configuration (or the MP table is broken). 1340 * default configuration (or the MP table is broken).
1336 */ 1341 */
1337 boot_cpu_physical_apicid = read_apic_id(); 1342 if (boot_cpu_physical_apicid == -1U)
1343 boot_cpu_physical_apicid = read_apic_id();
1338} 1344}
1339 1345
1340/* 1346/*
@@ -1782,6 +1788,7 @@ static void apic_pm_activate(void) { }
1782 1788
1783#endif /* CONFIG_PM */ 1789#endif /* CONFIG_PM */
1784 1790
1791#ifdef CONFIG_X86_64
1785/* 1792/*
1786 * apic_is_clustered_box() -- Check if we can expect good TSC 1793 * apic_is_clustered_box() -- Check if we can expect good TSC
1787 * 1794 *
@@ -1857,6 +1864,7 @@ __cpuinit int apic_is_clustered_box(void)
1857 */ 1864 */
1858 return (clusters > 2); 1865 return (clusters > 2);
1859} 1866}
1867#endif
1860 1868
1861/* 1869/*
1862 * APIC command line parameters 1870 * APIC command line parameters