~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/powerpc/include/asm/module.h

Version: ~ [ linux-5.4-rc7 ] ~ [ linux-5.3.11 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.84 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.154 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.201 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.201 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.77 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_POWERPC_MODULE_H
  2 #define _ASM_POWERPC_MODULE_H
  3 #ifdef __KERNEL__
  4 
  5 /*
  6  * This program is free software; you can redistribute it and/or
  7  * modify it under the terms of the GNU General Public License
  8  * as published by the Free Software Foundation; either version
  9  * 2 of the License, or (at your option) any later version.
 10  */
 11 
 12 #include <linux/list.h>
 13 #include <asm/bug.h>
 14 #include <asm-generic/module.h>
 15 
 16 
 17 #ifdef CC_USING_MPROFILE_KERNEL
 18 #define MODULE_ARCH_VERMAGIC    "mprofile-kernel"
 19 #endif
 20 
 21 #ifndef __powerpc64__
 22 /*
 23  * Thanks to Paul M for explaining this.
 24  *
 25  * PPC can only do rel jumps += 32MB, and often the kernel and other
 26  * modules are further away than this.  So, we jump to a table of
 27  * trampolines attached to the module (the Procedure Linkage Table)
 28  * whenever that happens.
 29  */
 30 
 31 struct ppc_plt_entry {
 32         /* 16 byte jump instruction sequence (4 instructions) */
 33         unsigned int jump[4];
 34 };
 35 #endif  /* __powerpc64__ */
 36 
 37 
 38 struct mod_arch_specific {
 39 #ifdef __powerpc64__
 40         unsigned int stubs_section;     /* Index of stubs section in module */
 41         unsigned int toc_section;       /* What section is the TOC? */
 42         bool toc_fixed;                 /* Have we fixed up .TOC.? */
 43 #ifdef CONFIG_DYNAMIC_FTRACE
 44         unsigned long toc;
 45         unsigned long tramp;
 46 #endif
 47 
 48 #else /* powerpc64 */
 49         /* Indices of PLT sections within module. */
 50         unsigned int core_plt_section;
 51         unsigned int init_plt_section;
 52 #ifdef CONFIG_DYNAMIC_FTRACE
 53         unsigned long tramp;
 54 #endif
 55 #endif /* powerpc64 */
 56 
 57         /* List of BUG addresses, source line numbers and filenames */
 58         struct list_head bug_list;
 59         struct bug_entry *bug_table;
 60         unsigned int num_bugs;
 61 };
 62 
 63 /*
 64  * Select ELF headers.
 65  * Make empty section for module_frob_arch_sections to expand.
 66  */
 67 
 68 #ifdef __powerpc64__
 69 #    ifdef MODULE
 70         asm(".section .stubs,\"ax\",@nobits; .align 3; .previous");
 71 #    endif
 72 #else
 73 #    ifdef MODULE
 74         asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
 75         asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
 76 #    endif      /* MODULE */
 77 #endif
 78 
 79 #ifdef CONFIG_DYNAMIC_FTRACE
 80 #    ifdef MODULE
 81         asm(".section .ftrace.tramp,\"ax\",@nobits; .align 3; .previous");
 82 #    endif      /* MODULE */
 83 #endif
 84 
 85 int module_trampoline_target(struct module *mod, unsigned long trampoline,
 86                              unsigned long *target);
 87 
 88 #ifdef CONFIG_DYNAMIC_FTRACE
 89 int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs);
 90 #else
 91 static inline int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs)
 92 {
 93         return 0;
 94 }
 95 #endif
 96 
 97 #endif /* __KERNEL__ */
 98 #endif  /* _ASM_POWERPC_MODULE_H */
 99 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp