s390/kexec_file: Prepare setup.h for kexec_file_load
authorPhilipp Rudo <prudo@linux.vnet.ibm.com>
Tue, 27 Jun 2017 10:44:11 +0000 (12:44 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Apr 2018 07:10:21 +0000 (09:10 +0200)
kexec_file_load needs to prepare the new kernels before they are loaded.
For that it has to know the offsets in head.S, e.g. to register the new
command line. Unfortunately there are no macros right now defining those
offsets. Define them now.

Signed-off-by: Philipp Rudo <prudo@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/setup.h

index 124154f..9c30ebe 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
  *  S390 version
- *    Copyright IBM Corp. 1999, 2010
+ *    Copyright IBM Corp. 1999, 2017
  */
 #ifndef _ASM_S390_SETUP_H
 #define _ASM_S390_SETUP_H
 #define LPP_MAGIC              _BITUL(31)
 #define LPP_PID_MASK           _AC(0xffffffff, UL)
 
+/* Offsets to entry points in kernel/head.S  */
+
+#define STARTUP_NORMAL_OFFSET  0x10000
+#define STARTUP_KDUMP_OFFSET   0x10010
+
+/* Offsets to parameters in kernel/head.S  */
+
+#define IPL_DEVICE_OFFSET      0x10400
+#define INITRD_START_OFFSET    0x10408
+#define INITRD_SIZE_OFFSET     0x10410
+#define OLDMEM_BASE_OFFSET     0x10418
+#define OLDMEM_SIZE_OFFSET     0x10420
+#define COMMAND_LINE_OFFSET    0x10480
+
 #ifndef __ASSEMBLY__
 
 #include <asm/lowcore.h>
 #include <asm/types.h>
 
-#define IPL_DEVICE        (*(unsigned long *)  (0x10400))
-#define INITRD_START      (*(unsigned long *)  (0x10408))
-#define INITRD_SIZE       (*(unsigned long *)  (0x10410))
-#define OLDMEM_BASE      (*(unsigned long *)  (0x10418))
-#define OLDMEM_SIZE      (*(unsigned long *)  (0x10420))
-#define COMMAND_LINE      ((char *)            (0x10480))
+#define IPL_DEVICE     (*(unsigned long *)  (IPL_DEVICE_OFFSET))
+#define INITRD_START   (*(unsigned long *)  (INITRD_START_OFFSET))
+#define INITRD_SIZE    (*(unsigned long *)  (INITRD_SIZE_OFFSET))
+#define OLDMEM_BASE    (*(unsigned long *)  (OLDMEM_BASE_OFFSET))
+#define OLDMEM_SIZE    (*(unsigned long *)  (OLDMEM_SIZE_OFFSET))
+#define COMMAND_LINE   ((char *)            (COMMAND_LINE_OFFSET))
 
 extern int memory_end_set;
 extern unsigned long memory_end;
@@ -121,12 +135,12 @@ extern void (*_machine_power_off)(void);
 
 #else /* __ASSEMBLY__ */
 
-#define IPL_DEVICE        0x10400
-#define INITRD_START      0x10408
-#define INITRD_SIZE       0x10410
-#define OLDMEM_BASE      0x10418
-#define OLDMEM_SIZE      0x10420
-#define COMMAND_LINE      0x10480
+#define IPL_DEVICE     (IPL_DEVICE_OFFSET)
+#define INITRD_START   (INITRD_START_OFFSET)
+#define INITRD_SIZE    (INITRD_SIZE_OFFSET)
+#define OLDMEM_BASE    (OLDMEM_BASE_OFFSET)
+#define OLDMEM_SIZE    (OLDMEM_SIZE_OFFSET)
+#define COMMAND_LINE   (COMMAND_LINE_OFFSET)
 
 #endif /* __ASSEMBLY__ */
 #endif /* _ASM_S390_SETUP_H */