From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EF39606A32C for ; Wed, 2 Dec 2026 12:37:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=HajePgpM DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=JFzvcu2dB6sHYCCUgXzrBOHu7MK/EvxBHloOea6C/hw=; b=HajePgpMr50/Cq1CKHVGA/XUb7 AZ04O54L8e6yUF7y4YJRXZNNdGahbo/vtUobgBvrnr1uaBNCUTs0UBG4WIvMutx7zrUt4TD3COHkB 50O31p/oQyuEXozZ8us6CutSJEWLrmTYX7APtk/A3ztlFYgppxAa4bfQB7lF/8fTX+zE2uu+JPhio ECCP5Y5O4WZepz2eH34uBkjSYqeuyG4PPVQWd9tHjCyJdVvLNRysRS1MmQNqflXVTIWhSbdZLoPFz /NbskWXDwVJVYI+QBqaAOKjh7eIylJwAFe+F9ahRq2ZAJ0ei9i/88JIxjiHG+UKru6BkvUcOP/5VF ha9mEyZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYjaN-0000000BUl4-3nQ3; Wed, 02 Dec 2026 12:37:23 +0000 Received: from mail-japanwestazon11022115.outbound.protection.outlook.com ([40.107.75.115] helo=OS8PR02CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYjaJ-0000000BUjq-3XPV for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2026 12:37:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X4MGFAFTEJUg6o5kjaVPAppZDqRKesQsMNKFO5zTB5KQX/SUBwXA6uv1kWwla3/Ju3X+9FBZD3eU4f0R8HJN4o3MefHDq+vFo6in0fnr0rwOy/HRjzCQ1g3NjY2HqyUy8/G5NDyGFdgdwnGCUYFjWjLYrYSemVQtJ3O9yD4J9GwnmO4hRz8TN+qcAOa2isJKCcwN/yk74JPKpDxdLvbUf80BYlhW7VQnUqOz+COsh+I0ZFcq6IJ/gfNokizEgEwSrNA8b+NAS+wQek0ak8gefBUazW5icbNZVDfUBfDVCJTZHlfO9fvkkXsdY+vYKtz9jgQyee6TXaenIpKbFOuAgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JFzvcu2dB6sHYCCUgXzrBOHu7MK/EvxBHloOea6C/hw=; b=xREOUqkHZTS4BoMDsfEZWp42W3e/8GbmTaeczNkCG3a6g8tVE6T+AbpMhCGQtyUYN/R8S9jyDHGKeHuxy9Rm8X4F7hu31lhYYqA1O/T7kIhvagH/nZ3egyN2LD+RhKFEAjyFHK9o2J/T2GYMXb424aIXa0naKVeUngfA70hZZ26KihZcW/uMI4j+YHzaRZlWziU7msXByq9XCpWB24nWEty0FfVdmmu5OK+F3VcgDjlVJDHkyimNrAcE2YPnQ1yO0oA0MDlXbeOp89CPWjYsQzMDEcpdUI+GEXM7oii924JZz4rdkyFG89v8XW3k/XYMiREm2jxjHZHA1oSL10806g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 222.71.101.198) smtp.rcpttodomain=arm.com smtp.mailfrom=cixtech.com; dmarc=bestguesspass action=none header.from=cixtech.com; dkim=none (message not signed); arc=none (0) Received: from PSBPR02CA0015.apcprd02.prod.outlook.com (2603:1096:301::25) by TYZPR06MB5842.apcprd06.prod.outlook.com (2603:1096:400:28f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Wed, 2 Dec 2026 12:37:09 +0000 Received: from TY2PEPF0000AB88.apcprd03.prod.outlook.com (2603:1096:301:0:cafe::86) by PSBPR02CA0015.outlook.office365.com (2603:1096:301::25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.10 via Frontend Transport; Wed, 2 Dec 2026 12:37:09 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 222.71.101.198) smtp.mailfrom=cixtech.com; dkim=none (message not signed) header.d=none;dmarc=bestguesspass action=none header.from=cixtech.com; Received-SPF: Pass (protection.outlook.com: domain of cixtech.com designates 222.71.101.198 as permitted sender) receiver=protection.outlook.com; client-ip=222.71.101.198; helo=smtprelay.cixcomputing.com; pr=C Received: from smtprelay.cixcomputing.com (222.71.101.198) by TY2PEPF0000AB88.mail.protection.outlook.com (10.167.253.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Wed, 2 Dec 2026 12:37:08 +0000 Received: from ubuntu (unknown [172.20.64.99]) by smtprelay.cixcomputing.com (Postfix) with ESMTPSA id 915AA427EFDD; Wed, 2 Dec 2026 20:37:06 +0800 (CST) Date: Wed, 2 Dec 2026 20:37:05 +0800 From: Jelly Jia To: Thomas Gleixner Cc: vkoul@kernel.org, Frank.Li@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, robin.murphy@arm.com, sboyd@kernel.org, bmasney+clk@redhat.com, jbrunet+clk@baylibre.com, devicetree@vger.kernel.org, cix-kernel-upstream@cixtech.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, joakim.zhang@cixtech.com, radu@rendec.net Subject: Re: [PATCH v5 2/6] irqchip: Add the Sky1 AUDSS auxiliary interrupt controller Message-ID: References: <20261120053529.371923-1-Jelly.Jia@cixtech.com> <20261120053529.371923-3-Jelly.Jia@cixtech.com> <87ecc0q2im.ffs@fw13> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ecc0q2im.ffs@fw13> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY2PEPF0000AB88:EE_|TYZPR06MB5842:EE_ X-MS-Office365-Filtering-Correlation-Id: 9008d256-d64b-47e1-1e7e-08df5070fb32 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|82310400026|36860700016|23010399003|1800799024|4143699003|261009223027099003|18002099003|22082099003|56012099006|261026121527099003|261026140227099003|261028144727099003|261022105027099003|261022075727099003|10067099003; X-Microsoft-Antispam-Message-Info: kZPjhsYLPx/PVV99LrZPReO105itwyvP7/Xh3Sa6TmOlxPWEGqHM033wmY3KkoHBEsNnxZz88b1SZSK6SfNxHcHd8Y5pwhB1ubjMo4MKJQfkwHiEfhqvuUsiyh9CzZiI+Wy0ZvGaaNEkNP6s419c7NnPvkW9BGz7kFDe7pLhYsHjgZBDg11pescK11mcrlhWj7dddfkuI3KLjx/P0dq+ORzpmKlfE0pmL04YtyarGAKZYWydRcGNsiyqKpa4rV+hXkAuEPNd6srPJwgWFp9rF+vMe1YsoEGa5TGgUIFTZ4kp6ugFV9V8ZHNimsfK8AshwlAsayM9S3A689B1aXbute9lzDOXZ1j9nc7fhmwkOAUthrD5d1qLTHfG7M4W9urt5mXI5Fs/0EIV1KlcsA3elylQA+2ISnaF1prV/WuQmPF+I9HozcANLaLq3dIQ8ZtoTVf9bHwqdKdph41wfmyO/gKNr6Cpm2joxA5ea0eurkoVoGaj33HPtFuRMNJt9ljQS+wJkeCAfOwbdXv23eiMe2g3R7+Ge5THLS8y25a0NCZqs43sO87l0kh+CL7pKejjGPRWNzPagVCr2l/BaC48uLPN8DcX1+TmtwINuQicFD+Wo3K+ZplSLC6r2QF16VlP3cUqpraAsHhPTrJxckW0JnR8prUrqd9VL5N6toETvWwdb9Ob6kcUhPZCVwabckx9tUwueo3weNII9cZO5G/HYA== X-Forefront-Antispam-Report: CIP:222.71.101.198;CTRY:CN;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:smtprelay.cixcomputing.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(7416014)(376014)(82310400026)(36860700016)(23010399003)(1800799024)(4143699003)(261009223027099003)(18002099003)(22082099003)(56012099006)(261026121527099003)(261026140227099003)(261028144727099003)(261022105027099003)(261022075727099003)(10067099003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yE/zmrX3q0oIrYCeJyWy4TYhfWw3hA3sOwEOVonF4UE18qi085S3+BEyTnQRpIr6odMsprR4L8Lh9C3E/C5lQtAdV02egA3a2LhrRiv+kbtyWi46QE8rXG7QP/sMjxCKfHYqT/C9LF6iq0a6XpDrsnq9T/zjJDerRdHEsb81vJyZ+CenxMFepfp33JDJjdyy0NNx5tKGVgr9aIESM2b1AmssQxZNPu9BE67O5sjubujBgqRoP50yPuczwSZiyTQlD/k7QjrJsBtml+/DGFYnRXpPI7aSZ32OQGaCgDtr0WK0XnnLY8Nv2Z3Dl3vbYEcWPxWqrUxR1N8nK45aKHy6E/tPM6n1H3mOnvs+TiaKZKlD/Ilk3Oy5w+N2Apfck38KK0m0bp7thYXkbpsfGllgKYmcpfo1++av82IaCQYqind5/w0Ew5R8dDQdo6ZOOpiL X-OriginatorOrg: cixtech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2026 12:37:08.8596 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9008d256-d64b-47e1-1e7e-08df5070fb32 X-MS-Exchange-CrossTenant-Id: 0409f77a-e53d-4d23-943e-ccade7cb4811 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0409f77a-e53d-4d23-943e-ccade7cb4811;Ip=[222.71.101.198];Helo=[smtprelay.cixcomputing.com] X-MS-Exchange-CrossTenant-AuthSource: TY2PEPF0000AB88.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5842 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_043719_883684_7BD09BD8 X-CRM114-Status: GOOD ( 19.40 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi Thomas, > My comments on V4 still apply. Thanks for the review. Quoting the relevant parts of your v4 comments below: >> +#define INFO_AP_IRQC 0x54 >> +#define INFO_AP_IRQC_DMAC_MASK GENMASK(7, 0) >> +#define SKY1_AUDSS_DMAC_IRQS 8 >> + >> +struct sky1_audss_irq { >> + struct regmap *regmap; >> + struct irq_domain *domain; >> + int parent_irq; >> +}; > > Please use tabular layout for the defines and struct declaration. I'll align the defines and struct members as documented. >> + regmap_update_bits(priv->regmap, INFO_AP_IRQC, >> + BIT(d->hwirq), BIT(d->hwirq)); > > No line break requied you have 100 characters. I'll keep this call on one line. >> +static int sky1_audss_irq_request_resources(struct irq_data *d) >> +{ >> + return try_module_get(THIS_MODULE) ? 0 : -ENODEV; >> +} >> + >> +static void sky1_audss_irq_release_resources(struct irq_data *d) >> +{ >> + module_put(THIS_MODULE); >> +} > > What's the point of this exercise? These callbacks pin the IRQ driver module while a child IRQ is requested, preventing the provider from being unloaded while a DMA consumer still owns an IRQ. Runtime PM references do not pin the module. This follows the same pattern as irq-pruss-intc.c. >> + /* >> + * There is no per-channel pending status in the CRU. Poll enabled >> + * children without spurious-IRQ accounting, but retain level flow >> + * control so disabled and oneshot-threaded children stay masked. >> + */ >> + irq_set_status_flags(irq, IRQ_LEVEL | IRQ_IS_POLLED); > > Huch? The chained handler below ... > >> + if (!regmap_read(priv->regmap, INFO_AP_IRQC, &val)) { > > .. clearly reads the pending bits, no? INFO_AP_IRQC at offset 0x54 is an enable register, not a pending register. The hardware documentation defines bits 0-7 as read/write AP DMA channel interrupt enables, with a reset value of zero. We therefore dispatch all enabled channels and let each DMA handler check its actual status. IRQ_IS_POLLED avoids spurious-IRQ accounting for the expected IRQ_NONE returns. I'll clarify this in the comments. >> + /* The parent CRU may turn its clocks off after the child suspends. */ >> + disable_irq(priv->parent_irq); > > This operates on the interrupt which runs the chained handler, which > means disable_irq() is _not_ synchronizing against a handler in flight > on a different CPU because chained handlers do not set/clear INPROGRESS. > > Please explain how this is supposed to be correct under all circumstances. I understand that chained handlers do not set IRQD_IRQ_INPROGRESS. For Sky1, the parent is a non-forwarded GICv3 SPI, and the current code relies on the additional ACTIVE-state check in synchronize_irq(). IRQ_DISABLE_UNLAZY ensures that disable_irq() masks the parent. synchronize_irq() then checks IRQCHIP_STATE_ACTIVE through gic_irq_get_irqchip_state(). Deactivation happens in chained_irq_exit(), after all CRU accesses and child IRQ dispatches. In split EOI mode, the earlier EOIR write only drops priority, without deactivating the IRQ. My understanding is that this waits until the resource accesses have finished before suspend or teardown continues. This relies on GICv3's ACTIVE-state support. Is there a case in this path that I have overlooked? Best regards, Jelly