All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zang Roy-r61911 <tie-fei.zang@freescale.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH] powerpc: Fix irq routing on some PowerMac 32 bits
Date: 10 Jan 2007 16:57:20 +0800	[thread overview]
Message-ID: <1168419440.1704.16.camel@localhost.localdomain> (raw)
In-Reply-To: <1168401489.22458.332.camel@localhost.localdomain>

On Wed, 2007-01-10 at 11:58, Benjamin Herrenschmidt wrote:
> > Stop here.
> 
> Probably the log is just the last console output you got from the
> early
> console before it switched to the main one. Do you use udbg on these
> boards for early boot messages ? If yes, have you tried the
> udbg-immortal option ? (Or just prevent udbg from unregistering).
> 
> Do you have access to a HW debugging tool maybe to trace what's going
> on ?
> 
> I have no idea what's wrong at this point, though it's likely to be a
> problem with your device-tree, I can't verify it without a bit more
> debug data. Have you tried adding some debug infos to the new
> implementation of pci_device_to_OF_node(), check how it's called and
> what it returns ? That might give you a clue about the problem.

Thanks for all your suggestions. I had thought you could point out where
was wrong :-). Now, I have to trace it myself. I do not have HW
debugging tools, I only have printk().

I catch the bug. In your patch:

+       /* not a root bus, we need to get our parent */
+       parent = scan_OF_for_pci_bus(bus->parent);
+       if (parent == NULL)
+               return NULL;
+
+       /* now iterate for children for a match */
+       np = scan_OF_for_pci_dev(parent, bus->self->devfn);
+       of_node_put(parent);
+
+       /* sanity check */
+       if (strcmp(np->type, "pci") != 0)
+               printk(KERN_WARNING "pci: wrong type \"%s\" for bridge %s\n",
+                      np->type, np->full_name);

I think you should judge np != NULL before using it.  If np == NULL,
np->type will cause memory access error. On CDS and some other Freescle
board, such as 8641HPCN, there is pci bridge, np = NULL , this will
cause error.
If you agree, you or I will provide a patch to fix it:-).
Thanks.
Roy 

  reply	other threads:[~2007-01-10  8:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-11  3:09 [PATCH] powerpc: Fix irq routing on some PowerMac 32 bits Benjamin Herrenschmidt
2006-12-11  6:22 ` Paul Collins
2006-12-11  6:40   ` Benjamin Herrenschmidt
2007-01-10  3:00 ` Zang Roy-r61911
2007-01-10  3:16   ` Benjamin Herrenschmidt
2007-01-10  3:34     ` Zang Roy-r61911
2007-01-10  3:58       ` Benjamin Herrenschmidt
2007-01-10  8:57         ` Zang Roy-r61911 [this message]
2007-01-10 12:13           ` Benjamin Herrenschmidt
2007-01-10 12:22             ` Segher Boessenkool
2007-01-11  5:29               ` Zang Roy-r61911
2007-01-10 17:42             ` Wang Haiying-r54964
2007-01-11  5:25             ` Zang Roy-r61911
2007-01-11  5:28               ` Benjamin Herrenschmidt
2007-01-11  5:36                 ` Zang Roy-r61911
2007-01-11  5:40                   ` Benjamin Herrenschmidt
2007-01-11  5:58                     ` Zang Roy-r61911

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=1168419440.1704.16.camel@localhost.localdomain \
    --to=tie-fei.zang@freescale.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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 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.