<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>

<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>Re: [PATCH 04/13] cell: remove broken __setup_cpu_be function</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText4852 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Hello </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>I am looking to use the SMT related 
parameters like Snooze delay, HMT thread priorities, SMT ON/Off and wanted to 
know how to invoke and set them. I am running Open Suse 10 with 
2.6.16.rc4-3-ppc64 kernel on eServer p590 2-way POWER5 partition. </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>I noticed the parameters in 
/sys/devices/system/cpu/cpu#&nbsp;&nbsp; with the following :</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr>mmcr0&nbsp; online&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pmc2&nbsp; 
pmc5&nbsp; smt_snooze_delay<BR>mmcr1&nbsp; physical_id&nbsp; pmc3&nbsp; 
pmc6&nbsp; topology<BR>crash_notes&nbsp; mmcra&nbsp; 
pmc1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pmc4&nbsp; 
purr<BR></DIV></DIV>
<DIV id=idSignature26272 dir=ltr><FONT face=Arial color=#000000 size=2>
<DIV>setting the value in online to 0 seems to turn off the logical processor, 
but I am not sure what the others are for and the meaning of their hex values? 
</DIV>
<DIV>It seems that there is include/asm-ppc64/processor.h&nbsp; with macros 
like&nbsp;HMT_very_low()&nbsp;&nbsp;, &nbsp;wonder if these can be set on 
command line since I am running unmodified app binaries. </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks, </DIV>
<DIV>Mitesh</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>Mitesh R.&nbsp;Meswani <BR>Ph.D. Candidate </DIV>
<DIV>Research Associate, PLS2 Group</DIV>
<DIV>Room 106 F, Department of Computer Science</DIV>
<DIV>The University of Texas at El Paso, </DIV>
<DIV>El Paso, Texas 79968<BR>Tel: 915 747 8012 (O)</DIV>
<DIV>Email: mmeswani@utep.edu</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
linuxppc-dev-bounces+mmeswani=utep.edu@ozlabs.org on behalf of Geoff 
Levand<BR><B>Sent:</B> Fri 5/5/2006 6:00 PM<BR><B>To:</B> Paul 
Mackerras<BR><B>Cc:</B> Arnd Bergmann; Levand,Geoffrey; 
linux-kernel@vger.kernel.org; linuxppc-dev@ozlabs.org; Arnd Bergmann; 
cbe-oss-dev@ozlabs.org<BR><B>Subject:</B> Re: [PATCH 04/13] cell: remove broken 
__setup_cpu_be function<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Paul Mackerras wrote:<BR>&gt; Arnd Bergmann 
writes:<BR>&gt;<BR>&gt;&gt;&nbsp; From: Geoff Levand 
&lt;geoffrey.levand@am.sony.com&gt;<BR>&gt;&gt;<BR>&gt;&gt; This patch removes 
the incorrect Cell processor setup routine<BR>&gt;&gt; __setup_cpu_be.&nbsp; 
This routine improperly accesses the hypervisor<BR>&gt;&gt; page size 
configuration at SPR HID6.&nbsp; The correct behavior is for<BR>&gt;&gt; 
firmware, or if needed, platform setup code, to set the correct<BR>&gt;&gt; page 
size.<BR>&gt;<BR>&gt;&gt; -&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
.cpu_setup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = __setup_cpu_be,<BR>&gt;&gt; 
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
.cpu_setup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = __setup_cpu_power4,<BR>&gt;<BR>&gt; 
That looks a bit dodgy.&nbsp; Either just remove the contents of<BR>&gt; 
__setup_cpu_be (leaving only the blr), or define a __setup_cpu_null<BR>&gt; that 
does nothing, or make the identify_cpu not call the cpu setup<BR>&gt; function 
if the pointer is NULL.<BR><BR><BR>OK, I set it up with __setup_cpu_null.&nbsp; 
An updated patch follows.<BR><BR>It falls out from this that we can replace the 
do-nothing routines<BR>__setup_cpu_power3 and __setup_cpu_power4 with 
__setup_cpu_null also.<BR>I'll post a separate patch for 
consideration.<BR><BR>-Geoff<BR><BR><BR>Replaced the Cell processor specific 
routine __setup_cpu_be with<BR>a new generic routine __setup_cpu_null.&nbsp; 
__setup_cpu_be improperly<BR>accessed the hypervisor page size configuration at 
SPR HID6.&nbsp; Correct<BR>behavior is for firmware, or if needed, platform 
setup code, to set<BR>the correct page size.<BR><BR><BR>Signed-off-by: Geoff 
Levand &lt;geoffrey.levand@am.sony.com&gt;<BR><BR><BR>Index: 
cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S<BR>===================================================================<BR>--- 
cell--alp--3.orig/arch/powerpc/kernel/cpu_setup_power4.S&nbsp;&nbsp;&nbsp; 
2006-04-26 19:19:25.000000000 -0700<BR>+++ 
cell--alp--3/arch/powerpc/kernel/cpu_setup_power4.S 2006-05-05 
15:59:58.000000000 -0700<BR>@@ -76,20 +76,6 
@@<BR>&nbsp;_GLOBAL(__setup_cpu_power4)<BR>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&nbsp;_GLOBAL(__setup_cpu_ppc970)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
mfspr&nbsp;&nbsp; r0,SPRN_HID0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
li&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r11,5&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* clear DOZE and SLEEP */<BR>Index: 
cell--alp--3/arch/powerpc/kernel/cputable.c<BR>===================================================================<BR>--- 
cell--alp--3.orig/arch/powerpc/kernel/cputable.c&nbsp;&nbsp;&nbsp; 2006-04-26 
19:19:25.000000000 -0700<BR>+++ cell--alp--3/arch/powerpc/kernel/cputable.c 
2006-05-05 16:29:06.000000000 -0700<BR>@@ -31,9 +31,9 @@<BR>&nbsp; * and 
ppc64<BR>&nbsp; */<BR>&nbsp;#ifdef CONFIG_PPC64<BR>+extern void 
__setup_cpu_null(unsigned long offset, struct cpu_spec* spec);<BR>&nbsp;extern 
void __setup_cpu_power3(unsigned long offset, struct cpu_spec* 
spec);<BR>&nbsp;extern void __setup_cpu_power4(unsigned long offset, struct 
cpu_spec* spec);<BR>-extern void __setup_cpu_be(unsigned long offset, struct 
cpu_spec* spec);<BR>&nbsp;#else<BR>&nbsp;extern void __setup_cpu_603(unsigned 
long offset, struct cpu_spec* spec);<BR>&nbsp;extern void 
__setup_cpu_604(unsigned long offset, struct cpu_spec* spec);<BR>@@ -273,7 
+273,7 @@<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
PPC_FEATURE_SMT,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .icache_bsize&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 
128,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .dcache_bsize&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 
128,<BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
.cpu_setup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 
__setup_cpu_be,<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
.cpu_setup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 
__setup_cpu_null,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
.platform&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 
"ppc-cell-be",<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
},<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* default match */<BR>Index: 
cell--alp--3/arch/powerpc/kernel/misc_64.S<BR>===================================================================<BR>--- 
cell--alp--3.orig/arch/powerpc/kernel/misc_64.S&nbsp;&nbsp;&nbsp;&nbsp; 
2006-04-26 19:19:25.000000000 -0700<BR>+++ 
cell--alp--3/arch/powerpc/kernel/misc_64.S&nbsp; 2006-05-05 16:04:59.000000000 
-0700<BR>@@ -768,6 +768,9 @@<BR><BR>&nbsp;#endif /* CONFIG_ALTIVEC 
*/<BR><BR>+_GLOBAL(__setup_cpu_null)<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
blr<BR>+<BR>&nbsp;_GLOBAL(__setup_cpu_power3)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
blr<BR><BR>_______________________________________________<BR>Linuxppc-dev 
mailing list<BR>Linuxppc-dev@ozlabs.org<BR><A 
href="https://ozlabs.org/mailman/listinfo/linuxppc-dev">https://ozlabs.org/mailman/listinfo/linuxppc-dev</A><BR></FONT></P></DIV>

</BODY>
</HTML>