All of lore.kernel.org
 help / color / mirror / Atom feed
* iBook G3 owners
@ 2005-04-04  6:06 Benjamin Herrenschmidt
  2005-04-04 12:06 ` Benjamin Herrenschmidt
  2005-04-09 16:36 ` David Woodhouse
  0 siblings, 2 replies; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2005-04-04  6:06 UTC (permalink / raw)
  To: debian-powerpc, linuxppc-dev list

Hi !

There have been various reports of issues with sleep among others on
iBook G3 equiped with the 750FX processor. Also, the cpufreq code on
these so far didn't change the CPU voltage, which limited the actual
power saving at low frequency.

I have uploaded various patches that should help fix these issues. Those
patches are all against current linus bk and they should be all applied
in the order below.

I would really appreciate some tests as I don't have access to any of
these machines. I need to know if cpufreq works reliably with those
patches and if the new voltage control makes any differnece on battery
life (check power consumption in /proc/pmu/battery_*/current when
running on battery) and I need to know if the patches are improving
reliability of sleep/wakeup.

The 4 patches can be found at these URLs. If you had earlier versions of
some of these, those patches replace them:

http://gate.crahsing.org/~benh/ppc32-750-errata-fix.diff
http://gate.crahsing.org/~benh/ppc32-pmac-sleep-fix.diff
http://gate.crahsing.org/~benh/cpufreq-add-suspend.diff
http://gate.crahsing.org/~benh/ppc32-cpufreq-gpio-off.diff

Please, let me know asap,

Ben.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-04  6:06 iBook G3 owners Benjamin Herrenschmidt
@ 2005-04-04 12:06 ` Benjamin Herrenschmidt
  2005-04-07 22:05   ` Andreas Schwab
  2005-04-09 16:36 ` David Woodhouse
  1 sibling, 1 reply; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2005-04-04 12:06 UTC (permalink / raw)
  To: debian-powerpc; +Cc: linuxppc-dev list


> http://gate.crahsing.org/~benh/ppc32-750-errata-fix.diff
> http://gate.crahsing.org/~benh/ppc32-pmac-sleep-fix.diff
> http://gate.crahsing.org/~benh/cpufreq-add-suspend.diff
> http://gate.crahsing.org/~benh/ppc32-cpufreq-gpio-off.diff

Of course, without the typo, it gives:

http://gate.crashing.org/~benh/ppc32-750-errata-fix.diff
http://gate.crashing.org/~benh/ppc32-pmac-sleep-fix.diff
http://gate.crashing.org/~benh/cpufreq-add-suspend.diff
http://gate.crashing.org/~benh/ppc32-cpufreq-gpio-off.diff

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-04 12:06 ` Benjamin Herrenschmidt
@ 2005-04-07 22:05   ` Andreas Schwab
  2005-04-07 22:38     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2005-04-07 22:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> http://gate.crashing.org/~benh/ppc32-pmac-sleep-fix.diff

This patch does not work on the 750fx, I'm getting random crashes on
wakeup.  When I replace it with this one-liner, all is well again:

--- linux-2.6.12-rc2.orig/arch/ppc/platforms/pmac_cache.S	2005-04-04 23:05:41.000000000 +0200
+++ linux-2.6.12-rc2/arch/ppc/platforms/pmac_cache.S	2005-04-07 23:22:04.000000000 +0200
@@ -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 | HID0_ICE)
 	mtspr	SPRN_HID0,r3
 	sync
 	isync

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-07 22:05   ` Andreas Schwab
@ 2005-04-07 22:38     ` Benjamin Herrenschmidt
  2005-04-07 23:20       ` Andreas Schwab
  0 siblings, 1 reply; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2005-04-07 22:38 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linuxppc-dev list, debian-powerpc

On Fri, 2005-04-08 at 00:05 +0200, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> 
> > http://gate.crashing.org/~benh/ppc32-pmac-sleep-fix.diff
> 
> This patch does not work on the 750fx, I'm getting random crashes on
> wakeup.  When I replace it with this one-liner, all is well again:

I know, but this oneliner is incorrect. It can't be correct, no way.
That is very strange, and that's what I'm trying to figure out. Can you
try instead changing the start address of the flush from 0xfff00000 to 0
by changing the L1 flush bit initalisation from lis r4,0xfff0 to li
r4,0 ?

Ben.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-07 22:38     ` Benjamin Herrenschmidt
@ 2005-04-07 23:20       ` Andreas Schwab
  2005-04-07 23:42         ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2005-04-07 23:20 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, debian-powerpc

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> I know, but this oneliner is incorrect. It can't be correct, no way.
> That is very strange, and that's what I'm trying to figure out. Can you
> try instead changing the start address of the flush from 0xfff00000 to 0
> by changing the L1 flush bit initalisation from lis r4,0xfff0 to li
> r4,0 ?

This fixes the problem.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-07 23:20       ` Andreas Schwab
@ 2005-04-07 23:42         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2005-04-07 23:42 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linuxppc-dev list, debian-powerpc

On Fri, 2005-04-08 at 01:20 +0200, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> 
> > I know, but this oneliner is incorrect. It can't be correct, no way.
> > That is very strange, and that's what I'm trying to figure out. Can you
> > try instead changing the start address of the flush from 0xfff00000 to 0
> > by changing the L1 flush bit initalisation from lis r4,0xfff0 to li
> > r4,0 ?
> 
> This fixes the problem.

Ok, I still don't have anything like a good explanation of why this
fixes it, but it's a better workaround for now.

Ben.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-04  6:06 iBook G3 owners Benjamin Herrenschmidt
  2005-04-04 12:06 ` Benjamin Herrenschmidt
@ 2005-04-09 16:36 ` David Woodhouse
  2005-04-09 23:37   ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 11+ messages in thread
From: David Woodhouse @ 2005-04-09 16:36 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: fedora-ppc, linuxppc-dev list, debian-powerpc

On Mon, 2005-04-04 at 16:06 +1000, Benjamin Herrenschmidt wrote:
> There have been various reports of issues with sleep among others on
> iBook G3 equiped with the 750FX processor. Also, the cpufreq code on
> these so far didn't change the CPU voltage, which limited the actual
> power saving at low frequency.

Sleep hasn't worked properly on my PowerBook G4 since I applied your
first pair of patches. The current behaviour seems to be that short
periods of sleep appear to work OK, but a fairly random death happens
after a longer sleep. Last time it was ohci_hcd complaining of an
uninitialised spinlock.

I'm half inclined to suspect RAM isn't being refreshed properly -- but
most of the kernel text still seems to be there and it manages to oops
and panic OK, so perhaps it's just that the dcache isn't correctly
disabled, or isn't correctly flushed when we enable it again?

I'll rebuild the Fedora kernel without any of the patches to eliminate
the possibility that it's caused by some other change.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-09 16:36 ` David Woodhouse
@ 2005-04-09 23:37   ` Benjamin Herrenschmidt
  2005-04-09 23:48     ` David Woodhouse
  0 siblings, 1 reply; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2005-04-09 23:37 UTC (permalink / raw)
  To: David Woodhouse; +Cc: fedora-ppc, linuxppc-dev list, debian-powerpc

On Sat, 2005-04-09 at 17:36 +0100, David Woodhouse wrote:
> On Mon, 2005-04-04 at 16:06 +1000, Benjamin Herrenschmidt wrote:
> > There have been various reports of issues with sleep among others on
> > iBook G3 equiped with the 750FX processor. Also, the cpufreq code on
> > these so far didn't change the CPU voltage, which limited the actual
> > power saving at low frequency.
> 
> Sleep hasn't worked properly on my PowerBook G4 since I applied your
> first pair of patches. The current behaviour seems to be that short
> periods of sleep appear to work OK, but a fairly random death happens
> after a longer sleep. Last time it was ohci_hcd complaining of an
> uninitialised spinlock.
> 
> I'm half inclined to suspect RAM isn't being refreshed properly -- but
> most of the kernel text still seems to be there and it manages to oops
> and panic OK, so perhaps it's just that the dcache isn't correctly
> disabled, or isn't correctly flushed when we enable it again?

That kind of sleep is usually related to cache flush issues ... the
setup of RAM auto refresh isn't under kernel code control, it's entirely
done by the chipset when entering sleep state.

What is strange however is that none of these 2 patches have _any_
effect on your machine model. Can you confirm that's indeed the patches
you were talking about ? 

ppc32-750-errata-fix.diff
ppc32-pmac-sleep-fix.diff

> I'll rebuild the Fedora kernel without any of the patches to eliminate
> the possibility that it's caused by some other change.

Make sure you have the 2 cpufreq related patches though, there are
issues with CPU voltage possibly not correct on wakeup that can cause
similar problems.

Ben.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-09 23:37   ` Benjamin Herrenschmidt
@ 2005-04-09 23:48     ` David Woodhouse
  2005-04-10  0:07       ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 11+ messages in thread
From: David Woodhouse @ 2005-04-09 23:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

On Sun, 2005-04-10 at 09:37 +1000, Benjamin Herrenschmidt wrote:
> Make sure you have the 2 cpufreq related patches though, there are
> issues with CPU voltage possibly not correct on wakeup that can cause
> similar problems.

It was those I originally applied after cpufreq stopped working. Sleep
hasn't worked reliably since then. I've built a kernel without any of
the four patches, and if that works I'll test some more to work out
precisely which one makes the difference.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-09 23:48     ` David Woodhouse
@ 2005-04-10  0:07       ` Benjamin Herrenschmidt
  2005-04-10  8:28         ` David Woodhouse
  0 siblings, 1 reply; 11+ messages in thread
From: Benjamin Herrenschmidt @ 2005-04-10  0:07 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linuxppc-dev list

On Sun, 2005-04-10 at 00:48 +0100, David Woodhouse wrote:
> On Sun, 2005-04-10 at 09:37 +1000, Benjamin Herrenschmidt wrote:
> > Make sure you have the 2 cpufreq related patches though, there are
> > issues with CPU voltage possibly not correct on wakeup that can cause
> > similar problems.
> 
> It was those I originally applied after cpufreq stopped working. Sleep
> hasn't worked reliably since then. I've built a kernel without any of
> the four patches, and if that works I'll test some more to work out
> precisely which one makes the difference.

Can you check that you have the very latest versions of these patches ?
I updated them a couple of time since I posted the message...

Ben.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: iBook G3 owners
  2005-04-10  0:07       ` Benjamin Herrenschmidt
@ 2005-04-10  8:28         ` David Woodhouse
  0 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2005-04-10  8:28 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list

On Sun, 2005-04-10 at 10:07 +1000, Benjamin Herrenschmidt wrote:
> Can you check that you have the very latest versions of these
> patches ?
> I updated them a couple of time since I posted the message...

The md5sums of the patches I have precisely match the md5sums of the
patches which are currently up for download:

fc63b0d57d26f2dec44d0ba1667eb263  linux-2.6.11-ppc32-pmac-sleep-fix.patch
29792fdd1970b9447d06a2bb044e48e0  linux-2.6.11-cpufreq-add-suspend.patch
dcdb468b9325c1835e9992034b7d8a28  linux-2.6.11-ppc32-750-erratum-fix.patch
689353b33f3bdc7759692a4cccdb24fa  linux-2.6.11-ppc32-cpufreq-gpio-off.patch

A kernel without _any_ of these patches survived an overnight sleep, and
in fact cpufreq was working again too. I'll try with just the cpufreq
patches.

-- 
dwmw2

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-04-10  8:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-04  6:06 iBook G3 owners Benjamin Herrenschmidt
2005-04-04 12:06 ` Benjamin Herrenschmidt
2005-04-07 22:05   ` Andreas Schwab
2005-04-07 22:38     ` Benjamin Herrenschmidt
2005-04-07 23:20       ` Andreas Schwab
2005-04-07 23:42         ` Benjamin Herrenschmidt
2005-04-09 16:36 ` David Woodhouse
2005-04-09 23:37   ` Benjamin Herrenschmidt
2005-04-09 23:48     ` David Woodhouse
2005-04-10  0:07       ` Benjamin Herrenschmidt
2005-04-10  8:28         ` David Woodhouse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.