From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Jiang Liu <jiang.liu@linux.intel.com>,
linux-mips@linux-mips.org
Subject: [patch 05/12] MIPS/irq: Use access helper irq_data_get_affinity_mask()
Date: Mon, 13 Jul 2015 20:45:59 -0000 [thread overview]
Message-ID: <20150713200714.859821913@linutronix.de> (raw)
In-Reply-To: 20150713200602.799079101@linutronix.de
[-- Attachment #1: mips-irq-Use-access-helper-irq_data_get_affinity_mas.patch --]
[-- Type: text/plain, Size: 3079 bytes --]
From: Jiang Liu <jiang.liu@linux.intel.com>
This is a preparatory patch for moving irq_data struct members.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/mips/bcm63xx/irq.c | 2 +-
arch/mips/cavium-octeon/octeon-irq.c | 14 ++++++++------
arch/mips/pmcs-msp71xx/msp_irq_cic.c | 3 ++-
3 files changed, 11 insertions(+), 8 deletions(-)
Index: tip/arch/mips/bcm63xx/irq.c
===================================================================
--- tip.orig/arch/mips/bcm63xx/irq.c
+++ tip/arch/mips/bcm63xx/irq.c
@@ -60,7 +60,7 @@ static inline int enable_irq_for_cpu(int
if (m)
enable &= cpumask_test_cpu(cpu, m);
else if (irqd_affinity_was_set(d))
- enable &= cpumask_test_cpu(cpu, d->affinity);
+ enable &= cpumask_test_cpu(cpu, irq_data_get_affinity_mask(d));
#endif
return enable;
}
Index: tip/arch/mips/cavium-octeon/octeon-irq.c
===================================================================
--- tip.orig/arch/mips/cavium-octeon/octeon-irq.c
+++ tip/arch/mips/cavium-octeon/octeon-irq.c
@@ -225,13 +225,14 @@ static int next_cpu_for_irq(struct irq_d
#ifdef CONFIG_SMP
int cpu;
- int weight = cpumask_weight(data->affinity);
+ struct cpumask *mask = irq_data_get_affinity_mask(data);
+ int weight = cpumask_weight(mask);
struct octeon_ciu_chip_data *cd = irq_data_get_irq_chip_data(data);
if (weight > 1) {
cpu = cd->current_cpu;
for (;;) {
- cpu = cpumask_next(cpu, data->affinity);
+ cpu = cpumask_next(cpu, mask);
if (cpu >= nr_cpu_ids) {
cpu = -1;
continue;
@@ -240,7 +241,7 @@ static int next_cpu_for_irq(struct irq_d
}
}
} else if (weight == 1) {
- cpu = cpumask_first(data->affinity);
+ cpu = cpumask_first(mask);
} else {
cpu = smp_processor_id();
}
@@ -712,16 +713,17 @@ static void octeon_irq_cpu_offline_ciu(s
{
int cpu = smp_processor_id();
cpumask_t new_affinity;
+ struct cpumask *mask = irq_data_get_affinity_mask(data);
- if (!cpumask_test_cpu(cpu, data->affinity))
+ if (!cpumask_test_cpu(cpu, mask))
return;
- if (cpumask_weight(data->affinity) > 1) {
+ if (cpumask_weight(mask) > 1) {
/*
* It has multi CPU affinity, just remove this CPU
* from the affinity set.
*/
- cpumask_copy(&new_affinity, data->affinity);
+ cpumask_copy(&new_affinity, mask);
cpumask_clear_cpu(cpu, &new_affinity);
} else {
/* Otherwise, put it on lowest numbered online CPU. */
Index: tip/arch/mips/pmcs-msp71xx/msp_irq_cic.c
===================================================================
--- tip.orig/arch/mips/pmcs-msp71xx/msp_irq_cic.c
+++ tip/arch/mips/pmcs-msp71xx/msp_irq_cic.c
@@ -88,7 +88,8 @@ static void unmask_cic_irq(struct irq_da
* Make sure we have IRQ affinity. It may have changed while
* we were processing the IRQ.
*/
- if (!cpumask_test_cpu(smp_processor_id(), d->affinity))
+ if (!cpumask_test_cpu(smp_processor_id(),
+ irq_data_get_affinity_mask(d)))
return;
#endif
next prev parent reply other threads:[~2015-07-13 20:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-13 20:45 [patch 00/12] MIPS: Interrupt cleanups and API change preparation Thomas Gleixner
2015-07-13 20:45 ` [patch 01/12] MIPS/jz4740: Consolidate chained IRQ handler install/remove Thomas Gleixner
2015-07-13 20:45 ` [patch 02/12] MIPS/pci-ar71xx: " Thomas Gleixner
2015-07-13 20:45 ` [patch 03/12] MIPS/pci-ar724x: " Thomas Gleixner
2015-07-13 20:45 ` [patch 04/12] MIPS/pci-rt3883: " Thomas Gleixner
2015-07-13 20:50 ` Julia Lawall
2015-07-13 21:07 ` Thomas Gleixner
2015-07-13 20:45 ` Thomas Gleixner [this message]
2015-07-13 20:46 ` [patch 06/12] MIPS/alchemy: Use irq_set_chip_handler_name_locked() Thomas Gleixner
2015-07-13 20:46 ` [patch 07/12] MIPS/bcm63xx: Use irq_set_handler_locked() Thomas Gleixner
2015-07-13 20:46 ` [patch 08/12] MIPS/alchemy: Remove pointless irqdisable/enable Thomas Gleixner
2015-07-14 6:00 ` Manuel Lauss
2015-07-14 8:16 ` Thomas Gleixner
2015-07-14 8:55 ` Manuel Lauss
2015-07-14 9:02 ` Ralf Baechle
2015-07-14 9:58 ` Thomas Gleixner
2015-07-13 20:46 ` [patch 09/12] MIPS/ath91: " Thomas Gleixner
2015-07-13 20:46 ` [patch 10/12] MIPS/cavium/octeon: Replace the homebrewn flow handler Thomas Gleixner
2015-07-15 21:19 ` David Daney
2015-07-13 20:46 ` [patch 11/12] MIPS/netlogic: Prepare ipi handlers for irq argument removal Thomas Gleixner
2015-07-13 20:46 ` [patch 12/12] MIPS/PCI/rt3883: Prepare rt3883_pci_irq_handler " Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150713200714.859821913@linutronix.de \
--to=tglx@linutronix.de \
--cc=jiang.liu@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox