All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.
@ 2012-03-27 12:15 Varun Sethi
  2012-03-27 13:30 ` Kumar Gala
  0 siblings, 1 reply; 8+ messages in thread
From: Varun Sethi @ 2012-03-27 12:15 UTC (permalink / raw)
  To: Linuxppc-dev; +Cc: Varun Sethi

FSL MPIC supports 16 bit vectors so our vector number space isn't
restricted to 256 vectors. We should use the MPIC_LARG_VECTORS flag
while intializing the MPIC. This also prevents us from eating in to 
hardware vector number space (MSIs) while setting up internal sources.

Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
---
 arch/powerpc/sysdev/mpic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 8be1ea2..33520dd 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1191,7 +1191,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
 	if (of_get_property(node, "single-cpu-affinity", NULL))
 		flags |= MPIC_SINGLE_DEST_CPU;
 	if (of_device_is_compatible(node, "fsl,mpic"))
-		flags |= MPIC_FSL;
+		flags |= MPIC_FSL | MPIC_LARGE_VECTORS;
 
 	mpic = kzalloc(sizeof(struct mpic), GFP_KERNEL);
 	if (mpic == NULL)
-- 
1.7.2.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.
  2012-03-27 12:15 [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC Varun Sethi
@ 2012-03-27 13:30 ` Kumar Gala
  2012-03-27 13:59   ` Sethi Varun-B16395
  2012-03-27 15:21   ` Stuart Yoder
  0 siblings, 2 replies; 8+ messages in thread
From: Kumar Gala @ 2012-03-27 13:30 UTC (permalink / raw)
  To: Varun Sethi; +Cc: Linuxppc-dev


On Mar 27, 2012, at 7:15 AM, Varun Sethi wrote:

> FSL MPIC supports 16 bit vectors so our vector number space isn't
> restricted to 256 vectors. We should use the MPIC_LARG_VECTORS flag
> while intializing the MPIC. This also prevents us from eating in to=20
> hardware vector number space (MSIs) while setting up internal sources.

What is driving this change?  The commit message isn't quite correct as =
MPIC_LARGE_VECTORS is about the # of IRQs, not the fact that vector =
field is 16-bits.

>=20
> Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
> ---
> arch/powerpc/sysdev/mpic.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>=20
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 8be1ea2..33520dd 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -1191,7 +1191,7 @@ struct mpic * __init mpic_alloc(struct =
device_node *node,
> 	if (of_get_property(node, "single-cpu-affinity", NULL))
> 		flags |=3D MPIC_SINGLE_DEST_CPU;
> 	if (of_device_is_compatible(node, "fsl,mpic"))
> -		flags |=3D MPIC_FSL;
> +		flags |=3D MPIC_FSL | MPIC_LARGE_VECTORS;
>=20
> 	mpic =3D kzalloc(sizeof(struct mpic), GFP_KERNEL);
> 	if (mpic =3D=3D NULL)
> --=20
> 1.7.2.2
>=20
>=20
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.
  2012-03-27 13:30 ` Kumar Gala
@ 2012-03-27 13:59   ` Sethi Varun-B16395
  2012-03-27 15:21   ` Stuart Yoder
  1 sibling, 0 replies; 8+ messages in thread
From: Sethi Varun-B16395 @ 2012-03-27 13:59 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Linuxppc-dev



> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Tuesday, March 27, 2012 7:01 PM
> To: Sethi Varun-B16395
> Cc: Linuxppc-dev@lists.ozlabs.org
> Subject: Re: [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag
> for FSL MPIC.
>=20
>=20
> On Mar 27, 2012, at 7:15 AM, Varun Sethi wrote:
>=20
> > FSL MPIC supports 16 bit vectors so our vector number space isn't
> > restricted to 256 vectors. We should use the MPIC_LARG_VECTORS flag
> > while intializing the MPIC. This also prevents us from eating in to
> > hardware vector number space (MSIs) while setting up internal sources.
>=20
> What is driving this change?  The commit message isn't quite correct as
> MPIC_LARGE_VECTORS is about the # of IRQs, not the fact that vector field
> is 16-bits.
>=20
[Sethi Varun-B16395] We derive the internal interrupt source vector numbers=
 from the
number of supported hardware interrupt sources. With the current value of 2=
56
we end up using vector numbers (for internal sources) corresponding to actu=
al hardware
interrupts. With the MPIC_LARGE_VECTORS flag we can avoid eating in to hard=
ware vector
number space.

-Varun

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.
  2012-03-27 13:30 ` Kumar Gala
  2012-03-27 13:59   ` Sethi Varun-B16395
@ 2012-03-27 15:21   ` Stuart Yoder
  2012-03-27 18:44     ` Scott Wood
  1 sibling, 1 reply; 8+ messages in thread
From: Stuart Yoder @ 2012-03-27 15:21 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Varun Sethi, Linuxppc-dev

On Tue, Mar 27, 2012 at 8:30 AM, Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On Mar 27, 2012, at 7:15 AM, Varun Sethi wrote:
>
>> FSL MPIC supports 16 bit vectors so our vector number space isn't
>> restricted to 256 vectors. We should use the MPIC_LARG_VECTORS flag
>> while intializing the MPIC. This also prevents us from eating in to
>> hardware vector number space (MSIs) while setting up internal sources.
>
> What is driving this change?

Whats driving the change is proper handling of error interrupts.   Right
now error interrupts (muxed on int 16) are treated as a shared
interrupt source.   We want each to be handled as a individual interrupt
source...thus the desire to support more than 256 interrupts.

Stuart

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.
  2012-03-27 15:21   ` Stuart Yoder
@ 2012-03-27 18:44     ` Scott Wood
  2012-03-27 18:47       ` Scott Wood
  2012-03-27 19:16       ` Scott Wood
  0 siblings, 2 replies; 8+ messages in thread
From: Scott Wood @ 2012-03-27 18:44 UTC (permalink / raw)
  To: Stuart Yoder; +Cc: Varun Sethi, Linuxppc-dev

On 03/27/2012 10:21 AM, Stuart Yoder wrote:
> On Tue, Mar 27, 2012 at 8:30 AM, Kumar Gala <galak@kernel.crashing.org> wrote:
>>
>> On Mar 27, 2012, at 7:15 AM, Varun Sethi wrote:
>>
>>> FSL MPIC supports 16 bit vectors so our vector number space isn't
>>> restricted to 256 vectors. We should use the MPIC_LARG_VECTORS flag
>>> while intializing the MPIC. This also prevents us from eating in to
>>> hardware vector number space (MSIs) while setting up internal sources.
>>
>> What is driving this change?
> 
> Whats driving the change is proper handling of error interrupts.   Right
> now error interrupts (muxed on int 16) are treated as a shared
> interrupt source.   We want each to be handled as a individual interrupt
> source...thus the desire to support more than 256 interrupts.

We don't actually need more than 256 interrupts for this (the individual
error interrupts are not counted against this).  But unless we change
how vectors are allocated, we need vectors >= 256, since we have MSIs
close enough to 256 that under the current scheme the IPIs, timers, and
such collide with the third MSI bank.

-Scott

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.
  2012-03-27 18:44     ` Scott Wood
@ 2012-03-27 18:47       ` Scott Wood
  2012-03-27 19:16       ` Scott Wood
  1 sibling, 0 replies; 8+ messages in thread
From: Scott Wood @ 2012-03-27 18:47 UTC (permalink / raw)
  To: Stuart Yoder; +Cc: Varun Sethi, Linuxppc-dev

On 03/27/2012 01:44 PM, Scott Wood wrote:
> On 03/27/2012 10:21 AM, Stuart Yoder wrote:
>> On Tue, Mar 27, 2012 at 8:30 AM, Kumar Gala <galak@kernel.crashing.org> wrote:
>>>
>>> On Mar 27, 2012, at 7:15 AM, Varun Sethi wrote:
>>>
>>>> FSL MPIC supports 16 bit vectors so our vector number space isn't
>>>> restricted to 256 vectors. We should use the MPIC_LARG_VECTORS flag
>>>> while intializing the MPIC. This also prevents us from eating in to
>>>> hardware vector number space (MSIs) while setting up internal sources.
>>>
>>> What is driving this change?
>>
>> Whats driving the change is proper handling of error interrupts.   Right
>> now error interrupts (muxed on int 16) are treated as a shared
>> interrupt source.   We want each to be handled as a individual interrupt
>> source...thus the desire to support more than 256 interrupts.
> 
> We don't actually need more than 256 interrupts for this (the individual
> error interrupts are not counted against this).  But unless we change
> how vectors are allocated, we need vectors >= 256, since we have MSIs
> close enough to 256 that under the current scheme the IPIs, timers, and
> such collide with the third MSI bank.

Sorry, I misremembered -- the error interrupts do count against the 256,
but only for Linux IRQ numbering purposes (not hardware vector assignment).

-Scott

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.
  2012-03-27 18:44     ` Scott Wood
  2012-03-27 18:47       ` Scott Wood
@ 2012-03-27 19:16       ` Scott Wood
  2012-03-28 14:52         ` Kumar Gala
  1 sibling, 1 reply; 8+ messages in thread
From: Scott Wood @ 2012-03-27 19:16 UTC (permalink / raw)
  To: Stuart Yoder; +Cc: Varun Sethi, Linuxppc-dev

On 03/27/2012 01:44 PM, Scott Wood wrote:
> On 03/27/2012 10:21 AM, Stuart Yoder wrote:
>> On Tue, Mar 27, 2012 at 8:30 AM, Kumar Gala <galak@kernel.crashing.org> wrote:
>>>
>>> On Mar 27, 2012, at 7:15 AM, Varun Sethi wrote:
>>>
>>>> FSL MPIC supports 16 bit vectors so our vector number space isn't
>>>> restricted to 256 vectors. We should use the MPIC_LARG_VECTORS flag
>>>> while intializing the MPIC. This also prevents us from eating in to
>>>> hardware vector number space (MSIs) while setting up internal sources.
>>>
>>> What is driving this change?
>>
>> Whats driving the change is proper handling of error interrupts.   Right
>> now error interrupts (muxed on int 16) are treated as a shared
>> interrupt source.   We want each to be handled as a individual interrupt
>> source...thus the desire to support more than 256 interrupts.
> 
> We don't actually need more than 256 interrupts for this (the individual
> error interrupts are not counted against this).  But unless we change
> how vectors are allocated, we need vectors >= 256, since we have MSIs
> close enough to 256 that under the current scheme the IPIs, timers, and
> such collide with the third MSI bank.

Note that this is the case today even without the error interrupt stuff
-- the highest vector used by MSIs on MPIC 4.1 is 0xf7, and we have 13
special vectors (4 IPIs, 8 timers, and spurious).

-Scott

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.
  2012-03-27 19:16       ` Scott Wood
@ 2012-03-28 14:52         ` Kumar Gala
  0 siblings, 0 replies; 8+ messages in thread
From: Kumar Gala @ 2012-03-28 14:52 UTC (permalink / raw)
  To: Scott Wood; +Cc: Varun Sethi, Linuxppc-dev, Stuart Yoder


On Mar 27, 2012, at 2:16 PM, Scott Wood wrote:

> On 03/27/2012 01:44 PM, Scott Wood wrote:
>> On 03/27/2012 10:21 AM, Stuart Yoder wrote:
>>> On Tue, Mar 27, 2012 at 8:30 AM, Kumar Gala =
<galak@kernel.crashing.org> wrote:
>>>>=20
>>>> On Mar 27, 2012, at 7:15 AM, Varun Sethi wrote:
>>>>=20
>>>>> FSL MPIC supports 16 bit vectors so our vector number space isn't
>>>>> restricted to 256 vectors. We should use the MPIC_LARG_VECTORS =
flag
>>>>> while intializing the MPIC. This also prevents us from eating in =
to
>>>>> hardware vector number space (MSIs) while setting up internal =
sources.
>>>>=20
>>>> What is driving this change?
>>>=20
>>> Whats driving the change is proper handling of error interrupts.   =
Right
>>> now error interrupts (muxed on int 16) are treated as a shared
>>> interrupt source.   We want each to be handled as a individual =
interrupt
>>> source...thus the desire to support more than 256 interrupts.
>>=20
>> We don't actually need more than 256 interrupts for this (the =
individual
>> error interrupts are not counted against this).  But unless we change
>> how vectors are allocated, we need vectors >=3D 256, since we have =
MSIs
>> close enough to 256 that under the current scheme the IPIs, timers, =
and
>> such collide with the third MSI bank.
>=20
> Note that this is the case today even without the error interrupt =
stuff
> -- the highest vector used by MSIs on MPIC 4.1 is 0xf7, and we have 13
> special vectors (4 IPIs, 8 timers, and spurious).

This all makes sense, what I ask is that the commit message be updated =
to convey this.

- k=

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-03-28 14:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-27 12:15 [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC Varun Sethi
2012-03-27 13:30 ` Kumar Gala
2012-03-27 13:59   ` Sethi Varun-B16395
2012-03-27 15:21   ` Stuart Yoder
2012-03-27 18:44     ` Scott Wood
2012-03-27 18:47       ` Scott Wood
2012-03-27 19:16       ` Scott Wood
2012-03-28 14:52         ` Kumar Gala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.