aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-04-29 04:03:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:29 -0400
commitfd04d2067508d4a2b8cdb51d9ede1c0d96f13602 (patch)
tree7a2acf20fb5dca9f858348cbd490c0f7f9c17752 /arch/mips/kernel
parent66916cd2670e2033a468c492a0192a643ff0965e (diff)
mips: use kbuild.h instead of macros in asm-offsets.c
Use the macros provided in kbuild.h Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/asm-offsets.c478
1 files changed, 218 insertions, 260 deletions
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 5bf03b3c4150..72942226fcdd 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -13,327 +13,285 @@
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16 16#include <linux/kbuild.h>
17#include <asm/ptrace.h> 17#include <asm/ptrace.h>
18#include <asm/processor.h> 18#include <asm/processor.h>
19 19
20#define text(t) __asm__("\n->#" t)
21#define _offset(type, member) (&(((type *)NULL)->member))
22#define offset(string, ptr, member) \
23 __asm__("\n->" string " %0" : : "i" (_offset(ptr, member)))
24#define constant(string, member) \
25 __asm__("\n->" string " %0" : : "ri" (member))
26#define size(string, size) \
27 __asm__("\n->" string " %0" : : "i" (sizeof(size)))
28#define linefeed text("")
29
30void output_ptreg_defines(void) 20void output_ptreg_defines(void)
31{ 21{
32 text("MIPS pt_regs offsets."); 22 COMMENT("MIPS pt_regs offsets.");
33 offset("PT_R0", struct pt_regs, regs[0]); 23 OFFSET(PT_R0, pt_regs, regs[0]);
34 offset("PT_R1", struct pt_regs, regs[1]); 24 OFFSET(PT_R1, pt_regs, regs[1]);
35 offset("PT_R2", struct pt_regs, regs[2]); 25 OFFSET(PT_R2, pt_regs, regs[2]);
36 offset("PT_R3", struct pt_regs, regs[3]); 26 OFFSET(PT_R3, pt_regs, regs[3]);
37 offset("PT_R4", struct pt_regs, regs[4]); 27 OFFSET(PT_R4, pt_regs, regs[4]);
38 offset("PT_R5", struct pt_regs, regs[5]); 28 OFFSET(PT_R5, pt_regs, regs[5]);
39 offset("PT_R6", struct pt_regs, regs[6]); 29 OFFSET(PT_R6, pt_regs, regs[6]);
40 offset("PT_R7", struct pt_regs, regs[7]); 30 OFFSET(PT_R7, pt_regs, regs[7]);
41 offset("PT_R8", struct pt_regs, regs[8]); 31 OFFSET(PT_R8, pt_regs, regs[8]);
42 offset("PT_R9", struct pt_regs, regs[9]); 32 OFFSET(PT_R9, pt_regs, regs[9]);
43 offset("PT_R10", struct pt_regs, regs[10]); 33 OFFSET(PT_R10, pt_regs, regs[10]);
44 offset("PT_R11", struct pt_regs, regs[11]); 34 OFFSET(PT_R11, pt_regs, regs[11]);
45 offset("PT_R12", struct pt_regs, regs[12]); 35 OFFSET(PT_R12, pt_regs, regs[12]);
46 offset("PT_R13", struct pt_regs, regs[13]); 36 OFFSET(PT_R13, pt_regs, regs[13]);
47 offset("PT_R14", struct pt_regs, regs[14]); 37 OFFSET(PT_R14, pt_regs, regs[14]);
48 offset("PT_R15", struct pt_regs, regs[15]); 38 OFFSET(PT_R15, pt_regs, regs[15]);
49 offset("PT_R16", struct pt_regs, regs[16]); 39 OFFSET(PT_R16, pt_regs, regs[16]);
50 offset("PT_R17", struct pt_regs, regs[17]); 40 OFFSET(PT_R17, pt_regs, regs[17]);
51 offset("PT_R18", struct pt_regs, regs[18]); 41 OFFSET(PT_R18, pt_regs, regs[18]);
52 offset("PT_R19", struct pt_regs, regs[19]); 42 OFFSET(PT_R19, pt_regs, regs[19]);
53 offset("PT_R20", struct pt_regs, regs[20]); 43 OFFSET(PT_R20, pt_regs, regs[20]);
54 offset("PT_R21", struct pt_regs, regs[21]); 44 OFFSET(PT_R21, pt_regs, regs[21]);
55 offset("PT_R22", struct pt_regs, regs[22]); 45 OFFSET(PT_R22, pt_regs, regs[22]);
56 offset("PT_R23", struct pt_regs, regs[23]); 46 OFFSET(PT_R23, pt_regs, regs[23]);
57 offset("PT_R24", struct pt_regs, regs[24]); 47 OFFSET(PT_R24, pt_regs, regs[24]);
58 offset("PT_R25", struct pt_regs, regs[25]); 48 OFFSET(PT_R25, pt_regs, regs[25]);
59 offset("PT_R26", struct pt_regs, regs[26]); 49 OFFSET(PT_R26, pt_regs, regs[26]);
60 offset("PT_R27", struct pt_regs, regs[27]); 50 OFFSET(PT_R27, pt_regs, regs[27]);
61 offset("PT_R28", struct pt_regs, regs[28]); 51 OFFSET(PT_R28, pt_regs, regs[28]);
62 offset("PT_R29", struct pt_regs, regs[29]); 52 OFFSET(PT_R29, pt_regs, regs[29]);
63 offset("PT_R30", struct pt_regs, regs[30]); 53 OFFSET(PT_R30, pt_regs, regs[30]);
64 offset("PT_R31", struct pt_regs, regs[31]); 54 OFFSET(PT_R31, pt_regs, regs[31]);
65 offset("PT_LO", struct pt_regs, lo); 55 OFFSET(PT_LO, pt_regs, lo);
66 offset("PT_HI", struct pt_regs, hi); 56 OFFSET(PT_HI, pt_regs, hi);
67#ifdef CONFIG_CPU_HAS_SMARTMIPS 57#ifdef CONFIG_CPU_HAS_SMARTMIPS
68 offset("PT_ACX", struct pt_regs, acx); 58 OFFSET(PT_ACX, pt_regs, acx);
69#endif 59#endif
70 offset("PT_EPC", struct pt_regs, cp0_epc); 60 OFFSET(PT_EPC, pt_regs, cp0_epc);
71 offset("PT_BVADDR", struct pt_regs, cp0_badvaddr); 61 OFFSET(PT_BVADDR, pt_regs, cp0_badvaddr);
72 offset("PT_STATUS", struct pt_regs, cp0_status); 62 OFFSET(PT_STATUS, pt_regs, cp0_status);
73 offset("PT_CAUSE", struct pt_regs, cp0_cause); 63 OFFSET(PT_CAUSE, pt_regs, cp0_cause);
74#ifdef CONFIG_MIPS_MT_SMTC 64#ifdef CONFIG_MIPS_MT_SMTC
75 offset("PT_TCSTATUS", struct pt_regs, cp0_tcstatus); 65 OFFSET(PT_TCSTATUS, pt_regs, cp0_tcstatus);
76#endif /* CONFIG_MIPS_MT_SMTC */ 66#endif /* CONFIG_MIPS_MT_SMTC */
77 size("PT_SIZE", struct pt_regs); 67 DEFINE(PT_SIZE, sizeof(struct pt_regs));
78 linefeed; 68 BLANK();
79} 69}
80 70
81void output_task_defines(void) 71void output_task_defines(void)
82{ 72{
83 text("MIPS task_struct offsets."); 73 COMMENT("MIPS task_struct offsets.");
84 offset("TASK_STATE", struct task_struct, state); 74 OFFSET(TASK_STATE, task_struct, state);
85 offset("TASK_THREAD_INFO", struct task_struct, stack); 75 OFFSET(TASK_THREAD_INFO, task_struct, stack);
86 offset("TASK_FLAGS", struct task_struct, flags); 76 OFFSET(TASK_FLAGS, task_struct, flags);
87 offset("TASK_MM", struct task_struct, mm); 77 OFFSET(TASK_MM, task_struct, mm);
88 offset("TASK_PID", struct task_struct, pid); 78 OFFSET(TASK_PID, task_struct, pid);
89 size( "TASK_STRUCT_SIZE", struct task_struct); 79 DEFINE(TASK_STRUCT_SIZE, sizeof(struct task_struct));
90 linefeed; 80 BLANK();
91} 81}
92 82
93void output_thread_info_defines(void) 83void output_thread_info_defines(void)
94{ 84{
95 text("MIPS thread_info offsets."); 85 COMMENT("MIPS thread_info offsets.");
96 offset("TI_TASK", struct thread_info, task); 86 OFFSET(TI_TASK, thread_info, task);
97 offset("TI_EXEC_DOMAIN", struct thread_info, exec_domain); 87 OFFSET(TI_EXEC_DOMAIN, thread_info, exec_domain);
98 offset("TI_FLAGS", struct thread_info, flags); 88 OFFSET(TI_FLAGS, thread_info, flags);
99 offset("TI_TP_VALUE", struct thread_info, tp_value); 89 OFFSET(TI_TP_VALUE, thread_info, tp_value);
100 offset("TI_CPU", struct thread_info, cpu); 90 OFFSET(TI_CPU, thread_info, cpu);
101 offset("TI_PRE_COUNT", struct thread_info, preempt_count); 91 OFFSET(TI_PRE_COUNT, thread_info, preempt_count);
102 offset("TI_ADDR_LIMIT", struct thread_info, addr_limit); 92 OFFSET(TI_ADDR_LIMIT, thread_info, addr_limit);
103 offset("TI_RESTART_BLOCK", struct thread_info, restart_block); 93 OFFSET(TI_RESTART_BLOCK, thread_info, restart_block);
104 offset("TI_REGS", struct thread_info, regs); 94 OFFSET(TI_REGS, thread_info, regs);
105 constant("_THREAD_SIZE", THREAD_SIZE); 95 DEFINE(_THREAD_SIZE, THREAD_SIZE);
106 constant("_THREAD_MASK", THREAD_MASK); 96 DEFINE(_THREAD_MASK, THREAD_MASK);
107 linefeed; 97 BLANK();
108} 98}
109 99
110void output_thread_defines(void) 100void output_thread_defines(void)
111{ 101{
112 text("MIPS specific thread_struct offsets."); 102 COMMENT("MIPS specific thread_struct offsets.");
113 offset("THREAD_REG16", struct task_struct, thread.reg16); 103 OFFSET(THREAD_REG16, task_struct, thread.reg16);
114 offset("THREAD_REG17", struct task_struct, thread.reg17); 104 OFFSET(THREAD_REG17, task_struct, thread.reg17);
115 offset("THREAD_REG18", struct task_struct, thread.reg18); 105 OFFSET(THREAD_REG18, task_struct, thread.reg18);
116 offset("THREAD_REG19", struct task_struct, thread.reg19); 106 OFFSET(THREAD_REG19, task_struct, thread.reg19);
117 offset("THREAD_REG20", struct task_struct, thread.reg20); 107 OFFSET(THREAD_REG20, task_struct, thread.reg20);
118 offset("THREAD_REG21", struct task_struct, thread.reg21); 108 OFFSET(THREAD_REG21, task_struct, thread.reg21);
119 offset("THREAD_REG22", struct task_struct, thread.reg22); 109 OFFSET(THREAD_REG22, task_struct, thread.reg22);
120 offset("THREAD_REG23", struct task_struct, thread.reg23); 110 OFFSET(THREAD_REG23, task_struct, thread.reg23);
121 offset("THREAD_REG29", struct task_struct, thread.reg29); 111 OFFSET(THREAD_REG29, task_struct, thread.reg29);
122 offset("THREAD_REG30", struct task_struct, thread.reg30); 112 OFFSET(THREAD_REG30, task_struct, thread.reg30);
123 offset("THREAD_REG31", struct task_struct, thread.reg31); 113 OFFSET(THREAD_REG31, task_struct, thread.reg31);
124 offset("THREAD_STATUS", struct task_struct, 114 OFFSET(THREAD_STATUS, task_struct,
125 thread.cp0_status); 115 thread.cp0_status);
126 offset("THREAD_FPU", struct task_struct, thread.fpu); 116 OFFSET(THREAD_FPU, task_struct, thread.fpu);
127 117
128 offset("THREAD_BVADDR", struct task_struct, \ 118 OFFSET(THREAD_BVADDR, task_struct, \
129 thread.cp0_badvaddr); 119 thread.cp0_badvaddr);
130 offset("THREAD_BUADDR", struct task_struct, \ 120 OFFSET(THREAD_BUADDR, task_struct, \
131 thread.cp0_baduaddr); 121 thread.cp0_baduaddr);
132 offset("THREAD_ECODE", struct task_struct, \ 122 OFFSET(THREAD_ECODE, task_struct, \
133 thread.error_code); 123 thread.error_code);
134 offset("THREAD_TRAPNO", struct task_struct, thread.trap_no); 124 OFFSET(THREAD_TRAPNO, task_struct, thread.trap_no);
135 offset("THREAD_TRAMP", struct task_struct, \ 125 OFFSET(THREAD_TRAMP, task_struct, \
136 thread.irix_trampoline); 126 thread.irix_trampoline);
137 offset("THREAD_OLDCTX", struct task_struct, \ 127 OFFSET(THREAD_OLDCTX, task_struct, \
138 thread.irix_oldctx); 128 thread.irix_oldctx);
139 linefeed; 129 BLANK();
140} 130}
141 131
142void output_thread_fpu_defines(void) 132void output_thread_fpu_defines(void)
143{ 133{
144 offset("THREAD_FPR0", 134 OFFSET(THREAD_FPR0, task_struct, thread.fpu.fpr[0]);
145 struct task_struct, thread.fpu.fpr[0]); 135 OFFSET(THREAD_FPR1, task_struct, thread.fpu.fpr[1]);
146 offset("THREAD_FPR1", 136 OFFSET(THREAD_FPR2, task_struct, thread.fpu.fpr[2]);
147 struct task_struct, thread.fpu.fpr[1]); 137 OFFSET(THREAD_FPR3, task_struct, thread.fpu.fpr[3]);
148 offset("THREAD_FPR2", 138 OFFSET(THREAD_FPR4, task_struct, thread.fpu.fpr[4]);
149 struct task_struct, thread.fpu.fpr[2]); 139 OFFSET(THREAD_FPR5, task_struct, thread.fpu.fpr[5]);
150 offset("THREAD_FPR3", 140 OFFSET(THREAD_FPR6, task_struct, thread.fpu.fpr[6]);
151 struct task_struct, thread.fpu.fpr[3]); 141 OFFSET(THREAD_FPR7, task_struct, thread.fpu.fpr[7]);
152 offset("THREAD_FPR4", 142 OFFSET(THREAD_FPR8, task_struct, thread.fpu.fpr[8]);
153 struct task_struct, thread.fpu.fpr[4]); 143 OFFSET(THREAD_FPR9, task_struct, thread.fpu.fpr[9]);
154 offset("THREAD_FPR5", 144 OFFSET(THREAD_FPR10, task_struct, thread.fpu.fpr[10]);
155 struct task_struct, thread.fpu.fpr[5]); 145 OFFSET(THREAD_FPR11, task_struct, thread.fpu.fpr[11]);
156 offset("THREAD_FPR6", 146 OFFSET(THREAD_FPR12, task_struct, thread.fpu.fpr[12]);
157 struct task_struct, thread.fpu.fpr[6]); 147 OFFSET(THREAD_FPR13, task_struct, thread.fpu.fpr[13]);
158 offset("THREAD_FPR7", 148 OFFSET(THREAD_FPR14, task_struct, thread.fpu.fpr[14]);
159 struct task_struct, thread.fpu.fpr[7]); 149 OFFSET(THREAD_FPR15, task_struct, thread.fpu.fpr[15]);
160 offset("THREAD_FPR8", 150 OFFSET(THREAD_FPR16, task_struct, thread.fpu.fpr[16]);
161 struct task_struct, thread.fpu.fpr[8]); 151 OFFSET(THREAD_FPR17, task_struct, thread.fpu.fpr[17]);
162 offset("THREAD_FPR9", 152 OFFSET(THREAD_FPR18, task_struct, thread.fpu.fpr[18]);
163 struct task_struct, thread.fpu.fpr[9]); 153 OFFSET(THREAD_FPR19, task_struct, thread.fpu.fpr[19]);
164 offset("THREAD_FPR10", 154 OFFSET(THREAD_FPR20, task_struct, thread.fpu.fpr[20]);
165 struct task_struct, thread.fpu.fpr[10]); 155 OFFSET(THREAD_FPR21, task_struct, thread.fpu.fpr[21]);
166 offset("THREAD_FPR11", 156 OFFSET(THREAD_FPR22, task_struct, thread.fpu.fpr[22]);
167 struct task_struct, thread.fpu.fpr[11]); 157 OFFSET(THREAD_FPR23, task_struct, thread.fpu.fpr[23]);
168 offset("THREAD_FPR12", 158 OFFSET(THREAD_FPR24, task_struct, thread.fpu.fpr[24]);
169 struct task_struct, thread.fpu.fpr[12]); 159 OFFSET(THREAD_FPR25, task_struct, thread.fpu.fpr[25]);
170 offset("THREAD_FPR13", 160 OFFSET(THREAD_FPR26, task_struct, thread.fpu.fpr[26]);
171 struct task_struct, thread.fpu.fpr[13]); 161 OFFSET(THREAD_FPR27, task_struct, thread.fpu.fpr[27]);
172 offset("THREAD_FPR14", 162 OFFSET(THREAD_FPR28, task_struct, thread.fpu.fpr[28]);
173 struct task_struct, thread.fpu.fpr[14]); 163 OFFSET(THREAD_FPR29, task_struct, thread.fpu.fpr[29]);
174 offset("THREAD_FPR15", 164 OFFSET(THREAD_FPR30, task_struct, thread.fpu.fpr[30]);
175 struct task_struct, thread.fpu.fpr[15]); 165 OFFSET(THREAD_FPR31, task_struct, thread.fpu.fpr[31]);
176 offset("THREAD_FPR16",
177 struct task_struct, thread.fpu.fpr[16]);
178 offset("THREAD_FPR17",
179 struct task_struct, thread.fpu.fpr[17]);
180 offset("THREAD_FPR18",
181 struct task_struct, thread.fpu.fpr[18]);
182 offset("THREAD_FPR19",
183 struct task_struct, thread.fpu.fpr[19]);
184 offset("THREAD_FPR20",
185 struct task_struct, thread.fpu.fpr[20]);
186 offset("THREAD_FPR21",
187 struct task_struct, thread.fpu.fpr[21]);
188 offset("THREAD_FPR22",
189 struct task_struct, thread.fpu.fpr[22]);
190 offset("THREAD_FPR23",
191 struct task_struct, thread.fpu.fpr[23]);
192 offset("THREAD_FPR24",
193 struct task_struct, thread.fpu.fpr[24]);
194 offset("THREAD_FPR25",
195 struct task_struct, thread.fpu.fpr[25]);
196 offset("THREAD_FPR26",
197 struct task_struct, thread.fpu.fpr[26]);
198 offset("THREAD_FPR27",
199 struct task_struct, thread.fpu.fpr[27]);
200 offset("THREAD_FPR28",
201 struct task_struct, thread.fpu.fpr[28]);
202 offset("THREAD_FPR29",
203 struct task_struct, thread.fpu.fpr[29]);
204 offset("THREAD_FPR30",
205 struct task_struct, thread.fpu.fpr[30]);
206 offset("THREAD_FPR31",
207 struct task_struct, thread.fpu.fpr[31]);
208 166
209 offset("THREAD_FCR31", 167 OFFSET(THREAD_FCR31, task_struct, thread.fpu.fcr31);
210 struct task_struct, thread.fpu.fcr31); 168 BLANK();
211 linefeed;
212} 169}
213 170
214void output_mm_defines(void) 171void output_mm_defines(void)
215{ 172{
216 text("Size of struct page"); 173 COMMENT("Size of struct page");
217 size("STRUCT_PAGE_SIZE", struct page); 174 DEFINE(STRUCT_PAGE_SIZE, sizeof(struct page));
218 linefeed; 175 BLANK();
219 text("Linux mm_struct offsets."); 176 COMMENT("Linux mm_struct offsets.");
220 offset("MM_USERS", struct mm_struct, mm_users); 177 OFFSET(MM_USERS, mm_struct, mm_users);
221 offset("MM_PGD", struct mm_struct, pgd); 178 OFFSET(MM_PGD, mm_struct, pgd);
222 offset("MM_CONTEXT", struct mm_struct, context); 179 OFFSET(MM_CONTEXT, mm_struct, context);
223 linefeed; 180 BLANK();
224 constant("_PAGE_SIZE", PAGE_SIZE); 181 DEFINE(_PAGE_SIZE, PAGE_SIZE);
225 constant("_PAGE_SHIFT", PAGE_SHIFT); 182 DEFINE(_PAGE_SHIFT, PAGE_SHIFT);
226 linefeed; 183 BLANK();
227 constant("_PGD_T_SIZE", sizeof(pgd_t)); 184 DEFINE(_PGD_T_SIZE, sizeof(pgd_t));
228 constant("_PMD_T_SIZE", sizeof(pmd_t)); 185 DEFINE(_PMD_T_SIZE, sizeof(pmd_t));
229 constant("_PTE_T_SIZE", sizeof(pte_t)); 186 DEFINE(_PTE_T_SIZE, sizeof(pte_t));
230 linefeed; 187 BLANK();
231 constant("_PGD_T_LOG2", PGD_T_LOG2); 188 DEFINE(_PGD_T_LOG2, PGD_T_LOG2);
232 constant("_PMD_T_LOG2", PMD_T_LOG2); 189 DEFINE(_PMD_T_LOG2, PMD_T_LOG2);
233 constant("_PTE_T_LOG2", PTE_T_LOG2); 190 DEFINE(_PTE_T_LOG2, PTE_T_LOG2);
234 linefeed; 191 BLANK();
235 constant("_PGD_ORDER", PGD_ORDER); 192 DEFINE(_PGD_ORDER, PGD_ORDER);
236 constant("_PMD_ORDER", PMD_ORDER); 193 DEFINE(_PMD_ORDER, PMD_ORDER);
237 constant("_PTE_ORDER", PTE_ORDER); 194 DEFINE(_PTE_ORDER, PTE_ORDER);
238 linefeed; 195 BLANK();
239 constant("_PMD_SHIFT", PMD_SHIFT); 196 DEFINE(_PMD_SHIFT, PMD_SHIFT);
240 constant("_PGDIR_SHIFT", PGDIR_SHIFT); 197 DEFINE(_PGDIR_SHIFT, PGDIR_SHIFT);
241 linefeed; 198 BLANK();
242 constant("_PTRS_PER_PGD", PTRS_PER_PGD); 199 DEFINE(_PTRS_PER_PGD, PTRS_PER_PGD);
243 constant("_PTRS_PER_PMD", PTRS_PER_PMD); 200 DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD);
244 constant("_PTRS_PER_PTE", PTRS_PER_PTE); 201 DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE);
245 linefeed; 202 BLANK();
246} 203}
247 204
248#ifdef CONFIG_32BIT 205#ifdef CONFIG_32BIT
249void output_sc_defines(void) 206void output_sc_defines(void)
250{ 207{
251 text("Linux sigcontext offsets."); 208 COMMENT("Linux sigcontext offsets.");
252 offset("SC_REGS", struct sigcontext, sc_regs); 209 OFFSET(SC_REGS, sigcontext, sc_regs);
253 offset("SC_FPREGS", struct sigcontext, sc_fpregs); 210 OFFSET(SC_FPREGS, sigcontext, sc_fpregs);
254 offset("SC_ACX", struct sigcontext, sc_acx); 211 OFFSET(SC_ACX, sigcontext, sc_acx);
255 offset("SC_MDHI", struct sigcontext, sc_mdhi); 212 OFFSET(SC_MDHI, sigcontext, sc_mdhi);
256 offset("SC_MDLO", struct sigcontext, sc_mdlo); 213 OFFSET(SC_MDLO, sigcontext, sc_mdlo);
257 offset("SC_PC", struct sigcontext, sc_pc); 214 OFFSET(SC_PC, sigcontext, sc_pc);
258 offset("SC_FPC_CSR", struct sigcontext, sc_fpc_csr); 215 OFFSET(SC_FPC_CSR, sigcontext, sc_fpc_csr);
259 offset("SC_FPC_EIR", struct sigcontext, sc_fpc_eir); 216 OFFSET(SC_FPC_EIR, sigcontext, sc_fpc_eir);
260 offset("SC_HI1", struct sigcontext, sc_hi1); 217 OFFSET(SC_HI1, sigcontext, sc_hi1);
261 offset("SC_LO1", struct sigcontext, sc_lo1); 218 OFFSET(SC_LO1, sigcontext, sc_lo1);
262 offset("SC_HI2", struct sigcontext, sc_hi2); 219 OFFSET(SC_HI2, sigcontext, sc_hi2);
263 offset("SC_LO2", struct sigcontext, sc_lo2); 220 OFFSET(SC_LO2, sigcontext, sc_lo2);
264 offset("SC_HI3", struct sigcontext, sc_hi3); 221 OFFSET(SC_HI3, sigcontext, sc_hi3);
265 offset("SC_LO3", struct sigcontext, sc_lo3); 222 OFFSET(SC_LO3, sigcontext, sc_lo3);
266 linefeed; 223 BLANK();
267} 224}
268#endif 225#endif
269 226
270#ifdef CONFIG_64BIT 227#ifdef CONFIG_64BIT
271void output_sc_defines(void) 228void output_sc_defines(void)
272{ 229{
273 text("Linux sigcontext offsets."); 230 COMMENT("Linux sigcontext offsets.");
274 offset("SC_REGS", struct sigcontext, sc_regs); 231 OFFSET(SC_REGS, sigcontext, sc_regs);
275 offset("SC_FPREGS", struct sigcontext, sc_fpregs); 232 OFFSET(SC_FPREGS, sigcontext, sc_fpregs);
276 offset("SC_MDHI", struct sigcontext, sc_mdhi); 233 OFFSET(SC_MDHI, sigcontext, sc_mdhi);
277 offset("SC_MDLO", struct sigcontext, sc_mdlo); 234 OFFSET(SC_MDLO, sigcontext, sc_mdlo);
278 offset("SC_PC", struct sigcontext, sc_pc); 235 OFFSET(SC_PC, sigcontext, sc_pc);
279 offset("SC_FPC_CSR", struct sigcontext, sc_fpc_csr); 236 OFFSET(SC_FPC_CSR, sigcontext, sc_fpc_csr);
280 linefeed; 237 BLANK();
281} 238}
282#endif 239#endif
283 240
284#ifdef CONFIG_MIPS32_COMPAT 241#ifdef CONFIG_MIPS32_COMPAT
285void output_sc32_defines(void) 242void output_sc32_defines(void)
286{ 243{
287 text("Linux 32-bit sigcontext offsets."); 244 COMMENT("Linux 32-bit sigcontext offsets.");
288 offset("SC32_FPREGS", struct sigcontext32, sc_fpregs); 245 OFFSET(SC32_FPREGS, sigcontext32, sc_fpregs);
289 offset("SC32_FPC_CSR", struct sigcontext32, sc_fpc_csr); 246 OFFSET(SC32_FPC_CSR, sigcontext32, sc_fpc_csr);
290 offset("SC32_FPC_EIR", struct sigcontext32, sc_fpc_eir); 247 OFFSET(SC32_FPC_EIR, sigcontext32, sc_fpc_eir);
291 linefeed; 248 BLANK();
292} 249}
293#endif 250#endif
294 251
295void output_signal_defined(void) 252void output_signal_defined(void)
296{ 253{
297 text("Linux signal numbers."); 254 COMMENT("Linux signal numbers.");
298 constant("_SIGHUP", SIGHUP); 255 DEFINE(_SIGHUP, SIGHUP);
299 constant("_SIGINT", SIGINT); 256 DEFINE(_SIGINT, SIGINT);
300 constant("_SIGQUIT", SIGQUIT); 257 DEFINE(_SIGQUIT, SIGQUIT);
301 constant("_SIGILL", SIGILL); 258 DEFINE(_SIGILL, SIGILL);
302 constant("_SIGTRAP", SIGTRAP); 259 DEFINE(_SIGTRAP, SIGTRAP);
303 constant("_SIGIOT", SIGIOT); 260 DEFINE(_SIGIOT, SIGIOT);
304 constant("_SIGABRT", SIGABRT); 261 DEFINE(_SIGABRT, SIGABRT);
305 constant("_SIGEMT", SIGEMT); 262 DEFINE(_SIGEMT, SIGEMT);
306 constant("_SIGFPE", SIGFPE); 263 DEFINE(_SIGFPE, SIGFPE);
307 constant("_SIGKILL", SIGKILL); 264 DEFINE(_SIGKILL, SIGKILL);
308 constant("_SIGBUS", SIGBUS); 265 DEFINE(_SIGBUS, SIGBUS);
309 constant("_SIGSEGV", SIGSEGV); 266 DEFINE(_SIGSEGV, SIGSEGV);
310 constant("_SIGSYS", SIGSYS); 267 DEFINE(_SIGSYS, SIGSYS);
311 constant("_SIGPIPE", SIGPIPE); 268 DEFINE(_SIGPIPE, SIGPIPE);
312 constant("_SIGALRM", SIGALRM); 269 DEFINE(_SIGALRM, SIGALRM);
313 constant("_SIGTERM", SIGTERM); 270 DEFINE(_SIGTERM, SIGTERM);
314 constant("_SIGUSR1", SIGUSR1); 271 DEFINE(_SIGUSR1, SIGUSR1);
315 constant("_SIGUSR2", SIGUSR2); 272 DEFINE(_SIGUSR2, SIGUSR2);
316 constant("_SIGCHLD", SIGCHLD); 273 DEFINE(_SIGCHLD, SIGCHLD);
317 constant("_SIGPWR", SIGPWR); 274 DEFINE(_SIGPWR, SIGPWR);
318 constant("_SIGWINCH", SIGWINCH); 275 DEFINE(_SIGWINCH, SIGWINCH);
319 constant("_SIGURG", SIGURG); 276 DEFINE(_SIGURG, SIGURG);
320 constant("_SIGIO", SIGIO); 277 DEFINE(_SIGIO, SIGIO);
321 constant("_SIGSTOP", SIGSTOP); 278 DEFINE(_SIGSTOP, SIGSTOP);
322 constant("_SIGTSTP", SIGTSTP); 279 DEFINE(_SIGTSTP, SIGTSTP);
323 constant("_SIGCONT", SIGCONT); 280 DEFINE(_SIGCONT, SIGCONT);
324 constant("_SIGTTIN", SIGTTIN); 281 DEFINE(_SIGTTIN, SIGTTIN);
325 constant("_SIGTTOU", SIGTTOU); 282 DEFINE(_SIGTTOU, SIGTTOU);
326 constant("_SIGVTALRM", SIGVTALRM); 283 DEFINE(_SIGVTALRM, SIGVTALRM);
327 constant("_SIGPROF", SIGPROF); 284 DEFINE(_SIGPROF, SIGPROF);
328 constant("_SIGXCPU", SIGXCPU); 285 DEFINE(_SIGXCPU, SIGXCPU);
329 constant("_SIGXFSZ", SIGXFSZ); 286 DEFINE(_SIGXFSZ, SIGXFSZ);
330 linefeed; 287 BLANK();
331} 288}
332 289
333void output_irq_cpustat_t_defines(void) 290void output_irq_cpustat_t_defines(void)
334{ 291{
335 text("Linux irq_cpustat_t offsets."); 292 COMMENT("Linux irq_cpustat_t offsets.");
336 offset("IC_SOFTIRQ_PENDING", irq_cpustat_t, __softirq_pending); 293 DEFINE(IC_SOFTIRQ_PENDING,
337 size("IC_IRQ_CPUSTAT_T", irq_cpustat_t); 294 offsetof(irq_cpustat_t, __softirq_pending));
338 linefeed; 295 DEFINE(IC_IRQ_CPUSTAT_T, sizeof(irq_cpustat_t));
296 BLANK();
339} 297}