From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5A3435A3A0 for ; Wed, 1 Apr 2026 14:59:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775055577; cv=none; b=kHu6AGfnPfQ+crkidItwZDKOrLKBllXcqj4mw+umk/dtEmbEJPVTBBvjMMj5PuiTcdBXhi72z6tO3hOaaSGcOpkexU1UPVrRW7rfw4V9a21o7pFzTObUHBtr4tnSoJHLGqt2UGlLGZF7dVR9qnHKeMkbKQixvGi7r/54P/a8t2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775055577; c=relaxed/simple; bh=hM9KRS35rH2XHLASFtngACOiPbUjIYVi+in8ZuJP6lo=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=eYfgOOtYNS0GYYX9zs0cV1hosJ/cHkkRsRycIcpKeVomb9mDlKo9z7OCxScQt4p0MmpX8kZt/85rmn7Y/KQHZTS0DLBOInwh4t5xc8LRTCDD5jKsqD8lNUGmoBR2b/NMpcNG5kPCcP4etOkOtdND+Ef2dH/z9ccc1aFxDlPXErY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Q33tR8gA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Q33tR8gA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43FC0C19423; Wed, 1 Apr 2026 14:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775055577; bh=hM9KRS35rH2XHLASFtngACOiPbUjIYVi+in8ZuJP6lo=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=Q33tR8gA0cGdo6WTgPzN67IKzTAGpdeEwMgCJI36Qrb9LBrD1yjQsFIO7+X3/12D9 z40Z3RaE48ly6ukAmywZ+NYZZCGHHSs98QFR8SCOcwfDbzSYu0e6FMK6Rq2Nzocrf2 02SZ+l2+519moDvfH1OyUtIfWhYMv/L/PEgZcz/82ZdaAdTf0I92dp8c5etoC3VwlB j2z1ESSDiuNsc1stK8eU9ChEA2T1R7minOKZfWmeTVJG8I84cy+JtzaUQGTWC6hImv FVNCs+xjM/nQZsLdug2/9i3aSHrO7Bt1n2FTGaZffIx3FgzL6LSh75mfiEU0FaaChu o4QwuznxKjLoQ== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 4E3B0F40072; Wed, 1 Apr 2026 10:59:36 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Wed, 01 Apr 2026 10:59:36 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdefgedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrugcuuehi vghshhgvuhhvvghlfdcuoegrrhgusgeskhgvrhhnvghlrdhorhhgqeenucggtffrrghtth gvrhhnpedvueehiedtvedtleekuddutefgffdtleetfeetveejveejieehfefhjeeijeef udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh guodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduieejtdehtddtjeelqdef fedvudeigeduhedqrghruggspeepkhgvrhhnvghlrdhorhhgseifohhrkhhofhgrrhgurd gtohhmpdhnsggprhgtphhtthhopeelpdhmohguvgepshhmthhpohhuthdprhgtphhtthho pehlvghithgrohesuggvsghirghnrdhorhhgpdhrtghpthhtohepuhhsrghmrggrrhhifh eigedvsehgmhgrihhlrdgtohhmpdhrtghpthhtoheprghruggsodhgihhtsehgohhoghhl vgdrtghomhdprhgtphhtthhopehgohhurhhrhiesghhouhhrrhihrdhnvghtpdhrtghpth htohepjhhirhhishhlrggshieskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepgiekiees khgvrhhnvghlrdhorhhgpdhrtghpthhtohepugihohhunhhgsehrvgguhhgrthdrtghomh dprhgtphhtthhopehlihhnuhigqdgvfhhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhr tghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: ice86485a:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 2BCFB700065; Wed, 1 Apr 2026 10:59:36 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: A63xBQArpFko Date: Wed, 01 Apr 2026 16:59:15 +0200 From: "Ard Biesheuvel" To: "Breno Leitao" , "Ard Biesheuvel" Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, "Dave Young" , "Gregory Price" , "Usama Arif" , "Jiri Slaby" Message-Id: In-Reply-To: References: <20260401122351.2058145-7-ardb+git@google.com> <20260401122351.2058145-9-ardb+git@google.com> Subject: Re: [PATCH v2 2/5] x86/efi: Gather initial memory reservation and table handling logic Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, 1 Apr 2026, at 16:49, Breno Leitao wrote: > On Wed, Apr 01, 2026 at 02:23:54PM +0200, Ard Biesheuvel wrote: >> From: Ard Biesheuvel >> >> Move the back-to-back calls to various EFI routines related to >> processing of firmware tables and reserving the associated memory >> into a helper function. This is tidier, and will avoid the need to >> add yet another function call there in a subsequent patch. >> >> Reviewed-by: Gregory Price >> Signed-off-by: Ard Biesheuvel > > Reviewed-by: Breno Leitao > Thanks >> +void efi_init_reservations(void); > > Do you neeed __init here, as the declaration below? I know that > "extern" is not necessary, but isn't __init? > No, it's not. Initness is a property of the definition not the declaration. It decides which ELF section the code is emitted into, and a declaration does not produce any code. The section attribute is permitted on declarations by most compilers, and I can see how it may be informative, but it can also easily get out of sync so I prefer to omit it.