Commit 2cd5769f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

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

Pull driver core updatesk from Greg KH:
 "Here is the big set of driver core updates for 6.15-rc1. Lots of stuff
  happened this development cycle, including:

   - kernfs scaling changes to make it even faster thanks to rcu

   - bin_attribute constify work in many subsystems

   - faux bus minor tweaks for the rust bindings

   - rust binding updates for driver core, pci, and platform busses,
     making more functionaliy available to rust drivers. These are all
     due to people actually trying to use the bindings that were in
     6.14.

   - make Rafael and Danilo full co-maintainers of the driver core
     codebase

   - other minor fixes and updates"

* tag 'driver-core-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (52 commits)
  rust: platform: require Send for Driver trait implementers
  rust: pci: require Send for Driver trait implementers
  rust: platform: impl Send + Sync for platform::Device
  rust: pci: impl Send + Sync for pci::Device
  rust: platform: fix unrestricted &mut platform::Device
  rust: pci: fix unrestricted &mut pci::Device
  rust: device: implement device context marker
  rust: pci: use to_result() in enable_device_mem()
  MAINTAINERS: driver core: mark Rafael and Danilo as co-maintainers
  rust/kernel/faux: mark Registration methods inline
  driver core: faux: only create the device if probe() succeeds
  rust/faux: Add missing parent argument to Registration::new()
  rust/faux: Drop #[repr(transparent)] from faux::Registration
  rust: io: fix devres test with new io accessor functions
  rust: io: rename `io::Io` accessors
  kernfs: Move dput() outside of the RCU section.
  efi: rci2: mark bin_attribute as __ro_after_init
  rapidio: constify 'struct bin_attribute'
  firmware: qemu_fw_cfg: constify 'struct bin_attribute'
  powerpc/perf/hv-24x7: Constify 'struct bin_attribute'
  ...
parents d6b02199 51d0de75
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -7193,15 +7193,17 @@ F: include/linux/component.h
DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
M:	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
R:	"Rafael J. Wysocki" <rafael@kernel.org>
R:	Danilo Krummrich <dakr@kernel.org>
M:	"Rafael J. Wysocki" <rafael@kernel.org>
M:	Danilo Krummrich <dakr@kernel.org>
S:	Supported
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
F:	Documentation/core-api/kobject.rst
F:	drivers/base/
F:	fs/debugfs/
F:	fs/sysfs/
F:	include/linux/device/
F:	include/linux/debugfs.h
F:	include/linux/device.h
F:	include/linux/fwnode.h
F:	include/linux/kobj*
F:	include/linux/property.h
+12 −12
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ static ssize_t size_show(struct kobject *kobj, struct kobj_attribute *attr,
}

static ssize_t data_read(struct file *filep, struct kobject *kobj,
			 struct bin_attribute *attr, char *buf, loff_t off,
			 const struct bin_attribute *attr, char *buf, loff_t off,
			 size_t count)
{
	char *data;
@@ -85,7 +85,7 @@ static ssize_t data_read(struct file *filep, struct kobject *kobj,
}

static ssize_t update_write(struct file *filep, struct kobject *kobj,
			    struct bin_attribute *attr, char *buf, loff_t off,
			    const struct bin_attribute *attr, char *buf, loff_t off,
			    size_t count)
{
	int rc;
@@ -104,11 +104,11 @@ static struct kobj_attribute format_attr = __ATTR_RO(format);

static struct kobj_attribute size_attr = __ATTR_RO(size);

static struct bin_attribute data_attr = __BIN_ATTR_RO(data, 0);
static struct bin_attribute data_attr __ro_after_init = __BIN_ATTR_RO(data, 0);

static struct bin_attribute update_attr = __BIN_ATTR_WO(update, 0);
static struct bin_attribute update_attr __ro_after_init = __BIN_ATTR_WO(update, 0);

static struct bin_attribute *secvar_bin_attrs[] = {
static const struct bin_attribute *const secvar_bin_attrs[] = {
	&data_attr,
	&update_attr,
	NULL,
@@ -121,7 +121,7 @@ static struct attribute *secvar_attrs[] = {

static const struct attribute_group secvar_attr_group = {
	.attrs = secvar_attrs,
	.bin_attrs = secvar_bin_attrs,
	.bin_attrs_new = secvar_bin_attrs,
};
__ATTRIBUTE_GROUPS(secvar_attr);

@@ -130,7 +130,7 @@ static const struct kobj_type secvar_ktype = {
	.default_groups = secvar_attr_groups,
};

static int update_kobj_size(void)
static __init int update_kobj_size(void)
{

	u64 varsize;
@@ -145,7 +145,7 @@ static int update_kobj_size(void)
	return 0;
}

static int secvar_sysfs_config(struct kobject *kobj)
static __init int secvar_sysfs_config(struct kobject *kobj)
{
	struct attribute_group config_group = {
		.name = "config",
@@ -158,7 +158,7 @@ static int secvar_sysfs_config(struct kobject *kobj)
	return 0;
}

static int add_var(const char *name)
static __init int add_var(const char *name)
{
	struct kobject *kobj;
	int rc;
@@ -181,7 +181,7 @@ static int add_var(const char *name)
	return 0;
}

static int secvar_sysfs_load(void)
static __init int secvar_sysfs_load(void)
{
	u64 namesize = 0;
	char *name;
@@ -209,7 +209,7 @@ static int secvar_sysfs_load(void)
	return rc;
}

static int secvar_sysfs_load_static(void)
static __init int secvar_sysfs_load_static(void)
{
	const char * const *name_ptr = secvar_ops->var_names;
	int rc;
@@ -224,7 +224,7 @@ static int secvar_sysfs_load_static(void)
	return 0;
}

static int secvar_sysfs_init(void)
static __init int secvar_sysfs_init(void)
{
	u64 max_size;
	int rc;
+4 −4
Original line number Diff line number Diff line
@@ -998,7 +998,7 @@ static int create_events_from_catalog(struct attribute ***events_,
}

static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
			    struct bin_attribute *bin_attr, char *buf,
			    const struct bin_attribute *bin_attr, char *buf,
			    loff_t offset, size_t count)
{
	long hret;
@@ -1108,14 +1108,14 @@ PAGE_0_ATTR(catalog_version, "%lld\n",
		(unsigned long long)be64_to_cpu(page_0->version));
PAGE_0_ATTR(catalog_len, "%lld\n",
		(unsigned long long)be32_to_cpu(page_0->length) * 4096);
static BIN_ATTR_RO(catalog, 0/* real length varies */);
static const BIN_ATTR_RO(catalog, 0/* real length varies */);
static DEVICE_ATTR_RO(domains);
static DEVICE_ATTR_RO(sockets);
static DEVICE_ATTR_RO(chipspersocket);
static DEVICE_ATTR_RO(coresperchip);
static DEVICE_ATTR_RO(cpumask);

static struct bin_attribute *if_bin_attrs[] = {
static const struct bin_attribute *const if_bin_attrs[] = {
	&bin_attr_catalog,
	NULL,
};
@@ -1141,7 +1141,7 @@ static struct attribute *if_attrs[] = {

static const struct attribute_group if_group = {
	.name = "interface",
	.bin_attrs = if_bin_attrs,
	.bin_attrs_new = if_bin_attrs,
	.attrs = if_attrs,
};

+5 −5
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ static Elf64_Word *__init auxv_to_elf64_notes(Elf64_Word *buf,
 * Returns number of bytes read on success, -errno on failure.
 */
static ssize_t read_opalcore(struct file *file, struct kobject *kobj,
			     struct bin_attribute *bin_attr, char *to,
			     const struct bin_attribute *bin_attr, char *to,
			     loff_t pos, size_t count)
{
	struct opalcore *m;
@@ -206,9 +206,9 @@ static ssize_t read_opalcore(struct file *file, struct kobject *kobj,
	return (tpos - pos);
}

static struct bin_attribute opal_core_attr = {
static struct bin_attribute opal_core_attr __ro_after_init = {
	.attr = {.name = "core", .mode = 0400},
	.read = read_opalcore
	.read_new = read_opalcore
};

/*
@@ -599,7 +599,7 @@ static struct attribute *mpipl_attr[] = {
	NULL,
};

static struct bin_attribute *mpipl_bin_attr[] = {
static const struct bin_attribute *const mpipl_bin_attr[] = {
	&opal_core_attr,
	NULL,

@@ -607,7 +607,7 @@ static struct bin_attribute *mpipl_bin_attr[] = {

static const struct attribute_group mpipl_group = {
	.attrs = mpipl_attr,
	.bin_attrs =  mpipl_bin_attr,
	.bin_attrs_new =  mpipl_bin_attr,
};

static int __init opalcore_init(void)
+2 −2
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ static int64_t dump_read_data(struct dump_obj *dump)
}

static ssize_t dump_attr_read(struct file *filep, struct kobject *kobj,
			      struct bin_attribute *bin_attr,
			      const struct bin_attribute *bin_attr,
			      char *buffer, loff_t pos, size_t count)
{
	ssize_t rc;
@@ -342,7 +342,7 @@ static void create_dump_obj(uint32_t id, size_t size, uint32_t type)
	dump->dump_attr.attr.name = "dump";
	dump->dump_attr.attr.mode = 0400;
	dump->dump_attr.size = size;
	dump->dump_attr.read = dump_attr_read;
	dump->dump_attr.read_new = dump_attr_read;

	dump->id = id;
	dump->size = size;
Loading