qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 04/11] acpi: introduce AcpiDeviceIfClass.buil


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH v4 04/11] acpi: introduce AcpiDeviceIfClass.build_mem_ranges hook
Date: Thu, 6 Jun 2019 18:25:40 +0200

On Thu, 6 Jun 2019 13:15:43 +0800
Tao Xu <address@hidden> wrote:

> On 5/24/2019 8:35 PM, Igor Mammedov wrote:
> > On Wed,  8 May 2019 14:17:19 +0800
> > Tao Xu <address@hidden> wrote:
> >   
> >> Add build_mem_ranges callback to AcpiDeviceIfClass and use
> >> it for generating SRAT and HMAT numa memory ranges.
> >>
> >> Suggested-by: Igor Mammedov <address@hidden>
> >> Co-developed-by: Liu Jingqi <address@hidden>
> >> Signed-off-by: Liu Jingqi <address@hidden>
> >> Signed-off-by: Tao Xu <address@hidden>
> >> ---  
> ...
> >> diff --git a/stubs/pc_build_mem_ranges.c b/stubs/pc_build_mem_ranges.c
> >> new file mode 100644
> >> index 0000000000..0f104ba79d
> >> --- /dev/null
> >> +++ b/stubs/pc_build_mem_ranges.c
> >> @@ -0,0 +1,6 @@
> >> +#include "qemu/osdep.h"
> >> +#include "hw/i386/pc.h"
> >> +
> >> +void pc_build_mem_ranges(AcpiDeviceIf *adev, MachineState *machine)
> >> +{
> >> +}  
> > 
> > why do you need stub?
> >   
> Hi Igor,
> 
> I have questions here, I use stub here because we add hook pointer in 
> piix4.c but other arch such mips use piix4. Without stub, it will failed 
> when compile, like pc_madt_cpu_entry.
> Or there are other way to make it use just in pc?
I forgot that piix4 is uesed by mips as well, it's perfectly fine to add
stub in this case.
Though, I'd add a comment above the stub about why it's there to avoid
questions.
Later comment might make life easier for whoever touches this code
wouldn't have to figure out mips dependency the hard way.

> 
> Thank you!
> 




reply via email to

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