]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ARM: 9439/1: arm32: simplify ARM_MMU_KEEP usage
authorRolf Eike Beer <eb@emlix.com>
Tue, 14 Jan 2025 13:45:38 +0000 (14:45 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 26 Mar 2025 13:31:13 +0000 (13:31 +0000)
All current users need to add a KEEP() around the argument so the value is
actually kept, which doesn't feel very natural and is prone to upcoming bugs as
the name suggests that this macro alone already keeps things. Move that directly
into the definition.

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/vmlinux.lds.h
arch/arm/kernel/vmlinux-xip.lds.S
arch/arm/kernel/vmlinux.lds.S

index d60f6e83a9f700f3fc5fe1e08b09c7263f49bf79..89697f2047159a11110c8cc4ed006cbb70b67a06 100644 (file)
@@ -19,7 +19,7 @@
 #endif
 
 #ifdef CONFIG_MMU
-#define ARM_MMU_KEEP(x)                x
+#define ARM_MMU_KEEP(x)                KEEP(x)
 #define ARM_MMU_DISCARD(x)
 #else
 #define ARM_MMU_KEEP(x)
index 5eddb75a7174083f7bf143798f339171540c8475..f2e8d4fac0687139ca02aafffd363a442ea03950 100644 (file)
@@ -63,7 +63,7 @@ SECTIONS
        . = ALIGN(4);
        __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
                __start___ex_table = .;
-               ARM_MMU_KEEP(KEEP(*(__ex_table)))
+               ARM_MMU_KEEP(*(__ex_table))
                __stop___ex_table = .;
        }
 
index de373c6c2ae8780f190bef7357c4d70f3b3064cc..d592a203f9c6b2714ebd7bdb17359fcb634a05fd 100644 (file)
@@ -74,7 +74,7 @@ SECTIONS
        . = ALIGN(4);
        __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
                __start___ex_table = .;
-               ARM_MMU_KEEP(KEEP(*(__ex_table)))
+               ARM_MMU_KEEP(*(__ex_table))
                __stop___ex_table = .;
        }