* [PATCH] When complaining about attempting to set the irq affinity to multiple cpus,
@ 2009-09-21 21:13 Mark Mason
2009-09-23 20:50 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Mark Mason @ 2009-09-21 21:13 UTC (permalink / raw)
To: linux-mips; +Cc: Mark Mason
---
arch/mips/sibyte/bcm1480/irq.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index ba59839..fc87ea4 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -118,7 +118,11 @@ static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
unsigned int irq_dirty;
if (cpumask_weight(mask) != 1) {
- printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
+ printk("attempted to set irq affinity for irq %d to multiple CPUs:", irq);
+ /* Print the mask */
+ for_each_cpu(i, mask)
+ printk(" %d", i);
+ printk("\n");
return -1;
}
i = cpumask_first(mask);
--
1.6.0.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] When complaining about attempting to set the irq affinity to multiple cpus,
2009-09-21 21:13 [PATCH] When complaining about attempting to set the irq affinity to multiple cpus, Mark Mason
@ 2009-09-23 20:50 ` Ralf Baechle
[not found] ` <BD3F7F1EFBA6D54DB056C4FFA4514008037D6641C8@SJEXCHCCR01.corp.ad.broadcom.com>
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2009-09-23 20:50 UTC (permalink / raw)
To: Mark Mason; +Cc: linux-mips
On Mon, Sep 21, 2009 at 02:13:24PM -0700, Mark Mason wrote:
> arch/mips/sibyte/bcm1480/irq.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
> index ba59839..fc87ea4 100644
> --- a/arch/mips/sibyte/bcm1480/irq.c
> +++ b/arch/mips/sibyte/bcm1480/irq.c
> @@ -118,7 +118,11 @@ static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
> unsigned int irq_dirty;
>
> if (cpumask_weight(mask) != 1) {
> - printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
> + printk("attempted to set irq affinity for irq %d to multiple CPUs:", irq);
> + /* Print the mask */
> + for_each_cpu(i, mask)
> + printk(" %d", i);
> + printk("\n");
The whole if block is a zombie that was supposed to have been
removed by commit 14275ccdb1e4b487cca745aba994699c426a31ee but then
returned in 92241940be501f798cb21db344bbb3d1ec3c4f1c. So I went for a
slightly different patch, see below.
Thanks,
Ralf
MIPS: BCM1480: Re-apply patch lost due to bad resolution of merge conflict.
Patch 14275ccdb1e4b487cca745aba994699c426a31ee and
d5dedd4507d307eb3f35f21b6e16f336fdc0d82a are conflicting and the
conflict was resolved badly in merge
92241940be501f798cb21db344bbb3d1ec3c4f1c resulting in the BCM1480 changes
of 14275ccdb1e4b487cca745aba994699c426a31ee getting lost. Sort out the
damage.
Reported and initial patch by Mark Mason <mmason@upwardaccess.com>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index ba59839..4070268 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -117,10 +117,6 @@ static int bcm1480_set_affinity(unsigned int irq, const struct cpumask *mask)
unsigned long flags;
unsigned int irq_dirty;
- if (cpumask_weight(mask) != 1) {
- printk("attempted to set irq affinity for irq %d to multiple CPUs\n", irq);
- return -1;
- }
i = cpumask_first(mask);
/* Convert logical CPU to physical CPU */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] When complaining about attempting to set the irq affinity to multiple cpus,
[not found] ` <BD3F7F1EFBA6D54DB056C4FFA4514008037D6641C8@SJEXCHCCR01.corp.ad.broadcom.com>
@ 2009-09-23 21:24 ` Ralf Baechle
0 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2009-09-23 21:24 UTC (permalink / raw)
To: Mark E Mason; +Cc: Mark Mason, linux-mips@linux-mips.org
On Wed, Sep 23, 2009 at 02:09:34PM -0700, Mark E Mason wrote:
> Did we ever figure out why the kernel was attempting to set the affinity to more than one CPU? The hardware certainly supports doing that (but we're not at the moment).
The hardware semantics is a bit ususual. On Sibyte the hardware will
route an interrupt to all CPUs set in the affinity mask. On most other
systems that I'm aware of it will route the interrupt to only one of
CPUs selected by irq_chip->set_affinity(). We don't want such an
stampede so the Sibyte interrupt code clears all but the lowest set
bit from the set_affinity() argument. Either way, attempting to set
the mask to an arbitrary non-empty set is entirely legal so the warning
itself was a bug and the volume potencially made them a real problem for
a few users.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-23 21:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-21 21:13 [PATCH] When complaining about attempting to set the irq affinity to multiple cpus, Mark Mason
2009-09-23 20:50 ` Ralf Baechle
[not found] ` <BD3F7F1EFBA6D54DB056C4FFA4514008037D6641C8@SJEXCHCCR01.corp.ad.broadcom.com>
2009-09-23 21:24 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).