linux/include/asm-x86/mach-default
Hugh Dickins 5f464707c8 x86: fix HT cpu booting on 32-bit
Since recent smpboot 32/64-bit merge, my dual Xeon with HT has been
booting only 2 of its 4 cpus (when running an i386 kernel; but x86_64
is okay).  J.A. Magallón reports the same.

 native_cpu_up: bad cpu 2
 native_cpu_up: bad cpu 3

The mach-default cpu_present_to_apicid() was just returning cpu number
(2, 3) instead of apicid (6, 7): looks like we now need the x86_64 code
even for the i386 case.

Comparing with other versions of cpu_present_to_apicid(), it seems a
good idea to include an NR_CPUS test too, since cpu_present() doesn't
include that; but that wasn't a problem here, and may no problem at all.

Prior to that smpboot merge, my Xeon booted the two HT siblings on one
physical first, then the two siblings on the other physical after - when
i386, but alternated them when x86_64.  Since the merge, the x86_64
sequence is unchanged, but the i386 sequence is now like x86_64.

I prefer this consistency, and I prefer the new sequence: booting with
maxcpus=2 then uses the independent physicals without HT sharing.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30 23:15:35 +02:00
..
apm.h x86: remove more bogus filenames in comments. 2008-01-30 13:30:28 +01:00
do_timer.h i386/x86_64: move headers to include/asm-x86 2007-10-11 11:20:03 +02:00
entry_arch.h i386/x86_64: move headers to include/asm-x86 2007-10-11 11:20:03 +02:00
irq_vectors.h i386/x86_64: move headers to include/asm-x86 2007-10-11 11:20:03 +02:00
irq_vectors_limits.h i386/x86_64: move headers to include/asm-x86 2007-10-11 11:20:03 +02:00
mach_apic.h x86: fix HT cpu booting on 32-bit 2008-04-30 23:15:35 +02:00
mach_apicdef.h x86: fix smpboot integration 2008-04-17 17:41:21 +02:00
mach_ipi.h x86: move ipi definitions to mach_ipi.h 2008-04-17 17:41:30 +02:00
mach_mpparse.h x86: remove mpc_oem_bus_info() 2008-04-17 17:41:08 +02:00
mach_mpspec.h i386/x86_64: move headers to include/asm-x86 2007-10-11 11:20:03 +02:00
mach_timer.h x86: remove more bogus filenames in comments. 2008-01-30 13:30:28 +01:00
mach_traps.h x86: remove more bogus filenames in comments. 2008-01-30 13:30:28 +01:00
mach_wakecpu.h i386/x86_64: move headers to include/asm-x86 2007-10-11 11:20:03 +02:00
pci-functions.h i386/x86_64: move headers to include/asm-x86 2007-10-11 11:20:03 +02:00
setup_arch.h i386/x86_64: move headers to include/asm-x86 2007-10-11 11:20:03 +02:00
smpboot_hooks.h x86: section mismatch fixes, #2 2008-04-26 17:35:48 +02:00