From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YG6OX-0000kr-DW for qemu-devel@nongnu.org; Tue, 27 Jan 2015 08:41:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YG6OR-0000So-Vs for qemu-devel@nongnu.org; Tue, 27 Jan 2015 08:41:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YG6OR-0000Se-O3 for qemu-devel@nongnu.org; Tue, 27 Jan 2015 08:41:23 -0500 Date: Tue, 27 Jan 2015 15:41:11 +0200 From: "Michael S. Tsirkin" Message-ID: <20150127134111.GB8947@redhat.com> References: <1421938231-25698-1-git-send-email-imammedo@redhat.com> <1421938231-25698-22-git-send-email-imammedo@redhat.com> <54C7920A.3000308@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54C7920A.3000308@huawei.com> Subject: Re: [Qemu-devel] [PATCH v2 21/47] acpi: add acpi_resource_template() helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Claudio Fontana Cc: Igor Mammedov , drjones@redhat.com, marcel.a@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com On Tue, Jan 27, 2015 at 02:26:34PM +0100, Claudio Fontana wrote: > Hello Igor, > > On 22.01.2015 15:50, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > hw/acpi/acpi-build-utils.c | 8 ++++++++ > > include/hw/acpi/acpi-build-utils.h | 1 + > > 2 files changed, 9 insertions(+) > > > > diff --git a/hw/acpi/acpi-build-utils.c b/hw/acpi/acpi-build-utils.c > > index 2d5e77a..32a4377 100644 > > --- a/hw/acpi/acpi-build-utils.c > > +++ b/hw/acpi/acpi-build-utils.c > > @@ -493,6 +493,14 @@ AcpiAml GCC_FMT_ATTR(1, 2) acpi_device(const char *name_format, ...) > > return var; > > } > > > > > +/* ResourceTemplate marcos helper */ > > Since you have been so careful about putting references to the spec everywhere else, > what about adding something for ResourceTemplate macros too (note typo above)? > > For example 19.2.3 "ASL Resource Templates" if that's the right one. (I am looking at version 5.1) Pls don't, pls refer to the oldest spec that has support for a given feature, not the newest one. > Thanks, > > Claudio > > > +AcpiAml acpi_resource_template(void) > > +{ > > + /* ResourceTemplate is a buffer of Resources with EndTag at the end */ > > + AcpiAml var = aml_allocate_internal(0x11 /* BufferOp */, RES_TEMPLATE); > > + return var; > > +} > > + > > /* ACPI 5.0: 20.2.5.4 Type 2 Opcodes Encoding: DefBuffer */ > > AcpiAml acpi_buffer(void) > > { > > diff --git a/include/hw/acpi/acpi-build-utils.h b/include/hw/acpi/acpi-build-utils.h > > index a79c085..594fae7 100644 > > --- a/include/hw/acpi/acpi-build-utils.h > > +++ b/include/hw/acpi/acpi-build-utils.h > > @@ -46,6 +46,7 @@ AcpiAml acpi_method(const char *name, int arg_count); > > AcpiAml GCC_FMT_ATTR(1, 2) acpi_scope(const char *name_format, ...); > > AcpiAml GCC_FMT_ATTR(1, 2) acpi_device(const char *name_format, ...); > > AcpiAml acpi_buffer(void); > > +AcpiAml acpi_resource_template(void); > > AcpiAml acpi_package(uint8_t num_elements); > > > > /* other helpers */ > > > >