Skip to content

Commit 04b6d02

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/purgatory: use SYM* macros instead of ENTRY(), etc.
Consistently use the SYM* family of macros instead of the deprecated ENTRY(), ENDPROC(), etc. family of macros. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent 6cea5f0 commit 04b6d02

2 files changed

Lines changed: 25 additions & 51 deletions

File tree

arch/s390/purgatory/head.S

Lines changed: 19 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676
diag %r0,%r1,0x308
7777
.endm
7878

79-
.text
80-
.align PAGE_SIZE
81-
ENTRY(purgatory_start)
79+
.text
80+
.balign PAGE_SIZE
81+
SYM_CODE_START(purgatory_start)
8282
/* The purgatory might be called after a diag308 so better set
8383
* architecture and addressing mode.
8484
*/
@@ -245,45 +245,21 @@ ENTRY(purgatory_start)
245245

246246
/* start crash kernel */
247247
START_NEXT_KERNEL .base_dst 1
248-
249-
250-
load_psw_mask:
251-
.long 0x00080000,0x80000000
252-
253-
.align 8
254-
disabled_wait_psw:
255-
.quad 0x0002000180000000
256-
.quad 0x0000000000000000 + .do_checksum_verification
257-
258-
gprregs:
259-
.rept 10
260-
.quad 0
261-
.endr
262-
263-
/* Macro to define a global variable with name and size (in bytes) to be
264-
* shared with C code.
265-
*
266-
* Add the .size and .type attribute to satisfy checks on the Elf_Sym during
267-
* purgatory load.
268-
*/
269-
.macro GLOBAL_VARIABLE name,size
270-
\name:
271-
.global \name
272-
.size \name,\size
273-
.type \name,object
274-
.skip \size,0
275-
.endm
276-
277-
GLOBAL_VARIABLE purgatory_sha256_digest,32
278-
GLOBAL_VARIABLE purgatory_sha_regions,16*__KEXEC_SHA_REGION_SIZE
279-
GLOBAL_VARIABLE kernel_entry,8
280-
GLOBAL_VARIABLE kernel_type,8
281-
GLOBAL_VARIABLE crash_start,8
282-
GLOBAL_VARIABLE crash_size,8
283-
284-
.align PAGE_SIZE
285-
stack:
248+
SYM_CODE_END(purgatory_start)
249+
250+
SYM_DATA_LOCAL(load_psw_mask, .long 0x00080000,0x80000000)
251+
.balign 8
252+
SYM_DATA_LOCAL(disabled_wait_psw, .quad 0x0002000180000000,.do_checksum_verification)
253+
SYM_DATA_LOCAL(gprregs, .fill 10,8,0)
254+
SYM_DATA(purgatory_sha256_digest, .skip 32)
255+
SYM_DATA(purgatory_sha_regions, .skip 16*__KEXEC_SHA_REGION_SIZE)
256+
SYM_DATA(kernel_entry, .skip 8)
257+
SYM_DATA(kernel_type, .skip 8)
258+
SYM_DATA(crash_start, .skip 8)
259+
SYM_DATA(crash_size, .skip 8)
260+
.balign PAGE_SIZE
261+
SYM_DATA_START_LOCAL(stack)
286262
/* The buffer to move this code must be as big as the code. */
287263
.skip stack-purgatory_start
288-
.align PAGE_SIZE
289-
purgatory_end:
264+
.balign PAGE_SIZE
265+
SYM_DATA_END_LABEL(stack, SYM_L_LOCAL, purgatory_end)
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
#include <linux/linkage.h>
23

34
.section .rodata, "a"
45

5-
.align 8
6-
kexec_purgatory:
7-
.globl kexec_purgatory
6+
.balign 8
7+
SYM_DATA_START(kexec_purgatory)
88
.incbin "arch/s390/purgatory/purgatory.ro"
9-
.Lkexec_purgatroy_end:
9+
SYM_DATA_END_LABEL(kexec_purgatory, SYM_L_LOCAL, kexec_purgatory_end)
1010

11-
.align 8
12-
kexec_purgatory_size:
13-
.globl kexec_purgatory_size
14-
.quad .Lkexec_purgatroy_end - kexec_purgatory
11+
.balign 8
12+
SYM_DATA(kexec_purgatory_size, .quad kexec_purgatory_end-kexec_purgatory)

0 commit comments

Comments
 (0)