1 #ifndef _ASM_ALPHA_MODULE_H
2 #define _ASM_ALPHA_MODULE_H
3 /*
4 * This file contains the alpha architecture specific module code.
5 */
6
7 #define module_map(x) vmalloc(x)
8 #define module_unmap(x) vfree(x)
9 #define module_arch_init(x) alpha_module_init(x)
10 #define arch_init_modules(x) alpha_init_modules(x)
11
12 static inline int
13 alpha_module_init(struct module *mod)
14 {
15 if (!mod_bound(mod->gp - 0x8000, 0, mod)) {
16 printk(KERN_ERR "module_arch_init: mod->gp out of bounds.\n");
17 return 1;
18 }
19 return 0;
20 }
21
22 static inline void
23 alpha_init_modules(struct module *mod)
24 {
25 __asm__("stq $29,%0" : "=m" (mod->gp));
26 }
27
28 #endif /* _ASM_ALPHA_MODULE_H */
Cache object: 4d16c6a3f09182649025966402d6ef10
|