Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Recently I came across a note in an online post that states the following:

In modern kernels, most of the differences between fast and slow interrupts have disappeared. There remains only one: fast interrupts (those that were requested with the SA_INTERRUPT flag) are executed with all other interrupts disabled on the current processor. Note that other processors can still handle interrupts, although you will never see two processors handling the same IRQ at the same time.

In other online documentation I've found statements that suggest that while handling any given interrupt, at least in the top-half handler, all other interrupts are disabled. This seems at odds with the quotation above. I'm most interested in the context of single CPU arm systems. Can someone enlighten me as to which of these views is correct?

Likewise, help in understanding the difference between "masking" and "disabling" interrupts in linux would be helpful. From my research it seems that masking is done in the interrupt controller (PIC) whereas disabling can be done by the CPU. Further adding to my confusion is the fact that the linux functions disable_irq(), disable_irq_nosync() and enable_irq() seem to be related to masking rather than "disabling". Is this correct?

Finally, I've found comments online stating that masking can NOT be done within a top-half interrupt handler (which makes some sense to me). However, if this is the case, wouldn't it imply that the above-referenced function calls are not suitable for use in top-half handlers?

share|improve this question

closed as off topic by Gilles, Renan, Michael Mrozek Dec 1 '12 at 1:15

Questions on Unix & Linux Stack Exchange are expected to relate to Unix or Linux within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

You might have better luck asking this at Stack Overflow (flag if you want to migrate it). –  Renan Nov 30 '12 at 21:36
@Renan, why? And why the two "Close as off-topic"? That is not a programming question, but a question on the Linux internals. Why would stack-overflow be more appropriate? (that's a genuine question as I'm quite new here, it's not the first time I see very interesting question being closed, so I'm wondering if I'm missing something here). –  Stéphane Chazelas Nov 30 '12 at 22:57
@StephaneChazelas The argument is that this is stuff only programmers would know, not your average Linux user. On the other hand, your average SO user isn't going to know it either, so I'm not sure that's a particularly good argument –  Michael Mrozek Nov 30 '12 at 23:55
Renan- I tried using the "flag" function but wasn't able to find a commit button. So, if you are able to forward the question to stackoverflow on my behalf, that would be appreciated. - Best - Jim –  Jim Luby Nov 30 '12 at 23:57
Renan - Actually, I'll just copy and past this note to StackOverflow. - Thanks - Jim –  Jim Luby Nov 30 '12 at 23:59