From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41631C2BCA1 for ; Fri, 7 Jun 2019 15:45:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 171BB21479 for ; Fri, 7 Jun 2019 15:45:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922334; bh=SL9zgEgp7BqO3aXwfqo9i/Vh3cSETpa2ZfNoTlqorlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=sXASu2P8xxYSuh5gd7JSQmvQwNxav2nuTXLzND065uYg/7Yxb6X/jstcHMso+NCz0 4hH9E+vltMCdTGQ9NpJ+aslXvm36EDD4gEPh2O4/WCYUZNH9GUQeah40xr+A/iknLC l4490oKVzGfZN+4xfLkt9F3+Jf8+EIt9roQ3CHio= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731242AbfFGPpd (ORCPT ); Fri, 7 Jun 2019 11:45:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:57426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730735AbfFGPpa (ORCPT ); Fri, 7 Jun 2019 11:45:30 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 019792146E; Fri, 7 Jun 2019 15:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922329; bh=SL9zgEgp7BqO3aXwfqo9i/Vh3cSETpa2ZfNoTlqorlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dD0qJ0ZuP2JueRLHIxOLEjkskuOQWKC5RCnJ5hmk/AarP4iFPD1HD19MfsKtigd8s CyuSgMU/u8qETGCltwqEFsHkHDGlFgsnVHsXAzGxZVgJRX1R8jgp8Ecacbib2vaK8i 7LyQfIKpXCd/Z7gpSOFXYPnSpcCapAatUE54aS8s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Rodin , Eugeniu Rosca , Simon Horman , Wolfram Sang , Geert Uytterhoeven , "George G. Davis" Subject: [PATCH 4.19 49/73] serial: sh-sci: disable DMA for uart_console Date: Fri, 7 Jun 2019 17:39:36 +0200 Message-Id: <20190607153854.615721628@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153848.669070800@linuxfoundation.org> References: <20190607153848.669070800@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: George G. Davis commit 099506cbbc79c0bd52b19cb6b930f256dabc3950 upstream. As noted in commit 84b40e3b57ee ("serial: 8250: omap: Disable DMA for console UART"), UART console lines use low-level PIO only access functions which will conflict with use of the line when DMA is enabled, e.g. when the console line is also used for systemd messages. So disable DMA support for UART console lines. Reported-by: Michael Rodin Link: https://patchwork.kernel.org/patch/10929511/ Tested-by: Eugeniu Rosca Reviewed-by: Simon Horman Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Cc: stable@vger.kernel.org Signed-off-by: George G. Davis Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/sh-sci.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1542,6 +1542,13 @@ static void sci_request_dma(struct uart_ dev_dbg(port->dev, "%s: port %d\n", __func__, port->line); + /* + * DMA on console may interfere with Kernel log messages which use + * plain putchar(). So, simply don't use it with a console. + */ + if (uart_console(port)) + return; + if (!port->dev->of_node) return;