From patchwork Fri May 23 18:16:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Morten Rasmussen X-Patchwork-Id: 30847 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5AFF720369 for ; Fri, 23 May 2014 18:18:33 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf24805185oag.8 for ; Fri, 23 May 2014 11:18:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=aOB5Q8qNRerm5YKDkipQqtp2qmxhIADCjfu8wKZwf/I=; b=EOSyA94YMFextf78k0qnMZ5FcLwb0fzr321YmpFNXj6i+XiO7Of4+FzPhEUc98ayEp DS9J1303Z0WmKqTKfXj2FL/8fazhI6pYk7D5paDZ9VWT0iZ5dikUg23b/V/W+F0a+WfX Isrs4eehKWNCt2nN+OJzON6pcRh9lpCSPn0KxTQSMoLDHlW/cfwivXr06Wh2ji/Bebph 3d125hwFVR9WGeDSwwbUN3kJBeT0kToMvlrZ/0+cGS2LRKdEVEk4uxfqk5/7VSlZBEGS td3UkeUc6Kj/cBauz9UF+U0mXzOjgm0+1KUcQ9AEkR3Allb4MgxJGxNspuH0Jq7+UiTh 478Q== X-Gm-Message-State: ALoCoQk1GmLqOBxsfe+GZlD0PTTrFJCOCT3FhDjn7qZ8nvt7WCWAB4a8Y325v+xFS5nIxE75ePJP X-Received: by 10.42.249.207 with SMTP id ml15mr2467479icb.21.1400869112955; Fri, 23 May 2014 11:18:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.203 with SMTP id 69ls1774605qgl.35.gmail; Fri, 23 May 2014 11:18:32 -0700 (PDT) X-Received: by 10.52.13.41 with SMTP id e9mr4759131vdc.21.1400869112814; Fri, 23 May 2014 11:18:32 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id va3si2113456veb.77.2014.05.23.11.18.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 11:18:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so6670879vcb.15 for ; Fri, 23 May 2014 11:18:32 -0700 (PDT) X-Received: by 10.58.186.207 with SMTP id fm15mr5717874vec.4.1400869112721; Fri, 23 May 2014 11:18:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp52369vcb; Fri, 23 May 2014 11:18:32 -0700 (PDT) X-Received: by 10.66.65.225 with SMTP id a1mr8088860pat.139.1400869111728; Fri, 23 May 2014 11:18:31 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sl2si4890660pbc.221.2014.05.23.11.18.31; Fri, 23 May 2014 11:18:31 -0700 (PDT) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751630AbaEWSQ4 (ORCPT + 12 others); Fri, 23 May 2014 14:16:56 -0400 Received: from service87.mimecast.com ([91.220.42.44]:36287 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751539AbaEWSQz (ORCPT ); Fri, 23 May 2014 14:16:55 -0400 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 23 May 2014 19:16:53 +0100 Received: from e103034-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 23 May 2014 19:16:52 +0100 From: Morten Rasmussen To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, peterz@infradead.org, mingo@kernel.org Cc: rjw@rjwysocki.net, vincent.guittot@linaro.org, daniel.lezcano@linaro.org, preeti@linux.vnet.ibm.com, dietmar.eggemann@arm.com Subject: [RFC PATCH 10/16] sched, cpufreq: Current compute capacity hack for ARM TC2 Date: Fri, 23 May 2014 19:16:37 +0100 Message-Id: <1400869003-27769-11-git-send-email-morten.rasmussen@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400869003-27769-1-git-send-email-morten.rasmussen@arm.com> References: <1400869003-27769-1-git-send-email-morten.rasmussen@arm.com> X-OriginalArrivalTime: 23 May 2014 18:16:53.0010 (UTC) FILETIME=[2C379F20:01CF76B3] X-MC-Unique: 114052319165313001 Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: morten.rasmussen@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hack to report different cpu capacities for big and little cpus. This is for experimentation on ARM TC2 _only_. A proper solution has to address this problem. Signed-off-by: Morten Rasmussen --- drivers/cpufreq/cpufreq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index a2b788d..134d777 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -316,7 +316,13 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy, pr_debug("FREQ: %lu - CPU: %lu\n", (unsigned long)freqs->new, (unsigned long)freqs->cpu); trace_cpu_frequency(freqs->new, freqs->cpu); - set_curr_capacity(freqs->cpu, (freqs->new*1024)/policy->max); + /* Massive TC2 hack */ + if (freqs->cpu == 1 || freqs->cpu == 2) + /* A15 cpus (max_capacity = 2015) */ + set_curr_capacity(freqs->cpu, (freqs->new*2015)/1200000); + else + /* A7 cpus (nax_capacity = 1024) */ + set_curr_capacity(freqs->cpu, (freqs->new*1024)/1000000); srcu_notifier_call_chain(&cpufreq_transition_notifier_list, CPUFREQ_POSTCHANGE, freqs); if (likely(policy) && likely(policy->cpu == freqs->cpu))