Skip to content

Commit

Permalink
[Blackfin] arch: fix bug - a crash on bootup with CONFIG_MPU on the B…
Browse files Browse the repository at this point in the history
…F548

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: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
  • Loading branch information
Bernd Schmidt authored and Bryan Wu committed Apr 23, 2008
1 parent 697a9d6 commit d56daae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/blackfin/kernel/cplb-mpu/cplbmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ void flush_switched_cplbs(void)
enable_icplb();

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;
bfin_write32(DCPLB_DATA0 + i * 4, 0);
}
Expand Down

0 comments on commit d56daae

Please sign in to comment.