<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> </DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Hello </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>I noticed the parameters in
/sys/devices/system/cpu/cpu# with the following :</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr>mmcr0 online pmc2
pmc5 smt_snooze_delay<BR>mmcr1 physical_id pmc3
pmc6 topology<BR>crash_notes mmcra
pmc1 pmc4
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 with macros
like HMT_very_low() , wonder if these can be set on
command line since I am running unmodified app binaries. </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thanks, </DIV>
<DIV>Mitesh</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><BR>Mitesh R. 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>> Arnd Bergmann
writes:<BR>><BR>>> From: Geoff Levand
<geoffrey.levand@am.sony.com><BR>>><BR>>> This patch removes
the incorrect Cell processor setup routine<BR>>> __setup_cpu_be.
This routine improperly accesses the hypervisor<BR>>> page size
configuration at SPR HID6. The correct behavior is for<BR>>>
firmware, or if needed, platform setup code, to set the correct<BR>>> page
size.<BR>><BR>>> -
.cpu_setup
= __setup_cpu_be,<BR>>>
+
.cpu_setup
= __setup_cpu_power4,<BR>><BR>>
That looks a bit dodgy. Either just remove the contents of<BR>>
__setup_cpu_be (leaving only the blr), or define a __setup_cpu_null<BR>> that
does nothing, or make the identify_cpu not call the cpu setup<BR>> function
if the pointer is NULL.<BR><BR><BR>OK, I set it up with __setup_cpu_null.
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.
__setup_cpu_be improperly<BR>accessed the hypervisor page size configuration at
SPR HID6. 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 <geoffrey.levand@am.sony.com><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
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> _GLOBAL(__setup_cpu_power4)<BR>
blr<BR><BR>-_GLOBAL(__setup_cpu_be)<BR>-
/* Set large page sizes LP=0: 16MB, LP=1: 64KB
*/<BR>- addi r3,
0, 0<BR>-
ori r3, r3,
HID6_LB<BR>- sldi
r3, r3, 32<BR>-
nor r3, r3,
r3<BR>- mfspr r4,
SPRN_HID6<BR>-
and r4, r4,
r3<BR>- addi r3, 0,
0x02000<BR>- sldi
r3, r3, 32<BR>-
or r4, r4,
r3<BR>- mtspr SPRN_HID6,
r4<BR>-
blr<BR>-<BR> _GLOBAL(__setup_cpu_ppc970)<BR>
mfspr r0,SPRN_HID0<BR>
li r11,5
/* 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 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> * and
ppc64<BR> */<BR> #ifdef CONFIG_PPC64<BR>+extern void
__setup_cpu_null(unsigned long offset, struct cpu_spec* spec);<BR> extern
void __setup_cpu_power3(unsigned long offset, struct cpu_spec*
spec);<BR> 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> #else<BR> extern void __setup_cpu_603(unsigned
long offset, struct cpu_spec* spec);<BR> extern void
__setup_cpu_604(unsigned long offset, struct cpu_spec* spec);<BR>@@ -273,7
+273,7 @@<BR>
PPC_FEATURE_SMT,<BR>
.icache_bsize
=
128,<BR>
.dcache_bsize
=
128,<BR>-
.cpu_setup
=
__setup_cpu_be,<BR>+
.cpu_setup
=
__setup_cpu_null,<BR>
.platform
=
"ppc-cell-be",<BR>
},<BR>
{ /* 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
2006-04-26 19:19:25.000000000 -0700<BR>+++
cell--alp--3/arch/powerpc/kernel/misc_64.S 2006-05-05 16:04:59.000000000
-0700<BR>@@ -768,6 +768,9 @@<BR><BR> #endif /* CONFIG_ALTIVEC
*/<BR><BR>+_GLOBAL(__setup_cpu_null)<BR>+
blr<BR>+<BR> _GLOBAL(__setup_cpu_power3)<BR>
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>