From patchwork Mon Dec 28 13:06:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "pi-cheng.chen" X-Patchwork-Id: 59017 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1695991lbb; Mon, 28 Dec 2015 05:06:28 -0800 (PST) X-Received: by 10.66.100.228 with SMTP id fb4mr76815271pab.84.1451307988335; Mon, 28 Dec 2015 05:06:28 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hr4si18505764pad.183.2015.12.28.05.06.28; Mon, 28 Dec 2015 05:06:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980AbbL1NG1 (ORCPT + 6 others); Mon, 28 Dec 2015 08:06:27 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:36169 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751915AbbL1NG0 (ORCPT ); Mon, 28 Dec 2015 08:06:26 -0500 Received: by mail-pa0-f52.google.com with SMTP id yy13so17693776pab.3 for ; Mon, 28 Dec 2015 05:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KBBJk7Xeo1Vc9Ye79bSU6KaphmhyBVYbykbnnPDlMdY=; b=Jdm7BqlWYtyjkiNfRk1p07X51dDUf8Mv4VL9Ojzp2g2BK5kAk4HUsirjD1W9XN8Sq9 CyaSKgpWAsokDiYkBRn+WP9ZBFptzu8h2a6BJKq/yWuv/21B/IGElHDSbkp6DqJ5OOST 1HRXGeTQPmmdyAh5mMA8cVY7/MwWAvtp6OHZc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KBBJk7Xeo1Vc9Ye79bSU6KaphmhyBVYbykbnnPDlMdY=; b=aDFNxRI8nJhdTNPhQU4QYaPhLsOwN0/EOFFfc5tns9Humxs31B6CPd2IDAoEBIuas3 Xqh8068tePvabcdEjUt68uOdUpOIHfgXHJdB7zFdCTrZS8S3lig4JXuPebEEE+iF3Wfx msbAvaGGjH0aSWh0FuSVftkLsdSA7HH+5dU5DgyACrYbNrlCLe8lS5Zng5LJT7dyJb39 y9DzIUj1rvL5AXyl3J2eKo9U7Ehwq+R0LEeztUdEcrgxriRRJjEzpJQKyclOxlyGjJME EkN9LiqxyctxctcMI6aRCQg3fRYYvmE4pXKUUVWOj4dRsyGPMKe0o2m3NH2VLJ4vg7kw Qfsw== X-Gm-Message-State: ALoCoQm2dlC+rE7k2sZFu5YrPaLPcqZWRlwbyN5mPhFiCNag2g1CgJCWc7Liz7YNjldF2Jyx6vIWKtKOdxJzsXzSjIqhWMWhLw== X-Received: by 10.66.180.48 with SMTP id dl16mr77458718pac.39.1451307986223; Mon, 28 Dec 2015 05:06:26 -0800 (PST) Received: from localhost.localdomain ([124.219.30.17]) by smtp.googlemail.com with ESMTPSA id yl1sm81475955pac.35.2015.12.28.05.06.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Dec 2015 05:06:25 -0800 (PST) From: Pi-Cheng Chen To: Viresh Kumar Cc: Matthias Brugger , Michael Turquette , Daniel Kurtz , linux-mediatek@lists.infradead.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2] PM/OPP: Set cpu_dev->id in cpumask first Date: Mon, 28 Dec 2015 21:06:17 +0800 Message-Id: <1451307977-7427-1-git-send-email-pi-cheng.chen@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <20151228031123.GB3598@ubuntu> References: <20151228031123.GB3598@ubuntu> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Set cpu_dev->id in cpumask first when setting up cpumask for CPUs that share the same OPP table. This might be helpful when handling cpumask without the original CPU bitfield set. Signed-off-by: Pi-Cheng Chen --- v1->v2: - Set cpu_dev->id in cpumask at the top instead of skip it in the loop --- drivers/base/power/opp/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Viresh Kumar diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c index 7b445e8..9f0c155 100644 --- a/drivers/base/power/opp/cpu.c +++ b/drivers/base/power/opp/cpu.c @@ -214,7 +214,6 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_of_cpumask_add_table); /* * Works only for OPP v2 bindings. * - * cpumask should be already set to mask of cpu_dev->id. * Returns -ENOENT if operating-points-v2 bindings aren't supported. */ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) @@ -230,6 +229,8 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask return -ENOENT; } + cpumask_set_cpu(cpu_dev->id, cpumask); + /* OPPs are shared ? */ if (!of_property_read_bool(np, "opp-shared")) goto put_cpu_node;