diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2025-02-10 10:12:53 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-02-19 15:04:45 +0300 |
commit | c93d13b661a6ce34b9cd8241f5e410658078d7b1 (patch) | |
tree | 2f811af2414cd923bc0c849dc7162164f40003de /tools/perf/scripts/python/libxed.py | |
parent | 0ad2507d5d93f39619fc42372c347d6006b64319 (diff) | |
download | linux-c93d13b661a6ce34b9cd8241f5e410658078d7b1.tar.xz |
intel_idle: clean up BYT/CHT auto demotion disable
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, compile-tested only.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Link: https://patch.msgid.link/20250210071253.2991030-1-dedekind1@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions