qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 4/5] ACPI: move acpi_build_srat_memory to com


From: Shannon Zhao
Subject: Re: [Qemu-devel] [PATCH v6 4/5] ACPI: move acpi_build_srat_memory to common place
Date: Mon, 25 Apr 2016 15:50:53 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0


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 <address@hidden>
>> > 
>> > Move acpi_build_srat_memory to common place so that it could be reused
>> > by ARM.
>> > 
>> > Cc: Michael S. Tsirkin <address@hidden>
>> > Cc: Igor Mammedov <address@hidden>
>> > Signed-off-by: Shannon Zhao <address@hidden>
>> > ---
>> >  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]