[PATCH] ppc64: Spread lpevents by default on iSeries

Michael Ellerman michael at ellerman.id.au
Wed Jun 22 14:58:06 EST 2005


This patch changes the macros that initialise the paca array on iSeries,
such that every CPU processes lpevents by default. This makes the default
behaviour equivalent to specifying "spread_lpevents=n" on the kernel
command line, where n = number of cpus.

The spread_lpevents command line option remains in case people want the
old behaviour.


Signed-off-by: Michael Ellerman <michael at ellerman.id.au>

---

 arch/ppc64/kernel/iSeries_setup.c |    3 +++
 arch/ppc64/kernel/pacaData.c      |    8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

Index: work/arch/ppc64/kernel/pacaData.c
===================================================================
--- work.orig/arch/ppc64/kernel/pacaData.c
+++ work/arch/ppc64/kernel/pacaData.c
@@ -62,9 +62,9 @@ extern unsigned long __toc_start;
 	},								    \
 
 #ifdef CONFIG_PPC_ISERIES
-#define PACA_INIT_ISERIES(number, lpq)					    \
+#define PACA_INIT_ISERIES(number)					    \
 	.lppaca_ptr = &paca[number].lppaca,				    \
-	.lpqueue_ptr = (lpq),		/* &xItLpQueue, */		    \
+	.lpqueue_ptr = &xItLpQueue,					    \
 	.reg_save_ptr = &paca[number].reg_save,				    \
 	.reg_save = {							    \
 		.xDesc = 0xd397d9e2,	/* "LpRS" */			    \
@@ -74,13 +74,13 @@ extern unsigned long __toc_start;
 #define PACAINITDATA(number)						    \
 {									    \
 	PACA_INIT_COMMON(number, 0, 0, 0)				    \
-	PACA_INIT_ISERIES(number, NULL)					    \
+	PACA_INIT_ISERIES(number)					    \
 }
 
 #define BOOTCPU_PACAINITDATA(number)					    \
 {									    \
 	PACA_INIT_COMMON(number, 1, 0, STAB0_VIRT_ADDR)			    \
-	PACA_INIT_ISERIES(number, &xItLpQueue)				    \
+	PACA_INIT_ISERIES(number)					    \
 }
 
 #else
Index: work/arch/ppc64/kernel/iSeries_setup.c
===================================================================
--- work.orig/arch/ppc64/kernel/iSeries_setup.c
+++ work/arch/ppc64/kernel/iSeries_setup.c
@@ -871,6 +871,9 @@ static int set_spread_lpevents(char *str
 		for (i = 1; i < val; ++i)
 			paca[i].lpqueue_ptr = paca[0].lpqueue_ptr;
 
+		for (; i < NR_CPUS; ++i)
+			paca[i].lpqueue_ptr = NULL;
+
 		printk("lpevent processing spread over %ld processors\n", val);
 	} else {
 		printk("invalid spread_lpevents %ld\n", val);



More information about the Linuxppc64-dev mailing list