On Tue, 25 Jul 2023 22:20:36 +0530 Sunil V L <suni...@ventanamicro.com> wrote:
> 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. just be careful and build test other targets (while disabling the rest) at least no to regress them due to build deps. (I'd pick 2 with ACPI support that use and not uses affected code) and 1 that uses device model but doesn't use ACPI at all (if such exists) > > Thanks! > Sunil >