mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* aperture_64.c: clarify that too small aperture is valid reason for this code
@ 2008-11-26 16:15 Pavel Machek
  2008-11-26 16:39 ` Andi Kleen
  2008-11-28 14:33 ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: Pavel Machek @ 2008-11-26 16:15 UTC (permalink / raw)
  To: kernel list, Ingo Molnar, H. Peter Anvin; +Cc: Andi Kleen


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

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 9a32b37..026fcfb 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -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.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: aperture_64.c: clarify that too small aperture is valid reason for this code
  2008-11-26 16:15 aperture_64.c: clarify that too small aperture is valid reason for this code Pavel Machek
@ 2008-11-26 16:39 ` Andi Kleen
  2008-11-26 17:31   ` Pavel Machek
  2008-11-28 14:33 ` Ingo Molnar
  1 sibling, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2008-11-26 16:39 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, Ingo Molnar, H. Peter Anvin, Andi Kleen

On Wed, Nov 26, 2008 at 05:15:27PM +0100, Pavel Machek wrote:
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: aperture_64.c: clarify that too small aperture is valid reason for this code
  2008-11-26 16:39 ` Andi Kleen
@ 2008-11-26 17:31   ` Pavel Machek
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2008-11-26 17:31 UTC (permalink / raw)
  To: Andi Kleen; +Cc: kernel list, Ingo Molnar, H. Peter Anvin

> On Wed, Nov 26, 2008 at 05:15:27PM +0100, Pavel Machek wrote:
> > 
> > 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

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: aperture_64.c: clarify that too small aperture is valid reason for this code
  2008-11-26 16:15 aperture_64.c: clarify that too small aperture is valid reason for this code Pavel Machek
  2008-11-26 16:39 ` Andi Kleen
@ 2008-11-28 14:33 ` Ingo Molnar
  1 sibling, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2008-11-28 14:33 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, H. Peter Anvin, Andi Kleen, Yinghai Lu


* Pavel Machek <pavel@suse.cz> wrote:

> Clarify that too small aperture is valid reason for this code.
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>
> 
> diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
> index 9a32b37..026fcfb 100644
> --- a/arch/x86/kernel/aperture_64.c
> +++ b/arch/x86/kernel/aperture_64.c
> @@ -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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-28 14:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-26 16:15 aperture_64.c: clarify that too small aperture is valid reason for this code Pavel Machek
2008-11-26 16:39 ` Andi Kleen
2008-11-26 17:31   ` Pavel Machek
2008-11-28 14:33 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®