[S390] kernel: Add OS info memory interface
In order to allow kdump based stand-alone dump, some information
has to be passed from the old kernel to the new dump kernel. This
is done via a the struct "os_info" that contains the following fields:
* crashkernel base and size
* reipl block
* vmcoreinfo
* init function
A pointer to os_info is stored at a well known storage location
and the whole structure as well as all fields are secured with
checksums.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index d15b6c9..3b9e5c9 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -41,6 +41,7 @@
#include <asm/sclp.h>
#include <asm/vdso.h>
#include <asm/debug.h>
+#include <asm/os_info.h>
#include "entry.h"
enum {
@@ -826,6 +827,17 @@
#endif /* CONFIG_HOTPLUG_CPU */
+static void smp_call_os_info_init_fn(void)
+{
+ int (*init_fn)(void);
+ unsigned long size;
+
+ init_fn = os_info_old_entry(OS_INFO_INIT_FN, &size);
+ if (!init_fn)
+ return;
+ init_fn();
+}
+
void __init smp_prepare_cpus(unsigned int max_cpus)
{
/* request the 0x1201 emergency signal external interrupt */
@@ -834,6 +846,7 @@
/* request the 0x1202 external call external interrupt */
if (register_external_interrupt(0x1202, do_ext_call_interrupt) != 0)
panic("Couldn't request external interrupt 0x1202");
+ smp_call_os_info_init_fn();
smp_detect_cpus();
}