s390/sclp: keep sclp_early_sccb
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 28 Nov 2022 13:14:27 +0000 (14:14 +0100)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 6 Dec 2022 15:18:24 +0000 (16:18 +0100)
Keep sclp_early_sccb so it can also be used after initdata has been
freed. This is a prerequisite to allow printing a message from the
machine check handler.

Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/mm/init.c
drivers/s390/char/sclp_early_core.c

index a28832e..1a25d45 100644 (file)
@@ -208,9 +208,6 @@ void free_initmem(void)
        __set_memory((unsigned long)_sinittext,
                     (unsigned long)(_einittext - _sinittext) >> PAGE_SHIFT,
                     SET_MEMORY_RW | SET_MEMORY_NX);
-       free_reserved_area(sclp_early_sccb,
-                          sclp_early_sccb + EXT_SCCB_READ_SCP,
-                          POISON_FREE_INITMEM, "unused early sccb");
        free_initmem_default(POISON_FREE_INITMEM);
 }
 
index 676634d..baf1cd2 100644 (file)
@@ -17,7 +17,7 @@
 
 static struct read_info_sccb __bootdata(sclp_info_sccb);
 static int __bootdata(sclp_info_sccb_valid);
-char *__bootdata(sclp_early_sccb);
+char *__bootdata_preserved(sclp_early_sccb);
 int sclp_init_state = sclp_init_state_uninitialized;
 /*
  * Used to keep track of the size of the event masks. Qemu until version 2.11