[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.22 v2 2/8] x86/mwait-idle: clean up BYT/CHT auto demotion disable
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Thu, 14 May 2026 16:10:24 +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=arcselector10001; 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=Vdfll9wakSiG+LDQDic5BhqH8mPxHVudYeYjIwOKyZo=; b=OyzolpehMBOsfUpmZt9BAsoyK8+WpQwyTvbd4bg2G4hsBNCHX4hzsuzLTqoTOhLUp95V8d7Rrs/wrLnhRYjUP+yfMGzDMVxo8181CQe967Ut4ybLu/OupBO1yJZEp/k+um50hV3dVuKtMYXyPQCTe0n7gvqjYl7yXmV3oGHwPbudKNcNfzi3Mjdfo/5d/gwaBwYzhZ1jHRgu9OD1JH8d4w9zkevRllP0bM9zRYh0inHmTsV/c8WLn6QViqJ2xRVOk22RkyD6Z8cv6aL4DnOn2NUD2rjvn9cSXmGmjisk7lchOp7JbrPHa/z86gkQstBkQtJB1VS5QfjWF5iUWJXnVQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=p9jPPpMU2JckizSZvbSXBVj+4rtOtPnM82hlr+nrYewe8/+lbHvJdbCebkrBzmcYOvLZgaOSW4Js0Ph6ufME/J9MC+I1IUMTeXTG/VDubBR+6cDlVLPQMQMA3MUn1VBwXaQDMIb5uCyCkJw0KT/XAfXnxjKhImaKStlNn3aFQv4JMpJ11Ss+XaQ5SwDLRIu+NIplVSLysTRARzuuRh4Qpj9d0DyAc7GSCLAVc+C0fmkeN0xgGktYZPbhwW7jVBsaaT8GTP6lZFVsqzEZMXyZfZvmavvVzVFTeY+45xPTgLI6v6RtCInNe3oROgW0JPz6U+re+ghu50NihzUnPfrpMA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Delivery-date: Thu, 14 May 2026 14:10:46 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, May 12, 2026 at 05:36:06PM +0200, Jan Beulich wrote:
> Bay Trail (BYT) and Cherry Trail (CHT) platforms have a very specific way
> of disabling auto-demotion via specific MSR bits. Clean up the code so that
> BYT/CHT-specifics do not show up in the common 'struct idle_cpu' data
> structure.
>
> Remove the 'byt_auto_demotion_disable_flag' flag from 'struct idle_cpu',
> because a better coding pattern is to avoid very case-specific fields like
> 'bool byt_auto_demotion_disable_flag' in a common data structure, which is
> used for all platforms, not only BYT/CHT. The code is just more readable
> when common data structures contain only commonly used fields.
>
> Instead, match BYT/CHT in the 'intel_idle_init_cstates_icpu()' function,
> and introduce a small helper to take care of BYT/CHT auto-demotion. This
> is consistent with how platform-specific things are done for other
> platforms.
>
> No intended functional changes.
>
> Inspired by (and description largely taken from) Linux'es c93d13b661a6
> ("intel_idle: clean up BYT/CHT auto demotion disable").
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Thanks, Roger.
|