Message ID | 8c1be216c9f2e2b14a12d6acdbe49b7241d19ad0.1424345053.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBHMUS6TQKGQEU4YVA4I@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 224BC21554 for <linaro@patches.linaro.org>; Thu, 19 Feb 2015 11:33:51 +0000 (UTC) Received: by lbiw7 with SMTP id w7sf4745948lbi.0 for <linaro@patches.linaro.org>; Thu, 19 Feb 2015 03:33:50 -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: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; bh=E4MOn/sI553yY3faBpuxi3xpRH82s4O4owDJoRJcYfo=; b=HmAjMEXUolfBMuJTsGqtKJha5DIx5swLdH5MtA5iWhzRCGisL9rk2hYBCqDDyuAVSA xXP6BGk2seU+ACtNDr7A3EB29DbwPAgk7CWZARP2fnqgl673kLpSXw3wARCI0stxyehH 3VOJdg04cmhH9t7NJqtVdNOTN1X2QRGgGLlYIklbbbQ0An0UTaxP1fGY84QTLJoq+k7R /RMVhX5qxh4Y0Z5+2bTnvmMaiQDSsFdO0S3Uf3153ha8ne7gnewY5UWVk24UDP6Yd25q dZdT6/u50RMkGroB8N0Q5pOC5L5FV0YtZ/IAJJpiOY6ppSxip8ZamsLmWwARaXsDtC/9 up2A== X-Gm-Message-State: ALoCoQkTHnj9i+vbZK70MjDUUX40SxXDxIrSs9N9306ZW10+b3RDy2HS5rzmX/qO4AB6TJEghr5i X-Received: by 10.194.11.70 with SMTP id o6mr514878wjb.6.1424345630063; Thu, 19 Feb 2015 03:33:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.9 with SMTP id bc9ls155297lab.101.gmail; Thu, 19 Feb 2015 03:33:49 -0800 (PST) X-Received: by 10.112.64.193 with SMTP id q1mr2517337lbs.88.1424345629886; Thu, 19 Feb 2015 03:33:49 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id ao10si17030784lac.42.2015.02.19.03.33.49 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Feb 2015 03:33:49 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by labgd6 with SMTP id gd6so6983643lab.7 for <patchwork-forward@linaro.org>; Thu, 19 Feb 2015 03:33:49 -0800 (PST) X-Received: by 10.152.21.100 with SMTP id u4mr3434299lae.41.1424345629735; Thu, 19 Feb 2015 03:33:49 -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.112.35.133 with SMTP id h5csp431595lbj; Thu, 19 Feb 2015 03:33:48 -0800 (PST) X-Received: by 10.68.200.134 with SMTP id js6mr6858180pbc.55.1424345627040; Thu, 19 Feb 2015 03:33:47 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id on3si3330575pac.16.2015.02.19.03.33.45; Thu, 19 Feb 2015 03:33:47 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753383AbbBSLdm (ORCPT <rfc822;amit.pundir@linaro.org> + 11 others); Thu, 19 Feb 2015 06:33:42 -0500 Received: from mail-pd0-f180.google.com ([209.85.192.180]:37178 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753381AbbBSLdl (ORCPT <rfc822;linux-pm@vger.kernel.org>); Thu, 19 Feb 2015 06:33:41 -0500 Received: by pdbfl12 with SMTP id fl12so8299703pdb.4 for <linux-pm@vger.kernel.org>; Thu, 19 Feb 2015 03:33:41 -0800 (PST) X-Received: by 10.70.53.65 with SMTP id z1mr7222950pdo.38.1424345621284; Thu, 19 Feb 2015 03:33:41 -0800 (PST) Received: from localhost ([122.172.249.58]) by mx.google.com with ESMTPSA id ex3sm23581899pdb.23.2015.02.19.03.33.40 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Feb 2015 03:33:40 -0800 (PST) From: Viresh Kumar <viresh.kumar@linaro.org> To: Rafael Wysocki <rjw@rjwysocki.net> Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, sboyd@codeaurora.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar <viresh.kumar@linaro.org> Subject: [PATCH V2 05/20] cpufreq: Clear policy->cpus even for the last CPU Date: Thu, 19 Feb 2015 17:02:07 +0530 Message-Id: <8c1be216c9f2e2b14a12d6acdbe49b7241d19ad0.1424345053.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.3.0.rc0.44.ga94655d In-Reply-To: <cover.1424345053.git.viresh.kumar@linaro.org> References: <cover.1424345053.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1424345053.git.viresh.kumar@linaro.org> References: <cover.1424345053.git.viresh.kumar@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) 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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index d06d1241a900..6ed87d02d293 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1430,9 +1430,7 @@ static int __cpufreq_remove_dev_finish(struct device *dev, down_write(&policy->rwsem); cpus = cpumask_weight(policy->cpus); - - if (cpus > 1) - cpumask_clear_cpu(cpu, policy->cpus); + cpumask_clear_cpu(cpu, policy->cpus); up_write(&policy->rwsem); /* If cpu is last user of policy, free policy */
We clear policy->cpus mask while CPUs are hotplugged out. We do it for all CPUs except the last CPU of the policy. I don't remember what the rationale behind that was, but I couldn't think of anything that will break if we remove this conditional clearing and always clear policy->cpus. The benefit we get out of it is, we can know if a policy is active or not by checking if this field is empty or not. That will be used by later commits. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/cpufreq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)