aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2015-01-27 16:38:39 +0000
committerDaniel Thompson <daniel.thompson@linaro.org>2015-01-27 16:49:10 +0000
commit539d1ebf27b2cfc078ef887e694aa286ac3facfc (patch)
treefdfd417f06cb03136628a740c316a12671455bc2
parent53daa25be9adccc7fc4c06fd299efc8e1a97d7aa (diff)
downloadlinux-539d1ebf27b2cfc078ef887e694aa286ac3facfc.tar.gz
irq: gic: Add nofiq option
Provide a nofiq option to allow sub-systems for which the use of FIQ is options (like perf) to be switched between IRQ and FIQ mode. This is great for live demos and can also be used to test some of the error paths in the irq subsystem. Note: However useful this patch is it is a hack and will not be upstreamed. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
-rw-r--r--drivers/irqchip/irq-gic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 658c6dd5cf08..6dbdbcccabdf 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -217,11 +217,19 @@ static void gic_eoi_irq(struct irq_data *d)
writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
}
+static bool nofiq;
+module_param(nofiq, bool, S_IRUSR | S_IWUSR);
+
static int gic_set_nmi_routing(struct irq_data *d, unsigned int nmi)
{
struct gic_chip_data *gic = irq_data_get_irq_chip_data(d);
int ret;
+ if (nofiq) {
+ (void) gic_set_group_irq(gic, gic_irq(d), 1);
+ return -EPERM;
+ }
+
ret = gic_set_group_irq(gic, gic_irq(d), !nmi);
if (ret >= 0)
ret = !ret;