linux_dsm_epyc7002/drivers/usb
Sumit Garg 5946d1f5b3 kdb: Switch to use safer dbg_io_ops over console APIs
In kgdb context, calling console handlers aren't safe due to locks used
in those handlers which could in turn lead to a deadlock. Although, using
oops_in_progress increases the chance to bypass locks in most console
handlers but it might not be sufficient enough in case a console uses
more locks (VT/TTY is good example).

Currently when a driver provides both polling I/O and a console then kdb
will output using the console. We can increase robustness by using the
currently active polling I/O driver (which should be lockless) instead
of the corresponding console. For several common cases (e.g. an
embedded system with a single serial port that is used both for console
output and debugger I/O) this will result in no console handler being
used.

In order to achieve this we need to reverse the order of preference to
use dbg_io_ops (uses polling I/O mode) over console APIs. So we just
store "struct console" that represents debugger I/O in dbg_io_ops and
while emitting kdb messages, skip console that matches dbg_io_ops
console in order to avoid duplicate messages. After this change,
"is_console" param becomes redundant and hence removed.

Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lore.kernel.org/r/1591264879-25920-5-git-send-email-sumit.garg@linaro.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2020-06-26 15:40:16 +01:00
..
atm USB: atm: Use the correct style for SPDX License Identifier 2020-03-17 20:03:28 +01:00
c67x00 USB: c67x00: Use the correct style for SPDX License Identifier 2020-03-17 20:03:28 +01:00
cdns3 USB: changes for v5.8 merge window 2020-05-25 13:28:20 +02:00
chipidea - Some improvments for ci_hdrc_usb2.c 2020-05-26 10:27:14 +02:00
class treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
common usb: common: usb-conn-gpio: Don't log an error on probe deferral 2019-12-10 11:41:20 +01:00
core USB/PHY driver updates for 5.8-rc1 2020-06-07 09:42:16 -07:00
dwc2 usb: dwc2: Update Core Reset programming flow. 2020-05-25 11:09:44 +03:00
dwc3 usb: dwc3: meson-g12a: fix USB2 PHY initialization on G12A and A1 SoCs 2020-05-29 12:21:26 +02:00
early kdb: Switch to use safer dbg_io_ops over console APIs 2020-06-26 15:40:16 +01:00
gadget SCSI misc on 20200613 2020-06-13 13:17:49 -07:00
host treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
image treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
isp1760 USB: isp1760: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
misc treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mon USB: mon: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 09:49:28 +01:00
mtu3 USB: mtu3: Use the correct style for SPDX License Identifier 2020-05-25 11:09:37 +03:00
musb usb: musb: Fix runtime PM imbalance on error 2020-05-25 13:36:31 +02:00
phy Merge 5.7-rc6 into usb-next 2020-05-18 07:55:55 +02:00
renesas_usbhs usb: renesas_usbhs: Use the correct style for SPDX License Identifier 2020-05-25 11:09:38 +03:00
roles usb: roles: Switch on role-switch uevent reporting 2020-05-13 14:20:49 +02:00
serial treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
storage treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
typec USB/PHY driver updates for 5.8-rc1 2020-06-07 09:42:16 -07:00
usbip treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00