diff options
author | Jayachandran C <jchandra@broadcom.com> | 2013-06-10 06:41:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-06-13 17:46:43 +0200 |
commit | 722138340b9f08d081255ba50928831a972c2e6f (patch) | |
tree | afb892f1f31994ae0b31cac66d6a34038ed45c70 /arch/mips/netlogic | |
parent | 4033d38ceb9d84ed66b925c1740c1a88f8a4a8f9 (diff) | |
download | op-kernel-dev-722138340b9f08d081255ba50928831a972c2e6f.zip op-kernel-dev-722138340b9f08d081255ba50928831a972c2e6f.tar.gz |
MIPS: Netlogic: Fixup memory regions for prefetch
Fix a cache error found in stress test, caused by the prefetch instruction
going beyond valid memory when acessing the last page of a region. Add
the pref_backup logic similar to XLR in XLP too.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5431/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/netlogic')
-rw-r--r-- | arch/mips/netlogic/xlp/setup.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c index 8f69924..7b638f7 100644 --- a/arch/mips/netlogic/xlp/setup.c +++ b/arch/mips/netlogic/xlp/setup.c @@ -61,6 +61,18 @@ static void nlm_linux_exit(void) cpu_wait(); } +static void nlm_fixup_mem(void) +{ + const int pref_backup = 512; + int i; + + for (i = 0; i < boot_mem_map.nr_map; i++) { + if (boot_mem_map.map[i].type != BOOT_MEM_RAM) + continue; + boot_mem_map.map[i].size -= pref_backup; + } +} + void __init plat_mem_setup(void) { panic_timeout = 5; @@ -70,6 +82,7 @@ void __init plat_mem_setup(void) /* memory and bootargs from DT */ early_init_devtree(initial_boot_params); + nlm_fixup_mem(); } const char *get_system_type(void) |