]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
a late .32 patch
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 Jan 2010 18:18:23 +0000 (10:18 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 Jan 2010 18:18:23 +0000 (10:18 -0800)
review-2.6.32/agp-intel-agp-clear-entire-gtt-on-startup.patch [new file with mode: 0644]
review-2.6.32/series

diff --git a/review-2.6.32/agp-intel-agp-clear-entire-gtt-on-startup.patch b/review-2.6.32/agp-intel-agp-clear-entire-gtt-on-startup.patch
new file mode 100644 (file)
index 0000000..469db9f
--- /dev/null
@@ -0,0 +1,62 @@
+From fc61901373987ad61851ed001fe971f3ee8d96a3 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <dwmw2@infradead.org>
+Date: Wed, 2 Dec 2009 11:00:05 +0000
+Subject: agp/intel-agp: Clear entire GTT on startup
+
+From: David Woodhouse <dwmw2@infradead.org>
+
+commit fc61901373987ad61851ed001fe971f3ee8d96a3 upstream.
+
+Some BIOSes fail to initialise the GTT, which will cause DMA faults when
+the IOMMU is enabled. We need to clear the whole thing to point at the
+scratch page, not just the part that Linux is going to use.
+
+Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
+[anholt: Note that this may also help with stability in the presence of
+driver bugs, by not drawing to memory we don't own]
+Signed-off-by: Eric Anholt <eric@anholt.net>
+Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/agp/intel-agp.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/char/agp/intel-agp.c
++++ b/drivers/char/agp/intel-agp.c
+@@ -178,6 +178,7 @@ static struct _intel_private {
+        * popup and for the GTT.
+        */
+       int gtt_entries;                        /* i830+ */
++      int gtt_total_size;
+       union {
+               void __iomem *i9xx_flush_page;
+               void *i8xx_flush_page;
+@@ -1153,7 +1154,7 @@ static int intel_i915_configure(void)
+       readl(intel_private.registers+I810_PGETBL_CTL); /* PCI Posting. */
+       if (agp_bridge->driver->needs_scratch_page) {
+-              for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {
++              for (i = intel_private.gtt_entries; i < intel_private.gtt_total_size; i++) {
+                       writel(agp_bridge->scratch_page, intel_private.gtt+i);
+               }
+               readl(intel_private.gtt+i-1);   /* PCI Posting. */
+@@ -1308,6 +1309,8 @@ static int intel_i915_create_gatt_table(
+       if (!intel_private.gtt)
+               return -ENOMEM;
++      intel_private.gtt_total_size = gtt_map_size / 4;
++
+       temp &= 0xfff80000;
+       intel_private.registers = ioremap(temp, 128 * 4096);
+@@ -1395,6 +1398,8 @@ static int intel_i965_create_gatt_table(
+       if (!intel_private.gtt)
+               return -ENOMEM;
++      intel_private.gtt_total_size = gtt_size / 4;
++
+       intel_private.registers = ioremap(temp, 128 * 4096);
+       if (!intel_private.registers) {
+               iounmap(intel_private.gtt);
index 30ea2c58bcaba51e46a619b8e3f573572238b9cf..53b5a0b252d501aea842d0f11296d36f4db1d23f 100644 (file)
@@ -49,3 +49,4 @@ fix-braindamage-in-audit_tree.c-untag_chunk.patch
 fix-more-leaks-in-audit_tree.c-tag_chunk.patch
 module-handle-ppc64-relocating-kcrctabs-when-config_relocatable-y.patch
 ipv6-skb_dst-can-be-null-in-ipv6_hop_jumbo.patch
+agp-intel-agp-clear-entire-gtt-on-startup.patch