* [PATCH v1] ACPI: processor: Remove freq Qos request for all CPUs
@ 2022-08-23 7:43 Riwen Lu
2022-08-23 12:26 ` Rafael J. Wysocki
2022-08-23 15:04 ` Jeremy Linton
0 siblings, 2 replies; 3+ messages in thread
From: Riwen Lu @ 2022-08-23 7:43 UTC (permalink / raw)
To: rafael, rui.zhang, lenb, jeremy.linton
Cc: linux-acpi, linux-kernel, Riwen Lu, Jeremy Linton
From: Riwen Lu <luriwen@kylinos.cn>
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>
Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
---
drivers/acpi/processor_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index db6ac540e924..e534fd49a67e 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -151,7 +151,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);
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] ACPI: processor: Remove freq Qos request for all CPUs
2022-08-23 7:43 [PATCH v1] ACPI: processor: Remove freq Qos request for all CPUs Riwen Lu
@ 2022-08-23 12:26 ` Rafael J. Wysocki
2022-08-23 15:04 ` Jeremy Linton
1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2022-08-23 12:26 UTC (permalink / raw)
To: Riwen Lu
Cc: Rafael J. Wysocki, Zhang, Rui, Len Brown, Jeremy Linton,
ACPI Devel Maling List, Linux Kernel Mailing List, Riwen Lu
On Tue, Aug 23, 2022 at 9:44 AM Riwen Lu <luriwen@hotmail.com> wrote:
>
> From: Riwen Lu <luriwen@kylinos.cn>
>
> 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>
> Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
> ---
> drivers/acpi/processor_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
> index db6ac540e924..e534fd49a67e 100644
> --- a/drivers/acpi/processor_thermal.c
> +++ b/drivers/acpi/processor_thermal.c
> @@ -151,7 +151,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);
> --
Thanks for fixing my mistake!
I've applied this one instead of the revert of commit 7fdc74da940d, as
6.0-rc material.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] ACPI: processor: Remove freq Qos request for all CPUs
2022-08-23 7:43 [PATCH v1] ACPI: processor: Remove freq Qos request for all CPUs Riwen Lu
2022-08-23 12:26 ` Rafael J. Wysocki
@ 2022-08-23 15:04 ` Jeremy Linton
1 sibling, 0 replies; 3+ messages in thread
From: Jeremy Linton @ 2022-08-23 15:04 UTC (permalink / raw)
To: Riwen Lu, rafael, rui.zhang, lenb; +Cc: linux-acpi, linux-kernel, Riwen Lu
Hi,
On 8/23/22 02:43, Riwen Lu wrote:
> From: Riwen Lu <luriwen@kylinos.cn>
>
> 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>
> Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
> ---
> drivers/acpi/processor_thermal.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
> index db6ac540e924..e534fd49a67e 100644
> --- a/drivers/acpi/processor_thermal.c
> +++ b/drivers/acpi/processor_thermal.c
> @@ -151,7 +151,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);
This appears to have fixed the module unloading problem. I haven't seen
any newer issues either so:
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-23 17:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23 7:43 [PATCH v1] ACPI: processor: Remove freq Qos request for all CPUs Riwen Lu
2022-08-23 12:26 ` Rafael J. Wysocki
2022-08-23 15:04 ` Jeremy Linton
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®