Commit 455cac50 authored by Alexander Egorenkov's avatar Alexander Egorenkov Committed by Heiko Carstens

s390/setup: generate asm offsets from struct parmarea

To reduce duplication, replace error-prone and hard-coded parameter area
offsets with auto-generated ones.
Signed-off-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent f4cb3c9b
......@@ -44,15 +44,6 @@
#define STARTUP_NORMAL_OFFSET 0x10000
#define STARTUP_KDUMP_OFFSET 0x10010
/* Offsets to parameters in kernel/head.S */
#define IPL_DEVICE 0x10400
#define INITRD_START 0x10408
#define INITRD_SIZE 0x10410
#define OLDMEM_BASE 0x10418
#define OLDMEM_SIZE 0x10420
#define COMMAND_LINE 0x10480
#ifndef __ASSEMBLY__
#include <asm/lowcore.h>
......
......@@ -152,5 +152,12 @@ int main(void)
DEFINE(__KEXEC_SHA_REGION_SIZE, sizeof(struct kexec_sha_region));
/* sizeof kernel parameter area */
DEFINE(__PARMAREA_SIZE, sizeof(struct parmarea));
/* kernel parameter area offsets */
DEFINE(IPL_DEVICE, PARMAREA + offsetof(struct parmarea, ipl_device));
DEFINE(INITRD_START, PARMAREA + offsetof(struct parmarea, initrd_start));
DEFINE(INITRD_SIZE, PARMAREA + offsetof(struct parmarea, initrd_size));
DEFINE(OLDMEM_BASE, PARMAREA + offsetof(struct parmarea, oldmem_base));
DEFINE(OLDMEM_SIZE, PARMAREA + offsetof(struct parmarea, oldmem_size));
DEFINE(COMMAND_LINE, PARMAREA + offsetof(struct parmarea, command_line));
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment