From c5e62bdd73da80e1017058c923336a5a150af9f2 Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@keithp.com>
Date: Fri, 28 Oct 2011 10:28:00 -0700
Subject: agp: iommu_gfx_mapped only available if CONFIG_INTEL_IOMMU is set
Patch-mainline: v3.2-rc3

Kernels with no iommu support cannot ever need the Ironlake
work-around, so never enable it in that case.

Might be better to completely remove the work-around from the kernel
in this case?

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Acked-by: Michal Srb <msrb@suse.com>

Automatically created from "patches.drm/0361-agp-iommu_gfx_mapped-only-available-if-config_intel_iommu-is-set" by xen-port-patches.py

--- sle11sp3.orig/drivers/char/agp/intel-gtt.c	2013-04-03 10:27:17.000000000 +0200
+++ sle11sp3/drivers/char/agp/intel-gtt.c	2013-05-17 13:56:28.000000000 +0200
@@ -1129,7 +1129,7 @@ static void i965_write_entry(dma_addr_t 
  */
 static inline int needs_idle_maps(void)
 {
-#ifdef CONFIG_DMAR
+#if defined(CONFIG_DMAR) || defined(CONFIG_XEN)
 	const unsigned short gpu_devid = intel_private.pcidev->device;
 
 	/* Query intel_iommu to see if we need the workaround. Presumably that
