diff mbox

[1/2] powerpc/booke64: Use common defines for AltiVec interrupts numbers

Message ID 1372692931-16324-1-git-send-email-mihai.caraman@freescale.com (mailing list archive)
State Accepted, archived
Commit 6b310fc58db27318309a04621d3a4509f1c7845a
Delegated to: Scott Wood
Headers show

Commit Message

Mihai Caraman July 1, 2013, 3:35 p.m. UTC
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(-)

Comments

Alexander Graf July 2, 2013, 12:18 a.m. UTC | #1
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

> 
> 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
> 
> 
> --
> 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
Caraman Mihai Claudiu-B02008 July 3, 2013, 12:25 p.m. UTC | #2
> 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.

> 
> /*
>   * 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
> 
> It was added as a compilation fix, and it was less intrusive to
> temporarily fix it this way.
> 
> 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
diff mbox

Patch

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