* powerpc/mpic: Fix allocation of reverse-map for multi-ISU mpics
@ 2012-02-22 23:50 Benjamin Herrenschmidt
2012-02-23 1:39 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2012-02-22 23:50 UTC (permalink / raw)
To: linuxppc-dev
When using a multi-ISU MPIC, we can interrupts up to
isu_size * MPIC_MAX_ISU, not just isu_size, so allocate
the right size reverse map.
Without this, the code will constantly fallback to
a linear search.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 4e9ccb1..7fb3ab5 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1346,7 +1346,8 @@ struct mpic * __init mpic_alloc(struct device_node *node,
mpic->isu_mask = (1 << mpic->isu_shift) - 1;
mpic->irqhost = irq_alloc_host(mpic->node, IRQ_HOST_MAP_LINEAR,
- isu_size ? isu_size : mpic->num_sources,
+ isu_size ? isu_size * MPIC_MAX_ISU :
+ mpic->num_sources,
&mpic_host_ops,
flags & MPIC_LARGE_VECTORS ? 2048 : 256);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: powerpc/mpic: Fix allocation of reverse-map for multi-ISU mpics
2012-02-22 23:50 powerpc/mpic: Fix allocation of reverse-map for multi-ISU mpics Benjamin Herrenschmidt
@ 2012-02-23 1:39 ` Grant Likely
2012-02-23 1:55 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2012-02-23 1:39 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
On Thu, Feb 23, 2012 at 10:50:13AM +1100, Benjamin Herrenschmidt wrote:
> When using a multi-ISU MPIC, we can interrupts up to
> isu_size * MPIC_MAX_ISU, not just isu_size, so allocate
> the right size reverse map.
>
> Without this, the code will constantly fallback to
> a linear search.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Looks fine to me. This will conflict with the irqdomain tree in linux-next,
but it will be a trivial fixup. Still, if you prefer I can pick this
up into my tree.
g.
> ---
>
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 4e9ccb1..7fb3ab5 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -1346,7 +1346,8 @@ struct mpic * __init mpic_alloc(struct device_node *node,
> mpic->isu_mask = (1 << mpic->isu_shift) - 1;
>
> mpic->irqhost = irq_alloc_host(mpic->node, IRQ_HOST_MAP_LINEAR,
> - isu_size ? isu_size : mpic->num_sources,
> + isu_size ? isu_size * MPIC_MAX_ISU :
> + mpic->num_sources,
> &mpic_host_ops,
> flags & MPIC_LARGE_VECTORS ? 2048 : 256);
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc/mpic: Fix allocation of reverse-map for multi-ISU mpics
2012-02-23 1:39 ` Grant Likely
@ 2012-02-23 1:55 ` Benjamin Herrenschmidt
2012-02-23 1:59 ` Grant Likely
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2012-02-23 1:55 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
On Wed, 2012-02-22 at 18:39 -0700, Grant Likely wrote:
>
> Looks fine to me. This will conflict with the irqdomain tree in linux-next,
> but it will be a trivial fixup. Still, if you prefer I can pick this
> up into my tree.
Well, I'm also going to carry a slightly modified variant of Kyle's
mpic series so we'll have to deal with conflicts regardless, I'll
keep that one.
What I might do tho is pull your tree in powerpc-next at some point,
when you tell me it's frozen solid, this will potentially make my life
easier.
Cheers,
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc/mpic: Fix allocation of reverse-map for multi-ISU mpics
2012-02-23 1:55 ` Benjamin Herrenschmidt
@ 2012-02-23 1:59 ` Grant Likely
0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2012-02-23 1:59 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
On Wed, Feb 22, 2012 at 6:55 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Wed, 2012-02-22 at 18:39 -0700, Grant Likely wrote:
>>
>> Looks fine to me. =A0This will conflict with the irqdomain tree in linux=
-next,
>> but it will be a trivial fixup. =A0Still, if you prefer I can pick this
>> up into my tree.
>
> Well, I'm also going to carry a slightly modified variant of Kyle's
> mpic series so we'll have to deal with conflicts regardless, I'll
> keep that one.
>
> What I might do tho is pull your tree in powerpc-next at some point,
> when you tell me it's frozen solid, this will potentially make my life
> easier.
It's frozen solid now. Any changes from this point on will be new
patches on top.
g.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-23 2:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-22 23:50 powerpc/mpic: Fix allocation of reverse-map for multi-ISU mpics Benjamin Herrenschmidt
2012-02-23 1:39 ` Grant Likely
2012-02-23 1:55 ` Benjamin Herrenschmidt
2012-02-23 1:59 ` Grant Likely
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).