Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21345
b: refs/heads/master
c: b70c0fa
h: refs/heads/master
i:
  21343: 0d269c4
v: v3
  • Loading branch information
David S. Miller authored and David S. Miller committed Mar 20, 2006
1 parent 200688c commit 7a5da1e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd40791e1d289d807b8580abe1f117e9c62894e4
refs/heads/master: b70c0fa1613c4f69b4a340a0e2bee387560ebbb1
17 changes: 17 additions & 0 deletions trunk/arch/sparc64/kernel/tsb.S
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ winfix_trampoline:
wrpr %g3, %tnpc ! Write it into TNPC
done ! Trap return

/* Insert an entry into the TSB.
*
* %o0: TSB entry pointer
* %o1: tag
* %o2: pte
*/
.align 32
.globl tsb_insert
tsb_insert:
rdpr %pstate, %o5
wrpr %o5, PSTATE_IE, %pstate
TSB_LOCK_TAG(%o0, %g2, %g3)
TSB_WRITE(%o0, %o2, %o1)
wrpr %o5, %pstate
retl
nop

/* Reload MMU related context switch state at
* schedule() time.
*
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/sparc64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,16 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p
mm_rss = get_mm_rss(mm);
if (mm_rss >= mm->context.tsb_rss_limit)
tsb_grow(mm, mm_rss, GFP_ATOMIC);

if ((pte_val(pte) & _PAGE_ALL_SZ_BITS) == _PAGE_SZBITS) {
struct tsb *tsb;
unsigned long tag;

tsb = &mm->context.tsb[(address >> PAGE_SHIFT) &
(mm->context.tsb_nentries - 1UL)];
tag = (address >> 22UL) | CTX_HWBITS(mm->context) << 48UL;
tsb_insert(tsb, tag, pte_val(pte));
}
}

void flush_dcache_page(struct page *page)
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-sparc64/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ struct tsb {
unsigned long pte;
} __attribute__((aligned(TSB_ENTRY_ALIGNMENT)));

extern void tsb_insert(struct tsb *ent, unsigned long tag, unsigned long pte);

typedef struct {
unsigned long sparc64_ctx_val;
struct tsb *tsb;
Expand Down

0 comments on commit 7a5da1e

Please sign in to comment.