From patchwork Mon Nov 23 14:28:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juri Lelli X-Patchwork-Id: 57153 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1467976lbb; Mon, 23 Nov 2015 06:29:00 -0800 (PST) X-Received: by 10.66.234.133 with SMTP id ue5mr36437190pac.56.1448288940228; Mon, 23 Nov 2015 06:29:00 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x16si20291515pbt.151.2015.11.23.06.28.59; Mon, 23 Nov 2015 06:29:00 -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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755173AbbKWO2y (ORCPT + 28 others); Mon, 23 Nov 2015 09:28:54 -0500 Received: from foss.arm.com ([217.140.101.70]:56119 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754194AbbKWO2v (ORCPT ); Mon, 23 Nov 2015 09:28:51 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5151F3A1; Mon, 23 Nov 2015 06:28:34 -0800 (PST) Received: from e106622-lin.cambridge.arm.com (e106622-lin.cambridge.arm.com [10.1.208.152]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B4BD53F308; Mon, 23 Nov 2015 06:28:48 -0800 (PST) From: Juri Lelli To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, peterz@infradead.org, vincent.guittot@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, linux@arm.linux.org.uk, sudeep.holla@arm.com, lorenzo.pieralisi@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, juri.lelli@arm.com Subject: [RFC PATCH 1/8] ARM: initialize cpu_scale to its default Date: Mon, 23 Nov 2015 14:28:34 +0000 Message-Id: <1448288921-30307-2-git-send-email-juri.lelli@arm.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1448288921-30307-1-git-send-email-juri.lelli@arm.com> References: <1448288921-30307-1-git-send-email-juri.lelli@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of looping through all cpus calling set_capacity_scale, we can initialise cpu_scale per-cpu variables to SCHED_CAPACITY_SCALE with their definition. Cc: Russell King Signed-off-by: Juri Lelli --- arch/arm/kernel/topology.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.2.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 08b7847..ec279d1 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -40,7 +40,7 @@ * to run the rebalance_domains for all idle cores and the cpu_capacity can be * updated during this sequence. */ -static DEFINE_PER_CPU(unsigned long, cpu_scale); +static DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE; unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu) { @@ -306,8 +306,6 @@ void __init init_cpu_topology(void) cpu_topo->socket_id = -1; cpumask_clear(&cpu_topo->core_sibling); cpumask_clear(&cpu_topo->thread_sibling); - - set_capacity_scale(cpu, SCHED_CAPACITY_SCALE); } smp_wmb();