memhp: don't generate memory hotplug AML if it's not enabled/supported
That reduces DSDT by 910 bytes when memory hotplug isn't enabled. While doing so drop intermediate variables/arguments passing around ACPI_MEMORY_HOTPLUG_IO_LEN and making it local to memory_hotplug.c, hardcoding it there as it can't change. Also don't pass around ACPI_MEMORY_HOTPLUG_BASE through intermediate variables/arguments where it's not needed. Instead initialize in module static variable when MMIO region is mapped and use that within memory_hotplug.c whenever it's required. That way MMIO base specified only at one place and AML with MMIO would always use the same value. Signed-off-by:Igor Mammedov <imammedo@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Marcel Apfelbaum <marcel@redhat.com>
Showing
- hw/acpi/ich9.c 2 additions, 1 deletionhw/acpi/ich9.c
- hw/acpi/memory_hotplug.c 17 additions, 7 deletionshw/acpi/memory_hotplug.c
- hw/acpi/piix4.c 2 additions, 1 deletionhw/acpi/piix4.c
- hw/i386/acpi-build.c 1 addition, 8 deletionshw/i386/acpi-build.c
- include/hw/acpi/memory_hotplug.h 1 addition, 2 deletionsinclude/hw/acpi/memory_hotplug.h
- include/hw/acpi/pc-hotplug.h 0 additions, 1 deletioninclude/hw/acpi/pc-hotplug.h
Loading
Please register or sign in to comment