linux/arch/parisc/kernel
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
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
asm-offsets.c [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason 2005-11-09 07:55:57 -08:00
binfmt_elf32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cache.c [PATCH] mm: parisc pte atomicity 2005-10-29 21:40:42 -07:00
drivers.c [PARISC] Convert parisc_device tree to use struct device klists 2005-10-21 22:33:38 -04:00
entry.S [PARISC] Remove the spurious do_softirq calls from entry.S 2005-10-21 22:54:38 -04:00
firmware.c [PARISC] Document history of PDC_NARROW as it is now obsolete 2005-10-21 22:51:40 -04:00
hardware.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
head.S [PARISC] Replace uses of __LP64__ with CONFIG_64BIT 2005-10-21 22:46:48 -04:00
hpmc.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
init_task.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
inventory.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ioctl32.c [PATCH] TIOC* compat ioctl handling 2005-10-30 17:37:17 -08:00
irq.c [PARISC] Disable nesting of interrupts 2005-11-17 16:26:20 -05:00
module.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pa7300lc.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pacache.S [PARISC] Explicitly specify sr4 when flushing kernel space 2005-10-21 22:56:14 -04:00
parisc_ksyms.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci-dma.c [PATCH] mm: init_mm without ptlock 2005-10-29 21:40:40 -07:00
pci.c [PARISC] More informative error message in pcibios_link_hba_resources 2005-10-21 22:50:33 -04:00
pdc_chassis.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pdc_cons.c [PARISC] Update pdc console from parisc tree 2005-10-21 22:50:06 -04:00
perf.c [PARISC] Convert parisc_device to use struct resource for hpa 2005-10-21 22:36:40 -04:00
perf_asm.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
perf_images.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
process.c [PATCH] sched: resched and cpu_idle rework 2005-11-09 07:56:33 -08:00
processor.c [PARISC] Convert parisc_device to use struct resource for hpa 2005-10-21 22:36:40 -04:00
ptrace.c [PATCH] consolidate sys_ptrace() 2005-11-07 07:53:42 -08:00
real2.S [PARISC] Properly specify section alignment for real2.S 2005-10-21 22:56:53 -04:00
semaphore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
signal.c [PARISC] Properly specify index field to I/D cache flush ops 2005-10-21 22:55:51 -04:00
signal32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
signal32.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
smp.c [PARISC] Make sure timer and IPI execute with interrupts disabled 2005-11-17 16:24:52 -05:00
sys32.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys_parisc.c [PATCH] consolidate sys_shmat 2005-05-01 08:59:12 -07:00
sys_parisc32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
syscall.S [PARISC] Replace uses of __LP64__ with CONFIG_64BIT 2005-10-21 22:46:48 -04:00
syscall_table.S [PARISC] Replace uses of __LP64__ with CONFIG_64BIT 2005-10-21 22:46:48 -04:00
time.c [PATCH] jiffies_64 cleanup 2005-10-30 17:37:25 -08:00
topology.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
traps.c [PARISC] Add printing of fpregs state to stack dump 2005-10-21 22:49:25 -04:00
unaligned.c [PARISC] Add ability for prctl to change unaligned trap behaviour 2005-10-21 22:43:15 -04:00
unwind.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vmlinux.lds.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00