All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/e500: make load_up_spe a normal fuction
@ 2012-02-27 10:59 ` Olivia Yin
  0 siblings, 0 replies; 14+ messages in thread
From: Olivia Yin @ 2012-02-27 10:59 UTC (permalink / raw)
  To: kvm-ppc, kvm, linuxppc-dev; +Cc: Olivia Yin, Liu Yu

So that we can call it in kernel.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
---
 arch/powerpc/kernel/head_fsl_booke.S |   23 ++++++-----------------
 1 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index d5d78c4..c96e025 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -539,8 +539,10 @@ interrupt_base:
 	/* SPE Unavailable */
 	START_EXCEPTION(SPEUnavailable)
 	NORMAL_EXCEPTION_PROLOG
-	bne	load_up_spe
-	addi	r3,r1,STACK_FRAME_OVERHEAD
+	beq	1f
+	bl	load_up_spe
+	b	fast_exception_return
+1:	addi	r3,r1,STACK_FRAME_OVERHEAD
 	EXC_XFER_EE_LITE(0x2010, KernelSPE)
 #else
 	EXCEPTION(0x2020, SPEUnavailable, unknown_exception, EXC_XFER_EE)
@@ -743,7 +745,7 @@ tlb_write_entry:
 /* Note that the SPE support is closely modeled after the AltiVec
  * support.  Changes to one are likely to be applicable to the
  * other!  */
-load_up_spe:
+_GLOBAL(load_up_spe)
 /*
  * Disable SPE for the task which had SPE previously,
  * and save its SPE registers in its thread_struct.
@@ -791,20 +793,7 @@ load_up_spe:
 	subi	r4,r5,THREAD
 	stw	r4,last_task_used_spe@l(r3)
 #endif /* !CONFIG_SMP */
-	/* restore registers and return */
-2:	REST_4GPRS(3, r11)
-	lwz	r10,_CCR(r11)
-	REST_GPR(1, r11)
-	mtcr	r10
-	lwz	r10,_LINK(r11)
-	mtlr	r10
-	REST_GPR(10, r11)
-	mtspr	SPRN_SRR1,r9
-	mtspr	SPRN_SRR0,r12
-	REST_GPR(9, r11)
-	REST_GPR(12, r11)
-	lwz	r11,GPR11(r11)
-	rfi
+	blr
 
 /*
  * SPE unavailable trap from kernel - print a message, but let
-- 
1.6.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-03-07 13:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-27 10:59 [PATCH 1/2] powerpc/e500: make load_up_spe a normal fuction Olivia Yin
2012-02-27 10:59 ` Olivia Yin
2012-02-27 10:59 ` Olivia Yin
2012-02-27 15:50 ` Tabi Timur-B04825
2012-02-27 15:50   ` Tabi Timur-B04825
2012-02-27 19:19 ` Scott Wood
2012-02-27 19:19   ` Scott Wood
2012-02-27 19:19   ` Scott Wood
2012-02-28  7:09   ` Yin Olivia-R63875
2012-02-28  7:09     ` Yin Olivia-R63875
2012-02-28  7:09     ` Yin Olivia-R63875
2012-03-07 13:53     ` Alexander Graf
2012-03-07 13:53       ` Alexander Graf
2012-03-07 13:53       ` Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.