android_kernel_xiaomi_sm8350/arch/sparc64/mm
David S. Miller f2b6079464 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>
2008-08-14 01:45:41 -07:00
..
fault.c sparc: Use new '%pS' infrastructure to print symbols. 2008-07-17 22:11:32 -07:00
generic.c sparc64: remove CVS keywords 2008-05-20 00:33:43 -07:00
hugetlbpage.c hugetlb: introduce pud_huge 2008-07-24 10:47:18 -07:00
init.c sparc64: Fix cmdline_memory_size handling bugs. 2008-08-14 01:45:41 -07:00
Makefile sparc64: remove CVS keywords 2008-05-20 00:33:43 -07:00
tlb.c [SPARC64]: Don't open-code {get,put}_cpu_var() in flush_tlb_pending(). 2008-03-28 15:53:25 -07:00
tsb.c sparc64: Need to disable preemption around smp_tsb_sync(). 2008-08-04 13:51:35 -07:00
ultra.S sparc64: Don't MAGIC_SYSRQ ifdef smp_fetch_global_regs and support code. 2008-08-09 16:25:26 -07:00