]> git.hungrycats.org Git - linux/commit
[PATCH] APIC ID fixes
authorMikael Pettersson <mikpe@user.it.uu.se>
Wed, 26 Feb 2003 07:58:12 +0000 (23:58 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 26 Feb 2003 07:58:12 +0000 (23:58 -0800)
commitc6f5892999097cf6ab7bd928fb9f42b62ecf3e99
tree8f5978cf6ae559eb788a4dfd08bb49796648fe1f
parent1a1b64954df11fb4a317001de0ce9e427fbb8dd2
[PATCH] APIC ID fixes

1) apic_write_around(APIC_ID, boot_cpu_physical_apicid) places the APIC
value in the lower 8 bits of APIC_ID, when it should be in the upper 8. As
as result, it effectively forces the APIC id to always be 0 for the boot
CPU, which is fatal on SMP AMD boxes.

 Fix: don't do the write at all. The APIC_ID value should be right already.

2) phys_cpu_present_map = 1 means we always set bit 0, but later on
   in setup_local_APIC() we do
        if (!clustered_apic_mode &&
            !test_bit(GET_APIC_ID(apic_read(APIC_ID)), &phys_cpu_present_map))
                BUG();
and the bug is triggered if the APIC_ID is not zero.

 Fix: initialize 'phys_cpu_present_map' correctly.
arch/i386/kernel/apic.c