lkml.org 
[lkml]   [2011]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch v3 6/8] s390: Do first kdump checksum test before really starting kdump
From: Michael Holzheu <holzheu@linux.vnet.ibm.com>

With this patch first the kdump checksums in purgatory are verified (with
start_kdump(0)) before kdump is started. This allows us to do the shutdown
actions defined under /sys/firmware as recovery action in case kdump is
overwritten. The main use case is to define stand-alone dump as recovery
action.

We have to split the purgatory function into "checksum test" and "real
execution", because we have to switch to the IPL CPU when we execute kdump.
After the switch it is not possible to return from the called function.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
---
arch/s390/kernel/machine_kexec.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -325,8 +325,16 @@ void machine_kexec(struct kimage *image)
{
tracer_disable();
#ifdef CONFIG_CRASH_DUMP
- if (image->type == KEXEC_TYPE_CRASH)
+ if (image->type == KEXEC_TYPE_CRASH) {
+ int (*start_kdump)(int) = (void *)image->start;
+ int rc;
+ __arch_local_irq_stnsm(0xfb); /* disable DAT */
+ rc = start_kdump(0);
+ __arch_local_irq_stosm(0x04); /* enable DAT */
+ if (rc)
+ return;
smp_switch_to_ipl_cpu(__machine_kdump, image);
+ }
#endif
smp_send_stop();
smp_switch_to_ipl_cpu(__machine_kexec, image);


\
 
 \ /
  Last update: 2011-08-12 15:53    [from the cache]
©2003-2011 Jasper Spaans