[v2,16/32] dmaengine: at_hdmac: Do not print messages on console while holding the lock
Message ID | 20221025090306.297886-17-tudor.ambarus@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp892773wru; Tue, 25 Oct 2022 02:10:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ny56YWcDMRvoRdQdKAqtZUqp6B9vRr/zP3cZ4dhMcn5s70OCA3EKc7r0Q3m567o6wD295 X-Received: by 2002:a65:4b85:0:b0:46f:63e:9e30 with SMTP id t5-20020a654b85000000b0046f063e9e30mr8379392pgq.409.1666689009302; Tue, 25 Oct 2022 02:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666689009; cv=none; d=google.com; s=arc-20160816; b=MQmh/UR+z92xtOel2sHJR+jD0JXXS6D9n1HjHXrKrD9saEJxOYr1/OuzdR8n/wAf64 wCkCthhz+Sk6oABV28ZmOGqMkmb7S06bj9HsHEMSx4dKYucBLIH1wAPxLsQGu9Z10CJ/ cbTsQlGdlttRxWd3l+xd0+q6qaiJLJYjarwfcyLzh4DDoqkdCG+NBTETWhOe6NZifI34 uXWeg4cLQklRDl5msEA99qtbwUyzC1GYQWgzCPZHRStcfvpBeINlw/6A+yzCysBET/PX KrGjzpjZQW1vnrlHII2y1Z/K4JwptdkepqJIXyljVG6xfe9xBFxWSAzgGXMOjJ1b2P/9 XrXQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=W8tFg7EQ7aWNSFrVyXbmDP64pDU/0mxG8TQ6kCxqQro=; b=AWWn/Up9YiX7MLO3RC43/JppIQSK14n87PhQQeWcC8R8Lmf4gNbpEo5JYaqjqXdO5B k0llllP+BvoRHXqOPYQ/qB4G80AYp7ex7/jsURL5uQY/mSvxfsLuQ+uhgLKSlA0jTmNM QNqO64h6MGbBAtl9L0IuwcUxQ6yF6eMqANjtKvbl6IlMV16Ev1vaVWrc3fhByx7Bj54d dLUND9m3NS9MkhDCZxfashm6d17EASgIpy88/9L0cb8WZQ1Poz1MruR4PPz8U4GThYpQ st1w+eo7m+CY1qCwbD+HXWWmfUuI8sdOA6sXwu3LHH41zDVIEVRTxE7tdSJmREEV9JRu WKKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=YhkYd1nr; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i19-20020a632213000000b00438b79bcf26si2150842pgi.151.2022.10.25.02.09.54; Tue, 25 Oct 2022 02:10:09 -0700 (PDT) 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=@microchip.com header.s=mchp header.b=YhkYd1nr; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232280AbiJYJGe (ORCPT <rfc822;lucius.rs.storz@gmail.com> + 99 others); Tue, 25 Oct 2022 05:06:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232225AbiJYJFI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Oct 2022 05:05:08 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EB9515A8F6; Tue, 25 Oct 2022 02:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1666688644; x=1698224644; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kDm2uPx3R/Ls2XXpsY+sy6aD5vNdGltPVO6OtLCRB/w=; b=YhkYd1nrGYmhA5Q4c4yMR4hoBVOATQ3u1NrT58y33Bo1JXEiht+hZvkN 4C2l9VtZM5B1PhSzFWjihN5lVW6xnBAq08RUDzRT1ltXJK91Jymjv7Jm9 O98YrmiSJVEhi2Rbh7joXQzAgfc5F1TKPBrAAmyQ6mk2YtE9wf0CVcHr9 Y+wgYsC+gxp8VMqhPXci/hBgIphM6/EjiDbsdA5jguzXXtiENSdCfux9O ZY5wKjnXXgAukhXAfw6EDcjZzjhb+Ckn3A6dbIpA5Ug70RPcm1EyFDAN9 j1f3jlwXsEbdj1bdpRQzv448PiJlv5ig0X2pHqJYWC8JoS359ixKt+/8F Q==; X-IronPort-AV: E=Sophos;i="5.95,211,1661842800"; d="scan'208";a="120221319" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Oct 2022 02:04:04 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 25 Oct 2022 02:04:00 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Tue, 25 Oct 2022 02:03:58 -0700 From: Tudor Ambarus <tudor.ambarus@microchip.com> To: <vkoul@kernel.org>, <peda@axentia.se>, <du@axentia.se> CC: <maciej.sosnowski@intel.com>, <nicolas.ferre@microchip.com>, <mripard@kernel.org>, <torfl6749@gmail.com>, <linux-kernel@vger.kernel.org>, <dmaengine@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, "Tudor Ambarus" <tudor.ambarus@microchip.com> Subject: [PATCH v2 16/32] dmaengine: at_hdmac: Do not print messages on console while holding the lock Date: Tue, 25 Oct 2022 12:02:50 +0300 Message-ID: <20221025090306.297886-17-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221025090306.297886-1-tudor.ambarus@microchip.com> References: <20221025090306.297886-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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?1747650094643453943?= X-GMAIL-MSGID: =?utf-8?q?1747650094643453943?= |
Series |
dmaengine: at_hdmac: Fix concurrency bugs and then convert to virt-dma
|
|
Commit Message
Tudor Ambarus
Oct. 25, 2022, 9:02 a.m. UTC
The descriptor was already removed from the transfer list, there's no
reason to keep the channel lock while printing desc info, thus do the
prints without holding the lock.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
drivers/dma/at_hdmac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 858bd64f1313..f365ac4d87ff 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -549,6 +549,8 @@ static void atc_handle_error(struct at_dma_chan *atchan) atc_dostart(atchan, desc); } + spin_unlock_irqrestore(&atchan->lock, flags); + /* * KERN_CRITICAL may seem harsh, but since this only happens * when someone submits a bad physical address in a @@ -564,8 +566,6 @@ static void atc_handle_error(struct at_dma_chan *atchan) list_for_each_entry(child, &bad_desc->tx_list, desc_node) atc_dump_lli(atchan, &child->lli); - spin_unlock_irqrestore(&atchan->lock, flags); - /* Pretend the descriptor completed successfully */ atc_chain_complete(atchan, bad_desc); }