aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/uasm.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2008-03-08 04:56:28 -0500
committerRalf Baechle <ralf@linux-mips.org>2008-03-12 10:14:41 -0400
commit234fcd1484a66158b561b36b421547f0ab85fee9 (patch)
treeb63fbb134fd673e1713f0462e6e0642b418da616 /arch/mips/mm/uasm.h
parent1af0eea21431bed5d07dffc0fefab57fd72f7e90 (diff)
[MIPS] Fix loads of section missmatches
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm/uasm.h')
-rw-r--r--arch/mips/mm/uasm.h76
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) \
14void __init \ 14void __cpuinit \
15uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) 15uasm_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) \
18void __init \ 18void __cpuinit \
19uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) 19uasm_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) \
22void __init \ 22void __cpuinit \
23uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) 23uasm_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) \
26void __init \ 26void __cpuinit \
27uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) 27uasm_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) \
30void __init \ 30void __cpuinit \
31uasm_i##op(u32 **buf, unsigned int a, signed int b, unsigned int c) 31uasm_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) \
34void __init \ 34void __cpuinit \
35uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) 35uasm_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) \
38void __init uasm_i##op(u32 **buf, unsigned int a, unsigned int b) 38void __cpuinit uasm_i##op(u32 **buf, unsigned int a, unsigned int b)
39 39
40#define Ip_u1s2(op) \ 40#define Ip_u1s2(op) \
41void __init uasm_i##op(u32 **buf, unsigned int a, signed int b) 41void __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
47Ip_u2u1s3(_addiu); 47Ip_u2u1s3(_addiu);
48Ip_u3u1u2(_addu); 48Ip_u3u1u2(_addu);
@@ -98,19 +98,19 @@ struct uasm_label {
98 int lab; 98 int lab;
99}; 99};
100 100
101void __init uasm_build_label(struct uasm_label **lab, u32 *addr, int lid); 101void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid);
102#ifdef CONFIG_64BIT 102#ifdef CONFIG_64BIT
103int __init uasm_in_compat_space_p(long addr); 103int uasm_in_compat_space_p(long addr);
104int __init uasm_rel_highest(long val); 104int uasm_rel_highest(long val);
105int __init uasm_rel_higher(long val); 105int uasm_rel_higher(long val);
106#endif 106#endif
107int __init uasm_rel_hi(long val); 107int uasm_rel_hi(long val);
108int __init uasm_rel_lo(long val); 108int uasm_rel_lo(long val);
109void __init UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr); 109void UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr);
110void __init UASM_i_LA(u32 **buf, unsigned int rs, long addr); 110void UASM_i_LA(u32 **buf, unsigned int rs, long addr);
111 111
112#define UASM_L_LA(lb) \ 112#define UASM_L_LA(lb) \
113static inline void __init uasm_l##lb(struct uasm_label **lab, u32 *addr) \ 113static 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
167void __init uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid); 167void uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid);
168void __init 168void uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab);
169uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab); 169void uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off);
170void __init 170void uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off);
171uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off); 171void uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab,
172void __init 172 u32 *first, u32 *end, u32 *target);
173uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off); 173int uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr);
174void __init
175uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, u32 *first,
176 u32 *end, u32 *target);
177int __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. */
180void __init 176void uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
181uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); 177void uasm_il_b(u32 **p, struct uasm_reloc **r, int lid);
182void __init uasm_il_b(u32 **p, struct uasm_reloc **r, int lid); 178void uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
183void __init 179void uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
184uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); 180void uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
185void __init 181void uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
186uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); 182void uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
187void __init
188uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
189void __init
190uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);
191void __init
192uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid);