From patchwork Mon Apr 29 13:24:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 16504 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BDEFF25E08 for ; Mon, 29 Apr 2013 13:25:46 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id t10sf654246lbi.8 for ; Mon, 29 Apr 2013 06:25:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=sWMmmEpTc4B3URc8y612CmqWvSfm5+w8S0UpRfZscFc=; b=LsX/8AA3t2dsHqyVI0QUQET6lBpMgXYL7mePhv3Dgcslu1jaFHIe96FBuUgk5M7/Bq inCh0G5GkttMfXvcQ/fZ4jh0+rUj7suvab9c1VDoni1OO0YInB1qWhr3yxWTEbPkwGsq Vv+1LekBOSmhfQ1mHUAJZNzEh+mY4MHkgSS5DpgwklD91JdhtbyVBA0WAiDXYTY6hiGM sqYO2eey2jxcT2GgfqC/xFonLe0qjeVD3pqgDkraQS5GPzqpYCj0G2ruj4zEPNhMpdlx 33ymi+YKYpTLgEZXfS831kyBZ2pkFIrOATdoMyXnwIa/6h7IXP2DmGP+F9huCMgIaM3B HguA== X-Received: by 10.180.75.133 with SMTP id c5mr5639175wiw.2.1367241944686; Mon, 29 Apr 2013 06:25:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.7.232 with SMTP id m8ls257820wia.39.gmail; Mon, 29 Apr 2013 06:25:44 -0700 (PDT) X-Received: by 10.180.189.205 with SMTP id gk13mr17724268wic.25.1367241944630; Mon, 29 Apr 2013 06:25:44 -0700 (PDT) Received: from mail-ve0-x233.google.com (mail-ve0-x233.google.com [2607:f8b0:400c:c01::233]) by mx.google.com with ESMTPS id y16si4166651wij.40.2013.04.29.06.25.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Apr 2013 06:25:44 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::233; Received: by mail-ve0-f179.google.com with SMTP id oz10so3080535veb.10 for ; Mon, 29 Apr 2013 06:25:43 -0700 (PDT) X-Received: by 10.220.189.9 with SMTP id dc9mr19689788vcb.8.1367241943544; Mon, 29 Apr 2013 06:25:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp57484veb; Mon, 29 Apr 2013 06:25:43 -0700 (PDT) X-Received: by 10.68.170.228 with SMTP id ap4mr69930140pbc.209.1367241942638; Mon, 29 Apr 2013 06:25:42 -0700 (PDT) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id ny1si16978351pbb.41.2013.04.29.06.25.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Apr 2013 06:25:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.48; Received: by mail-pa0-f48.google.com with SMTP id lb1so1756499pab.35 for ; Mon, 29 Apr 2013 06:25:42 -0700 (PDT) X-Received: by 10.68.247.68 with SMTP id yc4mr7173155pbc.54.1367241942261; Mon, 29 Apr 2013 06:25:42 -0700 (PDT) Received: from localhost ([122.172.192.131]) by mx.google.com with ESMTPSA id al2sm24076451pbc.25.2013.04.29.06.25.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Apr 2013 06:25:41 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com, charles.garcia-tobin@arm.com, arvind.chauhan@arm.com, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 4/5] cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h Date: Mon, 29 Apr 2013 18:54:47 +0530 Message-Id: <8dd9ca3f1848c74e25d8279dfd6e113b0f537b24.1367241503.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQnrsFipPbOExwFDAOpsRvBJG/cVzW+L5s9q8TejvAmeZGm/VGzD+FUokJLWPeI5FxbVEkR/ X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This routine can be used by glue drivers and so better to keep it in arm_big_little.h file. Signed-off-by: Viresh Kumar --- drivers/cpufreq/arm_big_little.c | 5 ----- drivers/cpufreq/arm_big_little.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index dbdf677..fd7beed 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -40,11 +40,6 @@ static struct clk *clk[MAX_CLUSTERS]; static struct cpufreq_frequency_table *freq_table[MAX_CLUSTERS]; static atomic_t cluster_usage[MAX_CLUSTERS] = {ATOMIC_INIT(0), ATOMIC_INIT(0)}; -static int cpu_to_cluster(int cpu) -{ - return topology_physical_package_id(cpu); -} - static unsigned int bL_cpufreq_get(unsigned int cpu) { u32 cur_cluster = cpu_to_cluster(cpu); diff --git a/drivers/cpufreq/arm_big_little.h b/drivers/cpufreq/arm_big_little.h index 70f18fc..79b2ce1 100644 --- a/drivers/cpufreq/arm_big_little.h +++ b/drivers/cpufreq/arm_big_little.h @@ -34,6 +34,11 @@ struct cpufreq_arm_bL_ops { int (*init_opp_table)(struct device *cpu_dev); }; +static inline int cpu_to_cluster(int cpu) +{ + return topology_physical_package_id(cpu); +} + int bL_cpufreq_register(struct cpufreq_arm_bL_ops *ops); void bL_cpufreq_unregister(struct cpufreq_arm_bL_ops *ops);