diff options
author | Helge Deller <deller@gmx.de> | 2024-01-19 21:16:39 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-01-28 09:49:47 +0100 |
commit | c8708d758e715c3824a73bf0cda97292b52be44d (patch) | |
tree | da08af9996348dd9973cdd33fe152a1ad024e30b /arch/parisc | |
parent | b9402e3b97289ca9e0f0f79f4df64bd6c9176a86 (diff) |
parisc: Prevent hung tasks when printing inventory on serial console
Printing the inventory on a serial console can be quite slow and thus may
trigger the hung task detector (CONFIG_DETECT_HUNG_TASK=y) and possibly
reboot the machine. Adding a cond_resched() prevents this.
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # v6.0+
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/kernel/drivers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 25f9b9e9d6df..404ea37705ce 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c @@ -1004,6 +1004,9 @@ static __init int qemu_print_iodc_data(struct device *lin_dev, void *data) pr_info("\n"); + /* Prevent hung task messages when printing on serial console */ + cond_resched(); + pr_info("#define HPA_%08lx_DESCRIPTION \"%s\"\n", hpa, parisc_hardware_description(&dev->id)); |