On 2026-05-28 7:36 pm, Yury Norov wrote:
Switch to pr_info("... %pbl"), and drop the temporary buffer allocation.
I would say this is simply an improvement in its own right, regardless
of whether cpumap_print_to_pagebuf() deserves to be removed or not. For
the change itself, FWIW,
Reviewed-by: Robin Murphy <[email protected]>
This prepares for removing cpumap_print_to_pagebuf().
Signed-off-by: Yury Norov <[email protected]>
---
drivers/firmware/psci/psci_checker.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/firmware/psci/psci_checker.c
b/drivers/firmware/psci/psci_checker.c
index e67ba9891082..ecd745bb90bf 100644
--- a/drivers/firmware/psci/psci_checker.c
+++ b/drivers/firmware/psci/psci_checker.c
@@ -186,7 +186,6 @@ static int hotplug_tests(void)
{
int i, nb_cpu_group, err = -ENOMEM;
cpumask_var_t offlined_cpus, *cpu_groups;
- char *page_buf;
if (!alloc_cpumask_var(&offlined_cpus, GFP_KERNEL))
return err;
@@ -194,10 +193,6 @@ static int hotplug_tests(void)
nb_cpu_group = alloc_init_cpu_groups(&cpu_groups);
if (nb_cpu_group < 0)
goto out_free_cpus;
- page_buf = (char *)__get_free_page(GFP_KERNEL);
- if (!page_buf)
- goto out_free_cpu_groups;
-
/*
* Of course the last CPU cannot be powered down and cpu_down() should
* refuse doing that.
@@ -210,16 +205,11 @@ static int hotplug_tests(void)
* off, the cpu group itself should shut down.
*/
for (i = 0; i < nb_cpu_group; ++i) {
- ssize_t len = cpumap_print_to_pagebuf(true, page_buf,
- cpu_groups[i]);
- /* Remove trailing newline. */
- page_buf[len - 1] = '\0';
- pr_info("Trying to turn off and on again group %d (CPUs %s)\n",
- i, page_buf);
+ pr_info("Trying to turn off and on again group %d (CPUs
%*pbl)\n",
+ i, cpumask_pr_args(cpu_groups[i]));
err += down_and_up_cpus(cpu_groups[i], offlined_cpus);
}
- free_page((unsigned long)page_buf);
out_free_cpu_groups:
free_cpu_groups(nb_cpu_group, &cpu_groups);
out_free_cpus: