blob: 8b58fce843ddc2bf06a4f6f030f241a2add7b312 [file] [log] [blame]
Greg Ungerera55054642009-02-19 14:18:23 +10001#ifndef _ASM_M68K_MODULE_H
2#define _ASM_M68K_MODULE_H
3
David Howells786d35d2012-09-28 14:31:03 +09304#include <asm-generic/module.h>
5
Greg Ungerera55054642009-02-19 14:18:23 +10006enum m68k_fixup_type {
7 m68k_fixup_memoffset,
8 m68k_fixup_vnode_shift,
9};
10
11struct m68k_fixup_info {
12 enum m68k_fixup_type type;
13 void *addr;
14};
15
Greg Ungerera66af292011-03-29 15:23:51 +100016struct 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 Ungerera55054642009-02-19 14:18:23 +100028#define m68k_fixup(type, addr) \
29 " .section \".m68k_fixup\",\"aw\"\n" \
30 " .long " #type "," #addr "\n" \
31 " .previous\n"
32
Greg Ungerera66af292011-03-29 15:23:51 +100033#endif /* CONFIG_MMU */
34
Greg Ungerera55054642009-02-19 14:18:23 +100035extern struct m68k_fixup_info __start_fixup[], __stop_fixup[];
36
37struct module;
38extern void module_fixup(struct module *mod, struct m68k_fixup_info *start,
39 struct m68k_fixup_info *end);
40
Greg Ungerera55054642009-02-19 14:18:23 +100041#endif /* _ASM_M68K_MODULE_H */