From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932396AbbJMDXX (ORCPT ); Mon, 12 Oct 2015 23:23:23 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:36014 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932115AbbJMDXW (ORCPT ); Mon, 12 Oct 2015 23:23:22 -0400 Date: Tue, 13 Oct 2015 08:53:01 +0530 From: Viresh Kumar To: Saravana Kannan Cc: Rafael Wysocki , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, open list Subject: Re: [PATCH 1/5] cpufreq: Use cpumask_copy instead of cpumask_or to copy a mask Message-ID: <20151013032301.GL5386@linux> References: <561C0638.8060105@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <561C0638.8060105@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12-10-15, 12:12, Saravana Kannan wrote: > > if (new_policy) { > > /* related_cpus should at least include policy->cpus. */ > >- cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus); > >+ cpumask_copy(policy->related_cpus, policy->cpus); > > Again, why? It actually seems wrong. A 4 core cluster could come up > with just 2 cores when the policy is added. But the related CPUs > would be 4 CPUs. Firstly, the patch hasn't changed anything at all. related_cpus was empty until this point, and orring or setting it with ->cpus will result in the same output. Secondly, this is what we always wanted. related_cpus should contain the mask of all possible CPUs for that cluster. -- viresh