lkml.org 
[lkml]   [2011]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 3/9] irq: convert generic-chip to use irq_domain
On Thu, Dec 15, 2011 at 6:56 AM, Rob Herring <robherring2@gmail.com> wrote:
> Shawn,
>
> On 12/15/2011 07:39 AM, Rob Herring wrote:
>> On 12/14/2011 11:55 PM, Shawn Guo wrote:
>>> On Thu, Dec 15, 2011 at 01:25:20PM +0800, Shawn Guo wrote:
>>>> On Wed, Dec 14, 2011 at 09:28:52AM -0600, Rob Herring wrote:
>>>>> From: Rob Herring <rob.herring@calxeda.com>
>>>>>
>>>>> Add irq domain support to irq generic-chip. This enables users of
>>>>> generic-chip to support dynamic irq assignment needed for DT interrupt
>>>>> binding. Users must be converted to use irq_data.hwirq for determining
>>>>> local interrupt numbers rather than using the Linux irq number.
>>>>>
>>>>> irq_base is kept for now as there are a few users of it. Once they
>>>>> are converted to use the irq domain, it can be removed.
>>>>>
>>>>> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
>>>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>>>> ---
>>>>
>>>> Tested-by: Shawn Guo <shawn.guo@linaro.org>
>>>>
>>> Sorry, I have to take that tag back after I correct my test setup.
>>> It does not work for imx5 TZIC case, because the following change
>>> I suggested before is missed.
>>>
>>> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
>>> index eb763f7..2a2aac1 100644
>>> --- a/kernel/irq/irqdomain.c
>>> +++ b/kernel/irq/irqdomain.c
>>> @@ -39,7 +39,7 @@ void irq_domain_add(struct irq_domain *domain)
>>>                         return;
>>>                 }
>>>                 d->domain = domain;
>>> -               d->hwirq = hwirq;
>>> +               d->hwirq = hwirq - domain->hwirq_base;
>>
>> This is a problem. It entirely defeats the point of hwirq_base and it
>> would break the GIC. We need to fix this in the generic irq chip.
>>
>
> I think I found a fix. Can you try 's/d->hwirq/(d->hwirq % 32)/' in
> generic-chip.c.

Ugh, but that hard codes an assumption that a domain cannot have more
that 32 irqs.

/me goes to dig into irq_domain code...

g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-12-15 16:59    [W:0.055 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site