From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGRXL-0002sI-9H for qemu-devel@nongnu.org; Wed, 28 Jan 2015 07:16:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGRXF-0001bF-Oj for qemu-devel@nongnu.org; Wed, 28 Jan 2015 07:15:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGRXF-0001b4-GN for qemu-devel@nongnu.org; Wed, 28 Jan 2015 07:15:53 -0500 Date: Wed, 28 Jan 2015 13:15:46 +0100 From: Igor Mammedov Message-ID: <20150128131546.27fee80e@nial.brq.redhat.com> In-Reply-To: <54C7B0C9.7040603@huawei.com> References: <1421938231-25698-1-git-send-email-imammedo@redhat.com> <1421938231-25698-46-git-send-email-imammedo@redhat.com> <54C7B0C9.7040603@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 45/47] acpi: add acpi_iqr_no_flags() term List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Claudio Fontana Cc: pbonzini@redhat.com, drjones@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, marcel.a@redhat.com On Tue, 27 Jan 2015 16:37:45 +0100 Claudio Fontana wrote: > Hi, > > I think you have to replace "iqr" with "irq" in the function definition and in the commit message. sure, I'll fix it. > > Ciao, > > Claudio > > On 22.01.2015 15:50, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > hw/acpi/acpi-build-utils.c | 18 ++++++++++++++++++ > > include/hw/acpi/acpi-build-utils.h | 1 + > > 2 files changed, 19 insertions(+) > > > > diff --git a/hw/acpi/acpi-build-utils.c b/hw/acpi/acpi-build-utils.c > > index 58f88cd..59873e3 100644 > > --- a/hw/acpi/acpi-build-utils.c > > +++ b/hw/acpi/acpi-build-utils.c > > @@ -511,6 +511,24 @@ AcpiAml acpi_io(acpiIODecode dec, uint16_t min_base, uint16_t max_base, > > return var; > > } > > > > +/* > > + * ACPI 5.0: 19.5.64 IRQNoFlags (Interrupt Resource Descriptor Macro) > > + * 6.4.2.1 IRQ Descriptor > > +*/ > > +AcpiAml acpi_iqr_no_flags(uint8_t irq) > > +{ > > + uint16_t irq_mask; > > + AcpiAml var = aml_allocate_internal(0, NON_BLOCK); > > + > > + assert(irq < 16); > > + build_append_byte(var.buf, 0x22); /* IRQ descriptor 2 byte form */ > > + > > + irq_mask = 1U << irq; > > + build_append_byte(var.buf, irq_mask & 0xFF); /* IRQ mask bits[7:0] */ > > + build_append_byte(var.buf, irq_mask >> 8); /* IRQ mask bits[15:8] */ > > + return var; > > +} > > + > > /* ACPI 5.0: 20.2.5.4 Type 2 Opcodes Encoding: DefLEqual */ > > AcpiAml acpi_equal(AcpiAml arg1, AcpiAml arg2) > > { > > diff --git a/include/hw/acpi/acpi-build-utils.h b/include/hw/acpi/acpi-build-utils.h > > index 868d439..d39b5b1 100644 > > --- a/include/hw/acpi/acpi-build-utils.h > > +++ b/include/hw/acpi/acpi-build-utils.h > > @@ -117,6 +117,7 @@ AcpiAml acpi_call4(const char *method, AcpiAml arg1, AcpiAml arg2, > > AcpiAml arg3, AcpiAml arg4); > > AcpiAml acpi_io(acpiIODecode dec, uint16_t min_base, uint16_t max_base, > > uint8_t aln, uint8_t len); > > +AcpiAml acpi_iqr_no_flags(uint8_t irq); > > AcpiAml acpi_operation_region(const char *name, acpiRegionSpace rs, > > uint32_t offset, uint32_t len); > > AcpiAml acpi_named_field(const char *name, unsigned length); > > > > >