linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zheng, Lv" <lv.zheng@intel.com>
To: "Zheng, Lv" <lv.zheng@intel.com>,
	Yisheng Xie <xieyisheng1@huawei.com>,
	"Moore, Robert" <robert.moore@intel.com>,
	"Wysocki, Rafael J" <rafael.j.wysocki@intel.com>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"wmiles@sgl.com" <wmiles@sgl.com>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"devel@acpica.org" <devel@acpica.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"guohanjun@huawei.com" <guohanjun@huawei.com>,
	"wangxiongfeng2@huawei.com" <wangxiongfeng2@huawei.com>
Subject: RE: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
Date: Fri, 21 Oct 2016 19:40:20 +0000	[thread overview]
Message-ID: <1AE640813FDE7649BE1B193DEA596E886A256F1E@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1AE640813FDE7649BE1B193DEA596E886A256324@SHSMSX101.ccr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 3068 bytes --]

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-owner@vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Zheng,
> Lv
> Subject: RE: [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64
> 
> Hi,
> 
> > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-owner@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 <signal.h> 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 majordomo@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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: lv-tools1.patch --]
[-- Type: application/octet-stream, Size: 3305 bytes --]

From: Lv Zheng <lv.zheng@intel.com>
Subject: [PATCH] tools/power/acpi: Remove direct kernel source include reference

ACPICA tools trickily uses integer types, and trickily includes kernel
include directory directly, which breaks tools build for some cross
compilers. This patch fixes this build issue.

Reported-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
Index: linux-acpica/tools/power/acpi/Makefile
===================================================================
--- linux-acpica.orig/tools/power/acpi/Makefile
+++ linux-acpica/tools/power/acpi/Makefile
@@ -11,11 +11,17 @@
 include ../../scripts/Makefile.include
 
 all: acpidbg acpidump ec
-clean: acpidbg_clean acpidump_clean ec_clean
+clean: acpidbg_clean acpidump_clean include_clean ec_clean
 install: acpidbg_install acpidump_install ec_install
 uninstall: acpidbg_uninstall acpidump_uninstall ec_uninstall
+include/acpi:
+	mkdir -p include
+	ln -s ../../../../include/acpi include/acpi
+include_clean:
+	rm -f include/acpi
+	rm -rf include
 
-acpidbg acpidump ec: FORCE
+acpidbg acpidump ec: include/acpi FORCE
 	$(call descend,tools/$@,all)
 acpidbg_clean acpidump_clean ec_clean:
 	$(call descend,tools/$(@:_clean=),clean)
Index: linux-acpica/tools/power/acpi/tools/acpidbg/Makefile
===================================================================
--- linux-acpica.orig/tools/power/acpi/tools/acpidbg/Makefile
+++ linux-acpica/tools/power/acpi/tools/acpidbg/Makefile
@@ -19,7 +19,7 @@ vpath %.c \
 CFLAGS += -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGGER\
 	-I.\
 	-I../../../../../drivers/acpi/acpica\
-	-I../../../../../include
+	-I../../include
 LDFLAGS += -lpthread
 TOOL_OBJS = \
 	acpidbg.o
Index: linux-acpica/tools/power/acpi/tools/acpidbg/acpidbg.c
===================================================================
--- linux-acpica.orig/tools/power/acpi/tools/acpidbg/acpidbg.c
+++ linux-acpica/tools/power/acpi/tools/acpidbg/acpidbg.c
@@ -12,10 +12,16 @@
 #include <acpi/acpi.h>
 
 /* Headers not included by include/acpi/platform/aclinux.h */
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <error.h>
 #include <stdbool.h>
 #include <fcntl.h>
 #include <assert.h>
-#include <linux/circ_buf.h>
+#include <sys/select.h>
+#include "../../../../../include/linux/circ_buf.h"
 
 #define ACPI_AML_FILE		"/sys/kernel/debug/acpi/acpidbg"
 #define ACPI_AML_SEC_TICK	1
Index: linux-acpica/tools/power/acpi/tools/acpidump/Makefile
===================================================================
--- linux-acpica.orig/tools/power/acpi/tools/acpidump/Makefile
+++ linux-acpica/tools/power/acpi/tools/acpidump/Makefile
@@ -21,7 +21,7 @@ vpath %.c \
 	../../os_specific/service_layers
 CFLAGS += -DACPI_DUMP_APP -I.\
 	-I../../../../../drivers/acpi/acpica\
-	-I../../../../../include
+	-I../../include
 TOOL_OBJS = \
 	apdump.o\
 	apfiles.o\
Index: linux-acpica/include/acpi/platform/aclinux.h
===================================================================
--- linux-acpica.orig/include/acpi/platform/aclinux.h
+++ linux-acpica/include/acpi/platform/aclinux.h
@@ -191,6 +191,9 @@
 #ifndef __init
 #define __init
 #endif
+#ifndef __iomem
+#define __iomem
+#endif
 
 /* Host-dependent types and defines for user-space ACPICA */
 

  reply	other threads:[~2016-10-21 19:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13 23:51 [PATCH] ACPICA: arm64: fix compile apci tools fail for arm64 Yisheng Xie
2016-10-17 22:26 ` Zheng, Lv
2016-10-18 11:46   ` Yisheng Xie
2016-10-18 22:07     ` Zheng, Lv
2016-10-20  1:45       ` Yisheng Xie
2016-10-20 18:42         ` Zheng, Lv
2016-10-21 19:40           ` Zheng, Lv [this message]
2016-10-24  8:01             ` Yisheng Xie
2016-10-24 14:25               ` Zheng, Lv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1AE640813FDE7649BE1B193DEA596E886A256F1E@SHSMSX101.ccr.corp.intel.com \
    --to=lv.zheng@intel.com \
    --cc=devel@acpica.org \
    --cc=guohanjun@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    --cc=wangxiongfeng2@huawei.com \
    --cc=wmiles@sgl.com \
    --cc=xieyisheng1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).