ARM: 9077/1: PLT: Move struct plt_entries definition to header
authorAlex Sverdlin <alexander.sverdlin@nokia.com>
Mon, 27 Sep 2021 21:02:56 +0000 (14:02 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Oct 2021 13:05:10 +0000 (15:05 +0200)
commit 4e271701c17dee70c6e1351c4d7d42e70405c6a9 upstream

No functional change, later it will be re-used in several files.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/include/asm/module.h
arch/arm/kernel/module-plts.c

index 89ad0596033abab691d76ca426f81b4136932f86..6996405770f9083cbabe77db50a300e9b77d4264 100644 (file)
@@ -19,6 +19,15 @@ enum {
 };
 #endif
 
+#define PLT_ENT_STRIDE         L1_CACHE_BYTES
+#define PLT_ENT_COUNT          (PLT_ENT_STRIDE / sizeof(u32))
+#define PLT_ENT_SIZE           (sizeof(struct plt_entries) / PLT_ENT_COUNT)
+
+struct plt_entries {
+       u32     ldr[PLT_ENT_COUNT];
+       u32     lit[PLT_ENT_COUNT];
+};
+
 struct mod_plt_sec {
        struct elf32_shdr       *plt;
        int                     plt_count;
index 3d0c2e4dda1d23ae92ca40d4b40441d45bd02616..f272711c411f186411a263007b637162d76ebac9 100644 (file)
 #include <asm/cache.h>
 #include <asm/opcodes.h>
 
-#define PLT_ENT_STRIDE         L1_CACHE_BYTES
-#define PLT_ENT_COUNT          (PLT_ENT_STRIDE / sizeof(u32))
-#define PLT_ENT_SIZE           (sizeof(struct plt_entries) / PLT_ENT_COUNT)
-
 #ifdef CONFIG_THUMB2_KERNEL
 #define PLT_ENT_LDR            __opcode_to_mem_thumb32(0xf8dff000 | \
                                                        (PLT_ENT_STRIDE - 4))
                                                    (PLT_ENT_STRIDE - 8))
 #endif
 
-struct plt_entries {
-       u32     ldr[PLT_ENT_COUNT];
-       u32     lit[PLT_ENT_COUNT];
-};
-
 static bool in_init(const struct module *mod, unsigned long loc)
 {
        return loc - (u32)mod->init_layout.base < mod->init_layout.size;