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 09C42606A6BD for ; Fri, 4 Dec 2026 18:28:27 +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=Zs4nGfXH; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=Zex1JL+F; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eO9LYwaY 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=3CiJNyisqRFg9h86YrW0krGcB+qiL9Yywwk+5saikk8=; b=Zs4nGfXHdjBgldxABMddTJk2s7 G0TekaYEmDnVVXXa2YRBg0PHHChPn/TjF72Kx9chsvF2YgHXRJ4+n3N8GqT0+F3YgBvZCWS3wGfbw gI2iTFR8U8ituwgRZoYkzCoxDMaywbom+/jY8JUYFwIFgjLHxOiACnGKmDhZ/TbvWuZ+7XI5IXVDE YLQWWoDHS1HrliHLKxOGArH8qKTzhEJjPm4rigc7GV4gHqdQNDvOxpCbGzvkQhZCoe8GKS1TTcBf4 yaKBnB/41o7ALpjObFQEYuAv5dTfwawA5MUmsBQTlV5YZ8XtrVIplohMohzwQoGDCQjJGD4AItp2X I0DElsmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZXy8-00000001A9m-2lr7; Fri, 04 Dec 2026 18:25:16 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZXtG-000000019px-3y7z for linux-arm-kernel@bombadil.infradead.org; Fri, 04 Dec 2026 18:20:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3CiJNyisqRFg9h86YrW0krGcB+qiL9Yywwk+5saikk8=; b=Zex1JL+FnryQn/S7N2k9oYBk2U ctaN7iH/AdVSEvg4hNokP2i7DmphgWvQ5303kG0dTgAI1F/cgOre1p/z0z+UcccFIeFAzd+IEIWz4 2W7cHfczrWH7ptrFi6yalRwF+/6rN0H2YUUksmKf8hDCO0hXUA25bZIV6MEQdbbdWzrQ9YbM8vf20 aYDHxkdS8aJbVpXRoheyepilYvtcSkhoFCuIRn+dq6WrMWs6cNnt5Wg1pxqFZj03YYmnzrveSKsW8 KeXvJhN/2r/j6MAPx3oj17PDbgOdk19Pp+gAAJ/eSEa9CvQktpOwY2u/GMKL2sf6FVqtv1aTEsim+ C/G8FUAA==; Received: from mgamail.intel.com ([198.175.65.12]) by desiato.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZXtD-0000000EgJS-2W91 for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 18:20:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796408411; x=1827944411; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3CiJNyisqRFg9h86YrW0krGcB+qiL9Yywwk+5saikk8=; b=eO9LYwaYGPDoFY/hgF2lau0Zuao3Rl583Q/txd0yivqbzX7KdX1QL4v3 U+nSn2HYR8OLEALEg2ch3TVb4KrIc/XYXbBlxWmBgfxjKmkfNSxBeZybZ XqhI2sHCIEF/QEhJltpiQQZrpmtvtKNMCSAigg4C1rYBC88Qqo+FJyEZ3 GJGI/83hcipn5gVnqpbZgkCIsEv8mU2w9PVZkVn766WR2HLfItogPgrE/ 21wbkh4K7UM7UIPsyIfZCxkqTH6Uy9RSc59JfuiMcw1PgStVexzb0m5oq ekX8ssmsAF6wTOIIhWJwXXAmP8OfZjPQz7zu8frMgaQABBt9HG/hMmJfn g==; X-CSE-ConnectionGUID: LKWfcmbbQOiVHAnj9fz+iQ== X-CSE-MsgGUID: UstyQtYWR0SWjTgPYx4e+A== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5320868" X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="5320868" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 10:20:08 -0800 X-CSE-ConnectionGUID: 1RgKIpmnRVWA5nuZdA+r6Q== X-CSE-MsgGUID: o5qV5jMKQOmwR2Tyd2EkbQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="14137243" Received: from alekseim-mobl.ger.corp.intel.com (HELO localhost) ([10.245.245.10]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 10:20:04 -0800 Date: Fri, 4 Dec 2026 20:19:56 +0200 From: Andy Shevchenko To: Lorenzo Pieralisi Cc: "Rafael J. Wysocki" , Mark Rutland , Marc Zyngier , Daniel Lezcano , Thomas Gleixner , Greg Kroah-Hartman , Danilo Krummrich , Hanjun Guo , Sudeep Holla , Robin Murphy , Catalin Marinas , Will Deacon , Bartosz Golaszewski , Leo Yan , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, driver-core@lists.linux.dev Subject: Re: [PATCH RFC v2 0/9] ACPI: ARM64: Implement IRQ mapping probe deferral for static table devices Message-ID: References: <20261130-acpi-static-table-irq-probe-defer-v2-0-7e854fe7aecd@kernel.org> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261130-acpi-static-table-irq-probe-defer-v2-0-7e854fe7aecd@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261204_182012_060138_6B57928E X-CRM114-Status: GOOD ( 36.16 ) X-Spam-Score: -2.5 (--) 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=-4.3 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 On Mon, Nov 30, 2026 at 09:54:32AM +0100, Lorenzo Pieralisi wrote: > On ACPI ARM64 some platform devices (ie SMMUs, MPAM, MMIO MEM timer) are > created when the respective static ACPI table (GTDT, IORT, MPAM) entries > are parsed and the platform device resources, inclusive of their > IRQ number are stashed in the platform device resources to be used by > device drivers at probe time to retrieve the resource values. > > For IRQs, this works well as long as interrupt controller drivers > managing IRQs for those devices are probed before the code creating > the IRQ mapping out of static table GSI numbers is run, in that the > interrupt controller drivers create the IRQ domain that allow the actual > IRQ mappings. > > So far, that's always been the case on ACPI ARM64 systems given that > IRQs were routed to the GICv<5 interrupt controllers (wired and MSI) > and those controllers drivers probe earlier than any code creating > GSI mappings out of static ACPI table entries. > > With the advent of GICv5 - wired IRQs (former GICv3 SPIs) can be routed > to a GICv5 IWB; the IWB is modelled as a device and its IRQ domain > is created when the IWB driver probes - that might be later than > the device drivers for platform devices created out of static ACPI tables > probe, resulting in failures to map the IRQs because the IRQ domain is not > registered yet so the IRQ mapping cannot be resolved. > > This RFC series aims at solving this issue and should be used as > a starting point to build a solution and hopefully get some feedback. > > PATCH 4 is a fixlet, I included with the series since I noticed > while updating the arch MEM MMIO timer driver. > > Herein below, some technical details behind the patchset decisions > and questions to be addressed. > > ================ > Misc design info > ================ > > The main idea behind the patchset relies in augmenting the ACPI > static fwnode with a structure backing to stash GSI number, > trigger and polarity (and possibly its "name") so that the device drivers > can retrieve their values in a uniform manner when the device drivers > probe, the same way it is done on OF. > > I converted IORT table platform devices to provide an example of > what it looks like and check whether that's the right direction of travel. > > A question I have about this approach is that resources for a given > device are stored in separate data, struct resource for MMIO address > space and ACPI static fwnode for GSI data. > > I decided to handle the arch MMIO timer conversion differently as > a point solution. Converting the arch MMIO timer to ACPI static fwnodes > would require creating an ACPI static fwnode per-frame and would > complicate things for not much. Instead, I just stash the GSI > number and properties in static data per frame (that exists already, > struct arch_timer_mem_frame) at GTDT parse time that can be > used by the driver later to map the GSI when the MMIO timer driver > probes. > > acpi_register_gsi() was augmented to return -EPROBE_DEFER to handle > a missing IRQ domain and therefore enabling probe deferral. > > The fwnode API was augmented as well so that device drivers can actually > retrieve IRQ numbers using standard platform device APIs: > > platform_get_irq*() > > when the fwnode itself is an ACPI static fwnode value. > > I tested this on a GICv5 FVP model by re-routing MMIO timer and SMMUv3 > IRQs to an IWB and checking that IRQ mappings and probe deferral work. > > Feedback more than welcome. It doesn't look awful in my opinion. But claiming them ACPI static nodes seems too premature. These are for IRQ so far, perhaps name them accordingly? -- With Best Regards, Andy Shevchenko