Skip to contentSkip to conversation

aperture_64.c: cleanups

PATCH Pavel Machek 1 participant 1 message May 26, 2008 x86

lore
Share & tools
lore
#0 lore raw

Some small cleanups for aperture_64.c; they should not really change any code.

arch/x86/kernel/aperture_64.c +7 -5
index 4a3d8cf..2088b6a 100644
@@ -1,8 +1,9 @@
 /*
  * Firmware replacement code.
  *
- * Work around broken BIOSes that don't set an aperture or only set the
- * aperture in the AGP bridge.
+ * Work around broken BIOSes that don't set an aperture, only set the
+ * aperture in the AGP bridge, or set too small aperture.
+ *
  * If all fails map the aperture over some low memory.  This is cheaper than
  * doing bounce buffering. The memory is lost. This is done at early boot
  * because only the bootmem allocator can allocate 32+MB.
@@ -93,7 +94,7 @@ static int __init aperture_valid(u64 ape
 }
 
 /* Find a PCI capability */
-static __u32 __init find_cap(int num, int slot, int func, int cap)
+static u32 __init find_cap(int num, int slot, int func, int cap)
 {
 	int bytes;
 	u8 pos;
@@ -119,7 +120,7 @@ static __u32 __init find_cap(int num, in
 }
 
 /* Read a standard AGPv3 bridge header */
-static __u32 __init read_agp(int num, int slot, int func, int cap, u32 *order)
+static u32 __init read_agp(int num, int slot, int func, int cap, u32 *order)
 {
 	u32 apsize;
 	u32 apsizereg;
@@ -168,7 +169,7 @@ static __u32 __init read_agp(int num, in
  * the AGP bridges should be always an own bus on the HT hierarchy,
  * but do it here for future safety.
  */
-static __u32 __init search_agp_bridge(u32 *order, int *valid_agp)
+static u32 __init search_agp_bridge(u32 *order, int *valid_agp)
 {
 	int num, slot, func;
 
@@ -383,6 +387,7 @@ void __init gart_iommu_hole_init(void)
 			 * early.
 			 */
 			panic("Not enough memory for aperture");
+			/* Could we fall back to iommu=soft here? */
 		}
 	} else {
 		return;
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html