whether the "poll_spurious_irq_timer" will be deleted from function "poll_spurious_irqs".

Issues related to applications and software problems
Post Reply
uniview
Posts: 6
Joined: 2018/12/04 08:16:01

whether the "poll_spurious_irq_timer" will be deleted from function "poll_spurious_irqs".

Post by uniview » 2018/12/21 01:35:53

Hi,
When unhandled irqs reached to 99900, will disable invalid irq. Besides, the poll_spurious_irq_timer will go into effect,
in timer interrupt function "poll_spurious_irqs", the function will execute after timer timeout.But, in my test process,
the disabled irq will be processed every timer timeout for ever. whether the "poll_spurious_irq_timer" will be removed from
function "poll_spurious_irqs".

kernel: 4.16.7 file:kernel\irq\spurious.c

void note_interrupt()
{
......
if (unlikely(desc->irqs_unhandled > 99900)){
/*
* The interrupt is stuck
*/
__report_bad_irq(desc, action_ret);
/*
* Now kill the IRQ
*/
printk(KERN_EMERG "Disabling IRQ #%d\n", irq);
desc->istate |= IRQS_SPURIOUS_DISABLED;
desc->depth++;
irq_disable(desc);

mod_timer(&poll_spurious_irq_timer,
jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
}
desc->irqs_unhandled = 0;
}


static void poll_spurious_irqs(struct timer_list *unused)
{
struct irq_desc *desc;
int i;

if (atomic_inc_return(&irq_poll_active) != 1)
goto out;
irq_poll_cpu = smp_processor_id();

for_each_irq_desc(i, desc) {
unsigned int state;
unsigned int irq = desc->irq_data.irq; //gyq

if (!i)
continue;

/* Racy but it doesn't matter */
state = desc->istate;
barrier();
if (!(state & IRQS_SPURIOUS_DISABLED))
continue;

local_irq_disable();
try_one_irq(desc, true);
local_irq_enable();
}
out:
atomic_dec(&irq_poll_active);
mod_timer(&poll_spurious_irq_timer,
jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
}

Post Reply