Skip to contentSkip to conversation

Need testers: G3 @ G4 laptops (powerbooks & ibooks)

PATCH Benjamin Herrenschmidt 9 participants 13 messages Feb 18, 2004 – Feb 24, 2004

lore
Share & tools
lore
#0 lore raw

Hi need people who own those machiens, especially the recent iBook2 models with a G3 CPU and titanium powerbooks with a G4, to test this patch and tell me if sleep mode still works reliably or becomes unstable.

(It won't help machines that cannot already sleep).

Applies on top of current 2.6 but may apply to 2.4 as well..

Thanks !

Ben.

===== arch/ppc/kernel/l2cr.S 1.15 vs edited =====

arch/ppc/kernel/l2cr.S +9 -7
@@ -130,11 +130,13 @@
 	mtspr	HID0,r4			/* Disable DPM */
 	sync
 
+#if 0
 	/* Flush & disable L1 */
 	mr	r5,r3
 	bl	__flush_disable_L1
 	mr	r3,r5
-
+#endif
+
 	/* Get the current enable bit of the L2CR into r4 */
 	mfspr	r4,L2CR
 
@@ -236,8 +238,10 @@
 	sync
 
 4:
-	bl	__inval_enable_L1
 
+#if 0
+	bl	__inval_enable_L1
+#endif
 	/* Restore HID0[DPM] to whatever it was before */
 	sync
 	mtspr	1008,r8
@@ -394,11 +398,10 @@
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
  	sync
 
-	/* Load counter to 0x1000 cache lines (128k) and
+	/* Load counter to 0x4000 cache lines (512k) and
 	 * load cache with datas
 	 */
-	lis	r3,0x0002
-//	li	r3,0x1000	/* 128kB / 32B */
+	li	r3,0x4000	/* 512kB / 32B */
 	mtctr	r3
 	li	r3, 0
 1:
@@ -409,8 +412,7 @@
 	sync
 
 	/* Now flush those cache lines */
-	lis	r3,0x0002
-//	li	r3,0x1000	/* 128kB / 32B */
+	li	r3,0x4000	/* 512kB / 32B */
 	mtctr	r3
 	li	r3, 0
 1:

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 3 lines · Benjamin Herrenschmidt

Hi need people who own those machiens, especially the recent iBook2 models with a G3 CPU and titanium powerbooks with a G4, to test this patch and tell me if sleep mode still works reliably or becomes unstable.

Hi, I've compiled and I'm running it on my iBook2 (G3).

In fact I've applied your patch _plus_ laptop mode and orinoco monitor mode. I guess they have nothing to see one each other but...

I've put it to sleep a couple of times (once before starting X and some more while running X) and noticed nothing unusual.

Let me know if I can provide additional info or test anything else.

Thanks

Info about hardware & config follows:
-------------------------------------

$ uname -a
Linux sacarino 2.6.3-rc3-ben1-benhtest #1 Wed Feb 18 16:19:59 CET 2004 ppc GNU/Linux
$ cat /proc/cpuinfo
processor       : 0
cpu             : 750FX
temperature     : 43 C (uncalibrated)
clock           : 900MHz
revision        : 2.3 (pvr 7000 0203)
bogomips        : 1785.85
machine         : PowerBook4,3
motherboard     : PowerBook4,3 MacRISC2 MacRISC Power Macintosh
detected as     : 257 (iBook 2 rev. 2)
pmac flags      : 0000000b
L2 cache        : 512K unified
memory          : 384MB
pmac-generation : NewWorld

Kernel config can be found at http://www.pirispons.net/bulma/llista/iBook/

--
Kiko

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Benjamin Herrenschmidt

Hello Ben,

I just rsync'd to 2.6.3-rc3-ben1 and added your patch. I get these
errors:

  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1

drivers/built-in.o(.text+0x5f01c): In function `radeon_setup_i2c_bus':
: undefined reference to i2c_bit_add_bus' drivers/built-in.o(.text+0x5f17c): In function radeon_delete_i2c_busses':
: undefined reference to i2c_bit_del_bus' drivers/built-in.o(.text+0x5f184): In function radeon_delete_i2c_busses':
: undefined reference to i2c_bit_del_bus' drivers/built-in.o(.text+0x5f18c): In function radeon_delete_i2c_busses':
: undefined reference to i2c_bit_del_bus' drivers/built-in.o(.text+0x5f194): In function radeon_delete_i2c_busses':
: undefined reference to i2c_bit_del_bus' drivers/built-in.o(.text+0x5f224): In function radeon_do_probe_i2c_edid':
: undefined reference to `i2c_transfer'
make: *** [.tmp_vmlinux1] Error 1

2.6.3-rc2-ben1 compiled fine. Does this have to do with your patch or did I screw up my configuration?

digger

Quoted 11 lines · Benjamin Herrenschmidt

Hi need people who own those machiens, especially the recent iBook2 models with a G3 CPU and titanium powerbooks with a G4, to test this patch and tell me if sleep mode still works reliably or becomes unstable.

(It won't help machines that cannot already sleep).

Applies on top of current 2.6 but may apply to 2.4 as well..

Thanks !

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#4 lore raw
Quoted 3 lines

2.6.3-rc2-ben1 compiled fine. Does this have to do with your patch or did I screw up my configuration?

new radeonfb wants i2c-core in the kernel (CONFIG_I2C_CORE=y).

--
Colin
This message represents the official view of the voices in my head.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#5 lore raw
Quoted 5 lines · Colin Leroy
Quoted 2 lines

2.6.3-rc2-ben1 compiled fine. Does this have to do with your patch or did I screw up my configuration?

new radeonfb wants i2c-core in the kernel (CONFIG_I2C_CORE=y).

Thanks

digger

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#7 lore raw
In reply to Benjamin Herrenschmidt

Seems to work fine:

Titanium G4 667MHz (Gigabit)
Yellow Dog 3.0.1
kernel 2.4.22-2a

Greg

Quoted 62 lines · Benjamin Herrenschmidt

Hi need people who own those machiens, especially the recent iBook2 models
with a G3 CPU and titanium powerbooks with a G4, to test this patch and tell me if sleep mode still works reliably or becomes unstable.

(It won't help machines that cannot already sleep).

Applies on top of current 2.6 but may apply to 2.4 as well..

Thanks !

Ben.

===== arch/ppc/kernel/l2cr.S 1.15 vs edited =====

arch/ppc/kernel/l2cr.S +8 -5
@@ -130,11 +130,13 @@
 	mtspr	HID0,r4			/* Disable DPM */
 	sync
 
+#if 0
 	/* Flush & disable L1 */
 	mr	r5,r3
 	bl	__flush_disable_L1
 	mr	r3,r5
-
+#endif
+
 	/* Get the current enable bit of the L2CR into r4 */
 	mfspr	r4,L2CR
 
@@ -236,8 +238,10 @@
 	sync
 
 4:
-	bl	__inval_enable_L1
 
+#if 0
+	bl	__inval_enable_L1
+#endif
 	/* Restore HID0[DPM] to whatever it was before */
 	sync
 	mtspr	1008,r8
@@ -394,11 +398,10 @@
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
  	sync
 
-	/* Load counter to 0x1000 cache lines (128k) and
+	/* Load counter to 0x4000 cache lines (512k) and
 	 * load cache with datas
 	 */
-	lis	r3,0x0002
-//	li	r3,0x1000	/* 128kB / 32B */
+	li	r3,0x4000	/* 512kB / 32B */
 	mtctr	r3
 	li	r3, 0
 1:

arch/ppc/kernel/l2cr.S line 418

Quoted 9 lines
arch/ppc/kernel/l2cr.S +1 -2
@@ -409,8 +412,7 @@
 	sync
 
 	/* Now flush those cache lines */
-	lis	r3,0x0002
-//	li	r3,0x1000	/* 128kB / 32B */
+	li	r3,0x4000	/* 512kB / 32B */
 	mtctr	r3
 	li	r3, 0
 1:

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#8 lore raw
In reply to Benjamin Herrenschmidt

Hi Ben,

Quoted 7 lines · Benjamin Herrenschmidt

Hi need people who own those machiens, especially the recent iBook2 models with a G3 CPU and titanium powerbooks with a G4, to test this patch and tell me if sleep mode still works reliably or becomes unstable.

(It won't help machines that cannot already sleep).

Applies on top of current 2.6 but may apply to 2.4 as well..

It seems okay here.

Linux myrna 2.6.3-rc3-ben1 #3 Wed Feb 18 11:28:22 EST 2004 ppc GNU/Linux

processor : 0
cpu : 7455, altivec supported
clock : 667MHz
revision : 2.1 (pvr 8001 0201)
bogomips : 665.60
machine : PowerBook3,4
motherboard : PowerBook3,4 MacRISC2 MacRISC Power Macintosh
detected as : 73 (PowerBook Titanium III)
pmac flags : 0000000b
L2 cache : 256K unified
memory : 512MB
pmac-generation : NewWorld

Thanks.

digger

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#9 lore raw
In reply to Benjamin Herrenschmidt
Quoted 4 lines

Hi need people who own those machiens, especially the recent iBook2 models with a G3 CPU and titanium powerbooks with a G4, to test this patch and tell me if sleep mode still works reliably or becomes unstable.

Still works reliably on the G3 Lombard. Doesn't seem to interfere with the pmdisk patch either. (2.6.2-ben1)

Michael

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#10 lore raw
In reply to Benjamin Herrenschmidt
Quoted 8 lines · On Wed, 18 Feb 2004 14:21:36 +1100 Benjamin Herrenschmidt…

Hi need people who own those machiens, especially the recent iBook2 models with a G3 CPU and titanium powerbooks with a G4, to test this patch and tell me if sleep mode still works reliably or becomes unstable.

(It won't help machines that cannot already sleep).

Applies on top of current 2.6 but may apply to 2.4 as well..

I applied it to 2.4.23-pre5-ben0. It failed on Chunk 3.

Quoted 1 line

cat /proc/cpuinfo

cpu : 7410, altivec supported
temperature : 16 C (uncalibrated)
clock : 500MHz
revision : 17.3 (pvr 800c 1103)
bogomips : 995.32
machine : PowerBook3,2
motherboard : PowerBook3,2 MacRISC2 MacRISC Power Macintosh
board revision : 00000001
detected as : 71 (PowerBook Titanium)
pmac flags : 0000000b
L2 cache : 1024K unified
memory : 512MB
pmac-generation : NewWorld

It seems to be working ok. What is this supposed to fix? I have, since going to Yellow dog 3.0, had random sleep "crashes". I have been trying to figure out what caused them but they really did seem to be random.

Quoted 5 lines

Thanks !

Ben.

No, thank you, I for one would be lost without your kernel.

Thanks,
Ira

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
In reply to Kiko Piris
Quoted 8 lines · Kiko Piris
Quoted 3 lines · Benjamin Herrenschmidt

Hi need people who own those machiens, especially the recent iBook2 models with a G3 CPU and titanium powerbooks with a G4, to test this patch and tell me if sleep mode still works reliably or becomes unstable.

Hi, I've compiled and I'm running it on my iBook2 (G3).

Quoted 7 lines

In fact I've applied your patch _plus_ laptop mode and orinoco monitor mode. I guess they have nothing to see one each other but...

I've put it to sleep a couple of times (once before starting X and some more while running X) and noticed nothing unusual.

Let me know if I can provide additional info or test anything else.

Thanks.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#11 lore raw
In reply to Benjamin Herrenschmidt
Quoted 4 lines · Benjamin Herrenschmidt

Hi need people who own those machiens, especially the recent iBook2 models with a G3 CPU and titanium powerbooks with a G4, to test this patch and tell me if sleep mode still works reliably or becomes unstable.

[snip]

Quoted 20 lines

===== arch/ppc/kernel/l2cr.S 1.15 vs edited =====

arch/ppc/kernel/l2cr.S +3 -1
@@ -130,11 +130,13 @@
 	mtspr	HID0,r4			/* Disable DPM */
 	sync
 
+#if 0
 	/* Flush & disable L1 */
 	mr	r5,r3
 	bl	__flush_disable_L1
 	mr	r3,r5
-
+#endif
+
 	/* Get the current enable bit of the L2CR into r4 */
 	mfspr	r4,L2CR
 
@@ -236,8 +238,10 @@
 	sync

arch/ppc/kernel/l2cr.S line 247

Quoted 10 lines
arch/ppc/kernel/l2cr.S +3 -1
 
 4:
-	bl	__inval_enable_L1
 
+#if 0
+	bl	__inval_enable_L1
+#endif
 	/* Restore HID0[DPM] to whatever it was before */
 	sync
 	mtspr	1008,r8

Are you sure that you can get away with this, passed on how the manuals (745x) describe the sequence of flush/invalidating the L2 (and, L3) ?

--
Tom Rini
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#12 lore raw
Quoted 3 lines

Are you sure that you can get away with this, passed on how the manuals (745x) describe the sequence of flush/invalidating the L2 (and, L3) ?

Do they describe disabling the L1 at all ? I did that after looking at Darwin place in the first place. But then, I discovered it broke the wallstreet. I had people test the patch removing those L1 stuffs for some time and it seems to work.

I think the proper sequence is still what Apple does, but that means all caches are tied together. I don't have time to work on that, and there's the issue of possible snoops that Apple addresses by using the ROM space for the displacement flush, we need something different of course.

A resume of Apple sequence is that they always tear down and re-enable all 3 caches in one operation. Using the HW assist when available.

Ben.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/