]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powerpc/modules: remove unused mod_arch_specific.toc field
authorJosh Poimboeuf <jpoimboe@redhat.com>
Fri, 25 May 2018 03:48:34 +0000 (22:48 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 28 May 2018 08:46:34 +0000 (18:46 +1000)
The toc field in the mod_arch_specific struct isn't actually used
anywhere, so remove it.

Also the ftrace-specific fields are now common between 32-bit and
64-bit, so simplify the struct definition a bit by moving them out of
the __powerpc64__ #ifdef.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/module.h
arch/powerpc/kernel/module_64.c

index 18f7214d68b78faadc8134adda96ff0694ae37e3..d8374f984f39945e4f12451270962777bd0befeb 100644 (file)
@@ -50,13 +50,6 @@ struct mod_arch_specific {
        unsigned int stubs_section;     /* Index of stubs section in module */
        unsigned int toc_section;       /* What section is the TOC? */
        bool toc_fixed;                 /* Have we fixed up .TOC.? */
-#ifdef CONFIG_DYNAMIC_FTRACE
-       unsigned long toc;
-       unsigned long tramp;
-#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
-       unsigned long tramp_regs;
-#endif
-#endif
 
        /* For module function descriptor dereference */
        unsigned long start_opd;
@@ -65,10 +58,14 @@ struct mod_arch_specific {
        /* Indices of PLT sections within module. */
        unsigned int core_plt_section;
        unsigned int init_plt_section;
+#endif /* powerpc64 */
+
 #ifdef CONFIG_DYNAMIC_FTRACE
        unsigned long tramp;
+#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
+       unsigned long tramp_regs;
+#endif
 #endif
-#endif /* powerpc64 */
 
        /* List of BUG addresses, source line numbers and filenames */
        struct list_head bug_list;
index f7667e2ebfcb8278432ca7852e0651012b9599e3..1b7419579820fb54817cfbcdc2004a4a2a43dae5 100644 (file)
@@ -823,7 +823,6 @@ static unsigned long create_ftrace_stub(const Elf64_Shdr *sechdrs,
 
 int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs)
 {
-       mod->arch.toc = my_r2(sechdrs, mod);
        mod->arch.tramp = create_ftrace_stub(sechdrs, mod,
                                        (unsigned long)ftrace_caller);
 #ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS