Subject: Re: [PATCH] powerpc: Fix mpic_resume on early G5 macs

From: Benjamin Herrenschmidt <[email-masked]>
Date: Tue, 15 Jun 2010 15:04:55 +1000

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 <[email-masked]>
> ---
> 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
> [email-masked]
> https://lists.ozlabs.org/listinfo/linuxppc-dev