[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>
This commit is contained in:
@@ -100,7 +100,6 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
|
|||||||
disabled_cpus++;
|
disabled_cpus++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
|
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
|
||||||
bootup_cpu = " (Bootup-CPU)";
|
bootup_cpu = " (Bootup-CPU)";
|
||||||
boot_cpu_id = m->mpc_apicid;
|
boot_cpu_id = m->mpc_apicid;
|
||||||
@@ -118,13 +117,6 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
|
|||||||
cpus_complement(tmp_map, cpu_present_map);
|
cpus_complement(tmp_map, cpu_present_map);
|
||||||
cpu = first_cpu(tmp_map);
|
cpu = first_cpu(tmp_map);
|
||||||
|
|
||||||
#if MAX_APICS < 255
|
|
||||||
if ((int)m->mpc_apicid > MAX_APICS) {
|
|
||||||
printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
|
|
||||||
m->mpc_apicid, MAX_APICS);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
physid_set(m->mpc_apicid, phys_cpu_present_map);
|
physid_set(m->mpc_apicid, phys_cpu_present_map);
|
||||||
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
|
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
|
||||||
/*
|
/*
|
||||||
@@ -603,8 +595,6 @@ void __init mp_register_lapic_address(u64 address)
|
|||||||
set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
|
set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
|
||||||
if (boot_cpu_id == -1U)
|
if (boot_cpu_id == -1U)
|
||||||
boot_cpu_id = GET_APIC_ID(apic_read(APIC_ID));
|
boot_cpu_id = GET_APIC_ID(apic_read(APIC_ID));
|
||||||
|
|
||||||
Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void __cpuinit mp_register_lapic (u8 id, u8 enabled)
|
void __cpuinit mp_register_lapic (u8 id, u8 enabled)
|
||||||
@@ -612,13 +602,7 @@ void __cpuinit mp_register_lapic (u8 id, u8 enabled)
|
|||||||
struct mpc_config_processor processor;
|
struct mpc_config_processor processor;
|
||||||
int boot_cpu = 0;
|
int boot_cpu = 0;
|
||||||
|
|
||||||
if (id >= MAX_APICS) {
|
if (id == boot_cpu_id)
|
||||||
printk(KERN_WARNING "Processor #%d invalid (max %d)\n",
|
|
||||||
id, MAX_APICS);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (id == boot_cpu_physical_apicid)
|
|
||||||
boot_cpu = 1;
|
boot_cpu = 1;
|
||||||
|
|
||||||
processor.mpc_type = MP_PROCESSOR;
|
processor.mpc_type = MP_PROCESSOR;
|
||||||
|
@@ -155,8 +155,6 @@ extern void acpi_reserve_bootmem(void);
|
|||||||
|
|
||||||
#endif /*CONFIG_ACPI_SLEEP*/
|
#endif /*CONFIG_ACPI_SLEEP*/
|
||||||
|
|
||||||
#define boot_cpu_physical_apicid boot_cpu_id
|
|
||||||
|
|
||||||
extern int acpi_disabled;
|
extern int acpi_disabled;
|
||||||
extern int acpi_pci_disabled;
|
extern int acpi_pci_disabled;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user