提交 72213834 编写于 作者: J Jayachandran C 提交者: Ralf Baechle

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: NJayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5431/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 4033d38c
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册