From patchwork Fri Oct 23 18:42:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 435 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 15B3B1C010E for ; Fri, 23 Oct 2026 20:43:51 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-26822-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-26822-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id E509538149 for ; Fri, 23 Oct 2026 18:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1792780968; b=Sw936r6+9ubVq9zGOhuHK3yvNo2gTae0v+xtIWNun89UJQPB1sBiSFPqrDbeTVomlJM2 5iszPpS+2j5nIViPkmJDJxcsBQGd/ohmoNooIxYSaCJ8hrXRNmCxCbfYFfYQMxPydTQr8 Uk39G6++r6Z/Q8L0lz9PMXe7odn3d9eDBH47KCw4dcZliokMJ1zHR16f8zpITwzrcGXCP mlYTtvWT3pZCW0j/vybgst1FEFVHPiV+zdusY0gnl3lHP47ab9oUpmY99yxnh6QDdlz+m slXX9aDoKxUIGHT3mgcTsXCdNtgQ9P6y9ELtVlT8lMsQEaNKnOybNcnz2z6W4Y6ZbSg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792780968; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:From:Subject:Date:Message-Id: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer; bh=WsTkc8bAO4KYYktDdouwEoWdlbtwYIQKUFGzzo3SgDw=; b=dMjGi1bBh6WfLv4AbkbqZvbPhHczybYGznWshja2E5jhbXG1je7zErJH6uTUZPeHnCYp OgwtoZBJL00oD224diFdBHEt2vLxZL5syN+yU4ekpSdryOvUZLQMSJrp8Pt+yOrKSEN1Z d236Ly+I20ZNTDp6ja8zEqS/tuCpPH+GZ81Va/wTJN6YAwYaFRZAEcqCgaVtP7narKLof kyVrqobnfdqFzad00MamDPlj8Byb5E3HqCzaEYcAS0LNsmeA9DyDpTEvqFkqDpV7T6HJ8 HwK8f1Wvjdx3i08JJufMeelYmolOGc/71eTfGEr0PnzB2W1X4GiGxMKUyXs+txZ5BBQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AEDBE606A32C; Fri, 23 Oct 2026 18:42:43 +0000 (UTC) X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792780963; b=Nv93Mfgdt0Ji9ciJz7yR48xFAmdAZsA5qADsHVcgdvtW5Byn+zecT4vntRF1sl4yLQjf 3vJCp8YndHOT7Xo5qk+fX7hl3/tjYjW7555zm77/M3nH5ypV54jUxSKbghRUWkUzpDcQ6 ucD27W0x9OAwqlh4NM4Jqa8G5e8tIUm87kUcd5IC3lEEk2tLjDh7aP6TB6YgGq8e5JxzM GPSdm1Gv25nL34Bk2wOANO/H2OixvqUc1vtjqocbAxq9KOpSs0alpUACwJCZ1d6eD7yGR 0m3M1TTQez+amsKtQjK5TgaSogKNLfQ3PYmIrKQU0MELhwLVJf808o0UN5M5mW9jEfg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792780963; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:Subject:Date:Message-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer; bh=WsTkc8bAO4KYYktDdouwEoWdlbtwYIQKUFGzzo3SgDw=; b=yjtky1gTmH/s6825fhlKW0/xvxGsiYAwepenRt5Ucdr1cJgrEqzKKxAJAUSl04xns6R9 wtavZBn9ppaRIvHdAU6526CURk5qNtl+LttUZaZaNaKUztqHOd/t+NEpx0lcl0PdwPriI tTyoRaG+6LJfaWtHCg015pMdSFyX0BgpKE1v8ofdJXdn9uvPu4PrtKFoiQ/MImgSLkO2V 3aTFCNI5ZhLumFbnWgOqXzETivpH7349gd8uXAktea234XAJa9fNyfdTH6VciMGRhHADH EmZ5+mQ6x3MD7uj9+WAkz6qKxS0bpNXsC845VUyob8jkXroDQlWtXLr3ZHbD0cPjEFQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=SlJq5hhV; arc=none smtp.remote-ip=209.85.210.46 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 472A4606A326 for ; Fri, 23 Oct 2026 18:42:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 472A4606A326 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 Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-7f84a55e31aso758866a34.2 for ; Fri, 23 Oct 2026 11:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792780962; x=1793385762; darn=lists.linux.dev; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=WsTkc8bAO4KYYktDdouwEoWdlbtwYIQKUFGzzo3SgDw=; b=SlJq5hhVL1ST3Z36OguLTO/mwANRC7SjThID+bvDpTysW67ALLYcAvw/JggxvZcujr LYr85NSdZOsWXlDig1YOLCuYr5Ye3M+q3jEkeSR12XWEclGSyylWh+fNIhJwmry5OuZo DS6bqbiUBuE+RwHs7TvaNLQqcGl1qu3doGEe72vjdp6cO/QPjsjv4GuY+7KfwtTQ2Qx2 cLX+q6kVPfNLoOviP7L4FRKAZIeWxH0urhJ3maoxd9oTJeGh3Z+bwYe1heI/XzCCY2i7 O40HQD5B+Hf5xxBrBOdxmVgTQrjxce5U5s71aoDUOYKGLxnjO9YkiIDbjwxjMnJCfC2F HkOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792780962; x=1793385762; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=WsTkc8bAO4KYYktDdouwEoWdlbtwYIQKUFGzzo3SgDw=; b=sSh/VHu9ZBTBUwg6Ide5G4Rw1UpvXTe1uINYDrxTUPkQ2SVn+MnpZptRuCTwksElqz 5zuai4YhF+LIkqOMXsLD3MJjCObCnvq3REaRs7e5C7ibQ120mo1yjm1ORcSM1gwoAeI2 RXVhyFKY45HSpOA0BVU5Svo9nS5xkVuLQ/g2nrvwN1iXqPUjVw6kd9YVmMB5oGfEjth4 Uf477RJYbgy/6bnw8uCLsVvM/x+oIh9pl8NWkRPo5MRSYqA21rSSH4pqAgWKNHk3NH0B IGF41Q12f97a7z5szKQrIGJe77Y9whdk/hEaEobv5mf3rjjolGiu52/7wES40G60/Ie3 Z5Ow== X-Forwarded-Encrypted: i=1; AKwUvBzfoyPe8gP1rfwViTgFg6b3rA9OYeVnAPzXZDqjGjkviVh4Lk4PgfIHtxCVuucqXsmj26w7Z0b6QA/D+g==@lists.linux.dev X-Gm-Message-State: AFq9FYL6aoVAypFxA5EbYsxmCQakGjYIQRdRh/Q0tQ23AxkcPApywY0y cr5/lf2gcwrwufG3j1E0YFcM7l8DWtwd/Ltup7vx/tJhsEX7fGSkRMXa X-Gm-Gg: AYBFou0QrF1PB5zS7CxNrPvuCZecLs34F4IT2gDsgDHhx9fqy6mxmey1NckmhvWjPK3 DmMhYfQhmck/vY24XO+4rfdKR1AKulePFFp5/hJUO2rdeU31mkS6+/ll764V2nOhxolT2KDd6Rh kjOw8i9VE7rfKQEK53OlVkU3LNbJfpE+G/rslLWlECq4wXtyPek+WqjWYSFYPXgHFjPZktm4GHF 7KyIcUW2VbLDWHv28i/vYjKQ5Hig0rqg+IBg8OuMPOG/BxuK4/MOCWHzblL38DVI6oycfypny0k Godhf8fpmGVeOTEnwTK6f71joV9lR1+RFhjEiE9GC1mRcnPqW9k5MRGPfXvLfEltRQ+eS4Ji9lU XFYxQhWYTNZtUU5xgT3VjYXPtz/Q6t2gszKqFT5Fy917SDjXBlm0TYWzvr5qgUQsIFZ9hOLvQo9 F6aEfqnno0/FnwAZs5/gtLJAlojPuT1pk0CC6E7y3Ad94QsZ8n9KjA9S6IeLXR5fMFA4Efl9cZq aJVgxuqSx23a1qwZ6VehJZxn6EOhmpO+JQ46D/5jFI7FV35JrwY+qk1dCYzThy8WbQw6cUalHJG 28ab0kTYX9ZWOTxfCH+68EXHz1kWfS0E3hwmG/VpoZjb8hYg2Xrap1usEloRfNs4eKnWUKaaInZ be6LmB/5zm/OO2Bz9TnEMWsyonVsTKyy5PVL1Xb5vpA08Hd8kMbpd0iitaaSGTIOI4l1gvX+lWU u4lQ== X-Received: by 2002:a05:6808:138c:b0:4d6:92b3:5c8d with SMTP id 5614622812f47-55c00426714mr42788b6e.67.1792780962175; Fri, 23 Oct 2026 11:42:42 -0700 (PDT) Received: from [127.0.1.1] (174-29-1-49.hlrn.qwest.net. [174.29.1.49]) by smtp.gmail.com with ESMTPSA id 5614622812f47-55bfe199544sm336682b6e.13.2026.10.23.11.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2026 11:42:41 -0700 (PDT) From: James Hilliard Subject: [PATCH v2 0/6] dmaengine: sun6i: fix interrupt routing and channel lifetime Date: Fri, 23 Oct 2026 12:42:34 -0600 Message-Id: <20261023-submit-sun6i-dma-lifetime-next-v1-v2-0-c9e07cc44bf8@gmail.com> X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAAAAAAAC/5WQy24CMQxFf2WUdVPl4TgJq/5HxSIPG1J1hnZmQ FSIf2+AblhWsmRdyT7Xvhex0NxoEZvhImY6taUdpi7MyyDKPk07kq12LYwyqJUxcjnmsa29Tdh kHZP8bExrG0lOdF7lSUtni9UuMATQonO+ZuJ2vnu8bx+6Qz6orDfw38RM38duvj7GRE4LyXIYu 9VmSMyOMHnPBWPyBaIygIAugqo6gDHVF7QPs7SWfb95M1S0MQB4BJ+Sqjkr5XLn1II5RSQEQ5w CPm8x+qI51FAjKQ2loFNs2HZMQDRgVbHZ+/y8FZwxwYfKQKUCdytfuNoembYuElJ2IWlicft/3 5b1MP/cIz/p+7v/SLeXkkqr4BgDlMhvuzG1z9celther9dfuW0aOdIBAAA= X-Change-ID: 20261022-submit-sun6i-dma-lifetime-next-v1-53c3158f4841 To: Vinod Koul , Frank Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Arnd Bergmann , Maxime Ripard , Jens Kuske , Jean-Francois Moine Cc: Hongling Zeng , Chengfeng Ye , Nguyen Minh Tien , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, James Hilliard , stable@vger.kernel.org, Frank Li , Sashiko X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-1.19 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns]; FROM_HAS_DN(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; RCPT_COUNT_TWELVE(0.00)[20]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; FREEMAIL_CC(0.00)[kylinos.cn,connect.ust.hk,embeddedlinux.blog,vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com,nxp.com,kernel.org]; TAGGED_RCPT(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[jameshilliard1@gmail.com,linux-sunxi@lists.linux.dev]; TAGGED_FROM(0.00)[bounces-26822-noreply=patchwork.local]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10:c]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,174.29.1.49:received]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; FREEMAIL_FROM(0.00)[gmail.com]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,gmail.com,sholland.org,arndb.de,free.fr]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 15B3B1C010E X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Correct interrupt routing and serialize physical-channel ownership across allocation, completion, pause and termination. Keep paused virtual channels off the allocator, drain completion callbacks before releasing resources, and associate cyclic state with the descriptor that owns it. The first patch carries Hongling Zeng's physical-channel indexing fix [0], adapted to the configurable interrupt-bank size introduced for A733. The second handles partially populated banks, including H3's twelve channels. The remaining patches establish the ownership locking, pause bookkeeping, callback retirement and per-descriptor cyclic state in that order. Based on DMAengine next at aff5e6a77fc6, which includes A733 support, with the posted IRQ-safe locking fix [1], channel pause-bit fix [2], and the virt-dma synchronization helper from [3] applied first. The synchronization patch uses that shared helper for the sun6i device_synchronize callback. [0] https://lore.kernel.org/r/20260706064123.66035-1-zenghongling@kylinos.cn [1] https://lore.kernel.org/r/20260926171049.841335-1-tien.nguyenminh@embeddedlinux.blog [2] https://lore.kernel.org/r/20261021-submit-sun6i-dma-pause-bit-v1-v1-1-38d286b69dab@gmail.com [3] https://lore.kernel.org/r/20261022-submit-mtk-uart-dma-synchronize-v1-v2-1-fdaef0e2edd6@gmail.com Assisted-by: Codex:gpt-6-astra Signed-off-by: James Hilliard --- Changes in v2: - Clear the active descriptor pointer before handing finite completion to virt-dma, replacing the completed-descriptor pointer. - Release completed physical channels while their virtual channels remain paused, and clear the hardware pause request before reassignment. - Keep the ownership changes in patch 3 and the pause policy in patch 4. - Link to v1: https://lore.kernel.org/r/20261022-submit-sun6i-dma-lifetime-next-v1-v1-0-01085f684c9f@gmail.com --- Hongling Zeng (1): dmaengine: sun6i: fix physical channel index in interrupt handler James Hilliard (5): dmaengine: sun6i: handle the last partial interrupt bank dmaengine: sun6i: serialize channel reassignment with interrupt handling dmaengine: sun6i: track paused virtual channels dmaengine: sun6i: synchronize callbacks before releasing channel resources dmaengine: sun6i: keep cyclic state with the prepared descriptor drivers/dma/sun6i-dma.c | 180 +++++++++++++++++++++++++++--------------------- 1 file changed, 103 insertions(+), 77 deletions(-) --- base-commit: aff5e6a77fc69a7c490246465940d18422d7c631 change-id: 20261022-submit-sun6i-dma-lifetime-next-v1-53c3158f4841 prerequisite-patch-id: d6398447647aa0dbb005b5e6dc6ba96e642efa86 prerequisite-patch-id: f67c1f8d8d9e014cc650f2f37648662430c3b77b prerequisite-patch-id: 8522878df4ecd4fb007cfd32611359e6eb58a1ef Best regards, -- James Hilliard