From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Mammedov Subject: Re: [PATCH v3 2/8] acpi: add aml_concatenate() Date: Mon, 15 Feb 2016 10:19:33 +0100 Message-ID: <20160215101933.4fe44e5e@nial.brq.redhat.com> References: <1455439865-75784-1-git-send-email-guangrong.xiao@linux.intel.com> <1455439865-75784-3-git-send-email-guangrong.xiao@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: pbonzini@redhat.com, gleb@kernel.org, mtosatti@redhat.com, stefanha@redhat.com, mst@redhat.com, rth@twiddle.net, ehabkost@redhat.com, dan.j.williams@intel.com, kvm@vger.kernel.org, qemu-devel@nongnu.org To: Xiao Guangrong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:56075 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751791AbcBOJTh (ORCPT ); Mon, 15 Feb 2016 04:19:37 -0500 In-Reply-To: <1455439865-75784-3-git-send-email-guangrong.xiao@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 14 Feb 2016 16:50:59 +0800 Xiao Guangrong wrote: > It will be used by nvdimm acpi > > Signed-off-by: Xiao Guangrong > --- > hw/acpi/aml-build.c | 8 ++++++++ > include/hw/acpi/aml-build.h | 1 + > 2 files changed, 9 insertions(+) > > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c > index 2cc3211..3362cc4 100644 > --- a/hw/acpi/aml-build.c > +++ b/hw/acpi/aml-build.c > @@ -1437,6 +1437,14 @@ Aml *aml_alias(const char *source_object, const char *alias_object) > return var; > } > > +/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefConcat */ > +Aml *aml_concatenate(Aml *source1, Aml *source2, Aml *target) > +{ > + assert(target); you don't need assert here > + return build_opcode_2arg_dst(0x73 /* ConcatOp */, source1, source2, > + target); > +} > + > void > build_header(GArray *linker, GArray *table_data, > AcpiTableHeader *h, const char *sig, int len, uint8_t rev, > diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h > index 8ef10ad..735c34a 100644 > --- a/include/hw/acpi/aml-build.h > +++ b/include/hw/acpi/aml-build.h > @@ -355,6 +355,7 @@ Aml *aml_touuid(const char *uuid); > Aml *aml_unicode(const char *str); > Aml *aml_derefof(Aml *arg); > Aml *aml_sizeof(Aml *arg); > +Aml *aml_concatenate(Aml *source1, Aml *source2, Aml *target); > > void > build_header(GArray *linker, GArray *table_data,