Message ID | 170066723324.2477261.2506149141979712937.stgit@djiang5-mobl3 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1411304vqb; Wed, 22 Nov 2023 07:37:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFHgxYV0s0yWJ2uEa03F1CZ6BuZ9+146bc7ASyQrrXD9RYKUaOs6bvLplxrtCIyjU4vL5Nn X-Received: by 2002:a17:90b:2245:b0:280:a464:e9d4 with SMTP id hk5-20020a17090b224500b00280a464e9d4mr2924202pjb.8.1700667461313; Wed, 22 Nov 2023 07:37:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700667461; cv=none; d=google.com; s=arc-20160816; b=iwR3Ql2rgjB1KxldNvyEkD0k6B7/wamHVH0VO/M8be82Jh3EyTvJqM5bd2hAKoEKY1 u2l/oD+7rF8By7UCZrEd6FmW0IN+lLAOks0m1YTDmakaTQrH4a1wpCE76llLBw+SsIkU aUo85P+K3lYHMjzCfTtoAP2V7P7HKc92VHkE96Oqlou3WsiviHUZ5/QqrppTLGv55xlq SPh4cVhYvLi+LmqlEIHE0Tw+sAWt5eQZuKZ7p+5WmQY12JFxGjL6VHBDeackbu/sAFKW H1M39NaQWGtwWWcy7hnGXZV2KO1Rdw+GjB0uodMnzgUzC9MR7+UjHko5JWrsc9eDoNna L3OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=tlRseLSdOSRwmCSOF4lWFn/U51xngp9R9fBt3hr7iFw=; fh=7Vyt6mm2N6z/OJQ1EdTd28kTnum7FM2FtSpSqy59wCg=; b=PaYqWNbpMb9By6ORucqdWExDvPaTblZLbQfhXDsQ2+PHmyagld17MY5q5xD1knMO72 NCyWuM9rQ+R8nSA+SbD1bsXlOeuPrdca7Q6OXFgx9Plsdfc1XMnECd5VSS2WnISkXptr JpDOmE9DLpmqrZOlUPBD9af7aosiktvCO2gpsfs2xH/rx/4IUgXVWDnPz/QCW16qSbAd b18wbHgKg9/KLej8p2u4ZM10WCCdCPKafoiA0zxjmF0U13lJOUIjf/HzBXdOczFo6q68 1x8k0dU5pwAMbyj/wXRq/thQ8pYp4wxWAnOXD7rwANnYSUEXGEiOSZl0VDBr7MTaDsq0 YdHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UwwmMxtg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id p8-20020a17090ab90800b00285105c440esi1672175pjr.120.2023.11.22.07.37.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 07:37:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UwwmMxtg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5518C825F16E; Wed, 22 Nov 2023 07:37:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344499AbjKVPfW (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Wed, 22 Nov 2023 10:35:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235293AbjKVPej (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Nov 2023 10:34:39 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A83F212D; Wed, 22 Nov 2023 07:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700667240; x=1732203240; h=subject:from:to:cc:date:message-id:mime-version: content-transfer-encoding; bh=7Y9Z3YK8/R4dJKnxWdN1ttjo2dFNQU8UOECE2bBDFfA=; b=UwwmMxtgNsBqK/pdtnyIz01Z9Y75YkgPapNxa2AQJCz8YTX9yo4ZrINX TNLoOSvC3wgGKR73ThLeWgTOoTbuw85HSsUsY4VRYLY2ONqjb++E3bqra IKN2sOrl3A6Yyhczjtz5ryWYkzWfq/QBOa44uXRdYChlETmdhxsyyeN5w 1zjA9xpBtiE/fSh4rGJSVMzOEjCnZlzn/M62iJMF6kxUY4RuvfCY/GQBs TfIZgMXGcsl3I4SX7R7LkYKp2Vwgo5wvZQ6H1EeRnPV1AcvVyIgDC88IX G8mYVngO2DsDrFo2JYuH7mDYBDt4YjyqMojUrsc9/5rZ/wZgvnPwKvzhF A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="377104703" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="377104703" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 07:33:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="770645824" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="770645824" Received: from tshtalsx-mobl.gar.corp.intel.com (HELO [192.168.1.177]) ([10.213.178.236]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 07:33:53 -0800 Subject: [PATCH v3] acpi: Fix ARM32 platforms compile issue introduced by fw_table changes From: Dave Jiang <dave.jiang@intel.com> To: linus.walleij@linaro.org, rafael@kernel.org Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, lenb@kernel.org, robert.moore@intel.com, Jonathan.Cameron@huawei.com, dan.j.williams@intel.com, guohanjun@huawei.com, arnd@arndb.de, linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, cfsworks@gmail.com Date: Wed, 22 Nov 2023 08:33:53 -0700 Message-ID: <170066723324.2477261.2506149141979712937.stgit@djiang5-mobl3> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 07:37:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783189812548936754 X-GMAIL-MSGID: 1783279084136319977 |
Series |
[v3] acpi: Fix ARM32 platforms compile issue introduced by fw_table changes
|
|
Commit Message
Dave Jiang
Nov. 22, 2023, 3:33 p.m. UTC
Linus reported that: After commit a103f46633fd the kernel stopped compiling for several ARM32 platforms that I am building with a bare metal compiler. Bare metal compilers (arm-none-eabi-) don't define __linux__. This is because the header <acpi/platform/acenv.h> is now in the include path for <linux/irq.h>: CC arch/arm/kernel/irq.o CC kernel/sysctl.o CC crypto/api.o In file included from ../include/acpi/acpi.h:22, from ../include/linux/fw_table.h:29, from ../include/linux/acpi.h:18, from ../include/linux/irqchip.h:14, from ../arch/arm/kernel/irq.c:25: ../include/acpi/platform/acenv.h:218:2: error: #error Unknown target environment 218 | #error Unknown target environment | ^~~~~ The issue is caused by the introducing of splitting out the ACPI code to support the new generic fw_table code. Rafael suggested [1] moving the fw_table.h include in linux/acpi.h to below the linux/mutex.h. Remove the two includes in fw_table.h. Replace linux/fw_table.h include in fw_table.c with linux/acpi.h. Link: https://lore.kernel.org/linux-acpi/CAJZ5v0idWdJq3JSqQWLG5q+b+b=zkEdWR55rGYEoxh7R6N8kFQ@mail.gmail.com/ Fixes: a103f46633fd ("acpi: Move common tables helper functions to common lib") Closes: https://lore.kernel.org/linux-acpi/20231114-arm-build-bug-v1-1-458745fe32a4@linaro.org/ Reported-by: Linus Walleij <linus.walleij@linaro.org> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Dave Jiang <dave.jiang@intel.com> --- v3: - Drop fw_table.h in fw_table.c since acpi.h already included. (Rafael) v2: - Remove linux/acpi.h include as well in fw_table.h. (Sam) --- include/linux/acpi.h | 22 +++++++++++----------- include/linux/fw_table.h | 3 --- lib/fw_table.c | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-)
Comments
On Wed, Nov 22, 2023 at 4:34 PM Dave Jiang <dave.jiang@intel.com> wrote: > > Linus reported that: > After commit a103f46633fd the kernel stopped compiling for > several ARM32 platforms that I am building with a bare metal > compiler. Bare metal compilers (arm-none-eabi-) don't > define __linux__. > > This is because the header <acpi/platform/acenv.h> is now > in the include path for <linux/irq.h>: > > CC arch/arm/kernel/irq.o > CC kernel/sysctl.o > CC crypto/api.o > In file included from ../include/acpi/acpi.h:22, > from ../include/linux/fw_table.h:29, > from ../include/linux/acpi.h:18, > from ../include/linux/irqchip.h:14, > from ../arch/arm/kernel/irq.c:25: > ../include/acpi/platform/acenv.h:218:2: error: #error Unknown target environment > 218 | #error Unknown target environment > | ^~~~~ > > The issue is caused by the introducing of splitting out the ACPI code to > support the new generic fw_table code. > > Rafael suggested [1] moving the fw_table.h include in linux/acpi.h to below > the linux/mutex.h. Remove the two includes in fw_table.h. Replace > linux/fw_table.h include in fw_table.c with linux/acpi.h. > > Link: https://lore.kernel.org/linux-acpi/CAJZ5v0idWdJq3JSqQWLG5q+b+b=zkEdWR55rGYEoxh7R6N8kFQ@mail.gmail.com/ > Fixes: a103f46633fd ("acpi: Move common tables helper functions to common lib") > Closes: https://lore.kernel.org/linux-acpi/20231114-arm-build-bug-v1-1-458745fe32a4@linaro.org/ > Reported-by: Linus Walleij <linus.walleij@linaro.org> > Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > Tested-by: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Dave Jiang <dave.jiang@intel.com> > --- > v3: > - Drop fw_table.h in fw_table.c since acpi.h already included. (Rafael) Do you want me to apply this, or do you prefer to route it in a different way? In the latter case, please feel free to add Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> to it. > v2: > - Remove linux/acpi.h include as well in fw_table.h. (Sam) > --- > include/linux/acpi.h | 22 +++++++++++----------- > include/linux/fw_table.h | 3 --- > lib/fw_table.c | 2 +- > 3 files changed, 12 insertions(+), 15 deletions(-) > > diff --git a/include/linux/acpi.h b/include/linux/acpi.h > index 54189e0e5f41..4db54e928b36 100644 > --- a/include/linux/acpi.h > +++ b/include/linux/acpi.h > @@ -15,7 +15,6 @@ > #include <linux/mod_devicetable.h> > #include <linux/property.h> > #include <linux/uuid.h> > -#include <linux/fw_table.h> > > struct irq_domain; > struct irq_domain_ops; > @@ -25,22 +24,13 @@ struct irq_domain_ops; > #endif > #include <acpi/acpi.h> > > -#ifdef CONFIG_ACPI_TABLE_LIB > -#define EXPORT_SYMBOL_ACPI_LIB(x) EXPORT_SYMBOL_NS_GPL(x, ACPI) > -#define __init_or_acpilib > -#define __initdata_or_acpilib > -#else > -#define EXPORT_SYMBOL_ACPI_LIB(x) > -#define __init_or_acpilib __init > -#define __initdata_or_acpilib __initdata > -#endif > - > #ifdef CONFIG_ACPI > > #include <linux/list.h> > #include <linux/dynamic_debug.h> > #include <linux/module.h> > #include <linux/mutex.h> > +#include <linux/fw_table.h> > > #include <acpi/acpi_bus.h> > #include <acpi/acpi_drivers.h> > @@ -48,6 +38,16 @@ struct irq_domain_ops; > #include <acpi/acpi_io.h> > #include <asm/acpi.h> > > +#ifdef CONFIG_ACPI_TABLE_LIB > +#define EXPORT_SYMBOL_ACPI_LIB(x) EXPORT_SYMBOL_NS_GPL(x, ACPI) > +#define __init_or_acpilib > +#define __initdata_or_acpilib > +#else > +#define EXPORT_SYMBOL_ACPI_LIB(x) > +#define __init_or_acpilib __init > +#define __initdata_or_acpilib __initdata > +#endif > + > static inline acpi_handle acpi_device_handle(struct acpi_device *adev) > { > return adev ? adev->handle : NULL; > diff --git a/include/linux/fw_table.h b/include/linux/fw_table.h > index ff8fa58d5818..ca49947f0a77 100644 > --- a/include/linux/fw_table.h > +++ b/include/linux/fw_table.h > @@ -25,9 +25,6 @@ struct acpi_subtable_proc { > int count; > }; > > -#include <linux/acpi.h> > -#include <acpi/acpi.h> > - > union acpi_subtable_headers { > struct acpi_subtable_header common; > struct acpi_hmat_structure hmat; > diff --git a/lib/fw_table.c b/lib/fw_table.c > index b51f30a28e47..294df54e33b6 100644 > --- a/lib/fw_table.c > +++ b/lib/fw_table.c > @@ -7,7 +7,7 @@ > * Copyright (C) 2023 Intel Corp. > */ > #include <linux/errno.h> > -#include <linux/fw_table.h> > +#include <linux/acpi.h> > #include <linux/init.h> > #include <linux/kernel.h> > #include <linux/string.h> > > >
On 11/22/23 08:37, Rafael J. Wysocki wrote: > On Wed, Nov 22, 2023 at 4:34 PM Dave Jiang <dave.jiang@intel.com> wrote: >> >> Linus reported that: >> After commit a103f46633fd the kernel stopped compiling for >> several ARM32 platforms that I am building with a bare metal >> compiler. Bare metal compilers (arm-none-eabi-) don't >> define __linux__. >> >> This is because the header <acpi/platform/acenv.h> is now >> in the include path for <linux/irq.h>: >> >> CC arch/arm/kernel/irq.o >> CC kernel/sysctl.o >> CC crypto/api.o >> In file included from ../include/acpi/acpi.h:22, >> from ../include/linux/fw_table.h:29, >> from ../include/linux/acpi.h:18, >> from ../include/linux/irqchip.h:14, >> from ../arch/arm/kernel/irq.c:25: >> ../include/acpi/platform/acenv.h:218:2: error: #error Unknown target environment >> 218 | #error Unknown target environment >> | ^~~~~ >> >> The issue is caused by the introducing of splitting out the ACPI code to >> support the new generic fw_table code. >> >> Rafael suggested [1] moving the fw_table.h include in linux/acpi.h to below >> the linux/mutex.h. Remove the two includes in fw_table.h. Replace >> linux/fw_table.h include in fw_table.c with linux/acpi.h. >> >> Link: https://lore.kernel.org/linux-acpi/CAJZ5v0idWdJq3JSqQWLG5q+b+b=zkEdWR55rGYEoxh7R6N8kFQ@mail.gmail.com/ >> Fixes: a103f46633fd ("acpi: Move common tables helper functions to common lib") >> Closes: https://lore.kernel.org/linux-acpi/20231114-arm-build-bug-v1-1-458745fe32a4@linaro.org/ >> Reported-by: Linus Walleij <linus.walleij@linaro.org> >> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >> Tested-by: Linus Walleij <linus.walleij@linaro.org> >> Signed-off-by: Dave Jiang <dave.jiang@intel.com> >> --- >> v3: >> - Drop fw_table.h in fw_table.c since acpi.h already included. (Rafael) > > Do you want me to apply this, or do you prefer to route it in a different way? Please apply it. Thank you! > > In the latter case, please feel free to add > > Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > to it. > >> v2: >> - Remove linux/acpi.h include as well in fw_table.h. (Sam) >> --- >> include/linux/acpi.h | 22 +++++++++++----------- >> include/linux/fw_table.h | 3 --- >> lib/fw_table.c | 2 +- >> 3 files changed, 12 insertions(+), 15 deletions(-) >> >> diff --git a/include/linux/acpi.h b/include/linux/acpi.h >> index 54189e0e5f41..4db54e928b36 100644 >> --- a/include/linux/acpi.h >> +++ b/include/linux/acpi.h >> @@ -15,7 +15,6 @@ >> #include <linux/mod_devicetable.h> >> #include <linux/property.h> >> #include <linux/uuid.h> >> -#include <linux/fw_table.h> >> >> struct irq_domain; >> struct irq_domain_ops; >> @@ -25,22 +24,13 @@ struct irq_domain_ops; >> #endif >> #include <acpi/acpi.h> >> >> -#ifdef CONFIG_ACPI_TABLE_LIB >> -#define EXPORT_SYMBOL_ACPI_LIB(x) EXPORT_SYMBOL_NS_GPL(x, ACPI) >> -#define __init_or_acpilib >> -#define __initdata_or_acpilib >> -#else >> -#define EXPORT_SYMBOL_ACPI_LIB(x) >> -#define __init_or_acpilib __init >> -#define __initdata_or_acpilib __initdata >> -#endif >> - >> #ifdef CONFIG_ACPI >> >> #include <linux/list.h> >> #include <linux/dynamic_debug.h> >> #include <linux/module.h> >> #include <linux/mutex.h> >> +#include <linux/fw_table.h> >> >> #include <acpi/acpi_bus.h> >> #include <acpi/acpi_drivers.h> >> @@ -48,6 +38,16 @@ struct irq_domain_ops; >> #include <acpi/acpi_io.h> >> #include <asm/acpi.h> >> >> +#ifdef CONFIG_ACPI_TABLE_LIB >> +#define EXPORT_SYMBOL_ACPI_LIB(x) EXPORT_SYMBOL_NS_GPL(x, ACPI) >> +#define __init_or_acpilib >> +#define __initdata_or_acpilib >> +#else >> +#define EXPORT_SYMBOL_ACPI_LIB(x) >> +#define __init_or_acpilib __init >> +#define __initdata_or_acpilib __initdata >> +#endif >> + >> static inline acpi_handle acpi_device_handle(struct acpi_device *adev) >> { >> return adev ? adev->handle : NULL; >> diff --git a/include/linux/fw_table.h b/include/linux/fw_table.h >> index ff8fa58d5818..ca49947f0a77 100644 >> --- a/include/linux/fw_table.h >> +++ b/include/linux/fw_table.h >> @@ -25,9 +25,6 @@ struct acpi_subtable_proc { >> int count; >> }; >> >> -#include <linux/acpi.h> >> -#include <acpi/acpi.h> >> - >> union acpi_subtable_headers { >> struct acpi_subtable_header common; >> struct acpi_hmat_structure hmat; >> diff --git a/lib/fw_table.c b/lib/fw_table.c >> index b51f30a28e47..294df54e33b6 100644 >> --- a/lib/fw_table.c >> +++ b/lib/fw_table.c >> @@ -7,7 +7,7 @@ >> * Copyright (C) 2023 Intel Corp. >> */ >> #include <linux/errno.h> >> -#include <linux/fw_table.h> >> +#include <linux/acpi.h> >> #include <linux/init.h> >> #include <linux/kernel.h> >> #include <linux/string.h> >> >> >>
Dave Jiang wrote: > Linus reported that: > After commit a103f46633fd the kernel stopped compiling for > several ARM32 platforms that I am building with a bare metal > compiler. Bare metal compilers (arm-none-eabi-) don't > define __linux__. > > This is because the header <acpi/platform/acenv.h> is now > in the include path for <linux/irq.h>: > > CC arch/arm/kernel/irq.o > CC kernel/sysctl.o > CC crypto/api.o > In file included from ../include/acpi/acpi.h:22, > from ../include/linux/fw_table.h:29, > from ../include/linux/acpi.h:18, > from ../include/linux/irqchip.h:14, > from ../arch/arm/kernel/irq.c:25: > ../include/acpi/platform/acenv.h:218:2: error: #error Unknown target environment > 218 | #error Unknown target environment > | ^~~~~ > > The issue is caused by the introducing of splitting out the ACPI code to > support the new generic fw_table code. > > Rafael suggested [1] moving the fw_table.h include in linux/acpi.h to below > the linux/mutex.h. Remove the two includes in fw_table.h. Replace > linux/fw_table.h include in fw_table.c with linux/acpi.h. > > Link: https://lore.kernel.org/linux-acpi/CAJZ5v0idWdJq3JSqQWLG5q+b+b=zkEdWR55rGYEoxh7R6N8kFQ@mail.gmail.com/ > Fixes: a103f46633fd ("acpi: Move common tables helper functions to common lib") > Closes: https://lore.kernel.org/linux-acpi/20231114-arm-build-bug-v1-1-458745fe32a4@linaro.org/ > Reported-by: Linus Walleij <linus.walleij@linaro.org> > Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > Tested-by: Linus Walleij <linus.walleij@linaro.org> > Signed-off-by: Dave Jiang <dave.jiang@intel.com> Acked-by: Dan Williams <dan.j.williams@intel.com> It concerns me that neither linux-next nor 0day robot exposure reported this problem. Does ARM32 require manual compilation coverage these days or was this just a series of unfortunate events that the build bots missed this?
On Wed, Nov 22, 2023 at 10:32 PM Dan Williams <dan.j.williams@intel.com> wrote: > It concerns me that neither linux-next nor 0day robot exposure reported > this problem. > > Does ARM32 require manual compilation coverage these days or was this > just a series of unfortunate events that the build bots missed this? It's not just ARM32, I saw it on ARM64 as well and I'm pretty sure it appears on any bare metal "none" compiler. kernel.org host "nolibc" cross compilers (Arnd makes these): https://mirrors.edge.kernel.org/pub/tools/crosstool/ and those WORK, because they use the kernel minimal libc which defines __linux__. So a "nolibc" compiler works but not "none" compilers. I think the test robots all use Arnds nolibc compilers or the compilers from distributions so they don't see this. A typical example of breaking compilers: ARMs supported "none" compilers: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads Yours, Linus Walleij
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 54189e0e5f41..4db54e928b36 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -15,7 +15,6 @@ #include <linux/mod_devicetable.h> #include <linux/property.h> #include <linux/uuid.h> -#include <linux/fw_table.h> struct irq_domain; struct irq_domain_ops; @@ -25,22 +24,13 @@ struct irq_domain_ops; #endif #include <acpi/acpi.h> -#ifdef CONFIG_ACPI_TABLE_LIB -#define EXPORT_SYMBOL_ACPI_LIB(x) EXPORT_SYMBOL_NS_GPL(x, ACPI) -#define __init_or_acpilib -#define __initdata_or_acpilib -#else -#define EXPORT_SYMBOL_ACPI_LIB(x) -#define __init_or_acpilib __init -#define __initdata_or_acpilib __initdata -#endif - #ifdef CONFIG_ACPI #include <linux/list.h> #include <linux/dynamic_debug.h> #include <linux/module.h> #include <linux/mutex.h> +#include <linux/fw_table.h> #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h> @@ -48,6 +38,16 @@ struct irq_domain_ops; #include <acpi/acpi_io.h> #include <asm/acpi.h> +#ifdef CONFIG_ACPI_TABLE_LIB +#define EXPORT_SYMBOL_ACPI_LIB(x) EXPORT_SYMBOL_NS_GPL(x, ACPI) +#define __init_or_acpilib +#define __initdata_or_acpilib +#else +#define EXPORT_SYMBOL_ACPI_LIB(x) +#define __init_or_acpilib __init +#define __initdata_or_acpilib __initdata +#endif + static inline acpi_handle acpi_device_handle(struct acpi_device *adev) { return adev ? adev->handle : NULL; diff --git a/include/linux/fw_table.h b/include/linux/fw_table.h index ff8fa58d5818..ca49947f0a77 100644 --- a/include/linux/fw_table.h +++ b/include/linux/fw_table.h @@ -25,9 +25,6 @@ struct acpi_subtable_proc { int count; }; -#include <linux/acpi.h> -#include <acpi/acpi.h> - union acpi_subtable_headers { struct acpi_subtable_header common; struct acpi_hmat_structure hmat; diff --git a/lib/fw_table.c b/lib/fw_table.c index b51f30a28e47..294df54e33b6 100644 --- a/lib/fw_table.c +++ b/lib/fw_table.c @@ -7,7 +7,7 @@ * Copyright (C) 2023 Intel Corp. */ #include <linux/errno.h> -#include <linux/fw_table.h> +#include <linux/acpi.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/string.h>