Skip to contentSkip to conversation

aperture_64.c: clarify that too small aperture is valid reason for this code

PATCH Applied Pavel Machek 3 participants 4 messages Nov 26, 2008 – Nov 28, 2008 x86

lore
Share & tools
lore
#0 lore raw

Clarify that too small aperture is valid reason for this code.

arch/x86/kernel/aperture_64.c +3 -2
index 9a32b37..026fcfb 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.
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw
Quoted 2 lines · Pavel Machek

Clarify that too small aperture is valid reason for this code.

There are lots more reasons than that, e.g. bad aperture pointing somewhere invalid. I'm not sure it makes sense to list them all.

-Andi

#2 lore raw
Quoted 6 lines · Pavel Machek
Quoted 2 lines

Clarify that too small aperture is valid reason for this code.

There are lots more reasons than that, e.g. bad aperture pointing somewhere invalid. I'm not sure it makes sense to list them all.

Small aperture is not "obviously invalid" and it confused me for a while, but...

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Applied
#3 lore raw
In reply to Pavel Machek
Quoted 9 lines · Pavel Machek

Clarify that too small aperture is valid reason for this code.

arch/x86/kernel/aperture_64.c +0 -0
index 9a32b37..026fcfb 100644

arch/x86/kernel/aperture_64.c line 6

Quoted 8 lines
arch/x86/kernel/aperture_64.c +3 -2
@@ -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.
+ *

applied to tip/x86/iommu, thanks Pavel!

That comment is indeed highly misleading - and sets the wrong mindset for people who start reading this file. The list you add it to are indeed the most common reasons for us to (re-)allocate the aperture.

Would you be interested in sending a patch for a full list of situations where we declare the existing aperture invalid and reallocate it? It will certainly help understanding the purpose and role of this file.

Ingo