* [PATCH] powerpc: Fix mpic_resume on early G5 macs
@ 2010-06-13 1:36 Alastair Bridgewater
2010-06-15 5:04 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Alastair Bridgewater @ 2010-06-13 1:36 UTC (permalink / raw)
To: linuxppc-dev
mpic_resume() on G5 macs blindly dereferences mpic->fixups, but
it may legitimately be NULL (as on PowerMac7,2). Add an explicit
check.
This fixes suspend-to-disk with one processor (maxcpus=1) for me.
Signed-off-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
---
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 4fd57ab..28668ba 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1666,7 +1666,7 @@ static int mpic_resume(struct sys_device *dev)
mpic->save_data[i].dest);
#ifdef CONFIG_MPIC_U3_HT_IRQS
- {
+ if (mpic->fixups) {
struct mpic_irq_fixup *fixup = &mpic->fixups[i];
if (fixup->base) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc: Fix mpic_resume on early G5 macs
2010-06-13 1:36 [PATCH] powerpc: Fix mpic_resume on early G5 macs Alastair Bridgewater
@ 2010-06-15 5:04 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2010-06-15 5:04 UTC (permalink / raw)
To: Alastair Bridgewater; +Cc: linuxppc-dev
On Sat, 2010-06-12 at 21:36 -0400, Alastair Bridgewater wrote:
> mpic_resume() on G5 macs blindly dereferences mpic->fixups, but
> it may legitimately be NULL (as on PowerMac7,2). Add an explicit
> check.
>
> This fixes susend-to-disk with one processor (maxcpus=1) for me.
Thanks. Patch is terribly mangled tho (word wrapped and tabs have been
replaced with spaces). I fixed it up manually but check your email setup
next time.
Cheers,
Ben.
> Signed-off-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
> ---
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 4fd57ab..28668ba 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -1666,7 +1666,7 @@ static int mpic_resume(struct sys_device *dev)
> mpic->save_data[i].dest);
>
> #ifdef CONFIG_MPIC_U3_HT_IRQS
> - {
> + if (mpic->fixups) {
> struct mpic_irq_fixup *fixup = &mpic->fixups[i];
>
> if (fixup->base) {
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-15 5:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-13 1:36 [PATCH] powerpc: Fix mpic_resume on early G5 macs Alastair Bridgewater
2010-06-15 5:04 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).