summaryrefslogtreecommitdiff
path: root/drivers/perf
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-21 18:53:14 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-21 18:53:14 -1000
commit7be4bc52fd9e0e55dc9a2e0232b89427d2c4b614 (patch)
treec5705f05f97dd869c257a1c35db062eba3fbd5c6 /drivers/perf
parent4403278e4ea2f654f8130a5c03eb8b4516a0f201 (diff)
parentd4ffc4896b3e709c6a5d7e5a78a1fddfc774fa25 (diff)
downloadlinux-next-stable.tar.gz
linux-next-stable.zip
Merge tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-corestable
Pull driver core updates from Danilo Krummrich: "Core: - Add TAINT_FORCED_BIND to taint the kernel and driver module before manual sysfs bind/unbind operations; make add_taint_module() available to driver core and update taint decoding tools and documentation - Constify device_show/store_*() attribute parameters and adapt x86 MCE and perf users to prepare for const dev_ext_attribute instances - Fix UAF in NUMA access node registration failure handling by dropping the device reference with put_device() instead of directly freeing the node debugfs: - Make debugfs_create_str() read-only to eliminate double-free races between concurrent writers; reject writable modes; convert interconnect and SoundWire users to local file operations with mutex-protected strings kobject: - Fix out-of-bounds access in kobject_action_type() when parsing action strings containing embedded NUL bytes - Fix the kobject_set_name() reference in kset_register() kernel-doc Rust: - DMA: - Tie Coherent, CoherentBox and CoherentHandle to the device's bound lifetime to prevent retaining DMA allocations beyond driver unbind; propagate the lifetime through nova-core and the DMA sample driver - I/O: - Require explicit base types for registers and replace relative registers with typed subregion projections; reimplement register!() as a proc macro, support registers using existing types without inline bitfields, and convert nova-core, Tyr and the PCI sample; add AsRepr/AsReprMut and transmute helpers with deferred size checks for representation conversions - Wrap ResourceSize in a transparent newtype with explicit conversions, including checked conversion to usize - PCI: - Add typed PCIe extended capability lookup and SR-IOV accessors for the First VF Offset and decoded VF BAR addresses and widths, keeping raw SR-IOV registers private to preserve PCI core ownership of their state - scatterlist: - Honor the device's maximum segment size as well as the DMA mapping limit when constructing SG tables - Return u32 from SGEntry::dma_len() to match the C segment length type - misc: - Validate auxiliary DeviceId name length explicitly to improve compile-time diagnostics for oversized device ID table entries - Drop unnecessary 'static bounds from debugfs ScopedDir file creation methods to support data containing non-'static references, including DMA buffers Misc: - Add Johan Hovold as driver core maintainer - Simplify platform_device_alloc() by returning early on allocation failure - Fix typos in driver core and kernfs comments" * tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (41 commits) rust: pci: add extended capability and SR-IOV support kobject: Fix the kobj_set_name reference in kset_register() kernel-doc rust: io: convert ResourceSize into a transparent newtype rust: scatterlist: return u32 from SGEntry::dma_len() MAINTAINERS: add myself as driver core maintainer debugfs: make debugfs_create_str() read-only soundwire: debugfs: replace writable string helper interconnect: debugfs: replace writable string helper docs: admin-guide: Handle TAINT_FORCED_BIND when parsing /proc/sys/kernel/tainted driver core: platform: Simplify platform_device_alloc() kobject: fix out-of-bounds access in kobject_action_type() rust: scatterlist: honor the device's maximum segment size driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers module: fix up documentation for add_taint() and add_taint_module() module: pull out add_taint_module() to be public driver core: Constify the signature of device_show/store_*() drivers: perf: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute x86/mce: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute rust: auxiliary: validate DeviceId name length driver core: fix typos in comments ...
Diffstat (limited to 'drivers/perf')
-rw-r--r--drivers/perf/alibaba_uncore_drw_pmu.c2
-rw-r--r--drivers/perf/arm-cci.c2
-rw-r--r--drivers/perf/arm-ccn.c2
-rw-r--r--drivers/perf/arm_cspmu/arm_cspmu.h2
-rw-r--r--drivers/perf/arm_dsu_pmu.c2
-rw-r--r--drivers/perf/arm_spe_pmu.c6
-rw-r--r--drivers/perf/cxl_pmu.c10
-rw-r--r--drivers/perf/fsl_imx8_ddr_perf.c2
-rw-r--r--drivers/perf/fujitsu_uncore_pmu.c2
-rw-r--r--drivers/perf/hisilicon/hisi_pcie_pmu.c2
-rw-r--r--drivers/perf/hisilicon/hisi_uncore_pmu.h6
-rw-r--r--drivers/perf/hisilicon/hns3_pmu.c6
-rw-r--r--drivers/perf/nvidia_t410_c2c_pmu.c2
-rw-r--r--drivers/perf/nvidia_t410_cmem_latency_pmu.c12
-rw-r--r--drivers/perf/qcom_l3_pmu.c8
-rw-r--r--drivers/perf/starfive_starlink_pmu.c2
-rw-r--r--drivers/perf/xgene_pmu.c2
17 files changed, 35 insertions, 35 deletions
diff --git a/drivers/perf/alibaba_uncore_drw_pmu.c b/drivers/perf/alibaba_uncore_drw_pmu.c
index fc934bccf4a6..5b6d3a4736da 100644
--- a/drivers/perf/alibaba_uncore_drw_pmu.c
+++ b/drivers/perf/alibaba_uncore_drw_pmu.c
@@ -135,7 +135,7 @@ static ssize_t ali_drw_pmu_event_show(struct device *dev,
#define ALI_DRW_PMU_ATTR(_name, _func, _config) \
(&((struct dev_ext_attribute[]) { \
- { __ATTR(_name, 0444, _func, NULL), (void *)_config } \
+ { __DEVICE_ATTR(_name, 0444, _func, NULL), (void *)_config } \
})[0].attr.attr)
#define ALI_DRW_PMU_FORMAT_ATTR(_name, _config) \
diff --git a/drivers/perf/arm-cci.c b/drivers/perf/arm-cci.c
index f0ef0a679e74..71035227f58b 100644
--- a/drivers/perf/arm-cci.c
+++ b/drivers/perf/arm-cci.c
@@ -132,7 +132,7 @@ static ssize_t __maybe_unused cci_pmu_event_show(struct device *dev,
#define CCI_EXT_ATTR_ENTRY(_name, _func, _config) \
&((struct dev_ext_attribute[]) { \
- { __ATTR(_name, S_IRUGO, _func, NULL), (void *)_config } \
+ { __DEVICE_ATTR(_name, S_IRUGO, _func, NULL), (void *)_config } \
})[0].attr.attr
#define CCI_FORMAT_EXT_ATTR_ENTRY(_name, _config) \
diff --git a/drivers/perf/arm-ccn.c b/drivers/perf/arm-ccn.c
index c40da3450c8f..e3411bdf5c7c 100644
--- a/drivers/perf/arm-ccn.c
+++ b/drivers/perf/arm-ccn.c
@@ -216,7 +216,7 @@ static void arm_ccn_pmu_config_set(u64 *config, u32 node_xp, u32 type, u32 port)
#define CCN_FORMAT_ATTR(_name, _config) \
struct dev_ext_attribute arm_ccn_pmu_format_attr_##_name = \
- { __ATTR(_name, S_IRUGO, device_show_string, \
+ { __DEVICE_ATTR(_name, S_IRUGO, device_show_string, \
NULL), _config }
static CCN_FORMAT_ATTR(node, "config:0-7");
diff --git a/drivers/perf/arm_cspmu/arm_cspmu.h b/drivers/perf/arm_cspmu/arm_cspmu.h
index c4058d602477..93d5b062de8b 100644
--- a/drivers/perf/arm_cspmu/arm_cspmu.h
+++ b/drivers/perf/arm_cspmu/arm_cspmu.h
@@ -23,7 +23,7 @@
#define ARM_CSPMU_EXT_ATTR(_name, _func, _config) \
(&((struct dev_ext_attribute[]){ \
{ \
- .attr = __ATTR(_name, 0444, _func, NULL), \
+ .attr = __DEVICE_ATTR(_name, 0444, _func, NULL),\
.var = (void *)_config \
} \
})[0].attr.attr)
diff --git a/drivers/perf/arm_dsu_pmu.c b/drivers/perf/arm_dsu_pmu.c
index bcbd19e075a5..8332eaca06dc 100644
--- a/drivers/perf/arm_dsu_pmu.c
+++ b/drivers/perf/arm_dsu_pmu.c
@@ -69,7 +69,7 @@
#define DSU_EXT_ATTR(_name, _func, _config) \
(&((struct dev_ext_attribute[]) { \
{ \
- .attr = __ATTR(_name, 0444, _func, NULL), \
+ .attr = __DEVICE_ATTR(_name, 0444, _func, NULL),\
.var = (void *)_config \
} \
})[0].attr.attr)
diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
index 40314ef8b731..604ae6ba3b07 100644
--- a/drivers/perf/arm_spe_pmu.c
+++ b/drivers/perf/arm_spe_pmu.c
@@ -172,9 +172,9 @@ static ssize_t arm_spe_pmu_cap_show_hex(struct device *dev,
return sysfs_emit(buf, "0x%llx\n", arm_spe_pmu_cap_get(spe_pmu, cap));
}
-#define SPE_EXT_ATTR_ENTRY(_name, _func, _var) \
- &((struct dev_ext_attribute[]) { \
- { __ATTR(_name, S_IRUGO, _func, NULL), (void *)_var } \
+#define SPE_EXT_ATTR_ENTRY(_name, _func, _var) \
+ &((struct dev_ext_attribute[]) { \
+ { __DEVICE_ATTR(_name, S_IRUGO, _func, NULL), (void *)_var } \
})[0].attr.attr
#define SPE_CAP_EXT_ATTR_ENTRY(_name, _var) \
diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c
index 7e4113717e01..76c7e5af7454 100644
--- a/drivers/perf/cxl_pmu.c
+++ b/drivers/perf/cxl_pmu.c
@@ -228,11 +228,11 @@ static int cxl_pmu_parse_caps(struct device *dev, struct cxl_pmu_info *info)
}
#define CXL_PMU_FORMAT_ATTR(_name, _format)\
- (&((struct dev_ext_attribute[]) { \
- { \
- .attr = __ATTR(_name, 0444, device_show_string, NULL), \
- .var = (void *)_format \
- } \
+ (&((struct dev_ext_attribute[]) { \
+ { \
+ .attr = __DEVICE_ATTR(_name, 0444, device_show_string, NULL), \
+ .var = (void *)_format \
+ } \
})[0].attr.attr)
enum {
diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c
index dd8046265584..7553c5872600 100644
--- a/drivers/perf/fsl_imx8_ddr_perf.c
+++ b/drivers/perf/fsl_imx8_ddr_perf.c
@@ -214,7 +214,7 @@ static ssize_t ddr_perf_filter_cap_show(struct device *dev,
#define PERF_EXT_ATTR_ENTRY(_name, _func, _var) \
(&((struct dev_ext_attribute) { \
- __ATTR(_name, 0444, _func, NULL), (void *)_var \
+ __DEVICE_ATTR(_name, 0444, _func, NULL), (void *)_var \
}).attr.attr)
#define PERF_FILTER_EXT_ATTR_ENTRY(_name, _var) \
diff --git a/drivers/perf/fujitsu_uncore_pmu.c b/drivers/perf/fujitsu_uncore_pmu.c
index fa64146fcac6..db90e181b9a8 100644
--- a/drivers/perf/fujitsu_uncore_pmu.c
+++ b/drivers/perf/fujitsu_uncore_pmu.c
@@ -291,7 +291,7 @@ static void fujitsu_uncore_event_read(struct perf_event *event)
#define UNCORE_PMU_FORMAT_ATTR(_name, _config) \
(&((struct dev_ext_attribute[]) { \
- { .attr = __ATTR(_name, 0444, device_show_string, NULL), \
+ { .attr = __DEVICE_ATTR(_name, 0444, device_show_string, NULL), \
.var = (void *)_config, } \
})[0].attr.attr)
diff --git a/drivers/perf/hisilicon/hisi_pcie_pmu.c b/drivers/perf/hisilicon/hisi_pcie_pmu.c
index 0f55d871c67e..0a69d13fa453 100644
--- a/drivers/perf/hisilicon/hisi_pcie_pmu.c
+++ b/drivers/perf/hisilicon/hisi_pcie_pmu.c
@@ -110,7 +110,7 @@ static ssize_t hisi_pcie_event_sysfs_show(struct device *dev, struct device_attr
#define HISI_PCIE_PMU_FORMAT_ATTR(_name, _format) \
(&((struct dev_ext_attribute[]){ \
- { .attr = __ATTR(_name, 0444, device_show_string, NULL), \
+ { .attr = __DEVICE_ATTR(_name, 0444, device_show_string, NULL),\
.var = (void *)_format } \
})[0].attr.attr)
diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.h b/drivers/perf/hisilicon/hisi_uncore_pmu.h
index e5a4b3898865..1a9e73adf543 100644
--- a/drivers/perf/hisilicon/hisi_uncore_pmu.h
+++ b/drivers/perf/hisilicon/hisi_uncore_pmu.h
@@ -27,9 +27,9 @@
#define HISI_MAX_COUNTERS 0x18
#define to_hisi_pmu(p) (container_of(p, struct hisi_pmu, pmu))
-#define HISI_PMU_ATTR(_name, _func, _config) \
- (&((struct dev_ext_attribute[]) { \
- { __ATTR(_name, 0444, _func, NULL), (void *)_config } \
+#define HISI_PMU_ATTR(_name, _func, _config) \
+ (&((struct dev_ext_attribute[]) { \
+ { __DEVICE_ATTR(_name, 0444, _func, NULL), (void *)_config } \
})[0].attr.attr)
#define HISI_PMU_FORMAT_ATTR(_name, _config) \
diff --git a/drivers/perf/hisilicon/hns3_pmu.c b/drivers/perf/hisilicon/hns3_pmu.c
index c157f3572cae..88a1129e9b90 100644
--- a/drivers/perf/hisilicon/hns3_pmu.c
+++ b/drivers/perf/hisilicon/hns3_pmu.c
@@ -405,9 +405,9 @@ static ssize_t hns3_pmu_filter_mode_show(struct device *dev,
return len;
}
-#define HNS3_PMU_ATTR(_name, _func, _config) \
- (&((struct dev_ext_attribute[]) { \
- { __ATTR(_name, 0444, _func, NULL), (void *)_config } \
+#define HNS3_PMU_ATTR(_name, _func, _config) \
+ (&((struct dev_ext_attribute[]) { \
+ { __DEVICE_ATTR(_name, 0444, _func, NULL), (void *)_config } \
})[0].attr.attr)
#define HNS3_PMU_FORMAT_ATTR(_name, _format) \
diff --git a/drivers/perf/nvidia_t410_c2c_pmu.c b/drivers/perf/nvidia_t410_c2c_pmu.c
index bff875f4f625..a41d5712da91 100644
--- a/drivers/perf/nvidia_t410_c2c_pmu.c
+++ b/drivers/perf/nvidia_t410_c2c_pmu.c
@@ -545,7 +545,7 @@ static struct attribute_group nv_c2c_pmu_peer_attr_group = {
#define NV_C2C_PMU_EXT_ATTR(_name, _func, _config) \
(&((struct dev_ext_attribute[]){ \
{ \
- .attr = __ATTR(_name, 0444, _func, NULL), \
+ .attr = __DEVICE_ATTR(_name, 0444, _func, NULL),\
.var = (void *)_config \
} \
})[0].attr.attr)
diff --git a/drivers/perf/nvidia_t410_cmem_latency_pmu.c b/drivers/perf/nvidia_t410_cmem_latency_pmu.c
index 6c8e41598ec1..da91a51fe29e 100644
--- a/drivers/perf/nvidia_t410_cmem_latency_pmu.c
+++ b/drivers/perf/nvidia_t410_cmem_latency_pmu.c
@@ -435,12 +435,12 @@ static struct attribute_group cmem_lat_pmu_identifier_attr_group = {
/* Format attributes. */
-#define NV_PMU_EXT_ATTR(_name, _func, _config) \
- (&((struct dev_ext_attribute[]){ \
- { \
- .attr = __ATTR(_name, 0444, _func, NULL), \
- .var = (void *)_config \
- } \
+#define NV_PMU_EXT_ATTR(_name, _func, _config) \
+ (&((struct dev_ext_attribute[]){ \
+ { \
+ .attr = __DEVICE_ATTR(_name, 0444, _func, NULL), \
+ .var = (void *)_config \
+ } \
})[0].attr.attr)
static struct attribute *cmem_lat_pmu_formats[] = {
diff --git a/drivers/perf/qcom_l3_pmu.c b/drivers/perf/qcom_l3_pmu.c
index e18d0f94e8d8..d036fa05aeab 100644
--- a/drivers/perf/qcom_l3_pmu.c
+++ b/drivers/perf/qcom_l3_pmu.c
@@ -609,10 +609,10 @@ static void qcom_l3_cache__event_read(struct perf_event *event)
/* formats */
-#define L3CACHE_PMU_FORMAT_ATTR(_name, _config) \
- (&((struct dev_ext_attribute[]) { \
- { .attr = __ATTR(_name, 0444, device_show_string, NULL), \
- .var = (void *) _config, } \
+#define L3CACHE_PMU_FORMAT_ATTR(_name, _config) \
+ (&((struct dev_ext_attribute[]) { \
+ { .attr = __DEVICE_ATTR(_name, 0444, device_show_string, NULL), \
+ .var = (void *) _config, } \
})[0].attr.attr)
static struct attribute *qcom_l3_cache_pmu_formats[] = {
diff --git a/drivers/perf/starfive_starlink_pmu.c b/drivers/perf/starfive_starlink_pmu.c
index 98e5ccee2fdc..d9843645554b 100644
--- a/drivers/perf/starfive_starlink_pmu.c
+++ b/drivers/perf/starfive_starlink_pmu.c
@@ -51,7 +51,7 @@
#define STARLINK_FORMAT_ATTR(_name, _config) \
(&((struct dev_ext_attribute[]) { \
- { .attr = __ATTR(_name, 0444, starlink_pmu_sysfs_format_show, NULL), \
+ { .attr = __DEVICE_ATTR(_name, 0444, starlink_pmu_sysfs_format_show, NULL), \
.var = (void *)_config, } \
})[0].attr.attr)
diff --git a/drivers/perf/xgene_pmu.c b/drivers/perf/xgene_pmu.c
index 0aa2b605fd53..aa38426352d2 100644
--- a/drivers/perf/xgene_pmu.c
+++ b/drivers/perf/xgene_pmu.c
@@ -164,7 +164,7 @@ enum xgene_pmu_dev_type {
*/
#define XGENE_PMU_FORMAT_ATTR(_name, _config) \
(&((struct dev_ext_attribute[]) { \
- { .attr = __ATTR(_name, S_IRUGO, device_show_string, NULL), \
+ { .attr = __DEVICE_ATTR(_name, S_IRUGO, device_show_string, NULL), \
.var = (void *) _config, } \
})[0].attr.attr)