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 6EECD606A322 for ; Fri, 4 Dec 2026 19:29:05 +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=mTvlw2Rm; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=YN8zKQFf 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=vJvIalezEB0ojCM8EAKSJhJ/dhMm9bPFioILTHkZuHg=; b=mTvlw2Rm5Y+wJmabA7SE8Aanhc MbD7ss2NXqVBYLgTToM9cZvtnWc1aDDgJ12UpR/h8UW2cgX18Jsm0vIXO3NBKAowdCTO9B9pWx7AU sSFUWYPd6BvH1TEQHeaaogGnXNYNqNQ48i8Dmq1yHrbkTINO5szPf7ff7YvrsW6Ra3cYf8n5SY5Io fO0denVbpbAd9elifBVGTxuDWejBcjLrev9WdgaxdzKzkXO1Lv1IK1A0c2xqlhg7EY/aMDyjtrC4z tDrm9fFfWdb+8AJg1sF48bTqrmQ+GKJVw+t+Z66sAFnbNH35HvBAtXXov/nWh9ofa9uNFL6AazF1p +52D6cbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZXjl-0000000195R-1Ij9; Fri, 04 Dec 2026 18:10:25 +0000 Received: from mgamail.intel.com ([192.198.163.10]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZXjU-0000000194K-1tHY for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 18:10:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796407809; x=1827943809; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=vJvIalezEB0ojCM8EAKSJhJ/dhMm9bPFioILTHkZuHg=; b=YN8zKQFfyiLFBpdITjfj9bGgRDvTDwjerHQOm/kBfTc+ZspEjcQAssgk DUBg/YCgkydJuRYhAxLzkz7Vew6d+vN5M5XbNVP8ik2LASqGbb1hryS5q nj53IkZvqooyBVxB5YuFTmw8lx4Ieps3xk0/uB103EEuDDMSUpkTmGqab 0TfIsDPNPuEu6nFFOt4KARTzxZcdkkuDHJ+rtyLD+mrrfN6Tnl4+9msdv NhrFlzCEspZ4SK+/c8YMDiHSTXv8i6Hirdm5fnYJvd/id9x5k9Du8pMKc jRcvYn0Kx76zOLJVa/tc5ukFoTNGSXVjqFr/+YBvhmQNjHxZ2otFrw+Ws Q==; X-CSE-ConnectionGUID: o9XL6uheQqiRNerW5wiBOg== X-CSE-MsgGUID: +i9vebbiQJiRflHBaE3qWQ== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5282994" X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="5282994" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 10:10:08 -0800 X-CSE-ConnectionGUID: ZDh7khEfTMu//kfjRY8OJA== X-CSE-MsgGUID: ptkRERa9SA28nQKhpUGRPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="13959942" 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:10:03 -0800 Date: Fri, 4 Dec 2026 20:10:00 +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 2/9] ACPI: Introduce IRQ methods for static fwnodes Message-ID: References: <20261130-acpi-static-table-irq-probe-defer-v2-0-7e854fe7aecd@kernel.org> <20261130-acpi-static-table-irq-probe-defer-v2-2-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-2-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_101008_515501_FC9078B9 X-CRM114-Status: GOOD ( 19.56 ) X-Spam-Score: -4.3 (----) 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:34AM +0100, Lorenzo Pieralisi wrote: > To describe and map GSIs for firmware nodes created out of ACPI static > table entries in a uniform way later than at static tables parsing time, > it is required to store GSI data (number, trigger/polarity and name) in > the ACPI static fwnode for late retrieval. > > Define an ACPI static fwnode structure and add to it data that can store > GSI number/flag/names to describe GSIs and their trigger mode/polarity, > and implement irq_get()/property_read_string_array() callbacks for static > fwnodes so that core code can retrieve and map IRQs for ACPI static fwnodes > in standard manner. ... > +static int acpi_static_fwnode_read_string_array(const struct fwnode_handle *fwnode, > + const char *propname, > + const char **val, size_t nval) > +{ > + const struct acpi_static_fwnode *node = container_of(fwnode, > + struct acpi_static_fwnode, fwnode); I find the following style slightly better to follow const struct acpi_static_fwnode *node = container_of(fwnode, struct acpi_static_fwnode, fwnode); > + unsigned int i; > + if (strcmp(propname, "interrupt-names") || !node->irq_count || !node->irqs[0].name) > + return -EINVAL; Okay, so it's stricly limited to IRQs for now. > + if (!val) > + return node->irq_count; > + > + nval = min_t(size_t, nval, node->irq_count); Can we avoid _t variant of min() please? > + for (i = 0; i < nval; i++) for (size_t i = 0; i < nval; i++) > + val[i] = node->irqs[i].name; > + > + return nval; > +} ... > +struct acpi_static_irq { > + u32 gsi; > + u8 trigger; > + u8 polarity; > + const char *name; > +}; I see a big potential of reusing this data type elsewhere in the kernel. Can we have it somewhere in acpi.h or close enough and name like struct acpi_gsi? -- With Best Regards, Andy Shevchenko