Understanding interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can someone explain when an interrupt is masked and when not.

I am trying to understand if there any subtle race conditions in ide-cd, 
because I have problems with my cd writer, and I have tracked it down to what 
looks like the hardware doing something strange (busy gets cleared, but then 
drq gets set after this point).  However, the strangeness could possibly be 
explained away if in certain circumstances the Interrupt handling was 
re-entered.

When an interrupt occurs, it appears that the code does a lot of things in 
ide_intr, including several spin_lock_irqsave and spin_unlock_irqrestore 
pairs before calling local_irq_enable.

Is it possible (but maybe unlikely) that if the hardware had the irq asserted 
at the point of local_irq_enable that it could re-interrupt?  Can it do it 
before then? If not, what do these spin_lock_irqsave and 
spin_unlock_irqrestore pairs prevent happening if the interrupt is disabled - 
is it just the smp case?

I found some text that described how interrupts where handled initially (via 
irq_action tables), but have been unable to find anything that explains whats 
happening inside the interrupt handling routine.
-- 
Alan Chandler
alan@xxxxxxxxxxxxxxxxxxxxx
First they ignore you, then they laugh at you,
 then they fight you, then you win. --Gandhi

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux