Greg Ungerer | a5505464 | 2009-02-19 14:18:23 +1000 | [diff] [blame] | 1 | #ifndef _ASM_M68K_MODULE_H |
| 2 | #define _ASM_M68K_MODULE_H |
| 3 | |
David Howells | 786d35d | 2012-09-28 14:31:03 +0930 | [diff] [blame] | 4 | #include <asm-generic/module.h> |
| 5 | |
Greg Ungerer | a5505464 | 2009-02-19 14:18:23 +1000 | [diff] [blame] | 6 | enum m68k_fixup_type { |
| 7 | m68k_fixup_memoffset, |
| 8 | m68k_fixup_vnode_shift, |
| 9 | }; |
| 10 | |
| 11 | struct m68k_fixup_info { |
| 12 | enum m68k_fixup_type type; |
| 13 | void *addr; |
| 14 | }; |
| 15 | |
Greg Ungerer | a66af29 | 2011-03-29 15:23:51 +1000 | [diff] [blame] | 16 | struct mod_arch_specific { |
| 17 | struct m68k_fixup_info *fixup_start, *fixup_end; |
| 18 | }; |
| 19 | |
| 20 | #ifdef CONFIG_MMU |
| 21 | |
| 22 | #define MODULE_ARCH_INIT { \ |
| 23 | .fixup_start = __start_fixup, \ |
| 24 | .fixup_end = __stop_fixup, \ |
| 25 | } |
| 26 | |
| 27 | |
Greg Ungerer | a5505464 | 2009-02-19 14:18:23 +1000 | [diff] [blame] | 28 | #define m68k_fixup(type, addr) \ |
| 29 | " .section \".m68k_fixup\",\"aw\"\n" \ |
| 30 | " .long " #type "," #addr "\n" \ |
| 31 | " .previous\n" |
| 32 | |
Greg Ungerer | a66af29 | 2011-03-29 15:23:51 +1000 | [diff] [blame] | 33 | #endif /* CONFIG_MMU */ |
| 34 | |
Greg Ungerer | a5505464 | 2009-02-19 14:18:23 +1000 | [diff] [blame] | 35 | extern struct m68k_fixup_info __start_fixup[], __stop_fixup[]; |
| 36 | |
| 37 | struct module; |
| 38 | extern void module_fixup(struct module *mod, struct m68k_fixup_info *start, |
| 39 | struct m68k_fixup_info *end); |
| 40 | |
Greg Ungerer | a5505464 | 2009-02-19 14:18:23 +1000 | [diff] [blame] | 41 | #endif /* _ASM_M68K_MODULE_H */ |