From: Segher Boessenkool <segher@kernel.crashing.org>
To: David Gibson <david@gibson.dropbear.id.au>
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: Wed, 28 Feb 2007 02:00:42 +0100 [thread overview]
Message-ID: <293fa602618ce81ba7f80be15684aa4b@kernel.crashing.org> (raw)
In-Reply-To: <20070228004040.GC11775@localhost.localdomain>
>> It can't do a 100% job (of course; if it could it wouldn't
>> need a device tree at all since it would be omniscient), but
>> it still can do quite a reasonable job.
>
> Not in at least one common case: where all interrupt controllers are
> of the same type.
You'll get a lot of collisions in that case, easy to detect.
>> And this isn't the end of the story; the kernel won't say
>> "huh where's my IRQ" but it will try a few more options
>> first (at least on PCI, it can be true on other buses as
>> well in principle) and quite likely it will return some
>> bad number.
>
> Um.. examples? I can't think of any case except legacy ISA when we'd
> have either reason or method to go beyond the device tree information.
PCI isn't required to have a device tree at all, with the
flat tree.
>> And very likely ends up with a conflict on that second interrupt
>> since some other device uses it as well. Stuff will complain
>> at initialisation time still and all is fine.
>
> Only if the other driver is present and doesn't allow sharing.
If _either_ doesn't allow sharing, i.e., almost all of
the time.
>> That would be the programmer who programmed the device tree
>> (unless he doesn't test his work) so I can't see why he would
>> be baffled.
>
> Not necessarily. Maybe the error condition never happens in the
> device tree programmer's network environment. The driver seems to
> work just fine for him.
Which just means he didn't do a proper job of testing.
> What? It's perfectly possible to share level triggered interrupts.
> PCI devices do it all the time.
Erm yeah I goofed, sorry :-)
>> Yeah, funky interrupt problems are a bitch to resolve,
>> aren't they. But the interrupt can't be shared so this
>> case cannot happen either.
>
> Again, yes they can be.
SoC interrupts shared? Not very likely...
Sure in principle anything can happen.
>> Now back to the meat of the matter:
>>
>> Whenever you're writing a device tree, after every small
>> change to the tree you should check it for validity (by
>> hand or some checking tool), and see if it works on all
>> kernel versions you claim to support too (not quite the
>> same thing, heh). If things go wrong you know what change
>> caused it.
>
> Ah, yes, every change should be tested in every configuration. Lovely
> idea, never going to happen.
One device tree == one configuration. Static
device trees are easy, heh.
>> And, lastly, the most important point that you conveniently
>> snipped off on your reply:
>>
>>>> Anyway, it's all a question of deployment: you just
>>>> have to make sure your users use a new enough kernel
>>>> with your device tree (and device), which you have
>>>> to do *anyway*. Also DTS files are still conveniently
>>>> shipped with the kernel so it's even less of a problem.
>>
>> If you care about compatibility to random kernel versions
>> instead, you'd better not do surgery on the interrupt
>> mapping binding at all but just put an extra interrupt
>> nexus in your device tree.
It's still sitting here...
We can have a pointless fight over how hard to debug
certain device tree bugs are, but that's not really
important is it.
Segher
next prev parent reply other threads:[~2007-02-28 1:01 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
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 [this message]
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=293fa602618ce81ba7f80be15684aa4b@kernel.crashing.org \
--to=segher@kernel.crashing.org \
--cc=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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 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).