File: module.h

package info (click to toggle)
kernel-source-2.4.14 2.4.14-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 139,160 kB
  • ctags: 428,423
  • sloc: ansic: 2,435,554; asm: 141,119; makefile: 8,258; sh: 3,099; perl: 2,561; yacc: 1,177; cpp: 755; tcl: 577; lex: 352; awk: 251; lisp: 218; sed: 72
file content (28 lines) | stat: -rw-r--r-- 676 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef _ASM_ALPHA_MODULE_H
#define _ASM_ALPHA_MODULE_H
/*
 * This file contains the alpha architecture specific module code.
 */

#define module_map(x)		vmalloc(x)
#define module_unmap(x)		vfree(x)
#define module_arch_init(x)	alpha_module_init(x)
#define arch_init_modules(x)	alpha_init_modules(x)

static inline int
alpha_module_init(struct module *mod)
{
        if (!mod_bound(mod->gp - 0x8000, 0, mod)) {
                printk(KERN_ERR "module_arch_init: mod->gp out of bounds.\n");
                return 1;
        }
	return 0;
}

static inline void
alpha_init_modules(struct module *mod)
{
	__asm__("stq $29,%0" : "=m" (mod->gp));
}

#endif /* _ASM_ALPHA_MODULE_H */