From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ADB15E3A5 for ; Fri, 8 Mar 2024 21:00:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709931646; cv=none; b=k5vyeFKgWH8V4/LLEfotYa0kJhHm/FMNJPISSGht2yIEEcHDVmriPqkbTQc2UE2cZVBxOHnlNm8Hdc8b/ojaqHM8p0/OVZkXzTwMza4/IAI5T4EFe/umrGEQTcBOeFza8BKB7NsdtbVK9AAqoPFTW9iPkgOszd5YvEVE+wZg+48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709931646; c=relaxed/simple; bh=h3ZwvO18NqzlYxQLvrQ+ixy5YP9uezWH5/IU5Z2QUJk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ISWsniMG87rcEGGE3CQAyXOtRb7YtTcc7Xn3vc1WxwpTP70BM37s05ALp4MRtgPO3Ib3hsneihJC4KIk1v/DUfqY6v+YV4JPEKrXsdrpxXkcXaUXkrf3kUS/mv+9sPpNPBs2jCaGhv0/kccsCBTL0JKA0S7pJ34HDUbuTJBz3uY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=fHPAY1k5; arc=none smtp.client-ip=95.215.58.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="fHPAY1k5" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709931643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+ucTS9a0V+bG0ban2Mlf24ZePa15zebSakjUo97bJDM=; b=fHPAY1k5DxR4UlbR9W2J4KQi1tb2ggwkCtCcDAhfYJ/njlbkCp5JfxueFctt5mztZc0oO9 1xgmywoHsxosTSN84IozbPv3HCnrdlzHmLUlHYvX+KiGzJOnExfFqYPGzoNjhriiSKKMAl YOAKPo0b8IgCpkchLLdk2rR7XVFvrL8= From: Sean Anderson To: Laurent Pinchart , Vinod Koul , dmaengine@vger.kernel.org Cc: Michal Simek , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sean Anderson Subject: [PATCH 2/3] dma: xilinx_dpdma: Remove unnecessary use of irqsave/restore Date: Fri, 8 Mar 2024 16:00:33 -0500 Message-Id: <20240308210034.3634938-3-sean.anderson@linux.dev> In-Reply-To: <20240308210034.3634938-1-sean.anderson@linux.dev> References: <20240308210034.3634938-1-sean.anderson@linux.dev> Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT xilinx_dpdma_chan_done_irq and xilinx_dpdma_chan_vsync_irq are always called with IRQs disabled from xilinx_dpdma_irq_handler. Therefore we don't need to save/restore the IRQ flags. Signed-off-by: Sean Anderson --- drivers/dma/xilinx/xilinx_dpdma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c index eb0637d90342..36bd4825d389 100644 --- a/drivers/dma/xilinx/xilinx_dpdma.c +++ b/drivers/dma/xilinx/xilinx_dpdma.c @@ -1043,9 +1043,8 @@ static int xilinx_dpdma_chan_stop(struct xilinx_dpdma_chan *chan) static void xilinx_dpdma_chan_done_irq(struct xilinx_dpdma_chan *chan) { struct xilinx_dpdma_tx_desc *active; - unsigned long flags; - spin_lock_irqsave(&chan->lock, flags); + spin_lock(&chan->lock); xilinx_dpdma_debugfs_desc_done_irq(chan); @@ -1057,7 +1056,7 @@ static void xilinx_dpdma_chan_done_irq(struct xilinx_dpdma_chan *chan) "chan%u: DONE IRQ with no active descriptor!\n", chan->id); - spin_unlock_irqrestore(&chan->lock, flags); + spin_unlock(&chan->lock); } /** @@ -1072,10 +1071,9 @@ static void xilinx_dpdma_chan_vsync_irq(struct xilinx_dpdma_chan *chan) { struct xilinx_dpdma_tx_desc *pending; struct xilinx_dpdma_sw_desc *sw_desc; - unsigned long flags; u32 desc_id; - spin_lock_irqsave(&chan->lock, flags); + spin_lock(&chan->lock); pending = chan->desc.pending; if (!chan->running || !pending) @@ -1108,7 +1106,7 @@ static void xilinx_dpdma_chan_vsync_irq(struct xilinx_dpdma_chan *chan) spin_unlock(&chan->vchan.lock); out: - spin_unlock_irqrestore(&chan->lock, flags); + spin_unlock(&chan->lock); } /** -- 2.35.1.1320.gc452695387.dirty 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 5E678C54E41 for ; Fri, 8 Mar 2024 21:01:04 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RTelFT6DI1uSEJI5c+7/B4RuEuY44ykJtx4Fd5260LE=; b=eYj+nvMKSu5Ku9 qFkmpJtt/0W5ksi5pA8YYNCBM2UiMtPmtwHzgJINfUAgzaiFU+MaIFxJL6irRglizQvNdSi024D3y w4QN0vf6P+pf/Zqcun++I951qlJ2kO399BHO3CHXuxf1oGoV/6wWjmAfim+8H4PlzRyBLbiPoK6oN d5eaAicbXdqMduitTopmjV5lma9TFkM4p3MRy3qiKfXhgP4xAJL/Qw0x+txCSBX9XhXD8wsfRdHuV zaE9Paf18GeDDmkgbXuCKbNlwDilZq3YGT6GzjJb4TuP0CoCr//1Z5vOO3qPRJ7zJPL2lGh6EGbv6 iRBLJL92DPonmFIYno/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rihKl-0000000BIYF-2lL4; Fri, 08 Mar 2024 21:00:51 +0000 Received: from out-174.mta1.migadu.com ([95.215.58.174]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rihKg-0000000BIVk-0aq7 for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2024 21:00:47 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709931643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+ucTS9a0V+bG0ban2Mlf24ZePa15zebSakjUo97bJDM=; b=fHPAY1k5DxR4UlbR9W2J4KQi1tb2ggwkCtCcDAhfYJ/njlbkCp5JfxueFctt5mztZc0oO9 1xgmywoHsxosTSN84IozbPv3HCnrdlzHmLUlHYvX+KiGzJOnExfFqYPGzoNjhriiSKKMAl YOAKPo0b8IgCpkchLLdk2rR7XVFvrL8= From: Sean Anderson To: Laurent Pinchart , Vinod Koul , dmaengine@vger.kernel.org Cc: Michal Simek , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sean Anderson Subject: [PATCH 2/3] dma: xilinx_dpdma: Remove unnecessary use of irqsave/restore Date: Fri, 8 Mar 2024 16:00:33 -0500 Message-Id: <20240308210034.3634938-3-sean.anderson@linux.dev> In-Reply-To: <20240308210034.3634938-1-sean.anderson@linux.dev> References: <20240308210034.3634938-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240308_130046_396087_DA3F5CD7 X-CRM114-Status: UNSURE ( 9.13 ) 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: , 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 xilinx_dpdma_chan_done_irq and xilinx_dpdma_chan_vsync_irq are always called with IRQs disabled from xilinx_dpdma_irq_handler. Therefore we don't need to save/restore the IRQ flags. Signed-off-by: Sean Anderson --- drivers/dma/xilinx/xilinx_dpdma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c index eb0637d90342..36bd4825d389 100644 --- a/drivers/dma/xilinx/xilinx_dpdma.c +++ b/drivers/dma/xilinx/xilinx_dpdma.c @@ -1043,9 +1043,8 @@ static int xilinx_dpdma_chan_stop(struct xilinx_dpdma_chan *chan) static void xilinx_dpdma_chan_done_irq(struct xilinx_dpdma_chan *chan) { struct xilinx_dpdma_tx_desc *active; - unsigned long flags; - spin_lock_irqsave(&chan->lock, flags); + spin_lock(&chan->lock); xilinx_dpdma_debugfs_desc_done_irq(chan); @@ -1057,7 +1056,7 @@ static void xilinx_dpdma_chan_done_irq(struct xilinx_dpdma_chan *chan) "chan%u: DONE IRQ with no active descriptor!\n", chan->id); - spin_unlock_irqrestore(&chan->lock, flags); + spin_unlock(&chan->lock); } /** @@ -1072,10 +1071,9 @@ static void xilinx_dpdma_chan_vsync_irq(struct xilinx_dpdma_chan *chan) { struct xilinx_dpdma_tx_desc *pending; struct xilinx_dpdma_sw_desc *sw_desc; - unsigned long flags; u32 desc_id; - spin_lock_irqsave(&chan->lock, flags); + spin_lock(&chan->lock); pending = chan->desc.pending; if (!chan->running || !pending) @@ -1108,7 +1106,7 @@ static void xilinx_dpdma_chan_vsync_irq(struct xilinx_dpdma_chan *chan) spin_unlock(&chan->vchan.lock); out: - spin_unlock_irqrestore(&chan->lock, flags); + spin_unlock(&chan->lock); } /** -- 2.35.1.1320.gc452695387.dirty _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel