Message ID | 1479185547-2873-3-git-send-email-boris.ostrovsky@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Nov 14, 2016 at 11:52:27PM -0500, Boris Ostrovsky wrote: > There is no reason to build, for example, dsdt_pvh.asl for hvmloader. We > pass which DSDTs to build via DSDT_FILES parameter. > > If DSDT_FILES is empty all DSDTs for a particular architecture will be built. > > Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Acked-by: Wei Liu <wei.liu2@citrix.com> This doesn't seem to be strictly necessary for 4.8 though.
> @@ -119,7 +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 > + $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES)" I think this could be left out - there's no issue cleaning up a wider set of files. Namely during the transition just imagine someone running a "clean" after having pulled your change. > --- a/tools/libacpi/Makefile > +++ b/tools/libacpi/Makefile > @@ -21,9 +21,12 @@ endif > > MK_DSDT = $(ACPI_BUILD_DIR)/mk_dsdt > > -C_SRC-$(CONFIG_X86) = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c > +C_SRC-$(CONFIG_X86) = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c dsdt_pvh.c > C_SRC-$(CONFIG_ARM_64) = dsdt_anycpu_arm.c > -C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, dsdt_pvh.c $(C_SRC-y)) > +ifeq ($(DSDT_FILES),) > +DSDT_FILES = $(C_SRC-y) > +endif DSDT_FILES ?= $(C_SRC-y) Jan
On 11/15/2016 01:17 AM, Wei Liu wrote: > On Mon, Nov 14, 2016 at 11:52:27PM -0500, Boris Ostrovsky wrote: >> There is no reason to build, for example, dsdt_pvh.asl for hvmloader. We >> pass which DSDTs to build via DSDT_FILES parameter. >> >> If DSDT_FILES is empty all DSDTs for a particular architecture will be built. >> >> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> > Acked-by: Wei Liu <wei.liu2@citrix.com> > > This doesn't seem to be strictly necessary for 4.8 though. Right. In fact, I'd argue that even the first patch could wait until after 4.8 is out given that we are quite late in RC cycle now and it is not fixing any bugs. -boris
On 15/11/16 13:35, Boris Ostrovsky wrote: > On 11/15/2016 01:17 AM, Wei Liu wrote: >> On Mon, Nov 14, 2016 at 11:52:27PM -0500, Boris Ostrovsky wrote: >>> There is no reason to build, for example, dsdt_pvh.asl for hvmloader. We >>> pass which DSDTs to build via DSDT_FILES parameter. >>> >>> If DSDT_FILES is empty all DSDTs for a particular architecture will be built. >>> >>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> >> Acked-by: Wei Liu <wei.liu2@citrix.com> >> >> This doesn't seem to be strictly necessary for 4.8 though. > Right. > > In fact, I'd argue that even the first patch could wait until after 4.8 > is out given that we are quite late in RC cycle now and it is not fixing > any bugs. Patch 1 should definitely be taken into 4.8, so we don't end up with one release of Xen with a dual-licensed libacpi. ~Andrew
On 15/11/2016 13:45, "Andrew Cooper" <Andrew.Cooper3@citrix.com> wrote: >On 15/11/16 13:35, Boris Ostrovsky wrote: >> On 11/15/2016 01:17 AM, Wei Liu wrote: >>> On Mon, Nov 14, 2016 at 11:52:27PM -0500, Boris Ostrovsky wrote: >>>> There is no reason to build, for example, dsdt_pvh.asl for hvmloader. >>>>We >>>> pass which DSDTs to build via DSDT_FILES parameter. >>>> >>>> If DSDT_FILES is empty all DSDTs for a particular architecture will >>>>be built. >>>> >>>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> >>> Acked-by: Wei Liu <wei.liu2@citrix.com> >>> >>> This doesn't seem to be strictly necessary for 4.8 though. >> Right. >> >> In fact, I'd argue that even the first patch could wait until after 4.8 >> is out given that we are quite late in RC cycle now and it is not fixing >> any bugs. > >Patch 1 should definitely be taken into 4.8, so we don't end up with one >release of Xen with a dual-licensed libacpi. +1 Lars
diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index 002ff18..bb5b92f 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -69,14 +69,14 @@ all: acpi subdirs-all .PHONY: acpi acpi: - $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) + $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES)" rombios.o: roms.inc smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\"" 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 +DSDT_FILES = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c +ACPI_OBJS = $(patsubst %.c,%.o,$(DSDT_FILES)) build.o static_tables.o $(ACPI_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\" CFLAGS += -I$(ACPI_PATH) vpath build.c $(ACPI_PATH) @@ -119,7 +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 + $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES)" clean .PHONY: distclean distclean: clean diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile index 506d85e..7b3ec12 100644 --- a/tools/libacpi/Makefile +++ b/tools/libacpi/Makefile @@ -21,9 +21,12 @@ endif MK_DSDT = $(ACPI_BUILD_DIR)/mk_dsdt -C_SRC-$(CONFIG_X86) = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c +C_SRC-$(CONFIG_X86) = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c dsdt_pvh.c C_SRC-$(CONFIG_ARM_64) = dsdt_anycpu_arm.c -C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, dsdt_pvh.c $(C_SRC-y)) +ifeq ($(DSDT_FILES),) +DSDT_FILES = $(C_SRC-y) +endif +C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, $(DSDT_FILES)) H_SRC = $(addprefix $(ACPI_BUILD_DIR)/, ssdt_s3.h ssdt_s4.h ssdt_pm.h ssdt_tpm.h) # Suffix for temporary files. diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index af0a3ad..1133ed5 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile @@ -76,9 +76,9 @@ LIBXL_OBJS-y += libxl_no_colo.o endif ACPI_PATH = $(XEN_ROOT)/tools/libacpi -ACPI_FILES = dsdt_pvh.c -ACPI_OBJS = $(patsubst %.c,%.o,$(ACPI_FILES)) build.o static_tables.o -$(ACPI_FILES): acpi +DSDT_FILES-$(CONFIG_X86) = dsdt_pvh.c +ACPI_OBJS = $(patsubst %.c,%.o,$(DSDT_FILES-y)) build.o static_tables.o +$(DSDT_FILES-y): acpi $(ACPI_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/libxl_x86_acpi.h\" vpath build.c $(ACPI_PATH)/ vpath static_tables.c $(ACPI_PATH)/ @@ -86,14 +86,15 @@ LIBXL_OBJS-$(CONFIG_X86) += $(ACPI_OBJS) .PHONY: acpi acpi: - $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) + $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" LIBXL_OBJS-$(CONFIG_X86) += libxl_cpuid.o libxl_x86.o libxl_psr.o libxl_x86_acpi.o LIBXL_OBJS-$(CONFIG_ARM) += libxl_nocpuid.o libxl_arm.o libxl_libfdt_compat.o ifeq ($(CONFIG_ARM_64),y) -LIBXL_OBJS-y += libxl_arm_acpi.o dsdt_anycpu_arm.o +DSDT_FILES-y = dsdt_anycpu_arm.c +LIBXL_OBJS-y += libxl_arm_acpi.o $(patsubst %.c,%.o,$(DSDT_FILES-y)) dsdt_anycpu_arm.c: - $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) + $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" else LIBXL_OBJS-$(CONFIG_ARM) += libxl_arm_no_acpi.o endif @@ -330,7 +331,7 @@ clean: $(RM) -f testidl.c.new testidl.c *.api-ok $(RM) -f xenlight.pc $(RM) -f xlutil.pc - $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean + $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" clean distclean: clean $(RM) -f xenlight.pc.in xlutil.pc.in
There is no reason to build, for example, dsdt_pvh.asl for hvmloader. We pass which DSDTs to build via DSDT_FILES parameter. If DSDT_FILES is empty all DSDTs for a particular architecture will be built. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> --- tools/firmware/hvmloader/Makefile | 8 ++++---- tools/libacpi/Makefile | 7 +++++-- tools/libxl/Makefile | 15 ++++++++------- 3 files changed, 17 insertions(+), 13 deletions(-)