From: Changhwan Youn Date: Mon, 29 Sep 2014 03:26:26 +0000 (+0900) Subject: [COMMON] irq: add IRQF_GIC_MULTI_TARGET flag X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f512d507a1b0cb2ae863d7cd7998c015aa8b4f0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] irq: add IRQF_GIC_MULTI_TARGET flag Add IRQF_GIC_MULTI_TARGET flag to target multiple cpus during interrupt affinity setting. In __setup_irq(), IRQD_GIC_MULTI_TARGET in irq_data is set if IRQF_GIC_MULTI_TARGET is set. Change-Id: Id65066e2ea85e3aadb078b644e2410c02b184b8c Signed-off-by: Changhwan Youn Signed-off-by: Hosung Kim --- diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 69c238210325..3d80e177502a 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -76,6 +76,7 @@ #define IRQF_NO_THREAD 0x00010000 #define IRQF_EARLY_RESUME 0x00020000 #define IRQF_COND_SUSPEND 0x00040000 +#define IRQF_GIC_MULTI_TARGET 0x10000000 #define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD) diff --git a/include/linux/irq.h b/include/linux/irq.h index 0d53626405bf..d92cff05a306 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -233,6 +233,7 @@ enum { IRQD_MANAGED_SHUTDOWN = (1 << 23), IRQD_SINGLE_TARGET = (1 << 24), IRQD_DEFAULT_TRIGGER_SET = (1 << 25), + IRQD_GIC_MULTI_TARGET = (1 << 28), }; #define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index b02caa442776..1a8231a95e49 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1385,6 +1385,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) desc->depth = 1; } + if (new->flags & IRQF_GIC_MULTI_TARGET) + irqd_set(&desc->irq_data, IRQD_GIC_MULTI_TARGET); + } else if (new->flags & IRQF_TRIGGER_MASK) { unsigned int nmsk = new->flags & IRQF_TRIGGER_MASK; unsigned int omsk = irqd_get_trigger_type(&desc->irq_data);