From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C469C77B6C for ; Wed, 5 Apr 2023 15:30:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238601AbjDEPal (ORCPT ); Wed, 5 Apr 2023 11:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238409AbjDEPae (ORCPT ); Wed, 5 Apr 2023 11:30:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8F0A171C; Wed, 5 Apr 2023 08:30:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2E16062683; Wed, 5 Apr 2023 15:30:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10492C433EF; Wed, 5 Apr 2023 15:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680708629; bh=J70rkXpf+7f+HnbEFbLXATI7qyexO1zYvkS1Bdg/1F0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DDDWSOhT3kzc6lyxKUkTZFHCre0Ns6mUD+tB0tYkihTyztKFBxFtlqLJgNlqV6gDJ qOMn9cGcV2+X0j6MlVJ03OOlDG+iLFwczbgBMjKBnYXU3Uv1i+fKRu6DmyI+/Yxz9s 8RIYINIVbaW5Ng69aX9lf+qB9UGL5ceLrxTFZhunq9mNHirMxY/K/QuA+f80rD0wKb JMvvvuIlG960ADqVTyftwbW3/yYOaQoBWamDuRiajNw4GVkTWzvDKE916QV5M6/Vyx dSj2MT9L0akAXnsn064NQlVRrb7cTPo9nsPXGcn+gKTkQqpKLw8UxruRkitnwP1EFN 7rgx5JkERclEQ== Date: Wed, 5 Apr 2023 16:30:21 +0100 From: Conor Dooley To: Sunil V L Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-crypto@vger.kernel.org, platform-driver-x86@vger.kernel.org, llvm@lists.linux.dev, "Rafael J . Wysocki" , "Rafael J . Wysocki" , Tom Rix , Conor Dooley , Weili Qian , Herbert Xu , Jonathan Corbet , Marc Zyngier , Daniel Lezcano , Andrew Jones , Albert Ou , Mark Gross , Hans de Goede , Paul Walmsley , Thomas Gleixner , Nathan Chancellor , Nick Desaulniers , Zhou Wang , Palmer Dabbelt , Len Brown , Maximilian Luz , "David S . Miller" Subject: Re: [PATCH V4 19/23] RISC-V: Add ACPI initialization in setup_arch() Message-ID: <20230405-exclusion-swivel-b350fe541ba2@spud> References: <20230404182037.863533-1-sunilvl@ventanamicro.com> <20230404182037.863533-20-sunilvl@ventanamicro.com> <20230404-escalator-fridge-daf9aaffad12@spud> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GEzl862YP+iNbgsb" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org --GEzl862YP+iNbgsb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 05, 2023 at 08:41:54PM +0530, Sunil V L wrote: > On Tue, Apr 04, 2023 at 10:38:56PM +0100, Conor Dooley wrote: > > On Tue, Apr 04, 2023 at 11:50:33PM +0530, Sunil V L wrote: > > > Initialize the ACPI core for RISC-V during boot. > > >=20 > > > ACPI tables and interpreter are initialized based on > > > the information passed from the firmware and the value of > > > the kernel parameter 'acpi'. > > >=20 > > > With ACPI support added for RISC-V, the kernel parameter 'acpi' > > > is also supported on RISC-V. Hence, update the documentation. > > >=20 > > > Signed-off-by: Sunil V L > > > Acked-by: Rafael J. Wysocki > > > Reviewed-by: Andrew Jones > > > Acked-by: Conor Dooley > >=20 > > > + /* Parse the ACPI tables for possible boot-time configuration */ > > > + acpi_boot_table_init(); > > > + if (acpi_disabled) { > > > + if (IS_ENABLED(CONFIG_BUILTIN_DTB)) { > > > + unflatten_and_copy_device_tree(); > > > + } else { > > > + if (early_init_dt_verify(__va(XIP_FIXUP(dtb_early_pa)))) > > > + unflatten_device_tree(); > > > + else > > > + pr_err("No DTB found in kernel mappings\n"); > > > + } > > > + } else { > > > + early_init_dt_verify(__va(XIP_FIXUP(dtb_early_pa))); > >=20 > > I'm probably forgetting something, but this seems very non-obvious to > > me: > > Why are you running early_init_dt_verify() when ACPI is enabled? > > I think that one deserves a comment so that next time someone looks at > > this (that doesn't live in ACPI land) they've know exactly why this is > > like it is. > >=20 > > Doubly so since this is likely to change with some of Alex's bits moving > > the dtb back into the fixmap. > >=20 > Good question. The kernel creates a tiny DTB even when the FW didn't > pass the FDT (ACPI systems). Please see update_fdt(). Can you add a comment about this either on-location or in the commit message please? I think this counts as non-obvious behaviour. At least to me it does! Cheers, Conor. --GEzl862YP+iNbgsb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZC2UDQAKCRB4tDGHoIJi 0kR4AP0Q5hwJRNOPqj+g2K45l6UmniFmC4M8n4KXYsXGPCyozAEAm42AMmnUhTsZ Hnl2sWV10azclkpiXjVwwJJY0TUWNws= =6Cjf -----END PGP SIGNATURE----- --GEzl862YP+iNbgsb--