linux-stable/arch/x86
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
..
boot x86, build: Pass in additional -mno-mmx, -mno-sse options 2013-12-09 15:52:39 -08:00
configs
crypto
ia32
include mm: fix TLB flush race between migration, and change_protection_range 2013-12-18 19:04:51 -08:00
kernel x86, apic, kexec: Add disable_cpu_apicid kernel parameter 2014-01-15 09:19:20 -08:00
kvm KVM: nVMX: Unconditionally uninit the MMU on nested vmexit 2014-01-02 11:22:14 -02:00
lguest
lib ACPI and power management updates for 3.13-rc1 2013-11-14 13:41:48 +09:00
math-emu
mm mm: numa: serialise parallel get_user_page against THP migration 2013-12-18 19:04:50 -08:00
net
oprofile
pci ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node 2013-11-14 23:14:43 +01:00
platform x86, efi: Don't use (U)EFI time services on 32 bit 2013-12-10 15:02:34 -08:00
power
realmode x86, build: Pass in additional -mno-mmx, -mno-sse options 2013-12-09 15:52:39 -08:00
syscalls
tools
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2013-11-19 11:42:32 -08:00
vdso
video
xen Features: 2013-11-15 13:34:37 +09:00
.gitignore
Kbuild
Kconfig math64: Add mul_u64_u32_shr() 2013-12-11 15:52:34 +01:00
Kconfig.cpu
Kconfig.debug
Makefile x86, build: Pass in additional -mno-mmx, -mno-sse options 2013-12-09 15:52:39 -08:00
Makefile.um
Makefile_32.cpu