]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
ACPI: processor: Remove freq Qos request for all CPUs
authorRiwen Lu <luriwen@kylinos.cn>
Tue, 23 Aug 2022 07:43:42 +0000 (15:43 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 Oct 2022 08:39:34 +0000 (10:39 +0200)
BugLink: https://bugs.launchpad.net/bugs/1991717
commit 36527b9d882362567ceb4eea8666813280f30e6f upstream.

The freq Qos request would be removed repeatedly if the cpufreq policy
relates to more than one CPU. Then, it would cause the "called for unknown
object" warning.

Remove the freq Qos request for each CPU relates to the cpufreq policy,
instead of removing repeatedly for the last CPU of it.

Fixes: a1bb46c36ce3 ("ACPI: processor: Add QoS requests for all CPUs")
Reported-by: Jeremy Linton <Jeremy.Linton@arm.com>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
Cc: 5.4+ <stable@vger.kernel.org> # 5.4+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/acpi/processor_thermal.c

index a3d34e3f9f94bef6158e8057f3b8caaf457ab015..921a0b5a58e580b4da45ebac9eadc0fe938306a5 100644 (file)
@@ -144,7 +144,7 @@ void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy)
        unsigned int cpu;
 
        for_each_cpu(cpu, policy->related_cpus) {
-               struct acpi_processor *pr = per_cpu(processors, policy->cpu);
+               struct acpi_processor *pr = per_cpu(processors, cpu);
 
                if (pr)
                        freq_qos_remove_request(&pr->thermal_req);