diff options
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r-- | arch/mips/include/asm/uasm.h | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h index db9d449b51e5..892062d6d748 100644 --- a/arch/mips/include/asm/uasm.h +++ b/arch/mips/include/asm/uasm.h | |||
@@ -10,44 +10,55 @@ | |||
10 | 10 | ||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | 12 | ||
13 | #ifdef CONFIG_EXPORT_UASM | ||
14 | #include <linux/module.h> | ||
15 | #define __uasminit | ||
16 | #define __uasminitdata | ||
17 | #define UASM_EXPORT_SYMBOL(sym) EXPORT_SYMBOL(sym) | ||
18 | #else | ||
19 | #define __uasminit __cpuinit | ||
20 | #define __uasminitdata __cpuinitdata | ||
21 | #define UASM_EXPORT_SYMBOL(sym) | ||
22 | #endif | ||
23 | |||
13 | #define Ip_u1u2u3(op) \ | 24 | #define Ip_u1u2u3(op) \ |
14 | void __cpuinit \ | 25 | void __uasminit \ |
15 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) | 26 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) |
16 | 27 | ||
17 | #define Ip_u2u1u3(op) \ | 28 | #define Ip_u2u1u3(op) \ |
18 | void __cpuinit \ | 29 | void __uasminit \ |
19 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) | 30 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) |
20 | 31 | ||
21 | #define Ip_u3u1u2(op) \ | 32 | #define Ip_u3u1u2(op) \ |
22 | void __cpuinit \ | 33 | void __uasminit \ |
23 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) | 34 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) |
24 | 35 | ||
25 | #define Ip_u1u2s3(op) \ | 36 | #define Ip_u1u2s3(op) \ |
26 | void __cpuinit \ | 37 | void __uasminit \ |
27 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) | 38 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) |
28 | 39 | ||
29 | #define Ip_u2s3u1(op) \ | 40 | #define Ip_u2s3u1(op) \ |
30 | void __cpuinit \ | 41 | void __uasminit \ |
31 | uasm_i##op(u32 **buf, unsigned int a, signed int b, unsigned int c) | 42 | uasm_i##op(u32 **buf, unsigned int a, signed int b, unsigned int c) |
32 | 43 | ||
33 | #define Ip_u2u1s3(op) \ | 44 | #define Ip_u2u1s3(op) \ |
34 | void __cpuinit \ | 45 | void __uasminit \ |
35 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) | 46 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) |
36 | 47 | ||
37 | #define Ip_u2u1msbu3(op) \ | 48 | #define Ip_u2u1msbu3(op) \ |
38 | void __cpuinit \ | 49 | void __uasminit \ |
39 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c, \ | 50 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c, \ |
40 | unsigned int d) | 51 | unsigned int d) |
41 | 52 | ||
42 | #define Ip_u1u2(op) \ | 53 | #define Ip_u1u2(op) \ |
43 | void __cpuinit uasm_i##op(u32 **buf, unsigned int a, unsigned int b) | 54 | void __uasminit uasm_i##op(u32 **buf, unsigned int a, unsigned int b) |
44 | 55 | ||
45 | #define Ip_u1s2(op) \ | 56 | #define Ip_u1s2(op) \ |
46 | void __cpuinit uasm_i##op(u32 **buf, unsigned int a, signed int b) | 57 | void __uasminit uasm_i##op(u32 **buf, unsigned int a, signed int b) |
47 | 58 | ||
48 | #define Ip_u1(op) void __cpuinit uasm_i##op(u32 **buf, unsigned int a) | 59 | #define Ip_u1(op) void __uasminit uasm_i##op(u32 **buf, unsigned int a) |
49 | 60 | ||
50 | #define Ip_0(op) void __cpuinit uasm_i##op(u32 **buf) | 61 | #define Ip_0(op) void __uasminit uasm_i##op(u32 **buf) |
51 | 62 | ||
52 | Ip_u2u1s3(_addiu); | 63 | Ip_u2u1s3(_addiu); |
53 | Ip_u3u1u2(_addu); | 64 | Ip_u3u1u2(_addu); |
@@ -112,7 +123,7 @@ struct uasm_label { | |||
112 | int lab; | 123 | int lab; |
113 | }; | 124 | }; |
114 | 125 | ||
115 | void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid); | 126 | void __uasminit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid); |
116 | #ifdef CONFIG_64BIT | 127 | #ifdef CONFIG_64BIT |
117 | int uasm_in_compat_space_p(long addr); | 128 | int uasm_in_compat_space_p(long addr); |
118 | #endif | 129 | #endif |
@@ -122,7 +133,7 @@ void UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr); | |||
122 | void UASM_i_LA(u32 **buf, unsigned int rs, long addr); | 133 | void UASM_i_LA(u32 **buf, unsigned int rs, long addr); |
123 | 134 | ||
124 | #define UASM_L_LA(lb) \ | 135 | #define UASM_L_LA(lb) \ |
125 | static inline void __cpuinit uasm_l##lb(struct uasm_label **lab, u32 *addr) \ | 136 | static inline void __uasminit uasm_l##lb(struct uasm_label **lab, u32 *addr) \ |
126 | { \ | 137 | { \ |
127 | uasm_build_label(lab, addr, label##lb); \ | 138 | uasm_build_label(lab, addr, label##lb); \ |
128 | } | 139 | } |