libacpi updates
cover libacpi updates
First patch makes all DSDT tables to be licensed under LGPL.
Seconds patch updates makefiles to create only DSDT files that are needed by a particular component/architecture (some files were built unnecessarily). I haven't tested on ARM so if Julian or Shannon could give it a quick test I'd appreciate it.
Boris Ostrovsky (2):
tools/libacpi: Re-licence remaining GPL code to LGPLv2.1
libacpi: Be specific about which DSDT files to build
tools/firmware/hvmloader/Makefile | 11 ++-- tools/libacpi/COPYING | 12 ---- tools/libacpi/Makefile | 25 +++----- tools/libacpi/dsdt.asl | 11 ++++ tools/libacpi/gpl/COPYING | 22 ------- tools/libacpi/gpl/mk_dsdt_gpl.sh | 117 -------------------------------------- tools/libacpi/mk_dsdt.c | 68 +++++++++++++++++++++- tools/libxl/Makefile | 15 ++--- 8 files changed, 99 insertions(+), 182 deletions(-) delete mode 100644 tools/libacpi/gpl/COPYING delete mode 100755 tools/libacpi/gpl/mk_dsdt_gpl.sh
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 1/2 tools/libacpi: Re-licence remaining GPL code to LGPLv2.1
We now have permission from Lenovo to relicense commit 801d469ad8b2 ("[HVM] ACPI support patch 3 of 4: ACPI _PRT table") to LGPLv2.1
This essentially means reverting commits c3397311a658 ("acpi: Prevent GPL-only code from seeping into non-GPL binaries") and 26c4f0b8a4cf ("tools/libacpi: fix sed usage")
---
CC: Ken Lancaster <[email protected]>
--
tools/firmware/hvmloader/Makefile | 3 - tools/libacpi/COPYING | 12 ---- tools/libacpi/Makefile | 20 ++----- tools/libacpi/dsdt.asl | 11 ++++ tools/libacpi/gpl/COPYING | 22 ------- tools/libacpi/gpl/mk_dsdt_gpl.sh | 117 -------------------------------------- tools/libacpi/mk_dsdt.c | 68 +++++++++++++++++++++- 7 files changed, 83 insertions(+), 170 deletions(-) delete mode 100644 tools/libacpi/gpl/COPYING delete mode 100755 tools/libacpi/gpl/mk_dsdt_gpl.sh
tools/firmware/hvmloader/Makefile +0 -3
@@ -63,9 +63,6 @@ ROMBIOS_ROM := $(ROMBIOS_DIR)/BIOS-bochs-latest ROMS += $(ROMBIOS_ROM) $(STDVGA_ROM) $(CIRRUSVGA_ROM) $(ETHERBOOT_ROMS) endif -# Certain parts of ACPI builder are GPL-only -export GPL := y - .PHONY: all all: acpi subdirs-all $(MAKE) hvmloader
tools/libacpi/COPYING +0 -12
@@ -8,18 +8,6 @@ Where clause 3 is invoked in order to relicense under the GPL then this shall be considered to be GPL v2 only for files which have specified LGPL v2.1 only. -gpl sub-directory -================= -This directory contains a gpl sub-directory which contains code -licensed under the GPL v2, because we have not yet been able to get -the permission to relicense the relevant code to LGPL v2.1. See -gpl/COPYING for more information. - -The makefile in this component allows to build a GPL and LGPL only -variant of this library, the latter omits all GPL source code. - - - GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999
tools/libacpi/Makefile +5 -15
@@ -21,7 +21,7 @@ endif MK_DSDT = $(ACPI_BUILD_DIR)/mk_dsdt -C_SRC-$(GPL) = 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 C_SRC-$(CONFIG_ARM_64) = dsdt_anycpu_arm.c C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, dsdt_pvh.c $(C_SRC-y)) H_SRC = $(addprefix $(ACPI_BUILD_DIR)/, ssdt_s3.h ssdt_s4.h ssdt_pm.h ssdt_tpm.h)
@@ -45,30 +45,20 @@ $(H_SRC): $(ACPI_BUILD_DIR)/%.h: %.asl iasl $(MK_DSDT): mk_dsdt.c $(HOSTCC) $(HOSTCFLAGS) $(CFLAGS_xeninclude) -D__XEN_TOOLS__ -o $@ mk_dsdt.c -ifeq ($(GPL),y) -$(ACPI_BUILD_DIR)/dsdt_anycpu_qemu_xen.asl: dsdt.asl dsdt_acpi_info.asl gpl/mk_dsdt_gpl.sh $(MK_DSDT) +$(ACPI_BUILD_DIR)/dsdt_anycpu_qemu_xen.asl: dsdt.asl dsdt_acpi_info.asl $(MK_DSDT) # Remove last bracket - awk 'NR > 1 {print s} {s=$$0}' $< > [email protected].$(TMP_SUFFIX) - # Strip license comment - sed '1,/\*\//d' [email protected].$(TMP_SUFFIX) > $@.$(TMP_SUFFIX) - rm -f [email protected].$(TMP_SUFFIX) - $(SHELL) gpl/mk_dsdt_gpl.sh >> $@.$(TMP_SUFFIX) + awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX) cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX) $(MK_DSDT) --debug=$(debug) --dm-version qemu-xen >> $@.$(TMP_SUFFIX) mv -f $@.$(TMP_SUFFIX) $@ # NB. awk invocation is a portable alternative to 'head -n -1' -$(ACPI_BUILD_DIR)/dsdt_%cpu.asl: dsdt.asl dsdt_acpi_info.asl gpl/mk_dsdt_gpl.sh $(MK_DSDT) +$(ACPI_BUILD_DIR)/dsdt_%cpu.asl: dsdt.asl dsdt_acpi_info.asl $(MK_DSDT) # Remove last bracket - awk 'NR > 1 {print s} {s=$$0}' $< > [email protected].$(TMP_SUFFIX) - # Strip license comment - sed '1,/\*\//d' [email protected].$(TMP_SUFFIX) > $@.$(TMP_SUFFIX) - rm -f [email protected].$(TMP_SUFFIX) - $(SHELL) gpl/mk_dsdt_gpl.sh >> $@.$(TMP_SUFFIX) + awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX) cat dsdt_acpi_info.asl >> $@.$(TMP_SUFFIX) $(MK_DSDT) --debug=$(debug) --maxcpu $* >> $@.$(TMP_SUFFIX) mv -f $@.$(TMP_SUFFIX) $@ -endif $(ACPI_BUILD_DIR)/dsdt_pvh.asl: dsdt_acpi_info.asl $(MK_DSDT) printf "DefinitionBlock (\"DSDT.aml\", \"DSDT\", 5, \"Xen\", \"HVM\", 0)\n{" > $@
tools/libacpi/dsdt.asl +11 -0
@@ -442,4 +442,15 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "Xen", "HVM", 0) } } } + /* _S3 and _S4 are in separate SSDTs */ + Name (\_S5, Package (0x04) { + 0x00, /* PM1a_CNT.SLP_TYP */ + 0x00, /* PM1b_CNT.SLP_TYP */ + 0x00, /* reserved */ + 0x00 /* reserved */ + }) + Name(PICD, 0) + Method(_PIC, 1) { + Store(Arg0, PICD) + } }
tools/libacpi/gpl/COPYING deleted +0 -22
@@ -1,22 +0,0 @@ -Unlike files in the directory above that are licensed under GNU Lesser -General Public License version 2.1, files here are licensed under GNU -General Public License version 2. - -A copy of this license can be obtained at <http://www.gnu.org/licenses/> - - -INBOUND LICENSE - -Contributions to this directory are made under the LGPLv2.1 *only* as -described in the COPYING file of the parent directory. As LGPLv2.1 is -compatible with the GPLv2, the resulting file is GPLv2 when seen as a -whole. - -The intention of this inbound license, is to avoid having to ask -subsequent contributors to this directory for permission to change the -license from GPLv2 to LGPLv2.1, once we get permission from the -remaining copyright holders of this directory to change the license to -LGPLv2.1. - -Note: The only outstanding permission required to re-license this -directory to LGPLv2.1 is from Lenovo.
tools/libacpi/gpl/mk_dsdt_gpl.sh deleted +0 -117
117 lines not on this page · raw message
tools/libacpi/mk_dsdt.c +67 -1
80 lines not on this page · raw message
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH 1/2] tools/libacpi: Re-licence remaining GPL code to LGPLv2.1
Quoted 9 lines · Boris Ostrovsky
We now have permission from Lenovo to relicense commit
801d469ad8b2("[HVM] ACPI support patch 3 of 4: ACPI_PRTtable") to LGPLv2.1This essentially means reverting commits
c3397311a658("acpi: Prevent GPL-only code from seeping into non-GPL binaries") and26c4f0b8a4cf("tools/libacpi: fix sed usage")Signed-off-by Boris Ostrovsky <[email protected]>Acked-by Ken Lancaster <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 1/2] tools/libacpi: Re-licence remaining GPL code to LGPLv2.1
In reply to Boris OstrovskyQuoted 10 lines
Quoted 1 line
Quoted 1 line · On 15.11.16 at 05:52, <[email protected]> wrote:
We now have permission from Lenovo to relicense commit
801d469ad8b2("[HVM] ACPI support patch 3 of 4: ACPI_PRTtable") to LGPLv2.1This essentially means reverting commits
c3397311a658("acpi: Prevent GPL-only code from seeping into non-GPL binaries") and26c4f0b8a4cf("tools/libacpi: fix sed usage")Signed-off-by Boris Ostrovsky <[email protected]>Acked-by Ken Lancaster <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu
AppliedRe: [PATCH 1/2] tools/libacpi: Re-licence remaining GPL code to LGPLv2.1
In reply to Boris OstrovskyQuoted 9 lines · Boris Ostrovsky
We now have permission from Lenovo to relicense commit
801d469ad8b2("[HVM] ACPI support patch 3 of 4: ACPI_PRTtable") to LGPLv2.1This essentially means reverting commits
c3397311a658("acpi: Prevent GPL-only code from seeping into non-GPL binaries") and26c4f0b8a4cf("tools/libacpi: fix sed usage")Signed-off-by Boris Ostrovsky <[email protected]>Acked-by Ken Lancaster <[email protected]>
Applied
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH 2/2 libacpi: Be specific about which DSDT files to build
In reply to Boris OstrovskyThere 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.
--- tools/firmware/hvmloader/Makefile | 8 ++++---- tools/libacpi/Makefile | 7 +++++-- tools/libxl/Makefile | 15 ++++++++------- 3 files changed, 17 insertions(+), 13 deletions(-)
tools/firmware/hvmloader/Makefile +4 -4
@@ -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
tools/libacpi/Makefile +5 -2
@@ -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.
tools/libxl/Makefile +8 -7
@@ -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
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH 2/2] libacpi: Be specific about which DSDT files to build
Quoted 6 lines · Boris Ostrovsky
There is no reason to build, for example, dsdt_pvh.asl for hvmloader. We pass which DSDTs to build via
DSDT_FILESparameter.If
DSDT_FILESis empty all DSDTs for a particular architecture will be built.Signed-off-by Boris Ostrovsky <[email protected]>
This doesn't seem to be strictly necessary for 4.8 though.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 2/2] libacpi: Be specific about which DSDT files to build
Quoted 10 lines · Wei Liu
Quoted 6 lines · Boris Ostrovsky
There is no reason to build, for example, dsdt_pvh.asl for hvmloader. We pass which DSDTs to build via
DSDT_FILESparameter.If
DSDT_FILESis empty all DSDTs for a particular architecture will be built.Signed-off-by Boris Ostrovsky <[email protected]>Acked-by Wei Liu <[email protected]>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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 2/2] libacpi: Be specific about which DSDT files to build
Quoted 8 lines · Boris Ostrovsky
Quoted 7 lines · Wei Liu
Quoted 6 lines · Boris Ostrovsky
There is no reason to build, for example, dsdt_pvh.asl for hvmloader. We pass which DSDTs to build via
DSDT_FILESparameter.If
DSDT_FILESis empty all DSDTs for a particular architecture will be built.Signed-off-by Boris Ostrovsky <[email protected]>
Quoted 8 lines
Quoted 3 lines
Acked-by Wei Liu <[email protected]>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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 2/2] libacpi: Be specific about which DSDT files to build
Quoted 14 lines · Andrew Cooper
Quoted 13 lines · Boris Ostrovsky
Quoted 12 lines · Wei Liu
Quoted 8 lines · Boris Ostrovsky
There is no reason to build, for example, dsdt_pvh.asl for hvmloader. We
pass which DSDTs to build viaDSDT_FILESparameter.If
DSDT_FILESis empty all DSDTs for a particular architecture will be built.Signed-off-by Boris Ostrovsky <[email protected]>Acked-by Wei Liu <[email protected]>This doesn't seem to be strictly necessary for 4.8 though.
Quoted 8 lines
Quoted 5 lines
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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH 2/2] libacpi: Be specific about which DSDT files to build
In reply to Boris Ostrovskytools/firmware/hvmloader/Makefile endif · line 122
Quoted 6 lines
tools/firmware/hvmloader/Makefile +1
-1@@ -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.
tools/libacpi/Makefile endif · line 28
Quoted 13 lines
tools/libacpi/Makefile +4
-2@@ -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
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 6 lines · Boris Ostrovsky
First patch makes all DSDT tables to be licensed under LGPL.
Seconds patch updates makefiles to create only DSDT files that are needed by a particular component/architecture (some files were built unnecessarily). I haven't tested on ARM so if Julian or Shannon could give it a quick test I'd appreciate it.
And copying them would have been a good idea.
-boris
Quoted 5 lines
Boris Ostrovsky (2):
tools/libacpi: Re-licence remaining GPL code to LGPLv2.1
libacpi: Be specific about which DSDT files to build
Quoted 12 lines
tools/firmware/hvmloader/Makefile | 11 ++-- tools/libacpi/COPYING | 12 ---- tools/libacpi/Makefile | 25 +++----- tools/libacpi/dsdt.asl | 11 ++++ tools/libacpi/gpl/COPYING | 22 ------- tools/libacpi/gpl/mk_dsdt_gpl.sh | 117 -------------------------------------- tools/libacpi/mk_dsdt.c | 68 +++++++++++++++++++++- tools/libxl/Makefile | 15 ++--- 8 files changed, 99 insertions(+), 182 deletions(-) delete mode 100644 tools/libacpi/gpl/COPYING delete mode 100755 tools/libacpi/gpl/mk_dsdt_gpl.sh
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel