#include <linux/kernel.h>
 #include <linux/pagemap.h>
 #include <linux/agp_backend.h>
-#include <linux/intel-iommu.h>
+#include <linux/iommu.h>
 #include <linux/delay.h>
 #include <asm/smp.h>
 #include "agp.h"
  */
 static inline int needs_ilk_vtd_wa(void)
 {
-#ifdef CONFIG_INTEL_IOMMU
        const unsigned short gpu_devid = intel_private.pcidev->device;
 
-       /* Query intel_iommu to see if we need the workaround. Presumably that
-        * was loaded first.
+       /*
+        * Query iommu subsystem to see if we need the workaround. Presumably
+        * that was loaded first.
         */
-       if ((gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG ||
-            gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
-            intel_iommu_gfx_mapped)
-               return 1;
-#endif
-       return 0;
+       return ((gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG ||
+                gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
+               device_iommu_mapped(&intel_private.pcidev->dev));
 }
 
 static bool intel_gtt_can_wc(void)