With kernel commit 0823c68b054b ("powerpc/fadump: re-register firmware- assisted dump if already registered") support is enabled to re-register when FADump is alredy registered. Leverage that option in kdump scripts.
Signed-off-by: Hari Bathini hbathini@linux.ibm.com --- kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index de6da39..c93c3fa 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1047,7 +1047,8 @@ reload() fi
if [ $DEFAULT_DUMP_MODE == "fadump" ]; then - stop_fadump + reload_fadump + return $? else stop_kdump fi @@ -1103,6 +1104,19 @@ stop_kdump() return 0 }
+reload_fadump() +{ + start_fadump + if [ $? != 0 ]; then + # FADump could fail on older kernel where re-register + # support is not enabled. Try stop/start from userspace + # to handle such scenario. + stop_fadump + start_fadump + return $? + fi +} + stop() { if [ $DEFAULT_DUMP_MODE == "fadump" ]; then