Commit 4f955f2f authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: error message improvement

Output a nice error message for people who need mem > 256M but don't increase
on the host /proc/sys/vm/max_map_count, telling them to do so.
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3c7a74a7
...@@ -336,9 +336,14 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len, ...@@ -336,9 +336,14 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len,
fd = phys_mapping(phys, &offset); fd = phys_mapping(phys, &offset);
err = os_map_memory((void *) virt, fd, offset, len, r, w, x); err = os_map_memory((void *) virt, fd, offset, len, r, w, x);
if(err) if(err) {
if(err == -ENOMEM)
printk("try increasing the host's "
"/proc/sys/vm/max_map_count to <physical "
"memory size>/4096\n");
panic("map_memory(0x%lx, %d, 0x%llx, %ld, %d, %d, %d) failed, " panic("map_memory(0x%lx, %d, 0x%llx, %ld, %d, %d, %d) failed, "
"err = %d\n", virt, fd, offset, len, r, w, x, err); "err = %d\n", virt, fd, offset, len, r, w, x, err);
}
} }
#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment