diff options
author | Jon Loeliger <jdl@freescale.com> | 2005-09-01 16:51:52 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-06 02:07:53 -0400 |
commit | 6b9269abd64c54f11dc4aaf162d2915fccae6c77 (patch) | |
tree | 78d19c06dd3f09582cdd5aa91d0981de18a99ca6 /include/asm-powerpc/module.h | |
parent | ad6571a78ac74e9fa27e581834709067dba459af (diff) |
[PATCH] ppc/ppc64: Merge more include files
This patch merges several include files from
asm-ppc and asm-ppc64 into the new asm-powerpc.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/module.h')
-rw-r--r-- | include/asm-powerpc/module.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/include/asm-powerpc/module.h b/include/asm-powerpc/module.h new file mode 100644 index 000000000000..4438f4fd6524 --- /dev/null +++ b/include/asm-powerpc/module.h | |||
@@ -0,0 +1,77 @@ | |||
1 | #ifndef _POWERPC_MODULE_H | ||
2 | #define _POWERPC_MODULE_H | ||
3 | |||
4 | /* | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | #include <linux/list.h> | ||
12 | #include <asm/bug.h> | ||
13 | |||
14 | |||
15 | #ifndef __powerpc64__ | ||
16 | /* | ||
17 | * Thanks to Paul M for explaining this. | ||
18 | * | ||
19 | * PPC can only do rel jumps += 32MB, and often the kernel and other | ||
20 | * modules are furthur away than this. So, we jump to a table of | ||
21 | * trampolines attached to the module (the Procedure Linkage Table) | ||
22 | * whenever that happens. | ||
23 | */ | ||
24 | |||
25 | struct ppc_plt_entry { | ||
26 | /* 16 byte jump instruction sequence (4 instructions) */ | ||
27 | unsigned int jump[4]; | ||
28 | }; | ||
29 | #endif /* __powerpc64__ */ | ||
30 | |||
31 | |||
32 | struct mod_arch_specific { | ||
33 | #ifdef __powerpc64__ | ||
34 | unsigned int stubs_section; /* Index of stubs section in module */ | ||
35 | unsigned int toc_section; /* What section is the TOC? */ | ||
36 | #else | ||
37 | /* Indices of PLT sections within module. */ | ||
38 | unsigned int core_plt_section; | ||
39 | unsigned int init_plt_section; | ||
40 | #endif | ||
41 | |||
42 | /* List of BUG addresses, source line numbers and filenames */ | ||
43 | struct list_head bug_list; | ||
44 | struct bug_entry *bug_table; | ||
45 | unsigned int num_bugs; | ||
46 | }; | ||
47 | |||
48 | extern struct bug_entry *module_find_bug(unsigned long bugaddr); | ||
49 | |||
50 | /* | ||
51 | * Select ELF headers. | ||
52 | * Make empty section for module_frob_arch_sections to expand. | ||
53 | */ | ||
54 | |||
55 | #ifdef __powerpc64__ | ||
56 | # define Elf_Shdr Elf64_Shdr | ||
57 | # define Elf_Sym Elf64_Sym | ||
58 | # define Elf_Ehdr Elf64_Ehdr | ||
59 | # ifdef MODULE | ||
60 | asm(".section .stubs,\"ax\",@nobits; .align 3; .previous"); | ||
61 | # endif | ||
62 | #else | ||
63 | # define Elf_Shdr Elf32_Shdr | ||
64 | # define Elf_Sym Elf32_Sym | ||
65 | # define Elf_Ehdr Elf32_Ehdr | ||
66 | # ifdef MODULE | ||
67 | asm(".section .plt,\"ax\",@nobits; .align 3; .previous"); | ||
68 | asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous"); | ||
69 | # endif /* MODULE */ | ||
70 | #endif | ||
71 | |||
72 | |||
73 | struct exception_table_entry; | ||
74 | void sort_ex_table(struct exception_table_entry *start, | ||
75 | struct exception_table_entry *finish); | ||
76 | |||
77 | #endif /* _POWERPC_MODULE_H */ | ||