linux/arch/microblaze
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
..
boot microblaze: use new common dtc rule 2012-12-03 17:17:50 -06:00
configs kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
include microblaze: Do not initialized regs->r1 twice in ELF_PLAT_INIT 2012-12-13 14:38:58 +01:00
kernel microblaze: Fix intc_enable_or_unmask function 2012-12-13 14:39:00 +01:00
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2012-03-30 12:10:03 +02:00
mm readahead: fault retry breaks mmap file read random detection 2012-10-09 16:22:47 +09:00
oprofile microblaze: Core oprofile configs and hooks 2009-12-14 08:45:07 +01:00
pci microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs 2012-11-28 12:50:21 -08:00
platform Fix common misspellings 2011-03-31 11:26:23 -03:00
Kconfig microblaze: switch to generic fork/vfork/clone 2012-11-28 22:43:40 -05:00
Kconfig.debug microblaze: remove obsolete DEBUG_BOOTMEM 2011-01-10 09:29:51 +01:00
Makefile microblaze: use new common dtc rule 2012-12-03 17:17:50 -06:00