From e6be1c1b793915e001ceaf3f6f93a00c396618dc Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Thu, 16 Mar 2023 14:13:12 +0100 Subject: [PATCH] zipl/boot: constify data in section `stage2_head` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Declare `magic`, `tape_head`, and `stage2_head` as const. Acked-by: Eduard Shishkin Acked-by: Mikhail Zaslonko Reviewed-by: Steffen Eiden Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- zipl/boot/eckd2dump_mv.c | 2 +- zipl/boot/eckd2dump_sv.c | 2 +- zipl/boot/fba2dump.c | 2 +- zipl/boot/stage2.c | 2 +- zipl/boot/tape2dump.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zipl/boot/eckd2dump_mv.c b/zipl/boot/eckd2dump_mv.c index 18b1c9bc..f0bb2c1d 100644 --- a/zipl/boot/eckd2dump_mv.c +++ b/zipl/boot/eckd2dump_mv.c @@ -21,7 +21,7 @@ /* * Magic number at start of dump record */ -uint64_t __section(.stage2.head) magic = 0x584d554c54363401ULL; /* XMULT64, version 1 */ +const uint64_t __section(.stage2.head) magic = 0x584d554c54363401ULL; /* XMULT64, version 1 */ /* * Parameter format for ECKD MV dumper (13 bytes): diff --git a/zipl/boot/eckd2dump_sv.c b/zipl/boot/eckd2dump_sv.c index d143bfe8..955010f0 100644 --- a/zipl/boot/eckd2dump_sv.c +++ b/zipl/boot/eckd2dump_sv.c @@ -19,7 +19,7 @@ /* * Magic number at start of dump record */ -uint64_t __section(.stage2.head) magic = 0x5845434b44363401ULL; /* "XECKD64", version 1 */ +const uint64_t __section(.stage2.head) magic = 0x5845434b44363401ULL; /* "XECKD64", version 1 */ /* * Get device characteristics from zipl parameter block diff --git a/zipl/boot/fba2dump.c b/zipl/boot/fba2dump.c index e2af3ad8..9a76d2c6 100644 --- a/zipl/boot/fba2dump.c +++ b/zipl/boot/fba2dump.c @@ -23,7 +23,7 @@ /* * Magic number at start of dump record */ -uint64_t __section(.stage2.head) magic = 0x5844464241363401ULL; /* XDFBA64, version 1 */ +const uint64_t __section(.stage2.head) magic = 0x5844464241363401ULL; /* XDFBA64, version 1 */ /* * FBA dump device partition specification diff --git a/zipl/boot/stage2.c b/zipl/boot/stage2.c index d5c0752f..9fefee6f 100644 --- a/zipl/boot/stage2.c +++ b/zipl/boot/stage2.c @@ -148,4 +148,4 @@ void panic_notify(unsigned long UNUSED(reason)) { } -uint64_t __section(.stage2.head) stage2_head; +const uint64_t __section(.stage2.head) stage2_head; diff --git a/zipl/boot/tape2dump.c b/zipl/boot/tape2dump.c index 638c524b..652d23d3 100644 --- a/zipl/boot/tape2dump.c +++ b/zipl/boot/tape2dump.c @@ -37,7 +37,7 @@ struct tape_head { uint64_t ccw2; } __packed; -struct tape_head __section(.stage2.head) tape_head = { +const struct tape_head __section(.stage2.head) tape_head = { .psw = PSW_LOAD | STAGE2_ENTRY, /* Start code at 0x2018 */ .ccw1 = 0x0700000060000001ULL, /* Rewind ccw */ .ccw2 = 0x0200200020003000ULL, /* CCW to load dump tool to 0x2000 */