MIPS: Malta: Detect and fix bad memsize values
authorMarkos Chandras <markos.chandras@imgtec.com>
Fri, 27 Feb 2015 07:51:32 +0000 (07:51 +0000)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:11:51 +0000 (19:11 -0400)
commit312bc67c174d380d28ca95c88c3cd7a795220b4e
tree84604f205bcb2c665ce879b48cbdf7f4cb92d44e
parent00f1187a9cb84924936a4b6310e36be2ad0e8a15
MIPS: Malta: Detect and fix bad memsize values

[ Upstream commit f7f8aea4b97c4d48e42f02cb37026bee445f239f ]

memsize denotes the amount of RAM we can access from kseg{0,1} and
that should be up to 256M. In case the bootloader reports a value
higher than that (perhaps reporting all the available RAM) it's best
if we fix it ourselves and just warn the user about that. This is
usually a problem with the bootloader and/or its environment.

[ralf@linux-mips.org: Remove useless parens as suggested bei Sergei.
Reformat long pr_warn statement to fit into 80 column limit.]

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: <stable@vger.kernel.org> # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9362/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/mips/mti-malta/malta-memory.c