[COMMON] irq: add IRQF_GIC_MULTI_TARGET flag
authorChanghwan Youn <chaos.youn@samsung.com>
Mon, 29 Sep 2014 03:26:26 +0000 (12:26 +0900)
committerJaehyoung Choi <jkkkkk.choi@samsung.com>
Mon, 14 May 2018 05:04:19 +0000 (14:04 +0900)
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 <chaos.youn@samsung.com>
Signed-off-by: Hosung Kim <hosung0.kim@samsung.com>
include/linux/interrupt.h
include/linux/irq.h
kernel/irq/manage.c

index 69c238210325e7a894e4577afdf6d2397da433ea..3d80e177502a523ec240b0a9e48238f129202900 100644 (file)
@@ -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)
 
index 0d53626405bf85b263f4528d339e28ce547a2502..d92cff05a3064be5eb945387a4500b36e5cacdab 100644 (file)
@@ -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)
index b02caa442776f6ddfb036462154cfd5ab46b7c01..1a8231a95e49154ed95bdefece18c4ae4a3c5606 100644 (file)
@@ -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);