From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46B0842B75A for ; Mon, 10 Aug 2026 18:12:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786385563; cv=none; b=fgkba5/5+BTEuDrDZ/BYaBaz/zGYNM/c9tza/fUDm2mZ4h9PeCnl2rnjaneMTQ4dpmltz0RjGmdJ4KxNmycoe5d0KEk4EkyDIJYa81Vif2zY5RZryuetyWCB/E9q8NHdXFtSmUYWL/QVOLjt9iINw0akQLKCtoJnJqWZzi84Yww= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786385563; c=relaxed/simple; bh=VSGfp2nFK2KHhGT5BTCtWQE+xFVZbCQ4FH5muv7ny1k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Rp328FSlTBKkrEi+LzBBoErR60oZmSI0noeQS/hjb0d+uWkOl0w3rNjYRB54dEbn3ZadOR6LeQ4LnPj/8xV7dfGCnJBuYsWmJLccpafS8jBQDHRi2ihIGk7DEanHhkLsYxjTeJys9zGD1xdIvM70f0UezSBidLBbaG1PA3G9fZ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=sYIzIixu; arc=none smtp.client-ip=209.85.216.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sYIzIixu" Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-38deea72eebso2143989a91.1 for ; Mon, 10 Aug 2026 11:12:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786385562; x=1786990362; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=XhfEAW8BttSC81TlBFp6AqcN9U05iRvrtOjyjSXhehI=; b=sYIzIixuaVAPldDQes2BkTH4+Sz01uNV4djC0QGb8aep0NY2UVhE/nyFsbb42IMFpY Sm9ZU0F1SOkEK+C7AAYPQbjB4mjlBYKo0wYhZwdK0tixQaVy0MgD5DhNha4o/rMUXj37 6+c+BmGBVdeyH9Xg4kYhn8YlCnYdUferimWS6J3pFC0RO8Pyp8bZve7QC7+oyIrr9rsy J70psSFcwJCyOCw8Qf3VZnJ+Ny/rgOfOuXIhD1rEPa7fQ6zpKbePlge5aEIXfUaybzYj kWWDNdnI4m4dcDP0Kdix9OiDVTfecTHYLy5RTRUp6S8ULztiUhQU6g9ZD7Q6T0MHUlRN QKGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786385562; x=1786990362; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=XhfEAW8BttSC81TlBFp6AqcN9U05iRvrtOjyjSXhehI=; b=C2v709n1NNHwjnSAhCQwcvEGDcRI/0li1n1HAl+0ci75CkA9q2jhKtua14Foac2nzg aNj007g4bz5mNSlvYdzCkEcLNyJLUxb+7yBW8w82KoeXI9y0yJ8XuodeP97AyDk9iWXJ 7OTlntfVCZDrWywI0LaqdP+JSQTwFyjQMmIS4g0OzbLl5HiIzP9PV2xjfImDTxW1sR5M jFz3O/yRZSpPD8JDPuECTaUusrEDcn77+JjkQ0d8tReJPSL47UuK1vCWUhIYaXAxhd6+ Cfw+/zBrJ0xDMD1ZGInBd7kGtoYWvZBKqujfY29m1Q4dz5czc622YO/JPl0TKzTui3co 2CBA== X-Forwarded-Encrypted: i=1; AHgh+RoTMFOXYnttvnqOyUu7DBXPuHVmWxLNiHKpTqT3XFF3kWfTKQKzOmGvZVRPHGONaVKhE05QEiqI1Zz5ed8=@vger.kernel.org X-Gm-Message-State: AOJu0YwFxm0ZL4qmUR2D2IaHZFUelhvr2oWBlXLaF9Ds97lV4lvyu28t JRagozjKpN79GZjf9GUE5NxNuFn92rjtkU5cAE8+KBDSxFGupXHOiqfwdp46AQ== X-Gm-Gg: AR+sD10pL4o2LQrQ2ByKkvea3AlLCeRs0reLjNdoHPnli0Ybl5DJcMXQFKZS2tLXLV1 nWRzdnhmoCitsG7n1e6OoJ05SQi7s08Dl1TRkya/7wb2vjc3Yjy5jMgAcooBiOVQzmLNpzXx71a kGClLZFeXklsB7fSOCB/jdz2KvvIb8LE4hCPBxSvGENgbslmWgzzsRI+l+XNAQR5DYVba5zIVX6 n3fcssIeBVCokTKuH5XltEQOe4MKoaBxBVjmNTSlaPwEWxvcOEvcMV0fWjwH3M+QsooEndeuWT9 2iMf1eFY1GjZSxHDbMFpKpJhsKauRnv15dbma8KSuue6ncIqPSTJ9CN6d/Di86WfI+UWsWOCxaj CtvpuqPZYxzeDV5BEEZF9OCUdUp9eMcjiP9F/fchQbEIuy+yQzkCqI+8vXjSE7XancfMbxZTLYw tTwO0/oZBAh67LrQZeIq0k1hInubxX0VjKq46lHJhPcDRwqAc4cq523yNySBKnqSczi6xOlI4MO A== X-Received: by 2002:a17:90a:e706:b0:38e:b400:a860 with SMTP id 98e67ed59e1d1-392824a96eamr22423349a91.13.1786385561722; Mon, 10 Aug 2026 11:12:41 -0700 (PDT) Received: from cryptic.lan ([2001:569:7fa9:fa00:b1a9:6513:83c6:1d23]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-392d53b873asm472795a91.17.2026.08.10.11.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 11:12:41 -0700 (PDT) From: Allen Pais To: Vinod Koul , Frank Li Cc: Allen Pais , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Kees Cook , Michal Simek , Suraj Gupta , Marek Vasut , Folker Schwesinger , Tomi Valkeinen , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 19/34] dmaengine: xilinx-dma: use dmaengine BH instead of tasklets Date: Mon, 10 Aug 2026 11:09:20 -0700 Message-ID: <67afeabe4a9cc241704b36875e766d7d129465ec.1786384169.git.allen.lkml@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Replace the per-channel tasklet with the shared dmaengine BH helper. The handler continues to run in softirq context while dmaengine owns the common scheduling and teardown mechanism. Signed-off-by: Allen Pais --- drivers/dma/xilinx/xilinx_dma.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index 404235c17353..b142c9c0583c 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -402,7 +402,6 @@ struct xilinx_dma_tx_descriptor { * @err: Channel has errors * @idle: Check for channel idle * @terminating: Check for channel being synchronized by user - * @tasklet: Cleanup work after irq * @config: Device configuration info * @flush_on_fsync: Flush on Frame sync * @desc_pendingcount: Descriptor pending count @@ -441,7 +440,6 @@ struct xilinx_dma_chan { bool err; bool idle; bool terminating; - struct tasklet_struct tasklet; struct xilinx_vdma_config config; bool flush_on_fsync; u32 desc_pendingcount; @@ -1115,11 +1113,12 @@ static void xilinx_dma_chan_desc_cleanup(struct xilinx_dma_chan *chan) /** * xilinx_dma_do_tasklet - Schedule completion tasklet - * @t: Pointer to the Xilinx DMA channel structure + * @c: Pointer to the Xilinx DMA channel structure */ -static void xilinx_dma_do_tasklet(struct tasklet_struct *t) +static void xilinx_dma_do_tasklet(struct dma_chan *c) { - struct xilinx_dma_chan *chan = from_tasklet(chan, t, tasklet); + struct xilinx_dma_chan *chan = container_of(c, + struct xilinx_dma_chan, common); xilinx_dma_chan_desc_cleanup(chan); } @@ -1898,7 +1897,7 @@ static irqreturn_t xilinx_mcdma_irq_handler(int irq, void *data) spin_unlock(&chan->lock); } - tasklet_hi_schedule(&chan->tasklet); + dmaengine_schedule_bh(&chan->common); return IRQ_HANDLED; } @@ -1955,7 +1954,7 @@ static irqreturn_t xilinx_dma_irq_handler(int irq, void *data) spin_unlock(&chan->lock); } - tasklet_schedule(&chan->tasklet); + dmaengine_schedule_bh(&chan->common); return IRQ_HANDLED; } @@ -2654,7 +2653,7 @@ static void xilinx_dma_synchronize(struct dma_chan *dchan) { struct xilinx_dma_chan *chan = to_xilinx_chan(dchan); - tasklet_kill(&chan->tasklet); + dmaengine_kill_bh(&chan->common); } /** @@ -2745,7 +2744,7 @@ static void xilinx_dma_chan_remove(struct xilinx_dma_chan *chan) if (chan->irq > 0) free_irq(chan->irq, chan); - tasklet_kill(&chan->tasklet); + dmaengine_kill_bh(&chan->common); list_del(&chan->common.device_node); } @@ -3075,8 +3074,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, str_enabled_disabled(chan->has_sg)); } - /* Initialize the tasklet */ - tasklet_setup(&chan->tasklet, xilinx_dma_do_tasklet); + dmaengine_init_bh(&chan->common, xilinx_dma_do_tasklet); /* * Initialize the DMA channel and add it to the DMA engine channels -- 2.43.0