From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aubJ4-0006tZ-IT for qemu-devel@nongnu.org; Mon, 25 Apr 2016 03:51:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aubJ3-0000o6-MO for qemu-devel@nongnu.org; Mon, 25 Apr 2016 03:51:46 -0400 Message-ID: <571DCC5D.8010405@huawei.com> Date: Mon, 25 Apr 2016 15:50:53 +0800 From: Shannon Zhao MIME-Version: 1.0 References: <1461402396-11776-1-git-send-email-zhaoshenglong@huawei.com> <1461402396-11776-5-git-send-email-zhaoshenglong@huawei.com> <20160424170049.mxfial3f5xbmfmxs@hawk.localdomain> In-Reply-To: <20160424170049.mxfial3f5xbmfmxs@hawk.localdomain> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 4/5] ACPI: move acpi_build_srat_memory to common place List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones Cc: qemu-arm@nongnu.org, peter.maydell@linaro.org, "Michael S. Tsirkin" , david.daney@cavium.com, peter.huangpeng@huawei.com, qemu-devel@nongnu.org, shannon.zhao@linaro.org, Igor Mammedov On 2016/4/25 1:00, Andrew Jones wrote: > On Sat, Apr 23, 2016 at 05:06:35PM +0800, Shannon Zhao wrote: >> > From: Shannon Zhao >> > >> > Move acpi_build_srat_memory to common place so that it could be reused >> > by ARM. >> > >> > Cc: Michael S. Tsirkin >> > Cc: Igor Mammedov >> > Signed-off-by: Shannon Zhao >> > --- >> > hw/acpi/aml-build.c | 12 ++++++++++++ >> > hw/i386/acpi-build.c | 20 -------------------- >> > include/hw/acpi/aml-build.h | 10 ++++++++++ >> > 3 files changed, 22 insertions(+), 20 deletions(-) >> > >> > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c >> > index ab89ca6..d167003 100644 >> > --- a/hw/acpi/aml-build.c >> > +++ b/hw/acpi/aml-build.c >> > @@ -1563,3 +1563,15 @@ build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets, >> > build_header(linker, table_data, >> > (void *)rsdt, "RSDT", rsdt_len, 1, oem_id, oem_table_id); >> > } >> > + >> > +void acpi_build_srat_memory(AcpiSratMemoryAffinity *numamem, uint64_t base, >> > + uint64_t len, int node, MemoryAffinityFlags flags) > It looks like functions like these in hw/acpi/aml-build.c usually start > with 'build_' not 'acpi_' > Ok, I will rename it to build_acpi_srat_memory. >> > +{ >> > + numamem->type = ACPI_SRAT_MEMORY; >> > + numamem->length = sizeof(*numamem); >> > + memset(numamem->proximity, 0, 4); > This memset thing is still weird... > I will add a patch before this one to fix the definition of proximity and use uint32_t as you said before. Thanks, -- Shannon