Colin Cross f08bbaa633 UPSTREAM: ANDROID: ARM: fiq_debugger: lock between tty and console writes
debug_console_write calls debug_uart_flush, which will usually wait
until the serial port fifo empties.  If another thread is continuously
calling fiq_tty_write, the fifo will constantly be refilled and
debug_uart_flush might never return.

Add a spinlock that is locked in debug_console_write and fiq_tty_write
to ensure they can't run at the same time.  This has an extra advantage
of preventing lines from the console and tty from being mixed together.

Also reduce the size returned by fiq_tty_write_room to keep the time
spent with the spinlock held to a reasonable value.

In addition, make sure fiq context can't loop forever by never calling
debug_uart_flush when the console is enabled.

Change-Id: I5712b01f740ca0c84f680d2032c9fa16b7656939
Signed-off-by: Colin Cross <ccross@android.com>
[AmitP: Folded following android-4.9 commit changes into this patch
        b4ffddec34 ("ANDROID: ARM: fiq_debugger: fix uninitialised spin_lock.")]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from https://android.googlesource.com/kernel/common:android-4.14
 commit a8be462329b3c4a22097bf07d3b02a1884a8db09)
2019-02-18 16:14:23 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%