Merge branch 'devel' into next
[pandora-kernel.git] / arch / s390 / kernel / machine_kexec.c
index f6d9bcc..131d7ee 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/mm.h>
 #include <linux/kexec.h>
 #include <linux/delay.h>
+#include <linux/reboot.h>
 #include <asm/cio.h>
 #include <asm/setup.h>
 #include <asm/pgtable.h>
@@ -18,6 +19,7 @@
 #include <asm/system.h>
 #include <asm/smp.h>
 #include <asm/reset.h>
+#include <asm/ipl.h>
 
 typedef void (*relocate_kernel_t)(kimage_entry_t *, unsigned long);
 
@@ -28,6 +30,10 @@ int machine_kexec_prepare(struct kimage *image)
 {
        void *reboot_code_buffer;
 
+       /* Can't replace kernel image since it is read-only. */
+       if (ipl_flags & IPL_NSS_VALID)
+               return -ENOSYS;
+
        /* We don't support anything but the default image type for now. */
        if (image->type != KEXEC_TYPE_DEFAULT)
                return -EINVAL;
@@ -46,7 +52,6 @@ void machine_kexec_cleanup(struct kimage *image)
 
 void machine_shutdown(void)
 {
-       printk(KERN_INFO "kexec: machine_shutdown called\n");
 }
 
 void machine_kexec(struct kimage *image)