ACPI / PCI: replace open-coded _DSM code with helper functions