* Patch "MIPS: Malta: Detect and fix bad memsize values" has been added to the 4.0-stable tree
@ 2015-05-02 12:23 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-05-02 12:23 UTC (permalink / raw)
To: markos.chandras, gregkh, ralf; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
MIPS: Malta: Detect and fix bad memsize values
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mips-malta-detect-and-fix-bad-memsize-values.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From f7f8aea4b97c4d48e42f02cb37026bee445f239f Mon Sep 17 00:00:00 2001
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Fri, 27 Feb 2015 07:51:32 +0000
Subject: MIPS: Malta: Detect and fix bad memsize values
From: Markos Chandras <markos.chandras@imgtec.com>
commit f7f8aea4b97c4d48e42f02cb37026bee445f239f upstream.
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: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/mti-malta/malta-memory.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/arch/mips/mti-malta/malta-memory.c
+++ b/arch/mips/mti-malta/malta-memory.c
@@ -53,6 +53,12 @@ fw_memblock_t * __init fw_getmdesc(int e
pr_warn("memsize not set in YAMON, set to default (32Mb)\n");
physical_memsize = 0x02000000;
} else {
+ if (memsize > (256 << 20)) { /* memsize should be capped to 256M */
+ pr_warn("Unsupported memsize value (0x%lx) detected! "
+ "Using 0x10000000 (256M) instead\n",
+ memsize);
+ memsize = 256 << 20;
+ }
/* If ememsize is set, then set physical_memsize to that */
physical_memsize = ememsize ? : memsize;
}
Patches currently in stable-queue which might be from markos.chandras@imgtec.com are
queue-4.0/mips-unaligned-fix-regular-load-store-instruction-emulation-for-eva.patch
queue-4.0/mips-unaligned-prevent-eva-instructions-on-kernel-unaligned-accesses.patch
queue-4.0/mips-malta-detect-and-fix-bad-memsize-values.patch
queue-4.0/mips-unaligned-surround-load-store-macros-in-do-while-statements.patch
queue-4.0/mips-asm-asm-eva-introduce-kernel-load-store-variants.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-02 12:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-02 12:23 Patch "MIPS: Malta: Detect and fix bad memsize values" has been added to the 4.0-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.