summaryrefslogtreecommitdiff
path: root/arch/metag/kernel
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2015-11-26 09:44:08 +1030
committerJiri Kosina <jkosina@suse.cz>2015-12-04 22:46:25 +0100
commit7523e4dc5057e157212b4741abd6256e03404cf1 (patch)
tree034014d98dea3f675e8e138bc34bd4e0a860b12b /arch/metag/kernel
parentc65abf358f211c3f88c8ed714dff25775ab49fc1 (diff)
module: use a structure to encapsulate layout.
Makes it easier to handle init vs core cleanly, though the change is fairly invasive across random architectures. It simplifies the rbtree code immediately, however, while keeping the core data together in the same cachline (now iff the rbtree code is enabled). Acked-by: Peter Zijlstra <peterz@infradead.org> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'arch/metag/kernel')
-rw-r--r--arch/metag/kernel/module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/metag/kernel/module.c b/arch/metag/kernel/module.c
index 986331cd0a52..bb8dfba9a763 100644
--- a/arch/metag/kernel/module.c
+++ b/arch/metag/kernel/module.c
@@ -176,8 +176,8 @@ static uint32_t do_plt_call(void *location, Elf32_Addr val,
tramp[1] = 0xac000001 | ((val & 0x0000ffff) << 3);
/* Init, or core PLT? */
- if (location >= mod->module_core
- && location < mod->module_core + mod->core_size)
+ if (location >= mod->core_layout.base
+ && location < mod->core_layout.base + mod->core_layout.size)
entry = (void *)sechdrs[mod->arch.core_plt_section].sh_addr;
else
entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr;