Commit c93d13b
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>1 parent 0ad2507 commit c93d13b
1 file changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
| |||
1463 | 1462 | | |
1464 | 1463 | | |
1465 | 1464 | | |
1466 | | - | |
1467 | 1465 | | |
1468 | 1466 | | |
1469 | 1467 | | |
1470 | 1468 | | |
1471 | 1469 | | |
1472 | | - | |
1473 | 1470 | | |
1474 | 1471 | | |
1475 | 1472 | | |
| |||
2055 | 2052 | | |
2056 | 2053 | | |
2057 | 2054 | | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
2058 | 2064 | | |
2059 | 2065 | | |
2060 | 2066 | | |
| |||
2136 | 2142 | | |
2137 | 2143 | | |
2138 | 2144 | | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
2139 | 2149 | | |
2140 | 2150 | | |
2141 | 2151 | | |
| |||
2178 | 2188 | | |
2179 | 2189 | | |
2180 | 2190 | | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
2186 | 2191 | | |
2187 | 2192 | | |
2188 | 2193 | | |
| |||
0 commit comments