linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [POWERPC] Support setting affinity for U3/U4 MSI sources
@ 2007-09-17 20:12 Olof Johansson
  2007-09-18  4:26 ` Benjamin Herrenschmidt
  2007-09-20  6:36 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Olof Johansson @ 2007-09-17 20:12 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev

Hook up affinity-setting for U3/U4 MSI interrupt sources.

Tested on Quad G5 with myri10ge.


Signed-off-by: Olof Johansson <olof@lixom.net>

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 8de29f2..22600fd 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -768,7 +768,7 @@ static void mpic_end_ipi(unsigned int irq)
 
 #endif /* CONFIG_SMP */
 
-static void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
+void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
 {
 	struct mpic *mpic = mpic_from_irq(irq);
 	unsigned int src = mpic_irq_to_hw(irq);
diff --git a/arch/powerpc/sysdev/mpic.h b/arch/powerpc/sysdev/mpic.h
index 3a1c3d2..1cb6bd8 100644
--- a/arch/powerpc/sysdev/mpic.h
+++ b/arch/powerpc/sysdev/mpic.h
@@ -34,5 +34,6 @@ extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
 extern void mpic_end_irq(unsigned int irq);
 extern void mpic_mask_irq(unsigned int irq);
 extern void mpic_unmask_irq(unsigned int irq);
+extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask);
 
 #endif /* _POWERPC_SYSDEV_MPIC_H */
diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
index 305b864..0fc4e96 100644
--- a/arch/powerpc/sysdev/mpic_u3msi.c
+++ b/arch/powerpc/sysdev/mpic_u3msi.c
@@ -40,6 +40,7 @@ static struct irq_chip mpic_u3msi_chip = {
 	.unmask		= mpic_u3msi_unmask_irq,
 	.eoi		= mpic_end_irq,
 	.set_type	= mpic_set_irq_type,
+	.set_affinity	= mpic_set_affinity,
 	.typename	= "MPIC-U3MSI",
 };
 

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

* Re: [PATCH] [POWERPC] Support setting affinity for U3/U4 MSI sources
  2007-09-17 20:12 [PATCH] [POWERPC] Support setting affinity for U3/U4 MSI sources Olof Johansson
@ 2007-09-18  4:26 ` Benjamin Herrenschmidt
  2007-09-20  6:36 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2007-09-18  4:26 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, paulus

On Mon, 2007-09-17 at 15:12 -0500, Olof Johansson wrote:
> Hook up affinity-setting for U3/U4 MSI interrupt sources.
> 
> Tested on Quad G5 with myri10ge.
> 
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> 
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 8de29f2..22600fd 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -768,7 +768,7 @@ static void mpic_end_ipi(unsigned int irq)
>  
>  #endif /* CONFIG_SMP */
>  
> -static void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
> +void mpic_set_affinity(unsigned int irq, cpumask_t cpumask)
>  {
>  	struct mpic *mpic = mpic_from_irq(irq);
>  	unsigned int src = mpic_irq_to_hw(irq);
> diff --git a/arch/powerpc/sysdev/mpic.h b/arch/powerpc/sysdev/mpic.h
> index 3a1c3d2..1cb6bd8 100644
> --- a/arch/powerpc/sysdev/mpic.h
> +++ b/arch/powerpc/sysdev/mpic.h
> @@ -34,5 +34,6 @@ extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
>  extern void mpic_end_irq(unsigned int irq);
>  extern void mpic_mask_irq(unsigned int irq);
>  extern void mpic_unmask_irq(unsigned int irq);
> +extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask);
>  
>  #endif /* _POWERPC_SYSDEV_MPIC_H */
> diff --git a/arch/powerpc/sysdev/mpic_u3msi.c b/arch/powerpc/sysdev/mpic_u3msi.c
> index 305b864..0fc4e96 100644
> --- a/arch/powerpc/sysdev/mpic_u3msi.c
> +++ b/arch/powerpc/sysdev/mpic_u3msi.c
> @@ -40,6 +40,7 @@ static struct irq_chip mpic_u3msi_chip = {
>  	.unmask		= mpic_u3msi_unmask_irq,
>  	.eoi		= mpic_end_irq,
>  	.set_type	= mpic_set_irq_type,
> +	.set_affinity	= mpic_set_affinity,
>  	.typename	= "MPIC-U3MSI",
>  };
>  
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

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

* Re: [PATCH] [POWERPC] Support setting affinity for U3/U4 MSI sources
  2007-09-17 20:12 [PATCH] [POWERPC] Support setting affinity for U3/U4 MSI sources Olof Johansson
  2007-09-18  4:26 ` Benjamin Herrenschmidt
@ 2007-09-20  6:36 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2007-09-20  6:36 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, paulus

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

On Mon, 2007-09-17 at 15:12 -0500, Olof Johansson wrote:
> Hook up affinity-setting for U3/U4 MSI interrupt sources.
> 
> Tested on Quad G5 with myri10ge.

And a JS21 blade:

# echo 1 > /proc/irq/21/smp_affinity 
# cat /proc/interrupts 
           CPU0       CPU1       
 21:        126        375  MPIC-U3MSI Edge      eth1
# ping -c 1000 -f cradle
1000 packets transmitted, 1000 received, 0% packet loss, time 135ms
# cat /proc/interrupts 
           CPU0       CPU1       
 21:       2153        375  MPIC-U3MSI Edge      eth1
# echo 2 > /proc/irq/21/smp_affinity 
# cat /proc/interrupts 
           CPU0       CPU1       
 21:       2174        379  MPIC-U3MSI Edge      eth1
# ping -c 1000 -f cradle
1000 packets transmitted, 1000 received, 0% packet loss, time 138ms
# cat /proc/interrupts 
           CPU0       CPU1       
 21:       2174       2389  MPIC-U3MSI Edge      eth1


Acked-by: Michael Ellerman <michael@ellerman.id.au>

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2007-09-20  6:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-17 20:12 [PATCH] [POWERPC] Support setting affinity for U3/U4 MSI sources Olof Johansson
2007-09-18  4:26 ` Benjamin Herrenschmidt
2007-09-20  6:36 ` Michael Ellerman

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).