From patchwork Thu Nov 28 10:15:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 180387 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7317326ilf; Thu, 28 Nov 2019 02:16:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxIsuPZlHt7nayDhfve39dubAe7PfEdqFHvZD+JjF0Sv6Gz7+/EbyN56RZj7UPIbyfXPaiL X-Received: by 2002:a17:906:6403:: with SMTP id d3mr55023349ejm.258.1574936168978; Thu, 28 Nov 2019 02:16:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574936168; cv=none; d=google.com; s=arc-20160816; b=bs6b9ajv8OtEjKVZw2qhZRZBemKxyLUg7aZFQxrA0K7vMT7bTGahm+XaXIdP4rfMlG X3vtFjKvLAXNe/ThrklzUp1EEyslbl04p1p9PFp/SpYAsHf4auHrgmVyPoXKimc0EZas ISMr2OTqjWmLeosKPeporGNxM8Ldi7EqNPHV3LrGtTStwFlAP2CL3CrJhuyNxQwOvI/f ap80ZdXxLegh98juWS0wpELGNLh6/y2f4ENVyS56KV7YRXOHsN+f9I1mP4Ob1qFL6MUC xFq53KRYjcOzv06784N/6pTIgRpztg9eiwpUQ5XAp9Nb82/3p+tE5tGE8XFf+dZCEOyi Gz7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=vjxsb2dTLYhCMZ135sWHxk36zwYI15okbcBudactGMU=; b=uY0YfDI8gnDHAiBlPAHbnRTqLlASZrvNUXtgX46icGmJkVHrYlwSOiO7WfHd4zDO7D QJVNrCE/CmaBWt4hViJe/gJrF7VuXzkI/bHCwtvyrIHDnYj98FGvThMF5g9ZrsM3DghM 0j+GnjBWJPYEjm/A6IXn/qdW73em48kwUnDUub3iS0TEJ+8vh/xCQTNUSU/2dnOEEwwt muTKZcRRFnf5FoxucwZ1Tb/ZT0vYkDd79CW/oSHY/araJ6bhXKRZOQRWykGf94ep7s75 qPa41Ezn6NR/876zVn3jfcrxf3EzICWbMk30VKGIojKZ/MF3YHR3nTXz7QAQ5LGx5+dH 3RYw== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z15si11218053eju.310.2019.11.28.02.16.08; Thu, 28 Nov 2019 02:16:08 -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 S1726634AbfK1KQD (ORCPT + 26 others); Thu, 28 Nov 2019 05:16:03 -0500 Received: from foss.arm.com ([217.140.110.172]:33202 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbfK1KQB (ORCPT ); Thu, 28 Nov 2019 05:16:01 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 308F61042; Thu, 28 Nov 2019 02:16:01 -0800 (PST) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AC69D3F6C4; Thu, 28 Nov 2019 02:15:59 -0800 (PST) From: Sudeep Holla To: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , "Rafael J . Wysocki" , Liviu Dudau , Viresh Kumar , Dietmar Eggemann , Lorenzo Pieralisi , Morten Rasmussen , Lukasz Luba Subject: [PATCH 2/2] cpufreq: vexpress-spc: Switch cpumask from topology core to OPP sharing Date: Thu, 28 Nov 2019 10:15:47 +0000 Message-Id: <20191128101547.519-2-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128101547.519-1-sudeep.holla@arm.com> References: <20191128101547.519-1-sudeep.holla@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit ca74b316df96 ("arm: Use common cpu_topology structure and functions.") the core cpumask has to be modified during cpu hotplug operations. So using them to set up cpufreq policy cpumask may be incorrect as it may contain only cpus that are online at that instance. Instead, we can use the cpumask setup by OPP library that contains all the cpus sharing OPP table using dev_pm_opp_get_sharing_cpus. Cc: Viresh Kumar Tested-by: Dietmar Eggemann Signed-off-by: Sudeep Holla --- drivers/cpufreq/vexpress-spc-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Acked-by: Viresh Kumar diff --git a/drivers/cpufreq/vexpress-spc-cpufreq.c b/drivers/cpufreq/vexpress-spc-cpufreq.c index 506e3f2bf53a..83c85d3d67e3 100644 --- a/drivers/cpufreq/vexpress-spc-cpufreq.c +++ b/drivers/cpufreq/vexpress-spc-cpufreq.c @@ -434,7 +434,7 @@ static int ve_spc_cpufreq_init(struct cpufreq_policy *policy) if (cur_cluster < MAX_CLUSTERS) { int cpu; - cpumask_copy(policy->cpus, topology_core_cpumask(policy->cpu)); + dev_pm_opp_get_sharing_cpus(cpu_dev, policy->cpus); for_each_cpu(cpu, policy->cpus) per_cpu(physical_cluster, cpu) = cur_cluster;