50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
|
From: Petr Tesarik <ptesarik@suse.cz>
|
||
|
Subject: Add disable_cpu_apicid for BSP to the commandline
|
||
|
References: bnc#861981
|
||
|
Patch-mainline: v0.8.8
|
||
|
|
||
|
Since the BSP cannot be brought up in the kdump environment, and there is no
|
||
|
reliable way of getting the APIC ID of an offlined CPU, it must be figured
|
||
|
out by the primary kernel and passed as a command-line option.
|
||
|
|
||
|
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
||
|
|
||
|
---
|
||
|
NEWS | 2 ++
|
||
|
init/rc.kdump.functions | 13 +++++++++++--
|
||
|
2 files changed, 13 insertions(+), 2 deletions(-)
|
||
|
|
||
|
--- a/NEWS
|
||
|
+++ b/NEWS
|
||
|
@@ -1,5 +1,7 @@
|
||
|
0.8.8
|
||
|
-----
|
||
|
+ * Add disable_cpu_apicid parameter to the command line on x86 to prevent
|
||
|
+ bringing up the BSP in the kdump kernel.
|
||
|
* Use nr_cpus instead of maxcpus with recent kernels.
|
||
|
|
||
|
0.8.7
|
||
|
--- a/init/rc.kdump.functions
|
||
|
+++ b/init/rc.kdump.functions
|
||
|
@@ -103,9 +103,18 @@ function build_kdump_commandline()
|
||
|
< /proc/cmdline)
|
||
|
# Use deadline for saving the memory footprint
|
||
|
commandline="$commandline elevator=deadline sysrq=yes reset_devices"
|
||
|
- case `uname -i` in
|
||
|
+ local arch=$(uname -i)
|
||
|
+ case "$arch" in
|
||
|
i?86|x86_64|ia64)
|
||
|
- commandline="$commandline irqpoll maxcpus=${KDUMP_CPUS:-1}"
|
||
|
+ local nr_cpus=$(cpus_param "$kdump_kernel")
|
||
|
+ commandline="$commandline irqpoll ${nr_cpus}=${KDUMP_CPUS:-1}"
|
||
|
+ if [ "$arch" = "x86_64" -o -z "${arch#i?86}" ]; then
|
||
|
+ local boot_apicid=$(
|
||
|
+ awk -F':[ \t]' '/^initial apicid[ \t]*:/ {print $2; exit}' \
|
||
|
+ /proc/cpuinfo)
|
||
|
+ test -n "$boot_apicid" &&
|
||
|
+ commandline="$commandline disable_cpu_apicid=$boot_apicid"
|
||
|
+ fi
|
||
|
;;
|
||
|
s390*)
|
||
|
commandline="$commandline zfcp.allow_lun_scan=0"
|