mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'driver-core-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
"Here is the large set of driver core changes for 6.3-rc1.
There's a lot of changes this development cycle, most of the work
falls into two different categories:
- fw_devlink fixes and updates. This has gone through numerous review
cycles and lots of review and testing by lots of different devices.
Hopefully all should be good now, and Saravana will be keeping a
watch for any potential regression on odd embedded systems.
- driver core changes to work to make struct bus_type able to be
moved into read-only memory (i.e. const) The recent work with Rust
has pointed out a number of areas in the driver core where we are
passing around and working with structures that really do not have
to be dynamic at all, and they should be able to be read-only
making things safer overall. This is the contuation of that work
(started last release with kobject changes) in moving struct
bus_type to be constant. We didn't quite make it for this release,
but the remaining patches will be finished up for the release after
this one, but the groundwork has been laid for this effort.
Other than that we have in here:
- debugfs memory leak fixes in some subsystems
- error path cleanups and fixes for some never-able-to-be-hit
codepaths.
- cacheinfo rework and fixes
- Other tiny fixes, full details are in the shortlog
All of these have been in linux-next for a while with no reported
problems"
[ Geert Uytterhoeven points out that that last sentence isn't true, and
that there's a pending report that has a fix that is queued up - Linus ]
* tag 'driver-core-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (124 commits)
debugfs: drop inline constant formatting for ERR_PTR(-ERROR)
OPP: fix error checking in opp_migrate_dentry()
debugfs: update comment of debugfs_rename()
i3c: fix device.h kernel-doc warnings
dma-mapping: no need to pass a bus_type into get_arch_dma_ops()
driver core: class: move EXPORT_SYMBOL_GPL() lines to the correct place
Revert "driver core: add error handling for devtmpfs_create_node()"
Revert "devtmpfs: add debug info to handle()"
Revert "devtmpfs: remove return value of devtmpfs_delete_node()"
driver core: cpu: don't hand-override the uevent bus_type callback.
devtmpfs: remove return value of devtmpfs_delete_node()
devtmpfs: add debug info to handle()
driver core: add error handling for devtmpfs_create_node()
driver core: bus: update my copyright notice
driver core: bus: add bus_get_dev_root() function
driver core: bus: constify bus_unregister()
driver core: bus: constify some internal functions
driver core: bus: constify bus_get_kset()
driver core: bus: constify bus_register/unregister_notifier()
driver core: remove private pointer from struct bus_type
...
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
What: /sys/kernel/address_bit
|
||||
Date: May 2023
|
||||
KernelVersion: 6.3
|
||||
Contact: Thomas Weißschuh <linux@weissschuh.net>
|
||||
Description:
|
||||
The address size of the running kernel in bits.
|
||||
|
||||
Access: Read
|
||||
|
||||
Users: util-linux
|
||||
@@ -251,6 +251,7 @@ an involved disclosed party. The current ambassadors list:
|
||||
IBM Z Christian Borntraeger <borntraeger@de.ibm.com>
|
||||
Intel Tony Luck <tony.luck@intel.com>
|
||||
Qualcomm Trilok Soni <tsoni@codeaurora.org>
|
||||
Samsung Javier González <javier.gonz@samsung.com>
|
||||
|
||||
Microsoft James Morris <jamorris@linux.microsoft.com>
|
||||
VMware
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
extern const struct dma_map_ops alpha_pci_ops;
|
||||
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(void)
|
||||
{
|
||||
#ifdef CONFIG_ALPHA_JENSEN
|
||||
return NULL;
|
||||
|
||||
@@ -46,7 +46,7 @@ static void ci_leaf_init(struct cacheinfo *this_leaf,
|
||||
int init_cache_level(unsigned int cpu)
|
||||
{
|
||||
unsigned int ctype, level, leaves;
|
||||
int fw_level;
|
||||
int fw_level, ret;
|
||||
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
|
||||
|
||||
for (level = 1, leaves = 0; level <= MAX_CACHE_LEVEL; level++) {
|
||||
@@ -59,13 +59,13 @@ int init_cache_level(unsigned int cpu)
|
||||
leaves += (ctype == CACHE_TYPE_SEPARATE) ? 2 : 1;
|
||||
}
|
||||
|
||||
if (acpi_disabled)
|
||||
if (acpi_disabled) {
|
||||
fw_level = of_find_last_cache_level(cpu);
|
||||
else
|
||||
fw_level = acpi_find_last_cache_level(cpu);
|
||||
|
||||
if (fw_level < 0)
|
||||
return fw_level;
|
||||
} else {
|
||||
ret = acpi_get_cache_info(cpu, &fw_level, NULL);
|
||||
if (ret < 0)
|
||||
fw_level = 0;
|
||||
}
|
||||
|
||||
if (level < fw_level) {
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
extern const struct dma_map_ops *dma_ops;
|
||||
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(void)
|
||||
{
|
||||
return dma_ops;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
extern const struct dma_map_ops jazz_dma_ops;
|
||||
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(void)
|
||||
{
|
||||
#if defined(CONFIG_MACH_JAZZ)
|
||||
return &jazz_dma_ops;
|
||||
|
||||
@@ -199,9 +199,9 @@ static struct attribute *gio_dev_attrs[] = {
|
||||
};
|
||||
ATTRIBUTE_GROUPS(gio_dev);
|
||||
|
||||
static int gio_device_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
static int gio_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
struct gio_device *gio_dev = to_gio_device(dev);
|
||||
const struct gio_device *gio_dev = to_gio_device(dev);
|
||||
|
||||
add_uevent_var(env, "MODALIAS=gio:%x", gio_dev->id.id);
|
||||
return 0;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
extern const struct dma_map_ops *hppa_dma_ops;
|
||||
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(void)
|
||||
{
|
||||
return hppa_dma_ops;
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@ static int parisc_generic_match(struct device *dev, struct device_driver *drv)
|
||||
return match_device(to_parisc_driver(drv), to_parisc_device(dev));
|
||||
}
|
||||
|
||||
static ssize_t make_modalias(struct device *dev, char *buf)
|
||||
static ssize_t make_modalias(const struct device *dev, char *buf)
|
||||
{
|
||||
const struct parisc_device *padev = to_parisc_device(dev);
|
||||
const struct parisc_device_id *id = &padev->id;
|
||||
@@ -562,7 +562,7 @@ static ssize_t make_modalias(struct device *dev, char *buf)
|
||||
(u32)id->sversion);
|
||||
}
|
||||
|
||||
static int parisc_uevent(struct device *dev, struct kobj_uevent_env *env)
|
||||
static int parisc_uevent(const struct device *dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
const struct parisc_device *padev;
|
||||
char modalias[40];
|
||||
|
||||
@@ -396,7 +396,7 @@ static inline struct ps3_system_bus_driver *ps3_drv_to_system_bus_drv(
|
||||
return container_of(_drv, struct ps3_system_bus_driver, core);
|
||||
}
|
||||
static inline struct ps3_system_bus_device *ps3_dev_to_system_bus_dev(
|
||||
struct device *_dev)
|
||||
const struct device *_dev)
|
||||
{
|
||||
return container_of(_dev, struct ps3_system_bus_device, core);
|
||||
}
|
||||
|
||||
@@ -161,10 +161,7 @@ static inline struct vio_driver *to_vio_driver(struct device_driver *drv)
|
||||
return container_of(drv, struct vio_driver, driver);
|
||||
}
|
||||
|
||||
static inline struct vio_dev *to_vio_dev(struct device *dev)
|
||||
{
|
||||
return container_of(dev, struct vio_dev, dev);
|
||||
}
|
||||
#define to_vio_dev(__dev) container_of_const(__dev, struct vio_dev, dev)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _ASM_POWERPC_VIO_H */
|
||||
|
||||
@@ -439,7 +439,7 @@ static void ps3_system_bus_shutdown(struct device *_dev)
|
||||
dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
|
||||
}
|
||||
|
||||
static int ps3_system_bus_uevent(struct device *_dev, struct kobj_uevent_env *env)
|
||||
static int ps3_system_bus_uevent(const struct device *_dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
|
||||
|
||||
|
||||
@@ -426,9 +426,14 @@ static struct attribute *ibmebus_bus_device_attrs[] = {
|
||||
};
|
||||
ATTRIBUTE_GROUPS(ibmebus_bus_device);
|
||||
|
||||
static int ibmebus_bus_modalias(const struct device *dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
return of_device_uevent_modalias(dev, env);
|
||||
}
|
||||
|
||||
struct bus_type ibmebus_bus_type = {
|
||||
.name = "ibmebus",
|
||||
.uevent = of_device_uevent_modalias,
|
||||
.uevent = ibmebus_bus_modalias,
|
||||
.bus_groups = ibmbus_bus_groups,
|
||||
.match = ibmebus_bus_bus_match,
|
||||
.probe = ibmebus_bus_device_probe,
|
||||
|
||||
@@ -1609,10 +1609,10 @@ static int vio_bus_match(struct device *dev, struct device_driver *drv)
|
||||
return (ids != NULL) && (vio_match_device(ids, vio_dev) != NULL);
|
||||
}
|
||||
|
||||
static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
|
||||
static int vio_hotplug(const struct device *dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
const struct vio_dev *vio_dev = to_vio_dev(dev);
|
||||
struct device_node *dn;
|
||||
const struct device_node *dn;
|
||||
const char *cp;
|
||||
|
||||
dn = dev->of_node;
|
||||
|
||||
@@ -113,48 +113,6 @@ static void fill_cacheinfo(struct cacheinfo **this_leaf,
|
||||
}
|
||||
}
|
||||
|
||||
int init_cache_level(unsigned int cpu)
|
||||
{
|
||||
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
|
||||
struct device_node *np = of_cpu_device_node_get(cpu);
|
||||
struct device_node *prev = NULL;
|
||||
int levels = 0, leaves = 0, level;
|
||||
|
||||
if (of_property_read_bool(np, "cache-size"))
|
||||
++leaves;
|
||||
if (of_property_read_bool(np, "i-cache-size"))
|
||||
++leaves;
|
||||
if (of_property_read_bool(np, "d-cache-size"))
|
||||
++leaves;
|
||||
if (leaves > 0)
|
||||
levels = 1;
|
||||
|
||||
prev = np;
|
||||
while ((np = of_find_next_cache_node(np))) {
|
||||
of_node_put(prev);
|
||||
prev = np;
|
||||
if (!of_device_is_compatible(np, "cache"))
|
||||
break;
|
||||
if (of_property_read_u32(np, "cache-level", &level))
|
||||
break;
|
||||
if (level <= levels)
|
||||
break;
|
||||
if (of_property_read_bool(np, "cache-size"))
|
||||
++leaves;
|
||||
if (of_property_read_bool(np, "i-cache-size"))
|
||||
++leaves;
|
||||
if (of_property_read_bool(np, "d-cache-size"))
|
||||
++leaves;
|
||||
levels = level;
|
||||
}
|
||||
|
||||
of_node_put(np);
|
||||
this_cpu_ci->num_levels = levels;
|
||||
this_cpu_ci->num_leaves = leaves;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int populate_cache_leaves(unsigned int cpu)
|
||||
{
|
||||
struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
extern const struct dma_map_ops *dma_ops;
|
||||
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(void)
|
||||
{
|
||||
/* sparc32 uses per-device dma_ops */
|
||||
return IS_ENABLED(CONFIG_SPARC64) ? dma_ops : NULL;
|
||||
|
||||
@@ -488,10 +488,7 @@ static inline struct vio_driver *to_vio_driver(struct device_driver *drv)
|
||||
return container_of(drv, struct vio_driver, driver);
|
||||
}
|
||||
|
||||
static inline struct vio_dev *to_vio_dev(struct device *dev)
|
||||
{
|
||||
return container_of(dev, struct vio_dev, dev);
|
||||
}
|
||||
#define to_vio_dev(__dev) container_of_const(__dev, struct vio_dev, dev)
|
||||
|
||||
int vio_ldc_send(struct vio_driver_state *vio, void *data, int len);
|
||||
void vio_link_state_change(struct vio_driver_state *vio, int event);
|
||||
|
||||
@@ -46,7 +46,7 @@ static const struct vio_device_id *vio_match_device(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
|
||||
static int vio_hotplug(const struct device *dev, struct kobj_uevent_env *env)
|
||||
{
|
||||
const struct vio_dev *vio_dev = to_vio_dev(dev);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
extern const struct dma_map_ops *dma_ops;
|
||||
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
|
||||
static inline const struct dma_map_ops *get_arch_dma_ops(void)
|
||||
{
|
||||
return dma_ops;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1200,7 +1200,7 @@ struct class block_class = {
|
||||
.dev_uevent = block_uevent,
|
||||
};
|
||||
|
||||
static char *block_devnode(struct device *dev, umode_t *mode,
|
||||
static char *block_devnode(const struct device *dev, umode_t *mode,
|
||||
kuid_t *uid, kgid_t *gid)
|
||||
{
|
||||
struct gendisk *disk = dev_to_disk(dev);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user