From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 AB71D3D3D12 for ; Mon, 27 Jul 2026 20:32:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785184346; cv=none; b=YApxaCRPJouy2TBqOBSuBcP2WM9HJNTXitJoOFMjion6bQfCoM5AHPv2k6svA4kmheBkwOnnbffp5laUDs43eQ6hDoW0A43O8xdY75Kbgmy2E9qdjQ75vvca8yN8pLu8Sl4mGqtPEDzUGKbgHxFUGgMK+Mll5dhWEKnSgP663rA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785184346; c=relaxed/simple; bh=8vCKtZR6MUxxODQNW+wG7bxS9zsKEdKJvL4+Ni8zM5Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dXxORwKgUyT3tkjQRgf3an1iiBkd7HUijbDzNrrqWMAlUg4+IqtW0qtRneZZFkv7lirSnOa0N0zbMB/ClUC7lqA9YglT5XzXTxvyLvLvoqZO+M9AeKUStxTVIfGkX9tSusYeeez7fQSa5uGyc9aauqTJDHL23n2ZCtzemAIG5TA= 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=jEfI8pYZ; arc=none smtp.client-ip=209.85.214.182 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="jEfI8pYZ" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2cad4170e8eso47756045ad.3 for ; Mon, 27 Jul 2026 13:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785184344; x=1785789144; 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=dJ7s0OZXSBQkDnzpVrUp569VipY5QppQ1cZnFPXTJMQ=; b=jEfI8pYZyRch1TXlsO6Ukd51B+otXQULEXY8P2yZdEWiJzBvefpjXk22x8bY66vZ6e 4b5GAIU8oYXxfHsZPKeoLckNwusbvrohjksM71tT/MQ6wYpkv8FydRPmsE6awrRgr9if uxfOn+zvtTnDXqSL/aX5QkmYGAAbUF7tPKcZjkMq/4+kaoeMBee73BJZYnc4F87Af5pI 8XVXVX+yDfwqiUZ8D6EFoDSu8TTvfeFYKb//ri2GoLMZZ/8Hl5j3iKQCLgglaYKkcT7f L5d6w6GoNK6RY7ce3pYWa6p5fyBVjogs+JRLFwbRJVGwaC0yDI0J10nWWnkYxOOc8GYi gEPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785184344; x=1785789144; 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=dJ7s0OZXSBQkDnzpVrUp569VipY5QppQ1cZnFPXTJMQ=; b=gHeQFeNNXMNClGpk768i3PKVn7hBtKU8mxGLxhx5VhLe+6miuTeYNMuvp9CmnHej78 ww3LrC0ZftPVwU3YgHrvU9LOID9TxoJTf08BBoAQ0W4nGZRR+iqivMmUNcvxo8f3P+fC bon9r44mLpknDrw+BlicFo6XxQDvLqb2pDezmNoKgZ5I9LiT0tlCWuRzeFiA/okZtcoT qHx35phCj3dkdwb6K/vC9PBiDFVfcajtrae2wCOWWA4Z0f7TPh13EWLjFXTsCHUryNPt uP1j25cbZ87/kd9XiuYlm1I6cfJ9Fwq/5egQyQiKfimv9+DUBNRwdLxtue5MkgZ1d6J4 zxGg== X-Forwarded-Encrypted: i=1; AHgh+Rqoq2jMWisQ/tvUYraPcIc8SmhcMZAXLbSgM3iRcdR2ANMydoyNIaSrARnFgeCgmm80ma7OqD/bnBuDH5Y=@vger.kernel.org X-Gm-Message-State: AOJu0Yzt4OtAOd9gWuZegqCGgek9BCTHN0U9HBVq7aX7c6MlIrzsXdzY tLa6PX+A6m4xyPB9P1JKcxzUwqxUjbG0H45x71upDBaTLkOXvC0jWlSW X-Gm-Gg: AR+sD12VqYWMUpk4eM2SfzcsuuGhK2W7p4GF1Mbt1dEyW4o2bcsAS8ebuQqYD9qQkLS aj1pTVecZ36WpcpHuf+hZsTdtddqp6a8Li1K9j3GOdIm8ilM4NGn9Ax1/h03XgZYO9B85a85qvB by1M6nh1sy4pezHQEPQQHesu5jcvbMETV0vBdx979FhbnFGLcZWsCVVzNtPbu6GRWWiTNzZ64Ox JPeRthBhhZwnV01wq4IHFJpDPVi2/Gk9x71RdmszgMj+F90yu4Iirc3pQyuvZ5rXzxMvfwNxxzO IcsWJUvqUPjOOE2878ZjbKfoQISeBkpnbCLAK8vpedN6tZ93EtxovonhtUSTMil2Sg4Ig6k6EyZ hhLohjTu55eksOhcndnzMA60hKij00bTZ8c/49+aXCC3D/OKzPWHC9kWK4zUcLLXNtgl/rAdJng yAx8t3 X-Received: by 2002:a17:902:e549:b0:2c8:25c8:85a6 with SMTP id d9443c01a7336-2d00f24e8e7mr7931755ad.2.1785184343842; Mon, 27 Jul 2026 13:32:23 -0700 (PDT) Received: from cryptic.lan ([2001:569:7fab:e200:3789:64f9:8855:c0af]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cfde59b768sm41551805ad.4.2026.07.27.13.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2026 13:32:22 -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 v2 19/64] dmaengine: xilinx-dma: use dma_chan BH instead of tasklets Date: Mon, 27 Jul 2026 13:28:47 -0700 Message-ID: <300282f7a29dc2125d22ac153075b0ac29591ce6.1785183549.git.allen.lkml@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: <20260108080332.2341725-1-allen.lkml@gmail.com> 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 dma_chan 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..bf9f22ed1265 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); + dma_chan_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); + dma_chan_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); + dma_chan_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); + dma_chan_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); + dma_chan_init_bh(&chan->common, xilinx_dma_do_tasklet); /* * Initialize the DMA channel and add it to the DMA engine channels -- 2.43.0