diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-08-01 01:20:30 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-08-03 22:02:00 -0400 |
commit | b8b572e1015f81b4e748417be2629dfe51ab99f9 (patch) | |
tree | 7df58667d5ed71d6c8f8f4ce40ca16b6fb776d0b /arch/powerpc/include/asm/module.h | |
parent | 2b12a4c524812fb3f6ee590a02e65b95c8c32229 (diff) |
powerpc: Move include files to arch/powerpc/include/asm
from include/asm-powerpc. This is the result of a
mkdir arch/powerpc/include/asm
git mv include/asm-powerpc/* arch/powerpc/include/asm
Followed by a few documentation/comment fixups and a couple of places
where <asm-powepc/...> was being used explicitly. Of the latter only
one was outside the arch code and it is a driver only built for powerpc.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/include/asm/module.h')
-rw-r--r-- | arch/powerpc/include/asm/module.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/module.h b/arch/powerpc/include/asm/module.h new file mode 100644 index 000000000000..e5f14b13ccf0 --- /dev/null +++ b/arch/powerpc/include/asm/module.h | |||
@@ -0,0 +1,77 @@ | |||
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 | |||
15 | |||
16 | #ifndef __powerpc64__ | ||
17 | /* | ||
18 | * Thanks to Paul M for explaining this. | ||
19 | * | ||
20 | * PPC can only do rel jumps += 32MB, and often the kernel and other | ||
21 | * modules are furthur away than this. So, we jump to a table of | ||
22 | * trampolines attached to the module (the Procedure Linkage Table) | ||
23 | * whenever that happens. | ||
24 | */ | ||
25 | |||
26 | struct ppc_plt_entry { | ||
27 | /* 16 byte jump instruction sequence (4 instructions) */ | ||
28 | unsigned int jump[4]; | ||
29 | }; | ||
30 | #endif /* __powerpc64__ */ | ||
31 | |||
32 | |||
33 | struct mod_arch_specific { | ||
34 | #ifdef __powerpc64__ | ||
35 | unsigned int stubs_section; /* Index of stubs section in module */ | ||
36 | unsigned int toc_section; /* What section is the TOC? */ | ||
37 | #else | ||
38 | /* Indices of PLT sections within module. */ | ||
39 | unsigned int core_plt_section; | ||
40 | unsigned int init_plt_section; | ||
41 | #endif | ||
42 | |||
43 | /* List of BUG addresses, source line numbers and filenames */ | ||
44 | struct list_head bug_list; | ||
45 | struct bug_entry *bug_table; | ||
46 | unsigned int num_bugs; | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * Select ELF headers. | ||
51 | * Make empty section for module_frob_arch_sections to expand. | ||
52 | */ | ||
53 | |||
54 | #ifdef __powerpc64__ | ||
55 | # define Elf_Shdr Elf64_Shdr | ||
56 | # define Elf_Sym Elf64_Sym | ||
57 | # define Elf_Ehdr Elf64_Ehdr | ||
58 | # ifdef MODULE | ||
59 | asm(".section .stubs,\"ax\",@nobits; .align 3; .previous"); | ||
60 | # endif | ||
61 | #else | ||
62 | # define Elf_Shdr Elf32_Shdr | ||
63 | # define Elf_Sym Elf32_Sym | ||
64 | # define Elf_Ehdr Elf32_Ehdr | ||
65 | # ifdef MODULE | ||
66 | asm(".section .plt,\"ax\",@nobits; .align 3; .previous"); | ||
67 | asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous"); | ||
68 | # endif /* MODULE */ | ||
69 | #endif | ||
70 | |||
71 | |||
72 | struct exception_table_entry; | ||
73 | void sort_ex_table(struct exception_table_entry *start, | ||
74 | struct exception_table_entry *finish); | ||
75 | |||
76 | #endif /* __KERNEL__ */ | ||
77 | #endif /* _ASM_POWERPC_MODULE_H */ | ||