Thread (26 messages) 26 messages, 4 authors, 2006-12-15

Re: [PATCH 6/9] MPIC MSI allocator

From: Michael Ellerman <hidden>
Date: 2006-12-14 00:59:00

On Thu, 2006-12-14 at 11:32 +1100, Benjamin Herrenschmidt wrote:
quoted
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help