提交 d56daae9 编写于 作者: B Bernd Schmidt 提交者: Bryan Wu

[Blackfin] arch: fix bug - a crash on bootup with CONFIG_MPU on the BF548

The function flush_switched_dcplbs was clearing the CPLB entries covering
the process permission bitmasks.  This means that the sequence

	flush_switched_dcplbs ();
        set_mask_dcplbs(mm->context.page_rwx_mask);

has a problem: if kernel code (such as an interrupt) causes a CPLB miss before
set_mask_dcplbs completes, the CPLB handler function causes a double fault,
with an instantaneous reboot.

This bug fix is dedicated to Michael Hennerich, the only person in the world
capable of providing working JTAG hardware.
Signed-off-by: NBernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: NBryan Wu <cooloney@kernel.org>
上级 697a9d65
...@@ -307,7 +307,7 @@ void flush_switched_cplbs(void) ...@@ -307,7 +307,7 @@ void flush_switched_cplbs(void)
enable_icplb(); enable_icplb();
disable_dcplb(); disable_dcplb();
for (i = first_mask_dcplb; i < MAX_CPLBS; i++) { for (i = first_switched_dcplb; i < MAX_CPLBS; i++) {
dcplb_tbl[i].data = 0; dcplb_tbl[i].data = 0;
bfin_write32(DCPLB_DATA0 + i * 4, 0); bfin_write32(DCPLB_DATA0 + i * 4, 0);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册