lkml.org 
[lkml]   [2009]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] x86: suggest running a 64bit kernel on LM capable machines with plenty memory.
From
Date
On Mon, 2009-03-09 at 20:15 +0100, Andi Kleen wrote:
> > How about we do the below as well?
>
> Idea looks good, but with your patch it would print two conflicting
> messages ("use highmem64. No, use 64bit instead"), wouldn't it?
> Only one would be better.

Something like the below?


---
arch/x86/mm/init_32.c | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 34ef5c7..e759107 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -713,13 +713,19 @@ void __init lowmem_pfn_init(void)
"only %luMB highmem pages available, ignoring highmem size of %luMB!\n"

#define MSG_HIGHMEM_TRIMMED \
- "Warning: only 4GB will be used. Use a HIGHMEM64G enabled kernel!\n"
+ "Warning: only 4GB will be used. Use a %s kernel!\n"
+
+#define MSG_LM_TRIMMED \
+ "Warning: instead of using a 32bit %s kernel, Use a 64bit kernel!\n"
+
+
/*
* We have more RAM than fits into lowmem - we try to put it into
* highmem, also taking the highmem=x boot parameter into account:
*/
void __init highmem_pfn_init(void)
{
+ char *highmem;
max_low_pfn = MAXMEM_PFN;

if (highmem_pages == -1)
@@ -737,16 +743,28 @@ void __init highmem_pfn_init(void)
#ifndef CONFIG_HIGHMEM
/* Maximum memory usable is what is directly addressable */
printk(KERN_WARNING "Warning only %ldMB will be used.\n", MAXMEM>>20);
+
if (max_pfn > MAX_NONPAE_PFN)
- printk(KERN_WARNING "Use a HIGHMEM64G enabled kernel.\n");
+ highmem = "HIGHMEM64G";
else
- printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
+ highmem = "HIGHMEM";
+
+ if (boot_cpu_has(X86_FEATURE_LM))
+ printk(KERN_WARNING MSG_LM_TRIMMED, highmem);
+ else
+ printk(KERN_WARNING "Use a %s enabled kernel.\n", highmem);
+
max_pfn = MAXMEM_PFN;
#else /* !CONFIG_HIGHMEM */
#ifndef CONFIG_HIGHMEM64G
if (max_pfn > MAX_NONPAE_PFN) {
max_pfn = MAX_NONPAE_PFN;
- printk(KERN_WARNING MSG_HIGHMEM_TRIMMED);
+ if (boot_cpu_has(X86_FEATURE_LM))
+ highmem = "64bit";
+ else
+ highmem = "HIGHMEM64G enabled";
+
+ printk(KERN_WARNING MSG_HIGHMEM_TRIMMED, highmem);
}
#endif /* !CONFIG_HIGHMEM64G */
#endif /* !CONFIG_HIGHMEM */



\
 
 \ /
  Last update: 2009-03-10 10:39    [from the cache]
©2003-2011 Jasper Spaans