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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 270A6C32774 for ; Sat, 20 Aug 2022 12:59:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347162AbiHTM73 (ORCPT ); Sat, 20 Aug 2022 08:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347168AbiHTM7F (ORCPT ); Sat, 20 Aug 2022 08:59:05 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAB0D4BD34; Sat, 20 Aug 2022 05:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661000313; x=1692536313; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EqIew9+MpGCMfwN/RDi+KIL5lpl8bJVTG4PPXYs0/14=; b=tbNuvNqlMruD+NnZTmUswFG3XxaOvDVbAEV9TXGdvc9UGfgfpkyUbgxQ NDWu74/NOUGy/DKyyeHBEL0AM8y7msqbYix6QbW7NxJSHH2UvjaNVrYew eGAlDX2FbCR9pABqUOP5y2oL+uJS6h9+Qmw+c9rcuB77IzD2dw7VBOqB3 YGwkji2RmmP/SxTWLO/4EGGacJnX2c6I73tdNiSXaUghxIiA6Ma08hsQX tOwTleJE8T0ACQJxc9Ax5aX1g7uYP89rhLqjr3vQtjxTSBk8t+YbOL4Zj ZjXmjbOqQyJhw6PGNocaAyxqWMIMOCvfliDsaG8HcdqYBZtVw4CbFyAzB w==; X-IronPort-AV: E=Sophos;i="5.93,251,1654585200"; d="scan'208";a="187325681" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Aug 2022 05:58:32 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Sat, 20 Aug 2022 05:58:32 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Sat, 20 Aug 2022 05:58:29 -0700 From: Tudor Ambarus To: , , , CC: , , , , , , , , , Subject: [PATCH 20/33] dmaengine: at_hdmac: Do not print messages on console while holding the lock Date: Sat, 20 Aug 2022 15:57:04 +0300 Message-ID: <20220820125717.588722-21-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220820125717.588722-1-tudor.ambarus@microchip.com> References: <20220820125717.588722-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org 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 --- 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 1cb0d26d30ed..16cea65a708d 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -983,6 +983,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 @@ -998,8 +1000,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); } -- 2.25.1 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F41E9C25B08 for ; Sat, 20 Aug 2022 13:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ODizqzsWw2SsBzG3CEZpQcMjf+BNMo5NqZK2/k19xEs=; b=Z7oTw99TcUoWpv gywvl2gjzREzg5F6mbJ3DEqgX9wkPQmB6Mo4WHiGzF5UYs5ENxYa8hDnYXNGTPogVjyxyKLL1tGk1 0FGCqnl1zSSa41a6RTRlNAKHJZGJQwiXFIHAYpK/UtMIjFQ49gDkrGlCiLCt9dW47fvcT/DSN2IbB oHZLSb5+1aWlVgg5AuejFvCNNGmhiWEGFu1UJF3U1NLrjYucbn0wQdiJcm6T81i4iz/8LrSZS8CWf qJ70vR5g7JfRLskLJ93KXazQKuNoPWzdjd3zMAl9tW5VRFeS8YuO0cWrEnpD8kv2kebNJnrEhedb/ DhH5lJT7ZsriGVJj0SQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPOD4-00AHm7-4s; Sat, 20 Aug 2022 13:08:19 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPO3d-00ACm5-Ve for linux-arm-kernel@lists.infradead.org; Sat, 20 Aug 2022 12:58:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1661000313; x=1692536313; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EqIew9+MpGCMfwN/RDi+KIL5lpl8bJVTG4PPXYs0/14=; b=tbNuvNqlMruD+NnZTmUswFG3XxaOvDVbAEV9TXGdvc9UGfgfpkyUbgxQ NDWu74/NOUGy/DKyyeHBEL0AM8y7msqbYix6QbW7NxJSHH2UvjaNVrYew eGAlDX2FbCR9pABqUOP5y2oL+uJS6h9+Qmw+c9rcuB77IzD2dw7VBOqB3 YGwkji2RmmP/SxTWLO/4EGGacJnX2c6I73tdNiSXaUghxIiA6Ma08hsQX tOwTleJE8T0ACQJxc9Ax5aX1g7uYP89rhLqjr3vQtjxTSBk8t+YbOL4Zj ZjXmjbOqQyJhw6PGNocaAyxqWMIMOCvfliDsaG8HcdqYBZtVw4CbFyAzB w==; X-IronPort-AV: E=Sophos;i="5.93,251,1654585200"; d="scan'208";a="187325681" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Aug 2022 05:58:32 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Sat, 20 Aug 2022 05:58:32 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Sat, 20 Aug 2022 05:58:29 -0700 From: Tudor Ambarus To: , , , Subject: [PATCH 20/33] dmaengine: at_hdmac: Do not print messages on console while holding the lock Date: Sat, 20 Aug 2022 15:57:04 +0300 Message-ID: <20220820125717.588722-21-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220820125717.588722-1-tudor.ambarus@microchip.com> References: <20220820125717.588722-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220820_055834_101690_A3011452 X-CRM114-Status: GOOD ( 10.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tudor.ambarus@microchip.com, linux-kernel@vger.kernel.org, maciej.sosnowski@intel.com, mripard@kernel.org, torfl6749@gmail.com, ludovic.desroches@microchip.com, dmaengine@vger.kernel.org, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 1cb0d26d30ed..16cea65a708d 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -983,6 +983,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 @@ -998,8 +1000,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); } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel