From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.127.92 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796215035; b=LppQXGagUfGGUq52Hidnt85/sg9AheyJlOUSqPWw9ySrZpplvxE7pA6EAN8etS8cypD/ ADXPo5e2vY9s5fRW9WuaA/jmzsdKpLo/bVmC9qOQoc9q6faFc/2IRAq2xk0FhgpHErrHX 7wzn2YevGT+TbRhHjpds3HhHnnO5KB/Hwz/UA27DS26LUpXoLDM79OejwEoOl1Po7sN6D AA/lZIhCrun+iywPaC9LeQqXvssPqxuTdy4JF0auTwGMIThp2cUHs90kXdLw+h8cOnl65 eZ4oQu/R+6/eDNFHEUtynbpC86qMJVrOGvjGTf2VruxdV3++LmDaOdH0P9wG3SGR1yg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796215035; h=DMARC-Filter:Received:Received:X-MS-Exchange-Authentication-Results: Received-SPF:Received:Received:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To: X-EOPAttributedMessage:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=JFzvcu2dB6sHYCCUgXzrBOHu7MK/EvxBHloOea6C/hw=; b=KWMiVkZqOJ74R+38hWFtt0dGKCYYu5h1I6zVb5kid99+xAxX1AAyWJKFZss20HH4cAEY ZSrSMwSveXPBBnG1F6X0V2L+axBogUZB2XJZISMM9So5Zzmd6/W0iv4ZL70RzKgKql4m1 iVzDG1Qixw65A0Sbu/NoHmevAicAtrSdX/XYGFq5eKSyWe03ug7/rLeCWeg5tjSil++Dt vFaPCa/ufiSFLogZnwgS2Sd0ujlxjLaJr5GCVWg/p492Wvgc9aUauS9X2o9ysei9fC9Kj VAQPK9je13JBcJ+EX3BEoa5MtxrPEJW6AuVu8MhkPioD3JM1ZMtW3QXHkj/vnsnsoPA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=cixtech.com; spf=pass smtp.mailfrom=cixtech.com; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.127.92 Received: from TYDPR03CU002.outbound.protection.outlook.com (mail-japaneastazon11023092.outbound.protection.outlook.com [52.101.127.92]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EAA4606A322; Wed, 2 Dec 2026 12:37:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0EAA4606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=cixtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cixtech.com 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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