Commit 4936afc6 authored by Barry Song's avatar Barry Song Committed by Bob Liu

blackfin: cplb-mpu: fix page mask table overflow

page mask table will overflow without xip related macros.
Signed-off-by: default avatarBarry Song <barry.song@analog.com>
Signed-off-by: default avatarBob Liu <lliubbo@gmail.com>
parent edd8a97e
...@@ -120,6 +120,7 @@ MGR_ATTR static noinline int dcplb_miss(unsigned int cpu) ...@@ -120,6 +120,7 @@ MGR_ATTR static noinline int dcplb_miss(unsigned int cpu)
d_data = L2_DMEMORY; d_data = L2_DMEMORY;
} else if (addr >= physical_mem_end) { } else if (addr >= physical_mem_end) {
if (addr >= ASYNC_BANK0_BASE && addr < ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE) { if (addr >= ASYNC_BANK0_BASE && addr < ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE) {
#if defined(CONFIG_ROMFS_ON_MTD) && defined(CONFIG_MTD_ROM)
mask = current_rwx_mask[cpu]; mask = current_rwx_mask[cpu];
if (mask) { if (mask) {
int page = (addr - (ASYNC_BANK0_BASE - _ramend)) >> PAGE_SHIFT; int page = (addr - (ASYNC_BANK0_BASE - _ramend)) >> PAGE_SHIFT;
...@@ -129,6 +130,7 @@ MGR_ATTR static noinline int dcplb_miss(unsigned int cpu) ...@@ -129,6 +130,7 @@ MGR_ATTR static noinline int dcplb_miss(unsigned int cpu)
if (mask[idx] & bit) if (mask[idx] & bit)
d_data |= CPLB_USER_RD; d_data |= CPLB_USER_RD;
} }
#endif
} else if (addr >= BOOT_ROM_START && addr < BOOT_ROM_START + BOOT_ROM_LENGTH } else if (addr >= BOOT_ROM_START && addr < BOOT_ROM_START + BOOT_ROM_LENGTH
&& (status & (FAULT_RW | FAULT_USERSUPV)) == FAULT_USERSUPV) { && (status & (FAULT_RW | FAULT_USERSUPV)) == FAULT_USERSUPV) {
addr &= ~(1 * 1024 * 1024 - 1); addr &= ~(1 * 1024 * 1024 - 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment