From: David Gibson <david@gibson.dropbear.id.au>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org,
Yoder Stuart-B08248 <stuart.yoder@freescale.com>
Subject: Re: [PATCH] powerpc: document new interrupt-array property
Date: Tue, 27 Feb 2007 00:08:37 +1100 [thread overview]
Message-ID: <20070226130837.GA32080@localhost.localdomain> (raw)
In-Reply-To: <4540139ce9bb2426dbcc3822e6c1a63a@kernel.crashing.org>
On Mon, Feb 26, 2007 at 06:36:29AM +0100, Segher Boessenkool wrote:
> >> On the other hand, I do quite like keeping with the old principle that
> >> having interrupts == having an "interrupts" node.
> >
> > That would be nice. On the other hand, re-using interrupts means that
> > it's possible to get a silent misparse of the interrupt information:
>
> Incorrect parsing of interrupt info tends to end up
> in spectacular crashes, not silent at all ;-)
Well, yes, but "sorry, I can't understand this device tree" or "huh?
I can't find the interrupts" would be preferable to spectacular
crashes.
> > a
> > parser which doesn't understand the new 'interrupt-parents' property
> > will encounter the node, see the 'interrupts' property, assume that
> > the interrupt parent is the physical parent and, if the
> > #interrupt-cells values match up, which is quite possible, assume that
> > it has correctly understood the interrupt information.
>
> Something similar is true for *every* new binding; although
> indeed if you get a misparse the effects can be disastrous,
> with interrupts. For other cases, the kernel would have to
> say "I don't understand this device" and give up on it, which
> can easily mean a failed boot; or silently assume something
> that is just a guess at best.
>
> You cannot boot a client program that doesn't understand the
> device tree and expect it to understand the device tree ;-)
Obviously, but I'd like the client program to *know* that it doesn't
understand the device tree.
> > This is arguably a worse behaviour than simply having an old-style
> > parser see the lack of 'interrupts' property and assume the device has
> > no interrupts.
>
> Until recently (well, not that recently) Linux couldn't
> parse the interrupt tree correctly and would royally
> mess up in unusual cases. Does that mean that no device
> tree in the world should use the interrupt mapping binding?
>
> Also, a device that has interrupts but no "interrupts"
> property is *just wrong*. There are many more things
> that (can) look at the device tree than just the kernel,
> don't let your opinion be guided solely by what you
> think the kernel would do with a tree.
It's not specific to the kernel, the same reasoning applies to any
program using the device tree. If something that's not aware of the
new property sees a node with an 'interrupts' but no
'interrupt-parent' property, it has *no reason* to believe there's
anything more to know.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2007-02-26 13:08 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 23:25 [PATCH] powerpc: document new interrupt-array property Stuart Yoder
2007-02-22 0:29 ` Kumar Gala
2007-02-22 1:18 ` David Gibson
2007-02-22 7:01 ` Segher Boessenkool
2007-02-22 10:34 ` David Gibson
2007-02-22 11:06 ` Segher Boessenkool
2007-02-22 15:47 ` Yoder Stuart-B08248
2007-02-22 17:09 ` Segher Boessenkool
2007-02-23 19:15 ` Yoder Stuart-B08248
2007-02-23 21:30 ` Segher Boessenkool
2007-02-23 21:57 ` Yoder Stuart-B08248
2007-02-23 22:30 ` Segher Boessenkool
2007-02-24 6:42 ` Benjamin Herrenschmidt
2007-02-24 6:40 ` Benjamin Herrenschmidt
2007-02-24 11:24 ` Segher Boessenkool
2007-02-26 4:16 ` David Gibson
2007-02-26 5:36 ` Segher Boessenkool
2007-02-26 13:08 ` David Gibson [this message]
2007-02-26 14:26 ` Segher Boessenkool
2007-02-27 2:32 ` David Gibson
2007-02-27 2:52 ` Segher Boessenkool
2007-02-27 3:45 ` David Gibson
2007-02-27 11:49 ` Segher Boessenkool
2007-02-28 0:40 ` David Gibson
2007-02-28 1:00 ` Segher Boessenkool
2007-02-28 6:40 ` Benjamin Herrenschmidt
2007-02-26 16:53 ` Yoder Stuart-B08248
2007-02-22 22:57 ` David Gibson
2007-02-23 0:07 ` Segher Boessenkool
2007-02-23 0:33 ` David Gibson
2007-02-23 0:50 ` Segher Boessenkool
2007-02-23 16:07 ` Yoder Stuart-B08248
2007-02-23 16:14 ` Kumar Gala
2007-02-23 17:00 ` Segher Boessenkool
2007-02-23 16:55 ` Segher Boessenkool
2007-02-23 17:01 ` Yoder Stuart-B08248
2007-02-23 17:51 ` Segher Boessenkool
2007-02-22 22:48 ` David Gibson
2007-02-23 0:25 ` Segher Boessenkool
2007-02-24 6:30 ` Benjamin Herrenschmidt
2007-02-24 11:16 ` Segher Boessenkool
2007-02-22 7:19 ` Segher Boessenkool
2007-02-24 6:35 ` Benjamin Herrenschmidt
2007-02-24 11:11 ` Segher Boessenkool
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=20070226130837.GA32080@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=segher@kernel.crashing.org \
--cc=stuart.yoder@freescale.com \
/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.