diff mbox

[32/37] drm/i915: Mark GTT as iomem and access appropriately

Message ID 1268261124-13653-33-git-send-email-chris@chris-wilson.co.uk (mailing list archive)
State Deferred, archived
Headers show

Commit Message

Chris Wilson March 10, 2010, 10:45 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index b63638a..ee9cdfa 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1238,7 +1238,7 @@  static int i915_probe_agp(struct drm_device *dev, uint32_t *aperture_size,
 static unsigned long i915_gtt_to_phys(struct drm_device *dev,
 				      unsigned long gtt_addr)
 {
-	unsigned long *gtt;
+	unsigned long __iomem *gtt;
 	unsigned long entry, phys;
 	int gtt_bar = IS_I9XX(dev) ? 0 : 1;
 	int gtt_offset, gtt_size;
@@ -1264,7 +1264,7 @@  static unsigned long i915_gtt_to_phys(struct drm_device *dev,
 		return 0;
 	}
 
-	entry = *(volatile u32 *)(gtt + (gtt_addr / 1024));
+	entry = ioread32(gtt + (gtt_addr / 1024));
 
 	DRM_DEBUG_DRIVER("GTT addr: 0x%08lx, PTE: 0x%08lx\n", gtt_addr, entry);
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index feeff71..eada25f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -485,7 +485,7 @@  typedef struct drm_i915_private {
 	struct {
 		struct drm_mm gtt_space;
 
-		struct io_mapping *gtt_mapping;
+		struct io_mapping __iomem *gtt_mapping;
 		int gtt_mtrr;
 
 		/**