x86/smpboot: Check APIC ID before setting up default routing
authorWei Jiangang <weijg.fnst@cn.fujitsu.com>
Fri, 19 Aug 2016 03:22:36 +0000 (11:22 +0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 24 Aug 2016 09:24:33 +0000 (11:24 +0200)
commit384d9fe3741657c8ed8cd9bf30bc1d4611864d56
treec3f94922e52e0a253f304b8476e710c022a47e4f
parent624cad9d2907a0788b56e3ca664c5d7d02645ed4
x86/smpboot: Check APIC ID before setting up default routing

This is not a bugfix, but code optimization.

If the BSP's APIC ID in local APIC is unexpected,
a kernel panic will occur and the system will halt.
That means no need to enable APIC mode, and no reason
to set up the default routing for APIC.

The combination of default_setup_apic_routing() and
apic_bsp_setup() are used to enable APIC mode.
They two should be kept together, rather than being
separated by the codes of checking APIC ID.
Just like their usage in APIC_init_uniprocessor().

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bp@suse.de
Link: http://lkml.kernel.org/r/1471576957-12961-1-git-send-email-weijg.fnst@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/smpboot.c