summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorYury Norov <ynorov@nvidia.com>2026-05-19 12:30:56 -0400
committerYury Norov <ynorov@nvidia.com>2026-05-28 11:36:53 -0400
commitba220b42c05561761b764089b27a34fd2c6cdc19 (patch)
treed79a56603508b20d508063fd422e59398231f50b /include/linux
parent09472f591aa0b72c2dd6c693f48b2d6fea66c7ba (diff)
cpumask: switch cpumap_print_to_pagebuf() to using scnprintf()
In preparation for removing bitmap_print_to_pagebuf(), switch cpumap_print_to_pagebuf() to using scnprintf("%*pbl"). Signed-off-by: Yury Norov <ynorov@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpumask.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 80211900f373..d3cda0544954 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -13,8 +13,10 @@
#include <linux/cpumask_types.h>
#include <linux/gfp_types.h>
#include <linux/numa.h>
+#include <linux/sprintf.h>
#include <linux/threads.h>
#include <linux/types.h>
+#include <vdso/page.h>
#include <asm/bug.h>
@@ -1326,8 +1328,9 @@ static __always_inline bool cpu_dying(unsigned int cpu)
static __always_inline ssize_t
cpumap_print_to_pagebuf(bool list, char *buf, const struct cpumask *mask)
{
- return bitmap_print_to_pagebuf(list, buf, cpumask_bits(mask),
- nr_cpu_ids);
+ /* Opencode offset_in_page(buf) to not include linux/mm.h */
+ return scnprintf(buf, PAGE_SIZE - ((unsigned long)buf & ~PAGE_MASK),
+ list ? "%*pbl\n" : "%*pb\n", cpumask_pr_args(mask));
}
/**