Re: Possible suspend/resume regression in .32-rc?

From: Pavel Machek
Date: Mon Nov 02 2009 - 07:23:13 EST



> >> > Given that it hangs very early, in arch_suspend_enable_irqs() (see my
> >> > other mail), I don't trust your analysis.
> >> >
> >> > I'm not using serial console on spitz, and I have never had successful
> >> > resume with the patch applied.
...
> I see. You can chech my patch in below. I need to save IPRs in suspend
> resume routine.
...
> >From 1764e836424d42a0654b8b73c402a2dddb118dc4 Mon Sep 17 00:00:00 2001
> From: Haojian Zhuang <haojian.zhuang@xxxxxxxxxxx>
> 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@xxxxxxxxxxx>

Acked-by: Pavel Machek <pavel@xxxxxx>
Tested-by: Pavel Machek <pavel@xxxxxx>

> @@ -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)

Note: Your mail client is word-wrapping.

> saved_icmr[i] = _ICMR(irq);
> _ICMR(irq) = 0;
> }
> + if (pxa_internal_irq_nr > 128)
> + BUG();

BUG_ON()? WARN_ON() then irq_nr = 128? User is very unlikely to read
the BUG() message at this point...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/