What is the correct way to indicate an unassigned PCI resource ?
Benjamin Herrenschmidt
benh at kernel.crashing.org
Tue Dec 5 15:41:19 EST 2006
On Mon, 2006-12-04 at 14:22 +0000, Alan wrote:
> The discussion I was having was about sl82cxx and handling unassigned
> resources. The zero address isn't relevant to that.
Well, actually, it's unclear to me wether the resource is unassigned or
has been assigned to 0 :-) And in the later case, why claim'ing it
fails.
Olaf, can you give me a dump of /proc/ioports ? What is sitting at 0 on
that PCI bus ?
I have the "gut" feeling that the firmware didn't assign it, but it does
explicitely has an assigned-address property for it with value "0" and a
valid size & set of flags... so it looks like maybe it -really- did
assign it to 0. Either that or it's buggy.
In any case, if we have to do a fixup here, it would be a pSeries
specific fixup and thus would have to sit in a PCI quirk in the pSeries
platform code.
> > You should know that the IRQ assumption is *not* true even for x86 since
> > IRQ0 is and has always been a perfectly valid IRQ (used by PIT).
>
> Please see previous million recyclings of that discussion and Linus
> answer.
Besides, it does make thing easier in the kernel to consider IRQ 0 as
invalid. That's one of the reasons for which I generalized the IRQ
remapping layer in arch/powerpc. Among others, 0 is always invalid and
1...15 are always only ever assigned to a legacy 8259 if any, anything
else gets remapped.
> libata makes a similar assumption in ata_resources_present() as someone
> (GregKH ???) needs to define what the proper way to encode "resource not
> allocated" into the PCI resources should be. If someone on the PCI list
> (cc'd) or Greg can give a definitive answer then we can go fix the
> offenders now.
There is an UNSET flag isn't there ? Though nobody uses it ...
Ben.
More information about the Linuxppc-dev
mailing list