[PATCH 6/9] MPIC MSI allocator

Michael Ellerman michael at ellerman.id.au
Thu Dec 14 11:59:00 EST 2006


On Thu, 2006-12-14 at 11:32 +1100, Benjamin Herrenschmidt wrote:
> > So make the platform register the range of (possibly) usable MSI
> > addresses instead of adding a nasty hack like that to the mpic driver.
> 
> The hack is not that nasty... it's only ever run on U3/U4 on which it's
> actually correct, at least if Michael did what I told him to do which is
> to test the MPIC_BROKEN_U3 bit :-)

Nah I didn't make it U3/U4 specific, although I could. If we do that,
then I think the logic needs to be:

if get_property("msi_available")
	mpic_msi_reserve_dt_irqs()
elif is_u3_or_u4()
	mpic_msi_reserve_u3u4_irqs()
else
	return error

Because if we don't have a firmware property, and we don't make an
educated guess at what's reserved, then there's a very good chance our
first MSI will get hwirq 0 and that it won't work.

As far as putting hacks in the MPIC driver .. have you read it
lately? ;)  But seriously, I think if there's anyway these magic numbers
should be, it is in this code, not the platform code.
  
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/20061214/7639d7fc/attachment.pgp>


More information about the Linuxppc-dev mailing list