Skip to content

Commit 22c5696

Browse files
committed
Merge tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core
Pull driver core updates from Danilo Krummrich: "debugfs: - Remove unneeded debugfs_file_{get,put}() instances - Remove last remnants of debugfs_real_fops() - Allow storing non-const void * in struct debugfs_inode_info::aux sysfs: - Switch back to attribute_group::bin_attrs (treewide) - Switch back to bin_attribute::read()/write() (treewide) - Constify internal references to 'struct bin_attribute' Support cache-ids for device-tree systems: - Add arch hook arch_compact_of_hwid() - Use arch_compact_of_hwid() to compact MPIDR values on arm64 Rust: - Device: - Introduce CoreInternal device context (for bus internal methods) - Provide generic drvdata accessors for bus devices - Provide Driver::unbind() callbacks - Use the infrastructure above for auxiliary, PCI and platform - Implement Device::as_bound() - Rename Device::as_ref() to Device::from_raw() (treewide) - Implement fwnode and device property abstractions - Implement example usage in the Rust platform sample driver - Devres: - Remove the inner reference count (Arc) and use pin-init instead - Replace Devres::new_foreign_owned() with devres::register() - Require T to be Send in Devres<T> - Initialize the data kept inside a Devres last - Provide an accessor for the Devres associated Device - Device ID: - Add support for ACPI device IDs and driver match tables - Split up generic device ID infrastructure - Use generic device ID infrastructure in net::phy - DMA: - Implement the dma::Device trait - Add DMA mask accessors to dma::Device - Implement dma::Device for PCI and platform devices - Use DMA masks from the DMA sample module - I/O: - Implement abstraction for resource regions (struct resource) - Implement resource-based ioremap() abstractions - Provide platform device accessors for I/O (remap) requests - Misc: - Support fallible PinInit types in Revocable - Implement Wrapper<T> for Opaque<T> - Merge pin-init blanket dependencies (for Devres) Misc: - Fix OF node leak in auxiliary_device_create() - Use util macros in device property iterators - Improve kobject sample code - Add device_link_test() for testing device link flags - Fix typo in Documentation/ABI/testing/sysfs-kernel-address_bits - Hint to prefer container_of_const() over container_of()" * tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (84 commits) rust: io: fix broken intra-doc links to `platform::Device` rust: io: fix broken intra-doc link to missing `flags` module rust: io: mem: enable IoRequest doc-tests rust: platform: add resource accessors rust: io: mem: add a generic iomem abstraction rust: io: add resource abstraction rust: samples: dma: set DMA mask rust: platform: implement the `dma::Device` trait rust: pci: implement the `dma::Device` trait rust: dma: add DMA addressing capabilities rust: dma: implement `dma::Device` trait rust: net::phy Change module_phy_driver macro to use module_device_table macro rust: net::phy represent DeviceId as transparent wrapper over mdio_device_id rust: device_id: split out index support into a separate trait device: rust: rename Device::as_ref() to Device::from_raw() arm64: cacheinfo: Provide helper to compress MPIDR value into u32 cacheinfo: Add arch hook to compress CPU h/w id into 32 bits for cache-id cacheinfo: Set cache 'id' based on DT data container_of: Document container_of() is not to be used in new code driver core: auxiliary bus: fix OF node leak ...
2 parents 854ff79 + 51a486f commit 22c5696

200 files changed

Lines changed: 2956 additions & 953 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/ABI/testing/sysfs-kernel-address_bits

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
What: /sys/kernel/address_bit
1+
What: /sys/kernel/address_bits
22
Date: May 2023
33
KernelVersion: 6.3
44
Contact: Thomas Weißschuh <linux@weissschuh.net>

MAINTAINERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ F: include/linux/acpi.h
302302
F: include/linux/fwnode.h
303303
F: include/linux/fw_table.h
304304
F: lib/fw_table.c
305+
F: rust/kernel/acpi.rs
305306
F: tools/power/acpi/
306307

307308
ACPI APEI
@@ -7438,6 +7439,7 @@ F: include/linux/property.h
74387439
F: include/linux/sysfs.h
74397440
F: lib/kobj*
74407441
F: rust/kernel/device.rs
7442+
F: rust/kernel/device/
74417443
F: rust/kernel/device_id.rs
74427444
F: rust/kernel/devres.rs
74437445
F: rust/kernel/driver.rs
@@ -18715,6 +18717,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
1871518717
F: Documentation/ABI/testing/sysfs-firmware-ofw
1871618718
F: drivers/of/
1871718719
F: include/linux/of*.h
18720+
F: rust/helpers/of.c
1871818721
F: rust/kernel/of.rs
1871918722
F: scripts/dtc/
1872018723
F: tools/testing/selftests/dt/

arch/arm64/include/asm/cache.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,23 @@ int cache_line_size(void);
8787

8888
#define dma_get_cache_alignment cache_line_size
8989

90+
/* Compress a u64 MPIDR value into 32 bits. */
91+
static inline u64 arch_compact_of_hwid(u64 id)
92+
{
93+
u64 aff3 = MPIDR_AFFINITY_LEVEL(id, 3);
94+
95+
/*
96+
* These bits are expected to be RES0. If not, return a value with
97+
* the upper 32 bits set to force the caller to give up on 32 bit
98+
* cache ids.
99+
*/
100+
if (FIELD_GET(GENMASK_ULL(63, 40), id))
101+
return id;
102+
103+
return (aff3 << 24) | FIELD_GET(GENMASK_ULL(23, 0), id);
104+
}
105+
#define arch_compact_of_hwid arch_compact_of_hwid
106+
90107
/*
91108
* Read the effective value of CTR_EL0.
92109
*

arch/powerpc/kernel/secvar-sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static struct attribute *secvar_attrs[] = {
121121

122122
static const struct attribute_group secvar_attr_group = {
123123
.attrs = secvar_attrs,
124-
.bin_attrs_new = secvar_bin_attrs,
124+
.bin_attrs = secvar_bin_attrs,
125125
};
126126
__ATTRIBUTE_GROUPS(secvar_attr);
127127

arch/powerpc/perf/hv-24x7.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ static struct attribute *if_attrs[] = {
11411141

11421142
static const struct attribute_group if_group = {
11431143
.name = "interface",
1144-
.bin_attrs_new = if_bin_attrs,
1144+
.bin_attrs = if_bin_attrs,
11451145
.attrs = if_attrs,
11461146
};
11471147

arch/powerpc/platforms/powernv/opal-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static ssize_t read_opalcore(struct file *file, struct kobject *kobj,
208208

209209
static struct bin_attribute opal_core_attr __ro_after_init = {
210210
.attr = {.name = "core", .mode = 0400},
211-
.read_new = read_opalcore
211+
.read = read_opalcore
212212
};
213213

214214
/*
@@ -607,7 +607,7 @@ static const struct bin_attribute *const mpipl_bin_attr[] = {
607607

608608
static const struct attribute_group mpipl_group = {
609609
.attrs = mpipl_attr,
610-
.bin_attrs_new = mpipl_bin_attr,
610+
.bin_attrs = mpipl_bin_attr,
611611
};
612612

613613
static int __init opalcore_init(void)

arch/powerpc/platforms/powernv/opal-dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ static void create_dump_obj(uint32_t id, size_t size, uint32_t type)
342342
dump->dump_attr.attr.name = "dump";
343343
dump->dump_attr.attr.mode = 0400;
344344
dump->dump_attr.size = size;
345-
dump->dump_attr.read_new = dump_attr_read;
345+
dump->dump_attr.read = dump_attr_read;
346346

347347
dump->id = id;
348348
dump->size = size;

arch/powerpc/platforms/powernv/opal-elog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static void create_elog_obj(uint64_t id, size_t size, uint64_t type)
203203
elog->raw_attr.attr.name = "raw";
204204
elog->raw_attr.attr.mode = 0400;
205205
elog->raw_attr.size = size;
206-
elog->raw_attr.read_new = raw_attr_read;
206+
elog->raw_attr.read = raw_attr_read;
207207

208208
elog->id = id;
209209
elog->size = size;

arch/powerpc/platforms/powernv/opal-flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static ssize_t image_data_write(struct file *filp, struct kobject *kobj,
493493
static const struct bin_attribute image_data_attr = {
494494
.attr = {.name = "image", .mode = 0200},
495495
.size = MAX_IMAGE_SIZE, /* Limit image size */
496-
.write_new = image_data_write,
496+
.write = image_data_write,
497497
};
498498

499499
static struct kobj_attribute validate_attribute =

arch/powerpc/platforms/powernv/opal-msglog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static ssize_t opal_msglog_read(struct file *file, struct kobject *kobj,
102102

103103
static struct bin_attribute opal_msglog_attr __ro_after_init = {
104104
.attr = {.name = "msglog", .mode = 0400},
105-
.read_new = opal_msglog_read
105+
.read = opal_msglog_read
106106
};
107107

108108
struct memcons *__init memcons_init(struct device_node *node, const char *mc_prop_name)

0 commit comments

Comments
 (0)