
To keep kernel debian stx aligned with centos stx, porting below commits from centos stx to debian stx: (1)patches related ef3c9a4 kernel: Add auxiliary bus support 19ca0df kernel: Backport IRQ affinity patches a10b746 workqueue affinity: Remove unused variable 8fde1a8 kthread_cpus: Avoid large stack allocation bb6ec66 scsi: Make the disk detection order more consistent bf940a8 rcu: Avoid RCU-related unexpected reboot cfe452a workqueue: Affine rescuer threads and unbound wqs (2)config related 6fe8d60 kernel: Disable NVMe multi-path kconfig option c9cdb90 Fixup recent kconfig cleanup 8551799 Resolve v5.10 kernel configuration file differences (3)kernel-modules related 7ded004 kernel-modules: IRQ affinity hint fix-ups Please pay attention to: [ef3c9a4 kernel: Add auxiliary bus support] which is not only related with kernel patches but also related with kernel-modules. It removes the auxiliary.ko from the oot ice package because auxiliary bus device driver is built into kernel. But the detecting of builtin auxiliary driver in intel-iavf/intel-ice oot driver will fail because debian has 2 linux header packages. So extra patches are added for intel-iavf and intel-ice to pass linux common header to check_aux_bus to make builtin auxiliary driver detected. At the same time the patch [check_aux_bus: Look for kernel headers in the right location] for the oot drivers is removed because it isn't needed any more if the right header path is passed. Test Plan: - PASS: Build kernel-std/kernel-rt. - PASS: Build the 7 oot kernel modules for kernel-std/kernel-rt. - PASS: Build the iso for kernel-std and modules and boot up on qemu. - PASS: Build the test iso for kernel-rt and modules and boot up on qemu. Story: 2009221 Task: 44989 Signed-off-by: Li Zhou <li.zhou@windriver.com> Change-Id: Ic7cddc068eab1516800e90bfe431d042274f86d3
167 lines
7.6 KiB
Diff
167 lines
7.6 KiB
Diff
From 67b5e80aad2083d07dcbe0e36eb15e65217f373b Mon Sep 17 00:00:00 2001
|
|
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Date: Fri, 4 Dec 2020 12:49:28 +0100
|
|
Subject: [PATCH] driver core: auxiliary bus: minor coding style tweaks
|
|
|
|
For some reason, the original aux bus patch had some really long lines
|
|
in a few places, probably due to it being a very long-lived patch in
|
|
development by many different people. Fix that up so that the two files
|
|
all have the same length lines and function formatting styles.
|
|
|
|
Cc: Dan Williams <dan.j.williams@intel.com>
|
|
Cc: Dave Ertman <david.m.ertman@intel.com>
|
|
Cc: Fred Oh <fred.oh@linux.intel.com>
|
|
Cc: Kiran Patil <kiran.patil@intel.com>
|
|
Cc: Leon Romanovsky <leonro@nvidia.com>
|
|
Cc: Martin Habets <mhabets@solarflare.com>
|
|
Cc: Parav Pandit <parav@mellanox.com>
|
|
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
|
|
Cc: Shiraz Saleem <shiraz.saleem@intel.com>
|
|
Link: https://lore.kernel.org/r/X8oiSFTpYHw1xE/o@kroah.com
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
(cherry picked from commit 0d2bf11a6b3e275a526b8d42d8d4a3a6067cf953)
|
|
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
|
|
---
|
|
drivers/base/auxiliary.c | 58 +++++++++++++++++++----------------
|
|
include/linux/auxiliary_bus.h | 6 ++--
|
|
2 files changed, 35 insertions(+), 29 deletions(-)
|
|
|
|
diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c
|
|
index c44e85802b43..f303daadf843 100644
|
|
--- a/drivers/base/auxiliary.c
|
|
+++ b/drivers/base/auxiliary.c
|
|
@@ -50,8 +50,8 @@ static int auxiliary_uevent(struct device *dev, struct kobj_uevent_env *env)
|
|
name = dev_name(dev);
|
|
p = strrchr(name, '.');
|
|
|
|
- return add_uevent_var(env, "MODALIAS=%s%.*s", AUXILIARY_MODULE_PREFIX, (int)(p - name),
|
|
- name);
|
|
+ return add_uevent_var(env, "MODALIAS=%s%.*s", AUXILIARY_MODULE_PREFIX,
|
|
+ (int)(p - name), name);
|
|
}
|
|
|
|
static const struct dev_pm_ops auxiliary_dev_pm_ops = {
|
|
@@ -113,16 +113,18 @@ static struct bus_type auxiliary_bus_type = {
|
|
* auxiliary_device_init - check auxiliary_device and initialize
|
|
* @auxdev: auxiliary device struct
|
|
*
|
|
- * This is the first step in the two-step process to register an auxiliary_device.
|
|
+ * This is the first step in the two-step process to register an
|
|
+ * auxiliary_device.
|
|
*
|
|
- * When this function returns an error code, then the device_initialize will *not* have
|
|
- * been performed, and the caller will be responsible to free any memory allocated for the
|
|
- * auxiliary_device in the error path directly.
|
|
+ * When this function returns an error code, then the device_initialize will
|
|
+ * *not* have been performed, and the caller will be responsible to free any
|
|
+ * memory allocated for the auxiliary_device in the error path directly.
|
|
*
|
|
- * It returns 0 on success. On success, the device_initialize has been performed. After this
|
|
- * point any error unwinding will need to include a call to auxiliary_device_uninit().
|
|
- * In this post-initialize error scenario, a call to the device's .release callback will be
|
|
- * triggered, and all memory clean-up is expected to be handled there.
|
|
+ * It returns 0 on success. On success, the device_initialize has been
|
|
+ * performed. After this point any error unwinding will need to include a call
|
|
+ * to auxiliary_device_uninit(). In this post-initialize error scenario, a call
|
|
+ * to the device's .release callback will be triggered, and all memory clean-up
|
|
+ * is expected to be handled there.
|
|
*/
|
|
int auxiliary_device_init(struct auxiliary_device *auxdev)
|
|
{
|
|
@@ -149,16 +151,19 @@ EXPORT_SYMBOL_GPL(auxiliary_device_init);
|
|
* @auxdev: auxiliary bus device to add to the bus
|
|
* @modname: name of the parent device's driver module
|
|
*
|
|
- * This is the second step in the two-step process to register an auxiliary_device.
|
|
+ * This is the second step in the two-step process to register an
|
|
+ * auxiliary_device.
|
|
*
|
|
- * This function must be called after a successful call to auxiliary_device_init(), which
|
|
- * will perform the device_initialize. This means that if this returns an error code, then a
|
|
- * call to auxiliary_device_uninit() must be performed so that the .release callback will
|
|
- * be triggered to free the memory associated with the auxiliary_device.
|
|
+ * This function must be called after a successful call to
|
|
+ * auxiliary_device_init(), which will perform the device_initialize. This
|
|
+ * means that if this returns an error code, then a call to
|
|
+ * auxiliary_device_uninit() must be performed so that the .release callback
|
|
+ * will be triggered to free the memory associated with the auxiliary_device.
|
|
*
|
|
- * The expectation is that users will call the "auxiliary_device_add" macro so that the caller's
|
|
- * KBUILD_MODNAME is automatically inserted for the modname parameter. Only if a user requires
|
|
- * a custom name would this version be called directly.
|
|
+ * The expectation is that users will call the "auxiliary_device_add" macro so
|
|
+ * that the caller's KBUILD_MODNAME is automatically inserted for the modname
|
|
+ * parameter. Only if a user requires a custom name would this version be
|
|
+ * called directly.
|
|
*/
|
|
int __auxiliary_device_add(struct auxiliary_device *auxdev, const char *modname)
|
|
{
|
|
@@ -166,13 +171,13 @@ int __auxiliary_device_add(struct auxiliary_device *auxdev, const char *modname)
|
|
int ret;
|
|
|
|
if (!modname) {
|
|
- pr_err("auxiliary device modname is NULL\n");
|
|
+ dev_err(dev, "auxiliary device modname is NULL\n");
|
|
return -EINVAL;
|
|
}
|
|
|
|
ret = dev_set_name(dev, "%s.%s.%d", modname, auxdev->name, auxdev->id);
|
|
if (ret) {
|
|
- pr_err("auxiliary device dev_set_name failed: %d\n", ret);
|
|
+ dev_err(dev, "auxiliary device dev_set_name failed: %d\n", ret);
|
|
return ret;
|
|
}
|
|
|
|
@@ -197,9 +202,9 @@ EXPORT_SYMBOL_GPL(__auxiliary_device_add);
|
|
* if it does. If the callback returns non-zero, this function will
|
|
* return to the caller and not iterate over any more devices.
|
|
*/
|
|
-struct auxiliary_device *
|
|
-auxiliary_find_device(struct device *start, const void *data,
|
|
- int (*match)(struct device *dev, const void *data))
|
|
+struct auxiliary_device *auxiliary_find_device(struct device *start,
|
|
+ const void *data,
|
|
+ int (*match)(struct device *dev, const void *data))
|
|
{
|
|
struct device *dev;
|
|
|
|
@@ -217,14 +222,15 @@ EXPORT_SYMBOL_GPL(auxiliary_find_device);
|
|
* @owner: owning module/driver
|
|
* @modname: KBUILD_MODNAME for parent driver
|
|
*/
|
|
-int __auxiliary_driver_register(struct auxiliary_driver *auxdrv, struct module *owner,
|
|
- const char *modname)
|
|
+int __auxiliary_driver_register(struct auxiliary_driver *auxdrv,
|
|
+ struct module *owner, const char *modname)
|
|
{
|
|
if (WARN_ON(!auxdrv->probe) || WARN_ON(!auxdrv->id_table))
|
|
return -EINVAL;
|
|
|
|
if (auxdrv->name)
|
|
- auxdrv->driver.name = kasprintf(GFP_KERNEL, "%s.%s", modname, auxdrv->name);
|
|
+ auxdrv->driver.name = kasprintf(GFP_KERNEL, "%s.%s", modname,
|
|
+ auxdrv->name);
|
|
else
|
|
auxdrv->driver.name = kasprintf(GFP_KERNEL, "%s", modname);
|
|
if (!auxdrv->driver.name)
|
|
diff --git a/include/linux/auxiliary_bus.h b/include/linux/auxiliary_bus.h
|
|
index d67b17606210..fc51d45f106b 100644
|
|
--- a/include/linux/auxiliary_bus.h
|
|
+++ b/include/linux/auxiliary_bus.h
|
|
@@ -70,8 +70,8 @@ void auxiliary_driver_unregister(struct auxiliary_driver *auxdrv);
|
|
#define module_auxiliary_driver(__auxiliary_driver) \
|
|
module_driver(__auxiliary_driver, auxiliary_driver_register, auxiliary_driver_unregister)
|
|
|
|
-struct auxiliary_device *
|
|
-auxiliary_find_device(struct device *start, const void *data,
|
|
- int (*match)(struct device *dev, const void *data));
|
|
+struct auxiliary_device *auxiliary_find_device(struct device *start,
|
|
+ const void *data,
|
|
+ int (*match)(struct device *dev, const void *data));
|
|
|
|
#endif /* _AUXILIARY_BUS_H_ */
|
|
--
|
|
2.29.2
|
|
|