Message ID | 20230307164405.14218-1-johan+linaro@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2538027wrd; Tue, 7 Mar 2023 08:53:21 -0800 (PST) X-Google-Smtp-Source: AK7set9DuL4QpzJO6uQ2DElW2+kWs8czHYtZnkEy2+mKjMxH8+XieLdmkcQYJ5QpJ13PMoIxGE22 X-Received: by 2002:a17:906:110e:b0:88d:33fe:3306 with SMTP id h14-20020a170906110e00b0088d33fe3306mr13554842eja.31.1678208000869; Tue, 07 Mar 2023 08:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678208000; cv=none; d=google.com; s=arc-20160816; b=vaIXnU+KHwfX4ngmasglFhl+Dwpqq4nuFP3x9tbxiYy74hD+Ixxl921meTBoy1fzX1 3OjYgKVsB9dEzx0dgEmLHP2bAu0HZjT0jHkU38541PILuE3AH8DRWgySsJjWaW8sn4+3 ENt+iofccGjz+6DDCByVn0KwM3WJlGS7vEuzCWObkCBFO49gBFSOHF42Ks8iJRcpP2cz jaG3DxBRJSG1cN08TpQyIpO7iqQCGEn8+aKs8wxzd1Ri2XMBHJaVm+UnxRr/lkdbJZwp Rjd5Yo1T3H9QT+KIn/8+iTNxgzqqOwXd+hl4oJbN62GUuyl/I+3vM7xlZ2Aj+LlNabzl HYLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=F2h7IKC800YZrQDYPlSmBG9lLg8dh5sYMFPBYsidckg=; b=qMl5Geamssj3Wdh5zU0ORMmY/4317Kv2qk5BgQYu5TWMvDiLvo1m8UntF8bA3FwdSh 8kRuQeqpHiKrZi2dNd3ZFm6KUnv560EC3FO0XZKApGhVRBuWxo9BzZIl2ZO37/pSPKeh Uu43C41Vd14Ssn3z9YRFJ229TEOHynblbKzdm1xugyJKwdRvm/ZvLL/GwskIEU7tHQbA vLHYwDE7chLfF655rQ4prHXzTMQnN30UaInd5MGc5dwksxystdLGOXiV1XQGHzwybYJ4 /lLySI6eEuOFk2GITaOGzQ/bPi2r5QpbIOPIdUl0mQVwdMGW9JFD8VCU7e8yPED/0F4w ZIUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fZZKakMe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jp2-20020a170906f74200b008ed6401c988si11627457ejb.821.2023.03.07.08.52.56; Tue, 07 Mar 2023 08:53:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fZZKakMe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230039AbjCGQq5 (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Tue, 7 Mar 2023 11:46:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231187AbjCGQqe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 7 Mar 2023 11:46:34 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2303F96C24; Tue, 7 Mar 2023 08:43:38 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AFCD6614D0; Tue, 7 Mar 2023 16:43:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18A03C433EF; Tue, 7 Mar 2023 16:43:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678207417; bh=/wCzZzW2/yX+S5Q2Jws0Te+1469cW0yfUpj6G9fEMgw=; h=From:To:Cc:Subject:Date:From; b=fZZKakMeNyA7vBG7KIRsV5Nxp99JFYUHhpbyKacVPLYuF2c8RIhgWxmhtnrnzWEBG BXFCdiut0UjjQK/jHCw+4mnkwTH8v+OEAOEInZu056nveKGBVahgd6xDO1sUSDCoLx YgqGpOGvWVRfOVmAXovlwPc2AOMRhpojhQpcxUcTvfHrr1fFX8FUjSzA+juVQnjtxR XxT2+Grq/f5B50uIzmB4q1BxaETSbi4+iBaV2W+rirvtpvrx8YgvNQc8VPmpgAd0wo OVV451ZZl2S9W9q0CkLA5j1GiqQarrpsdGojYcA4kJB8waen/LAO2Hsgs4YGgB8swX stG8zubplE3bA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan+linaro@kernel.org>) id 1pZaQG-0003ho-4E; Tue, 07 Mar 2023 17:44:20 +0100 From: Johan Hovold <johan+linaro@kernel.org> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Bjorn Andersson <andersson@kernel.org>, Andy Gross <agross@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Jiri Slaby <jirislaby@kernel.org>, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Douglas Anderson <dianders@chromium.org>, Daniel Thompson <daniel.thompson@linaro.org>, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold <johan+linaro@kernel.org> Subject: [PATCH 0/4] serial: qcom-geni: fix console shutdown hang Date: Tue, 7 Mar 2023 17:44:01 +0100 Message-Id: <20230307164405.14218-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759728588438708760?= X-GMAIL-MSGID: =?utf-8?q?1759728632874250474?= |
Series | serial: qcom-geni: fix console shutdown hang | |
Message
Johan Hovold
March 7, 2023, 4:44 p.m. UTC
This series fixes some of the fallout after a recent series adding support for DMA transfers to the Qualcomm geni serial driver. Most importantly it fixes a hang during reboot when using a serial console and the getty is stopped during reboot. Doug just posted an equivalent fix here: https://lore.kernel.org/lkml/20230307073155.1.Iaab0159b8d268060a0e131ebb27125af4750ef99@changeid but the commit message only mentions the regression with respect to kgdb, which is not as widely used serial consoles generally, so I figured I'd post my version for completeness. Either version of that fix should address the immediate regression, but fixing the underlying problems which have been there since the driver was first merged is going to be a bit more involved. The rest of the series fixes a few bugs in the new DMA support that I found while investigating the console regression. Johan Johan Hovold (4): serial: qcom-geni: fix console shutdown hang serial: qcom-geni: fix DMA mapping leak on shutdown serial: qcom-geni: fix mapping of empty DMA buffer serial: qcom-geni: drop bogus uart_write_wakeup() drivers/tty/serial/qcom_geni_serial.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
Comments
On Tue, 7 Mar 2023 at 17:43, Johan Hovold <johan+linaro@kernel.org> wrote: > > This series fixes some of the fallout after a recent series adding > support for DMA transfers to the Qualcomm geni serial driver. > > Most importantly it fixes a hang during reboot when using a serial > console and the getty is stopped during reboot. > > Doug just posted an equivalent fix here: > > https://lore.kernel.org/lkml/20230307073155.1.Iaab0159b8d268060a0e131ebb27125af4750ef99@changeid > > but the commit message only mentions the regression with respect to > kgdb, which is not as widely used serial consoles generally, so I > figured I'd post my version for completeness. > > Either version of that fix should address the immediate regression, but > fixing the underlying problems which have been there since the driver > was first merged is going to be a bit more involved. > > The rest of the series fixes a few bugs in the new DMA support that I > found while investigating the console regression. > > Johan > > > Johan Hovold (4): > serial: qcom-geni: fix console shutdown hang > serial: qcom-geni: fix DMA mapping leak on shutdown > serial: qcom-geni: fix mapping of empty DMA buffer > serial: qcom-geni: drop bogus uart_write_wakeup() > > drivers/tty/serial/qcom_geni_serial.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > -- > 2.39.2 > Hey Johan, Douglas and Srini beat you to these fixes but thanks! Bart
On Tue, 7 Mar 2023 at 17:44, Bartosz Golaszewski <bartosz.golaszewski@linaro.org> wrote: > > On Tue, 7 Mar 2023 at 17:43, Johan Hovold <johan+linaro@kernel.org> wrote: > > > > This series fixes some of the fallout after a recent series adding > > support for DMA transfers to the Qualcomm geni serial driver. > > > > Most importantly it fixes a hang during reboot when using a serial > > console and the getty is stopped during reboot. > > > > Doug just posted an equivalent fix here: > > > > https://lore.kernel.org/lkml/20230307073155.1.Iaab0159b8d268060a0e131ebb27125af4750ef99@changeid > > > > but the commit message only mentions the regression with respect to > > kgdb, which is not as widely used serial consoles generally, so I > > figured I'd post my version for completeness. > > > > Either version of that fix should address the immediate regression, but > > fixing the underlying problems which have been there since the driver > > was first merged is going to be a bit more involved. > > > > The rest of the series fixes a few bugs in the new DMA support that I > > found while investigating the console regression. > > > > Johan > > > > > > Johan Hovold (4): > > serial: qcom-geni: fix console shutdown hang > > serial: qcom-geni: fix DMA mapping leak on shutdown > > serial: qcom-geni: fix mapping of empty DMA buffer > > serial: qcom-geni: drop bogus uart_write_wakeup() > > > > drivers/tty/serial/qcom_geni_serial.c | 11 +++++++---- > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > -- > > 2.39.2 > > > > Hey Johan, > > Douglas and Srini beat you to these fixes but thanks! > > Bart Nevermind, I read your other message now. And also patch 3/4 looks right. Bart
On Tue, Mar 07, 2023 at 05:47:27PM +0100, Bartosz Golaszewski wrote: > On Tue, 7 Mar 2023 at 17:44, Bartosz Golaszewski > <bartosz.golaszewski@linaro.org> wrote: > > > > On Tue, 7 Mar 2023 at 17:43, Johan Hovold <johan+linaro@kernel.org> wrote: > > > > > > This series fixes some of the fallout after a recent series adding > > > support for DMA transfers to the Qualcomm geni serial driver. > > > > > > Most importantly it fixes a hang during reboot when using a serial > > > console and the getty is stopped during reboot. > > > > > > Doug just posted an equivalent fix here: > > > > > > https://lore.kernel.org/lkml/20230307073155.1.Iaab0159b8d268060a0e131ebb27125af4750ef99@changeid > > > > > > but the commit message only mentions the regression with respect to > > > kgdb, which is not as widely used serial consoles generally, so I > > > figured I'd post my version for completeness. > > > > > > Either version of that fix should address the immediate regression, but > > > fixing the underlying problems which have been there since the driver > > > was first merged is going to be a bit more involved. > > > > > > The rest of the series fixes a few bugs in the new DMA support that I > > > found while investigating the console regression. > > > > > > Johan > > > > > > > > > Johan Hovold (4): > > > serial: qcom-geni: fix console shutdown hang > > > serial: qcom-geni: fix DMA mapping leak on shutdown > > > serial: qcom-geni: fix mapping of empty DMA buffer > > > serial: qcom-geni: drop bogus uart_write_wakeup() > > > > > > drivers/tty/serial/qcom_geni_serial.c | 11 +++++++---- > > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > > > -- > > > 2.39.2 > > > > > > > Hey Johan, > > > > Douglas and Srini beat you to these fixes but thanks! > Nevermind, I read your other message now. And also patch 3/4 looks right. Heh, this hang has been in linux-next for over a month and I've actively tried to not spend time on investigating it in the hope that someone else would be beat me to it before I moved to 6.3-rc. :) Obviously I may be a bit biased, but I prefer this series over the alternate fixes as the commit messages are a bit more complete and my version of the empty DMA buffer fix is a bit cleaner. Johan
On 07/03/2023 17:03, Johan Hovold wrote: > On Tue, Mar 07, 2023 at 05:47:27PM +0100, Bartosz Golaszewski wrote: >> On Tue, 7 Mar 2023 at 17:44, Bartosz Golaszewski >> <bartosz.golaszewski@linaro.org> wrote: >>> >>> On Tue, 7 Mar 2023 at 17:43, Johan Hovold <johan+linaro@kernel.org> wrote: >>>> >>>> This series fixes some of the fallout after a recent series adding >>>> support for DMA transfers to the Qualcomm geni serial driver. >>>> >>>> Most importantly it fixes a hang during reboot when using a serial >>>> console and the getty is stopped during reboot. >>>> >>>> Doug just posted an equivalent fix here: >>>> >>>> https://lore.kernel.org/lkml/20230307073155.1.Iaab0159b8d268060a0e131ebb27125af4750ef99@changeid >>>> >>>> but the commit message only mentions the regression with respect to >>>> kgdb, which is not as widely used serial consoles generally, so I >>>> figured I'd post my version for completeness. >>>> >>>> Either version of that fix should address the immediate regression, but >>>> fixing the underlying problems which have been there since the driver >>>> was first merged is going to be a bit more involved. >>>> >>>> The rest of the series fixes a few bugs in the new DMA support that I >>>> found while investigating the console regression. >>>> >>>> Johan >>>> >>>> >>>> Johan Hovold (4): >>>> serial: qcom-geni: fix console shutdown hang >>>> serial: qcom-geni: fix DMA mapping leak on shutdown >>>> serial: qcom-geni: fix mapping of empty DMA buffer >>>> serial: qcom-geni: drop bogus uart_write_wakeup() >>>> >>>> drivers/tty/serial/qcom_geni_serial.c | 11 +++++++---- >>>> 1 file changed, 7 insertions(+), 4 deletions(-) >>>> >>>> -- >>>> 2.39.2 >>>> >>> >>> Hey Johan, >>> >>> Douglas and Srini beat you to these fixes but thanks! > >> Nevermind, I read your other message now. And also patch 3/4 looks right. > > Heh, this hang has been in linux-next for over a month and I've > actively tried to not spend time on investigating it in the hope that > someone else would be beat me to it before I moved to 6.3-rc. :) > > Obviously I may be a bit biased, but I prefer this series over the > alternate fixes as the commit messages are a bit more complete and my > version of the empty DMA buffer fix is a bit cleaner. I don't mind, as long as the bugs are fixed. --srini > > Johan
On 07/03/2023 16:44, Johan Hovold wrote: > This series fixes some of the fallout after a recent series adding > support for DMA transfers to the Qualcomm geni serial driver. > > Most importantly it fixes a hang during reboot when using a serial > console and the getty is stopped during reboot. > > Doug just posted an equivalent fix here: > > https://lore.kernel.org/lkml/20230307073155.1.Iaab0159b8d268060a0e131ebb27125af4750ef99@changeid > > but the commit message only mentions the regression with respect to > kgdb, which is not as widely used serial consoles generally, so I > figured I'd post my version for completeness. > > Either version of that fix should address the immediate regression, but > fixing the underlying problems which have been there since the driver > was first merged is going to be a bit more involved. > > The rest of the series fixes a few bugs in the new DMA support that I > found while investigating the console regression. > > Johan > > > Johan Hovold (4): > serial: qcom-geni: fix console shutdown hang > serial: qcom-geni: fix DMA mapping leak on shutdown > serial: qcom-geni: fix mapping of empty DMA buffer > serial: qcom-geni: drop bogus uart_write_wakeup() > Tested this series on RB5 Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --srini > drivers/tty/serial/qcom_geni_serial.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) >
On Tue, Mar 07, 2023 at 05:44:01PM +0100, Johan Hovold wrote: > This series fixes some of the fallout after a recent series adding > support for DMA transfers to the Qualcomm geni serial driver. > > Most importantly it fixes a hang during reboot when using a serial > console and the getty is stopped during reboot. > > Doug just posted an equivalent fix here: > > https://lore.kernel.org/lkml/20230307073155.1.Iaab0159b8d268060a0e131ebb27125af4750ef99@changeid > > but the commit message only mentions the regression with respect to > kgdb, which is not as widely used serial consoles generally, so I > figured I'd post my version for completeness. > > Either version of that fix should address the immediate regression, but > fixing the underlying problems which have been there since the driver > was first merged is going to be a bit more involved. > > The rest of the series fixes a few bugs in the new DMA support that I > found while investigating the console regression. > > Johan > > > Johan Hovold (4): > serial: qcom-geni: fix console shutdown hang > serial: qcom-geni: fix DMA mapping leak on shutdown > serial: qcom-geni: fix mapping of empty DMA buffer > serial: qcom-geni: drop bogus uart_write_wakeup() > > drivers/tty/serial/qcom_geni_serial.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > -- > 2.39.2 > Realized this has been affecting me (with me blaming it on something else prior) off and on. Thanks for the fix! Reviewed-by: Andrew Halaney <ahalaney@redhat.com> Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8540p-ride