Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/boot: convert parmarea to C

Convert parmarea to C, which makes it much easier to initialize it. No need
to keep offsets in assembler code in sync with struct parmarea anymore.

Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

+12 -21
-20
arch/s390/boot/head.S
··· 333 333 lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r8) 334 334 lpswe __LC_RETURN_PSW # disabled wait 335 335 SYM_CODE_END(startup_pgm_check_handler) 336 - 337 - # 338 - # params at 10400 (setup.h) 339 - # Must be keept in sync with struct parmarea in setup.h 340 - # 341 - .org PARMAREA - IPL_START 342 - SYM_DATA_START(parmarea) 343 - .quad 0 # IPL_DEVICE 344 - .quad 0 # INITRD_START 345 - .quad 0 # INITRD_SIZE 346 - .quad 0 # OLDMEM_BASE 347 - .quad 0 # OLDMEM_SIZE 348 - .quad kernel_version # points to kernel version string 349 - .quad COMMAND_LINE_SIZE 350 - 351 - .org COMMAND_LINE - IPL_START 352 - .byte "root=/dev/ram0 ro" 353 - .byte 0 354 - .org PARMAREA+__PARMAREA_SIZE - IPL_START 355 - SYM_DATA_END(parmarea)
+1 -1
arch/s390/boot/ipl_data.c
··· 44 44 * that to succeed the two initial CCWs, and the 0x40 fill bytes must 45 45 * be present. 46 46 */ 47 - struct ipl_lowcore ipl_lowcore __section(".ipldata") = { 47 + static struct ipl_lowcore ipl_lowcore __used __section(".ipldata") = { 48 48 .ipl_psw = { .mask = PSW32_MASK_BASE, .addr = PSW32_ADDR_AMODE | IPL_START }, 49 49 .ccwpgm = { 50 50 [ 0] = CCW0(CCW_CMD_READ_IPL, 0x018, 0x50, CCW_FLAG_SLI | CCW_FLAG_CC),
+7
arch/s390/boot/ipl_parm.c
··· 8 8 #include <asm/sections.h> 9 9 #include <asm/boot_data.h> 10 10 #include <asm/facility.h> 11 + #include <asm/setup.h> 11 12 #include <asm/uv.h> 12 13 #include "boot.h" 14 + 15 + struct parmarea parmarea __section(".parmarea") = { 16 + .kernel_version = (unsigned long)kernel_version, 17 + .max_command_line_size = COMMAND_LINE_SIZE, 18 + .command_line = "root=/dev/ram0 ro", 19 + }; 13 20 14 21 char __bootdata(early_command_line)[COMMAND_LINE_SIZE]; 15 22 int __bootdata(noexec_disabled);
+4
arch/s390/boot/vmlinux.lds.S
··· 23 23 HEAD_TEXT 24 24 _ehead = . ; 25 25 } 26 + . = PARMAREA; 27 + .parmarea : { 28 + *(.parmarea) 29 + } 26 30 .text : { 27 31 _text = .; /* Text */ 28 32 *(.text)