aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:37 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:37 -0400
commite4251e130deef9de5226cc36faa70a1c6671d3c5 (patch)
tree22d75691bbcd93b88624ceaa19d8d4fd5ec5900a
parentf2c2cca3acef8b253a36381d9b469ad4fb08563a (diff)
[PATCH] Remove some cruft in apic id checking during processor setup
- Remove a define that was used only once - Remove the too large APIC ID check because we always support the full 8bit range of APICs. - Restructure code a bit to be simpler. Cc: len.brown@intel.com Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r--arch/x86_64/kernel/mpparse.c18
-rw-r--r--include/asm-x86_64/acpi.h2
2 files changed, 1 insertions, 19 deletions
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index 32b6977f80c0..02eef8f6415f 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -100,7 +100,6 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
100 disabled_cpus++; 100 disabled_cpus++;
101 return; 101 return;
102 } 102 }
103
104 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { 103 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
105 bootup_cpu = " (Bootup-CPU)"; 104 bootup_cpu = " (Bootup-CPU)";
106 boot_cpu_id = m->mpc_apicid; 105 boot_cpu_id = m->mpc_apicid;
@@ -118,13 +117,6 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
118 cpus_complement(tmp_map, cpu_present_map); 117 cpus_complement(tmp_map, cpu_present_map);
119 cpu = first_cpu(tmp_map); 118 cpu = first_cpu(tmp_map);
120 119
121#if MAX_APICS < 255
122 if ((int)m->mpc_apicid > MAX_APICS) {
123 printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
124 m->mpc_apicid, MAX_APICS);
125 return;
126 }
127#endif
128 physid_set(m->mpc_apicid, phys_cpu_present_map); 120 physid_set(m->mpc_apicid, phys_cpu_present_map);
129 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { 121 if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
130 /* 122 /*
@@ -603,8 +595,6 @@ void __init mp_register_lapic_address(u64 address)
603 set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr); 595 set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
604 if (boot_cpu_id == -1U) 596 if (boot_cpu_id == -1U)
605 boot_cpu_id = GET_APIC_ID(apic_read(APIC_ID)); 597 boot_cpu_id = GET_APIC_ID(apic_read(APIC_ID));
606
607 Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
608} 598}
609 599
610void __cpuinit mp_register_lapic (u8 id, u8 enabled) 600void __cpuinit mp_register_lapic (u8 id, u8 enabled)
@@ -612,13 +602,7 @@ void __cpuinit mp_register_lapic (u8 id, u8 enabled)
612 struct mpc_config_processor processor; 602 struct mpc_config_processor processor;
613 int boot_cpu = 0; 603 int boot_cpu = 0;
614 604
615 if (id >= MAX_APICS) { 605 if (id == boot_cpu_id)
616 printk(KERN_WARNING "Processor #%d invalid (max %d)\n",
617 id, MAX_APICS);
618 return;
619 }
620
621 if (id == boot_cpu_physical_apicid)
622 boot_cpu = 1; 606 boot_cpu = 1;
623 607
624 processor.mpc_type = MP_PROCESSOR; 608 processor.mpc_type = MP_PROCESSOR;
diff --git a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h
index 2c95a319c056..ed59aa4c6ff9 100644
--- a/include/asm-x86_64/acpi.h
+++ b/include/asm-x86_64/acpi.h
@@ -155,8 +155,6 @@ extern void acpi_reserve_bootmem(void);
155 155
156#endif /*CONFIG_ACPI_SLEEP*/ 156#endif /*CONFIG_ACPI_SLEEP*/
157 157
158#define boot_cpu_physical_apicid boot_cpu_id
159
160extern int acpi_disabled; 158extern int acpi_disabled;
161extern int acpi_pci_disabled; 159extern int acpi_pci_disabled;
162 160