[PATCH 5/5] microblaze: Introduce IRQ_SW_OFFSET to help with sw IRQ

Michal Simek monstr at monstr.eu
Sat Dec 10 21:41:42 EST 2011


Rob Herring wrote:
> On 12/09/2011 05:45 AM, Michal Simek wrote:
>> If you setup IRQ_OFFSET > nr_irq you completely separate hardware
>> and software IRQs which help you with debugging.
>>
>> For example:
>> IRQ_SW_OFFSET = 32
>>
>>         DTS   HW(line)   LINUX
>> timer - 2     3          35
>> sysace  4     5          37
>> serial  5     6          38
>>
>> HW line is setup DTS + NO_IRQ_OFFSET to ensure that NO_IRQ is always 0.
>>
> 
> This is really confusing. DTS is the HW numbering. The last 2 columns
> are both Linux IRQ numbering. Just create a single define for an offset.
> Then I would combine this into the previous patch.
> 

DTS generator, which we used for DTS generator for more than 2 years,
generates for the first IRQ in the system this property "interrupts = < 0 2 >;"
Which is HW line 1 and linux irq_data->hwirq 0 (because of shift) and irq_data->irq = 1
for SW_OFFSET=0.

Anyway no problem to keep just NO_IRQ_OFFSET value.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian


More information about the devicetree-discuss mailing list