LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] x86_64: change aper valid checking sequence
@ 2008-01-26 2:13 Yinghai Lu
2008-01-28 14:00 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2008-01-26 2:13 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Andi Kleen, Linux Kernel Mailing List, Andrew Morton
[PATCH] x86_64: change aper valid checking sequence
old sequence:
size ==> >4G ==> point to RAM
changed to
>4G ==> point to RAM ==> size
some bios even leave aper to unclear, so check size at last.
to avoid reporting that like
Node 0: Aperture @ 4a42000000 size 32 MB
Aperture too small (32 MB)
with patch will get
Node 0: Aperture @ 4a42000000 size 32 MB
Aperture beyond 4G. Ignoring.
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 0b837bb..608152a 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -85,10 +85,6 @@ static int __init aperture_valid(u64 aper_base, u32 aper_size)
if (!aper_base)
return 0;
- if (aper_size < 64*1024*1024) {
- printk(KERN_ERR "Aperture too small (%d MB)\n", aper_size>>20);
- return 0;
- }
if (aper_base + aper_size > 0x100000000UL) {
printk(KERN_ERR "Aperture beyond 4GB. Ignoring.\n");
return 0;
@@ -97,6 +93,10 @@ static int __init aperture_valid(u64 aper_base, u32 aper_size)
printk(KERN_ERR "Aperture pointing to e820 RAM. Ignoring.\n");
return 0;
}
+ if (aper_size < 64*1024*1024) {
+ printk(KERN_ERR "Aperture too small (%d MB)\n", aper_size>>20);
+ return 0;
+ }
return 1;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86_64: change aper valid checking sequence
2008-01-26 2:13 [PATCH] x86_64: change aper valid checking sequence Yinghai Lu
@ 2008-01-28 14:00 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-01-28 14:00 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Andi Kleen, Linux Kernel Mailing List, Andrew Morton
* Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
> [PATCH] x86_64: change aper valid checking sequence
>
> old sequence:
> size ==> >4G ==> point to RAM
> changed to
> >4G ==> point to RAM ==> size
>
> some bios even leave aper to unclear, so check size at last.
> to avoid reporting that like
>
> Node 0: Aperture @ 4a42000000 size 32 MB
> Aperture too small (32 MB)
>
> with patch will get
>
> Node 0: Aperture @ 4a42000000 size 32 MB
> Aperture beyond 4G. Ignoring.
thanks, applied.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-28 14:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-26 2:13 [PATCH] x86_64: change aper valid checking sequence Yinghai Lu
2008-01-28 14:00 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).