From patchwork Tue Nov 15 04:52:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9428991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C2AD60469 for ; Tue, 15 Nov 2016 04:55:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5996A28B3E for ; Tue, 15 Nov 2016 04:55:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D63E28B57; Tue, 15 Nov 2016 04:55:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5FB0E28B3E for ; Tue, 15 Nov 2016 04:55:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6Vjl-00065B-9W; Tue, 15 Nov 2016 04:52:49 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6Vjk-00064j-4y for xen-devel@lists.xen.org; Tue, 15 Nov 2016 04:52:48 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id 72/5A-13537-F949A285; Tue, 15 Nov 2016 04:52:47 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsUyZ7p8oO68KVo RBgt/KFgs+biYxYHR4+ju30wBjFGsmXlJ+RUJrBmdJx6wF2xLqziz4yRbA+MGvy5GLg4hgQ4m iQmLnzJBOF8YJT4/vM0M4WxglPi77CYbhDOJUWLLs9dAGU4ONgEjibNHpzOC2CIC0hLXPl9mB CliFvjDKLF5+UuwhLCAr8Sjo3/ZQWwWAVWJvqXHmEBsXgFPiW2X2thAbAkBOYmb5zrBhnIKeE ls29rPCmILAdW837GFEaLGWKJvVh/LBEa+BYwMqxg1ilOLylKLdI1M9ZKKMtMzSnITM3N0DQ1 M9XJTi4sT01NzEpOK9ZLzczcxAsOlnoGBcQfjrna/Q4ySHExKorwr67QihPiS8lMqMxKLM+KL SnNSiw8xynBwKEnwckwGygkWpaanVqRl5gADFyYtwcGjJMIrCJLmLS5IzC3OTIdInWI05niz6 +UDJo49s149YBJiycvPS5US5/0xCahUAKQ0ozQPbhAsoi4xykoJ8zIyMDAI8RSkFuVmlqDKv2 IU52BUEuZlAlnIk5lXArfvFdApTECn7DLXADmlJBEhJdXAWOvAbS4mlfyqVLs1yNGUXeTR1/U ugj0VufmBvhxa9SsruRinR2os4zjwRXjLDyXlwKwb/OZSTyMXcCcE3QgWUwmq2BUZ6auSGZpr cPEQN8NSrnBr7p2vfjrM1pGbJi5+yfDQUW3zmqy3pkw3lq8tKdF8qr77HhvvlkvTfrM8O6zfx bFLoEKJpTgj0VCLuag4EQCC6K+XowIAAA== X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-8.tower-206.messagelabs.com!1479185564!70116841!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 9.0.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27162 invoked from network); 15 Nov 2016 04:52:45 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-8.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Nov 2016 04:52:45 -0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uAF4qcTQ013015 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 15 Nov 2016 04:52:38 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uAF4qbhW018018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 15 Nov 2016 04:52:37 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uAF4qZvK031978; Tue, 15 Nov 2016 04:52:35 GMT Received: from ostr-laptop.us.oracle.com (/10.154.105.110) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 14 Nov 2016 20:52:35 -0800 From: Boris Ostrovsky To: xen-devel@lists.xen.org Date: Mon, 14 Nov 2016 23:52:26 -0500 Message-Id: <1479185547-2873-2-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479185547-2873-1-git-send-email-boris.ostrovsky@oracle.com> References: <1479185547-2873-1-git-send-email-boris.ostrovsky@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Cc: lars.kurth@citrix.com, wei.liu2@citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, Boris Ostrovsky , Ken Lancaster Subject: [Xen-devel] [PATCH 1/2] tools/libacpi: Re-licence remaining GPL code to LGPLv2.1 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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") Signed-off-by: Boris Ostrovsky Acked-by: Ken Lancaster Reviewed-by: Wei Liu Acked-by: Jan Beulich --- CC: Ken Lancaster -- 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 diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index 77d7551..002ff18 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -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 diff --git a/tools/libacpi/COPYING b/tools/libacpi/COPYING index 5f2f87e..063062b 100644 --- a/tools/libacpi/COPYING +++ b/tools/libacpi/COPYING @@ -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 diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile index b79db47..506d85e 100644 --- a/tools/libacpi/Makefile +++ b/tools/libacpi/Makefile @@ -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}' $< > $@.1.$(TMP_SUFFIX) - # Strip license comment - sed '1,/\*\//d' $@.1.$(TMP_SUFFIX) > $@.$(TMP_SUFFIX) - rm -f $@.1.$(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}' $< > $@.1.$(TMP_SUFFIX) - # Strip license comment - sed '1,/\*\//d' $@.1.$(TMP_SUFFIX) > $@.$(TMP_SUFFIX) - rm -f $@.1.$(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{" > $@ diff --git a/tools/libacpi/dsdt.asl b/tools/libacpi/dsdt.asl index 2db40e4..fa8ff31 100644 --- a/tools/libacpi/dsdt.asl +++ b/tools/libacpi/dsdt.asl @@ -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) + } } diff --git a/tools/libacpi/gpl/COPYING b/tools/libacpi/gpl/COPYING deleted file mode 100644 index f995ef6..0000000 --- a/tools/libacpi/gpl/COPYING +++ /dev/null @@ -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 - - -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. diff --git a/tools/libacpi/gpl/mk_dsdt_gpl.sh b/tools/libacpi/gpl/mk_dsdt_gpl.sh deleted file mode 100755 index 38fe01a..0000000 --- a/tools/libacpi/gpl/mk_dsdt_gpl.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh - -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along with -# this program; If not, see . -# - -cat <<'EndOfASL' - /* Beginning of GPL-only code */ - - /* _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) - } -EndOfASL - -# PCI-ISA link definitions -# BUFA: List of ISA IRQs available for linking to PCI INTx. -# BUFB: IRQ descriptor for returning from link-device _CRS methods. -cat <<'EndOfASL' - Scope ( \_SB.PCI0 ) { - Name ( BUFA, ResourceTemplate() { IRQ(Level, ActiveLow, Shared) { 5, 10, 11 } } ) - Name ( BUFB, Buffer() { 0x23, 0x00, 0x00, 0x18, 0x79, 0 } ) - CreateWordField ( BUFB, 0x01, IRQV ) -EndOfASL - -for i in $(seq 1 4) -do - link=`echo "A B C D" | cut -d" " -f $i` - cat <