[問題] 處理hardirq中,是否可被其他hardirq中斷?
各位好,
想請問處理硬體中斷(ARM架構) do_asm_irq-->到開始執行softirq前,
是否有可能被其他的hardware interrupt中斷?
就我trace 研究2.6.31的kernel, do_asm_irq() call flow直到
會直到irq_exit如果有invoke_softirq() 才會啟動local cpu的interrupt
呼叫local_irq_enable(). 所以答案應該是hardirq不會被"硬體中斷"中斷.
請教,我的結論是否正確?
感謝
thanks :)
asmlinkage void __do_softirq(void)
{
struct softirq_action *h;
__u32 pending;
int max_restart = MAX_SOFTIRQ_RESTART;
int cpu;
pending = local_softirq_pending();
account_system_vtime(current);
__local_bh_disable((unsigned long)__builtin_return_address(0),
SOFTIRQ_OFFSET);
lockdep_softirq_enter();
cpu = smp_processor_id();
restart:
/* Reset the pending bitmask before enabling irqs */
set_softirq_pending(0);
local_irq_enable(); //<<-------------------------------
h = softirq_vec;
do {
if (pending & 1) {
unsigned int vec_nr = h - softirq_vec;
int prev_count = preempt_count();
kstat_incr_softirqs_this_cpu(vec_nr);
trace_softirq_entry(vec_nr);
h->action(h);
trace_softirq_exit(vec_nr);
if (unlikely(prev_count != preempt_count())) {
printk(KERN_ERR "huh, entered softirq %u %s %p"
"with preempt_count %08x,"
" exited with %08x?\n", vec_nr,
softirq_to_name[vec_nr], h->action,
prev_count, preempt_count());
preempt_count() = prev_count;
}
rcu_bh_qs(cpu);
}
h++;
pending >>= 1;
} while (pending);
local_irq_disable();
pending = local_softirq_pending();
if (pending && --max_restart)
goto restart;
if (pending)
wakeup_softirqd();
lockdep_softirq_exit();
account_system_vtime(current);
__local_bh_enable(SOFTIRQ_OFFSET);
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.63.100.2