public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers
@ 2013-07-01 15:35 Mihai Caraman
  2013-07-01 15:35 ` [PATCH 2/2] powerpc/fsl-booke: Use common defines for SPE/FP " Mihai Caraman
  2013-07-02  0:18 ` [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec " Alexander Graf
  0 siblings, 2 replies; 6+ messages in thread
From: Mihai Caraman @ 2013-07-01 15:35 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Mihai Caraman, kvm, kvm-ppc

On Book3E some SPE/FP/AltiVec interrupts share the same number. Use
common defines to indentify these numbers.

Signed-off-by: Mihai Caraman <mihai.caraman@freescale•com>
---
 arch/powerpc/kernel/exceptions-64e.S |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 645170a..0c379e9 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -399,7 +399,7 @@ interrupt_end_book3e:
 
 /* Altivec Unavailable Interrupt */
 	START_EXCEPTION(altivec_unavailable);
-	NORMAL_EXCEPTION_PROLOG(0x200, BOOKE_INTERRUPT_ALTIVEC_UNAVAIL,
+	NORMAL_EXCEPTION_PROLOG(0x200, BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL,
 				PROLOG_ADDITION_NONE)
 	/* we can probably do a shorter exception entry for that one... */
 	EXCEPTION_COMMON(0x200, PACA_EXGEN, INTS_KEEP)
@@ -421,7 +421,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 
 /* AltiVec Assist */
 	START_EXCEPTION(altivec_assist);
-	NORMAL_EXCEPTION_PROLOG(0x220, BOOKE_INTERRUPT_ALTIVEC_ASSIST,
+	NORMAL_EXCEPTION_PROLOG(0x220,
+				BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST,
 				PROLOG_ADDITION_NONE)
 	EXCEPTION_COMMON(0x220, PACA_EXGEN, INTS_DISABLE)
 	bl	.save_nvgprs
-- 
1.7.3.4

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

* [PATCH 2/2] powerpc/fsl-booke: Use common defines for SPE/FP interrupts numbers
  2013-07-01 15:35 [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers Mihai Caraman
@ 2013-07-01 15:35 ` Mihai Caraman
  2013-07-02  0:18 ` [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec " Alexander Graf
  1 sibling, 0 replies; 6+ messages in thread
From: Mihai Caraman @ 2013-07-01 15:35 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Mihai Caraman, kvm, kvm-ppc

On Book3E some SPE/FP/AltiVec interrupts share the same number. Use
common defines to indentify these numbers.

Signed-off-by: Mihai Caraman <mihai.caraman@freescale•com>
---
 arch/powerpc/kernel/head_fsl_booke.S |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index d10a7ca..f1dd4a9 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -555,28 +555,28 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
 #ifdef CONFIG_SPE
 	/* SPE Unavailable */
 	START_EXCEPTION(SPEUnavailable)
-	NORMAL_EXCEPTION_PROLOG(SPE_UNAVAIL)
+	NORMAL_EXCEPTION_PROLOG(SPE_ALTIVEC_UNAVAIL)
 	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, SPE_UNAVAIL, SPEUnavailable, \
+	EXCEPTION(0x2020, SPE_ALTIVEC_UNAVAIL, SPEUnavailable, \
 		  unknown_exception, EXC_XFER_EE)
 #endif /* CONFIG_SPE */
 
 	/* SPE Floating Point Data */
 #ifdef CONFIG_SPE
-	EXCEPTION(0x2030, SPE_FP_DATA, SPEFloatingPointData, \
-		  SPEFloatingPointException, EXC_XFER_EE);
+	EXCEPTION(0x2030, SPE_FP_DATA_ALTIVEC_ASSIST, SPEFloatingPointData,
+ 		  SPEFloatingPointException, EXC_XFER_EE)
 
 	/* SPE Floating Point Round */
 	EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \
 		  SPEFloatingPointRoundException, EXC_XFER_EE)
 #else
-	EXCEPTION(0x2040, SPE_FP_DATA, SPEFloatingPointData, \
-		  unknown_exception, EXC_XFER_EE)
+	EXCEPTION(0x2040, SPE_FP_DATA_ALTIVEC_ASSIST, SPEFloatingPointData,
+ 		  unknown_exception, EXC_XFER_EE)
 	EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \
 		  unknown_exception, EXC_XFER_EE)
 #endif /* CONFIG_SPE */
-- 
1.7.3.4

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

* Re: [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers
  2013-07-01 15:35 [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers Mihai Caraman
  2013-07-01 15:35 ` [PATCH 2/2] powerpc/fsl-booke: Use common defines for SPE/FP " Mihai Caraman
@ 2013-07-02  0:18 ` Alexander Graf
  2013-07-02  0:56   ` Scott Wood
  1 sibling, 1 reply; 6+ messages in thread
From: Alexander Graf @ 2013-07-02  0:18 UTC (permalink / raw)
  To: Mihai Caraman; +Cc: linuxppc-dev, kvm, kvm-ppc


On 01.07.2013, at 17:35, Mihai Caraman wrote:

> On Book3E some SPE/FP/AltiVec interrupts share the same number. Use
> common defines to indentify these numbers.

So why didn't this happen from the beginning? Why the change?


Alex

>=20
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale•com>
> ---
> arch/powerpc/kernel/exceptions-64e.S |    5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>=20
> diff --git a/arch/powerpc/kernel/exceptions-64e.S =
b/arch/powerpc/kernel/exceptions-64e.S
> index 645170a..0c379e9 100644
> --- a/arch/powerpc/kernel/exceptions-64e.S
> +++ b/arch/powerpc/kernel/exceptions-64e.S
> @@ -399,7 +399,7 @@ interrupt_end_book3e:
>=20
> /* Altivec Unavailable Interrupt */
> 	START_EXCEPTION(altivec_unavailable);
> -	NORMAL_EXCEPTION_PROLOG(0x200, BOOKE_INTERRUPT_ALTIVEC_UNAVAIL,
> +	NORMAL_EXCEPTION_PROLOG(0x200, =
BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL,
> 				PROLOG_ADDITION_NONE)
> 	/* we can probably do a shorter exception entry for that one... =
*/
> 	EXCEPTION_COMMON(0x200, PACA_EXGEN, INTS_KEEP)
> @@ -421,7 +421,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
>=20
> /* AltiVec Assist */
> 	START_EXCEPTION(altivec_assist);
> -	NORMAL_EXCEPTION_PROLOG(0x220, BOOKE_INTERRUPT_ALTIVEC_ASSIST,
> +	NORMAL_EXCEPTION_PROLOG(0x220,
> +				=
BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST,
> 				PROLOG_ADDITION_NONE)
> 	EXCEPTION_COMMON(0x220, PACA_EXGEN, INTS_DISABLE)
> 	bl	.save_nvgprs
> --=20
> 1.7.3.4
>=20
>=20
> --
> 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

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

* Re: [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers
  2013-07-02  0:18 ` [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec " Alexander Graf
@ 2013-07-02  0:56   ` Scott Wood
  2013-07-02  1:02     ` Alexander Graf
  2013-07-03 12:25     ` Caraman Mihai Claudiu-B02008
  0 siblings, 2 replies; 6+ messages in thread
From: Scott Wood @ 2013-07-02  0:56 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Mihai Caraman, linuxppc-dev, kvm, kvm-ppc

On 07/01/2013 07:18:21 PM, Alexander Graf wrote:
>=20
> On 01.07.2013, at 17:35, Mihai Caraman wrote:
>=20
> > On Book3E some SPE/FP/AltiVec interrupts share the same number. Use
> > common defines to indentify these numbers.
>=20
> So why didn't this happen from the beginning?

Ask Kumar.

> Why the change?

So we can remove this hack in kvm_asm.h:

/*
  * TODO: Unify 32-bit and 64-bit kernel exception handlers to use same =20
defines
  */
#define BOOKE_INTERRUPT_SPE_UNAVAIL BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL
#define BOOKE_INTERRUPT_SPE_FP_DATA =20
BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST
#define BOOKE_INTERRUPT_ALTIVEC_UNAVAIL =20
BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL
#define BOOKE_INTERRUPT_ALTIVEC_ASSIST \
                                 =20
BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST

It was added as a compilation fix, and it was less intrusive to =20
temporarily fix it this way.

I am curious why the above code wasn't removed at the end of this =20
patchset. :-)

-Scott=

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

* Re: [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers
  2013-07-02  0:56   ` Scott Wood
@ 2013-07-02  1:02     ` Alexander Graf
  2013-07-03 12:25     ` Caraman Mihai Claudiu-B02008
  1 sibling, 0 replies; 6+ messages in thread
From: Alexander Graf @ 2013-07-02  1:02 UTC (permalink / raw)
  To: Scott Wood; +Cc: Mihai Caraman, linuxppc-dev, kvm, kvm-ppc


On 02.07.2013, at 02:56, Scott Wood wrote:

> On 07/01/2013 07:18:21 PM, Alexander Graf wrote:
>> On 01.07.2013, at 17:35, Mihai Caraman wrote:
>> > On Book3E some SPE/FP/AltiVec interrupts share the same number. Use
>> > common defines to indentify these numbers.
>> So why didn't this happen from the beginning?
>=20
> Ask Kumar.
>=20
>> Why the change?
>=20
> So we can remove this hack in kvm_asm.h:
>=20
> /*
> * TODO: Unify 32-bit and 64-bit kernel exception handlers to use same =
defines
> */
> #define BOOKE_INTERRUPT_SPE_UNAVAIL =
BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL
> #define BOOKE_INTERRUPT_SPE_FP_DATA =
BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST
> #define BOOKE_INTERRUPT_ALTIVEC_UNAVAIL =
BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL
> #define BOOKE_INTERRUPT_ALTIVEC_ASSIST \
>                                =
BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST
>=20
> It was added as a compilation fix, and it was less intrusive to =
temporarily fix it this way.
>=20
> I am curious why the above code wasn't removed at the end of this =
patchset. :-)

Yeah, and why the intention isn't clearly written down in the patch =
description ;)


Alex

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

* RE: [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers
  2013-07-02  0:56   ` Scott Wood
  2013-07-02  1:02     ` Alexander Graf
@ 2013-07-03 12:25     ` Caraman Mihai Claudiu-B02008
  1 sibling, 0 replies; 6+ messages in thread
From: Caraman Mihai Claudiu-B02008 @ 2013-07-03 12:25 UTC (permalink / raw)
  To: Wood Scott-B07421, Alexander Graf
  Cc: linuxppc-dev@lists•ozlabs.org, kvm@vger•kernel.org,
	kvm-ppc@vger•kernel.org

> So we can remove this hack in kvm_asm.h:

Not yet, this comment was added in the context of AltiVec RFC patches
which intended to remove a similar dependency.

>=20
> /*
>   * TODO: Unify 32-bit and 64-bit kernel exception handlers to use same
> defines
>   */
> #define BOOKE_INTERRUPT_SPE_UNAVAIL BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL
> #define BOOKE_INTERRUPT_SPE_FP_DATA
> BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST
> #define BOOKE_INTERRUPT_ALTIVEC_UNAVAIL
> BOOKE_INTERRUPT_SPE_ALTIVEC_UNAVAIL
> #define BOOKE_INTERRUPT_ALTIVEC_ASSIST \
>=20
> BOOKE_INTERRUPT_SPE_FP_DATA_ALTIVEC_ASSIST
>=20
> It was added as a compilation fix, and it was less intrusive to
> temporarily fix it this way.
>=20
> I am curious why the above code wasn't removed at the end of this
> patchset. :-)

Before removing it we also need to apply at least the first patch from
the Altivec set that I will send today.

-Mike

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

end of thread, other threads:[~2013-07-03 12:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 15:35 [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers Mihai Caraman
2013-07-01 15:35 ` [PATCH 2/2] powerpc/fsl-booke: Use common defines for SPE/FP " Mihai Caraman
2013-07-02  0:18 ` [PATCH 1/2] powerpc/booke64: Use common defines for AltiVec " Alexander Graf
2013-07-02  0:56   ` Scott Wood
2013-07-02  1:02     ` Alexander Graf
2013-07-03 12:25     ` Caraman Mihai Claudiu-B02008

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox