Skip to content

Commit 6af2fcd

Browse files
committed
Merge: update drivers/base to match upstream v6.14
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/420 JIRA: https://issues.redhat.com/browse/RHEL-80696 Omitted-fix: b57d5ff Omitted-fix: abfceba Omitted-fix: cdd1fa9 Omitted-fix: c94cf02 all 4 of these commits apply to architectures that aren't supported skipped commit 5bc493b "regmap: sdw-mbq: Add support for SDCA deferred controls" because it required bringing in the entirely SDCA sound infrastructure, which was a dozen or more commits otherwise unrelated to this MR. skipped commit 180bbad "arch_numa: Restore nid checks before registering a memblock with a node" because it fixes an issue with numa_memblks, and without that code, causes silent boot code. Adding num_memblks support is well beyond the scope of this MR. Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com> Approved-by: Lyude Paul <lyude@redhat.com> Approved-by: Mika Penttilä <mpenttil@redhat.com> Approved-by: Bastien Nocera <bnocera@redhat.com> Approved-by: Ivan Vecera <ivecera@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Julio Faracco <jfaracco@redhat.com>
2 parents 042e133 + 9095cd6 commit 6af2fcd

Some content is hidden

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

92 files changed

+1347
-483
lines changed

Documentation/driver-api/auxiliary_bus.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Auxiliary Device Creation
2424

2525
.. kernel-doc:: drivers/base/auxiliary.c
2626
:identifiers: auxiliary_device_init __auxiliary_device_add
27-
auxiliary_find_device
2827

2928
Auxiliary Device Memory Model and Lifespan
3029
------------------------------------------

Documentation/driver-api/infrastructure.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ Device Drivers Base
4141
.. kernel-doc:: drivers/base/class.c
4242
:export:
4343

44+
.. kernel-doc:: include/linux/device/faux.h
45+
:internal:
46+
47+
.. kernel-doc:: drivers/base/faux.c
48+
:export:
49+
4450
.. kernel-doc:: drivers/base/node.c
4551
:internal:
4652

arch/sparc/kernel/vio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,13 +419,13 @@ struct vio_remove_node_data {
419419
u64 node;
420420
};
421421

422-
static int vio_md_node_match(struct device *dev, void *arg)
422+
static int vio_md_node_match(struct device *dev, const void *arg)
423423
{
424424
struct vio_dev *vdev = to_vio_dev(dev);
425-
struct vio_remove_node_data *node_data;
425+
const struct vio_remove_node_data *node_data;
426426
u64 node;
427427

428-
node_data = (struct vio_remove_node_data *)arg;
428+
node_data = (const struct vio_remove_node_data *)arg;
429429

430430
node = vio_vdev_node(node_data->hp, vdev);
431431

block/blk-cgroup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,7 @@ static void blkcg_fill_root_iostats(void)
11381138
blkg_iostat_set(&blkg->iostat.cur, &tmp);
11391139
u64_stats_update_end_irqrestore(&blkg->iostat.sync, flags);
11401140
}
1141+
class_dev_iter_exit(&iter);
11411142
}
11421143

11431144
static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)

drivers/acpi/device_pm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ EXPORT_SYMBOL_GPL(acpi_subsys_complete);
11611161
*/
11621162
int acpi_subsys_suspend(struct device *dev)
11631163
{
1164-
if (!dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND) ||
1164+
if (!dev_pm_smart_suspend(dev) ||
11651165
acpi_dev_needs_resume(dev, ACPI_COMPANION(dev)))
11661166
pm_runtime_resume(dev);
11671167

@@ -1320,7 +1320,7 @@ EXPORT_SYMBOL_GPL(acpi_subsys_restore_early);
13201320
*/
13211321
int acpi_subsys_poweroff(struct device *dev)
13221322
{
1323-
if (!dev_pm_test_driver_flags(dev, DPM_FLAG_SMART_SUSPEND) ||
1323+
if (!dev_pm_smart_suspend(dev) ||
13241324
acpi_dev_needs_resume(dev, ACPI_COMPANION(dev)))
13251325
pm_runtime_resume(dev);
13261326

drivers/acpi/property.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,7 @@ static int acpi_fwnode_irq_get(const struct fwnode_handle *fwnode,
16561656
acpi_fwnode_device_dma_supported, \
16571657
.device_get_dma_attr = acpi_fwnode_device_get_dma_attr, \
16581658
.property_present = acpi_fwnode_property_present, \
1659+
.property_read_bool = acpi_fwnode_property_present, \
16591660
.property_read_int_array = \
16601661
acpi_fwnode_property_read_int_array, \
16611662
.property_read_string_array = \

drivers/base/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ obj-y := component.o core.o bus.o dd.o syscore.o \
66
cpu.o firmware.o init.o map.o devres.o \
77
attribute_container.o transport_class.o \
88
topology.o container.o property.o cacheinfo.o \
9-
swnode.o
9+
swnode.o faux.o
1010
obj-$(CONFIG_AUXILIARY_BUS) += auxiliary.o
1111
obj-$(CONFIG_DEVTMPFS) += devtmpfs.o
1212
obj-y += power/

drivers/base/auxiliary.c

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
* Auxiliary devices are created and registered by a subsystem-level core
9393
* device that needs to break up its functionality into smaller fragments. One
9494
* way to extend the scope of an auxiliary_device is to encapsulate it within a
95-
* domain- pecific structure defined by the parent device. This structure
95+
* domain-specific structure defined by the parent device. This structure
9696
* contains the auxiliary_device and any associated shared data/callbacks
9797
* needed to establish the connection with the parent.
9898
*
@@ -335,35 +335,6 @@ int __auxiliary_device_add(struct auxiliary_device *auxdev, const char *modname)
335335
}
336336
EXPORT_SYMBOL_GPL(__auxiliary_device_add);
337337

338-
/**
339-
* auxiliary_find_device - auxiliary device iterator for locating a particular device.
340-
* @start: Device to begin with
341-
* @data: Data to pass to match function
342-
* @match: Callback function to check device
343-
*
344-
* This function returns a reference to a device that is 'found'
345-
* for later use, as determined by the @match callback.
346-
*
347-
* The reference returned should be released with put_device().
348-
*
349-
* The callback should return 0 if the device doesn't match and non-zero
350-
* if it does. If the callback returns non-zero, this function will
351-
* return to the caller and not iterate over any more devices.
352-
*/
353-
struct auxiliary_device *auxiliary_find_device(struct device *start,
354-
const void *data,
355-
device_match_t match)
356-
{
357-
struct device *dev;
358-
359-
dev = bus_find_device(&auxiliary_bus_type, start, data, match);
360-
if (!dev)
361-
return NULL;
362-
363-
return to_auxiliary_dev(dev);
364-
}
365-
EXPORT_SYMBOL_GPL(auxiliary_find_device);
366-
367338
/**
368339
* __auxiliary_driver_register - register a driver for auxiliary bus devices
369340
* @auxdrv: auxiliary_driver structure

drivers/base/base.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ int hypervisor_init(void);
137137
static inline int hypervisor_init(void) { return 0; }
138138
#endif
139139
int platform_bus_init(void);
140+
int faux_bus_init(void);
140141
void cpu_dev_init(void);
141142
void container_dev_init(void);
142143
#ifdef CONFIG_AUXILIARY_BUS

drivers/base/bus.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static struct device *next_device(struct klist_iter *i)
354354
* count in the supplied callback.
355355
*/
356356
int bus_for_each_dev(const struct bus_type *bus, struct device *start,
357-
void *data, int (*fn)(struct device *, void *))
357+
void *data, device_iter_t fn)
358358
{
359359
struct subsys_private *sp = bus_to_subsys(bus);
360360
struct klist_iter i;
@@ -402,9 +402,12 @@ struct device *bus_find_device(const struct bus_type *bus,
402402

403403
klist_iter_init_node(&sp->klist_devices, &i,
404404
(start ? &start->p->knode_bus : NULL));
405-
while ((dev = next_device(&i)))
406-
if (match(dev, data) && get_device(dev))
405+
while ((dev = next_device(&i))) {
406+
if (match(dev, data)) {
407+
get_device(dev);
407408
break;
409+
}
410+
}
408411
klist_iter_exit(&i);
409412
subsys_put(sp);
410413
return dev;

0 commit comments

Comments
 (0)