summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm/init.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-01-31 18:32:04 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:11:19 -0800
commitb70c0fa1613c4f69b4a340a0e2bee387560ebbb1 (patch)
treef7bf22ab75cb9118f5772353fef6efd923faa212 /arch/sparc64/mm/init.c
parentbd40791e1d289d807b8580abe1f117e9c62894e4 (diff)
downloadlinux-b70c0fa1613c4f69b4a340a0e2bee387560ebbb1.tar.gz
linux-b70c0fa1613c4f69b4a340a0e2bee387560ebbb1.tar.bz2
linux-b70c0fa1613c4f69b4a340a0e2bee387560ebbb1.zip
[SPARC64]: Preload TSB entries from update_mmu_cache().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/mm/init.c')
-rw-r--r--arch/sparc64/mm/init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index a8119cb4fa32..1e8a5a33639d 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -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)