Hi,
Based on suggestion from Thomas Petazzoni, I'm moving this to LKML.
This is regarding the following code in kernel/irq/handle.c. Consider
the case of a shared IRQ line, where two handlers are registered such
that first handler does not specify IRQF_DISABLED, but the second one
does. But it seems both the handlers will be called with IRQs ENABLED
(which is certainly not what the second handler expects).
I also checked but could not find anything that stops me from
registering two shared ISRs - one with IRQF_DISABLED & another without
this flag. Am I missing something here?
irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
{
irqreturn_t ret, retval = IRQ_NONE;
unsigned int status = 0;
handle_dynamic_tick(action);
if (!(action->flags & IRQF_DISABLED))
local_irq_enable_in_hardirq();
do {
ret = action->handler(irq, action->dev_id);
if (ret == IRQ_HANDLED)
status |= action->flags;
retval |= ret;
action = action->next;
} while (action);
if (status & IRQF_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
local_irq_disable();
return retval;
}
I'd like to submit a patch but was wondering which of the following is
the correct startegy to deal with above situation (I personally think
(1) below is more appropriate):
1) IN the above code while calling shared ISRs, check for each ISR
whether it specified IRQF_DISABLED or not. Enable IRQs only for ISR
that did not specify IRQF_DISABLED.
2) While installing ISR, check that all the ISRs for that IRQ should
have consistent use of IRQF_DISABLED. Don't allow insonsistent use of
IRQF_DISABLED on a shared IRQ.
Thanks,
Rajat
--
| Greg Kroah-Hartman | [PATCH 012/196] nozomi driver |
| Ingo Molnar | Re: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 |
| Rafael J. Wysocki | [PATCH -mm 5/6] Freezer: Remove PF_NOFREEZE from bluetooth threads |
| Ingo Molnar | Re: [PATCH 00/23] per device dirty throttling -v8 |
git: | |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Natalie Protasevich | [BUG] New Kernel Bugs |
