From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v5 2/8] ACPI: add config for BIOS table scan Date: Mon, 25 Jan 2016 07:42:01 -0700 Message-ID: <56A6424902000078000CAAF4@prv-mh.provo.novell.com> References: <1453536020-16196-1-git-send-email-zhaoshenglong@huawei.com> <1453536020-16196-3-git-send-email-zhaoshenglong@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jonathan Creekmore , Shannon Zhao Cc: ian.campbell@citrix.com, peter.huangpeng@huawei.com, xen-devel@lists.xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, shannon.zhao@linaro.org List-Id: xen-devel@lists.xenproject.org >>> On 23.01.16 at 18:25, wrote: > Shannon Zhao writes: >> --- a/xen/arch/x86/Kconfig >> +++ b/xen/arch/x86/Kconfig >> @@ -5,6 +5,7 @@ config X86 >> def_bool y >> select COMPAT >> select HAS_ACPI >> + select ACPI_LEGACY_TABLES_LOOKUP if HAS_ACPI > > Since HAS_ACPI is selected right above this, it seems pointless to do > the if HAS_ACPI here. Just select ACPI_LEGACY_TABLES_LOOKUP. Or, see below. Indeed. But also beware of the alphabetical sorting here. >> --- a/xen/drivers/acpi/Kconfig >> +++ b/xen/drivers/acpi/Kconfig >> @@ -2,3 +2,6 @@ >> # Select HAS_ACPI if ACPI is supported >> config HAS_ACPI >> bool >> + >> +config ACPI_LEGACY_TABLES_LOOKUP >> + bool > > Or, better, default the value of ACPI_LEGACY_TABLES_LOOKUP based on > HAS_ACPI. That way, you only select HAS_ACPI to default this to on and, > if another platform besides X86 ever enabled HAS_ACPI, it would turn on > this option without you having to select it as well. If you're thinking of "def_bool HAS_ACPI", then no, please don't: This needlessly adds "# CONFIG_ACPI_LEGACY_TABLES_LOOKUP is not set" to .config, which while only a cosmetic problem here in the general case preventsprompts to show up once an option obtains a prompt. And I'd like to avoid setting bad precedents. >> diff --git a/xen/drivers/acpi/osl.c b/xen/drivers/acpi/osl.c >> index ce15470..a2fc8c4 100644 >> --- a/xen/drivers/acpi/osl.c >> +++ b/xen/drivers/acpi/osl.c >> @@ -75,12 +75,14 @@ acpi_physical_address __init acpi_os_get_root_pointer(void) >> "System description tables not found\n"); >> return 0; >> } >> - } else { >> + } else if (IS_ENABLED(CONFIG_ACPI_LEGACY_TABLES_LOOKUP)) { > > I would use an #ifdef CONFIG_ACPI_LEGACY_TABLES_LOOKUP instead of using > the kconfig.h IS_ENABLED macro to keep from pulling that file in. I don't think I objected to this part (and in fact I agree with Andrew that the non-preprocessor variant, where it can be used without breaking the build, is preferable). Iirc what I objected to was that you didn't use Kconfig. Jan