kernel-aes67/arch/parisc
Grant Grundler 3f902886a8 [PARISC] Disable nesting of interrupts
Disable nesting of interrupts - still has holes

The offending sequence starts out like this:
1) take external interrupt
2) set_eiem() to only allow TIMER_IRQ; local interrupts still disabled
3) read the EIRR to get a "list" of pending interrupts
4) clear EIRR of pending interrupts we intend to handle
5) call __do_IRQ() to handle IRQ.
6) handle_IRQ_event() enables local interrupts (I-Bit)
7) take a timer interrupt
8) read EIRR to get a new list of pending interrupts
9) clear EIRR of pending interrupts we just read
10) handle pending interrupts found in (8)
11) set_eiem(cpu_eiem) and return
        [ TROUBLE! all enabled CPU IRQs are unmasked. }
12) handle remaining interrupts pending from (3)
        e.g. call __do_IRQ() -> handle_IRQ_event()..etc
        [ TROUBLE! call to handle_IRQ_event() can now enable *any* IRQ. }
13) set_eiem(cpu_eiem) and return

The problem is we now get into ugly race conditions with Timer and IPI
interrupts at this point.  I'm not exactly sure what happens when
things go wrong (perhaps nest calls to IPI or timer interrupt?).
But I'm certain it's not good.

This sequence will break sooner if (10) would accidentally leave
interrupts enabled.

I'm pretty sure the right answer is now to make cpu_eiem
a per CPU variable since all external interrupts on parisc
are per CPU. This means we will NOT need to send an IPI to
every CPU in the system when enabling or disabling an IRQ
since only one CPU needs to change it's EIEM.

Thanks to James Bottomley for (once again) pointing out the problem.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:26:20 -05:00
..
configs [PARISC] defconfig updates 2005-10-21 23:11:03 -04:00
hpux kbuild: m68k,parisc,ppc,ppc64,s390,xtensa use generic asm-offsets.h support 2005-09-09 20:57:26 +02:00
kernel [PARISC] Disable nesting of interrupts 2005-11-17 16:26:20 -05:00
lib [PARISC] Specify level to fix binutils level promotion bug 2005-10-21 22:56:35 -04:00
math-emu
mm [PATCH] memory hotplug locking: node_size_lock 2005-10-29 21:40:44 -07:00
oprofile
defconfig [PARISC] defconfig updates 2005-10-21 23:11:03 -04:00
defpalo.conf
install.sh
Kconfig [PARISC] Update Kconfig for itimer selection 2005-10-21 22:52:46 -04:00
Kconfig.debug
Makefile [PARISC] Update minimum compiler version and CROSS_COMPILE for parisc64 2005-10-21 22:52:00 -04:00
nm