From patchwork Mon Jan 20 12:39:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dietmar Eggemann X-Patchwork-Id: 23385 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 997672107B for ; Mon, 20 Jan 2014 12:41:40 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id q10sf11895431pdj.10 for ; Mon, 20 Jan 2014 04:41:39 -0800 (PST) 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=SxIB2fIpOScRw8N8yn5RenOiOtyTbYE9gs1alMyhOrY=; b=FcP9yWOIfT07VIzubZKpVhmHGJYJrd6DbWQt5CxglEj7432F9NecFAhI5QleD+4NMc k2dsGaXGYDKU3UdfsMskwXdmLcELvUt57C/UdM6RTcdtlEMYn4qk9D7Xx2W71AVFOyiJ xZYwIUUUGFeibAusStPVHbt36oVVlOncmGjS505jd1izu3wPOHNHrs5Ali0X2Zmx2DJ+ SQ4pYXThzx/iAgR4hdn4HnDF4+wCKnzIfomBgas6VSj4fZzuOibI6LhHed3BklVSz716 mKe1VA88FHOwrlfCNG55p0Xrd75ckCZQdSnccsN3EqeGl3MzCVy7t4OYdBjgDozSvLbS BpEg== X-Gm-Message-State: ALoCoQmGSfUgRxGWv39J+2CcYxQSxqkezGKhq843DBjR4PBjFHZHjPMl4ozJTl/X/QjrjayetCNA X-Received: by 10.66.191.138 with SMTP id gy10mr7359446pac.30.1390221699914; Mon, 20 Jan 2014 04:41:39 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.65 with SMTP id m1ls1703502qed.91.gmail; Mon, 20 Jan 2014 04:41:39 -0800 (PST) X-Received: by 10.221.34.211 with SMTP id st19mr10489543vcb.5.1390221699749; Mon, 20 Jan 2014 04:41:39 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id j5si303753vcg.14.2014.01.20.04.41.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Jan 2014 04:41:39 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so2852120vcb.9 for ; Mon, 20 Jan 2014 04:41:39 -0800 (PST) X-Received: by 10.58.255.233 with SMTP id at9mr1620199ved.20.1390221699660; Mon, 20 Jan 2014 04:41:39 -0800 (PST) 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.174.196 with SMTP id u4csp55912vcz; Mon, 20 Jan 2014 04:41:39 -0800 (PST) X-Received: by 10.66.159.132 with SMTP id xc4mr18225427pab.27.1390221698718; Mon, 20 Jan 2014 04:41:38 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sj5si1302216pab.342.2014.01.20.04.41.38; Mon, 20 Jan 2014 04:41:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753710AbaATMlR (ORCPT + 26 others); Mon, 20 Jan 2014 07:41:17 -0500 Received: from service87.mimecast.com ([91.220.42.44]:51797 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbaATMkI (ORCPT ); Mon, 20 Jan 2014 07:40:08 -0500 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 20 Jan 2014 12:40:07 +0000 Received: from e103711-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 20 Jan 2014 12:40:06 +0000 From: dietmar.eggemann@arm.com To: peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, morten.rasmussen@arm.com, chris.redpath@arm.com Cc: linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com Subject: [RFC v2 PATCH 10/11] sched: delete sd ptr arg in arch_scale_freq_power() Date: Mon, 20 Jan 2014 12:39:47 +0000 Message-Id: <1390221588-20473-11-git-send-email-dietmar.eggemann@arm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1390221588-20473-1-git-send-email-dietmar.eggemann@arm.com> References: <1390221588-20473-1-git-send-email-dietmar.eggemann@arm.com> X-OriginalArrivalTime: 20 Jan 2014 12:40:06.0113 (UTC) FILETIME=[BF289510:01CF15DC] X-MC-Unique: 114012012400702901 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: dietmar.eggemann@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 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 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: , From: Dietmar Eggemann The ARM arch_scale_freq_power function is the only one outside the core scheduler code using struct sched_domain. This argument is not used in the call chain. This patch deletes it to make it possible to un-export struct sched_domain. Signed-off-by: Dietmar Eggemann --- arch/arm/kernel/topology.c | 4 ++-- kernel/sched/fair.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 85a87370f144..ae209ce7d78f 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -42,7 +42,7 @@ */ static DEFINE_PER_CPU(unsigned long, cpu_scale); -unsigned long arch_scale_freq_power(struct sched_domain *sd, int cpu) +unsigned long arch_scale_freq_power(int cpu) { return per_cpu(cpu_scale, cpu); } @@ -166,7 +166,7 @@ void update_cpu_power(unsigned int cpu) set_power_scale(cpu, cpu_capacity(cpu) / middle_capacity); printk(KERN_INFO "CPU%u: update cpu_power %lu\n", - cpu, arch_scale_freq_power(NULL, cpu)); + cpu, arch_scale_freq_power(cpu)); } #else diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c7395d97e4cb..cb93cb09caf8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5257,14 +5257,14 @@ static inline int get_sd_load_idx(struct sched_domain *sd, return load_idx; } -static unsigned long default_scale_freq_power(struct sched_domain *sd, int cpu) +static unsigned long default_scale_freq_power(int cpu) { return SCHED_POWER_SCALE; } -unsigned long __weak arch_scale_freq_power(struct sched_domain *sd, int cpu) +unsigned long __weak arch_scale_freq_power(int cpu) { - return default_scale_freq_power(sd, cpu); + return default_scale_freq_power(cpu); } static unsigned long default_scale_smt_power(struct sched_domain *sd, int cpu) @@ -5329,9 +5329,9 @@ static void update_cpu_power(struct sched_domain *sd, int cpu) sdg->sgp->power_orig = power; if (sched_feat(ARCH_POWER)) - power *= arch_scale_freq_power(sd, cpu); + power *= arch_scale_freq_power(cpu); else - power *= default_scale_freq_power(sd, cpu); + power *= default_scale_freq_power(cpu); power >>= SCHED_POWER_SHIFT;