Skip to contentSkip to conversation

Fix sleep/wakeup problems on iBook G3

PATCH In review Benjamin Herrenschmidt 2 participants 4 messages Mar 27, 2005 – Mar 29, 2005 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix sleep/wakeup problems on iBook G3

Hi !

There have been various reports lately of sleep beeing broken on iBook G3. Frank (no name provided here) found a typo in my code that cleans the L1 cache on these CPU models. This patch fixes it, I'd appreciate some feedback about wether that fixes the problem or not.

Ben.

arch/ppc/platforms/pmac_cache.S +1 -1
Index: linux-work/arch/ppc/platforms/pmac_cache.S
===================================================================
@@ -73,7 +73,7 @@
 
 	/* disable / invalidate / enable L1 data */
 	mfspr	r3,SPRN_HID0
-	rlwinm	r0,r0,0,~HID0_DCE
+	rlwinm	r3,r3,0,~HID0_DCE
 	mtspr	SPRN_HID0,r3
 	sync
 	isync
#1 lore raw
Quoted 4 lines · Benjamin Herrenschmidt

There have been various reports lately of sleep beeing broken on iBook G3. Frank (no name provided here) found a typo in my code that cleans the L1 cache on these CPU models. This patch fixes it, I'd appreciate some feedback about wether that fixes the problem or not.

I've been having various trouble with my iBook lately, including random freezes, not waking up after going to sleep sometimes, and sometimes not going to sleep. Since applying the patch you posted, everything seems fine, though I may be speaking too soon.

My /proc/cpuinfo for reference:
processor : 0
cpu : 750FX
temperature : 0-3 C (uncalibrated)
clock : 400MHz
revision : 2.3 (pvr 7000 0203)
bogomips : 793.71
machine : PowerBook4,3
motherboard : PowerBook4,3 MacRISC2 MacRISC Power Macintosh
detected as : 257 (iBook 2 rev. 2)
pmac flags : 0000001b
L2 cache : 512K unified
memory : 256MB
pmac-generation : NewWorld

Note that the maximum CPU speed is 900 MHz.

Signature · 1 line
gram
#2 lore raw
Quoted 21 lines

I've been having various trouble with my iBook lately, including random freezes, not waking up after going to sleep sometimes, and sometimes not going to sleep. Since applying the patch you posted, everything seems fine, though I may be speaking too soon.

My /proc/cpuinfo for reference:
processor : 0
cpu : 750FX
temperature : 0-3 C (uncalibrated)
clock : 400MHz
revision : 2.3 (pvr 7000 0203)
bogomips : 793.71
machine : PowerBook4,3
motherboard : PowerBook4,3 MacRISC2 MacRISC Power Macintosh
detected as : 257 (iBook 2 rev. 2)
pmac flags : 0000001b
L2 cache : 512K unified
memory : 256MB
pmac-generation : NewWorld

Quoted 1 line

Note that the maximum CPU speed is 900 MHz.

Can you also check my other patch which fixes cpufreq as well ? And test if it's reliable wether you sleep at low or high speed ?

Thanks,
Ben.

#3 lore raw
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 4 lines

I've been having various trouble with my iBook lately, including random freezes, not waking up after going to sleep sometimes, and sometimes not going to sleep. Since applying the patch you posted, everything seems fine, though I may be speaking too soon.

Can you also check my other patch which fixes cpufreq as well ? And test if it's reliable wether you sleep at low or high speed ?

I haven't had any trouble with cpufreq (and I use powernowd with the userspace governor), but I will apply your other patch this evening and see what happens.

Signature · 1 line
gram