]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
cpufreq: intel_pstate: Only mention the BIOS disabling turbo mode once
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 10 Apr 2020 19:26:29 +0000 (20:26 +0100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Mon, 22 Jun 2020 20:21:40 +0000 (17:21 -0300)
BugLink: https://bugs.launchpad.net/bugs/1879759
[ Upstream commit 8c539776ac83c0857395e1ccc9c6b516521a2d32 ]

Make a note of the first time we discover the turbo mode has been
disabled by the BIOS, as otherwise we complain every time we try to
update the mode.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/cpufreq/intel_pstate.c

index 45499e0b9f2f38fa72cde1f98462c067e5a6b5ee..d3d7c4ef7d045e21520b844b2e27beedab28edf4 100644 (file)
@@ -1058,7 +1058,7 @@ static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
 
        update_turbo_state();
        if (global.turbo_disabled) {
-               pr_warn("Turbo disabled by BIOS or unavailable on processor\n");
+               pr_notice_once("Turbo disabled by BIOS or unavailable on processor\n");
                mutex_unlock(&intel_pstate_limits_lock);
                mutex_unlock(&intel_pstate_driver_lock);
                return -EPERM;