* [PATCH v1 0/2] cpufreq: intel_pstate: Broadwell mode HWP cleanup
@ 2026-06-23 17:27 Rafael J. Wysocki
2026-06-23 17:34 ` [PATCH v1 1/2] cpufreq: intel_pstate: Simplify HWP handling on Broadwell Rafael J. Wysocki
2026-06-23 17:34 ` [PATCH v1 2/2] cpufreq: intel_pstate: Rename INTEL_PSTATE_HWP_BROADWELL Rafael J. Wysocki
0 siblings, 2 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2026-06-23 17:27 UTC (permalink / raw)
To: Linux PM; +Cc: Chen Yu, Srinivas Pandruvada, LKML
Hi All,
This replaces
https://lore.kernel.org/linux-pm/12920597.O9o76ZdvQC@rafael.j.wysocki/
which was incomplete and kind of misguided.
Instead of trying to restore behavior from before 5 years ago, make the
Broadwell mode of HWP only prevent hybrid scaling from being used which
is the only effect of it in practice anyway (patch [1/2]).
On top of that rename a symbol (patch [2/2]).
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v1 1/2] cpufreq: intel_pstate: Simplify HWP handling on Broadwell
2026-06-23 17:27 [PATCH v1 0/2] cpufreq: intel_pstate: Broadwell mode HWP cleanup Rafael J. Wysocki
@ 2026-06-23 17:34 ` Rafael J. Wysocki
2026-06-23 17:34 ` [PATCH v1 2/2] cpufreq: intel_pstate: Rename INTEL_PSTATE_HWP_BROADWELL Rafael J. Wysocki
1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2026-06-23 17:34 UTC (permalink / raw)
To: Linux PM; +Cc: Chen Yu, Srinivas Pandruvada, LKML
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
After commit de5bcf404ace ("cpufreq: intel_pstate: Clean up
frequency computations"), the Broadwell HWP mode does not actually
do anything useful because intel_pstate_get_hwp_cap() is called in
intel_pstate_verify_cpu_policy() without checking the Broadwell mode
and it overrides the initial turbo and max pstate values read from
MSR_PLATFORM_INFO (the minimum P-state value still comes from
MSR_PLATFORM_INFO if HWP is used even without the Broadwell mode).
Moreover, hwp_cap_cached is used in some places for updating
MSR_HWP_REQUEST without checking the Broadwell mode either.
Effectively, the only difference made by the Broadwell HWP mode is
skipping the hybrid initialization which may as well be achieved
by avoiding to set pstate_funcs.get_cpu_scaling on Broadwell.
Link: https://sashiko.dev/#/patchset/6005456.DvuYhMxLoT%40rafael.j.wysocki
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
Applies on top of Linux 7.1.
---
drivers/cpufreq/intel_pstate.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 1f093e346430..1cebd44a5f12 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -299,7 +299,6 @@ struct pstate_funcs {
static struct pstate_funcs pstate_funcs __read_mostly;
static bool hwp_active __ro_after_init;
-static int hwp_mode_bdw __ro_after_init;
static bool per_cpu_limits __ro_after_init;
static bool hwp_forced __ro_after_init;
static bool hwp_boost __read_mostly;
@@ -2323,7 +2322,7 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu)
cpu->pstate.min_pstate = pstate_funcs.get_min(cpu->cpu);
cpu->pstate.perf_ctl_scaling = perf_ctl_scaling;
- if (hwp_active && !hwp_mode_bdw) {
+ if (hwp_active) {
__intel_pstate_get_hwp_cap(cpu);
if (pstate_funcs.get_cpu_scaling) {
@@ -3807,7 +3806,6 @@ static int __init intel_pstate_init(void)
if (!no_hwp) {
hwp_active = true;
- hwp_mode_bdw = id->driver_data;
intel_pstate.attr = hwp_cpufreq_attrs;
intel_cpufreq.attr = hwp_cpufreq_attrs;
intel_cpufreq.flags |= CPUFREQ_NEED_UPDATE_LIMITS;
@@ -3815,7 +3813,8 @@ static int __init intel_pstate_init(void)
if (!default_driver)
default_driver = &intel_pstate;
- pstate_funcs.get_cpu_scaling = hwp_get_cpu_scaling;
+ if (!id->driver_data)
+ pstate_funcs.get_cpu_scaling = hwp_get_cpu_scaling;
goto hwp_cpu_matched;
}
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v1 2/2] cpufreq: intel_pstate: Rename INTEL_PSTATE_HWP_BROADWELL
2026-06-23 17:27 [PATCH v1 0/2] cpufreq: intel_pstate: Broadwell mode HWP cleanup Rafael J. Wysocki
2026-06-23 17:34 ` [PATCH v1 1/2] cpufreq: intel_pstate: Simplify HWP handling on Broadwell Rafael J. Wysocki
@ 2026-06-23 17:34 ` Rafael J. Wysocki
1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2026-06-23 17:34 UTC (permalink / raw)
To: Linux PM; +Cc: Chen Yu, Srinivas Pandruvada, LKML
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Since the only role of INTEL_PSTATE_HWP_BROADWELL is to indicate that
hybrid HWP should not be used, rename it to INTEL_PSTATE_HWP_NOT_HYBRID.
No functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/cpufreq/intel_pstate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 1cebd44a5f12..28c1da0f05c6 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -3674,14 +3674,14 @@ static inline bool intel_pstate_has_acpi_ppc(void) { return false; }
static inline void intel_pstate_request_control_from_smm(void) {}
#endif /* CONFIG_ACPI */
-#define INTEL_PSTATE_HWP_BROADWELL 0x01
+#define INTEL_PSTATE_HWP_NOT_HYBRID 0x01
#define X86_MATCH_HWP(vfm, hwp_mode) \
X86_MATCH_VFM_FEATURE(vfm, X86_FEATURE_HWP, hwp_mode)
static const struct x86_cpu_id hwp_support_ids[] __initconst = {
- X86_MATCH_HWP(INTEL_BROADWELL_X, INTEL_PSTATE_HWP_BROADWELL),
- X86_MATCH_HWP(INTEL_BROADWELL_D, INTEL_PSTATE_HWP_BROADWELL),
+ X86_MATCH_HWP(INTEL_BROADWELL_X, INTEL_PSTATE_HWP_NOT_HYBRID),
+ X86_MATCH_HWP(INTEL_BROADWELL_D, INTEL_PSTATE_HWP_NOT_HYBRID),
X86_MATCH_HWP(INTEL_ANY, 0),
{}
};
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-23 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-23 17:27 [PATCH v1 0/2] cpufreq: intel_pstate: Broadwell mode HWP cleanup Rafael J. Wysocki
2026-06-23 17:34 ` [PATCH v1 1/2] cpufreq: intel_pstate: Simplify HWP handling on Broadwell Rafael J. Wysocki
2026-06-23 17:34 ` [PATCH v1 2/2] cpufreq: intel_pstate: Rename INTEL_PSTATE_HWP_BROADWELL Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®