[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] platform/cpufreq: add public defines for CPUFREQ_SHARED_TYPE_
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Thu, 7 Apr 2022 11:44:40 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=j66CzFnaLl05peFo5LKAcYlaAD/N6oXFnRPL4ET/YAw=; b=hdN7JIF3YiQNYOpvexBG6wu6FlNGkMMJZkeDzOftZrmIIdX1Co1ML7+wLOgm6n7NGfsOOapZ5A+iISlwPO8AI6hZPt23zmDf2/QGwz/Tu9PbKXQhA25OiiSdC6w+oJzMl3Be35AinwbYGBbSN/HYYiCbj1scRLrgg22+7uhv55zlLBEPWX5JoxBLdm2W+WdLBT1u6lqaRiLK6Km/GRaCEVjruEcuxDHD3u1VBAWY2wjGSwJGmdHfRmA6LS2jFwn1aARuE78JOBWKmODzsxgsQf3c56awTIbHmtLh7wOsC35GAh4M0jmwmQ3R/5gYc5MGcZgE/1JsPQtPxhB+PWtnPw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eBQuLIMyXHpYaixUuHqeBIWoaT94ciB6Zpu6ARAsJ/jKM4tIGLECBKGbEcr8YS1RK01vOlhHC4+1PgjV+2pbYzS57hG4rP0IUySoTbbL8q99Ao9/KcPPIvaNeQVU9Z6GQa/qDdfLuXZ4dNyUQbPAnwMsDwlkCl7cakD3hMcvWGpTFlySGDyKGluB1lgxeyEFlS4WUh1gkhWAB430DnZ/WlTMN/8BJhq6WwKlzXMBM0MkCh1PduKDA8uEoKU3SoKT3XrXGy4kYv22OGte7ZPBYJmACou8y1UPvQZdVmZXJeCTCKmZ/CTT8JNGq+yCTXOF2zRmcj5Wt3byVAAUT2ptsg==
- Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 07 Apr 2022 09:44:59 +0000
- Ironport-data: A9a23:ZErQiKIODF6c5ci/FE+R7ZUlxSXFcZb7ZxGr2PjKsXjdYENShjIPy DMdC2CDPP7fazHzL40laom+80kO7ZSByN8xTlFlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokf0/0vrav67xZVF/fngqoDUUYYoAQgsA148IMsdoUg7wbRh3tY32YHR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 IgSkrjpchwJB5TrqeEcdD1bTgBUAJQTrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBNPsM44F/Glp0BnSDOo8QICFSKLPjTNd9Glg3JwUTKuDD yYfQWF2bBrpaiVfAVo8LLgjlb2OuCHFLwQN/Tp5ooJoujOOnWSdyoPFL979atGMA8JPkS6wt m/Aumj0HBweHNie0iaetGKhgPfVmiH2U55UE6e3ntZxm0GazGEXDBwQVHO4rOO/h0r4XMhQQ 2QW8Cczqak59GSwU8LwGRa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jizylSKeGXLzcO9k/seDlBhiXV6UkboJlB9TpY+CRF9U1wsa7USPF/lp P52+pT5fVzp/QtHNBA7dc6MLiK41P2MGfx2UKpUB3a/fI8SjrwQ6Ce2sRA2AjtQu1O8KcP
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Apr 07, 2022 at 11:35:20AM +0200, Jan Beulich wrote:
> On 07.04.2022 11:22, Roger Pau Monné wrote:
> > On Thu, Apr 07, 2022 at 10:48:50AM +0200, Jan Beulich wrote:
> >> On 07.04.2022 10:18, Roger Pau Monne wrote:
> >>> The values set in the shared_type field of xen_processor_performance
> >>> have so far relied on Xen and Linux having the same
> >>> CPUFREQ_SHARED_TYPE_ defines, as those have never been part of the
> >>> public interface.
> >>>
> >>> Formalize by adding the defines for the allowed values in the public
> >>> header, while renaming them to use the XEN_CPUPERF_SHARED_TYPE_ prefix
> >>> for clarity.
> >>>
> >>> Set the Xen internal defines for CPUFREQ_SHARED_TYPE_ using the newly
> >>> introduced XEN_CPUPERF_SHARED_TYPE_ public defines in order to avoid
> >>> unnecessary code churn. While there also drop
> >>> CPUFREQ_SHARED_TYPE_NONE as it's unused.
> >>>
> >>> Fixes: 2fa7bee0a0 ('Get ACPI Px from dom0 and choose Px controller')
> >>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> >>
> >> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> >> with one remark:
> >>
> >>> --- a/xen/include/acpi/cpufreq/cpufreq.h
> >>> +++ b/xen/include/acpi/cpufreq/cpufreq.h
> >>> @@ -78,10 +78,9 @@ DECLARE_PER_CPU(struct cpufreq_policy *,
> >>> cpufreq_cpu_policy);
> >>> extern int __cpufreq_set_policy(struct cpufreq_policy *data,
> >>> struct cpufreq_policy *policy);
> >>>
> >>> -#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
> >>
> >> I realize this is unused, but do we really want/need to drop this?
> >> I think it is used implicitly right now by assuming the value would
> >> be zero; this could do with making explicit, in which case we'd
> >> need the #define.
> >
> > I don't think Xen uses it explicitly, all checks of shared_type are
> > always against a specific CPUFREQ_SHARED_TYPE_{HW,ALL,ANY}.
>
> Well, I said "implicitly"; if there was an explicit reference, you'd
> have run into a build failure. But I did check now - all comparisons of
> ->shared_type are against explicit CPUFREQ_SHARED_TYPE_*. So I guess
> dropping the value is fine.
Yes, that's what I've tried to explain, unsuccessfully it seems :), on
my reply. I should have used 'explicit' instead of 'specific'.
Thanks, Roger.
|