0001
0002 #ifndef _ASM_POWERPC_MODULE_H
0003 #define _ASM_POWERPC_MODULE_H
0004 #ifdef __KERNEL__
0005
0006 #include <linux/list.h>
0007 #include <asm/bug.h>
0008 #include <asm-generic/module.h>
0009
0010 #ifndef __powerpc64__
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 struct ppc_plt_entry {
0021
0022 unsigned int jump[4];
0023 };
0024 #endif
0025
0026
0027 struct mod_arch_specific {
0028 #ifdef __powerpc64__
0029 unsigned int stubs_section;
0030 unsigned int toc_section;
0031 bool toc_fixed;
0032
0033
0034 unsigned long start_opd;
0035 unsigned long end_opd;
0036 #else
0037
0038 unsigned int core_plt_section;
0039 unsigned int init_plt_section;
0040 #endif
0041
0042 #ifdef CONFIG_DYNAMIC_FTRACE
0043 unsigned long tramp;
0044 unsigned long tramp_regs;
0045 #endif
0046
0047
0048 struct list_head bug_list;
0049 struct bug_entry *bug_table;
0050 unsigned int num_bugs;
0051 };
0052
0053
0054
0055
0056
0057
0058 #ifdef __powerpc64__
0059 # ifdef MODULE
0060 asm(".section .stubs,\"ax\",@nobits; .align 3; .previous");
0061 # endif
0062 #else
0063 # ifdef MODULE
0064 asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
0065 asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
0066 # endif
0067 #endif
0068
0069 #ifdef CONFIG_DYNAMIC_FTRACE
0070 # ifdef MODULE
0071 asm(".section .ftrace.tramp,\"ax\",@nobits; .align 3; .previous");
0072 # endif
0073
0074 int module_trampoline_target(struct module *mod, unsigned long trampoline,
0075 unsigned long *target);
0076 int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs);
0077 #else
0078 static inline int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs)
0079 {
0080 return 0;
0081 }
0082 #endif
0083
0084 #endif
0085 #endif