diff options
author | Jayachandran C <jchandra@broadcom.com> | 2013-06-10 02:41:08 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-06-13 11:46:43 -0400 |
commit | 722138340b9f08d081255ba50928831a972c2e6f (patch) | |
tree | afb892f1f31994ae0b31cac66d6a34038ed45c70 /arch | |
parent | 4033d38ceb9d84ed66b925c1740c1a88f8a4a8f9 (diff) |
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')
-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 8f6992432f34..7b638f7be491 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) | |||
61 | cpu_wait(); | 61 | cpu_wait(); |
62 | } | 62 | } |
63 | 63 | ||
64 | static void nlm_fixup_mem(void) | ||
65 | { | ||
66 | const int pref_backup = 512; | ||
67 | int i; | ||
68 | |||
69 | for (i = 0; i < boot_mem_map.nr_map; i++) { | ||
70 | if (boot_mem_map.map[i].type != BOOT_MEM_RAM) | ||
71 | continue; | ||
72 | boot_mem_map.map[i].size -= pref_backup; | ||
73 | } | ||
74 | } | ||
75 | |||
64 | void __init plat_mem_setup(void) | 76 | void __init plat_mem_setup(void) |
65 | { | 77 | { |
66 | panic_timeout = 5; | 78 | panic_timeout = 5; |
@@ -70,6 +82,7 @@ void __init plat_mem_setup(void) | |||
70 | 82 | ||
71 | /* memory and bootargs from DT */ | 83 | /* memory and bootargs from DT */ |
72 | early_init_devtree(initial_boot_params); | 84 | early_init_devtree(initial_boot_params); |
85 | nlm_fixup_mem(); | ||
73 | } | 86 | } |
74 | 87 | ||
75 | const char *get_system_type(void) | 88 | const char *get_system_type(void) |