* [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable
@ 2011-05-20 19:00 Scott Wood
2011-05-20 22:32 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 6+ messages in thread
From: Scott Wood @ 2011-05-20 19:00 UTC (permalink / raw)
To: galak; +Cc: linuxppc-dev
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/kernel/exceptions-64e.S | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index b60f49e..87ca569 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -123,6 +123,12 @@
std r14,PACA_EXMC+EX_R14(r13); \
std r15,PACA_EXMC+EX_R15(r13)
+#define PROLOG_ADDITION_DOORBELL_GEN \
+ lbz r11,PACASOFTIRQEN(r13); /* are irqs soft-disabled ? */ \
+ cmpwi cr0,r11,0; /* yes -> go out of line */ \
+ beq masked_doorbell_book3e;
+
+
/* Core exception code for all exceptions except TLB misses.
* XXX: Needs to make SPRN_SPRG_GEN depend on exception type
*/
@@ -466,7 +472,13 @@ kernel_dbg_exc:
MASKABLE_EXCEPTION(0x260, perfmon, .performance_monitor_exception, ACK_NONE)
/* Doorbell interrupt */
- MASKABLE_EXCEPTION(0x2070, doorbell, .doorbell_exception, ACK_NONE)
+ START_EXCEPTION(doorbell)
+ NORMAL_EXCEPTION_PROLOG(0x2070, PROLOG_ADDITION_DOORBELL)
+ EXCEPTION_COMMON(0x2070, PACA_EXGEN, INTS_DISABLE_ALL)
+ CHECK_NAPPING()
+ addi r3,r1,STACK_FRAME_OVERHEAD
+ bl .doorbell_exception
+ b .ret_from_except_lite;
/* Doorbell critical Interrupt */
START_EXCEPTION(doorbell_crit);
@@ -521,8 +533,16 @@ kernel_dbg_exc:
* An interrupt came in while soft-disabled; clear EE in SRR1,
* clear paca->hard_enabled and return.
*/
+masked_doorbell_book3e:
+ mtcr r10
+ /* Resend the doorbell to fire again when ints enabled */
+ mfspr r10,SPRN_PIR
+ PPC_MSGSND(r10)
+ b masked_interrupt_book3e_common
+
masked_interrupt_book3e:
mtcr r10
+masked_interrupt_book3e_common:
stb r11,PACAHARDIRQEN(r13)
mfspr r10,SPRN_SRR1
rldicl r11,r10,48,1 /* clear MSR_EE */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable
2011-05-20 19:00 [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable Scott Wood
@ 2011-05-20 22:32 ` Benjamin Herrenschmidt
2011-05-23 20:26 ` Scott Wood
0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2011-05-20 22:32 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
On Fri, 2011-05-20 at 14:00 -0500, Scott Wood wrote:
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/kernel/exceptions-64e.S | 22 +++++++++++++++++++++-
> 1 files changed, 21 insertions(+), 1 deletions(-)
You can probably remove the doorbell re-check when enabling interrupts
now, can't you ?
Cheers,
Ben.
> diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
> index b60f49e..87ca569 100644
> --- a/arch/powerpc/kernel/exceptions-64e.S
> +++ b/arch/powerpc/kernel/exceptions-64e.S
> @@ -123,6 +123,12 @@
> std r14,PACA_EXMC+EX_R14(r13); \
> std r15,PACA_EXMC+EX_R15(r13)
>
> +#define PROLOG_ADDITION_DOORBELL_GEN \
> + lbz r11,PACASOFTIRQEN(r13); /* are irqs soft-disabled ? */ \
> + cmpwi cr0,r11,0; /* yes -> go out of line */ \
> + beq masked_doorbell_book3e;
> +
> +
> /* Core exception code for all exceptions except TLB misses.
> * XXX: Needs to make SPRN_SPRG_GEN depend on exception type
> */
> @@ -466,7 +472,13 @@ kernel_dbg_exc:
> MASKABLE_EXCEPTION(0x260, perfmon, .performance_monitor_exception, ACK_NONE)
>
> /* Doorbell interrupt */
> - MASKABLE_EXCEPTION(0x2070, doorbell, .doorbell_exception, ACK_NONE)
> + START_EXCEPTION(doorbell)
> + NORMAL_EXCEPTION_PROLOG(0x2070, PROLOG_ADDITION_DOORBELL)
> + EXCEPTION_COMMON(0x2070, PACA_EXGEN, INTS_DISABLE_ALL)
> + CHECK_NAPPING()
> + addi r3,r1,STACK_FRAME_OVERHEAD
> + bl .doorbell_exception
> + b .ret_from_except_lite;
>
> /* Doorbell critical Interrupt */
> START_EXCEPTION(doorbell_crit);
> @@ -521,8 +533,16 @@ kernel_dbg_exc:
> * An interrupt came in while soft-disabled; clear EE in SRR1,
> * clear paca->hard_enabled and return.
> */
> +masked_doorbell_book3e:
> + mtcr r10
> + /* Resend the doorbell to fire again when ints enabled */
> + mfspr r10,SPRN_PIR
> + PPC_MSGSND(r10)
> + b masked_interrupt_book3e_common
> +
> masked_interrupt_book3e:
> mtcr r10
> +masked_interrupt_book3e_common:
> stb r11,PACAHARDIRQEN(r13)
> mfspr r10,SPRN_SRR1
> rldicl r11,r10,48,1 /* clear MSR_EE */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable
2011-05-20 22:32 ` Benjamin Herrenschmidt
@ 2011-05-23 20:26 ` Scott Wood
2011-05-23 20:51 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 6+ messages in thread
From: Scott Wood @ 2011-05-23 20:26 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
On Sat, 21 May 2011 08:32:58 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Fri, 2011-05-20 at 14:00 -0500, Scott Wood wrote:
> > Signed-off-by: Scott Wood <scottwood@freescale.com>
> > ---
> > arch/powerpc/kernel/exceptions-64e.S | 22 +++++++++++++++++++++-
> > 1 files changed, 21 insertions(+), 1 deletions(-)
>
> You can probably remove the doorbell re-check when enabling interrupts
> now, can't you ?
Ah, so that's how it currently gets away without re-raising when the
interrupt happens. :-)
I'll remove it.
-Scott
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable
2011-05-23 20:26 ` Scott Wood
@ 2011-05-23 20:51 ` Benjamin Herrenschmidt
2011-06-17 5:12 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2011-05-23 20:51 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
On Mon, 2011-05-23 at 15:26 -0500, Scott Wood wrote:
> On Sat, 21 May 2011 08:32:58 +1000
> Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> > On Fri, 2011-05-20 at 14:00 -0500, Scott Wood wrote:
> > > Signed-off-by: Scott Wood <scottwood@freescale.com>
> > > ---
> > > arch/powerpc/kernel/exceptions-64e.S | 22 +++++++++++++++++++++-
> > > 1 files changed, 21 insertions(+), 1 deletions(-)
> >
> > You can probably remove the doorbell re-check when enabling interrupts
> > now, can't you ?
>
> Ah, so that's how it currently gets away without re-raising when the
> interrupt happens. :-)
>
> I'll remove it.
Yup, I was too lazy to make a special case in the exception handlers :-)
Cheers,
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable
2011-05-23 20:51 ` Benjamin Herrenschmidt
@ 2011-06-17 5:12 ` Benjamin Herrenschmidt
2011-06-17 16:02 ` Scott Wood
0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2011-06-17 5:12 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
On Tue, 2011-05-24 at 06:51 +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2011-05-23 at 15:26 -0500, Scott Wood wrote:
> > On Sat, 21 May 2011 08:32:58 +1000
> > Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > > On Fri, 2011-05-20 at 14:00 -0500, Scott Wood wrote:
> > > > Signed-off-by: Scott Wood <scottwood@freescale.com>
> > > > ---
> > > > arch/powerpc/kernel/exceptions-64e.S | 22 +++++++++++++++++++++-
> > > > 1 files changed, 21 insertions(+), 1 deletions(-)
> > >
> > > You can probably remove the doorbell re-check when enabling interrupts
> > > now, can't you ?
> >
> > Ah, so that's how it currently gets away without re-raising when the
> > interrupt happens. :-)
> >
> > I'll remove it.
>
> Yup, I was too lazy to make a special case in the exception handlers :-)
Are you going to send a re-spin ?
Cheers,
Ben.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable
2011-06-17 5:12 ` Benjamin Herrenschmidt
@ 2011-06-17 16:02 ` Scott Wood
0 siblings, 0 replies; 6+ messages in thread
From: Scott Wood @ 2011-06-17 16:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
On Fri, 17 Jun 2011 15:12:00 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Tue, 2011-05-24 at 06:51 +1000, Benjamin Herrenschmidt wrote:
> > On Mon, 2011-05-23 at 15:26 -0500, Scott Wood wrote:
> > > On Sat, 21 May 2011 08:32:58 +1000
> > > Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> > >
> > > > On Fri, 2011-05-20 at 14:00 -0500, Scott Wood wrote:
> > > > > Signed-off-by: Scott Wood <scottwood@freescale.com>
> > > > > ---
> > > > > arch/powerpc/kernel/exceptions-64e.S | 22 +++++++++++++++++++++-
> > > > > 1 files changed, 21 insertions(+), 1 deletions(-)
> > > >
> > > > You can probably remove the doorbell re-check when enabling interrupts
> > > > now, can't you ?
> > >
> > > Ah, so that's how it currently gets away without re-raising when the
> > > interrupt happens. :-)
> > >
> > > I'll remove it.
> >
> > Yup, I was too lazy to make a special case in the exception handlers :-)
>
> Are you going to send a re-spin ?
Ah, yes, forgot about this one. :-)
-Scott
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-17 16:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20 19:00 [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable Scott Wood
2011-05-20 22:32 ` Benjamin Herrenschmidt
2011-05-23 20:26 ` Scott Wood
2011-05-23 20:51 ` Benjamin Herrenschmidt
2011-06-17 5:12 ` Benjamin Herrenschmidt
2011-06-17 16:02 ` Scott Wood
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.