• Vignesh R's avatar
    serial: 8250: omap: Disable DMA for console UART · 84b40e3b
    Vignesh R authored
    Kernel always writes log messages to console via
    serial8250_console_write()->serial8250_console_putchar() which directly
    accesses UART_TX register _without_ using DMA.
    
    But, if other processes like systemd using same UART port, then these
    writes are handled by a different code flow using 8250_omap driver where
    there is provision to use DMA.
    
    It seems that it is possible that both DMA and CPU might simultaneously
    put data to UART FIFO and lead to potential loss of data due to FIFO
    overflow and weird data corruption. This happens when both kernel
    console and userspace tries to write simultaneously to the same UART
    port. Therefore, disable DMA on kernel console port to avoid potential
    race between CPU and DMA.
    Signed-off-by: default avatarVignesh R <vigneshr@ti.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    84b40e3b
8250_omap.c 37.2 KB