2024-06-07 19:32:47

by José Roberto de Souza

[permalink] [raw]
Subject: [PATCH v4 1/2] devcoredump: Add dev_coredumpm_timeout()

Add function to set a custom coredump timeout.

For Xe driver usage, current 5 minutes timeout may be too short for
users to search and understand what needs to be done to capture
coredump to report bugs.

We have plans to automate(distribute a udev script) it but at the end
will be up to distros and users to pack it so having a option to
increase the timeout is a safer option.

v2:
- replace dev_coredump_timeout_set() by dev_coredumpm_timeout() (Mukesh)

v3:
- make dev_coredumpm() static inline (Johannes)

Cc: Rodrigo Vivi <[email protected]>
Cc: Mukesh Ojha <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: Jonathan Cavitt <[email protected]>
Acked-by: Jonathan Cavitt <[email protected]>
Signed-off-by: José Roberto de Souza <[email protected]>
---
drivers/base/devcoredump.c | 23 ++++++++--------
include/linux/devcoredump.h | 54 ++++++++++++++++++++++++++++---------
2 files changed, 54 insertions(+), 23 deletions(-)

diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c
index 82aeb09b3d1b5..c795edad1b969 100644
--- a/drivers/base/devcoredump.c
+++ b/drivers/base/devcoredump.c
@@ -18,9 +18,6 @@ static struct class devcd_class;
/* global disable flag, for security purposes */
static bool devcd_disabled;

-/* if data isn't read by userspace after 5 minutes then delete it */
-#define DEVCD_TIMEOUT (HZ * 60 * 5)
-
struct devcd_entry {
struct device devcd_dev;
void *data;
@@ -328,7 +325,8 @@ void dev_coredump_put(struct device *dev)
EXPORT_SYMBOL_GPL(dev_coredump_put);

/**
- * dev_coredumpm - create device coredump with read/free methods
+ * dev_coredumpm_timeout - create device coredump with read/free methods with a
+ * custom timeout.
* @dev: the struct device for the crashed device
* @owner: the module that contains the read/free functions, use %THIS_MODULE
* @data: data cookie for the @read/@free functions
@@ -336,17 +334,20 @@ EXPORT_SYMBOL_GPL(dev_coredump_put);
* @gfp: allocation flags
* @read: function to read from the given buffer
* @free: function to free the given buffer
+ * @timeout: time in jiffies to remove coredump
*
* Creates a new device coredump for the given device. If a previous one hasn't
* been read yet, the new coredump is discarded. The data lifetime is determined
* by the device coredump framework and when it is no longer needed the @free
* function will be called to free the data.
*/
-void dev_coredumpm(struct device *dev, struct module *owner,
- void *data, size_t datalen, gfp_t gfp,
- ssize_t (*read)(char *buffer, loff_t offset, size_t count,
- void *data, size_t datalen),
- void (*free)(void *data))
+void dev_coredumpm_timeout(struct device *dev, struct module *owner,
+ void *data, size_t datalen, gfp_t gfp,
+ ssize_t (*read)(char *buffer, loff_t offset,
+ size_t count, void *data,
+ size_t datalen),
+ void (*free)(void *data),
+ unsigned long timeout)
{
static atomic_t devcd_count = ATOMIC_INIT(0);
struct devcd_entry *devcd;
@@ -403,7 +404,7 @@ void dev_coredumpm(struct device *dev, struct module *owner,
dev_set_uevent_suppress(&devcd->devcd_dev, false);
kobject_uevent(&devcd->devcd_dev.kobj, KOBJ_ADD);
INIT_DELAYED_WORK(&devcd->del_wk, devcd_del);
- schedule_delayed_work(&devcd->del_wk, DEVCD_TIMEOUT);
+ schedule_delayed_work(&devcd->del_wk, timeout);
mutex_unlock(&devcd->mutex);
return;
put_device:
@@ -414,7 +415,7 @@ void dev_coredumpm(struct device *dev, struct module *owner,
free:
free(data);
}
-EXPORT_SYMBOL_GPL(dev_coredumpm);
+EXPORT_SYMBOL_GPL(dev_coredumpm_timeout);

/**
* dev_coredumpsg - create device coredump that uses scatterlist as data
diff --git a/include/linux/devcoredump.h b/include/linux/devcoredump.h
index c8f7eb6cc1915..56e606eb4640b 100644
--- a/include/linux/devcoredump.h
+++ b/include/linux/devcoredump.h
@@ -12,6 +12,9 @@
#include <linux/scatterlist.h>
#include <linux/slab.h>

+/* if data isn't read by userspace after 5 minutes then delete it */
+#define DEVCOREDUMP_TIMEOUT (HZ * 60 * 5)
+
/*
* _devcd_free_sgtable - free all the memory of the given scatterlist table
* (i.e. both pages and scatterlist instances)
@@ -50,16 +53,17 @@ static inline void _devcd_free_sgtable(struct scatterlist *table)
kfree(delete_iter);
}

-
#ifdef CONFIG_DEV_COREDUMP
void dev_coredumpv(struct device *dev, void *data, size_t datalen,
gfp_t gfp);

-void dev_coredumpm(struct device *dev, struct module *owner,
- void *data, size_t datalen, gfp_t gfp,
- ssize_t (*read)(char *buffer, loff_t offset, size_t count,
- void *data, size_t datalen),
- void (*free)(void *data));
+void dev_coredumpm_timeout(struct device *dev, struct module *owner,
+ void *data, size_t datalen, gfp_t gfp,
+ ssize_t (*read)(char *buffer, loff_t offset,
+ size_t count, void *data,
+ size_t datalen),
+ void (*free)(void *data),
+ unsigned long timeout);

void dev_coredumpsg(struct device *dev, struct scatterlist *table,
size_t datalen, gfp_t gfp);
@@ -72,12 +76,13 @@ static inline void dev_coredumpv(struct device *dev, void *data,
vfree(data);
}

-static inline void
-dev_coredumpm(struct device *dev, struct module *owner,
- void *data, size_t datalen, gfp_t gfp,
- ssize_t (*read)(char *buffer, loff_t offset, size_t count,
- void *data, size_t datalen),
- void (*free)(void *data))
+void dev_coredumpm_timeout(struct device *dev, struct module *owner,
+ void *data, size_t datalen, gfp_t gfp,
+ ssize_t (*read)(char *buffer, loff_t offset,
+ size_t count, void *data,
+ size_t datalen),
+ void (*free)(void *data),
+ unsigned long timeout)
{
free(data);
}
@@ -92,4 +97,29 @@ static inline void dev_coredump_put(struct device *dev)
}
#endif /* CONFIG_DEV_COREDUMP */

+/**
+ * dev_coredumpm - create device coredump with read/free methods
+ * @dev: the struct device for the crashed device
+ * @owner: the module that contains the read/free functions, use %THIS_MODULE
+ * @data: data cookie for the @read/@free functions
+ * @datalen: length of the data
+ * @gfp: allocation flags
+ * @read: function to read from the given buffer
+ * @free: function to free the given buffer
+ *
+ * Creates a new device coredump for the given device. If a previous one hasn't
+ * been read yet, the new coredump is discarded. The data lifetime is determined
+ * by the device coredump framework and when it is no longer needed the @free
+ * function will be called to free the data.
+ */
+static inline void dev_coredumpm(struct device *dev, struct module *owner,
+ void *data, size_t datalen, gfp_t gfp,
+ ssize_t (*read)(char *buffer, loff_t offset, size_t count,
+ void *data, size_t datalen),
+ void (*free)(void *data))
+{
+ dev_coredumpm_timeout(dev, owner, data, datalen, gfp, read, free,
+ DEVCOREDUMP_TIMEOUT);
+}
+
#endif /* __DEVCOREDUMP_H */
--
2.45.2



2024-06-07 19:32:49

by José Roberto de Souza

[permalink] [raw]
Subject: [PATCH v4 2/2] drm/xe: Increase devcoredump timeout

5 minutes is too short for a regular user to search and understand
what he needs to do to report capture devcoredump and report a bug to
us, so here increasing this timeout to 1 hour.

Cc: Rodrigo Vivi <[email protected]>
Cc: Jonathan Cavitt <[email protected]>
Acked-by: Jonathan Cavitt <[email protected]>
Signed-off-by: José Roberto de Souza <[email protected]>
---
drivers/gpu/drm/xe/xe_devcoredump.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
index d7f2d19a77c10..62c2b10fbf1d2 100644
--- a/drivers/gpu/drm/xe/xe_devcoredump.c
+++ b/drivers/gpu/drm/xe/xe_devcoredump.c
@@ -53,6 +53,9 @@

#ifdef CONFIG_DEV_COREDUMP

+/* 1 hour timeout */
+#define XE_COREDUMP_TIMEOUT_JIFFIES (60 * 60 * HZ)
+
static struct xe_device *coredump_to_xe(const struct xe_devcoredump *coredump)
{
return container_of(coredump, struct xe_device, devcoredump);
@@ -247,8 +250,9 @@ void xe_devcoredump(struct xe_sched_job *job)
drm_info(&xe->drm, "Check your /sys/class/drm/card%d/device/devcoredump/data\n",
xe->drm.primary->index);

- dev_coredumpm(xe->drm.dev, THIS_MODULE, coredump, 0, GFP_KERNEL,
- xe_devcoredump_read, xe_devcoredump_free);
+ dev_coredumpm_timeout(xe->drm.dev, THIS_MODULE, coredump, 0, GFP_KERNEL,
+ xe_devcoredump_read, xe_devcoredump_free,
+ XE_COREDUMP_TIMEOUT_JIFFIES);
}

static void xe_driver_devcoredump_fini(void *arg)
--
2.45.2


2024-06-09 01:35:51

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] devcoredump: Add dev_coredumpm_timeout()

Hi Jos?,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-xe/drm-xe-next]
[also build test WARNING on wireless/main linus/master v6.10-rc2 next-20240607]
[cannot apply to driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus wireless-next/main]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Jos-Roberto-de-Souza/drm-xe-Increase-devcoredump-timeout/20240608-033441
base: https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link: https://lore.kernel.org/r/20240607193220.229760-1-jose.souza%40intel.com
patch subject: [PATCH v4 1/2] devcoredump: Add dev_coredumpm_timeout()
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240609/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240609/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

In file included from include/net/bluetooth/hci_core.h:36,
from net/bluetooth/coredump.c:10:
>> include/net/bluetooth/coredump.h:9: warning: "DEVCOREDUMP_TIMEOUT" redefined
9 | #define DEVCOREDUMP_TIMEOUT msecs_to_jiffies(10000) /* 10 sec */
|
In file included from net/bluetooth/coredump.c:6:
include/linux/devcoredump.h:16: note: this is the location of the previous definition
16 | #define DEVCOREDUMP_TIMEOUT (HZ * 60 * 5)
|


vim +/DEVCOREDUMP_TIMEOUT +9 include/net/bluetooth/coredump.h

9695ef876fd122 Abhishek Pandit-Subedi 2023-03-30 8
9695ef876fd122 Abhishek Pandit-Subedi 2023-03-30 @9 #define DEVCOREDUMP_TIMEOUT msecs_to_jiffies(10000) /* 10 sec */
9695ef876fd122 Abhishek Pandit-Subedi 2023-03-30 10

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

2024-06-09 01:36:06

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] devcoredump: Add dev_coredumpm_timeout()

Hi Jos?,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-xe/drm-xe-next]
[also build test WARNING on wireless/main linus/master v6.10-rc2 next-20240607]
[cannot apply to driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus wireless-next/main]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Jos-Roberto-de-Souza/drm-xe-Increase-devcoredump-timeout/20240608-033441
base: https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link: https://lore.kernel.org/r/20240607193220.229760-1-jose.souza%40intel.com
patch subject: [PATCH v4 1/2] devcoredump: Add dev_coredumpm_timeout()
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20240609/[email protected]/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project d7d2d4f53fc79b4b58e8d8d08151b577c3699d4a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240609/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

In file included from drivers/bluetooth/hci_qca.c:23:
In file included from include/linux/devcoredump.h:12:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2210:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from drivers/bluetooth/hci_qca.c:23:
In file included from include/linux/devcoredump.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/bluetooth/hci_qca.c:23:
In file included from include/linux/devcoredump.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/bluetooth/hci_qca.c:23:
In file included from include/linux/devcoredump.h:12:
In file included from include/linux/scatterlist.h:9:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
In file included from drivers/bluetooth/hci_qca.c:37:
In file included from include/net/bluetooth/hci_core.h:36:
>> include/net/bluetooth/coredump.h:9:9: warning: 'DEVCOREDUMP_TIMEOUT' macro redefined [-Wmacro-redefined]
9 | #define DEVCOREDUMP_TIMEOUT msecs_to_jiffies(10000) /* 10 sec */
| ^
include/linux/devcoredump.h:16:9: note: previous definition is here
16 | #define DEVCOREDUMP_TIMEOUT (HZ * 60 * 5)
| ^
8 warnings generated.
--
In file included from drivers/bluetooth/btmrvl_sdio.c:10:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
547 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
560 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/bluetooth/btmrvl_sdio.c:10:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
573 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/bluetooth/btmrvl_sdio.c:10:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
584 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
594 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
604 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
In file included from drivers/bluetooth/btmrvl_sdio.c:10:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:21:
In file included from include/linux/mm.h:2210:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
In file included from drivers/bluetooth/btmrvl_sdio.c:18:
In file included from include/net/bluetooth/hci_core.h:36:
>> include/net/bluetooth/coredump.h:9:9: warning: 'DEVCOREDUMP_TIMEOUT' macro redefined [-Wmacro-redefined]
9 | #define DEVCOREDUMP_TIMEOUT msecs_to_jiffies(10000) /* 10 sec */
| ^
include/linux/devcoredump.h:16:9: note: previous definition is here
16 | #define DEVCOREDUMP_TIMEOUT (HZ * 60 * 5)
| ^
8 warnings generated.


vim +/DEVCOREDUMP_TIMEOUT +9 include/net/bluetooth/coredump.h

9695ef876fd122 Abhishek Pandit-Subedi 2023-03-30 8
9695ef876fd122 Abhishek Pandit-Subedi 2023-03-30 @9 #define DEVCOREDUMP_TIMEOUT msecs_to_jiffies(10000) /* 10 sec */
9695ef876fd122 Abhishek Pandit-Subedi 2023-03-30 10

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

2024-06-09 04:54:04

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v4 1/2] devcoredump: Add dev_coredumpm_timeout()

Hi Jos?,

kernel test robot noticed the following build errors:

[auto build test ERROR on drm-xe/drm-xe-next]
[also build test ERROR on wireless/main linus/master v6.10-rc2 next-20240607]
[cannot apply to driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus wireless-next/main]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Jos-Roberto-de-Souza/drm-xe-Increase-devcoredump-timeout/20240608-033441
base: https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
patch link: https://lore.kernel.org/r/20240607193220.229760-1-jose.souza%40intel.com
patch subject: [PATCH v4 1/2] devcoredump: Add dev_coredumpm_timeout()
config: i386-buildonly-randconfig-006-20240609 (https://download.01.org/0day-ci/archive/20240609/[email protected]/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240609/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All error/warnings (new ones prefixed by >>):

In file included from drivers/remoteproc/remoteproc_coredump.c:9:
>> include/linux/devcoredump.h:79:6: warning: no previous prototype for 'dev_coredumpm_timeout' [-Wmissing-prototypes]
79 | void dev_coredumpm_timeout(struct device *dev, struct module *owner,
| ^~~~~~~~~~~~~~~~~~~~~
--
ld: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.o: in function `dev_coredumpm_timeout':
>> dpu_encoder_phys_cmd.c:(.text+0x145c): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.o: in function `dev_coredumpm_timeout':
dpu_encoder_phys_vid.c:(.text+0x13e8): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.o: in function `dev_coredumpm_timeout':
dpu_encoder_phys_wb.c:(.text+0xda0): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/disp/dpu1/dpu_kms.o: in function `dev_coredumpm_timeout':
dpu_kms.c:(.text+0x8910): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/disp/msm_disp_snapshot.o: in function `dev_coredumpm_timeout':
msm_disp_snapshot.c:(.text+0x0): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.o: in function `dev_coredumpm_timeout':
msm_disp_snapshot_util.c:(.text+0xd8): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/msm_debugfs.o: in function `dev_coredumpm_timeout':
msm_debugfs.c:(.text+0x534): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/msm_gpu.o: in function `dev_coredumpm_timeout':
msm_gpu.c:(.text+0x8fc): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/msm_kms.o: in function `dev_coredumpm_timeout':
msm_kms.c:(.text+0x108): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/dp/dp_debug.o: in function `dev_coredumpm_timeout':
dp_debug.c:(.text+0x498): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/dp/dp_aux.o: in function `dev_coredumpm_timeout':
dp_aux.c:(.text+0x624): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/dp/dp_catalog.o: in function `dev_coredumpm_timeout':
dp_catalog.c:(.text+0x0): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/dp/dp_ctrl.o: in function `dev_coredumpm_timeout':
dp_ctrl.c:(.text+0xa500): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/dp/dp_display.o: in function `dev_coredumpm_timeout':
dp_display.c:(.text+0x16dc): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/dp/dp_drm.o: in function `dev_coredumpm_timeout':
dp_drm.c:(.text+0x340): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/dp/dp_link.o: in function `dev_coredumpm_timeout':
dp_link.c:(.text+0xcf4): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/dp/dp_panel.o: in function `dev_coredumpm_timeout':
dp_panel.c:(.text+0x174): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here
ld: drivers/gpu/drm/msm/dp/dp_audio.o: in function `dev_coredumpm_timeout':
dp_audio.c:(.text+0x918): multiple definition of `dev_coredumpm_timeout'; drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.o:dpu_encoder.c:(.text+0x1e24): first defined here

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki