All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3] powerpc/powernv: Check for IRQHAPPENED before sleeping
@ 2014-07-02  3:49 ` Preeti U Murthy
  0 siblings, 0 replies; 4+ messages in thread
From: Preeti U Murthy @ 2014-07-02  3:49 UTC (permalink / raw)
  To: benh, mikey, mpe; +Cc: shreyas, svaidy, linuxppc-dev, linux-kernel

Commit 8d6f7c5a: "powerpc/powernv: Make it possible to skip the IRQHAPPENED
check in power7_nap()" added code that prevents cpus from checking for
pending interrupts just before entering sleep state, which is wrong. These
interrupts are delivered during the soft irq disabled state of the cpu.

A cpu cannot enter any idle state with pending interrupts because they will
never be serviced until the next time the cpu is woken up by some other
interrupt. Its only then that the pending interrupts are replayed. This can result
in device timeouts or warnings about this cpu being stuck.

This patch fixes ths issue by ensuring that cpus check for pending interrupts
just before entering any idle state as long as they are not in the path of split
core operations.

Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
---
Chanes in V2: https://lkml.org/lkml/2014/7/1/3
Modified the changelog to add the details of the problem that this patch
fixes

Changes in V3:
V2 assumed that this patch would be useful only in the context of doorbell
ipis. But that is not true; this patch is required to correctly handle any
type of interrupt delivered in the idle enter path.


 arch/powerpc/kernel/idle_power7.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S
index 2480256..5cf3d36 100644
--- a/arch/powerpc/kernel/idle_power7.S
+++ b/arch/powerpc/kernel/idle_power7.S
@@ -131,7 +131,7 @@ _GLOBAL(power7_nap)
 
 _GLOBAL(power7_sleep)
 	li	r3,1
-	li	r4,0
+	li	r4,1
 	b	power7_powersave_common
 	/* No return */
 


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

* [PATCH V3] powerpc/powernv: Check for IRQHAPPENED before sleeping
@ 2014-07-02  3:49 ` Preeti U Murthy
  0 siblings, 0 replies; 4+ messages in thread
From: Preeti U Murthy @ 2014-07-02  3:49 UTC (permalink / raw)
  To: benh, mikey, mpe; +Cc: shreyas, linuxppc-dev, linux-kernel

Commit 8d6f7c5a: "powerpc/powernv: Make it possible to skip the IRQHAPPENED
check in power7_nap()" added code that prevents cpus from checking for
pending interrupts just before entering sleep state, which is wrong. These
interrupts are delivered during the soft irq disabled state of the cpu.

A cpu cannot enter any idle state with pending interrupts because they will
never be serviced until the next time the cpu is woken up by some other
interrupt. Its only then that the pending interrupts are replayed. This can result
in device timeouts or warnings about this cpu being stuck.

This patch fixes ths issue by ensuring that cpus check for pending interrupts
just before entering any idle state as long as they are not in the path of split
core operations.

Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
---
Chanes in V2: https://lkml.org/lkml/2014/7/1/3
Modified the changelog to add the details of the problem that this patch
fixes

Changes in V3:
V2 assumed that this patch would be useful only in the context of doorbell
ipis. But that is not true; this patch is required to correctly handle any
type of interrupt delivered in the idle enter path.


 arch/powerpc/kernel/idle_power7.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S
index 2480256..5cf3d36 100644
--- a/arch/powerpc/kernel/idle_power7.S
+++ b/arch/powerpc/kernel/idle_power7.S
@@ -131,7 +131,7 @@ _GLOBAL(power7_nap)
 
 _GLOBAL(power7_sleep)
 	li	r3,1
-	li	r4,0
+	li	r4,1
 	b	power7_powersave_common
 	/* No return */
 

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

* Re: [PATCH V3] powerpc/powernv: Check for IRQHAPPENED before sleeping
  2014-07-02  3:49 ` Preeti U Murthy
@ 2014-07-02  4:06   ` Michael Ellerman
  -1 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2014-07-02  4:06 UTC (permalink / raw)
  To: Preeti U Murthy; +Cc: benh, mikey, shreyas, svaidy, linuxppc-dev, linux-kernel

On Wed, 2014-07-02 at 09:19 +0530, Preeti U Murthy wrote:
> Commit 8d6f7c5a: "powerpc/powernv: Make it possible to skip the IRQHAPPENED
> check in power7_nap()" added code that prevents cpus from checking for
> pending interrupts just before entering sleep state, which is wrong. These
> interrupts are delivered during the soft irq disabled state of the cpu.

Acked-by: Michael Ellerman <mpe@ellerman.id.au>

cheers



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

* Re: [PATCH V3] powerpc/powernv: Check for IRQHAPPENED before sleeping
@ 2014-07-02  4:06   ` Michael Ellerman
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2014-07-02  4:06 UTC (permalink / raw)
  To: Preeti U Murthy; +Cc: mikey, linux-kernel, shreyas, linuxppc-dev

On Wed, 2014-07-02 at 09:19 +0530, Preeti U Murthy wrote:
> Commit 8d6f7c5a: "powerpc/powernv: Make it possible to skip the IRQHAPPENED
> check in power7_nap()" added code that prevents cpus from checking for
> pending interrupts just before entering sleep state, which is wrong. These
> interrupts are delivered during the soft irq disabled state of the cpu.

Acked-by: Michael Ellerman <mpe@ellerman.id.au>

cheers

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

end of thread, other threads:[~2014-07-02  4:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02  3:49 [PATCH V3] powerpc/powernv: Check for IRQHAPPENED before sleeping Preeti U Murthy
2014-07-02  3:49 ` Preeti U Murthy
2014-07-02  4:06 ` Michael Ellerman
2014-07-02  4:06   ` Michael Ellerman

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.