summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-26 17:39:20 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-26 17:39:20 -0500
commitdec0029a59779d8279dde663ef8abe9824ee5773 (patch)
treef4958e8af2877fc5227f688727d22ce9ebf38939 /kernel/irq
parent02fc87b117a9b9ec325089d098fce86ed11966bd (diff)
parent75f1133873d6a1276d3c19918b7c94975840f990 (diff)
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Glexiner: - unbreak the irq trigger type check for legacy platforms - a handful fixes for ARM GIC v3/4 interrupt controllers - a few trivial fixes all over the place * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/matrix: Make - vs ?: Precedence explicit irqchip/imgpdc: Use resource_size function on resource object irqchip/qcom: Fix u32 comparison with value less than zero irqchip/exiu: Fix return value check in exiu_init() irqchip/gic-v3-its: Remove artificial dependency on PCI irqchip/gic-v4: Add forward definition of struct irq_domain_ops irqchip/gic-v3: pr_err() strings should end with newlines irqchip/s3c24xx: pr_err() strings should end with newlines irqchip/gic-v3: Fix ppi-partitions lookup irqchip/gic-v4: Clear IRQ_DISABLE_UNLAZY again if mapping fails genirq: Track whether the trigger type has been set
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/manage.c13
-rw-r--r--kernel/irq/matrix.c2
2 files changed, 13 insertions, 2 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 2ff1c0c82fc9..0f922729bab9 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1246,7 +1246,18 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
1246 * set the trigger type must match. Also all must 1246 * set the trigger type must match. Also all must
1247 * agree on ONESHOT. 1247 * agree on ONESHOT.
1248 */ 1248 */
1249 unsigned int oldtype = irqd_get_trigger_type(&desc->irq_data); 1249 unsigned int oldtype;
1250
1251 /*
1252 * If nobody did set the configuration before, inherit
1253 * the one provided by the requester.
1254 */
1255 if (irqd_trigger_type_was_set(&desc->irq_data)) {
1256 oldtype = irqd_get_trigger_type(&desc->irq_data);
1257 } else {
1258 oldtype = new->flags & IRQF_TRIGGER_MASK;
1259 irqd_set_trigger_type(&desc->irq_data, oldtype);
1260 }
1250 1261
1251 if (!((old->flags & new->flags) & IRQF_SHARED) || 1262 if (!((old->flags & new->flags) & IRQF_SHARED) ||
1252 (oldtype != (new->flags & IRQF_TRIGGER_MASK)) || 1263 (oldtype != (new->flags & IRQF_TRIGGER_MASK)) ||
diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c
index a3cbbc8191c5..7df2480005f8 100644
--- a/kernel/irq/matrix.c
+++ b/kernel/irq/matrix.c
@@ -384,7 +384,7 @@ unsigned int irq_matrix_available(struct irq_matrix *m, bool cpudown)
384{ 384{
385 struct cpumap *cm = this_cpu_ptr(m->maps); 385 struct cpumap *cm = this_cpu_ptr(m->maps);
386 386
387 return m->global_available - cpudown ? cm->available : 0; 387 return (m->global_available - cpudown) ? cm->available : 0;
388} 388}
389 389
390/** 390/**