All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
@ 2009-11-02 11:42 Haojian Zhuang
  2009-11-02 12:00 ` Russell King - ARM Linux
  2009-11-02 17:14 ` Robert Jarzmik
  0 siblings, 2 replies; 9+ messages in thread
From: Haojian Zhuang @ 2009-11-02 11:42 UTC (permalink / raw)
  To: linux-arm-kernel



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

* [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
  2009-11-02 11:42 [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx Haojian Zhuang
@ 2009-11-02 12:00 ` Russell King - ARM Linux
  2009-11-02 14:33   ` Eric Miao
  2009-11-02 17:14 ` Robert Jarzmik
  1 sibling, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2009-11-02 12:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 02, 2009 at 07:42:14AM -0400, Haojian Zhuang wrote:
> >From 1764e836424d42a0654b8b73c402a2dddb118dc4 Mon Sep 17 00:00:00 2001
> From: Haojian Zhuang <haojian.zhuang@marvell.com>
> Date: Mon, 2 Nov 2009 14:02:21 -0500
> Subject: [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
> 
> Since interrupt handler is changed to use interrupt priority, we also need to
> save and restore these interrupt controller registers in suspend/resume
> routine.

Since we've just been struggling with discovering why something doesn't
suspend/resume, is this:

> @@ -159,6 +160,10 @@ static int pxa_irq_suspend(struct sys_device
> *dev, pm_message_t state)
>  		saved_icmr[i] = _ICMR(irq);
>  		_ICMR(irq) = 0;
>  	}
> +	if (pxa_internal_irq_nr > 128)
> +		BUG();

really appropriate.  If we have more than 128 interrupts, do we really
want to cause the kernel to OOPS at this point?

What about:

	if (WARN_ON(pxa_internal_irq_nr > 128))
		return -EINVAL;

so that we refuse to sleep _and_ log the reason why?

This way, the platform will still be alive, and if you didn't see it via
the console, at least it'll be available via dmesg - which is a lot better
than trying to work out why the machine gets stuck during suspend.

Such a check should also be a little higher up - since we're already
looping over the number of irqs for ICMR.

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

* [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
  2009-11-02 12:00 ` Russell King - ARM Linux
@ 2009-11-02 14:33   ` Eric Miao
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Miao @ 2009-11-02 14:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 2, 2009 at 8:00 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Mon, Nov 02, 2009 at 07:42:14AM -0400, Haojian Zhuang wrote:
>> >From 1764e836424d42a0654b8b73c402a2dddb118dc4 Mon Sep 17 00:00:00 2001
>> From: Haojian Zhuang <haojian.zhuang@marvell.com>
>> Date: Mon, 2 Nov 2009 14:02:21 -0500
>> Subject: [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
>>
>> Since interrupt handler is changed to use interrupt priority, we also need to
>> save and restore these interrupt controller registers in suspend/resume
>> routine.
>
> Since we've just been struggling with discovering why something doesn't
> suspend/resume, is this:
>
>> @@ -159,6 +160,10 @@ static int pxa_irq_suspend(struct sys_device
>> *dev, pm_message_t state)
>> ? ? ? ? ? ? ? saved_icmr[i] = _ICMR(irq);
>> ? ? ? ? ? ? ? _ICMR(irq) = 0;
>> ? ? ? }
>> + ? ? if (pxa_internal_irq_nr > 128)
>> + ? ? ? ? ? ? BUG();
>
> really appropriate. ?If we have more than 128 interrupts, do we really
> want to cause the kernel to OOPS at this point?
>
> What about:
>
> ? ? ? ?if (WARN_ON(pxa_internal_irq_nr > 128))
> ? ? ? ? ? ? ? ?return -EINVAL;
>
> so that we refuse to sleep _and_ log the reason why?
>
> This way, the platform will still be alive, and if you didn't see it via
> the console, at least it'll be available via dmesg - which is a lot better
> than trying to work out why the machine gets stuck during suspend.
>
> Such a check should also be a little higher up - since we're already
> looping over the number of irqs for ICMR.
>

Yes, I'd prefer such a check could be done earlier in pxa_init_irq() instead.

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

* [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
  2009-11-02 11:42 [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx Haojian Zhuang
  2009-11-02 12:00 ` Russell King - ARM Linux
@ 2009-11-02 17:14 ` Robert Jarzmik
  2009-11-03  2:19   ` Haojian Zhuang
  1 sibling, 1 reply; 9+ messages in thread
From: Robert Jarzmik @ 2009-11-02 17:14 UTC (permalink / raw)
  To: linux-arm-kernel

Haojian Zhuang <haojian.zhuang@gmail.com> writes:

> From 1764e836424d42a0654b8b73c402a2dddb118dc4 Mon Sep 17 00:00:00 2001
> From: Haojian Zhuang <haojian.zhuang@marvell.com>
> Date: Mon, 2 Nov 2009 14:02:21 -0500
> Subject: [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
>
> Since interrupt handler is changed to use interrupt priority, we also need to
> save and restore these interrupt controller registers in suspend/resume
> routine.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
> Tested-by: Daniel Mack <daniel@caiaq.de>

Yes, the fix does work for my platform too, well done.
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>

As a side note, the "128" magic number may have deserved a little define
somewhere.

Cheers.

--
Robert

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

* [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
  2009-11-02 17:14 ` Robert Jarzmik
@ 2009-11-03  2:19   ` Haojian Zhuang
  2009-11-03  4:03     ` Eric Miao
  0 siblings, 1 reply; 9+ messages in thread
From: Haojian Zhuang @ 2009-11-03  2:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 2, 2009 at 1:14 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> Haojian Zhuang <haojian.zhuang@gmail.com> writes:
>
>> From 1764e836424d42a0654b8b73c402a2dddb118dc4 Mon Sep 17 00:00:00 2001
>> From: Haojian Zhuang <haojian.zhuang@marvell.com>
>> Date: Mon, 2 Nov 2009 14:02:21 -0500
>> Subject: [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
>>
>> Since interrupt handler is changed to use interrupt priority, we also need to
>> save and restore these interrupt controller registers in suspend/resume
>> routine.
>>
>> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
>> Tested-by: Daniel Mack <daniel@caiaq.de>
>
> Yes, the fix does work for my platform too, well done.
> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
>
> As a side note, the "128" magic number may have deserved a little define
> somewhere.
>
> Cheers.
>
> --
> Robert
>

Thanks of all good comments. Now I move the check into the
initialization code. If internal irq number is larger than 128, the
larger irqs won't be initialized. So suspend resume routine needn't
access the larger IPR registers. Patch is in below and attached.

Thanks
Haojian

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

* [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
  2009-11-03  2:19   ` Haojian Zhuang
@ 2009-11-03  4:03     ` Eric Miao
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Miao @ 2009-11-03  4:03 UTC (permalink / raw)
  To: linux-arm-kernel

The changes might be too much, I simplified it to the one below and
merged into 'fix':

commit c482ae4dcf23fd241321595d71bbe8aee33eabf5
Author: Haojian Zhuang <haojian.zhuang@marvell.com>
Date:   Mon Nov 2 14:02:21 2009 -0500

    [ARM] pxa: fix resume failure by saving/restoring IPRx registers

    Since interrupt handler is changed to use interrupt priority, we also need
    to save and restore these interrupt controller registers in suspend/resume
    routine.

    Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
    Tested-by: Daniel Mack <daniel@caiaq.de>
    Tested-by: Pavel Machek <pavel@ucw.cz>
    Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
    Acked-by: Pavel Machek <pavel@ucw.cz>
    Signed-off-by: Eric Miao <eric.y.miao@gmail.com>

diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index d694ce2..6112af4 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -25,6 +25,8 @@

 #include "generic.h"

+#define MAX_INTERNAL_IRQS      128
+
 #define IRQ_BIT(n)     (((n) - PXA_IRQ(0)) & 0x1f)
 #define _ICMR(n)       (*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICMR2 : &ICMR))
 #define _ICLR(n)       (*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICLR2 : &ICLR))
@@ -122,6 +124,8 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
 {
        int irq, i;

+       BUG_ON(irq_nr > MAX_INTERNAL_IRQS);
+
        pxa_internal_irq_nr = irq_nr;

        for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq += 32) {
@@ -149,7 +153,8 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
 }

 #ifdef CONFIG_PM
-static unsigned long saved_icmr[2];
+static unsigned long saved_icmr[MAX_INTERNAL_IRQS/32];
+static unsigned long saved_ipr[MAX_INTERNAL_IRQS];

 static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
 {
@@ -159,6 +164,8 @@ static int pxa_irq_suspend(struct sys_device *dev,
pm_message_t state)
                saved_icmr[i] = _ICMR(irq);
                _ICMR(irq) = 0;
        }
+       for (i = 0; i < pxa_internal_irq_nr; i++)
+               saved_ipr[i] = IPR(i);

        return 0;
 }
@@ -171,6 +178,8 @@ static int pxa_irq_resume(struct sys_device *dev)
                _ICMR(irq) = saved_icmr[i];
                _ICLR(irq) = 0;
        }
+       for (i = 0; i < pxa_internal_irq_nr; i++)
+               IPR(i) = saved_ipr[i];

        ICCR = 1;
        return 0;

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

* [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
@ 2009-11-02 19:02 Haojian Zhuang
  0 siblings, 0 replies; 9+ messages in thread
From: Haojian Zhuang @ 2009-11-02 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Since interrupt handler is changed to use interrupt priority, we also need to
save and restore these interrupt controller registers in suspend/resume
routine.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
---
 arch/arm/mach-pxa/irq.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index d694ce2..cdc272b 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -150,6 +150,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)

 #ifdef CONFIG_PM
 static unsigned long saved_icmr[2];
+static unsigned long saved_ipr[128];

 static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
 {
@@ -159,6 +160,10 @@ static int pxa_irq_suspend(struct sys_device
*dev, pm_message_t state)
 		saved_icmr[i] = _ICMR(irq);
 		_ICMR(irq) = 0;
 	}
+	if (pxa_internal_irq_nr > 128)
+		BUG();
+	for (i = 0; i < pxa_internal_irq_nr; i++)
+		saved_ipr[i] = IPR(i);

 	return 0;
 }
@@ -171,6 +176,8 @@ static int pxa_irq_resume(struct sys_device *dev)
 		_ICMR(irq) = saved_icmr[i];
 		_ICLR(irq) = 0;
 	}
+	for (i = 0; i < pxa_internal_irq_nr; i++)
+		IPR(i) = saved_ipr[i];

 	ICCR = 1;
 	return 0;
-- 
1.5.6.5

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

* [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
@ 2009-11-02 19:02 Haojian Zhuang
  0 siblings, 0 replies; 9+ messages in thread
From: Haojian Zhuang @ 2009-11-02 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Since interrupt handler is changed to use interrupt priority, we also need to
save and restore these interrupt controller registers in suspend/resume
routine.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Tested-by: Daniel Mack <daniel@caiaq.de>
---
 arch/arm/mach-pxa/irq.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index d694ce2..cdc272b 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -150,6 +150,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)

 #ifdef CONFIG_PM
 static unsigned long saved_icmr[2];
+static unsigned long saved_ipr[128];

 static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
 {
@@ -159,6 +160,10 @@ static int pxa_irq_suspend(struct sys_device
*dev, pm_message_t state)
 		saved_icmr[i] = _ICMR(irq);
 		_ICMR(irq) = 0;
 	}
+	if (pxa_internal_irq_nr > 128)
+		BUG();
+	for (i = 0; i < pxa_internal_irq_nr; i++)
+		saved_ipr[i] = IPR(i);

 	return 0;
 }
@@ -171,6 +176,8 @@ static int pxa_irq_resume(struct sys_device *dev)
 		_ICMR(irq) = saved_icmr[i];
 		_ICLR(irq) = 0;
 	}
+	for (i = 0; i < pxa_internal_irq_nr; i++)
+		IPR(i) = saved_ipr[i];

 	ICCR = 1;
 	return 0;
-- 
1.5.6.5

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

* [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx
@ 2009-11-02 19:02 Haojian Zhuang
  0 siblings, 0 replies; 9+ messages in thread
From: Haojian Zhuang @ 2009-11-02 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Since interrupt handler is changed to use interrupt priority, we also need to
save and restore these interrupt controller registers in suspend/resume
routine.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Tested-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 arch/arm/mach-pxa/irq.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index d694ce2..7f6f26c 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -28,6 +28,7 @@
 #define IRQ_BIT(n)	(((n) - PXA_IRQ(0)) & 0x1f)
 #define _ICMR(n)	(*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICMR2 : &ICMR))
 #define _ICLR(n)	(*((((n) - PXA_IRQ(0)) & ~0x1f) ? &ICLR2 : &ICLR))
+#define MAX_INTERNAL_IRQS	128

 /*
  * This is for peripheral IRQs internal to the PXA chip.
@@ -122,23 +123,27 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
 {
 	int irq, i;

-	pxa_internal_irq_nr = irq_nr;
-
 	for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq += 32) {
 		_ICMR(irq) = 0;	/* disable all IRQs */
 		_ICLR(irq) = 0;	/* all IRQs are IRQ, not FIQ */
 	}

+	/* irq_nr shouldn't exceed MAX_INTERNAL_IRQS */
+	if (irq_nr > MAX_INTERNAL_IRQS)
+		pxa_internal_irq_nr = MAX_INTERNAL_IRQS;
+	else
+		pxa_internal_irq_nr = irq_nr;
+
 	/* initialize interrupt priority */
 	if (cpu_is_pxa27x() || cpu_is_pxa3xx()) {
-		for (i = 0; i < irq_nr; i++)
+		for (i = 0; i < pxa_internal_irq_nr; i++)
 			IPR(i) = i | (1 << 31);
 	}

 	/* only unmasked interrupts kick us out of idle */
 	ICCR = 1;

-	for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq++) {
+	for (irq = PXA_IRQ(0); irq < PXA_IRQ(pxa_internal_irq_nr); irq++) {
 		set_irq_chip(irq, &pxa_internal_irq_chip);
 		set_irq_handler(irq, handle_level_irq);
 		set_irq_flags(irq, IRQF_VALID);
@@ -150,6 +155,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)

 #ifdef CONFIG_PM
 static unsigned long saved_icmr[2];
+static unsigned long saved_ipr[MAX_INTERNAL_IRQS];

 static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
 {
@@ -159,6 +165,8 @@ static int pxa_irq_suspend(struct sys_device *dev,
pm_message_t state)
 		saved_icmr[i] = _ICMR(irq);
 		_ICMR(irq) = 0;
 	}
+	for (i = 0; i < pxa_internal_irq_nr; i++)
+		saved_ipr[i] = IPR(i);

 	return 0;
 }
@@ -171,6 +179,8 @@ static int pxa_irq_resume(struct sys_device *dev)
 		_ICMR(irq) = saved_icmr[i];
 		_ICLR(irq) = 0;
 	}
+	for (i = 0; i < pxa_internal_irq_nr; i++)
+		IPR(i) = saved_ipr[i];

 	ICCR = 1;
 	return 0;
-- 
1.5.6.5

--00151774051c77fae704776e216f
Content-Type: text/x-patch; charset=US-ASCII; 
	name="0001-pxa-fix-system-resume-issue-on-pxa27x-and-pxa3xx.patch"
Content-Disposition: attachment; 
	filename="0001-pxa-fix-system-resume-issue-on-pxa27x-and-pxa3xx.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g1ki04450

RnJvbSBjOWRkNTQ0YzE5MjMyNmE3ZTc1NjY5MjNlMTkwNTdiOGM2YzNkNWUwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBIYW9qaWFuIFpodWFuZyA8aGFvamlhbi56aHVhbmdAbWFydmVs
bC5jb20+CkRhdGU6IE1vbiwgMiBOb3YgMjAwOSAxNDowMjoyMSAtMDUwMApTdWJqZWN0OiBbUEFU
Q0hdIHB4YTogZml4IHN5c3RlbSByZXN1bWUgaXNzdWUgb24gcHhhMjd4IGFuZCBweGEzeHgKClNp
bmNlIGludGVycnVwdCBoYW5kbGVyIGlzIGNoYW5nZWQgdG8gdXNlIGludGVycnVwdCBwcmlvcml0
eSwgd2UgYWxzbyBuZWVkIHRvCnNhdmUgYW5kIHJlc3RvcmUgdGhlc2UgaW50ZXJydXB0IGNvbnRy
b2xsZXIgcmVnaXN0ZXJzIGluIHN1c3BlbmQvcmVzdW1lCnJvdXRpbmUuCgpTaWduZWQtb2ZmLWJ5
OiBIYW9qaWFuIFpodWFuZyA8aGFvamlhbi56aHVhbmdAbW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A9IDE7CiAJcmV0dXJuIDA7
Ci0tIAoxLjUuNi41Cgo=
--00151774051c77fae704776e216f--

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

end of thread, other threads:[~2009-11-03  4:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-02 11:42 [PATCH] pxa: fix system resume issue on pxa27x and pxa3xx Haojian Zhuang
2009-11-02 12:00 ` Russell King - ARM Linux
2009-11-02 14:33   ` Eric Miao
2009-11-02 17:14 ` Robert Jarzmik
2009-11-03  2:19   ` Haojian Zhuang
2009-11-03  4:03     ` Eric Miao
2009-11-02 19:02 Haojian Zhuang
2009-11-02 19:02 Haojian Zhuang
2009-11-02 19:02 Haojian Zhuang

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.