linux/arch/microblaze/kernel
Michal Simek 7958a68919 microblaze: Fix intc_enable_or_unmask function
Intc_enable_or_unmask() is called at the last stage of handle_level_irq().

This function enables the irq first (Write INTC.SIE) and clear ISR next (Write INTC.IAR).
This would create problems that processor will get into a new interrupt as soon as SIE
is written because the previous level interrupt has been captured by INTC.

If the description bring some puzzles, here is the details of how interrupt is handled
for MicroBlaze after Interrupt signal is detected:
1. disable INTC (INTC.CIE = 1)
2. Acknowledge INTC (INTC.IAR = 1)
3. gets into interrupt source's handler, for example, timer's handler
4. Timer is interrupt handler acknowledge Timer Interrupt Status (Timer.TCSR0[23] = 1), and return
5. Enable INTC (INTC.SIE = 1)
6. Acknowledge INTC (INTC.IAR = 1)

INTC continue to capture source inputs even if INTC is disabled (INTC.IER == 1).
So between the gap of step 2 and step 3, the level interrupt from source makes INTC captures
a new interrupt and thus the INTC.ISR = 1 during step 3, 4, and 5.
When INTC is enabled in step 5, INTC's interrupt output will go high immediately.

In summary, the driver should issue step 6 before step 5.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2012-12-13 14:39:00 +01:00
..
cpu Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
asm-offsets.c microblaze: Remove "cache" optimized copy_page function 2010-05-06 11:21:58 +02:00
dma.c Microblaze: adapt for dma_map_ops changes 2012-03-28 16:36:38 +02:00
early_printk.c microblaze: Do not use tlb_skip in early_printk 2012-04-02 13:00:22 +02:00
entry-nommu.S microblaze: Remove passing the second arg to schedule_tail 2012-12-13 14:38:56 +01:00
entry.S microblaze: switch to generic fork/vfork/clone 2012-11-28 22:43:40 -05:00
exceptions.c microblaze: Raise SIGFPE/FPE_INTDIV for div by zero 2011-10-14 12:24:31 +02:00
ftrace.c microblaze: Fix ftrace 2011-04-01 09:34:51 +02:00
head.S microblaze: Fix bug with passing command line 2012-10-04 14:59:19 +02:00
heartbeat.c microblaze: Add support for little-endian Microblaze 2010-10-21 15:51:59 +10:00
hw_exception_handler.S microblaze: Remove additional andi which has been already done 2012-10-04 14:52:54 +02:00
intc.c microblaze: Fix intc_enable_or_unmask function 2012-12-13 14:39:00 +01:00
irq.c irq_domain/microblaze: Convert microblaze to use irq_domains 2012-02-16 06:11:24 -07:00
kgdb.c microblaze: KGDB little endian support 2010-10-21 15:51:58 +10:00
Makefile microblaze: Use generic init_task 2012-05-05 13:00:24 +02:00
mcount.S microblaze: ftrace: Pass the first calling instruction for dynamic ftrace 2012-05-25 06:34:35 +02:00
microblaze_ksyms.c mtd/uclinux: Use generic __bss_stop instead of _ebss 2012-06-27 09:59:43 +02:00
misc.S microblaze: Handle TLB skip size dynamically 2012-03-23 09:28:19 +01:00
module.c microblaze: Fix debug message in module 2012-01-05 08:34:27 +01:00
process.c microblaze: Remove BIP from childregs 2012-12-13 14:38:52 +01:00
prom.c Disintegrate asm/system.h for Microblaze 2012-03-28 18:30:02 +01:00
prom_parse.c of/pci: move of_irq_map_pci() into generic code 2011-02-04 11:46:50 -07:00
ptrace.c seccomp: ignore secure_computing return values 2012-04-18 12:24:50 +10:00
reset.c microblaze: Prefer to use pr_XXX instead of printk(KERN_XX) 2012-10-04 15:00:32 +02:00
selfmod.c microblaze_v8: Selfmodified code 2009-03-27 14:25:15 +01:00
setup.c microblaze: Prefer to use pr_XXX instead of printk(KERN_XX) 2012-10-04 15:00:32 +02:00
signal.c microblaze: rt_sigreturn is too trigger-happy about sigaltstack errors 2012-11-28 21:46:12 -05:00
stacktrace.c microblaze: Add stack unwinder 2010-08-04 10:22:35 +02:00
sys_microblaze.c microblaze: switch to generic fork/vfork/clone 2012-11-28 22:43:40 -05:00
syscall_table.S microblaze: switch to generic fork/vfork/clone 2012-11-28 22:43:40 -05:00
timer.c microblaze: Prefer to use pr_XXX instead of printk(KERN_XX) 2012-10-04 15:00:32 +02:00
traps.c Disintegrate asm/system.h for Microblaze 2012-03-28 18:30:02 +01:00
unwind.c microblaze: Add missing headers caused by disintegration asm/system.h 2012-03-30 12:11:46 +02:00
vmlinux.lds.S mtd/uclinux: Use generic __bss_stop instead of _ebss 2012-06-27 09:59:43 +02:00