diff options
author | Keith Owens <kaos@ocs.com.au> | 2006-04-07 04:08:11 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-06-21 17:44:26 -0400 |
commit | d270acbc24f0ce451c773c214ac0e92e95396b2f (patch) | |
tree | 46fb1417fd85a4fe477afe391975bc3bc3dec1ab /arch/ia64/kernel/asm-offsets.c | |
parent | b7bb575c3fa3694811a072109f4e9c2f4705d8f5 (diff) |
[IA64] Sanitize assembler code for ia64_sal_os_state
struct ia64_sal_os_state has three semi-independent sections. The code
in mca_asm.S assumes that these three sections are contiguous, which
makes it very awkward to add new data to this structure. Remove the
assumption that the sections are contiguous. Define a macro to shorten
references to offsets in ia64_sal_os_state.
This patch does not change the way that the code behaves. It just
makes it easier to update the code in future and to add fields to
ia64_sal_os_state when debugging the MCA/INIT handlers.
Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/asm-offsets.c')
-rw-r--r-- | arch/ia64/kernel/asm-offsets.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c index 77225659e968..16e7b6600ae6 100644 --- a/arch/ia64/kernel/asm-offsets.c +++ b/arch/ia64/kernel/asm-offsets.c | |||
@@ -217,16 +217,24 @@ void foo(void) | |||
217 | DEFINE(IA64_MCA_CPU_INIT_STACK_OFFSET, | 217 | DEFINE(IA64_MCA_CPU_INIT_STACK_OFFSET, |
218 | offsetof (struct ia64_mca_cpu, init_stack)); | 218 | offsetof (struct ia64_mca_cpu, init_stack)); |
219 | BLANK(); | 219 | BLANK(); |
220 | DEFINE(IA64_SAL_OS_STATE_COMMON_OFFSET, | ||
221 | offsetof (struct ia64_sal_os_state, sal_ra)); | ||
222 | DEFINE(IA64_SAL_OS_STATE_OS_GP_OFFSET, | 220 | DEFINE(IA64_SAL_OS_STATE_OS_GP_OFFSET, |
223 | offsetof (struct ia64_sal_os_state, os_gp)); | 221 | offsetof (struct ia64_sal_os_state, os_gp)); |
224 | DEFINE(IA64_SAL_OS_STATE_PAL_MIN_STATE_OFFSET, | ||
225 | offsetof (struct ia64_sal_os_state, pal_min_state)); | ||
226 | DEFINE(IA64_SAL_OS_STATE_PROC_STATE_PARAM_OFFSET, | 222 | DEFINE(IA64_SAL_OS_STATE_PROC_STATE_PARAM_OFFSET, |
227 | offsetof (struct ia64_sal_os_state, proc_state_param)); | 223 | offsetof (struct ia64_sal_os_state, proc_state_param)); |
224 | DEFINE(IA64_SAL_OS_STATE_SAL_RA_OFFSET, | ||
225 | offsetof (struct ia64_sal_os_state, sal_ra)); | ||
226 | DEFINE(IA64_SAL_OS_STATE_SAL_GP_OFFSET, | ||
227 | offsetof (struct ia64_sal_os_state, sal_gp)); | ||
228 | DEFINE(IA64_SAL_OS_STATE_PAL_MIN_STATE_OFFSET, | ||
229 | offsetof (struct ia64_sal_os_state, pal_min_state)); | ||
230 | DEFINE(IA64_SAL_OS_STATE_OS_STATUS_OFFSET, | ||
231 | offsetof (struct ia64_sal_os_state, os_status)); | ||
232 | DEFINE(IA64_SAL_OS_STATE_CONTEXT_OFFSET, | ||
233 | offsetof (struct ia64_sal_os_state, context)); | ||
228 | DEFINE(IA64_SAL_OS_STATE_SIZE, | 234 | DEFINE(IA64_SAL_OS_STATE_SIZE, |
229 | sizeof (struct ia64_sal_os_state)); | 235 | sizeof (struct ia64_sal_os_state)); |
236 | BLANK(); | ||
237 | |||
230 | DEFINE(IA64_PMSA_GR_OFFSET, | 238 | DEFINE(IA64_PMSA_GR_OFFSET, |
231 | offsetof (struct pal_min_state_area_s, pmsa_gr)); | 239 | offsetof (struct pal_min_state_area_s, pmsa_gr)); |
232 | DEFINE(IA64_PMSA_BANK1_GR_OFFSET, | 240 | DEFINE(IA64_PMSA_BANK1_GR_OFFSET, |