Subject: Re: [PATCH 6/9] MPIC MSI allocator

From: Olof Johansson <[email-masked]>
Date: Wed, 13 Dec 2006 19:06:59 -0600

On Thu, 14 Dec 2006 11:59:00 +1100 Michael Ellerman <[email-masked]> wrote:

> 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.

Looks like a good solution to me.

> 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.

It used to be fairly OK, but the TSI merge really pushed it over the
edge, obfuscation-wise. :(

But that's no excuse to make it worse than it has to be.

-Olof