[lkml]   [1997]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: why do we mask IRQs on x86?
  Date: 	Wed, 23 Apr 1997 11:08:42 +0200 (MET DST)
From: Ingo Molnar <>

our current scheme for handling IRQs is the following:


Is there any reason why we dont do the following: [changes marked with (*)]

1- IRQ x is raised
2- we go into the irq.h handler part, all irqs are masked off (cli mode)
(*) 3- we do NOT mask IRQ x in the 8259A, instead we increase a per-IRQ
counter which says 'serving this IRQ'.
4- we ack the pending IRQ in the 8259A PIC
(*) 4b- If the IRQ count for IRQ x is not 1, we simply return via iret.
5- we call do_IRQ() {or do_fast_IRQ()}
6- the handler installed via request_irq() is called

I believe this will result in a hard lockup for slow PCI level-sensitive
interrupts, or for any interrupt that does an sti() before clearing the
interrupt pending flag on the device. If we do not mask the IRQ, then we
cannot allow interrupts to be enabled again until we're sure the device is no
longer asserting one. I learned about this the hard way when I acquired my
first level-sensitive PCI device...


 \ /
  Last update: 2005-03-22 13:39    [W:0.022 / U:16.260 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site