From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.12 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796408410; b=P7HEjcfVYTsBY4FHN73TL3bT3UEPFZ8HGPl3bquAt3t2r76AqutT+3NxN32ceimgsrGi 72of3ygQc1Eu8F+FUmtYszwPzqTGAR9nRmq8VIglex06a++CoUknXpPm0qPRk9LaFGkrZ A0JaV9SvJsr1qjvufZjc4lKsXP9ggzSTTJ92t8FNCYJIUUhHvHYRHaxRsPBJCRAP1htkF wb2mlWugGI09ZZQKCz3WPd5b8yHU3VAFcklbIoSUDnZ4AUZmsMQdMhYjEjPPUKA/vC2/k OebSVpWgy6CjyJJV45KLJ0pT2W8X+lvXic+Jh7FiQM+gNicoxqgyyipKxV8Mp089EXw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796408410; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:Organization; bh=3CiJNyisqRFg9h86YrW0krGcB+qiL9Yywwk+5saikk8=; b=0R+tMgmySiJ93940PYs/UsVubTNTLUXRgHZOLW959/GoGIde1JS/ozs25+M8IZmsoUdB b1S/+nhvPfaJ920FUKcvmM9ZFbtpvaPHff8shFfkQ8kCUENJzkM2WxFHRBRAp6uVfR3DK +X9mSy0TMX8Cxes1qOvP0XxdJK4CAg6UhXxEwN+H6toD8hxdfXpI6QqXGBjoSwGvOxMp4 Qp5McmXINYCiG3+2/vleJ04a6tzPvr+gCkfeNT/xvPh9RZxfARgtnPk//2OivfE8vT9/j +W5pDDMR+Hmn6xQOA5y0sXu2O8aqqodftLED+nIJURXXlbdnz7R8mOu+ExCb6nAeZ+g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Ukc2kNQK; arc=none smtp.remote-ip=198.175.65.12 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27414606A32C; Fri, 4 Dec 2026 18:20:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 27414606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Ukc2kNQK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796408409; x=1827944409; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3CiJNyisqRFg9h86YrW0krGcB+qiL9Yywwk+5saikk8=; b=Ukc2kNQKw82qzxpOpFExMTYd1/7SYe3ggfr9urHmTZxFiRObY0ZKmNM9 PxtHerlkTH5ungJjRNY1fi8ozy5VUaQzVWrg9XuEbRez3g8YhYq4olKQJ KqU183Uil1nzjYoHM2or+DuB1h5zAwOS6THhKjZpafz9uuCOl3FQ2AQMY vaiHpB985hAAFLxvvLhT3OdaNLIxDCg6aBbmTCr5VKyT0n69E1/KJKQ1T vKe5cdDQph9mqVEgTiz10crGsy9B73+vJIsgdcZSE5/yevxEK/Qo+49ph dNg7aA3JtKwTJbOHphr/sZKo1jRiFi5m4aJkTTB04S5RW0fhpTI3DnnWT w==; X-CSE-ConnectionGUID: 8Veko91iSkeD2aShddbH/A== X-CSE-MsgGUID: JcrMC77tTdqLtNi73C2gIw== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5320863" X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="5320863" 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-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: <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 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