Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92281
b: refs/heads/master
c: b4bb68f
h: refs/heads/master
i:
  92279: 5775229
v: v3
  • Loading branch information
Bernd Schmidt authored and Bryan Wu committed Apr 22, 2008
1 parent 0d74f1e commit fc0a9d2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a0c4fdb6602ea066380aaf71ff7bb2f61ffeee8
refs/heads/master: b4bb68f7d049e923a812903133e7e3747dfe0fce
46 changes: 27 additions & 19 deletions trunk/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,30 +143,39 @@ static noinline int dcplb_miss(void)
unsigned long d_data;

nr_dcplb_miss++;
if (addr >= _ramend)
return CPLB_PROT_VIOL;

d_data = CPLB_SUPV_WR | CPLB_VALID | CPLB_DIRTY | PAGE_SIZE_4KB;
#ifdef CONFIG_BFIN_DCACHE
d_data |= CPLB_L1_CHBL | ANOMALY_05000158_WORKAROUND;
if (addr < _ramend - DMA_UNCACHED_REGION) {
d_data |= CPLB_L1_CHBL | ANOMALY_05000158_WORKAROUND;
#ifdef CONFIG_BFIN_WT
d_data |= CPLB_L1_AOW | CPLB_WT;
#endif
d_data |= CPLB_L1_AOW | CPLB_WT;
#endif
mask = current_rwx_mask;
if (mask) {
int page = addr >> PAGE_SHIFT;
int offs = page >> 5;
int bit = 1 << (page & 31);

if (mask[offs] & bit)
d_data |= CPLB_USER_RD;

mask += page_mask_nelts;
if (mask[offs] & bit)
d_data |= CPLB_USER_WR;
}
#endif
if (addr >= _ramend) {
if (addr >= ASYNC_BANK0_BASE && addr < ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE
&& (status & FAULT_USERSUPV)) {
addr &= ~0x3fffff;
d_data &= ~PAGE_SIZE_4KB;
d_data |= PAGE_SIZE_4MB;
} else
return CPLB_PROT_VIOL;
} else {
mask = current_rwx_mask;
if (mask) {
int page = addr >> PAGE_SHIFT;
int offs = page >> 5;
int bit = 1 << (page & 31);

if (mask[offs] & bit)
d_data |= CPLB_USER_RD;

mask += page_mask_nelts;
if (mask[offs] & bit)
d_data |= CPLB_USER_WR;
}
}
idx = evict_one_dcplb();

addr &= PAGE_MASK;
Expand Down Expand Up @@ -280,8 +289,7 @@ int cplb_hdr(int seqstat, struct pt_regs *regs)
case 0x26:
return dcplb_miss();
default:
return 1;
panic_cplb_error(seqstat, regs);
return 1;
}
}

Expand Down

0 comments on commit fc0a9d2

Please sign in to comment.