From: Aaro Koskinen Date: Mon, 30 Sep 2013 20:44:31 +0000 (+0300) Subject: cpufreq: pmac64: speed up frequency switch X-Git-Tag: v3.13-rc1~96^2~12^2~4^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45a428ebbf7d6a4ec77cf02fc706ecd62b261bd9;p=pandora-kernel.git cpufreq: pmac64: speed up frequency switch Some functions on switch path use msleep() which is inaccurate, and depends on HZ. With HZ=100 msleep(1) takes actually over ten times longer. Using usleep_range() we get more accurate sleeps. I measured the "pfunc_slewing_done" polling to take 300us at max (on 2.3GHz dual-processor Xserve G5), so using 500us sleep there should be fine. With the patch, g5_switch_freq() duration drops from ~50ms to ~10ms on Xserve with HZ=100. Signed-off-by: Aaro Koskinen Acked-by: Viresh Kumar Acked-by: Benjamin Herrenschmidt Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed