]> git.hungrycats.org Git - linux/commit
[PATCH] ppc32: fix cpu voltage change delay
authorPaul Mackerras <paulus@samba.org>
Mon, 18 Oct 2004 15:57:51 +0000 (08:57 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 18 Oct 2004 15:57:51 +0000 (08:57 -0700)
commit15edefdf4d80ff8bc2b63d6ffe0a5ebe27d9b6d7
tree7210e7dc4eea7db4a86a4f46b6547fdabafcd2c6
parent229ea9289f986fdfafe14d48cbe6aaefb4cb9f4a
[PATCH] ppc32: fix cpu voltage change delay

This patch fixes a problem where my new powerbook would sometimes hang or
crash when changing CPU speed.  We had schedule_timeout(HZ/1000) in there,
intended to provide a delay of one millisecond.  However, even with
HZ=1000, it was (I believe) only waiting for the next jiffy before
proceeding, which could be less than a millisecond.  Changing the code to
use msleep, and specifying a time of 1 jiffy + 1ms has fixed the problem.
(When I looked at the msleep code, it appeared to me that msleep(1) with
HZ=1000 would sleep for between 0 and 1ms.)

Ben also asked me to remove the code that changes the AACK delay enable,
after looking in the Darwin sources and seeing that Darwin does not change
this in its corresponding code.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc/platforms/pmac_cpufreq.c