From: William Lee Irwin III Marking invalid APIC ID's in phys_cpu_present_map was intended to generate "collisions" between APIC ID's in order to assist the ordinary bounds checking against the broadcast physical APIC ID. However, this is bounds checked everywhere it's necessary, and it's also not even possible to properly bounds-check everywhere. So this patch removes that marking of non-present physical APIC ID's. Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/kernel/mpparse.c | 14 +------------- 25-akpm/arch/i386/mach-visws/mpparse.c | 8 -------- 2 files changed, 1 insertion(+), 21 deletions(-) diff -puN arch/i386/kernel/mpparse.c~apic-remove-marking-of-non-present-physids-in-phys_cpu_present_map arch/i386/kernel/mpparse.c --- 25/arch/i386/kernel/mpparse.c~apic-remove-marking-of-non-present-physids-in-phys_cpu_present_map Wed Jun 9 14:46:01 2004 +++ 25-akpm/arch/i386/kernel/mpparse.c Wed Jun 9 14:46:01 2004 @@ -119,16 +119,6 @@ static int MP_valid_apicid(int apicid, i } #endif -static void MP_mark_version_physids(int version) -{ - int i; - - for (i = 0; i < MAX_APICS; ++i) { - if (!MP_valid_apicid(i, version)) - physid_set(i, phys_cpu_present_map); - } -} - void __init MP_processor_info (struct mpc_config_processor *m) { int ver, apicid; @@ -207,9 +197,7 @@ void __init MP_processor_info (struct mp num_processors++; ver = m->mpc_apicver; - if (MP_valid_apicid(apicid, ver)) - MP_mark_version_physids(ver); - else { + if (!MP_valid_apicid(apicid, ver)) { printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", m->mpc_apicid, MAX_APICS); --num_processors; diff -puN arch/i386/mach-visws/mpparse.c~apic-remove-marking-of-non-present-physids-in-phys_cpu_present_map arch/i386/mach-visws/mpparse.c --- 25/arch/i386/mach-visws/mpparse.c~apic-remove-marking-of-non-present-physids-in-phys_cpu_present_map Wed Jun 9 14:46:01 2004 +++ 25-akpm/arch/i386/mach-visws/mpparse.c Wed Jun 9 14:46:01 2004 @@ -75,14 +75,6 @@ void __init MP_processor_info (struct mp m->mpc_apicid); ver = 0x10; } - if (ver >= 0x14) - physid_set(0xff, phys_cpu_present_map); - else { - int i; - - for (i = 0xf; i < MAX_APICS; ++i) - physid_set(i, phys_cpu_present_map); - } apic_version[m->mpc_apicid] = ver; } _