[RFC/PATCH 0/7] Powerpc MSI Implementation

Michael Ellerman michael at ellerman.id.au
Mon Nov 13 17:05:31 EST 2006


On Thu, 2006-11-09 at 08:36 +0100, Segher Boessenkool wrote:
> > Looking closer most of them are 5 bits, the high 5 bits, and happen to
> > sit next to reserved fields (which must be zero), so reading the byte
> > should work in practice. But for a few of them you'll get cruft in the
> > low bits.
> >
> > I don't know what they were thinking when they decided to have 3 and 5
> > bit capability fields, and then specify some of them as being a byte
> > wide as well. Perhaps the spec committee had a big night out ;)
> >
> > I was going to write a generic version of pci_find_ht_capability() (as
> > suggested by Segher), so along with that I'll clean up the #defines to
> > just be the 3 or 5 bit capability codes, and then have a shift for
> > getting the capability out of the byte.
> >
> > Users will still need to know if they're looking for a 3 or 5 bit
> > capability, but we can encapsulate that in pci_find_ht_capability()  
> > and
> > hopefully most people won't have to see the difference.
> 
> Keep the defines the full 8 bits and put all the knowledge
> about which bits are relevant into pci_find_ht_capability()?
> If you do shifting you can get clashes (say, 0b00110 vs. 0b110),
> and this would make for simpler code, too.

That's what I did .. I think? :)

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20061113/aba30553/attachment.pgp>


More information about the Linuxppc-dev mailing list