return ret;
 }
 
+/**
+ * acpi_viot_early_init - Test the presence of VIOT and enable ACS
+ *
+ * If the VIOT does exist, ACS must be enabled. This cannot be
+ * done in acpi_viot_init() which is called after the bus scan
+ */
+void __init acpi_viot_early_init(void)
+{
+#ifdef CONFIG_PCI
+       acpi_status status;
+       struct acpi_table_header *hdr;
+
+       status = acpi_get_table(ACPI_SIG_VIOT, 0, &hdr);
+       if (ACPI_FAILURE(status))
+               return;
+       pci_request_acs();
+       acpi_put_table(hdr);
+#endif
+}
+
 /**
  * acpi_viot_init - Parse the VIOT table
  *
                        epid = ((domain_nr - ep->segment_start) << 16) +
                                dev_id - ep->bdf_start + ep->endpoint_id;
 
-                       /*
-                        * If we found a PCI range managed by the viommu, we're
-                        * the one that has to request ACS.
-                        */
-                       pci_request_acs();
-
                        return viot_dev_iommu_init(&pdev->dev, ep->viommu,
                                                   epid);
                }
 
 #include <linux/acpi.h>
 
 #ifdef CONFIG_ACPI_VIOT
+void __init acpi_viot_early_init(void);
 void __init acpi_viot_init(void);
 int viot_iommu_configure(struct device *dev);
 #else
+static inline void acpi_viot_early_init(void) {}
 static inline void acpi_viot_init(void) {}
 static inline int viot_iommu_configure(struct device *dev)
 {