From patchwork Mon May 3 15:26:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Ranquet X-Patchwork-Id: 12236297 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=-13.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MISSING_HEADERS,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED 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 B233CC433B4 for ; Mon, 3 May 2021 15:30:44 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A84C61073 for ; Mon, 3 May 2021 15:30:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A84C61073 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:Subject:Message-ID:Date:From:MIME-Version: Reply-To:To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=a8EylywC+sS3tN+2WbF01TkfRdjOlrW05pNHrjQ6hKM=; b=dTRNF0graZ7EvJ 74tmc4MiB1BjwDrK1jetpTWSClcUktuLllX99947EV31X9SigFpx//spa2IbU9CCzI8riz8XlcjkD 5EKv+vHi1qKjyYoP7TaIk8thJIWdwBkb/7yX4T+Z6oiDZ2PyQL3m28aSVoau3aFCvee2tX+TJ5rJ1 8Htb+dtYsVwqhULEWPw34brkRLPw/jNvAYf9lv4jv6HXt3DJAYNsmL+PS/S1mG2uHZX71V5LeYqC9 Lj1BgVfX/vXhlg0zO2Fvwv2EOcz/T/E6q1dge8C4tfwcT0A26YD97RfKAtu7Dxef6d+drRixxl0Zf VI60W9zYsIoNxj0PK+og==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ldaUW-00EEOf-Ac; Mon, 03 May 2021 15:28:17 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldaT0-00EE74-CJ for linux-arm-kernel@desiato.infradead.org; Mon, 03 May 2021 15:26:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:Cc:Subject:Message-ID: Date:From:MIME-Version:Sender:Reply-To:To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=KYXKPtE2VZh6dALBmahX3Lb0HQq8HVq0AUpkoo7GpCQ=; b=vnRw/PeVv4lBAn6d3uNFt7nNcr OT94Wcqw4SnuA5AGR+eFxjyCigW01HGPWi0/vYMSr+u17XIO/Q5eHDYJ0rBX+BN4I9Cp9wmgh7V32 uAdNMwqCRU8dH3xenjboYYBJnV59I9GFE965JrxQRn8IN1TQKAT1fUIOXZ9xpgrczYTY+BDzAb8Oh SQpqSfG3gozPjAfKx03PYJyKkorZKBHCgFM9MpaNPhJLitm6WoAY8bj79B+u+68XRxzhUbMyP5lJC NlDlF5ZvAQ6fy98YHF6gjczlqy2o0Wey/yTT4QH1X1uotF2ZXfIXEHk6VckFb2kCA4eEflQsLKaVk ZWWXUpNQ==; Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldaSw-003AwF-BD for linux-arm-kernel@lists.infradead.org; Mon, 03 May 2021 15:26:36 +0000 Received: by mail-ot1-x329.google.com with SMTP id b5-20020a9d5d050000b02902a5883b0f4bso5415108oti.2 for ; Mon, 03 May 2021 08:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:cc; bh=KYXKPtE2VZh6dALBmahX3Lb0HQq8HVq0AUpkoo7GpCQ=; b=xmbEQhxke5pWHBfmJSrThVbWD6yNloeA2luzWWZqnzEUacHlBE9+p5BdJi3ay7KHeM EuMcX5IaisYJBmG+magxxmg5YuD04Gmwg7zkDBgqouHeuxxIcMUOnP8AYfGwVW3DMeNz RsXqNHfeYCEYU4hJolnlkGJ72xZ+yP8N1Kv5W96RED8BM5BQucoNaDhHjUMwLQZC24wl ZVBvPEqsjSvYY4Ic+mnHQs4tgU0zinx9OPGvC9YH2wQzKGCs+fkp7h5Mh2BpLTxXdXBu RYgOmbb+6IJE9/Eyo2w/veS83rXtUE5tF3PnuxfyHB+uJGQkLVMfY+DoCXkit+rXY+mH tPAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:cc; bh=KYXKPtE2VZh6dALBmahX3Lb0HQq8HVq0AUpkoo7GpCQ=; b=Yc+v94qyiQGrCNfZdnx4P/049lGL+G2uVdSuY9hE5RvoJIrdqfc3TDhIcuB1SM4L/Y gr8vLE8GMo/4+KCnyO183PiglZ72USyou62myQmUTgARpI0P8AQTRIr7rdig7UeFR1+b pdTVF1DVaCwLzgfD1IejhN16aNjQShLoDXPBraEMSZcDUs92SCvJLXE4WHoyrkyLPHxP 6Nm/Xbfk7EeZ2KmRXTdpBamDitrVBpODxG/Oq8T8hL8Mm0V/ysSpef0rt5uilzBMIUgV qbutsiMwlJvNKR8Z2irgVmWMTGHKJap4imXD2VUpxN9LhtjXQTLKm5bJdO+nfvAKVDnJ 4F2Q== X-Gm-Message-State: AOAM533E83H8UvxWOUTzY3ur31eo8bt9+vqH+6PzEJURmGVH/Rky8SDk yF+kzLKnw9LR89JfI+ZYGlkSdtiPQwD7OXFoTo83zw== MIME-Version: 1.0 X-Received: by 2002:a9d:4703:: with SMTP id a3mt12624909otf.136.1620055593857; Mon, 03 May 2021 08:26:33 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 3 May 2021 08:26:33 -0700 From: Guillaume Ranquet Date: Mon, 3 May 2021 08:26:33 -0700 Message-ID: Subject: [PATCH 4/4] dmaengine: mediatek: do not hold the spinlock for vchan_dma_desc_free_list Cc: Sean Wang , Vinod Koul , Dan Williams , Matthias Brugger , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210503_082634_410877_B2639297 X-CRM114-Status: UNSURE ( 5.57 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As there is no need to hold the spinlock for dma_desc_free_list, Move it oustide the spinlock section. Signed-off-by: Guillaume Ranquet } diff --git a/drivers/dma/mediatek/mtk-uart-apdma.c b/drivers/dma/mediatek/mtk-uart-apdma.c index 4711bec04b98..ba43708f2a93 100644 --- a/drivers/dma/mediatek/mtk-uart-apdma.c +++ b/drivers/dma/mediatek/mtk-uart-apdma.c @@ -431,8 +431,8 @@ static int mtk_uart_apdma_terminate_all(struct dma_chan *chan) spin_lock_irqsave(&c->vc.lock, flags); vchan_get_all_descriptors(&c->vc, &head); - vchan_dma_desc_free_list(&c->vc, &head); spin_unlock_irqrestore(&c->vc.lock, flags); + vchan_dma_desc_free_list(&c->vc, &head); return 0;