diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-14 04:45:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-14 04:45:41 -0400 |
commit | f2b6079464fc73cf12f08248180a618f05033a70 (patch) | |
tree | 840e53b1a0b7a61d1875206a8fc520714541b6d8 /lib | |
parent | c918dcce92f76bb9903e4d049f4780bad384c207 (diff) |
sparc64: Fix cmdline_memory_size handling bugs.
First, lmb_enforce_memory_limit() interprets it's argument
(mostly, heh) as a size limit not an address limit. So pass
the raw cmdline_memory_size value into it. And we don't
need to check it against zero, lmb_enforce_memory_limit() does
that for us.
Next, free_initmem() needs special handling when the kernel
command line trims the available memory. The problem case is
if the trimmed out memory is where the kernel image itself
resides.
When that memory is trimmed out, we don't add those physical
ram areas to the sparsemem active ranges, amongst other things.
Which means that this free_initmem() code will free up invalid
page structs, resulting in either crashes or hangs.
Just quick fix this by not freeing initmem at all if "mem="
was given on the boot command line.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions