kernel/acpi: Reduce code duplication with ACPICA.