RE: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
Hi > From: linux-acpi-ow...@vger.kernel.org > [mailto:linux-acpi-ow...@vger.kernel.org] On Behalf Of Yisheng > Xie > Subject: Re: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64 > > > > On 2016/10/22 3:40, Zheng, Lv wrote: > > Hi, > > > > I generated a solution with tools/power/acpi makefiles. > > Please give it a try. > Hi Lv, > Your patch also works. Thanks for the test. I'll send it to the community for review. Best regards Lv > > > Sorry for the hackish build includes. > > > > Thanks and best regards > > Lv > > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
On 2016/10/22 3:40, Zheng, Lv wrote: > Hi, > > I generated a solution with tools/power/acpi makefiles. > Please give it a try. Hi Lv, Your patch also works. > Sorry for the hackish build includes. > > Thanks and best regards > Lv >
RE: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
Hi, I generated a solution with tools/power/acpi makefiles. Please give it a try. Sorry for the hackish build includes. Thanks and best regards Lv > From: linux-acpi-ow...@vger.kernel.org > [mailto:linux-acpi-ow...@vger.kernel.org] On Behalf Of Zheng, > Lv > Subject: RE: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64 > > Hi, > > > From: linux-acpi-ow...@vger.kernel.org > > [mailto:linux-acpi-ow...@vger.kernel.org] On Behalf Of > Yisheng > > Xie > > Subject: Re: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64 > > > > Hi, > > > > On 2016/10/19 6:07, Zheng, Lv wrote: > > > Hi, > > > > > > I'm not sure what you mean. > > > I mean you need ACPI_USE_SYSTEM_INTTYPES in case s64 has already been > > > defined in that environment. > > > Are you sure s64 should be defined for your environment? > > > > > s64 is not defined in my build environment but in kernel code. > > Yes, in-kernel ACPICA applications trickily reused this to get it compiled in > kernel source tree with > minimal porting effort. > And it is working on x86. > > > > > > IMO, s64 is kernel space specific, while you are compiling user space > > > tools. > > > It looks to me like there is something wrong with ARM kernel's > > > asm/types.h. > > > > > >> I listed in change log. And I also have tried that way. > > >> However, it still have many other errors.(I am sorry to not have listed > > >> all of them.) > > >> > > >> From the following log, you can see, all of the conflict type is from > > >> signal.h. > > >> And maybe this patch is a better way to fix these compile error, without > > >> too much > > >> change of code. > > >> > > >> Are you sure that it will cause order problem when build ACPICA on other > > >> build > > >> environment, for it only effect aarch64. > > > > > > I'm not sure what this is. > > > How did you get this? > > > Were you compiling kernel acpi tools or compiling the kernel itself? > > > > > It's about compiling kernel acpi tools. > > > > > For tool compilation, are you sure you have correctly configured your > > > cross-compilation > environment? > > Maybe it is not my cross-compilation environment problem, for your also can > > reproduce it, > > as your said in another email, right? > > Yes, I reproduced it. > By commenting out inclusion from acenv.h. > Tools can be built by aarch64-linux-gnu tool chain downloaded from linaro. > > However this is still not the root cause, IMO. > > Thanks > Lv > > > > > > Will you see problems in compiling ACPICA applications from: > > > https://github.com/acpica/acpica > > > > > > > > Thanks > > > Lv > > > > > > . > > > > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > > the body of a message to majord...@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html lv-tools1.patch Description: lv-tools1.patch
RE: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
Hi, > From: linux-acpi-ow...@vger.kernel.org > [mailto:linux-acpi-ow...@vger.kernel.org] On Behalf Of Yisheng > Xie > Subject: Re: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64 > > Hi, > > On 2016/10/19 6:07, Zheng, Lv wrote: > > Hi, > > > > I'm not sure what you mean. > > I mean you need ACPI_USE_SYSTEM_INTTYPES in case s64 has already been > > defined in that environment. > > Are you sure s64 should be defined for your environment? > > > s64 is not defined in my build environment but in kernel code. Yes, in-kernel ACPICA applications trickily reused this to get it compiled in kernel source tree with minimal porting effort. And it is working on x86. > > > IMO, s64 is kernel space specific, while you are compiling user space tools. > > It looks to me like there is something wrong with ARM kernel's asm/types.h. > > > >> I listed in change log. And I also have tried that way. > >> However, it still have many other errors.(I am sorry to not have listed > >> all of them.) > >> > >> From the following log, you can see, all of the conflict type is from > >> signal.h. > >> And maybe this patch is a better way to fix these compile error, without > >> too much > >> change of code. > >> > >> Are you sure that it will cause order problem when build ACPICA on other > >> build > >> environment, for it only effect aarch64. > > > > I'm not sure what this is. > > How did you get this? > > Were you compiling kernel acpi tools or compiling the kernel itself? > > > It's about compiling kernel acpi tools. > > > For tool compilation, are you sure you have correctly configured your > > cross-compilation environment? > Maybe it is not my cross-compilation environment problem, for your also can > reproduce it, > as your said in another email, right? Yes, I reproduced it. By commenting out inclusion from acenv.h. Tools can be built by aarch64-linux-gnu tool chain downloaded from linaro. However this is still not the root cause, IMO. Thanks Lv > > > Will you see problems in compiling ACPICA applications from: > > https://github.com/acpica/acpica > > > > > Thanks > > Lv > > > > . > > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
Hi, On 2016/10/19 6:07, Zheng, Lv wrote: > Hi, > > I'm not sure what you mean. > I mean you need ACPI_USE_SYSTEM_INTTYPES in case s64 has already been defined > in that environment. > Are you sure s64 should be defined for your environment? > s64 is not defined in my build environment but in kernel code. > IMO, s64 is kernel space specific, while you are compiling user space tools. > It looks to me like there is something wrong with ARM kernel's asm/types.h. > >> I listed in change log. And I also have tried that way. >> However, it still have many other errors.(I am sorry to not have listed all >> of them.) >> >> From the following log, you can see, all of the conflict type is from >> signal.h. >> And maybe this patch is a better way to fix these compile error, without too >> much >> change of code. >> >> Are you sure that it will cause order problem when build ACPICA on other >> build >> environment, for it only effect aarch64. > > I'm not sure what this is. > How did you get this? > Were you compiling kernel acpi tools or compiling the kernel itself? > It's about compiling kernel acpi tools. > For tool compilation, are you sure you have correctly configured your > cross-compilation environment? Maybe it is not my cross-compilation environment problem, for your also can reproduce it, as your said in another email, right? > Will you see problems in compiling ACPICA applications from: > https://github.com/acpica/acpica > > Thanks > Lv > > . >
RE: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
Hi, > From: Yisheng Xie [mailto:xieyishe...@huawei.com] > Sent: Tuesday, October 18, 2016 4:47 AM > To: Zheng, Lv ; Moore, Robert ; > Wysocki, Rafael J > ; l...@kernel.org; wmi...@sgl.com > Cc: linux-a...@vger.kernel.org; de...@acpica.org; > linux-kernel@vger.kernel.org; guohan...@huawei.com; > wangxiongfe...@huawei.com > Subject: Re: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64 > > Hi, Lv > > On 2016/10/18 6:26, Zheng, Lv wrote: > > Hi, Yisheng > > > >> From: Yisheng Xie [mailto:xieyishe...@huawei.com] > >> Subject: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64 > >> > >> when try to cross compile acpi tool in dir kernel/tools > >> for arm64 use command: > >> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- acpi > >> it failed with the following log: > >> In file included > >> from ../../../../../include/acpi/acpi.h:58:0, > >> from ../../../../../drivers/acpi/acpica/utstring.c:44: > >> ../../../../../include/acpi/actypes.h:130:34: error: conflicting types > >> for 's64' > >> typedef signed long long s64; > >>^ > >> In file included > >> from /opt/aarch64-linux-gnu/libc/usr/include/asm-generic/types.h:6:0 > >> from /opt/aarch64-linux-gnu/libc/usr/include/asm/types.h:1, > >> from ../../../../../include/uapi/linux/types.h:4, > >> from ../../../../../include/linux/types.h:5, > >> from /opt/aarch64-linux-gnu/libc/usr/include/asm/sigcontext.h:19, > >> from /opt/aarch64-linux-gnu/libc/usr/include/bits/sigcontext.h:27, > >> from /opt/aarch64-linux-gnu/libc/usr/include/signal.h:308, > >> from ../../../../../include/acpi/platform/acenv.h:365, > >> from ../../../../../include/acpi/acpi.h:56, > >> from ./acpidump.h:55, > >> from ../../os_specific/service_layers/oslinuxtbl.c:44: > >> ../../../../../include/asm-generic/int-ll64.h:24:26: note: previous > >> declaration of 's64' was here > >> typedef signed long long s64; > >>^ > >> Fix this compile problem. > > > > This looks like a conflict between asm-generic/int-ll64.h and actypes.h. > > > > When a build environment actually has s64 definition. > > ACPICA shouldn't define it. > > ACPICA should define ACPI_USE_SYSTEM_INTTYPES instead. > > > > However it is not clear if a Linux userspace should be aware of s64. > > We couldn't see this issue in other arch builds. > > So I wonder if this is just a missing "#ifdef __KERNEL__" in > > asm-generic/int-ll64.h. > > > > If Linux should be aware of s64. > > Then ACPICA definition of s64 should be disabled by defining > > ACPI_USE_SYSTEM_INTTYPES. > > Since this is a post-ACPICA-release issue. > > You should only fix it in tools/power/acpi/Makefile*. > > > > So I think this patch is not a right fix, but a wrong workaround. > > It can easily cause regressions in other ACPICA builds. > > > Thank you for your reply. > You are right that the ACPI_USE_SYSTEM_INTTYPES in Makefile can fixed > compile error, I'm not sure what you mean. I mean you need ACPI_USE_SYSTEM_INTTYPES in case s64 has already been defined in that environment. Are you sure s64 should be defined for your environment? IMO, s64 is kernel space specific, while you are compiling user space tools. It looks to me like there is something wrong with ARM kernel's asm/types.h. > I listed in change log. And I also have tried that way. > However, it still have many other errors.(I am sorry to not have listed all > of them.) > > From the following log, you can see, all of the conflict type is from > signal.h. > And maybe this patch is a better way to fix these compile error, without too > much > change of code. > > Are you sure that it will cause order problem when build ACPICA on other build > environment, for it only effect aarch64. > > Thanks > Yisheng. > > --detail compile error log- > In file included from > /opt/aarch64-linux-gnu/libc/usr/include/asm/sigcontext.h:19:0, > from > /opt/aarch64-linux-gnu/libc/usr/include/bits/sigcontext.h:27, > from /opt/aarch64-linux-gnu/libc/usr/include/signal.h:308, > from ../../../../../include/acpi/platform/acenv.h:365, > from ../../../../../include/acpi/acpi.h:56, > from ../../../../../drivers/acpi/acpica/tbprint.c:44: > ../../../../../include/linux/types.h:14:26: error: conflict
Re: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
Hi, Lv On 2016/10/18 6:26, Zheng, Lv wrote: > Hi, Yisheng > >> From: Yisheng Xie [mailto:xieyishe...@huawei.com] >> Subject: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64 >> >> when try to cross compile acpi tool in dir kernel/tools >> for arm64 use command: >> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- acpi >> it failed with the following log: >> In file included >> from ../../../../../include/acpi/acpi.h:58:0, >> from ../../../../../drivers/acpi/acpica/utstring.c:44: >> ../../../../../include/acpi/actypes.h:130:34: error: conflicting types >> for 's64' >> typedef signed long long s64; >>^ >> In file included >> from /opt/aarch64-linux-gnu/libc/usr/include/asm-generic/types.h:6:0 >> from /opt/aarch64-linux-gnu/libc/usr/include/asm/types.h:1, >> from ../../../../../include/uapi/linux/types.h:4, >> from ../../../../../include/linux/types.h:5, >> from /opt/aarch64-linux-gnu/libc/usr/include/asm/sigcontext.h:19, >> from /opt/aarch64-linux-gnu/libc/usr/include/bits/sigcontext.h:27, >> from /opt/aarch64-linux-gnu/libc/usr/include/signal.h:308, >> from ../../../../../include/acpi/platform/acenv.h:365, >> from ../../../../../include/acpi/acpi.h:56, >> from ./acpidump.h:55, >> from ../../os_specific/service_layers/oslinuxtbl.c:44: >> ../../../../../include/asm-generic/int-ll64.h:24:26: note: previous >> declaration of 's64' was here >> typedef signed long long s64; >>^ >> Fix this compile problem. > > This looks like a conflict between asm-generic/int-ll64.h and actypes.h. > > When a build environment actually has s64 definition. > ACPICA shouldn't define it. > ACPICA should define ACPI_USE_SYSTEM_INTTYPES instead. > > However it is not clear if a Linux userspace should be aware of s64. > We couldn't see this issue in other arch builds. > So I wonder if this is just a missing "#ifdef __KERNEL__" in > asm-generic/int-ll64.h. > > If Linux should be aware of s64. > Then ACPICA definition of s64 should be disabled by defining > ACPI_USE_SYSTEM_INTTYPES. > Since this is a post-ACPICA-release issue. > You should only fix it in tools/power/acpi/Makefile*. > > So I think this patch is not a right fix, but a wrong workaround. > It can easily cause regressions in other ACPICA builds. > Thank you for your reply. You are right that the ACPI_USE_SYSTEM_INTTYPES in Makefile can fixed compile error, I listed in change log. And I also have tried that way. However, it still have many other errors.(I am sorry to not have listed all of them.) >From the following log, you can see, all of the conflict type is from signal.h. And maybe this patch is a better way to fix these compile error, without too much change of code. Are you sure that it will cause order problem when build ACPICA on other build environment, for it only effect aarch64. Thanks Yisheng. --detail compile error log- In file included from /opt/aarch64-linux-gnu/libc/usr/include/asm/sigcontext.h:19:0, from /opt/aarch64-linux-gnu/libc/usr/include/bits/sigcontext.h:27, from /opt/aarch64-linux-gnu/libc/usr/include/signal.h:308, from ../../../../../include/acpi/platform/acenv.h:365, from ../../../../../include/acpi/acpi.h:56, from ../../../../../drivers/acpi/acpica/tbprint.c:44: ../../../../../include/linux/types.h:14:26: error: conflicting types for 'fd_set' typedef __kernel_fd_set fd_set; ^ In file included from /opt/aarch64-linux-gnu/libc/usr/include/sys/types.h:219:0, from /opt/aarch64-linux-gnu/libc/usr/include/stdlib.h:314, from ../../../../../include/acpi/platform/acenv.h:357, from ../../../../../include/acpi/acpi.h:56, from ../../../../../drivers/acpi/acpica/tbprint.c:44: /opt/aarch64-linux-gnu/libc/usr/include/sys/select.h:75:5: note: previous declaration of 'fd_set' was here } fd_set; ^ In file included from /opt/aarch64-linux-gnu/libc/usr/include/asm/sigcontext.h:19:0, from /opt/aarch64-linux-gnu/libc/usr/include/bits/sigcontext.h:27, from /opt/aarch64-linux-gnu/libc/usr/include/signal.h:308, from ../../../../../include/acpi/platform/acenv.h:365, from ../../../../../include/acpi/acpi.h:56, from ../../../../../drivers/acpi/acpica/tbprint.c:44: ../../../../../include/linux/types.h:15:25: error: conflicting types for 'dev_t' typedef __kernel_dev_t dev_t; ^ In file included from /opt/aarch64-linux-gnu/libc/usr/include/stdlib.h:314:0, from ../../../../../include/acpi/platform/acenv.h:357, from ../../../../../include/acpi/acpi.h:56, from ../../../../../drivers/acpi/acpica/tbprint.c:44: /opt/aarch64-linux-gnu/libc/usr/include/sys/types.h:60:17: note
RE: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
Hi, Yisheng > From: Yisheng Xie [mailto:xieyishe...@huawei.com] > Subject: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64 > > when try to cross compile acpi tool in dir kernel/tools > for arm64 use command: > make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- acpi > it failed with the following log: > In file included > from ../../../../../include/acpi/acpi.h:58:0, > from ../../../../../drivers/acpi/acpica/utstring.c:44: > ../../../../../include/acpi/actypes.h:130:34: error: conflicting types > for 's64' > typedef signed long long s64; >^ > In file included > from /opt/aarch64-linux-gnu/libc/usr/include/asm-generic/types.h:6:0 > from /opt/aarch64-linux-gnu/libc/usr/include/asm/types.h:1, > from ../../../../../include/uapi/linux/types.h:4, > from ../../../../../include/linux/types.h:5, > from /opt/aarch64-linux-gnu/libc/usr/include/asm/sigcontext.h:19, > from /opt/aarch64-linux-gnu/libc/usr/include/bits/sigcontext.h:27, > from /opt/aarch64-linux-gnu/libc/usr/include/signal.h:308, > from ../../../../../include/acpi/platform/acenv.h:365, > from ../../../../../include/acpi/acpi.h:56, > from ./acpidump.h:55, > from ../../os_specific/service_layers/oslinuxtbl.c:44: > ../../../../../include/asm-generic/int-ll64.h:24:26: note: previous > declaration of 's64' was here > typedef signed long long s64; >^ > Fix this compile problem. This looks like a conflict between asm-generic/int-ll64.h and actypes.h. When a build environment actually has s64 definition. ACPICA shouldn't define it. ACPICA should define ACPI_USE_SYSTEM_INTTYPES instead. However it is not clear if a Linux userspace should be aware of s64. We couldn't see this issue in other arch builds. So I wonder if this is just a missing "#ifdef __KERNEL__" in asm-generic/int-ll64.h. If Linux should be aware of s64. Then ACPICA definition of s64 should be disabled by defining ACPI_USE_SYSTEM_INTTYPES. Since this is a post-ACPICA-release issue. You should only fix it in tools/power/acpi/Makefile*. So I think this patch is not a right fix, but a wrong workaround. It can easily cause regressions in other ACPICA builds. > > Fixes: e323c02dee59 ("ACPICA: MSVC9: Fix inclusion order issue") > Signed-off-by: Yisheng Xie > --- > include/acpi/platform/acenv.h | 4 > 1 file changed, 4 insertions(+) > > diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h > index 34cce72..0089fa0 100644 > --- a/include/acpi/platform/acenv.h > +++ b/include/acpi/platform/acenv.h > @@ -361,9 +361,13 @@ > #include > #include > #include > +#ifdef __aarch64__ > +#include > +#else > #include > #include > #endif > +#endif > > #endif /* ACPI_USE_STANDARD_HEADERS */ We shouldn't rely on inclusion orders to fix this issue. It can easily cause order problem on other ACPICA build environment. Thanks Lv