From: Mario Limonciello <superm1@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Linux PM <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
"Gautham R . Shenoy" <gautham.sheoy@amd.com>
Subject: Re: [PATCH v1] cpufreq: ACPI: Use on_each_cpu_mask() in drv_write()
Date: Wed, 10 Sep 2025 15:38:52 -0500 [thread overview]
Message-ID: <bb565554-f7f8-4e40-8ca4-d265f59aec9e@kernel.org> (raw)
In-Reply-To: <2797300.mvXUDI8C0e@rafael.j.wysocki>
On 9/9/25 6:41 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Make drv_write() call on_each_cpu_mask() instead of using an open-coded
> equivalent of the latter.
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
I feel you should also update the comment before do_drv_write() to
mention it's called with a NULL conditional to
smp_call_function_many_cond(), or just drop that comment.
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
> drivers/cpufreq/acpi-cpufreq.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> --- a/drivers/cpufreq/acpi-cpufreq.c
> +++ b/drivers/cpufreq/acpi-cpufreq.c
> @@ -335,14 +335,8 @@ static void drv_write(struct acpi_cpufre
> .val = val,
> .func.write = data->cpu_freq_write,
> };
> - int this_cpu;
>
> - this_cpu = get_cpu();
> - if (cpumask_test_cpu(this_cpu, mask))
> - do_drv_write(&cmd);
> -
> - smp_call_function_many(mask, do_drv_write, &cmd, 1);
> - put_cpu();
> + on_each_cpu_mask(mask, do_drv_write, &cmd, true);
> }
>
> static u32 get_cur_val(const struct cpumask *mask, struct acpi_cpufreq_data *data)
>
>
>
next prev parent reply other threads:[~2025-09-10 20:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 11:41 [PATCH v1] cpufreq: ACPI: Use on_each_cpu_mask() in drv_write() Rafael J. Wysocki
2025-09-10 20:38 ` Mario Limonciello [this message]
2025-09-11 9:01 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb565554-f7f8-4e40-8ca4-d265f59aec9e@kernel.org \
--to=superm1@kernel.org \
--cc=gautham.sheoy@amd.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox