diff --git a/arch/x86/events/amd/iommu.c b/arch/x86/events/amd/iommu.c
index 07b110e8418a..f332c7089bd5 100644
--- a/arch/x86/events/amd/iommu.c
+++ b/arch/x86/events/amd/iommu.c
@@ -137,7 +137,7 @@ static ssize_t _iommu_cpumask_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- return cpumap_print_to_pagebuf(true, buf, &iommu_cpumask);
+ return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&iommu_cpumask));
}
static DEVICE_ATTR(cpumask, S_IRUGO, _iommu_cpumask_show, NULL);
diff --git a/arch/x86/events/amd/power.c b/arch/x86/events/amd/power.c
index 744dffa42dee..66197214b010 100644
--- a/arch/x86/events/amd/power.c
+++ b/arch/x86/events/amd/power.c
@@ -150,7 +150,7 @@ static void pmu_event_read(struct perf_event *event)
static ssize_t
get_attr_cpumask(struct device *dev, struct device_attribute *attr, char *buf)
{
- return cpumap_print_to_pagebuf(true, buf, &cpu_mask);
+ return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&cpu_mask));
}
static DEVICE_ATTR(cpumask, S_IRUGO, get_attr_cpumask, NULL);diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c
index dbc00b6dd69e..10c7a4b5f1a8 100644
--- a/arch/x86/events/amd/uncore.c
+++ b/arch/x86/events/amd/uncore.c
@@ -322,7 +322,7 @@ static ssize_t amd_uncore_attr_show_cpumask(struct device *dev,
struct pmu *ptr = dev_get_drvdata(dev);
struct amd_uncore_pmu *pmu = container_of(ptr, struct amd_uncore_pmu, pmu);
- return cpumap_print_to_pagebuf(true, buf, &pmu->active_mask);
+ return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&pmu->active_mask));
}
static DEVICE_ATTR(cpumask, S_IRUGO, amd_uncore_attr_show_cpumask, NULL);
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 2b35483e2b70..00ecfaa9df3a 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -7564,7 +7564,7 @@ static ssize_t intel_hybrid_get_attr_cpus(struct device *dev,
struct x86_hybrid_pmu *pmu =
container_of(dev_get_drvdata(dev), struct x86_hybrid_pmu, pmu);
- return cpumap_print_to_pagebuf(true, buf, &pmu->supported_cpus);
+ return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&pmu->supported_cpus));
}
static DEVICE_ATTR(cpus, S_IRUGO, intel_hybrid_get_attr_cpus, NULL);
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 7857959c6e82..c5f076d20aa2 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -861,7 +861,7 @@ static ssize_t uncore_get_attr_cpumask(struct device *dev,
{
struct intel_uncore_pmu *pmu = container_of(dev_get_drvdata(dev), struct intel_uncore_pmu, pmu);
- return cpumap_print_to_pagebuf(true, buf, &pmu->cpu_mask);
+ return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&pmu->cpu_mask));
}
static DEVICE_ATTR(cpumask, S_IRUGO, uncore_get_attr_cpumask, NULL);--
2.53.0