diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-06-19 19:37:23 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-22 12:21:15 -0400 |
commit | 2e051552df69af6d134c2592d0d6f1ac80f01190 (patch) | |
tree | 978ded6acb4983f52427e4fc38a3b12ffbb65467 /kernel/irq/manage.c | |
parent | 43564bd97d0e6182bbd43b51b33254c728832551 (diff) |
genirq: Move initial affinity setup to irq_startup()
The startup vs. setaffinity ordering of interrupts depends on the
IRQF_NOAUTOEN flag. Chained interrupts are not getting any affinity
assignment at all.
A regular interrupt is started up and then the affinity is set. A
IRQF_NOAUTOEN marked interrupt is not started up, but the affinity is set
nevertheless.
Move the affinity setup to startup_irq() so the ordering is always the same
and chained interrupts get the proper default affinity assigned as well.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@lst.de>
Link: http://lkml.kernel.org/r/20170619235445.020534783@linutronix.de
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r-- | kernel/irq/manage.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 907fb791ff63..1e283073cecc 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -1327,6 +1327,12 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
1327 | if (new->flags & IRQF_ONESHOT) | 1327 | if (new->flags & IRQF_ONESHOT) |
1328 | desc->istate |= IRQS_ONESHOT; | 1328 | desc->istate |= IRQS_ONESHOT; |
1329 | 1329 | ||
1330 | /* Exclude IRQ from balancing if requested */ | ||
1331 | if (new->flags & IRQF_NOBALANCING) { | ||
1332 | irq_settings_set_no_balancing(desc); | ||
1333 | irqd_set(&desc->irq_data, IRQD_NO_BALANCING); | ||
1334 | } | ||
1335 | |||
1330 | if (irq_settings_can_autoenable(desc)) { | 1336 | if (irq_settings_can_autoenable(desc)) { |
1331 | irq_startup(desc, true); | 1337 | irq_startup(desc, true); |
1332 | } else { | 1338 | } else { |
@@ -1341,15 +1347,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
1341 | desc->depth = 1; | 1347 | desc->depth = 1; |
1342 | } | 1348 | } |
1343 | 1349 | ||
1344 | /* Exclude IRQ from balancing if requested */ | ||
1345 | if (new->flags & IRQF_NOBALANCING) { | ||
1346 | irq_settings_set_no_balancing(desc); | ||
1347 | irqd_set(&desc->irq_data, IRQD_NO_BALANCING); | ||
1348 | } | ||
1349 | |||
1350 | /* Set default affinity mask once everything is setup */ | ||
1351 | irq_setup_affinity(desc); | ||
1352 | |||
1353 | } else if (new->flags & IRQF_TRIGGER_MASK) { | 1350 | } else if (new->flags & IRQF_TRIGGER_MASK) { |
1354 | unsigned int nmsk = new->flags & IRQF_TRIGGER_MASK; | 1351 | unsigned int nmsk = new->flags & IRQF_TRIGGER_MASK; |
1355 | unsigned int omsk = irqd_get_trigger_type(&desc->irq_data); | 1352 | unsigned int omsk = irqd_get_trigger_type(&desc->irq_data); |