From patchwork Thu Jul 3 16:26:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Morten Rasmussen X-Patchwork-Id: 33038 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 36D05203AC for ; Thu, 3 Jul 2014 16:27:40 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id id10sf1194800vcb.11 for ; Thu, 03 Jul 2014 09:27:40 -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=3wlKoLaQ1jLu26vVI5h0VT7mIThTOtcVXWexmn9uWeI=; b=WJyKxCrvzAcXa/xmnLeI8unJZC1YdvEB47RE3OkaNpVcMJQAdH3HB+0jCRCPtyvxmi 7k7Q5cst8L06SEMrGrKwS5eoYwz+d9uhTK4jmyPN7z6oCKLlhdNAGpb0HuuS5Ya3P9VR Meogg/dOurPpyqHidgijxym2Icgq7DoyomNBrNskV9J8WidZpi5w2j9+4HfNAl6ZWkdN GCilj8cahyrpPzacfDRfaRJoeH7hx4cLTFjFoYkK3oMqbtWcUubU3t0JcqTCmEAUxd7y 7TF75NK+N0TgJNor/kEIqm2BOHgVrzDvZvpWdCu22r8NKaL+SPQ7ZPc72ScQCn9AbXck FF6A== X-Gm-Message-State: ALoCoQmSWeKlBcpbgAi6+JAVDXaTP7V5Hdajav6ExbAdGjCKwTDlt/O4DMAKJb5Bax8gszhW56sC X-Received: by 10.58.6.210 with SMTP id d18mr2671070vea.10.1404404860022; Thu, 03 Jul 2014 09:27:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.201 with SMTP id z67ls592196qgd.94.gmail; Thu, 03 Jul 2014 09:27:39 -0700 (PDT) X-Received: by 10.220.182.5 with SMTP id ca5mr1409636vcb.50.1404404859938; Thu, 03 Jul 2014 09:27:39 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id jg5si14377778vdb.70.2014.07.03.09.27.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Jul 2014 09:27:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id il7so459715vcb.41 for ; Thu, 03 Jul 2014 09:27:39 -0700 (PDT) X-Received: by 10.52.133.202 with SMTP id pe10mr1169516vdb.78.1404404859841; Thu, 03 Jul 2014 09:27:39 -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.221.37.5 with SMTP id tc5csp390401vcb; Thu, 3 Jul 2014 09:27:39 -0700 (PDT) X-Received: by 10.68.139.36 with SMTP id qv4mr5771728pbb.82.1404404858550; Thu, 03 Jul 2014 09:27:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ho4si33280366pbc.180.2014.07.03.09.27.38; Thu, 03 Jul 2014 09:27:38 -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 S1759297AbaGCQ1M (ORCPT + 13 others); Thu, 3 Jul 2014 12:27:12 -0400 Received: from service87.mimecast.com ([91.220.42.44]:47356 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758183AbaGCQ0y (ORCPT ); Thu, 3 Jul 2014 12:26:54 -0400 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 03 Jul 2014 17:26:19 +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); Thu, 3 Jul 2014 17:26:19 +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, pjt@google.com Subject: [RFCv2 PATCH 16/23] sched, cpufreq: Current compute capacity hack for ARM TC2 Date: Thu, 3 Jul 2014 17:26:03 +0100 Message-Id: <1404404770-323-17-git-send-email-morten.rasmussen@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1404404770-323-1-git-send-email-morten.rasmussen@arm.com> References: <1404404770-323-1-git-send-email-morten.rasmussen@arm.com> X-OriginalArrivalTime: 03 Jul 2014 16:26:19.0475 (UTC) FILETIME=[85424230:01CF96DB] X-MC-Unique: 114070317261905801 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.182 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..efec777 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 == 0 || freqs->cpu == 1) + /* 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))