[kernel] r9341 - in dists/etch/linux-2.6/debian: . patches/bugfix patches/series

Dann Frazier dannf at alioth.debian.org
Tue Aug 21 01:19:24 UTC 2007


Author: dannf
Date: Tue Aug 21 01:19:24 2007
New Revision: 9341

Log:
* Fix intel-agp hang on large memory systems. (closes: #438458)
  ***THIS PATCH HAS NOT YET BEEN VERIFIED TO FIX THIS BUG***

Added:
   dists/etch/linux-2.6/debian/patches/bugfix/intel-agp-i965-memory-map.patch
Modified:
   dists/etch/linux-2.6/debian/changelog
   dists/etch/linux-2.6/debian/patches/series/14

Modified: dists/etch/linux-2.6/debian/changelog
==============================================================================
--- dists/etch/linux-2.6/debian/changelog	(original)
+++ dists/etch/linux-2.6/debian/changelog	Tue Aug 21 01:19:24 2007
@@ -7,8 +7,10 @@
   * Add pci ids for Intel ICH9 controllers, see #435877
   * [hppa] remove misuse of global_ack_eiem, fixing a race condition that
     resulted in frequent lockups on SMP systems. See: #435878
+  * Fix intel-agp hang on large memory systems. (closes: #438458)
+    ***THIS PATCH HAS NOT YET BEEN VERIFIED TO FIX THIS BUG***
 
- -- dann frazier <dannf at debian.org>  Fri, 03 Aug 2007 15:17:22 -0600
+ -- dann frazier <dannf at debian.org>  Mon, 20 Aug 2007 19:16:19 -0600
 
 linux-2.6 (2.6.18.dfsg.1-13etch1) stable-security; urgency=high
 

Added: dists/etch/linux-2.6/debian/patches/bugfix/intel-agp-i965-memory-map.patch
==============================================================================
--- (empty file)
+++ dists/etch/linux-2.6/debian/patches/bugfix/intel-agp-i965-memory-map.patch	Tue Aug 21 01:19:24 2007
@@ -0,0 +1,88 @@
+From: Linus Torvalds <torvalds at woody.osdl.org>
+Date: Wed, 22 Nov 2006 17:37:54 +0000 (-0800)
+Subject: [AGP] Fix intel 965 AGP memory mapping function
+X-Git-Tag: v2.6.19~53
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=7d915a38985d2826acbdc9dc9cca8a93e23e5278
+
+[AGP] Fix intel 965 AGP memory mapping function
+
+This introduces a i965-specific "mask_memory()" function that knows
+about the extended physical addresses that the i965 supports.  This
+allows us to correctly map in physical memory in the >4GB range into the
+GTT.
+
+Also simplify/clean-up the i965 case for the aperture sizing by just
+returning the fixed 512kB size from "fetch_size()".  We don't really
+care that not all of the aperture may be visible - the only thing that
+cares about the aperture size is the Intel "stolen memory" calculation,
+which depends on the fixed size.
+
+Cc: Keith Packard <keithp at keithp.com>
+Cc: Eric Anholt <eric at anholt.net>
+Cc: Dave Jones <davej at redhat.com>
+Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+---
+
+diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
+index d1ede7d..aceece7 100644
+--- a/drivers/char/agp/intel-agp.c
++++ b/drivers/char/agp/intel-agp.c
+@@ -387,11 +387,7 @@ static void intel_i830_init_gtt_entries(void)
+ 	/* We obtain the size of the GTT, which is also stored (for some
+ 	 * reason) at the top of stolen memory. Then we add 4KB to that
+ 	 * for the video BIOS popup, which is also stored in there. */
+-
+-	if (IS_I965)
+-		size = 512 + 4;
+-	else
+-		size = agp_bridge->driver->fetch_size() + 4;
++	size = agp_bridge->driver->fetch_size() + 4;
+ 
+ 	if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82830_HB ||
+ 	    agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) {
+@@ -805,6 +801,26 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
+ 
+ 	return 0;
+ }
++
++/*
++ * The i965 supports 36-bit physical addresses, but to keep
++ * the format of the GTT the same, the bits that don't fit
++ * in a 32-bit word are shifted down to bits 4..7.
++ *
++ * Gcc is smart enough to notice that "(addr >> 28) & 0xf0"
++ * is always zero on 32-bit architectures, so no need to make
++ * this conditional.
++ */
++static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge,
++	unsigned long addr, int type)
++{
++	/* Shift high bits down */
++	addr |= (addr >> 28) & 0xf0;
++
++	/* Type checking must be done elsewhere */
++	return addr | bridge->driver->masks[type].mask;
++}
++
+ static int intel_i965_fetch_size(void)
+ {
+        struct aper_size_info_fixed *values;
+@@ -832,7 +848,8 @@ static int intel_i965_fetch_size(void)
+ 
+        agp_bridge->previous_size = agp_bridge->current_size = (void *)(values + offset);
+ 
+-       return values[offset].size;
++	/* The i965 GTT is always sized as if it had a 512kB aperture size */
++	return 512;
+ }
+ 
+ /* The intel i965 automatically initializes the agp aperture during POST.
+@@ -1584,7 +1601,7 @@ static struct agp_bridge_driver intel_i965_driver = {
+        .fetch_size             = intel_i965_fetch_size,
+        .cleanup                = intel_i915_cleanup,
+        .tlb_flush              = intel_i810_tlbflush,
+-       .mask_memory            = intel_i810_mask_memory,
++       .mask_memory            = intel_i965_mask_memory,
+        .masks                  = intel_i810_masks,
+        .agp_enable             = intel_i810_agp_enable,
+        .cache_flush            = global_cache_flush,

Modified: dists/etch/linux-2.6/debian/patches/series/14
==============================================================================
--- dists/etch/linux-2.6/debian/patches/series/14	(original)
+++ dists/etch/linux-2.6/debian/patches/series/14	Tue Aug 21 01:19:24 2007
@@ -7,3 +7,4 @@
 + features/all/drivers/i2c-piix4-sb600.patch
 + features/all/drivers/i2c-piix4-sb700.patch
 + features/all/drivers/ata_piix-ich9-ide-mode.patch
++ bugfix/intel-agp-i965-memory-map.patch



More information about the Kernel-svn-changes mailing list