]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sh: Fix fallout from ZERO_PAGE consolidation
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Fri, 17 Apr 2026 10:32:07 +0000 (13:32 +0300)
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Sun, 3 May 2026 14:35:40 +0000 (16:35 +0200)
Consolidation of empty_zero_page declarations broke boot on sh.

sh stores its initial boot parameters in a page reserved in
arch/sh/kernel/head_32.S. Before commit 6215d9f4470f ("arch, mm:
consolidate empty_zero_page") this page was referenced in C code
as an array and after that commit it is referenced as a pointer.

This causes wrong code generation and boot hang.

Declare boot_params_page as an array to fix the issue.

Reported-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Tested-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Fixes: 6215d9f4470f ("arch, mm: consolidate empty_zero_page")
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
arch/sh/include/asm/setup.h

index 63c9efc063486874b51323b0a6850c92bb81c0b2..8488f76b48b40536ba7eb49c475cd3d96015f0c5 100644 (file)
@@ -7,7 +7,7 @@
 /*
  * This is set up by the setup-routine at boot-time
  */
-extern unsigned char *boot_params_page;
+extern unsigned char boot_params_page[];
 #define PARAM boot_params_page
 
 #define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))