Skip to content

Commit 30cb62b

Browse files
asverdlinpopcornmix
authored andcommitted
ARM: 9077/1: PLT: Move struct plt_entries definition to header
commit 4e27170 upstream 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>
1 parent 4e2701d commit 30cb62b

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎arch/arm/include/asm/module.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ enum {
1919
};
2020
#endif
2121

22+
#define PLT_ENT_STRIDE L1_CACHE_BYTES
23+
#define PLT_ENT_COUNT (PLT_ENT_STRIDE / sizeof(u32))
24+
#define PLT_ENT_SIZE (sizeof(struct plt_entries) / PLT_ENT_COUNT)
25+
26+
struct plt_entries {
27+
u32 ldr[PLT_ENT_COUNT];
28+
u32 lit[PLT_ENT_COUNT];
29+
};
30+
2231
struct mod_plt_sec {
2332
struct elf32_shdr *plt;
2433
int plt_count;

‎arch/arm/kernel/module-plts.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
#include <asm/cache.h>
1313
#include <asm/opcodes.h>
1414

15-
#define PLT_ENT_STRIDE L1_CACHE_BYTES
16-
#define PLT_ENT_COUNT (PLT_ENT_STRIDE / sizeof(u32))
17-
#define PLT_ENT_SIZE (sizeof(struct plt_entries) / PLT_ENT_COUNT)
18-
1915
#ifdef CONFIG_THUMB2_KERNEL
2016
#define PLT_ENT_LDR __opcode_to_mem_thumb32(0xf8dff000 | \
2117
(PLT_ENT_STRIDE - 4))
@@ -24,11 +20,6 @@
2420
(PLT_ENT_STRIDE - 8))
2521
#endif
2622

27-
struct plt_entries {
28-
u32 ldr[PLT_ENT_COUNT];
29-
u32 lit[PLT_ENT_COUNT];
30-
};
31-
3223
static bool in_init(const struct module *mod, unsigned long loc)
3324
{
3425
return loc - (u32)mod->init_layout.base < mod->init_layout.size;

0 commit comments

Comments
 (0)