linux/arch/arm/mach-mvebu
Gregory CLEMENT 600468d068 arm: mvebu: Fix the irq map function in SMP mode
This patch fix the regression introduced by the commit 3202bf0157
"arm: mvebu: Improve the SMP support of the interrupt controller":
GPIO IRQ were no longer delivered to the CPUs.

To be delivered to a CPU an interrupt must be enabled at CPU level and
at interrupt source level. Before the offending patch, all the
interrupts were enabled at source level during map() function. Mask()
and unmask() was done by handling the per-CPU part. It was fine when
running in UP with only one CPU.

The offending patch added support for SMP, in this case mask() and
unmask() was done by handling the interrupt source level part. The
per-CPU level part was handled by the affinity API to select the CPU
which will receive the interrupt. (Due to some hardware limitation
only one CPU at a time can received a given interrupt).

For "normal" interrupt __setup_irq() was called when an irq was
registered. irq_set_affinity() is called from this function, which
enabled the interrupt on one of the CPUs. Whereas for GPIO IRQ which
were chained interrupts, the irq_set_affinity() was never called and
none of the CPUs was selected to receive the interrupt.

With this patch all the interrupt are enable on the current CPU during
map() function. Enabling the interrupts on a CPU doesn't depend
anymore on irq_set_affinity() and then the chained irq are not anymore
a special case. However the CPU which will receive the irq can still
be modify later using irq_set_affinity().

Tested with Mirabox (A370) and Openblocks AX3 (AXP), rootfs mounted
over NFS, compiled with CONFIG_SMP=y/N.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Reported-by: Ryan Press <ryan@presslab.us>
Investigated-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Ryan Press <ryan@presslab.us>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-04-10 16:59:14 +00:00
..
include/mach Merge branch 'kirkwood/drivers' of git://git.infradead.org/users/jcooper/linux into late/kirkwood 2012-09-22 14:23:11 -07:00
addr-map.c Merge branch 'mvebu-misc-fixes' of git://github.com/MISL-EBU-System-SW/mainline-public into mvebu/everything 2012-11-24 04:08:49 +00:00
armada-370-xp.c ARM: delete struct sys_timer 2012-12-24 09:36:38 -07:00
armada-370-xp.h arm: mvebu: Add IPI support via doorbells 2012-11-21 16:49:37 +01:00
coherency.c arm: mvebu: Add hardware I/O Coherency support 2012-11-21 17:07:49 +01:00
coherency.h arm: mvebu: Add support for coherency fabric in mach-mvebu 2012-11-21 16:49:06 +01:00
coherency_ll.S arm: mvebu: Add support for coherency fabric in mach-mvebu 2012-11-21 16:49:06 +01:00
common.h arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
headsmp.S arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
hotplug.c arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
irq-armada-370-xp.c arm: mvebu: Fix the irq map function in SMP mode 2013-04-10 16:59:14 +00:00
Kconfig arm: mvebu: add L2 cache support 2012-11-27 15:35:05 +00:00
Makefile ARM: mvebu: allow selecting mvebu without Armada XP 2013-02-14 15:04:39 +01:00
platsmp.c arm: mvebu: Add SMP support for Armada XP 2012-11-21 16:49:38 +01:00
pmsu.c arm: mvebu: Add initial support for power managmement service unit 2012-11-21 16:49:36 +01:00
pmsu.h arm: mvebu: Add initial support for power managmement service unit 2012-11-21 16:49:36 +01:00
system-controller.c arm: mach-mvebu: add source files 2012-07-10 15:47:48 +02:00