SHA256
1
0
forked from pool/kdump
kdump/kdump-fadump-add-udev-support.patch
Petr Tesařík b93682ecd4 - kdump-turn-off-NUMA-in-kdump-kernel.patch: Turn off NUMA in the
kdump kernel (bsc#1109784, bsc#1102609).

- kdump-fadump-add-udev-support.patch: fadump: add udev event
  support for fadump (bsc#1108170).

- kdump-fadump-avoid-multipath-optimizations.patch: fadump: avoid
  multipath optimizations that break regular boot (bsc#1101730).
- kdump-split-cmdline-purpose-wise.patch: cmdline: split kdump
  cmdline purpose wise (bsc#1101730).
- kdump-fadump-fix-network-bring-up.patch: fadump: fix network
  bring up issue during default boot (bsc#1101730).

OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=173
2018-10-05 15:04:48 +00:00

74 lines
2.6 KiB
Diff

From: Hari Bathini <hbathini@linux.ibm.com>
Subject: fadump: add udev event support for fadump
References: bsc#1108170
Upstream: merged
Git-commit: eb5784f6cb8368b346b9b52be66116fc5a47f720
Currently, the udev rules written in kdump package only support reloading
kdump on memory/cpu hot add/remove operation. But this is needed as much
for FADump as well. The rules were not updated to support fadump owing to
lack of support in the kernel for re-registering FADump. This support is
now added to kernel with commit 0823c68b054b ("powerpc/fadump: re-register
firmware-assisted dump if already registered"). Update kdump udev rules
to load fadump on memory/cpu DLPAR operations.
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
---
70-kdump.rules.in | 3 +++
init/load.sh | 29 ++++++++++++++++-------------
2 files changed, 19 insertions(+), 13 deletions(-)
--- a/70-kdump.rules.in
+++ b/70-kdump.rules.in
@@ -21,6 +21,9 @@ GOTO="kdump_end"
# Reload only if panic kernel is already loaded
LABEL="kdump_try_restart"
PROGRAM="/bin/cat /sys/kernel/kexec_crash_loaded", RESULT!="0", RUN+="/lib/kdump/load-once.sh"
+@if @ARCH@ ppc64 ppc64le
+TEST=="/sys/kernel/fadump_registered", PROGRAM="/bin/cat /sys/kernel/fadump_registered", RESULT!="0", RUN+="/lib/kdump/load-once.sh"
+@endif
LABEL="kdump_end"
@endif
--- a/init/load.sh
+++ b/init/load.sh
@@ -243,21 +243,24 @@ function load_kdump_fadump()
local msg
local result=0
+ local output
- # The kernel fails with EINVAL if registered already
- # (see bnc#814780)
- if [ "$(cat $FADUMP_REGISTERED)" != "1" ] ; then
- local output
-
- output=$( (echo 1 > "$FADUMP_REGISTERED") 2>&1)
- if [ $? -eq 0 ] ; then
- msg="Registered fadump"
- else
- msg="FAILED to register fadump: $output"
- result=1
- fi
+ # Re-registering of FADump is supported in kernel (see bsc#1108170).
+ # So, don't bother about whether FADump was registered already
+ output=$( (echo 1 > "$FADUMP_REGISTERED") 2>&1)
+ if [ $? -eq 0 ] ; then
+ msg="Registered fadump"
else
- msg="fadump is already registered"
+ # For backward compatibility on older kernel that
+ # returns -EEXIST/-EINVAL
+ if [ "$(cat $FADUMP_REGISTERED)" == "1" ] ; then
+ # TODO: unregiser/register OR warn user to stop/start?
+ # Best bet is to update to latest kernel.
+ msg="fadump is already registered"
+ else
+ msg="FAILED to register fadump: $output"
+ result=1
+ fi
fi
echo "$msg"