linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: linuxppc-dev@ozlabs.org
Subject: Re: crash in init_ipic_sysfs on efika
Date: Wed, 19 Mar 2008 16:27:22 +0100	[thread overview]
Message-ID: <20080319152722.GA9208@aepfle.de> (raw)
In-Reply-To: <20080317195305.GA13298@aepfle.de>

On Mon, Mar 17, Olaf Hering wrote:

> The global primary_ipic in arch/powerpc/sysdev/ipic.c can remain NULL if
> ipic_init() fails. init_ipic_sysfs() will crash in that case.
> 
> Something like this may fix it:
> 
> Index: linux-2.6.25-rc6/arch/powerpc/sysdev/ipic.c
> ===================================================================
> --- linux-2.6.25-rc6.orig/arch/powerpc/sysdev/ipic.c
> +++ linux-2.6.25-rc6/arch/powerpc/sysdev/ipic.c
> @@ -906,7 +906,7 @@ static int __init init_ipic_sysfs(void)
>  {
>         int rc;
>  
> -       if (!primary_ipic->regs)
> +       if (!primary_ipic || !primary_ipic->regs)
>                 return -ENODEV;
>         printk(KERN_DEBUG "Registering ipic with sysfs...\n");

ipic_init() is not called for every board.
This change for the used config fixes the crash as well.

@@ -168,14 +168,14 @@ CONFIG_PPC_MULTIPLATFORM=y
 # CONFIG_PPC_86xx is not set
 CONFIG_CLASSIC32=y
 CONFIG_PPC_CHRP=y
-CONFIG_PPC_MPC512x=y
-CONFIG_PPC_MPC5121=y
-CONFIG_MPC5121_ADS=y
+# CONFIG_PPC_MPC512x is not set
+# CONFIG_PPC_MPC5121 is not set
+# CONFIG_MPC5121_ADS is not set
 CONFIG_PPC_MPC52xx=y
-CONFIG_PPC_MPC5200_SIMPLE=y
+# CONFIG_PPC_MPC5200_SIMPLE is not set
 CONFIG_PPC_EFIKA=y
 # CONFIG_PPC_LITE5200 is not set
-CONFIG_PPC_MPC5200_BUGFIX=y
+# CONFIG_PPC_MPC5200_BUGFIX is not set
 CONFIG_PPC_PMAC=y
 # CONFIG_PPC_CELL is not set
 # CONFIG_PPC_CELL_NATIVE is not set

  parent reply	other threads:[~2008-03-19 15:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 19:53 crash in init_ipic_sysfs on efika Olaf Hering
2008-03-19  5:26 ` Paul Mackerras
2008-03-20  6:45   ` Olaf Hering
2008-03-19 15:27 ` Olaf Hering [this message]
2008-03-20 11:32   ` Matt Sealey
2008-03-21 11:18     ` Benjamin Herrenschmidt
2008-03-20 15:15 ` Kumar Gala
2008-03-21  1:38   ` Paul Mackerras
2008-03-21  5:14 ` Grant Likely
2008-03-21  9:03   ` Paul Mackerras
2008-03-21  9:18     ` Kumar Gala
2008-03-24  8:02       ` Paul Mackerras
2008-03-24 22:59         ` Kumar Gala
2008-03-21 13:14     ` Matt Sealey
2008-03-21 18:51       ` Grant Likely
2008-03-22 15:25         ` Sven Luther
2008-03-23  9:00           ` David Woodhouse
2008-03-23 10:12             ` Sven Luther
2008-03-23 10:13               ` David Woodhouse
2008-03-23 10:24                 ` Sven Luther
2008-03-24 23:01         ` Matt Sealey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080319152722.GA9208@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).