kernel-ark/arch/mn10300/kernel
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
..
asm-offsets.c mn10300: use kbuild.h instead of defining macros in asm-offsets.c 2008-04-29 08:06:30 -07:00
entry.S MN10300: Wire up new system calls 2008-08-01 13:03:48 -07:00
fpu-low.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
fpu.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
gdb-cache.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
gdb-io-serial-low.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
gdb-io-serial.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
gdb-io-ttysm-low.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
gdb-io-ttysm.c MN10300: Introduce barriers to replace removed volatiles in gdbstub 2008-02-19 15:51:36 -08:00
gdb-low.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
gdb-stub.c mn10300: use the common ascii hex helpers 2008-07-26 12:00:05 -07:00
head.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
init_task.c [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
internal.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
io.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
irq.c MN10300: Fix IRQ handling 2008-10-01 09:40:43 -07:00
kernel_execve.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
kprobes.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
kthread.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
Makefile Generic semaphore implementation 2008-04-17 10:42:34 -04:00
mn10300_ksyms.c mn10300: provide __ucmpdi2() for MN10300 2008-07-04 10:40:07 -07:00
mn10300-debug.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
mn10300-serial-low.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
mn10300-serial.c removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
mn10300-serial.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
mn10300-watchdog-low.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
mn10300-watchdog.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
module.c mn10300: Fix up __bug_table handling in module loader. 2008-08-04 17:22:17 -07:00
process.c mn10300: export certain arch symbols required to build allmodconfig 2008-07-04 10:40:07 -07:00
profile-low.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
profile.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
ptrace.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
rtc.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
setup.c MN10300: Kill linux/a.out.h inclusions 2008-06-16 10:20:57 -07:00
sigframe.h mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
signal.c mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
switch_to.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00
sys_mn10300.c unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
time.c MN10300: Make sched_clock() report time since boot 2008-09-24 16:38:17 -07:00
traps.c MN10300: Make the kernel jump into gdbstub on a BUG 2008-02-19 15:51:36 -08:00
vmlinux.lds.S mn10300: add the MN10300/AM33 architecture to the kernel 2008-02-08 09:22:30 -08:00