From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a71V5-0002rM-4G for qemu-devel@nongnu.org; Thu, 10 Dec 2015 08:43:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a71V0-0006rZ-UK for qemu-devel@nongnu.org; Thu, 10 Dec 2015 08:43:15 -0500 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:34833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a71V0-0006rI-Ls for qemu-devel@nongnu.org; Thu, 10 Dec 2015 08:43:10 -0500 Received: by mail-wm0-x231.google.com with SMTP id u63so24455763wmu.0 for ; Thu, 10 Dec 2015 05:43:10 -0800 (PST) References: <1449704528-289297-1-git-send-email-imammedo@redhat.com> <1449704528-289297-23-git-send-email-imammedo@redhat.com> From: Marcel Apfelbaum Message-ID: <5669816C.4080203@gmail.com> Date: Thu, 10 Dec 2015 15:43:08 +0200 MIME-Version: 1.0 In-Reply-To: <1449704528-289297-23-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 22/74] acpi: extend aml_or() to accept target argument Reply-To: marcel@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , qemu-devel@nongnu.org On 12/10/2015 01:41 AM, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > hw/acpi/aml-build.c | 4 ++-- > hw/arm/virt-acpi-build.c | 6 +++--- > hw/i386/acpi-build.c | 3 ++- > include/hw/acpi/aml-build.h | 2 +- > 4 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c > index 8347299..4f62512 100644 > --- a/hw/acpi/aml-build.c > +++ b/hw/acpi/aml-build.c > @@ -505,9 +505,9 @@ Aml *aml_and(Aml *arg1, Aml *arg2) > } > > /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefOr */ > -Aml *aml_or(Aml *arg1, Aml *arg2) > +Aml *aml_or(Aml *arg1, Aml *arg2, Aml *dst) > { > - return build_opcode_2arg_dst(0x7D /* OrOp */, arg1, arg2, NULL); > + return build_opcode_2arg_dst(0x7D /* OrOp */, arg1, arg2, dst); > } > > /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLOr */ > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c > index 38ab844..1cc98f5 100644 > --- a/hw/arm/virt-acpi-build.c > +++ b/hw/arm/virt-acpi-build.c > @@ -276,12 +276,12 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap, int irq, > aml_name("CTRL"))); > > ifctx1 = aml_if(aml_lnot(aml_equal(aml_arg(1), aml_int(0x1)))); > - aml_append(ifctx1, aml_store(aml_or(aml_name("CDW1"), aml_int(0x08)), > + aml_append(ifctx1, aml_store(aml_or(aml_name("CDW1"), aml_int(0x08), NULL), > aml_name("CDW1"))); > aml_append(ifctx, ifctx1); > > ifctx1 = aml_if(aml_lnot(aml_equal(aml_name("CDW3"), aml_name("CTRL")))); > - aml_append(ifctx1, aml_store(aml_or(aml_name("CDW1"), aml_int(0x10)), > + aml_append(ifctx1, aml_store(aml_or(aml_name("CDW1"), aml_int(0x10), NULL), > aml_name("CDW1"))); > aml_append(ifctx, ifctx1); > > @@ -290,7 +290,7 @@ static void acpi_dsdt_add_pci(Aml *scope, const MemMapEntry *memmap, int irq, > aml_append(method, ifctx); > > elsectx = aml_else(); > - aml_append(elsectx, aml_store(aml_or(aml_name("CDW1"), aml_int(4)), > + aml_append(elsectx, aml_store(aml_or(aml_name("CDW1"), aml_int(4), NULL), > aml_name("CDW1"))); > aml_append(elsectx, aml_return(aml_arg(3))); > aml_append(method, elsectx); > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c > index a705e96..fd8ccfc 100644 > --- a/hw/i386/acpi-build.c > +++ b/hw/i386/acpi-build.c > @@ -679,7 +679,8 @@ static Aml *build_prt(void) > > /* route[0] = 0x[slot]FFFF */ > aml_append(while_ctx, > - aml_store(aml_or(aml_shiftleft(slot, aml_int(16)), aml_int(0xFFFF)), > + aml_store(aml_or(aml_shiftleft(slot, aml_int(16)), aml_int(0xFFFF), > + NULL), > aml_index(route, aml_int(0)))); > /* route[1] = pin & 3 */ > aml_append(while_ctx, > diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h > index 9dd8370..3be727e 100644 > --- a/include/hw/acpi/aml-build.h > +++ b/include/hw/acpi/aml-build.h > @@ -232,7 +232,7 @@ Aml *aml_to_hexstring(Aml *src, Aml *dst); > Aml *aml_to_buffer(Aml *src, Aml *dst); > Aml *aml_store(Aml *val, Aml *target); > Aml *aml_and(Aml *arg1, Aml *arg2); > -Aml *aml_or(Aml *arg1, Aml *arg2); > +Aml *aml_or(Aml *arg1, Aml *arg2, Aml *dst); > Aml *aml_lor(Aml *arg1, Aml *arg2); > Aml *aml_shiftleft(Aml *arg1, Aml *count); > Aml *aml_shiftright(Aml *arg1, Aml *count, Aml *dst); > Reviewed-by: Marcel Apfelbaum