* [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled [not found] <1401883796-17841-1-git-send-email-lee.jones@linaro.org> @ 2014-06-04 12:09 ` Lee Jones [not found] ` <1401883796-17841-2-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2014-06-05 0:56 ` Zheng, Lv 0 siblings, 2 replies; 10+ messages in thread From: Lee Jones @ 2014-06-04 12:09 UTC (permalink / raw) To: linux-arm-kernel, linux-kernel Cc: wsa, grant.likely, linux-i2c, devicetree, linus.walleij, Lee Jones, Lv Zheng, Rafael J. Wysocki, linux-acpi, devel Any drivers which support ACPI and Device Tree probing need to include both respective header files. Without this patch, if a driver is being used on a platform which does not support ACPI and subsequently does not have the config option enabled, but includes linux/acpi.h the build breaks with: In file included from ../include/acpi/platform/acenv.h:150:0, from ../include/acpi/acpi.h:56, from ../include/linux/match.h:2, from ../drivers/i2c/i2c-core.c:43: ../include/acpi/platform/aclinux.h:73:23: fatal error: asm/acenv.h: No such file or directory #include <asm/acenv.h> ^ Cc: Lv Zheng <lv.zheng@intel.com> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: linux-acpi@vger.kernel.org Cc: devel@acpica.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- include/acpi/platform/aclinux.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index cd1f052..fdf7663 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -70,9 +70,10 @@ #ifdef EXPORT_ACPI_INTERFACES #include <linux/export.h> #endif -#include <asm/acenv.h> -#ifndef CONFIG_ACPI +#ifdef CONFIG_ACPI +#include <asm/acenv.h> +#else /* External globals for __KERNEL__, stubs is needed */ -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
[parent not found: <1401883796-17841-2-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled [not found] ` <1401883796-17841-2-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2014-06-04 12:35 ` Rafael J. Wysocki [not found] ` <3061297.feg5DGUjIt-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: Rafael J. Wysocki @ 2014-06-04 12:35 UTC (permalink / raw) To: Lee Jones Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, wsa-z923LK4zBo2bacvFa/9K2g, grant.likely-QSEj5FYQhm4dnm+yROfE0A, linux-i2c-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linus.walleij-QSEj5FYQhm4dnm+yROfE0A, Lv Zheng, Rafael J. Wysocki, linux-acpi-u79uwXL29TY76Z2rM5mHXA, devel-E0kO6a4B6psdnm+yROfE0A On Wednesday, June 04, 2014 01:09:50 PM Lee Jones wrote: > Any drivers which support ACPI and Device Tree probing need to include > both respective header files. Without this patch, if a driver is being > used on a platform which does not support ACPI and subsequently does not > have the config option enabled, but includes linux/acpi.h the build > breaks with: > > In file included from ../include/acpi/platform/acenv.h:150:0, > from ../include/acpi/acpi.h:56, > from ../include/linux/match.h:2, > from ../drivers/i2c/i2c-core.c:43: > ../include/acpi/platform/aclinux.h:73:23: > fatal error: asm/acenv.h: No such file or directory > #include <asm/acenv.h> > ^ Which kernel does this happen with? > Cc: Lv Zheng <lv.zheng-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Cc: Rafael J. Wysocki <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Cc: devel-E0kO6a4B6psdnm+yROfE0A@public.gmane.org > Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > --- > include/acpi/platform/aclinux.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h > index cd1f052..fdf7663 100644 > --- a/include/acpi/platform/aclinux.h > +++ b/include/acpi/platform/aclinux.h > @@ -70,9 +70,10 @@ > #ifdef EXPORT_ACPI_INTERFACES > #include <linux/export.h> > #endif > -#include <asm/acenv.h> > > -#ifndef CONFIG_ACPI > +#ifdef CONFIG_ACPI > +#include <asm/acenv.h> > +#else > > /* External globals for __KERNEL__, stubs is needed */ > > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <3061297.feg5DGUjIt-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>]
* Re: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled [not found] ` <3061297.feg5DGUjIt-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org> @ 2014-06-04 12:51 ` Lee Jones 2014-06-04 21:29 ` Rafael J. Wysocki 2014-06-05 1:14 ` Zheng, Lv 0 siblings, 2 replies; 10+ messages in thread From: Lee Jones @ 2014-06-04 12:51 UTC (permalink / raw) To: Rafael J. Wysocki Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, wsa-z923LK4zBo2bacvFa/9K2g, grant.likely-QSEj5FYQhm4dnm+yROfE0A, linux-i2c-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linus.walleij-QSEj5FYQhm4dnm+yROfE0A, Lv Zheng, Rafael J. Wysocki, linux-acpi-u79uwXL29TY76Z2rM5mHXA, devel-E0kO6a4B6psdnm+yROfE0A On Wed, 04 Jun 2014, Rafael J. Wysocki wrote: > On Wednesday, June 04, 2014 01:09:50 PM Lee Jones wrote: > > Any drivers which support ACPI and Device Tree probing need to include > > both respective header files. Without this patch, if a driver is being > > used on a platform which does not support ACPI and subsequently does not > > have the config option enabled, but includes linux/acpi.h the build > > breaks with: > > > > In file included from ../include/acpi/platform/acenv.h:150:0, > > from ../include/acpi/acpi.h:56, > > from ../include/linux/match.h:2, > > from ../drivers/i2c/i2c-core.c:43: > > ../include/acpi/platform/aclinux.h:73:23: > > fatal error: asm/acenv.h: No such file or directory > > #include <asm/acenv.h> > > ^ > > Which kernel does this happen with? a0a962d (tag: refs/tags/next-20140602, refs/remotes/next/master) Add linux-next specific files for 20140602 > > Cc: Lv Zheng <lv.zheng-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > > Cc: Rafael J. Wysocki <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > > Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > > Cc: devel-E0kO6a4B6psdnm+yROfE0A@public.gmane.org > > Signed-off-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > --- > > include/acpi/platform/aclinux.h | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h > > index cd1f052..fdf7663 100644 > > --- a/include/acpi/platform/aclinux.h > > +++ b/include/acpi/platform/aclinux.h > > @@ -70,9 +70,10 @@ > > #ifdef EXPORT_ACPI_INTERFACES > > #include <linux/export.h> > > #endif > > -#include <asm/acenv.h> > > > > -#ifndef CONFIG_ACPI > > +#ifdef CONFIG_ACPI > > +#include <asm/acenv.h> > > +#else > > > > /* External globals for __KERNEL__, stubs is needed */ > > > > > -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled 2014-06-04 12:51 ` Lee Jones @ 2014-06-04 21:29 ` Rafael J. Wysocki [not found] ` <1603851.9SBouhvdWS-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org> 2014-06-05 1:14 ` Zheng, Lv 1 sibling, 1 reply; 10+ messages in thread From: Rafael J. Wysocki @ 2014-06-04 21:29 UTC (permalink / raw) To: Lee Jones Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, wsa-z923LK4zBo2bacvFa/9K2g, grant.likely-QSEj5FYQhm4dnm+yROfE0A, linux-i2c-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, linus.walleij-QSEj5FYQhm4dnm+yROfE0A, Lv Zheng, Rafael J. Wysocki, linux-acpi-u79uwXL29TY76Z2rM5mHXA, devel-E0kO6a4B6psdnm+yROfE0A On Wednesday, June 04, 2014 01:51:37 PM Lee Jones wrote: > On Wed, 04 Jun 2014, Rafael J. Wysocki wrote: > > > On Wednesday, June 04, 2014 01:09:50 PM Lee Jones wrote: > > > Any drivers which support ACPI and Device Tree probing need to include > > > both respective header files. Without this patch, if a driver is being > > > used on a platform which does not support ACPI and subsequently does not > > > have the config option enabled, but includes linux/acpi.h the build > > > breaks with: > > > > > > In file included from ../include/acpi/platform/acenv.h:150:0, > > > from ../include/acpi/acpi.h:56, > > > from ../include/linux/match.h:2, > > > from ../drivers/i2c/i2c-core.c:43: > > > ../include/acpi/platform/aclinux.h:73:23: > > > fatal error: asm/acenv.h: No such file or directory > > > #include <asm/acenv.h> > > > ^ > > > > Which kernel does this happen with? > > a0a962d (tag: refs/tags/next-20140602, refs/remotes/next/master) > Add linux-next specific files for 20140602 It looks like the problem is with include/linux/match.h that should not include acpi/acpi.h directly. But I can't find this file in the Linus' next branch even, so I guess it's on its way to that branch? Rafael ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <1603851.9SBouhvdWS-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>]
* RE: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled [not found] ` <1603851.9SBouhvdWS-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org> @ 2014-06-05 1:01 ` Zheng, Lv 0 siblings, 0 replies; 10+ messages in thread From: Zheng, Lv @ 2014-06-05 1:01 UTC (permalink / raw) To: Rafael J. Wysocki, Lee Jones Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org, grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, Wysocki, Rafael J, linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devel-E0kO6a4B6psdnm+yROfE0A@public.gmane.org Hi, > From: linux-i2c-owner@vger.kernel.org [mailto:linux-i2c-owner@vger.kernel.org] On Behalf Of Rafael J. Wysocki > Sent: Thursday, June 05, 2014 5:30 AM > > On Wednesday, June 04, 2014 01:51:37 PM Lee Jones wrote: > > On Wed, 04 Jun 2014, Rafael J. Wysocki wrote: > > > > > On Wednesday, June 04, 2014 01:09:50 PM Lee Jones wrote: > > > > Any drivers which support ACPI and Device Tree probing need to include > > > > both respective header files. Without this patch, if a driver is being > > > > used on a platform which does not support ACPI and subsequently does not > > > > have the config option enabled, but includes linux/acpi.h the build > > > > breaks with: > > > > > > > > In file included from ../include/acpi/platform/acenv.h:150:0, > > > > from ../include/acpi/acpi.h:56, > > > > from ../include/linux/match.h:2, > > > > from ../drivers/i2c/i2c-core.c:43: > > > > ../include/acpi/platform/aclinux.h:73:23: > > > > fatal error: asm/acenv.h: No such file or directory > > > > #include <asm/acenv.h> > > > > ^ > > > > > > Which kernel does this happen with? > > > > a0a962d (tag: refs/tags/next-20140602, refs/remotes/next/master) > > Add linux-next specific files for 20140602 > > It looks like the problem is with include/linux/match.h that should not > include acpi/acpi.h directly. This is another example that many mis-ordered inclusions are caused by the mis-ordered <asm/acpi.h> inclusion. > > But I can't find this file in the Linus' next branch even, so I guess it's > on its way to that branch? > I guess, In their tree, they have CONFIG_ACPI enabled for ARM, but we've changed to make: 1. <asm/acenv.h> the architecture specific layer for ACPICA, and 2. <asm/acpi.h> is now the architecture specific layer for Linux ACPI. So they need to follow this. Thanks and best regards -Lv > Rafael > > -- > To unsubscribe from this list: send the line "unsubscribe linux-i2c" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled 2014-06-04 12:51 ` Lee Jones 2014-06-04 21:29 ` Rafael J. Wysocki @ 2014-06-05 1:14 ` Zheng, Lv [not found] ` <1AE640813FDE7649BE1B193DEA596E880262042C-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> 1 sibling, 1 reply; 10+ messages in thread From: Zheng, Lv @ 2014-06-05 1:14 UTC (permalink / raw) To: Lee Jones, Rafael J. Wysocki Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org, grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, Wysocki, Rafael J, linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devel-E0kO6a4B6psdnm+yROfE0A@public.gmane.org Hi, Lee > From: Lee Jones [mailto:lee.jones@linaro.org] > Sent: Wednesday, June 04, 2014 8:52 PM > To: Rafael J. Wysocki > > On Wed, 04 Jun 2014, Rafael J. Wysocki wrote: > > > On Wednesday, June 04, 2014 01:09:50 PM Lee Jones wrote: > > > Any drivers which support ACPI and Device Tree probing need to include > > > both respective header files. Without this patch, if a driver is being > > > used on a platform which does not support ACPI and subsequently does not > > > have the config option enabled, but includes linux/acpi.h the build > > > breaks with: > > > > > > In file included from ../include/acpi/platform/acenv.h:150:0, > > > from ../include/acpi/acpi.h:56, > > > from ../include/linux/match.h:2, > > > from ../drivers/i2c/i2c-core.c:43: > > > ../include/acpi/platform/aclinux.h:73:23: > > > fatal error: asm/acenv.h: No such file or directory > > > #include <asm/acenv.h> > > > ^ Note that: In our tree: <asm/acenv.h> is only included by <acpi/acpi.h>. And <acpi/acpi.h> is only included by 1. <linux/acpi.h> when CONFIG_ACPI enabled 2. <linux/sfi_acpi.h> - this is x86 specific, we'll clean it up by implementing stubs for all ACPI external interfaces. So there is no case we need to exclude <asm/acenv.h> when CONFIG_ACPI is not enabled. I cannot find linux/match.h here. If <linux/match.h> want to include ACPI features, it shouldn't include <acpi/acpi.h>, but should include <linux/acpi.h>. Please refer to: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8b48463f And stop including <acpi/acpi.h> directly in any cases. Thanks and best regards -Lv > > > > Which kernel does this happen with? > > a0a962d (tag: refs/tags/next-20140602, refs/remotes/next/master) > Add linux-next specific files for 20140602 > > > > Cc: Lv Zheng <lv.zheng@intel.com> > > > Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > Cc: linux-acpi@vger.kernel.org > > > Cc: devel@acpica.org > > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > > --- > > > include/acpi/platform/aclinux.h | 5 +++-- > > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > > > diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h > > > index cd1f052..fdf7663 100644 > > > --- a/include/acpi/platform/aclinux.h > > > +++ b/include/acpi/platform/aclinux.h > > > @@ -70,9 +70,10 @@ > > > #ifdef EXPORT_ACPI_INTERFACES > > > #include <linux/export.h> > > > #endif > > > -#include <asm/acenv.h> > > > > > > -#ifndef CONFIG_ACPI > > > +#ifdef CONFIG_ACPI > > > +#include <asm/acenv.h> > > > +#else > > > > > > /* External globals for __KERNEL__, stubs is needed */ > > > > > > > > > > -- > Lee Jones > Linaro STMicroelectronics Landing Team Lead > Linaro.org │ Open source software for ARM SoCs > Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <1AE640813FDE7649BE1B193DEA596E880262042C-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>]
* Re: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled [not found] ` <1AE640813FDE7649BE1B193DEA596E880262042C-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> @ 2014-06-05 4:11 ` Hanjun Guo 2014-06-05 4:46 ` Zheng, Lv 0 siblings, 1 reply; 10+ messages in thread From: Hanjun Guo @ 2014-06-05 4:11 UTC (permalink / raw) To: Zheng, Lv, Lee Jones, Rafael J. Wysocki Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org, grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, Wysocki, Rafael J, linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devel-E0kO6a4B6psdnm+yROfE0A@public.gmane.org On 2014-6-5 9:14, Zheng, Lv wrote: > Hi, Lee > >> From: Lee Jones [mailto:lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org] >> Sent: Wednesday, June 04, 2014 8:52 PM >> To: Rafael J. Wysocki >> >> On Wed, 04 Jun 2014, Rafael J. Wysocki wrote: >> >>> On Wednesday, June 04, 2014 01:09:50 PM Lee Jones wrote: >>>> Any drivers which support ACPI and Device Tree probing need to include >>>> both respective header files. Without this patch, if a driver is being >>>> used on a platform which does not support ACPI and subsequently does not >>>> have the config option enabled, but includes linux/acpi.h the build >>>> breaks with: >>>> >>>> In file included from ../include/acpi/platform/acenv.h:150:0, >>>> from ../include/acpi/acpi.h:56, >>>> from ../include/linux/match.h:2, >>>> from ../drivers/i2c/i2c-core.c:43: >>>> ../include/acpi/platform/aclinux.h:73:23: >>>> fatal error: asm/acenv.h: No such file or directory >>>> #include <asm/acenv.h> >>>> ^ > > Note that: > In our tree: > <asm/acenv.h> is only included by <acpi/acpi.h>. > And <acpi/acpi.h> is only included by > 1. <linux/acpi.h> when CONFIG_ACPI enabled > 2. <linux/sfi_acpi.h> - this is x86 specific, we'll clean it up by implementing stubs for all ACPI external interfaces. > So there is no case we need to exclude <asm/acenv.h> when CONFIG_ACPI is not enabled. > > I cannot find linux/match.h here. > If <linux/match.h> want to include ACPI features, it shouldn't include <acpi/acpi.h>, but should include <linux/acpi.h>. > Please refer to: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8b48463f > And stop including <acpi/acpi.h> directly in any cases. Ah, I agree, please ignore my previous email, sorry for the noise. Since it is very important to include <linux/acpi.h> but not <acpi/acpi.h>, can we document it somewhere as the guidance? Then people will not make such mistake :) Thanks Hanjun ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled 2014-06-05 4:11 ` Hanjun Guo @ 2014-06-05 4:46 ` Zheng, Lv 0 siblings, 0 replies; 10+ messages in thread From: Zheng, Lv @ 2014-06-05 4:46 UTC (permalink / raw) To: Hanjun Guo, Lee Jones, Rafael J. Wysocki Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wsa@the-dreams.de, grant.likely@linaro.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linus.walleij@linaro.org, Wysocki, Rafael J, linux-acpi@vger.kernel.org, devel@acpica.org Hi, > From: Hanjun Guo [mailto:hanjun.guo@linaro.org] > Sent: Thursday, June 05, 2014 12:11 PM > To: Zheng, Lv; Lee Jones; Rafael J. Wysocki > > On 2014-6-5 9:14, Zheng, Lv wrote: > > Hi, Lee > > > >> From: Lee Jones [mailto:lee.jones@linaro.org] > >> Sent: Wednesday, June 04, 2014 8:52 PM > >> To: Rafael J. Wysocki > >> > >> On Wed, 04 Jun 2014, Rafael J. Wysocki wrote: > >> > >>> On Wednesday, June 04, 2014 01:09:50 PM Lee Jones wrote: > >>>> Any drivers which support ACPI and Device Tree probing need to include > >>>> both respective header files. Without this patch, if a driver is being > >>>> used on a platform which does not support ACPI and subsequently does not > >>>> have the config option enabled, but includes linux/acpi.h the build > >>>> breaks with: > >>>> > >>>> In file included from ../include/acpi/platform/acenv.h:150:0, > >>>> from ../include/acpi/acpi.h:56, > >>>> from ../include/linux/match.h:2, > >>>> from ../drivers/i2c/i2c-core.c:43: > >>>> ../include/acpi/platform/aclinux.h:73:23: > >>>> fatal error: asm/acenv.h: No such file or directory > >>>> #include <asm/acenv.h> > >>>> ^ > > > > Note that: > > In our tree: > > <asm/acenv.h> is only included by <acpi/acpi.h>. > > And <acpi/acpi.h> is only included by > > 1. <linux/acpi.h> when CONFIG_ACPI enabled > > 2. <linux/sfi_acpi.h> - this is x86 specific, we'll clean it up by implementing stubs for all ACPI external interfaces. > > So there is no case we need to exclude <asm/acenv.h> when CONFIG_ACPI is not enabled. > > > > I cannot find linux/match.h here. > > If <linux/match.h> want to include ACPI features, it shouldn't include <acpi/acpi.h>, but should include <linux/acpi.h>. > > Please refer to: > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8b48463f > > And stop including <acpi/acpi.h> directly in any cases. > > Ah, I agree, please ignore my previous email, > sorry for the noise. > > Since it is very important to include <linux/acpi.h> but not <acpi/acpi.h>, > can we document it somewhere as the guidance? Then people will not > make such mistake :) After I test the ACPICA stubs and remove the only abnormal direct <acpi/acpi.h> inclusion from <linux/sfi_acpi.h>. We could have a commit to add something like: #ifndef _LINUX_ACPI_H #error .... #endif To the <acpi/platform/aclinux.h> (the Linux OSL for ACPICA headers, it is included by <acpi/acpi.h>). Hope this can be the hint to prevent future mistakes. Thanks and best regards -Lv > > Thanks > Hanjun ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled 2014-06-04 12:09 ` [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled Lee Jones [not found] ` <1401883796-17841-2-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2014-06-05 0:56 ` Zheng, Lv 2014-06-05 4:06 ` Hanjun Guo 1 sibling, 1 reply; 10+ messages in thread From: Zheng, Lv @ 2014-06-05 0:56 UTC (permalink / raw) To: Lee Jones, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: wsa@the-dreams.de, grant.likely@linaro.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linus.walleij@linaro.org, Wysocki, Rafael J, linux-acpi@vger.kernel.org, devel@acpica.org Hi, Lee > From: Lee Jones [mailto:lee.jones@linaro.org] > Sent: Wednesday, June 04, 2014 8:10 PM > > Any drivers which support ACPI and Device Tree probing need to include > both respective header files. Without this patch, if a driver is being > used on a platform which does not support ACPI and subsequently does not > have the config option enabled, but includes linux/acpi.h the build > breaks with: > > In file included from ../include/acpi/platform/acenv.h:150:0, > from ../include/acpi/acpi.h:56, > from ../include/linux/match.h:2, > from ../drivers/i2c/i2c-core.c:43: > ../include/acpi/platform/aclinux.h:73:23: > fatal error: asm/acenv.h: No such file or directory > #include <asm/acenv.h> > ^ > Cc: Lv Zheng <lv.zheng@intel.com> > Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > Cc: linux-acpi@vger.kernel.org > Cc: devel@acpica.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> > --- > include/acpi/platform/aclinux.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h > index cd1f052..fdf7663 100644 > --- a/include/acpi/platform/aclinux.h > +++ b/include/acpi/platform/aclinux.h > @@ -70,9 +70,10 @@ > #ifdef EXPORT_ACPI_INTERFACES > #include <linux/export.h> > #endif > -#include <asm/acenv.h> > > -#ifndef CONFIG_ACPI > +#ifdef CONFIG_ACPI > +#include <asm/acenv.h> > +#else This is exactly what I want to do in the next step. But you are a bit faster here. I believe: The miss-ordered inclusions of <asm/acpi.h> is the culprit of all of the miss-ordered inclusions in arch/x86/include/asm. You should have noted that <asm/acpi.h> was originally unexpected included by some x86 specific headers. Simply doing <asm/acenv.h> exlusion in this way might be able to fix your issue for your architecture, but it could be very likely breaking x86 builds. You might be able to find another way to solve your build issue - for example, creating an empty <asm/acenv.h> for arch/arm. Thanks and best regards -Lv > > /* External globals for __KERNEL__, stubs is needed */ > > -- > 1.8.3.2 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled 2014-06-05 0:56 ` Zheng, Lv @ 2014-06-05 4:06 ` Hanjun Guo 0 siblings, 0 replies; 10+ messages in thread From: Hanjun Guo @ 2014-06-05 4:06 UTC (permalink / raw) To: Zheng, Lv, Lee Jones, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: wsa@the-dreams.de, grant.likely@linaro.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linus.walleij@linaro.org, Wysocki, Rafael J, linux-acpi@vger.kernel.org, devel@acpica.org Hi Lv, On 2014-6-5 8:56, Zheng, Lv wrote: > Hi, Lee > >> From: Lee Jones [mailto:lee.jones@linaro.org] >> Sent: Wednesday, June 04, 2014 8:10 PM >> >> Any drivers which support ACPI and Device Tree probing need to include >> both respective header files. Without this patch, if a driver is being >> used on a platform which does not support ACPI and subsequently does not >> have the config option enabled, but includes linux/acpi.h the build >> breaks with: >> >> In file included from ../include/acpi/platform/acenv.h:150:0, >> from ../include/acpi/acpi.h:56, >> from ../include/linux/match.h:2, >> from ../drivers/i2c/i2c-core.c:43: >> ../include/acpi/platform/aclinux.h:73:23: >> fatal error: asm/acenv.h: No such file or directory >> #include <asm/acenv.h> >> ^ >> Cc: Lv Zheng <lv.zheng@intel.com> >> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >> Cc: linux-acpi@vger.kernel.org >> Cc: devel@acpica.org >> Signed-off-by: Lee Jones <lee.jones@linaro.org> >> --- >> include/acpi/platform/aclinux.h | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h >> index cd1f052..fdf7663 100644 >> --- a/include/acpi/platform/aclinux.h >> +++ b/include/acpi/platform/aclinux.h >> @@ -70,9 +70,10 @@ >> #ifdef EXPORT_ACPI_INTERFACES >> #include <linux/export.h> >> #endif >> -#include <asm/acenv.h> >> >> -#ifndef CONFIG_ACPI >> +#ifdef CONFIG_ACPI >> +#include <asm/acenv.h> >> +#else > > This is exactly what I want to do in the next step. > But you are a bit faster here. > I believe: > The miss-ordered inclusions of <asm/acpi.h> is the culprit of all of the miss-ordered inclusions in arch/x86/include/asm. > You should have noted that <asm/acpi.h> was originally unexpected included by some x86 specific headers. > Simply doing <asm/acenv.h> exlusion in this way might be able to fix your issue for your architecture, but it could be very likely breaking x86 builds. > You might be able to find another way to solve your build issue - for example, creating an empty <asm/acenv.h> for arch/arm. Yes, we solve this issue as you suggested for arch/arm64. since ARM32 will not support ACPI in the near future, we may find another way to fix it. Thanks Hanjun ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-06-05 4:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1401883796-17841-1-git-send-email-lee.jones@linaro.org>
2014-06-04 12:09 ` [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled Lee Jones
[not found] ` <1401883796-17841-2-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-04 12:35 ` Rafael J. Wysocki
[not found] ` <3061297.feg5DGUjIt-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2014-06-04 12:51 ` Lee Jones
2014-06-04 21:29 ` Rafael J. Wysocki
[not found] ` <1603851.9SBouhvdWS-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2014-06-05 1:01 ` Zheng, Lv
2014-06-05 1:14 ` Zheng, Lv
[not found] ` <1AE640813FDE7649BE1B193DEA596E880262042C-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-06-05 4:11 ` Hanjun Guo
2014-06-05 4:46 ` Zheng, Lv
2014-06-05 0:56 ` Zheng, Lv
2014-06-05 4:06 ` Hanjun Guo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox