diff options
author | David Howells <dhowells@redhat.com> | 2012-03-28 18:30:03 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-03-28 18:30:03 +0100 |
commit | f9aa7e1882f3ceec919b30f64a2ce6e66a2571b1 (patch) | |
tree | d9b1e03d15102703722e39883ac719be52615e1a /arch/xtensa/kernel/traps.c | |
parent | 8978bfd2288adaa24d39fa15f57eb9e24ffeca12 (diff) |
Disintegrate asm/system.h for Xtensa
Disintegrate asm/system.h for Xtensa.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/kernel/traps.c')
-rw-r--r-- | arch/xtensa/kernel/traps.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index e64efac3b9db..bc1e14cf9369 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c @@ -381,6 +381,25 @@ static __always_inline unsigned long *stack_pointer(struct task_struct *task) return sp; } +static inline void spill_registers(void) +{ + unsigned int a0, ps; + + __asm__ __volatile__ ( + "movi a14," __stringify (PS_EXCM_BIT) " | 1\n\t" + "mov a12, a0\n\t" + "rsr a13," __stringify(SAR) "\n\t" + "xsr a14," __stringify(PS) "\n\t" + "movi a0, _spill_registers\n\t" + "rsync\n\t" + "callx0 a0\n\t" + "mov a0, a12\n\t" + "wsr a13," __stringify(SAR) "\n\t" + "wsr a14," __stringify(PS) "\n\t" + :: "a" (&a0), "a" (&ps) + : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory"); +} + void show_trace(struct task_struct *task, unsigned long *sp) { unsigned long a0, a1, pc; |