From patchwork Tue Jul 23 20:24:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 261203 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 090422C0259 for ; Wed, 24 Jul 2013 06:26:30 +1000 (EST) Received: from filtteri1.pp.htv.fi (filtteri1.pp.htv.fi [213.243.153.184]) by ozlabs.org (Postfix) with ESMTP id 67CD92C00CF for ; Wed, 24 Jul 2013 06:25:01 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by filtteri1.pp.htv.fi (Postfix) with ESMTP id 999BE21B7EB; Tue, 23 Jul 2013 23:24:57 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp6.welho.com ([213.243.153.40]) by localhost (filtteri1.pp.htv.fi [213.243.153.184]) (amavisd-new, port 10024) with ESMTP id xdaZYntSUnVB; Tue, 23 Jul 2013 23:24:52 +0300 (EEST) Received: from blackmetal.pp.htv.fi (cs181064211.pp.htv.fi [82.181.64.211]) by smtp6.welho.com (Postfix) with ESMTP id 983145BC007; Tue, 23 Jul 2013 23:24:52 +0300 (EEST) From: Aaro Koskinen To: "Rafael J. Wysocki" , Viresh Kumar , Benjamin Herrenschmidt , Nick Piggin , linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/3] cpufreq: pmac64: re-estimate G5 cpufreq transition latency Date: Tue, 23 Jul 2013 23:24:38 +0300 Message-Id: <1374611079-28091-2-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1374611079-28091-1-git-send-email-aaro.koskinen@iki.fi> References: <1374611079-28091-1-git-send-email-aaro.koskinen@iki.fi> Cc: Aaro Koskinen X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The latency is in milliseconds scale rather than microseconds based on measurements on iMac G5 and Xscale G5. The patch also enables to use ondemand governor on the latter. Signed-off-by: Aaro Koskinen --- drivers/cpufreq/pmac64-cpufreq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c index 674807d..f9e399b 100644 --- a/drivers/cpufreq/pmac64-cpufreq.c +++ b/drivers/cpufreq/pmac64-cpufreq.c @@ -85,7 +85,8 @@ static int (*g5_query_freq)(void); static DEFINE_MUTEX(g5_switch_mutex); -static unsigned long transition_latency; +/* A conservative estimate, based on Xserve G5 and iMac G5 (iSight). */ +static const unsigned long transition_latency = 10 * NSEC_PER_MSEC; #ifdef CONFIG_PMAC_SMU @@ -499,7 +500,6 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus) g5_cpu_freqs[1].frequency = max_freq/2; /* Set callbacks */ - transition_latency = 12000; g5_switch_freq = g5_scom_switch_freq; g5_query_freq = g5_scom_query_freq; freq_method = "SCOM"; @@ -675,7 +675,6 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) g5_cpu_freqs[1].frequency = min_freq; /* Set callbacks */ - transition_latency = CPUFREQ_ETERNAL; g5_switch_volt = g5_pfunc_switch_volt; g5_switch_freq = g5_pfunc_switch_freq; g5_query_freq = g5_pfunc_query_freq;