linux_dsm_epyc7002/arch/x86/kernel/apic
HATAYAMA Daisuke 151e0c7de6 x86, apic, kexec: Add disable_cpu_apicid kernel parameter
Add disable_cpu_apicid kernel parameter. To use this kernel parameter,
specify an initial APIC ID of the corresponding CPU you want to
disable.

This is mostly used for the kdump 2nd kernel to disable BSP to wake up
multiple CPUs without causing system reset or hang due to sending INIT
from AP to BSP.

Kdump users first figure out initial APIC ID of the BSP, CPU0 in the
1st kernel, for example from /proc/cpuinfo and then set up this kernel
parameter for the 2nd kernel using the obtained APIC ID.

However, doing this procedure at each boot time manually is awkward,
which should be automatically done by user-land service scripts, for
example, kexec-tools on fedora/RHEL distributions.

This design is more flexible than disabling BSP in kernel boot time
automatically in that in kernel boot time we have no choice but
referring to ACPI/MP table to obtain initial APIC ID for BSP, meaning
that the method is not applicable to the systems without such BIOS
tables.

One assumption behind this design is that users get initial APIC ID of
the BSP in still healthy state and so BSP is uniquely kept in
CPU0. Thus, through the kernel parameter, only one initial APIC ID can
be specified.

In a comparison with disabled_cpu_apicid, we use read_apic_id(), not
boot_cpu_physical_apicid, because on some platforms, the variable is
modified to the apicid reported as BSP through MP table and this
function is executed with the temporarily modified
boot_cpu_physical_apicid. As a result, disabled_cpu_apicid kernel
parameter doesn't work well for apicids of APs.

Fixing the wrong handling of boot_cpu_physical_apicid requires some
reviews and tests beyond some platforms and it could take some
time. The fix here is a kind of workaround to focus on the main topic
of this patch.

Signed-off-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Link: http://lkml.kernel.org/r/20140115064458.1545.38775.stgit@localhost6.localdomain6
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-15 09:19:20 -08:00
..
apic_flat_64.c x86/apic: Eliminate cpu_mask_to_apicid() operation 2012-06-14 12:53:13 +02:00
apic_noop.c x86/apic/x2apic: Limit the vector reservation to the user specified mask 2012-07-06 11:00:22 +02:00
apic_numachip.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
apic.c x86, apic, kexec: Add disable_cpu_apicid kernel parameter 2014-01-15 09:19:20 -08:00
bigsmp_32.c x86/apic: Eliminate cpu_mask_to_apicid() operation 2012-06-14 12:53:13 +02:00
es7000_32.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
hw_nmi.c x86: Fix trigger_all_cpu_backtrace() implementation 2013-06-20 14:00:21 +02:00
io_apic.c x86/ioapic: Check attr against the previous setting when programmed more than once 2013-08-26 12:58:00 +02:00
ipi.c x86/apic: Remove noisy zero-mask warning from default_send_IPI_mask_logical() 2013-01-24 12:12:42 +01:00
Makefile trace,x86: Move creation of irq tracepoints from apic.c to irq.c 2013-06-21 10:33:28 -04:00
numaq_32.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
probe_32.c Merge branch 'x86/apic' into x86/platform 2012-06-18 11:09:49 +02:00
probe_64.c x86/platform: Introduce APIC post-initialization callback 2012-06-06 09:06:19 +02:00
summit_32.c Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-07-22 12:19:36 -07:00
x2apic_cluster.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
x2apic_phys.c x86/apic: Work around boot failure on HP ProLiant DL980 G7 Server systems 2013-02-11 11:13:00 +01:00
x2apic_uv_x.c Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-12 12:01:14 +09:00