Patchwork [1/2] powerpc/e500: make load_up_spe a normal fuction

login
register
mail settings
Submitter Olivia Yin
Date Feb. 27, 2012, 10:59 a.m.
Message ID <1330340388-30296-1-git-send-email-hong-hua.yin@freescale.com>
Download mbox | patch
Permalink /patch/143175/
State New
Headers show

Comments

Olivia Yin - Feb. 27, 2012, 10:59 a.m.
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(-)
Tabi Timur-B04825 - Feb. 27, 2012, 3:50 p.m.
On Mon, Feb 27, 2012 at 4:59 AM, Olivia Yin <hong-hua.yin@freescale.com> wrote:
> So that we can call it in kernel.

And why would we want that?
Scott Wood - Feb. 27, 2012, 7:19 p.m.
On 02/27/2012 04:59 AM, Olivia Yin wrote:
> So that we can call it in kernel.
> 
> Signed-off-by: Liu Yu <yu.liu@freescale.com>

Explain why we want this, and point out that this makes it similar to
load_up_fpu.

> ---
>  arch/powerpc/kernel/head_fsl_booke.S |   23 ++++++-----------------
>  1 files changed, 6 insertions(+), 17 deletions(-)

When posting a patch authored by someone else, more or less unchanged,
you should put a From: line in the body of the e-mail.

git send-email will do this automatically if you preserve the authorship
in the git commit.

Also, you should add your own Signed-off-by.

-Scott

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yin Olivia-R63875 - Feb. 28, 2012, 7:09 a.m.
Hi Scott,

This had been reviewed before and accepted by internal tree.
http://linux.freescale.net/patchwork/patch/11100/
http://git.am.freescale.net/gitolite/gitweb.cgi/sdk/kvm.git/commit/?h=for-sdk1.2&id=c5088844dc665dbdae4fa51b8d58dc203bacc17e

I didn't change anything except the line.
I just commit to external kvm-ppc mailing list. Should I add my own Signed-off-by?

Best Regards,
Olivia

-----Original Message-----
From: Wood Scott-B07421 

Sent: Tuesday, February 28, 2012 3:19 AM
To: Yin Olivia-R63875
Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Liu Yu-B13201
Subject: Re: [PATCH 1/2] powerpc/e500: make load_up_spe a normal fuction

On 02/27/2012 04:59 AM, Olivia Yin wrote:
> So that we can call it in kernel.

> 

> Signed-off-by: Liu Yu <yu.liu@freescale.com>


Explain why we want this, and point out that this makes it similar to load_up_fpu.

> ---

>  arch/powerpc/kernel/head_fsl_booke.S |   23 ++++++-----------------

>  1 files changed, 6 insertions(+), 17 deletions(-)


When posting a patch authored by someone else, more or less unchanged, you should put a From: line in the body of the e-mail.

git send-email will do this automatically if you preserve the authorship in the git commit.

Also, you should add your own Signed-off-by.

-Scott
Alexander Graf - March 7, 2012, 1:53 p.m.
On 02/28/2012 08:09 AM, Yin Olivia-R63875 wrote:
> Hi Scott,
>
> This had been reviewed before and accepted by internal tree.
> http://linux.freescale.net/patchwork/patch/11100/
> http://git.am.freescale.net/gitolite/gitweb.cgi/sdk/kvm.git/commit/?h=for-sdk1.2&id=c5088844dc665dbdae4fa51b8d58dc203bacc17e
>
> I didn't change anything except the line.
> I just commit to external kvm-ppc mailing list. Should I add my own Signed-off-by?

Yes, if you just take a patch from someone else and direct it to another 
tree, you keep the From: line (git cherry-pick or git am should do that 
automatically for you) and add your own SOB-line (git am -s can do that 
for example).

Since you're also supposed to change the description, please note that 
between Yu's SOB line and your SOB line with something like

Signed-off-by: Liu Yu<yu.liu@freescale.com>
[olivia: change description]
Signed-off-by: Olivia Yin<r63875@freescale.com>



Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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