diff options
Diffstat (limited to 'arch/mips/mm/uasm.h')
-rw-r--r-- | arch/mips/mm/uasm.h | 76 |
1 files changed, 33 insertions, 43 deletions
diff --git a/arch/mips/mm/uasm.h b/arch/mips/mm/uasm.h index a10fc1135c76..fe0574f6e77d 100644 --- a/arch/mips/mm/uasm.h +++ b/arch/mips/mm/uasm.h | |||
@@ -11,38 +11,38 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | 12 | ||
13 | #define Ip_u1u2u3(op) \ | 13 | #define Ip_u1u2u3(op) \ |
14 | void __init \ | 14 | void __cpuinit \ |
15 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) | 15 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) |
16 | 16 | ||
17 | #define Ip_u2u1u3(op) \ | 17 | #define Ip_u2u1u3(op) \ |
18 | void __init \ | 18 | void __cpuinit \ |
19 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) | 19 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) |
20 | 20 | ||
21 | #define Ip_u3u1u2(op) \ | 21 | #define Ip_u3u1u2(op) \ |
22 | void __init \ | 22 | void __cpuinit \ |
23 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) | 23 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) |
24 | 24 | ||
25 | #define Ip_u1u2s3(op) \ | 25 | #define Ip_u1u2s3(op) \ |
26 | void __init \ | 26 | void __cpuinit \ |
27 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) | 27 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) |
28 | 28 | ||
29 | #define Ip_u2s3u1(op) \ | 29 | #define Ip_u2s3u1(op) \ |
30 | void __init \ | 30 | void __cpuinit \ |
31 | uasm_i##op(u32 **buf, unsigned int a, signed int b, unsigned int c) | 31 | uasm_i##op(u32 **buf, unsigned int a, signed int b, unsigned int c) |
32 | 32 | ||
33 | #define Ip_u2u1s3(op) \ | 33 | #define Ip_u2u1s3(op) \ |
34 | void __init \ | 34 | void __cpuinit \ |
35 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) | 35 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) |
36 | 36 | ||
37 | #define Ip_u1u2(op) \ | 37 | #define Ip_u1u2(op) \ |
38 | void __init uasm_i##op(u32 **buf, unsigned int a, unsigned int b) | 38 | void __cpuinit uasm_i##op(u32 **buf, unsigned int a, unsigned int b) |
39 | 39 | ||
40 | #define Ip_u1s2(op) \ | 40 | #define Ip_u1s2(op) \ |
41 | void __init uasm_i##op(u32 **buf, unsigned int a, signed int b) | 41 | void __cpuinit uasm_i##op(u32 **buf, unsigned int a, signed int b) |
42 | 42 | ||
43 | #define Ip_u1(op) void __init uasm_i##op(u32 **buf, unsigned int a) | 43 | #define Ip_u1(op) void __cpuinit uasm_i##op(u32 **buf, unsigned int a) |
44 | 44 | ||
45 | #define Ip_0(op) void __init uasm_i##op(u32 **buf) | 45 | #define Ip_0(op) void __cpuinit uasm_i##op(u32 **buf) |
46 | 46 | ||
47 | Ip_u2u1s3(_addiu); | 47 | Ip_u2u1s3(_addiu); |
48 | Ip_u3u1u2(_addu); | 48 | Ip_u3u1u2(_addu); |
@@ -98,19 +98,19 @@ struct uasm_label { | |||
98 | int lab; | 98 | int lab; |
99 | }; | 99 | }; |
100 | 100 | ||
101 | void __init uasm_build_label(struct uasm_label **lab, u32 *addr, int lid); | 101 | void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid); |
102 | #ifdef CONFIG_64BIT | 102 | #ifdef CONFIG_64BIT |
103 | int __init uasm_in_compat_space_p(long addr); | 103 | int uasm_in_compat_space_p(long addr); |
104 | int __init uasm_rel_highest(long val); | 104 | int uasm_rel_highest(long val); |
105 | int __init uasm_rel_higher(long val); | 105 | int uasm_rel_higher(long val); |
106 | #endif | 106 | #endif |
107 | int __init uasm_rel_hi(long val); | 107 | int uasm_rel_hi(long val); |
108 | int __init uasm_rel_lo(long val); | 108 | int uasm_rel_lo(long val); |
109 | void __init UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr); | 109 | void UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr); |
110 | void __init UASM_i_LA(u32 **buf, unsigned int rs, long addr); | 110 | void UASM_i_LA(u32 **buf, unsigned int rs, long addr); |
111 | 111 | ||
112 | #define UASM_L_LA(lb) \ | 112 | #define UASM_L_LA(lb) \ |
113 | static inline void __init uasm_l##lb(struct uasm_label **lab, u32 *addr) \ | 113 | static inline void __cpuinit uasm_l##lb(struct uasm_label **lab, u32 *addr) \ |
114 | { \ | 114 | { \ |
115 | uasm_build_label(lab, addr, label##lb); \ | 115 | uasm_build_label(lab, addr, label##lb); \ |
116 | } | 116 | } |
@@ -164,29 +164,19 @@ struct uasm_reloc { | |||
164 | /* This is zero so we can use zeroed label arrays. */ | 164 | /* This is zero so we can use zeroed label arrays. */ |
165 | #define UASM_LABEL_INVALID 0 | 165 | #define UASM_LABEL_INVALID 0 |
166 | 166 | ||
167 | void __init uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid); | 167 | void uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid); |
168 | void __init | 168 | void uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab); |
169 | uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab); | 169 | void uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off); |
170 | void __init | 170 | void uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off); |
171 | uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off); | 171 | void uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, |
172 | void __init | 172 | u32 *first, u32 *end, u32 *target); |
173 | uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off); | 173 | int uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr); |
174 | void __init | ||
175 | uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, u32 *first, | ||
176 | u32 *end, u32 *target); | ||
177 | int __init uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr); | ||
178 | 174 | ||
179 | /* Convenience functions for labeled branches. */ | 175 | /* Convenience functions for labeled branches. */ |
180 | void __init | 176 | void uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
181 | uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | 177 | void uasm_il_b(u32 **p, struct uasm_reloc **r, int lid); |
182 | void __init uasm_il_b(u32 **p, struct uasm_reloc **r, int lid); | 178 | void uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
183 | void __init | 179 | void uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
184 | uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | 180 | void uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
185 | void __init | 181 | void uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
186 | uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | 182 | void uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
187 | void __init | ||
188 | uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | ||
189 | void __init | ||
190 | uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | ||
191 | void __init | ||
192 | uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | ||