From: Yury Norov <ynorov@nvidia.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Yury Norov <ynorov@nvidia.com>
Cc: "Russell King" <linux@armlinux.org.uk>,
"Frank Li" <Frank.Li@nxp.com>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Arnaldo Carvalho de Melo" <acme@kernel.org>,
"Namhyung Kim" <namhyung@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
"Jiri Olsa" <jolsa@kernel.org>, "Ian Rogers" <irogers@google.com>,
"Adrian Hunter" <adrian.hunter@intel.com>,
"James Clark" <james.clark@linaro.org>,
"Thomas Gleixner" <tglx@kernel.org>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Danilo Krummrich" <dakr@kernel.org>,
"Chanwoo Choi" <cw00.choi@samsung.com>,
"MyungJoo Ham" <myungjoo.ham@samsung.com>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Heiko Stuebner" <heiko@sntech.de>,
"Xu Yilun" <yilun.xu@intel.com>, "Tom Rix" <trix@redhat.com>,
"Moritz Fischer" <mdf@kernel.org>,
"Yicong Yang" <yangyicong@hisilicon.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Dennis Dalessandro" <dennis.dalessandro@cornelisnetworks.com>,
"Jason Gunthorpe" <jgg@ziepe.ca>,
"Leon Romanovsky" <leon@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Shuai Xue" <xueshuai@linux.alibaba.com>,
"Will Deacon" <will@kernel.org>,
"Jiucheng Xu" <jiucheng.xu@amlogic.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Robin Murphy" <robin.murphy@arm.com>,
"Jing Zhang" <renyu.zj@linux.alibaba.com>,
"Xu Yang" <xu.yang_2@nxp.com>,
"Linu Cherian" <lcherian@marvell.com>,
"Gowthami Thiagarajan" <gthiagarajan@marvell.com>,
"Ji Sheng Teoh" <jisheng.teoh@starfivetech.com>,
"Khuong Dinh" <khuong@os.amperecomputing.com>,
"Yury Norov" <yury.norov@gmail.com>,
"Kees Cook" <kees@kernel.org>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Aboorva Devarajan" <aboorvad@linux.ibm.com>,
"Ilkka Koskinen" <ilkka@os.amperecomputing.com>,
"Besar Wicaksono" <bwicaksono@nvidia.com>,
"Ma Ke" <make24@iscas.ac.cn>,
"Chengwen Feng" <fengchengwen@huawei.com>,
"Ritesh Harjani" <ritesh.list@gmail.com>,
"Yushan Wang" <wangyushan12@huawei.com>,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-perf-users@vger.kernel.org, x86@kernel.org,
driver-core@lists.linux.dev, linux-pm@vger.kernel.org,
linux-rockchip@lists.infradead.org, linux-fpga@vger.kernel.org,
linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org,
linux-amlogic@lists.infradead.org, linux-cxl@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: [PATCH v2 03/11] x86/events: Use sysfs_emit() for cpumask show callbacks
Date: Thu, 2 Jul 2026 11:47:16 -0400 [thread overview]
Message-ID: <20260702154725.185376-4-ynorov@nvidia.com> (raw)
In-Reply-To: <20260702154725.185376-1-ynorov@nvidia.com>
These callbacks are sysfs show paths.
Use sysfs_emit() and cpumask_pr_args() to emit the masks.
This prepares for removing cpumap_print_to_pagebuf().
Signed-off-by: Yury Norov <ynorov@nvidia.com>
---
arch/x86/events/amd/iommu.c | 2 +-
arch/x86/events/amd/power.c | 2 +-
arch/x86/events/amd/uncore.c | 2 +-
arch/x86/events/intel/core.c | 2 +-
arch/x86/events/intel/uncore.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
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
next prev parent reply other threads:[~2026-07-02 15:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 15:47 [PATCH v2 00/11] lib/cpumask: get rid of cpumap_print_to_pagebuf() Yury Norov
2026-07-02 15:47 ` [PATCH v2 01/11] arm: Use sysfs_emit() for cpumask show callbacks Yury Norov
2026-07-02 15:54 ` sashiko-bot
2026-07-02 15:58 ` Greg Kroah-Hartman
2026-07-02 16:05 ` Yury Norov
2026-07-02 15:47 ` [PATCH v2 02/11] powerpc: " Yury Norov
2026-07-02 15:55 ` sashiko-bot
2026-07-02 15:47 ` Yury Norov [this message]
2026-07-02 15:54 ` [PATCH v2 03/11] x86/events: " sashiko-bot
2026-07-02 15:47 ` [PATCH v2 04/11] cpu: Use sysfs_emit() for cpumask show callback Yury Norov
2026-07-02 15:55 ` sashiko-bot
2026-07-02 15:47 ` [PATCH v2 05/11] devfreq: Use sysfs_emit() for cpumask show callbacks Yury Norov
2026-07-02 15:55 ` sashiko-bot
2026-07-02 15:47 ` [PATCH v2 06/11] fpga: dfl-fme-perf: Use sysfs_emit() for cpumask show Yury Norov
2026-07-02 15:53 ` sashiko-bot
2026-07-02 15:47 ` [PATCH v2 07/11] hwtracing: hisi_ptt: " Yury Norov
2026-07-02 15:52 ` sashiko-bot
2026-07-02 15:47 ` [PATCH v2 08/11] RDMA/hfi1: Use sysfs_emit() for cpumask show helper Yury Norov
2026-07-02 15:55 ` sashiko-bot
2026-07-02 15:47 ` [PATCH v2 09/11] PCI/sysfs: Use sysfs_emit() for cpumask show callbacks Yury Norov
2026-07-02 15:55 ` sashiko-bot
2026-07-02 15:47 ` [PATCH v2 10/11] perf: " Yury Norov
2026-07-02 15:56 ` sashiko-bot
2026-07-02 16:21 ` Robin Murphy
2026-07-02 15:47 ` [PATCH v2 11/11] lib/bitmap-str: get rid of cpumap_print_to_pagebuf() Yury Norov
2026-07-02 15:58 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260702154725.185376-4-ynorov@nvidia.com \
--to=ynorov@nvidia.com \
--cc=Frank.Li@nxp.com \
--cc=aboorvad@linux.ibm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=bwicaksono@nvidia.com \
--cc=chleroy@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=dakr@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=driver-core@lists.linux.dev \
--cc=fengchengwen@huawei.com \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=gthiagarajan@marvell.com \
--cc=heiko@sntech.de \
--cc=hpa@zytor.com \
--cc=ilkka@os.amperecomputing.com \
--cc=imx@lists.linux.dev \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jbrunet@baylibre.com \
--cc=jgg@ziepe.ca \
--cc=jic23@kernel.org \
--cc=jisheng.teoh@starfivetech.com \
--cc=jiucheng.xu@amlogic.com \
--cc=jolsa@kernel.org \
--cc=kees@kernel.org \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=khuong@os.amperecomputing.com \
--cc=kyungmin.park@samsung.com \
--cc=lcherian@marvell.com \
--cc=leon@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=linux@rasmusvillemoes.dk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=make24@iscas.ac.cn \
--cc=mark.rutland@arm.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=mdf@kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=myungjoo.ham@samsung.com \
--cc=namhyung@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=renyu.zj@linux.alibaba.com \
--cc=ritesh.list@gmail.com \
--cc=robin.murphy@arm.com \
--cc=s.hauer@pengutronix.de \
--cc=tglx@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=trix@redhat.com \
--cc=wangyushan12@huawei.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=xu.yang_2@nxp.com \
--cc=xueshuai@linux.alibaba.com \
--cc=yangyicong@hisilicon.com \
--cc=yilun.xu@intel.com \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox