From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYSee-0002PI-Pn for qemu-devel@nongnu.org; Sun, 06 Sep 2015 01:38:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYSeb-0005vv-Jm for qemu-devel@nongnu.org; Sun, 06 Sep 2015 01:38:16 -0400 Received: from mga02.intel.com ([134.134.136.20]:61346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYSeb-0005vi-Ey for qemu-devel@nongnu.org; Sun, 06 Sep 2015 01:38:13 -0400 References: <1439563931-12352-1-git-send-email-guangrong.xiao@linux.intel.com> <1439563931-12352-6-git-send-email-guangrong.xiao@linux.intel.com> <20150902131046.2240eae2@nial.brq.redhat.com> From: Xiao Guangrong Message-ID: <55EBCFE0.5060805@linux.intel.com> Date: Sun, 6 Sep 2015 13:32:16 +0800 MIME-Version: 1.0 In-Reply-To: <20150902131046.2240eae2@nial.brq.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 05/18] acpi: add aml_create_field List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com, rth@twiddle.net On 09/02/2015 07:10 PM, Igor Mammedov wrote: > On Fri, 14 Aug 2015 22:51:58 +0800 > Xiao Guangrong wrote: > >> Implement CreateField term which are used by NVDIMM _DSM method in later patch >> >> Signed-off-by: Xiao Guangrong >> --- >> hw/acpi/aml-build.c | 14 ++++++++++++++ >> include/hw/acpi/aml-build.h | 1 + >> 2 files changed, 15 insertions(+) >> >> diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c >> index a526eed..debdad2 100644 >> --- a/hw/acpi/aml-build.c >> +++ b/hw/acpi/aml-build.c >> @@ -1151,6 +1151,20 @@ Aml *aml_sizeof(Aml *arg) >> return var; >> } >> >> +/* ACPI 6.0: 20.2.5.2 Named Objects Encoding: DefCreateField */ > ditto, refer to to the first revision where it's appeared Well do it. > >> +Aml *aml_create_field(Aml *srcbuf, Aml *index, Aml *len, const char *name) > index and len could be only of 'Integer' type, so there is no point > to pass them in as Aml, just use uintFOO_t here and convert > them to aml_int() internally. That way call sites will be smaller > and have less chance to pass a wrong Aml variable. > Good idea. BTW, Igor, sorry for the delay reply since we got a holiday in this week.