Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3488234ybl; Tue, 21 Jan 2020 01:33:09 -0800 (PST) X-Google-Smtp-Source: APXvYqzFNu+iFDpDG+bpPLm3xnnGRTYPpIZopDsNsSfD0vry+Ea5n38Ap9lJFmsculj4mxY5HbkJ X-Received: by 2002:aca:1b08:: with SMTP id b8mr2338814oib.62.1579599189671; Tue, 21 Jan 2020 01:33:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579599189; cv=none; d=google.com; s=arc-20160816; b=DrSElumklk92dwHlw6iE8khC4UR5ntV8e29mJXQma0cKJavyaVve+X/ARNd82rHJNk 5xeKSO8mH9dFyIekx5kGOCiGMvKI/8RusP6WyIQ23rJJ+V2lE+J8UvUIyWoesi91XH8R Y2P1oV0+qgBgvch8dlrf7kFj+rydAOflqaju1MF9w1g07AeAK9gMWO1DIRqbpn/cUJj4 i959HmwbeLPy3HDbrVNtBCOZlIrEb3OOb8OIWPdPjNPaKhrZwRySG73CDKBv+LRStqe8 CTXdVDh8FZSt3zGHeiOJudOMn9stmkyE0EKngsssmBsWj1Xw8/9z51/8I472U0WCDnH+ 98vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=imtrsyE4PqkfOuBH2bEU5/ycShpe5DgMQpGEtomyMa0=; b=m5DyyjeVmM8WOFkdLFo5apXhtmL4LVkSWC2ZBWN6vv1e+VekAjEK0m3AEK2wmT2AhB mGuEQE2ov+orPfDlVB3LUAYhHgfRd/Vt4svKjtpzZ7bFtgEVdBVKbcWmZC1o5sOwLoL9 b3LrnCTT3TSCzlmVZ09AIKJYzThD549Sv0Mu/L7ixu3JLtsjIjZ2Svi6KCPadAbb9Y+p LYAYdiDCQEXrzwXRDXJYK4Su2nbhc7iSXjznnZbGc3MEDDaUbA88UPNqwFlG7JoQK5nH FpTRqi97tj+R9/+53o+fyn0t9aRFIwvwks+wqM5Y4FNr4wk0jcB0WhKnuL/sWfsbKhlR A4Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rtcJ+LQl; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11si20650455otq.112.2020.01.21.01.32.57; Tue, 21 Jan 2020 01:33:09 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=rtcJ+LQl; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728931AbgAUJcF (ORCPT + 99 others); Tue, 21 Jan 2020 04:32:05 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:37762 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728712AbgAUJcE (ORCPT ); Tue, 21 Jan 2020 04:32:04 -0500 Received: by mail-wm1-f68.google.com with SMTP id f129so2188361wmf.2 for ; Tue, 21 Jan 2020 01:32:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=imtrsyE4PqkfOuBH2bEU5/ycShpe5DgMQpGEtomyMa0=; b=rtcJ+LQlDZ/dhGfo9Iu5OJd4+HKMy2yzD9iSGdalzOoIEncUjzsz5/aNNTd5RjsSc8 zO8R7IWeVumQmIJtNgo4RVZt7gUhd5yZRRBQqVDryoKs8BU04+PpGfSZJNvnjsH/62yj utNq7GGLPGyTxTb1yb3mltp6nzJAjgAWU6qQKOTamwB12SgQZpUurDCVdShHDY4zSwRt 27hnYDJCXhMMgdvO1mW+7T9xCr4uphzvbjrusTEF0ylfATpdKENfYomQu6F+lwzn6RUS UpDbh4WVRvpRmqp5fb/B2A+GM9Tidwg6k1/Hgf4wLH/tybPmLM/Hd8ve+be8A6ZldBH9 pQLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=imtrsyE4PqkfOuBH2bEU5/ycShpe5DgMQpGEtomyMa0=; b=QsLgEeDdpWkuurr66DARhyAY3cxGvch4nS5qL5iTru/V9NgtSCAY9bGElVbd59Vf4A 1HD65Xc88ybtpbXAfV7PzbFSJNWReSJu0Npw1aW9L7NrX0YAyNd2JsT7qTmQel5OWm0Q cOjMOtahoC+Y3/KFDrSZ57JrXBvKTwwOMewuhixbGHXmfEKJEgkDF41AACTEhzYsqPp3 kf8ehxw9axEjwU2ipFD9AVaxDyzISR/SwdT6/gPA/0z2xLuGH1UJFNnMm2F0417BjpEr xyTUSINd67sADRdf27zhSgdREYC/vruZlaXvHM4qGOjBzJxsrDiav2swusawgAY0O+1Q 15Xw== X-Gm-Message-State: APjAAAWhOSyRW1+dIiknFfSxf0UOymjZhuLKL8x7BGAS9YCQ2Og8dA8S 1uFkv3pBS0QqTXkz/kmfa/V9ng== X-Received: by 2002:a1c:a584:: with SMTP id o126mr3199652wme.163.1579599122625; Tue, 21 Jan 2020 01:32:02 -0800 (PST) Received: from google.com ([2a00:79e0:d:110:d6cc:2030:37c1:9964]) by smtp.gmail.com with ESMTPSA id g7sm51210925wrq.21.2020.01.21.01.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 01:32:01 -0800 (PST) Date: Tue, 21 Jan 2020 09:31:58 +0000 From: Quentin Perret To: Lukasz Luba Cc: Dietmar Eggemann , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-imx@nxp.com, Morten.Rasmussen@arm.com, Chris.Redpath@arm.com, ionela.voinescu@arm.com, javi.merino@arm.com, cw00.choi@samsung.com, b.zolnierkie@samsung.com, rjw@rjwysocki.net, sudeep.holla@arm.com, viresh.kumar@linaro.org, nm@ti.com, sboyd@kernel.org, rui.zhang@intel.com, amit.kucheria@verdurent.com, daniel.lezcano@linaro.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, kernel@pengutronix.de, khilman@kernel.org, agross@kernel.org, bjorn.andersson@linaro.org, robh@kernel.org, matthias.bgg@gmail.com, steven.price@arm.com, tomeu.vizoso@collabora.com, alyssa.rosenzweig@collabora.com, airlied@linux.ie, daniel@ffwll.ch, kernel-team@android.com Subject: Re: [PATCH 1/4] PM / EM: and devices to Energy Model Message-ID: <20200121093158.GA154455@google.com> References: <20200116152032.11301-1-lukasz.luba@arm.com> <20200116152032.11301-2-lukasz.luba@arm.com> <20200117105437.GA211774@google.com> <40587d98-0e8d-cbac-dbf5-d26501d47a8c@arm.com> <20200120150918.GA164543@google.com> <8332c4ac-2a7d-1e2d-76e9-7c979a666257@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 20 Jan 2020 at 18:38:41 (+0000), Lukasz Luba wrote: > I think we could avoid this additional argument 'cpumask'. I have > checked the cpufreq_cpu_get function, which should do be good for this: > > ---------->8------------------------- > static int _get_sharing_cpus(struct device *cpu_dev, struct cpumask *span) > { > struct cpufreq_policy *policy; > > policy = cpufreq_cpu_get(cpu_dev->id); > if (policy) { > cpumask_copy(span, policy->cpus); That should be with 'policy->related_cpus', but yes if the policy cpumasks have been populated this approach is OK I think. > cpufreq_cpu_put(policy); > return 0; > } else { > return -EINVAL; > } > } > --------------------------8<------------------------------- Thanks, Quentin