Commit 0cac73eb authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pm-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
 "Restore the behavior of the no_turbo sysfs attribute in the
  intel_pstate driver which allowed users to make the driver start using
  turbo P-states if they have been enabled on the fly by the firmware
  after OS initialization (Rafael Wysocki)"

* tag 'pm-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: intel_pstate: Check turbo_is_disabled() in store_no_turbo()
parents 94df82fe 350cbb5d
...@@ -1302,12 +1302,17 @@ static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b, ...@@ -1302,12 +1302,17 @@ static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
no_turbo = !!clamp_t(int, input, 0, 1); no_turbo = !!clamp_t(int, input, 0, 1);
if (no_turbo == global.no_turbo) WRITE_ONCE(global.turbo_disabled, turbo_is_disabled());
goto unlock_driver; if (global.turbo_disabled && !no_turbo) {
pr_notice("Turbo disabled by BIOS or unavailable on processor\n");
if (global.turbo_disabled) {
pr_notice_once("Turbo disabled by BIOS or unavailable on processor\n");
count = -EPERM; count = -EPERM;
if (global.no_turbo)
goto unlock_driver;
else
no_turbo = 1;
}
if (no_turbo == global.no_turbo) {
goto unlock_driver; goto unlock_driver;
} }
...@@ -1762,7 +1767,7 @@ static u64 atom_get_val(struct cpudata *cpudata, int pstate) ...@@ -1762,7 +1767,7 @@ static u64 atom_get_val(struct cpudata *cpudata, int pstate)
u32 vid; u32 vid;
val = (u64)pstate << 8; val = (u64)pstate << 8;
if (READ_ONCE(global.no_turbo) && !global.turbo_disabled) if (READ_ONCE(global.no_turbo) && !READ_ONCE(global.turbo_disabled))
val |= (u64)1 << 32; val |= (u64)1 << 32;
vid_fp = cpudata->vid.min + mul_fp( vid_fp = cpudata->vid.min + mul_fp(
...@@ -1927,7 +1932,7 @@ static u64 core_get_val(struct cpudata *cpudata, int pstate) ...@@ -1927,7 +1932,7 @@ static u64 core_get_val(struct cpudata *cpudata, int pstate)
u64 val; u64 val;
val = (u64)pstate << 8; val = (u64)pstate << 8;
if (READ_ONCE(global.no_turbo) && !global.turbo_disabled) if (READ_ONCE(global.no_turbo) && !READ_ONCE(global.turbo_disabled))
val |= (u64)1 << 32; val |= (u64)1 << 32;
return val; return val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment