Re: [Xen-devel] [PATCH v2 14/23] acpi: Move ACPI code to tools/libacpi

2016-08-16 Thread Wei Liu
On Tue, Aug 16, 2016 at 05:36:03PM +0800, Shannon Zhao wrote:
> 
> 
> On 2016/8/16 16:29, Wei Liu wrote:
> > On Tue, Aug 16, 2016 at 04:13:06PM +0800, Shannon Zhao wrote:
> > [...]
> >> > Not sure if I do something wrong, but I got bellow errors when compiling
> >> > this series on x86 just using "./autogen.sh;./configure;make tools".
> >> > 
> >> > In file included from tcgbios.c:26:0:
> >> > ../util.h:4:39: fatal error: ../hvmloader/acpi/acpi2_0.h: No such file
> >> > or directory
> >> >  #include "../hvmloader/acpi/acpi2_0.h"
> >> > 
> >> > In file included from tpm_drivers.c:24:0:
> >> > ../util.h:4:39: fatal error: ../hvmloader/acpi/acpi2_0.h: No such file
> >> > or directory
> >> >  #include "../hvmloader/acpi/acpi2_0.h"
> >> > 
> > I don't think this is caused by your environment.
> > 
> > Please rebase everything on top of staging. There is a fix there.
> You mean the commit "cc38370 hvmloader: include libacpi.h instead of
> acpi2_0.h in rombios.c", right?

Yes, that one.

But you're right. That one won't fix it for you.


> 
> If so, I don't think it's relevant to this problem because this patch
> moves acpi2_0.h under tools/libacpi/ but it doesn't update in the path
> in tools/firmware/rombios/32bit/util.h
> 

I think this is a bug in Boris's series. You can maybe work around it by
changing the include to point to the new location.

Wei.

> Thanks,
> -- 
> Shannon
> 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH v2 14/23] acpi: Move ACPI code to tools/libacpi

2016-08-16 Thread Shannon Zhao


On 2016/8/16 16:29, Wei Liu wrote:
> On Tue, Aug 16, 2016 at 04:13:06PM +0800, Shannon Zhao wrote:
> [...]
>> > Not sure if I do something wrong, but I got bellow errors when compiling
>> > this series on x86 just using "./autogen.sh;./configure;make tools".
>> > 
>> > In file included from tcgbios.c:26:0:
>> > ../util.h:4:39: fatal error: ../hvmloader/acpi/acpi2_0.h: No such file
>> > or directory
>> >  #include "../hvmloader/acpi/acpi2_0.h"
>> > 
>> > In file included from tpm_drivers.c:24:0:
>> > ../util.h:4:39: fatal error: ../hvmloader/acpi/acpi2_0.h: No such file
>> > or directory
>> >  #include "../hvmloader/acpi/acpi2_0.h"
>> > 
> I don't think this is caused by your environment.
> 
> Please rebase everything on top of staging. There is a fix there.
You mean the commit "cc38370 hvmloader: include libacpi.h instead of
acpi2_0.h in rombios.c", right?

If so, I don't think it's relevant to this problem because this patch
moves acpi2_0.h under tools/libacpi/ but it doesn't update in the path
in tools/firmware/rombios/32bit/util.h

Thanks,
-- 
Shannon


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH v2 14/23] acpi: Move ACPI code to tools/libacpi

2016-08-16 Thread Wei Liu
On Tue, Aug 16, 2016 at 04:13:06PM +0800, Shannon Zhao wrote:
[...]
> Not sure if I do something wrong, but I got bellow errors when compiling
> this series on x86 just using "./autogen.sh;./configure;make tools".
> 
> In file included from tcgbios.c:26:0:
> ../util.h:4:39: fatal error: ../hvmloader/acpi/acpi2_0.h: No such file
> or directory
>  #include "../hvmloader/acpi/acpi2_0.h"
> 
> In file included from tpm_drivers.c:24:0:
> ../util.h:4:39: fatal error: ../hvmloader/acpi/acpi2_0.h: No such file
> or directory
>  #include "../hvmloader/acpi/acpi2_0.h"
> 

I don't think this is caused by your environment.

Please rebase everything on top of staging. There is a fix there.

Wei.

> Thanks,
> -- 
> Shannon
> 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH v2 14/23] acpi: Move ACPI code to tools/libacpi

2016-08-16 Thread Shannon Zhao
Hi,

On 2016/8/5 5:06, Boris Ostrovsky wrote:
> Signed-off-by: Boris Ostrovsky 
> Acked-by: Jan Beulich 
> ---
> v2:
> * Minor cleanup of hvmloader's Makefile
> 
>  tools/firmware/hvmloader/Makefile  | 14 
> --
>  tools/firmware/hvmloader/ovmf.c|  2 +-
>  tools/{firmware/hvmloader/acpi => libacpi}/Makefile|  2 +-
>  tools/{firmware/hvmloader/acpi => libacpi}/README  |  0
>  tools/{firmware/hvmloader/acpi => libacpi}/acpi2_0.h   |  0
>  tools/{firmware/hvmloader/acpi => libacpi}/build.c |  0
>  tools/{firmware/hvmloader/acpi => libacpi}/dsdt.asl|  0
>  tools/{firmware/hvmloader/acpi => libacpi}/libacpi.h   |  0
>  tools/{firmware/hvmloader/acpi => libacpi}/mk_dsdt.c   |  0
>  tools/{firmware/hvmloader/acpi => libacpi}/ssdt_pm.asl |  0
>  tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s3.asl |  0
>  tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s4.asl |  0
>  tools/{firmware/hvmloader/acpi => libacpi}/ssdt_tpm.asl|  0
>  tools/{firmware/hvmloader/acpi => libacpi}/static_tables.c |  0
>  tools/{firmware/hvmloader/acpi => libacpi}/x86.h   |  0
>  15 files changed, 10 insertions(+), 8 deletions(-)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/Makefile (98%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/README (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/acpi2_0.h (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/build.c (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/dsdt.asl (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/libacpi.h (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/mk_dsdt.c (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_pm.asl (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s3.asl (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s4.asl (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_tpm.asl (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/static_tables.c (100%)
>  rename tools/{firmware/hvmloader/acpi => libacpi}/x86.h (100%)
> 
> diff --git a/tools/firmware/hvmloader/Makefile 
> b/tools/firmware/hvmloader/Makefile
> index db64a61..694d9f1 100644
> --- a/tools/firmware/hvmloader/Makefile
> +++ b/tools/firmware/hvmloader/Makefile
> @@ -20,9 +20,6 @@
>  XEN_ROOT = $(CURDIR)/../../..
>  include $(XEN_ROOT)/tools/firmware/Rules.mk
>  
> -export ACPI_BUILD_DIR=$(shell pwd)
> -SUBDIRS := acpi
> -
>  # The HVM loader is started in 32-bit mode at the address below:
>  LOADADDR = 0x10
>  
> @@ -67,16 +64,20 @@ ROMS += $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) 
> $(ETHERBOOT_ROMS)
>  endif
>  
>  .PHONY: all
> -all: subdirs-all
> +all: acpi subdirs-all
>   $(MAKE) hvmloader
>  
> +.PHONY: acpi
> +acpi:
> + $(MAKE) -C $(ACPI_PATH)  ACPI_BUILD_DIR=$(CURDIR)
> +
>  rombios.o: roms.inc
>  smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\""
>  
> -ACPI_PATH = ./acpi
> +ACPI_PATH = ../../libacpi
>  ACPI_FILES = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c
>  ACPI_OBJS = $(patsubst %.c,%.o,$(ACPI_FILES)) build.o static_tables.o
> -$(ACPI_OBJS): CFLAGS += -I. -DSTDUTILS=\"../util.h\"
> +$(ACPI_OBJS): CFLAGS += -I. -DSTDUTILS=\"$(CURDIR)/util.h\"

Not sure if I do something wrong, but I got bellow errors when compiling
this series on x86 just using "./autogen.sh;./configure;make tools".

In file included from tcgbios.c:26:0:
../util.h:4:39: fatal error: ../hvmloader/acpi/acpi2_0.h: No such file
or directory
 #include "../hvmloader/acpi/acpi2_0.h"

In file included from tpm_drivers.c:24:0:
../util.h:4:39: fatal error: ../hvmloader/acpi/acpi2_0.h: No such file
or directory
 #include "../hvmloader/acpi/acpi2_0.h"

Thanks,
-- 
Shannon


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH v2 14/23] acpi: Move ACPI code to tools/libacpi

2016-08-05 Thread Wei Liu
On Fri, Aug 05, 2016 at 04:43:51AM -0600, Jan Beulich wrote:
> >>> On 04.08.16 at 23:06,  wrote:
> > Signed-off-by: Boris Ostrovsky 
> > Acked-by: Jan Beulich 
> 
> There's a dependency this ack has which I came too think of only now:
> The move here results in a maintainership change, which should
> either be avoided (by updating ./MAINTAINERS at the same time), or
> we should agree on new maintainership (this stuff could likely also go
> under the ACPI entry).
> 

If Andrew and you are happy to continue maintaining ACPI related code,
I'm happy with that, too.

It is mostly code movement after all.

Wei.

> Jan
> 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH v2 14/23] acpi: Move ACPI code to tools/libacpi

2016-08-05 Thread Jan Beulich
>>> On 04.08.16 at 23:06,  wrote:
> Signed-off-by: Boris Ostrovsky 
> Acked-by: Jan Beulich 

There's a dependency this ack has which I came too think of only now:
The move here results in a maintainership change, which should
either be avoided (by updating ./MAINTAINERS at the same time), or
we should agree on new maintainership (this stuff could likely also go
under the ACPI entry).

Jan


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH v2 14/23] acpi: Move ACPI code to tools/libacpi

2016-08-04 Thread Boris Ostrovsky
Signed-off-by: Boris Ostrovsky 
Acked-by: Jan Beulich 
---
v2:
* Minor cleanup of hvmloader's Makefile

 tools/firmware/hvmloader/Makefile  | 14 --
 tools/firmware/hvmloader/ovmf.c|  2 +-
 tools/{firmware/hvmloader/acpi => libacpi}/Makefile|  2 +-
 tools/{firmware/hvmloader/acpi => libacpi}/README  |  0
 tools/{firmware/hvmloader/acpi => libacpi}/acpi2_0.h   |  0
 tools/{firmware/hvmloader/acpi => libacpi}/build.c |  0
 tools/{firmware/hvmloader/acpi => libacpi}/dsdt.asl|  0
 tools/{firmware/hvmloader/acpi => libacpi}/libacpi.h   |  0
 tools/{firmware/hvmloader/acpi => libacpi}/mk_dsdt.c   |  0
 tools/{firmware/hvmloader/acpi => libacpi}/ssdt_pm.asl |  0
 tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s3.asl |  0
 tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s4.asl |  0
 tools/{firmware/hvmloader/acpi => libacpi}/ssdt_tpm.asl|  0
 tools/{firmware/hvmloader/acpi => libacpi}/static_tables.c |  0
 tools/{firmware/hvmloader/acpi => libacpi}/x86.h   |  0
 15 files changed, 10 insertions(+), 8 deletions(-)
 rename tools/{firmware/hvmloader/acpi => libacpi}/Makefile (98%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/README (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/acpi2_0.h (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/build.c (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/dsdt.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/libacpi.h (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/mk_dsdt.c (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_pm.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s3.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s4.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_tpm.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/static_tables.c (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/x86.h (100%)

diff --git a/tools/firmware/hvmloader/Makefile 
b/tools/firmware/hvmloader/Makefile
index db64a61..694d9f1 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -20,9 +20,6 @@
 XEN_ROOT = $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
-export ACPI_BUILD_DIR=$(shell pwd)
-SUBDIRS := acpi
-
 # The HVM loader is started in 32-bit mode at the address below:
 LOADADDR = 0x10
 
@@ -67,16 +64,20 @@ ROMS += $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) 
$(ETHERBOOT_ROMS)
 endif
 
 .PHONY: all
-all: subdirs-all
+all: acpi subdirs-all
$(MAKE) hvmloader
 
+.PHONY: acpi
+acpi:
+   $(MAKE) -C $(ACPI_PATH)  ACPI_BUILD_DIR=$(CURDIR)
+
 rombios.o: roms.inc
 smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\""
 
-ACPI_PATH = ./acpi
+ACPI_PATH = ../../libacpi
 ACPI_FILES = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c
 ACPI_OBJS = $(patsubst %.c,%.o,$(ACPI_FILES)) build.o static_tables.o
-$(ACPI_OBJS): CFLAGS += -I. -DSTDUTILS=\"../util.h\"
+$(ACPI_OBJS): CFLAGS += -I. -DSTDUTILS=\"$(CURDIR)/util.h\"
 CFLAGS += -I$(ACPI_PATH)
 vpath build.c $(ACPI_PATH)
 vpath static_tables.c $(ACPI_PATH)
@@ -118,6 +119,7 @@ endif
 clean: subdirs-clean
rm -f roms.inc roms.inc.new acpi.h
rm -f hvmloader hvmloader.tmp *.o $(DEPS)
+   $(MAKE) -C $(ACPI_PATH)  ACPI_BUILD_DIR=$(CURDIR) clean
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/firmware/hvmloader/ovmf.c b/tools/firmware/hvmloader/ovmf.c
index b4bcc93..7878276 100644
--- a/tools/firmware/hvmloader/ovmf.c
+++ b/tools/firmware/hvmloader/ovmf.c
@@ -23,7 +23,7 @@
 
 #include "config.h"
 #include "smbios_types.h"
-#include "acpi/libacpi.h"
+#include "libacpi.h"
 #include "apic_regs.h"
 #include "../rombios/config.h"
 #include "util.h"
diff --git a/tools/firmware/hvmloader/acpi/Makefile b/tools/libacpi/Makefile
similarity index 98%
rename from tools/firmware/hvmloader/acpi/Makefile
rename to tools/libacpi/Makefile
index 6937ff4..816322f 100644
--- a/tools/firmware/hvmloader/acpi/Makefile
+++ b/tools/libacpi/Makefile
@@ -12,7 +12,7 @@
 # NU Lesser General Public License for more details.
 #
 
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 MK_DSDT = $(ACPI_BUILD_DIR)/mk_dsdt
diff --git a/tools/firmware/hvmloader/acpi/README b/tools/libacpi/README
similarity index 100%
rename from tools/firmware/hvmloader/acpi/README
rename to tools/libacpi/README
diff --git a/tools/firmware/hvmloader/acpi/acpi2_0.h b/tools/libacpi/acpi2_0.h
similarity index 100%
rename from tools/firmware/hvmloader/acpi/acpi2_0.h
rename to tools/libacpi/acpi2_0.h
diff --git a/tools/firmware/hvmloader/acpi/build.c b/tools/libacpi/build.c
similarity index 100%
rename from tools/firmware/hvmloader/acpi/build.c
rename to tools/libacpi/build.c
diff --git a/tools/firmware/hvmloader/acpi/dsdt.asl