Commit c6e62d00 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'driver-core-7.0-rc1' of...

Merge tag 'driver-core-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core updates from Danilo Krummrich:
 "Bus:

   - Ensure bus->match() is consistently called with the device lock
     held

   - Improve type safety of bus_find_device_by_acpi_dev()

  Devtmpfs:

   - Parse 'devtmpfs.mount=' boot parameter with kstrtoint() instead of
     simple_strtoul()

   - Avoid sparse warning by making devtmpfs_context_ops static

  IOMMU:

   - Do not register the qcom_smmu_tbu_driver in arm_smmu_device_probe()

  MAINTAINERS:

   - Add the new driver-core mailing list (driver-core@lists.linux.dev)
     to all relevant entries

   - Add missing tree location for "FIRMWARE LOADER (request_firmware)"

   - Add driver-model documentation to the "DRIVER CORE" entry

   - Add missing driver-core maintainers to the "AUXILIARY BUS" entry

  Misc:

   - Change return type of attribute_container_register() to void; it
     has always been infallible

   - Do not export sysfs_change_owner(), sysfs_file_change_owner() and
     device_change_owner()

   - Move devres_for_each_res() from the public devres header to
     drivers/base/base.h

   - Do not use a static struct device for the faux bus; allocate it
     dynamically

  Revocable:

   - Patches for the revocable synchronization primitive have been
     scheduled for v7.0-rc1, but have been reverted as they need some
     more refinement

  Rust:

   - Device:
      - Support dev_printk on all device types, not just the core Device
        struct; remove now-redundant .as_ref() calls in dev_* print
        calls

   - Devres:
      - Introduce an internal reference count in Devres<T> to avoid a
        deadlock condition in case of (indirect) nesting

   - DMA:
      - Allow drivers to tune the maximum DMA segment size via
        dma_set_max_seg_size()

   - I/O:
      - Introduce the concept of generic I/O backends to handle
        different kinds of device shared memory through a common
        interface.

        This enables higher-level concepts such as register
        abstractions, I/O slices, and field projections to be built
        generically on top.

        In a first step, introduce the Io, IoCapable<T>, and IoKnownSize
        trait hierarchy for sharing a common interface supporting offset
        validation and bound-checking logic between I/O backends.

      - Refactor MMIO to use the common I/O backend infrastructure

   - Misc:
      - Add __rust_helper annotations to C helpers for inlining into
        Rust code

      - Use "kernel vertical" style for imports

      - Replace kernel::c_str! with C string literals

      - Update ARef imports to use sync::aref

      - Use pin_init::zeroed() for struct auxiliary_device_id and
        debugfs file_operations initialization

      - Use LKMM atomic types in debugfs doc-tests

      - Various minor comment and documentation fixes

   - PCI:
      - Implement PCI configuration space accessors using the common I/O
        backend infrastructure

      - Document pci::Bar device endianness assumptions

   - SoC:
      - Abstractions for struct soc_device and struct soc_device_attribute

      - Sample driver for soc::Device"

* tag 'driver-core-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (79 commits)
  rust: devres: fix race condition due to nesting
  rust: dma: add missing __rust_helper annotations
  samples: rust: pci: Remove some additional `.as_ref()` for `dev_*` print
  Revert "revocable: Revocable resource management"
  Revert "revocable: Add Kunit test cases"
  Revert "selftests: revocable: Add kselftest cases"
  driver core: remove device_change_owner() export
  sysfs: remove exports of sysfs_*change_owner()
  driver core: disable revocable code from build
  revocable: Add KUnit test for concurrent access
  revocable: fix SRCU index corruption by requiring caller-provided storage
  revocable: Add KUnit test for provider lifetime races
  revocable: Fix races in revocable_alloc() using RCU
  driver core: fix inverted "locked" suffix of driver_match_device()
  rust: io: move MIN_SIZE and io_addr_assert to IoKnownSize
  rust: pci: re-export ConfigSpace
  rust: dma: allow drivers to tune max segment size
  gpu: tyr: remove redundant `.as_ref()` for `dev_*` print
  rust: auxiliary: use `pin_init::zeroed()` for device ID
  rust: debugfs: use pin_init::zeroed() for file_operations
  ...
parents 1c2b4a4c ba268514
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -4191,9 +4191,12 @@ F: scripts/Makefile.autofdo
AUXILIARY BUS DRIVER
M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M:	"Rafael J. Wysocki" <rafael@kernel.org>
M:	Danilo Krummrich <dakr@kernel.org>
R:	Dave Ertman <david.m.ertman@intel.com>
R:	Ira Weiny <ira.weiny@intel.com>
R:	Leon Romanovsky <leon@kernel.org>
L:	driver-core@lists.linux.dev
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
F:	Documentation/driver-api/auxiliary_bus.rst
@@ -7286,7 +7289,7 @@ DEVICE I/O & IRQ [RUST]
M:	Danilo Krummrich <dakr@kernel.org>
M:	Alice Ryhl <aliceryhl@google.com>
M:	Daniel Almeida <daniel.almeida@collabora.com>
L:	rust-for-linux@vger.kernel.org
L:	driver-core@lists.linux.dev
S:	Supported
W:	https://rust-for-linux.com
B:	https://github.com/Rust-for-Linux/linux/issues
@@ -7537,7 +7540,7 @@ R: Abdiel Janulgue <abdiel.janulgue@gmail.com>
R:	Daniel Almeida <daniel.almeida@collabora.com>
R:	Robin Murphy <robin.murphy@arm.com>
R:	Andreas Hindborg <a.hindborg@kernel.org>
L:	rust-for-linux@vger.kernel.org
L:	driver-core@lists.linux.dev
S:	Supported
W:	https://rust-for-linux.com
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
@@ -7751,9 +7754,11 @@ DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M:	"Rafael J. Wysocki" <rafael@kernel.org>
M:	Danilo Krummrich <dakr@kernel.org>
L:	driver-core@lists.linux.dev
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
F:	Documentation/core-api/kobject.rst
F:	Documentation/driver-api/driver-model/
F:	drivers/base/
F:	fs/debugfs/
F:	fs/sysfs/
@@ -7774,10 +7779,12 @@ F: rust/kernel/devres.rs
F:	rust/kernel/driver.rs
F:	rust/kernel/faux.rs
F:	rust/kernel/platform.rs
F:	rust/kernel/soc.rs
F:	samples/rust/rust_debugfs.rs
F:	samples/rust/rust_debugfs_scoped.rs
F:	samples/rust/rust_driver_platform.rs
F:	samples/rust/rust_driver_faux.rs
F:	samples/rust/rust_soc.rs
DRIVERS FOR OMAP ADAPTIVE VOLTAGE SCALING (AVS)
M:	Nishanth Menon <nm@ti.com>
@@ -9902,8 +9909,9 @@ FIRMWARE LOADER (request_firmware)
M:	Luis Chamberlain <mcgrof@kernel.org>
M:	Russ Weight <russ.weight@linux.dev>
M:	Danilo Krummrich <dakr@kernel.org>
L:	linux-kernel@vger.kernel.org
L:	driver-core@lists.linux.dev
S:	Maintained
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
F:	Documentation/firmware_class/
F:	drivers/base/firmware_loader/
F:	rust/kernel/firmware.rs
@@ -14050,6 +14058,7 @@ F: tools/testing/selftests/kvm/x86/
KERNFS
M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
M:	Tejun Heo <tj@kernel.org>
L:	driver-core@lists.linux.dev
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
F:	fs/kernfs/
+1 −3
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ static DEFINE_MUTEX(attribute_container_mutex);
 * @cont: The container to register.  This must be allocated by the
 *        callee and should also be zeroed by it.
 */
int
void
attribute_container_register(struct attribute_container *cont)
{
	INIT_LIST_HEAD(&cont->node);
@@ -79,8 +79,6 @@ attribute_container_register(struct attribute_container *cont)
	mutex_lock(&attribute_container_mutex);
	list_add_tail(&cont->node, &attribute_container_list);
	mutex_unlock(&attribute_container_mutex);

	return 0;
}
EXPORT_SYMBOL_GPL(attribute_container_register);

+14 −1
Original line number Diff line number Diff line
@@ -179,12 +179,21 @@ void device_release_driver_internal(struct device *dev, const struct device_driv
void driver_detach(const struct device_driver *drv);
void driver_deferred_probe_del(struct device *dev);
void device_set_deferred_probe_reason(const struct device *dev, struct va_format *vaf);
static inline int driver_match_device(const struct device_driver *drv,
static inline int driver_match_device_locked(const struct device_driver *drv,
					     struct device *dev)
{
	device_lock_assert(dev);

	return drv->bus->match ? drv->bus->match(dev, drv) : 1;
}

static inline int driver_match_device(const struct device_driver *drv,
				      struct device *dev)
{
	guard(device)(dev);
	return driver_match_device_locked(drv, dev);
}

static inline void dev_sync_state(struct device *dev)
{
	if (dev->bus->sync_state)
@@ -213,6 +222,10 @@ static inline void device_set_driver(struct device *dev, const struct device_dri
	WRITE_ONCE(dev->driver, (struct device_driver *)drv);
}

void devres_for_each_res(struct device *dev, dr_release_t release,
			 dr_match_t match, void *match_data,
			 void (*fn)(struct device *, void *, void *),
			 void *data);
int devres_release_all(struct device *dev);
void device_block_probing(void);
void device_unblock_probing(void);
+0 −1
Original line number Diff line number Diff line
@@ -4781,7 +4781,6 @@ int device_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid)
	put_device(dev);
	return error;
}
EXPORT_SYMBOL_GPL(device_change_owner);

/**
 * device_shutdown - call ->shutdown() on each device to shutdown.
+1 −1
Original line number Diff line number Diff line
@@ -928,7 +928,7 @@ static int __device_attach_driver(struct device_driver *drv, void *_data)
	bool async_allowed;
	int ret;

	ret = driver_match_device(drv, dev);
	ret = driver_match_device_locked(drv, dev);
	if (ret == 0) {
		/* no match */
		return 0;
Loading