Changeset edebc15c in mainline for kernel/arch/mips32/src/mm/tlb.c
- Timestamp:
- 2008-07-27T03:50:53Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4541ae4
- Parents:
- 5e8ddf5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mm/tlb.c
r5e8ddf5 redebc15c 54 54 static pte_t *find_mapping_and_check(uintptr_t badvaddr, int access, istate_t *istate, int *pfrc); 55 55 56 static void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn);57 static void prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr);58 59 56 /** Initialize TLB 60 57 * … … 77 74 tlbwi(); 78 75 } 79 80 76 81 77 /* … … 132 128 pte->a = 1; 133 129 134 prepare_entry_hi(&hi, asid, badvaddr);135 prepare_entry_lo(&lo, pte->g, pte->p, pte->d, pte->cacheable, pte->pfn);130 tlb_prepare_entry_hi(&hi, asid, badvaddr); 131 tlb_prepare_entry_lo(&lo, pte->g, pte->p, pte->d, pte->cacheable, pte->pfn); 136 132 137 133 /* … … 179 175 */ 180 176 hi.value = cp0_entry_hi_read(); 181 prepare_entry_hi(&hi, hi.asid, badvaddr);177 tlb_prepare_entry_hi(&hi, hi.asid, badvaddr); 182 178 cp0_entry_hi_write(hi.value); 183 179 tlbp(); … … 222 218 pte->a = 1; 223 219 224 prepare_entry_lo(&lo, pte->g, pte->p, pte->d, pte->cacheable, pte->pfn);220 tlb_prepare_entry_lo(&lo, pte->g, pte->p, pte->d, pte->cacheable, pte->pfn); 225 221 226 222 /* … … 263 259 */ 264 260 hi.value = cp0_entry_hi_read(); 265 prepare_entry_hi(&hi, hi.asid, badvaddr);261 tlb_prepare_entry_hi(&hi, hi.asid, badvaddr); 266 262 cp0_entry_hi_write(hi.value); 267 263 tlbp(); … … 313 309 pte->d = 1; 314 310 315 prepare_entry_lo(&lo, pte->g, pte->p, pte->w, pte->cacheable, pte->pfn);311 tlb_prepare_entry_lo(&lo, pte->g, pte->p, pte->w, pte->cacheable, pte->pfn); 316 312 317 313 /* … … 446 442 } 447 443 448 void prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn)444 void tlb_prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn) 449 445 { 450 446 lo->value = 0; … … 456 452 } 457 453 458 void prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr)454 void tlb_prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr) 459 455 { 460 456 hi->value = ALIGN_DOWN(addr, PAGE_SIZE * 2); … … 586 582 for (i = 0; i < cnt + 1; i += 2) { 587 583 hi.value = 0; 588 prepare_entry_hi(&hi, asid, page + i * PAGE_SIZE);584 tlb_prepare_entry_hi(&hi, asid, page + i * PAGE_SIZE); 589 585 cp0_entry_hi_write(hi.value); 590 586
Note:
See TracChangeset
for help on using the changeset viewer.