blackfin: cplb-mpu: fix page mask table overflow
authorBarry Song <barry.song@analog.com>
Sun, 21 Feb 2010 03:01:20 +0000 (03:01 +0000)
committerBob Liu <lliubbo@gmail.com>
Wed, 21 Mar 2012 03:00:06 +0000 (11:00 +0800)
page mask table will overflow without xip related macros.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
arch/blackfin/kernel/cplb-mpu/cplbmgr.c

index 8de92299b3ee1d58df6871822e3a8ff65c0c52f0..b56bd8514b7cbbf1d1162049c7c6fa31b5cf8799 100644 (file)
@@ -120,6 +120,7 @@ MGR_ATTR static noinline int dcplb_miss(unsigned int cpu)
                d_data = L2_DMEMORY;
        } else if (addr >= physical_mem_end) {
                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];
                        if (mask) {
                                int page = (addr - (ASYNC_BANK0_BASE - _ramend)) >> PAGE_SHIFT;
@@ -129,6 +130,7 @@ MGR_ATTR static noinline int dcplb_miss(unsigned int cpu)
                                if (mask[idx] & bit)
                                        d_data |= CPLB_USER_RD;
                        }
+#endif
                } else if (addr >= BOOT_ROM_START && addr < BOOT_ROM_START + BOOT_ROM_LENGTH
                    && (status & (FAULT_RW | FAULT_USERSUPV)) == FAULT_USERSUPV) {
                        addr &= ~(1 * 1024 * 1024 - 1);