On Mon, Jul 24, 2023 at 05:18:59PM +0200, Igor Mammedov wrote: > On Wed, 12 Jul 2023 22:09:34 +0530 > Sunil V L <suni...@ventanamicro.com> wrote: > > > The functions which add fw_cfg and virtio to DSDT are same for ARM > > and RISC-V. So, instead of duplicating in RISC-V, move them from > > hw/arm/virt-acpi-build.c to common aml-build.c. > > > > Signed-off-by: Sunil V L <suni...@ventanamicro.com> > > --- > > hw/acpi/aml-build.c | 41 ++++++++++++++++++++++++++++++++++++ > > hw/arm/virt-acpi-build.c | 42 ------------------------------------- > > hw/riscv/virt-acpi-build.c | 16 -------------- > > include/hw/acpi/aml-build.h | 6 ++++++ > > 4 files changed, 47 insertions(+), 58 deletions(-) > > > > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c > > patch looks fine modulo, > I'd put these into respective device files instead of generic > aml-build.c which was intended for basic AML primitives > (it 's got polluted over time with device specific functions > but that's not the reason to continue doing that). > > Also having those functions along with devices models > goes along with self enumerating ACPI devices (currently > it works for x86 PCI/ISA device but there is no reason > that it can't work with other types as well when > I get there) > Thanks!, Igor. Let me add them to device specific files as per your recommendation.
Thanks! Sunil