During service kdump start, if firmware assisted dump is not enabled then
fallback to starting of existing kexec based kdump. If firmware assisted
is enabled but not running, then start firmware assisted dump by echo'ing
1 to '/sys/kernel/fadump_registered' file.
Signed-off-by: Mahesh Salgaonkar <mahesh(a)linux.vnet.ibm.com>
---
kdumpctl | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index d6deea7..f319bd2 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -650,6 +650,29 @@ check_dump_feasibility()
return $?
}
+start_fadump()
+{
+ echo 1 > $FADUMP_REGISTER_SYS_NODE
+ if ! check_current_fadump_status; then
+ echo "fadump: failed to register"
+ return 1
+ fi
+
+ echo "fadump: registered successfully"
+ return 0
+}
+
+start_dump()
+{
+ if [ $DEFAULT_DUMP_MODE == "fadump" ]; then
+ start_fadump
+ else
+ load_kdump
+ fi
+
+ return $?
+}
+
function start()
{
check_config
@@ -691,7 +714,8 @@ function start()
echo "Starting kdump: [FAILED]"
return 1
fi
- load_kdump
+
+ start_dump
if [ $? != 0 ]; then
echo "Starting kdump: [FAILED]"
return 1