Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1960 → Rev 1959

/trunk/kernel/arch/sparc64/src/mm/tsb.c
51,8 → 51,7
*
* @param as Address space.
* @param page First page to invalidate in TSB.
* @param pages Number of pages to invalidate.
* Value of (count_t) -1 means the whole TSB.
* @param pages Number of pages to invalidate. Value of (count_t) -1 means the whole TSB.
*/
void tsb_invalidate(as_t *as, uintptr_t page, count_t pages)
{
65,8 → 64,8
cnt = min(pages, ITSB_ENTRY_COUNT);
for (i = 0; i < cnt; i++) {
as->arch.itsb[(i0 + i) & (ITSB_ENTRY_COUNT-1)].tag.invalid = true;
as->arch.dtsb[(i0 + i) & (DTSB_ENTRY_COUNT-1)].tag.invalid = true;
as->arch.itsb[(i0 + i) & (ITSB_ENTRY_COUNT-1)].tag.invalid = 0;
as->arch.dtsb[(i0 + i) & (DTSB_ENTRY_COUNT-1)].tag.invalid = 0;
}
}
 
88,9 → 87,7
* be repeated.
*/
 
tsb->tag.invalid = true; /* invalidate the entry
* (tag target has this
* set to 0) */
tsb->tag.invalid = 1; /* invalidate the entry (tag target has this set to 0) */
 
write_barrier();
 
101,12 → 98,12
tsb->data.pfn = t->frame >> PAGE_WIDTH;
tsb->data.cp = t->c;
tsb->data.cv = t->c;
tsb->data.p = t->k; /* p as privileged */
tsb->data.p = t->k; /* p as privileged */
tsb->data.v = t->p;
write_barrier();
tsb->tag.invalid = false; /* mark the entry as valid */
tsb->tag.invalid = 0; /* mark the entry as valid */
}
 
/** Copy software PTE to DTSB.
128,9 → 125,7
* be repeated.
*/
 
tsb->tag.invalid = true; /* invalidate the entry
* (tag target has this
* set to 0) */
tsb->tag.invalid = 1; /* invalidate the entry (tag target has this set to 0) */
 
write_barrier();
 
141,13 → 136,13
tsb->data.pfn = t->frame >> PAGE_WIDTH;
tsb->data.cp = t->c;
tsb->data.cv = t->c;
tsb->data.p = t->k; /* p as privileged */
tsb->data.p = t->k; /* p as privileged */
tsb->data.w = ro ? false : t->w;
tsb->data.v = t->p;
write_barrier();
tsb->tag.invalid = true; /* mark the entry as valid */
tsb->tag.invalid = 0; /* mark the entry as valid */
}
 
/** @}