From f417c45f7c258ae5dc7a310165bdac6fb20bbeed Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Fri, 27 Feb 2009 16:41:17 +0900 Subject: [PATCH] --- yaml --- r: 133278 b: refs/heads/master c: 0197f21ca5c5ed0df2a14a60ef073e8163e6533b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/sh/include/asm/entry-macros.S | 5 +++++ trunk/arch/sh/kernel/cpu/sh3/entry.S | 7 +++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index a4e7aead360c..295970ba3a97 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4f099ebb27211d378304ddcfa507097f5128f5b9 +refs/heads/master: 0197f21ca5c5ed0df2a14a60ef073e8163e6533b diff --git a/trunk/arch/sh/include/asm/entry-macros.S b/trunk/arch/sh/include/asm/entry-macros.S index 2dab0b8d9454..3a4752a65722 100644 --- a/trunk/arch/sh/include/asm/entry-macros.S +++ b/trunk/arch/sh/include/asm/entry-macros.S @@ -31,3 +31,8 @@ #endif .endm +#if defined(CONFIG_CPU_SH2A) || defined(CONFIG_CPU_SH4) +# define PREF(x) pref @x +#else +# define PREF(x) nop +#endif diff --git a/trunk/arch/sh/kernel/cpu/sh3/entry.S b/trunk/arch/sh/kernel/cpu/sh3/entry.S index 0271fe08de27..e984e94394ec 100644 --- a/trunk/arch/sh/kernel/cpu/sh3/entry.S +++ b/trunk/arch/sh/kernel/cpu/sh3/entry.S @@ -463,9 +463,11 @@ tlb_miss: sts pr, k3 ! save original pr value in k3 handle_exception: + mova exception_data, k0 + ! Setup stack and save DSP context (k0 contains original r15 on return) bsr prepare_stack_save_dsp - nop + PREF(k0) ! Save registers / Switch to bank 0 mov.l 5f, k2 ! vector register address @@ -556,10 +558,11 @@ ENTRY(handle_interrupt) 11: #endif /* defined(CONFIG_KGDB) */ sts pr, k3 ! save original pr value in k3 + mova exception_data, k0 ! Setup stack and save DSP context (k0 contains original r15 on return) bsr prepare_stack_save_dsp - nop + PREF(k0) ! Save registers / Switch to bank 0 bsr save_regs ! needs original pr value in k3