linux/arch
David Howells d6478fad43 MN10300: Fix IRQ handling
Fix the IRQ handling on the MN10300 arch.

This patch makes a number of significant changes:

 (1) It separates the irq_chip definition for edge-triggered interrupts from
     the one for level-triggered interrupts.

     This is necessary because the MN10300 PIC latches the IRQ channel's
     interrupt request bit (GxICR_REQUEST), even after the device has ceased to
     assert its interrupt line and the interrupt channel has been disabled in
     the PIC.  So for level-triggered interrupts we need to clear this bit when
     we re-enable - which is achieved by setting GxICR_DETECT but not
     GxICR_REQUEST when writing to the register.

     Not doing this results in spurious interrupts occurring because calling
     mask_ack() at the start of handle_level_irq() is insufficient - it fails
     to clear the REQUEST latch because the device that caused the interrupt is
     still asserting its interrupt line at this point.

 (2) IRQ disablement [irq_chip::disable_irq()] shouldn't clear the interrupt
     request flag for edge-triggered interrupts lest it lose an interrupt.

 (3) IRQ unmasking [irq_chip::unmask_irq()] also shouldn't clear the interrupt
     request flag for edge-triggered interrupts lest it lose an interrupt.

 (4) The end() operation is now left to the default (no-operation) as
     __do_IRQ() is compiled out.  This may affect misrouted_irq(), but
     according to Thomas Gleixner it's the correct thing to do.

 (5) handle_level_irq() is used for edge-triggered interrupts rather than
     handle_edge_irq() as the MN10300 PIC latches interrupt events even on
     masked IRQ channels, thus rendering IRQ_PENDING unnecessary.  It is
     sufficient to call mask_ack() at the start and unmask() at the end.

 (6) For level-triggered interrupts, ack() is now NULL as it's not used, and
     there is no effective ACK function on the PIC.  mask_ack() is now the
     same as mask() as the latch continues to latch, even when the channel is
     masked.

Further, the patch discards the disable() op implementation as its now the same
as the mask() op implementation, which is used instead.

It also discards the enable() op implementations as they're now the same as
the unmask() op implementations, which are used instead.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-01 09:40:43 -07:00
..
alpha [PATCH] fix osf_getdirents() 2008-08-25 01:18:06 -04:00
arm Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb 2008-09-29 08:30:11 -07:00
avr32 avr32: nmi_enter() without nmi_exit() 2008-09-19 20:08:08 +02:00
blackfin Blackfin arch: Fix PM building on BF52x: No ROTWE on BF52x, add USBWE 2008-08-28 17:32:01 +08:00
cris removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
frv FRV: Wire up new system calls 2008-08-01 13:03:49 -07:00
h8300 [h8300] move include/asm-h8300 to arch/h8300/include/asm 2008-08-13 14:26:32 -07:00
ia64 [IA64] Put the space for cpu0 per-cpu area into .data section 2008-09-29 16:39:19 -07:00
m32r m32r/kernel/: cleanups 2008-09-27 18:27:21 +09:00
m68k m68k: Update defconfigs for 2.6.27-rc6 2008-09-10 14:15:29 -07:00
m68knommu m68k{,nommu}: Wire up new system calls 2008-08-11 10:37:34 -07:00
mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2008-09-29 08:31:52 -07:00
mn10300 MN10300: Fix IRQ handling 2008-10-01 09:40:43 -07:00
parisc lib: Correct printk %pF to work on all architectures 2008-09-09 11:51:15 -07:00
powerpc Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2008-09-30 08:40:46 -07:00
s390 [S390] CVE-2008-1514: prevent ptrace padding area read/write in 31-bit mode 2008-09-09 12:39:06 +02:00
sh sh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y. 2008-09-05 14:51:28 +09:00
sparc sparc: Fix user_regset 'n' field values. 2008-09-12 15:55:44 -07:00
sparc64 sparc64: Fix missing devices due to PCI bridge test in of_create_pci_dev(). 2008-09-22 15:51:54 -07:00
um uml: fix tty-related build error 2008-07-30 09:41:45 -07:00
x86 x86: Fix broken LDT access in VMI 2008-09-30 11:16:34 -07:00
xtensa remove unneeded #include <linux/ide.h>'s 2008-08-05 18:17:00 +02:00
.gitignore
Kconfig