* [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
@ 2009-01-12 22:05 Mike Travis
2009-01-12 22:05 ` [PATCH 1/8] alpha irq: update alpha for new irq_desc Mike Travis
` (10 more replies)
0 siblings, 11 replies; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:05 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Rusty Russell, Andrew Morton, Jack Steiner, linux-kernel
Impact: cleanup, use new cpumask API.
Minor cleanup to use the new affinity and pending_mask cpumask_var_t's
in irq_desc:
alpha irq: update alpha for new irq_desc
arm irq: update arm for new irq_desc
blackfin irq: update blackfin for new irq_desc
ia64 irq: update ia64 for new irq_desc
mips irq: update mips for new irq_desc
parisc irq: update parisc for new irq_desc
powerpc irq: update powerpc for new irq_desc
arm irq: update arm for new irq_desc
Ingo - should I push these to tip/cpus4096 via the cpus4096-for-ingo tree
since that has the relevant changes to irq_desc? Or by some other means?
Based on tip/cpus4096: v2.6.29-rc1-19-g92296c6
[I'm setting up the cross-compile toolchain and will verify (as much as I
can) that the above builds correctly.]
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Tony Luck <tony.luck@intel.com>
Cc: <kernel@wantstofly.org>
Cc: <linuxppc-dev@ozlabs.org>
Cc: <linux-ia64@vger.kernel.org>
Cc: <linux-mips@linux-mips.org>
Cc: <linux-parisc@vger.kernel.org>
Cc: <sparclinux@vger.kernel.org>
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/8] alpha irq: update alpha for new irq_desc
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
@ 2009-01-12 22:05 ` Mike Travis
2009-01-12 22:05 ` [PATCH 2/8] arm irq: update arm " Mike Travis
` (9 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rusty Russell, Andrew Morton, Jack Steiner, linux-kernel,
Richard Henderson
[-- Attachment #1: irq:update-alpha-to-new-irq_desc --]
[-- Type: text/plain, Size: 744 bytes --]
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Richard Henderson <rth@twiddle.net>
---
arch/alpha/kernel/irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6-for-ingo.orig/arch/alpha/kernel/irq.c
+++ linux-2.6-for-ingo/arch/alpha/kernel/irq.c
@@ -55,7 +55,7 @@ int irq_select_affinity(unsigned int irq
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
last_cpu = cpu;
- irq_desc[irq].affinity = cpumask_of_cpu(cpu);
+ cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu));
return 0;
}
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 2/8] arm irq: update arm for new irq_desc
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
2009-01-12 22:05 ` [PATCH 1/8] alpha irq: update alpha for new irq_desc Mike Travis
@ 2009-01-12 22:05 ` Mike Travis
2009-01-12 22:05 ` [PATCH 3/8] blackfin irq: update blackfin " Mike Travis
` (8 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rusty Russell, Andrew Morton, Jack Steiner, linux-kernel, kernel
[-- Attachment #1: irq:update-arm-to-new-irq_desc --]
[-- Type: text/plain, Size: 2441 bytes --]
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Since CONFIG_CPUMASK_OFFSTACK is not likely to be enabled for the arm
architecture, double check that it is indeed not set, as we do not
allocate any variable-sized cpumask_var_t's.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: <kernel@wantstofly.org>
---
arch/arm/kernel/irq.c | 18 ++++++++++++------
arch/arm/oprofile/op_model_mpcore.c | 2 +-
2 files changed, 13 insertions(+), 7 deletions(-)
--- linux-2.6-for-ingo.orig/arch/arm/kernel/irq.c
+++ linux-2.6-for-ingo/arch/arm/kernel/irq.c
@@ -104,6 +104,11 @@ static struct irq_desc bad_irq_desc = {
.lock = SPIN_LOCK_UNLOCKED
};
+#ifdef CONFIG_CPUMASK_OFFSTACK
+/* We are not allocating bad_irq_desc.affinity or .pending_mask */
+#error "ARM architecture does not support CONFIG_CPUMASK_OFFSTACK."
+#endif
+
/*
* do_IRQ handles all hardware IRQ's. Decoded IRQs should not
* come via this function. Instead, they should provide their
@@ -161,7 +166,7 @@ void __init init_IRQ(void)
irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_NOPROBE;
#ifdef CONFIG_SMP
- bad_irq_desc.affinity = CPU_MASK_ALL;
+ cpumask_setall(bad_irq_desc.affinity);
bad_irq_desc.cpu = smp_processor_id();
#endif
init_arch_irq();
@@ -191,15 +196,16 @@ void migrate_irqs(void)
struct irq_desc *desc = irq_desc + i;
if (desc->cpu == cpu) {
- unsigned int newcpu = any_online_cpu(desc->affinity);
-
- if (newcpu == NR_CPUS) {
+ unsigned int newcpu = cpumask_any_and(desc->affinity,
+ cpu_online_mask);
+ if (newcpu >= nr_cpu_ids) {
if (printk_ratelimit())
printk(KERN_INFO "IRQ%u no longer affine to CPU%u\n",
i, cpu);
- cpus_setall(desc->affinity);
- newcpu = any_online_cpu(desc->affinity);
+ cpumask_setall(desc->affinity);
+ newcpu = cpumask_any_and(desc->affinity,
+ cpu_online_mask);
}
route_irq(desc, i, newcpu);
--- linux-2.6-for-ingo.orig/arch/arm/oprofile/op_model_mpcore.c
+++ linux-2.6-for-ingo/arch/arm/oprofile/op_model_mpcore.c
@@ -263,7 +263,7 @@ static void em_route_irq(int irq, unsign
const struct cpumask *mask = cpumask_of(cpu);
spin_lock_irq(&desc->lock);
- desc->affinity = *mask;
+ cpumask_copy(desc->affinity, mask);
desc->chip->set_affinity(irq, mask);
spin_unlock_irq(&desc->lock);
}
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 3/8] blackfin irq: update blackfin for new irq_desc
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
2009-01-12 22:05 ` [PATCH 1/8] alpha irq: update alpha for new irq_desc Mike Travis
2009-01-12 22:05 ` [PATCH 2/8] arm irq: update arm " Mike Travis
@ 2009-01-12 22:05 ` Mike Travis
2009-01-12 22:05 ` [PATCH 4/8] ia64 irq: update ia64 " Mike Travis
` (7 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rusty Russell, Andrew Morton, Jack Steiner, linux-kernel,
Bryan Wu
[-- Attachment #1: irq:update-blackfin-to-new-irq_desc --]
[-- Type: text/plain, Size: 974 bytes --]
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Since CONFIG_CPUMASK_OFFSTACK is not likely to be enabled for the blackfin
architecture, double check that it is indeed not set, as we do not
allocate any variable-sized cpumask_var_t's.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Bryan Wu <cooloney@kernel.org>
---
arch/blackfin/kernel/irqchip.c | 5 +++++
1 file changed, 5 insertions(+)
--- linux-2.6-for-ingo.orig/arch/blackfin/kernel/irqchip.c
+++ linux-2.6-for-ingo/arch/blackfin/kernel/irqchip.c
@@ -69,6 +69,11 @@ static struct irq_desc bad_irq_desc = {
#endif
};
+#ifdef CONFIG_CPUMASK_OFFSTACK
+/* We are not allocating a variable-sized bad_irq_desc.affinity */
+#error "Blackfin architecture does not support CONFIG_CPUMASK_OFFSTACK."
+#endif
+
int show_interrupts(struct seq_file *p, void *v)
{
int i = *(loff_t *) v, j;
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 4/8] ia64 irq: update ia64 for new irq_desc
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
` (2 preceding siblings ...)
2009-01-12 22:05 ` [PATCH 3/8] blackfin irq: update blackfin " Mike Travis
@ 2009-01-12 22:05 ` Mike Travis
2009-01-12 22:05 ` [PATCH 5/8] mips irq: update mips " Mike Travis
` (6 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rusty Russell, Andrew Morton, Jack Steiner, linux-kernel,
Tony Luck, linux-ia64
[-- Attachment #1: irq:update-ia64-to-new-irq_desc --]
[-- Type: text/plain, Size: 2626 bytes --]
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: <linux-ia64@vger.kernel.org>
---
arch/ia64/kernel/iosapic.c | 2 +-
arch/ia64/kernel/irq.c | 4 ++--
arch/ia64/kernel/msi_ia64.c | 4 ++--
arch/ia64/sn/kernel/msi_sn.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
--- linux-2.6-for-ingo.orig/arch/ia64/kernel/iosapic.c
+++ linux-2.6-for-ingo/arch/ia64/kernel/iosapic.c
@@ -880,7 +880,7 @@ iosapic_unregister_intr (unsigned int gs
if (iosapic_intr_info[irq].count == 0) {
#ifdef CONFIG_SMP
/* Clear affinity */
- cpus_setall(idesc->affinity);
+ cpumask_setall(idesc->affinity);
#endif
/* Clear the interrupt information */
iosapic_intr_info[irq].dest = 0;
--- linux-2.6-for-ingo.orig/arch/ia64/kernel/irq.c
+++ linux-2.6-for-ingo/arch/ia64/kernel/irq.c
@@ -103,7 +103,7 @@ static char irq_redir [NR_IRQS]; // = {
void set_irq_affinity_info (unsigned int irq, int hwid, int redir)
{
if (irq < NR_IRQS) {
- cpumask_copy(&irq_desc[irq].affinity,
+ cpumask_copy(irq_desc[irq].affinity,
cpumask_of(cpu_logical_id(hwid)));
irq_redir[irq] = (char) (redir & 0xff);
}
@@ -148,7 +148,7 @@ static void migrate_irqs(void)
if (desc->status == IRQ_PER_CPU)
continue;
- if (cpumask_any_and(&irq_desc[irq].affinity, cpu_online_mask)
+ if (cpumask_any_and(irq_desc[irq].affinity, cpu_online_mask)
>= nr_cpu_ids) {
/*
* Save it for phase 2 processing
--- linux-2.6-for-ingo.orig/arch/ia64/kernel/msi_ia64.c
+++ linux-2.6-for-ingo/arch/ia64/kernel/msi_ia64.c
@@ -75,7 +75,7 @@ static void ia64_set_msi_irq_affinity(un
msg.data = data;
write_msi_msg(irq, &msg);
- irq_desc[irq].affinity = cpumask_of_cpu(cpu);
+ cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
}
#endif /* CONFIG_SMP */
@@ -187,7 +187,7 @@ static void dmar_msi_set_affinity(unsign
msg.address_lo |= MSI_ADDR_DESTID_CPU(cpu_physical_id(cpu));
dmar_msi_write(irq, &msg);
- irq_desc[irq].affinity = *mask;
+ cpumask_copy(irq_desc[irq].affinity, mask);
}
#endif /* CONFIG_SMP */
--- linux-2.6-for-ingo.orig/arch/ia64/sn/kernel/msi_sn.c
+++ linux-2.6-for-ingo/arch/ia64/sn/kernel/msi_sn.c
@@ -205,7 +205,7 @@ static void sn_set_msi_irq_affinity(unsi
msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff);
write_msi_msg(irq, &msg);
- irq_desc[irq].affinity = *cpu_mask;
+ cpumask_copy(irq_desc[irq].affinity, cpu_mask);
}
#endif /* CONFIG_SMP */
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 5/8] mips irq: update mips for new irq_desc
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
` (3 preceding siblings ...)
2009-01-12 22:05 ` [PATCH 4/8] ia64 irq: update ia64 " Mike Travis
@ 2009-01-12 22:05 ` Mike Travis
2009-01-12 22:05 ` [PATCH 6/8] parisc irq: update parisc " Mike Travis
` (5 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rusty Russell, Andrew Morton, Jack Steiner, linux-kernel,
Ralf Baechle, linux-mips
[-- Attachment #1: irq:update-mips-to-new-irq_desc --]
[-- Type: text/plain, Size: 2492 bytes --]
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: <linux-mips@linux-mips.org>
---
arch/mips/include/asm/irq.h | 2 +-
arch/mips/kernel/irq-gic.c | 2 +-
arch/mips/kernel/smtc.c | 2 +-
arch/mips/mti-malta/malta-smtc.c | 5 +++--
4 files changed, 6 insertions(+), 5 deletions(-)
--- linux-2.6-for-ingo.orig/arch/mips/include/asm/irq.h
+++ linux-2.6-for-ingo/arch/mips/include/asm/irq.h
@@ -66,7 +66,7 @@ extern void smtc_forward_irq(unsigned in
*/
#define IRQ_AFFINITY_HOOK(irq) \
do { \
- if (!cpu_isset(smp_processor_id(), irq_desc[irq].affinity)) { \
+ if (!cpumask_test_cpu(smp_processor_id(), irq_desc[irq].affinity)) {\
smtc_forward_irq(irq); \
irq_exit(); \
return; \
--- linux-2.6-for-ingo.orig/arch/mips/kernel/irq-gic.c
+++ linux-2.6-for-ingo/arch/mips/kernel/irq-gic.c
@@ -187,7 +187,7 @@ static void gic_set_affinity(unsigned in
set_bit(irq, pcpu_masks[first_cpu(tmp)].pcpu_mask);
}
- irq_desc[irq].affinity = *cpumask;
+ cpumask_copy(irq_desc[irq].affinity, cpumask);
spin_unlock_irqrestore(&gic_lock, flags);
}
--- linux-2.6-for-ingo.orig/arch/mips/kernel/smtc.c
+++ linux-2.6-for-ingo/arch/mips/kernel/smtc.c
@@ -686,7 +686,7 @@ void smtc_forward_irq(unsigned int irq)
* and efficiency, we just pick the easiest one to find.
*/
- target = first_cpu(irq_desc[irq].affinity);
+ target = cpumask_first(irq_desc[irq].affinity);
/*
* We depend on the platform code to have correctly processed
--- linux-2.6-for-ingo.orig/arch/mips/mti-malta/malta-smtc.c
+++ linux-2.6-for-ingo/arch/mips/mti-malta/malta-smtc.c
@@ -116,7 +116,7 @@ struct plat_smp_ops msmtc_smp_ops = {
void plat_set_irq_affinity(unsigned int irq, const struct cpumask *affinity)
{
- cpumask_t tmask = *affinity;
+ cpumask_t tmask;
int cpu = 0;
void smtc_set_irq_affinity(unsigned int irq, cpumask_t aff);
@@ -139,11 +139,12 @@ void plat_set_irq_affinity(unsigned int
* be made to forward to an offline "CPU".
*/
+ cpumask_copy(&tmask, affinity);
for_each_cpu(cpu, affinity) {
if ((cpu_data[cpu].vpe_id != 0) || !cpu_online(cpu))
cpu_clear(cpu, tmask);
}
- irq_desc[irq].affinity = tmask;
+ cpumask_copy(irq_desc[irq].affinity, &tmask);
if (cpus_empty(tmask))
/*
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 6/8] parisc irq: update parisc for new irq_desc
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
` (4 preceding siblings ...)
2009-01-12 22:05 ` [PATCH 5/8] mips irq: update mips " Mike Travis
@ 2009-01-12 22:05 ` Mike Travis
2009-01-13 6:04 ` Kyle McMartin
2009-01-12 22:05 ` [PATCH 7/8] powerpc irq: update powerpc " Mike Travis
` (4 subsequent siblings)
10 siblings, 1 reply; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rusty Russell, Andrew Morton, Jack Steiner, linux-kernel,
Kyle McMartin, Matthew Wilcox, Grant Grundler, linux-parisc
[-- Attachment #1: irq:update-parisc-to-new-irq_desc --]
[-- Type: text/plain, Size: 1685 bytes --]
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: <linux-parisc@vger.kernel.org>
---
arch/parisc/kernel/irq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- linux-2.6-for-ingo.orig/arch/parisc/kernel/irq.c
+++ linux-2.6-for-ingo/arch/parisc/kernel/irq.c
@@ -120,7 +120,7 @@ int cpu_check_affinity(unsigned int irq,
if (CHECK_IRQ_PER_CPU(irq)) {
/* Bad linux design decision. The mask has already
* been set; we must reset it */
- irq_desc[irq].affinity = CPU_MASK_ALL;
+ cpumask_setall(irq_desc[irq].affinity);
return -EINVAL;
}
@@ -136,7 +136,7 @@ static void cpu_set_affinity_irq(unsigne
if (cpu_check_affinity(irq, dest))
return;
- irq_desc[irq].affinity = *dest;
+ cpumask_copy(irq_desc[irq].affinity, dest);
}
#endif
@@ -295,7 +295,7 @@ int txn_alloc_irq(unsigned int bits_wide
unsigned long txn_affinity_addr(unsigned int irq, int cpu)
{
#ifdef CONFIG_SMP
- irq_desc[irq].affinity = cpumask_of_cpu(cpu);
+ cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
#endif
return per_cpu(cpu_data, cpu).txn_addr;
@@ -352,7 +352,7 @@ void do_cpu_irq_mask(struct pt_regs *reg
irq = eirr_to_irq(eirr_val);
#ifdef CONFIG_SMP
- dest = irq_desc[irq].affinity;
+ cpumask_copy(&dest, irq_desc[irq].affinity);
if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) &&
!cpu_isset(smp_processor_id(), dest)) {
int cpu = first_cpu(dest);
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 7/8] powerpc irq: update powerpc for new irq_desc
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
` (5 preceding siblings ...)
2009-01-12 22:05 ` [PATCH 6/8] parisc irq: update parisc " Mike Travis
@ 2009-01-12 22:05 ` Mike Travis
2009-01-12 22:05 ` [PATCH 8/8] sparc irq: update sparc " Mike Travis
` (3 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rusty Russell, Andrew Morton, Jack Steiner, linux-kernel,
Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
[-- Attachment #1: irq:update-powerpc-to-new-irq_desc --]
[-- Type: text/plain, Size: 2236 bytes --]
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: <linuxppc-dev@ozlabs.org>
---
arch/powerpc/kernel/irq.c | 2 +-
arch/powerpc/platforms/pseries/xics.c | 5 +++--
arch/powerpc/sysdev/mpic.c | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
--- linux-2.6-for-ingo.orig/arch/powerpc/kernel/irq.c
+++ linux-2.6-for-ingo/arch/powerpc/kernel/irq.c
@@ -231,7 +231,7 @@ void fixup_irqs(cpumask_t map)
if (irq_desc[irq].status & IRQ_PER_CPU)
continue;
- cpus_and(mask, irq_desc[irq].affinity, map);
+ cpumask_and(&mask, irq_desc[irq].affinity, &map);
if (any_online_cpu(mask) == NR_CPUS) {
printk("Breaking affinity for irq %i\n", irq);
mask = map;
--- linux-2.6-for-ingo.orig/arch/powerpc/platforms/pseries/xics.c
+++ linux-2.6-for-ingo/arch/powerpc/platforms/pseries/xics.c
@@ -153,9 +153,10 @@ static int get_irq_server(unsigned int v
{
int server;
/* For the moment only implement delivery to all cpus or one cpu */
- cpumask_t cpumask = irq_desc[virq].affinity;
+ cpumask_t cpumask;
cpumask_t tmp = CPU_MASK_NONE;
+ cpumask_copy(&cpumask, irq_desc[virq].affinity);
if (!distribute_irqs)
return default_server;
@@ -869,7 +870,7 @@ void xics_migrate_irqs_away(void)
virq, cpu);
/* Reset affinity to all cpus */
- irq_desc[virq].affinity = CPU_MASK_ALL;
+ cpumask_setall(irq_desc[virq].affinity);
desc->chip->set_affinity(virq, cpu_all_mask);
unlock:
spin_unlock_irqrestore(&desc->lock, flags);
--- linux-2.6-for-ingo.orig/arch/powerpc/sysdev/mpic.c
+++ linux-2.6-for-ingo/arch/powerpc/sysdev/mpic.c
@@ -566,9 +566,10 @@ static void __init mpic_scan_ht_pics(str
#ifdef CONFIG_SMP
static int irq_choose_cpu(unsigned int virt_irq)
{
- cpumask_t mask = irq_desc[virt_irq].affinity;
+ cpumask_t mask;
int cpuid;
+ cpumask_copy(&mask, irq_desc[virt_irq].affinity);
if (cpus_equal(mask, CPU_MASK_ALL)) {
static int irq_rover;
static DEFINE_SPINLOCK(irq_rover_lock);
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 8/8] sparc irq: update sparc for new irq_desc
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
` (6 preceding siblings ...)
2009-01-12 22:05 ` [PATCH 7/8] powerpc irq: update powerpc " Mike Travis
@ 2009-01-12 22:05 ` Mike Travis
2009-01-12 22:07 ` [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Frysinger
` (2 subsequent siblings)
10 siblings, 0 replies; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:05 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rusty Russell, Andrew Morton, Jack Steiner, linux-kernel,
David S. Miller, sparclinux
[-- Attachment #1: irq:update-sparc-to-new-irq_desc --]
[-- Type: text/plain, Size: 1154 bytes --]
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: <sparclinux@vger.kernel.org>
---
arch/sparc/kernel/irq_64.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- linux-2.6-for-ingo.orig/arch/sparc/kernel/irq_64.c
+++ linux-2.6-for-ingo/arch/sparc/kernel/irq_64.c
@@ -247,9 +247,10 @@ struct irq_handler_data {
#ifdef CONFIG_SMP
static int irq_choose_cpu(unsigned int virt_irq)
{
- cpumask_t mask = irq_desc[virt_irq].affinity;
+ cpumask_t mask;
int cpuid;
+ cpumask_copy(&mask, irq_desc[virt_irq].affinity);
if (cpus_equal(mask, CPU_MASK_ALL)) {
static int irq_rover;
static DEFINE_SPINLOCK(irq_rover_lock);
@@ -854,7 +855,7 @@ void fixup_irqs(void)
!(irq_desc[irq].status & IRQ_PER_CPU)) {
if (irq_desc[irq].chip->set_affinity)
irq_desc[irq].chip->set_affinity(irq,
- &irq_desc[irq].affinity);
+ irq_desc[irq].affinity);
}
spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
}
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
` (7 preceding siblings ...)
2009-01-12 22:05 ` [PATCH 8/8] sparc irq: update sparc " Mike Travis
@ 2009-01-12 22:07 ` Mike Frysinger
2009-01-13 1:21 ` Mike Travis
2009-01-12 22:20 ` Ingo Molnar
2009-01-12 22:21 ` Ingo Molnar
10 siblings, 1 reply; 19+ messages in thread
From: Mike Frysinger @ 2009-01-12 22:07 UTC (permalink / raw)
To: Mike Travis
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel
On Mon, Jan 12, 2009 at 17:05, Mike Travis wrote:
> Cc: Bryan Wu <cooloney@kernel.org>
Blackfin CC should be more uclinux-dist-devel@blackfin.uclinux.org
-mike
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
` (8 preceding siblings ...)
2009-01-12 22:07 ` [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Frysinger
@ 2009-01-12 22:20 ` Ingo Molnar
2009-01-12 22:21 ` Ingo Molnar
10 siblings, 0 replies; 19+ messages in thread
From: Ingo Molnar @ 2009-01-12 22:20 UTC (permalink / raw)
To: Mike Travis
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel
* Mike Travis <travis@sgi.com> wrote:
> Impact: cleanup, use new cpumask API.
>
> Minor cleanup to use the new affinity and pending_mask cpumask_var_t's
> in irq_desc:
>
> alpha irq: update alpha for new irq_desc
> arm irq: update arm for new irq_desc
> blackfin irq: update blackfin for new irq_desc
> ia64 irq: update ia64 for new irq_desc
> mips irq: update mips for new irq_desc
> parisc irq: update parisc for new irq_desc
> powerpc irq: update powerpc for new irq_desc
> arm irq: update arm for new irq_desc
this should all be a single patch, because the cpus4096 tree does not
build on these arhitectures right now.
in fact, i think i'll rebase the whole lineup (so no need to resend - i'll
squash these fixes together), because this is how it looks like right now:
28e0886: xen: fix too early kmalloc call
92296c6: cpumask, irq: non-x86 build failures
542d865: kstat: modify kstat_irqs_legacy to be variable sized
9332fcc: irq: initialize nr_irqs based on nr_cpu_ids
0fa0ebb: irq: allocate irq_desc_ptrs array based on nr_irqs
e2f4d06: irq: use WARN() instead of WARN_ON().
9594949: irq: change references from NR_IRQS to nr_irqs
c7a3589: Xen: reduce memory required for cpu_evtchn_mask
d38b223: cpumask: reduce stack usage in find_lowest_rq
c90e785: cpumask: use cpumask_var_t in dcdbas.c
f9b9056: x86: reduce stack usage in init_intel_cacheinfo
a1c33bb: x86: cleanup remaining cpumask_t code in mce_amd_64.c
0e21990: SGI UV cpumask: use static temp cpumask in flush_tlb
4595f96: x86: change flush_tlb_others to take a const struct cpumask
802bf93: cpumask: fix bug in use cpumask_var_t in irq_desc
651f811: cpumask: convert other misc kernel functions
2f8975f: cpumask: convert drivers/net/sfc
f7df8ed: cpumask: convert misc driver functions
fbd59a8: cpumask: Use topology_core_cpumask()/topology_thread_cpumask()
7f7ace0: cpumask: update irq_desc to use cpumask_var_t
those architectures break with the first patch: 7f7ace0. That's bisection
breakage window of about 20 commits - too big and we want to avoid it if
we can (and we still can).
Ingo
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
` (9 preceding siblings ...)
2009-01-12 22:20 ` Ingo Molnar
@ 2009-01-12 22:21 ` Ingo Molnar
2009-01-12 22:31 ` Mike Travis
2009-01-13 0:15 ` Mike Travis
10 siblings, 2 replies; 19+ messages in thread
From: Ingo Molnar @ 2009-01-12 22:21 UTC (permalink / raw)
To: Mike Travis
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel
* Mike Travis <travis@sgi.com> wrote:
> Ingo - should I push these to tip/cpus4096 via the cpus4096-for-ingo
> tree since that has the relevant changes to irq_desc? Or by some other
> means?
yes, please update cpus4096-for-ingo so that i can pull it from your tree.
Ingo
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
2009-01-12 22:21 ` Ingo Molnar
@ 2009-01-12 22:31 ` Mike Travis
2009-01-12 22:52 ` Ingo Molnar
2009-01-13 0:15 ` Mike Travis
1 sibling, 1 reply; 19+ messages in thread
From: Mike Travis @ 2009-01-12 22:31 UTC (permalink / raw)
To: Ingo Molnar
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel
Ingo Molnar wrote:
> * Mike Travis <travis@sgi.com> wrote:
>
>> Ingo - should I push these to tip/cpus4096 via the cpus4096-for-ingo
>> tree since that has the relevant changes to irq_desc? Or by some other
>> means?
>
> yes, please update cpus4096-for-ingo so that i can pull it from your tree.
>
> Ingo
Ok, I will do that right now. And then you'll pull and do these other things:
> this should all be a single patch, because the cpus4096 tree does not
> build on these arhitectures right now.
> in fact, i think i'll rebase the whole lineup (so no need to resend - i'll
> squash these fixes together), because this is how it looks like right now:
???
Thanks,
Mike
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
2009-01-12 22:31 ` Mike Travis
@ 2009-01-12 22:52 ` Ingo Molnar
0 siblings, 0 replies; 19+ messages in thread
From: Ingo Molnar @ 2009-01-12 22:52 UTC (permalink / raw)
To: Mike Travis
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel
* Mike Travis <travis@sgi.com> wrote:
> Ingo Molnar wrote:
> > * Mike Travis <travis@sgi.com> wrote:
> >
> >> Ingo - should I push these to tip/cpus4096 via the cpus4096-for-ingo
> >> tree since that has the relevant changes to irq_desc? Or by some other
> >> means?
> >
> > yes, please update cpus4096-for-ingo so that i can pull it from your tree.
> >
> > Ingo
>
> Ok, I will do that right now. And then you'll pull and do these other things:
>
> > this should all be a single patch, because the cpus4096 tree does not
> > build on these arhitectures right now.
>
> > in fact, i think i'll rebase the whole lineup (so no need to resend - i'll
> > squash these fixes together), because this is how it looks like right now:
>
> ???
yes.
Ingo
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
2009-01-12 22:21 ` Ingo Molnar
2009-01-12 22:31 ` Mike Travis
@ 2009-01-13 0:15 ` Mike Travis
2009-01-14 11:14 ` Ingo Molnar
1 sibling, 1 reply; 19+ messages in thread
From: Mike Travis @ 2009-01-13 0:15 UTC (permalink / raw)
To: Ingo Molnar
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel
Ingo Molnar wrote:
> * Mike Travis <travis@sgi.com> wrote:
>
>> Ingo - should I push these to tip/cpus4096 via the cpus4096-for-ingo
>> tree since that has the relevant changes to irq_desc? Or by some other
>> means?
>
> yes, please update cpus4096-for-ingo so that i can pull it from your tree.
>
> Ingo
Hi Ingo,
Here's the consolidated patches for the irq_desc cpumask changes. There was
one small test merge conflict w/tip-master in kernel/irq/handle.c that I was not
sure how to 'pre-fix' from this end.
Also, I'm still hunting down that mail about the cross build tools.
Thanks!
Mike
The following changes since commit 28e08861b9afab4168b758fb7b95aa7a4da0f668:
Christophe Saout (1):
xen: fix too early kmalloc call
are available in the git repository at:
ssh://master.kernel.org/pub/scm/linux/kernel/git/travis/linux-2.6-cpus4096-for-ingo.git master
Mike Travis (1):
irq: update all arches for new irq_desc
arch/alpha/kernel/irq.c | 2 +-
arch/arm/kernel/irq.c | 18 ++++++++++++------
arch/arm/oprofile/op_model_mpcore.c | 2 +-
arch/blackfin/kernel/irqchip.c | 5 +++++
arch/ia64/kernel/iosapic.c | 2 +-
arch/ia64/kernel/irq.c | 4 ++--
arch/ia64/kernel/msi_ia64.c | 4 ++--
arch/ia64/sn/kernel/msi_sn.c | 2 +-
arch/mips/include/asm/irq.h | 2 +-
arch/mips/kernel/irq-gic.c | 2 +-
arch/mips/kernel/smtc.c | 2 +-
arch/mips/mti-malta/malta-smtc.c | 5 +++--
arch/parisc/kernel/irq.c | 8 ++++----
arch/powerpc/kernel/irq.c | 2 +-
arch/powerpc/platforms/pseries/xics.c | 5 +++--
arch/powerpc/sysdev/mpic.c | 3 ++-
arch/sparc/kernel/irq_64.c | 5 +++--
17 files changed, 44 insertions(+), 29 deletions(-)
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
2009-01-12 22:07 ` [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Frysinger
@ 2009-01-13 1:21 ` Mike Travis
2009-01-13 1:25 ` Mike Frysinger
0 siblings, 1 reply; 19+ messages in thread
From: Mike Travis @ 2009-01-13 1:21 UTC (permalink / raw)
To: Mike Frysinger
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel
Mike Frysinger wrote:
> On Mon, Jan 12, 2009 at 17:05, Mike Travis wrote:
>> Cc: Bryan Wu <cooloney@kernel.org>
>
> Blackfin CC should be more uclinux-dist-devel@blackfin.uclinux.org
> -mike
I saw that but it's flagged:
L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
I assumed that means the list does not want unsolicited mail?
Thanks,
Mike
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
2009-01-13 1:21 ` Mike Travis
@ 2009-01-13 1:25 ` Mike Frysinger
0 siblings, 0 replies; 19+ messages in thread
From: Mike Frysinger @ 2009-01-13 1:25 UTC (permalink / raw)
To: Mike Travis
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel
On Mon, Jan 12, 2009 at 20:21, Mike Travis wrote:
> Mike Frysinger wrote:
>> On Mon, Jan 12, 2009 at 17:05, Mike Travis wrote:
>>> Cc: Bryan Wu <cooloney@kernel.org>
>>
>> Blackfin CC should be more uclinux-dist-devel@blackfin.uclinux.org
>
> I saw that but it's flagged:
>
> L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only)
>
> I assumed that means the list does not want unsolicited mail?
no, it doesnt mean that. it's moderated due to spammers and the
original merge required the marking regardless of purpose. ive
updated the local MAINTAINERS file to remove that since all moderation
of non-subscribers is done transparently (no annoying notifications /
etc...).
-mike
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 6/8] parisc irq: update parisc for new irq_desc
2009-01-12 22:05 ` [PATCH 6/8] parisc irq: update parisc " Mike Travis
@ 2009-01-13 6:04 ` Kyle McMartin
0 siblings, 0 replies; 19+ messages in thread
From: Kyle McMartin @ 2009-01-13 6:04 UTC (permalink / raw)
To: Mike Travis
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel, Kyle McMartin, Matthew Wilcox, Grant Grundler,
linux-parisc
On Mon, Jan 12, 2009 at 02:05:25PM -0800, Mike Travis wrote:
> Impact: cleanup, update to new cpumask API
>
> Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
> so access to them should be using the new cpumask API.
>
ok.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's.
2009-01-13 0:15 ` Mike Travis
@ 2009-01-14 11:14 ` Ingo Molnar
0 siblings, 0 replies; 19+ messages in thread
From: Ingo Molnar @ 2009-01-14 11:14 UTC (permalink / raw)
To: Mike Travis
Cc: Ingo Molnar, Rusty Russell, Andrew Morton, Jack Steiner,
linux-kernel
* Mike Travis <travis@sgi.com> wrote:
> Ingo Molnar wrote:
> > * Mike Travis <travis@sgi.com> wrote:
> >
> >> Ingo - should I push these to tip/cpus4096 via the cpus4096-for-ingo
> >> tree since that has the relevant changes to irq_desc? Or by some other
> >> means?
> >
> > yes, please update cpus4096-for-ingo so that i can pull it from your tree.
> >
> > Ingo
>
> Hi Ingo,
>
> Here's the consolidated patches for the irq_desc cpumask changes. There was
> one small test merge conflict w/tip-master in kernel/irq/handle.c that I was not
> sure how to 'pre-fix' from this end.
>
> Also, I'm still hunting down that mail about the cross build tools.
>
> Thanks!
> Mike
>
>
> The following changes since commit 28e08861b9afab4168b758fb7b95aa7a4da0f668:
> Christophe Saout (1):
> xen: fix too early kmalloc call
>
> are available in the git repository at:
>
> ssh://master.kernel.org/pub/scm/linux/kernel/git/travis/linux-2.6-cpus4096-for-ingo.git master
>
> Mike Travis (1):
> irq: update all arches for new irq_desc
>
> arch/alpha/kernel/irq.c | 2 +-
> arch/arm/kernel/irq.c | 18 ++++++++++++------
> arch/arm/oprofile/op_model_mpcore.c | 2 +-
> arch/blackfin/kernel/irqchip.c | 5 +++++
> arch/ia64/kernel/iosapic.c | 2 +-
> arch/ia64/kernel/irq.c | 4 ++--
> arch/ia64/kernel/msi_ia64.c | 4 ++--
> arch/ia64/sn/kernel/msi_sn.c | 2 +-
> arch/mips/include/asm/irq.h | 2 +-
> arch/mips/kernel/irq-gic.c | 2 +-
> arch/mips/kernel/smtc.c | 2 +-
> arch/mips/mti-malta/malta-smtc.c | 5 +++--
> arch/parisc/kernel/irq.c | 8 ++++----
> arch/powerpc/kernel/irq.c | 2 +-
> arch/powerpc/platforms/pseries/xics.c | 5 +++--
> arch/powerpc/sysdev/mpic.c | 3 ++-
> arch/sparc/kernel/irq_64.c | 5 +++--
> 17 files changed, 44 insertions(+), 29 deletions(-)
Pulled into tip/cpus4096, thanks Mike!
Ingo
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2009-01-14 11:15 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 22:05 [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Travis
2009-01-12 22:05 ` [PATCH 1/8] alpha irq: update alpha for new irq_desc Mike Travis
2009-01-12 22:05 ` [PATCH 2/8] arm irq: update arm " Mike Travis
2009-01-12 22:05 ` [PATCH 3/8] blackfin irq: update blackfin " Mike Travis
2009-01-12 22:05 ` [PATCH 4/8] ia64 irq: update ia64 " Mike Travis
2009-01-12 22:05 ` [PATCH 5/8] mips irq: update mips " Mike Travis
2009-01-12 22:05 ` [PATCH 6/8] parisc irq: update parisc " Mike Travis
2009-01-13 6:04 ` Kyle McMartin
2009-01-12 22:05 ` [PATCH 7/8] powerpc irq: update powerpc " Mike Travis
2009-01-12 22:05 ` [PATCH 8/8] sparc irq: update sparc " Mike Travis
2009-01-12 22:07 ` [PATCH 0/8] irq: update all archs to use new irq_desc cpumask_var_t's Mike Frysinger
2009-01-13 1:21 ` Mike Travis
2009-01-13 1:25 ` Mike Frysinger
2009-01-12 22:20 ` Ingo Molnar
2009-01-12 22:21 ` Ingo Molnar
2009-01-12 22:31 ` Mike Travis
2009-01-12 22:52 ` Ingo Molnar
2009-01-13 0:15 ` Mike Travis
2009-01-14 11:14 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox