From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgSEi-0003Ae-1N for qemu-devel@nongnu.org; Fri, 10 Apr 2015 02:16:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgSEe-0008VI-SJ for qemu-devel@nongnu.org; Fri, 10 Apr 2015 02:16:15 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:64162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgSEe-0008Uy-8k for qemu-devel@nongnu.org; Fri, 10 Apr 2015 02:16:12 -0400 Message-ID: <55276A84.5060004@huawei.com> Date: Fri, 10 Apr 2015 14:15:32 +0800 From: Shannon Zhao MIME-Version: 1.0 References: <1428055432-12120-1-git-send-email-zhaoshenglong@huawei.com> <1428055432-12120-15-git-send-email-zhaoshenglong@huawei.com> <20150409153554.4b46b9ef@nial.brq.redhat.com> In-Reply-To: <20150409153554.4b46b9ef@nial.brq.redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 14/20] hw/acpi/aml-build: Add aml_or() term List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, mst@redhat.com, a.spyridakis@virtualopensystems.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, peter.huangpeng@huawei.com, hanjun.guo@linaro.org, msalter@redhat.com, pbonzini@redhat.com, lersek@redhat.com, christoffer.dall@linaro.org, shannon.zhao@linaro.org On 2015/4/9 21:35, Igor Mammedov wrote: > On Fri, 3 Apr 2015 18:03:46 +0800 > Shannon Zhao wrote: > >> > From: Shannon Zhao >> > >> > Add aml_or() term and make aml_and can take three args. >> > Expose build_append_int_noprefix as it wiil be used by >> > creating a buffer. >> > >> > Signed-off-by: Shannon Zhao >> > Signed-off-by: Shannon Zhao >> > --- >> > hw/acpi/aml-build.c | 24 +++++++++++++++++++++--- >> > hw/i386/acpi-build.c | 2 +- >> > include/hw/acpi/aml-build.h | 4 +++- >> > 3 files changed, 25 insertions(+), 5 deletions(-) >> > >> > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c >> > index 5a94fc9..312afb6 100644 >> > --- a/hw/acpi/aml-build.c >> > +++ b/hw/acpi/aml-build.c >> > @@ -240,7 +240,7 @@ static void build_extop_package(GArray *package, uint8_t op) >> > build_prepend_byte(package, 0x5B); /* ExtOpPrefix */ >> > } >> > >> > -static void build_append_int_noprefix(GArray *table, uint64_t value, int size) >> > +void build_append_int_noprefix(GArray *table, uint64_t value, int size) >> > { >> > int i; >> > >> > @@ -445,12 +445,30 @@ Aml *aml_store(Aml *val, Aml *target) >> > } >> > >> > /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefAnd */ >> > -Aml *aml_and(Aml *arg1, Aml *arg2) >> > +Aml *aml_and(Aml *arg1, Aml *arg2, Aml *arg3) > I know that it's possible to Store inside of And(a, b, save_here) ASL op, > but could you instead rewrite it to > > Store(And(a, b), save_here) > > so it wouldn't clatter trivial And(a,b) uses and drop this hunk. > Yes, we can use Store(And(a, b), save_here) but according to the SPEC the And op can have 3 args. We don't support it? -- Thanks, Shannon