iommu/amd: Move get_device_id() and friends to beginning of file