summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury Norov <ynorov@nvidia.com>2026-05-28 14:36:08 -0400
committerYury Norov <ynorov@nvidia.com>2026-07-22 15:38:36 -0400
commite61575a62fae531e7c656a35e4c19f15f4ca3e1d (patch)
treeed76b40e0f7eefd0db54ead5fb75f7bb3a16e9c1
parent6ec12414164e9d66966909e6da08453be5b6c4cc (diff)
downloadlinux-next-e61575a62fae531e7c656a35e4c19f15f4ca3e1d.tar.gz
linux-next-e61575a62fae531e7c656a35e4c19f15f4ca3e1d.zip
psci: simplify hotplug_tests()
Switch to pr_info("... %pbl"), and drop the temporary buffer allocation. This prepares for removing cpumap_print_to_pagebuf(). Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Yury Norov <ynorov@nvidia.com>
-rw-r--r--drivers/firmware/psci/psci_checker.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/firmware/psci/psci_checker.c b/drivers/firmware/psci/psci_checker.c
index e67ba9891082..e045e92cd898 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,17 +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:
free_cpumask_var(offlined_cpus);