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-03 12:44:17 -0400
commit608720f0e31e2971919f61679c6993e243fd2d1a (patch)
tree595c614620ef6c0e5ce54a37403bd7da4a4cde6f
parent16592dd1674d178ade5648df9c27df7c60b236d9 (diff)
downloadlinux-next-608720f0e31e2971919f61679c6993e243fd2d1a.tar.gz
linux-next-608720f0e31e2971919f61679c6993e243fd2d1a.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);