Skip to contentSkip to conversation

virtual irq isssue - regmap_irq

DISCUSSION Ashish Jangam 2 participants 4 messages Mar 7, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

In regmap_irq if irq_base is unknown then regmap creates virq starting from 0 and it seems that in kernel 3.8 virq 0 usage is not permitted, since during irq registration kernel throws a message "error: irq_desc already associated".

I'm not sure if this requires fix in regmap_irq or kernel, can you please comment on this?

Thanks,
Ashish

#1 lore raw
Quoted 6 lines · Ashish Jangam

In regmap_irq if irq_base is unknown then regmap creates virq starting from 0 and it seems that in kernel 3.8 virq 0 usage is not permitted, since during irq registration kernel throws a message "error: irq_desc already associated".

I'm not sure if this requires fix in regmap_irq or kernel, can you please comment on this?

This is a bug in your platform which will affect anything using a linear domain. The platform isn't setting up its interrupts correctly so that the core knows that those interrupts are reserved, ideally the platform would just use domains for everything but at least irq_alloc_decs() needs to know what is going on.

#2 lore raw
Quoted 6 lines · Mark Brown
Quoted 3 lines · Ashish Jangam

In regmap_irq if irq_base is unknown then regmap creates virq starting from 0 and it seems that in kernel 3.8 virq 0 usage is not permitted, since during irq registration kernel throws a message "error: irq_desc already associated".

Quoted 8 lines
Quoted 2 lines

I'm not sure if this requires fix in regmap_irq or kernel, can you please comment on this?

This is a bug in your platform which will affect anything using a linear domain. The platform isn't setting up its interrupts correctly so that the core knows that those interrupts are reserved, ideally the platform would just use domains for everything but at least irq_alloc_decs() needs to know what is going on.

Thanks I got this, however in this case should regmap handle such condition where domain is unknown?
By the way, I was testing on smdkv6410 where Dialog device is not a component of the board.

#3 lore raw
Quoted 10 lines · Ashish Jangam
Quoted 5 lines · Mark Brown

This is a bug in your platform which will affect anything using a linear domain. The platform isn't setting up its interrupts correctly so that the core knows that those interrupts are reserved, ideally the platform would just use domains for everything but at least irq_alloc_decs() needs to know what is going on.

Thanks I got this, however in this case should regmap handle such condition where domain is unknown?

There is no "condition" or unknown domain for regmap to handle. regmap asked its irqdomain for an interrupt number and was given one, it's got no way of validating what it gets back and we don't want to end up having workaround code all over the kernel for broken platforms.

Quoted 2 lines

By the way, I was testing on smdkv6410 where Dialog device is not a component of the board.

The board is broken anyway; fix the board.