summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-02-23 21:10:06 +0000
committerjake <jake@FreeBSD.org>2002-02-23 21:10:06 +0000
commit63d6dd6dde224991d838266ff2d942e192735d8d (patch)
treef49d439e9469c658c59f9859c09afc79b42a05b6 /sys/sparc64
parent0a286122a7a7485f3fc6bd493966da29f94e05da (diff)
downloadFreeBSD-src-63d6dd6dde224991d838266ff2d942e192735d8d.zip
FreeBSD-src-63d6dd6dde224991d838266ff2d942e192735d8d.tar.gz
Add inlines for demapping a range of pages from the itlb and dtlb. This
will be used to reduce the number of tlb shootdown ipis in an smp system by sending one ipi for a whole range of pages, instead of one per page. Munge the context demap operations slightly to support demapping a non-primary context.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/include/tlb.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/sparc64/include/tlb.h b/sys/sparc64/include/tlb.h
index 1db885a..14c6635 100644
--- a/sys/sparc64/include/tlb.h
+++ b/sys/sparc64/include/tlb.h
@@ -187,12 +187,10 @@ tlb_itlb_store(vm_offset_t va, u_long ctx, struct tte tte)
}
static __inline void
-tlb_context_primary_demap(u_int tlb)
+tlb_context_demap(u_int context)
{
- if (tlb & TLB_DTLB)
- tlb_dtlb_context_primary_demap();
- if (tlb & TLB_ITLB)
- tlb_itlb_context_primary_demap();
+ tlb_dtlb_context_primary_demap();
+ tlb_itlb_context_primary_demap();
}
static __inline void
@@ -217,6 +215,19 @@ tlb_page_demap(u_int tlb, u_int ctx, vm_offset_t va)
}
static __inline void
+tlb_range_demap(u_int ctx, vm_offset_t start, vm_offset_t end)
+{
+ for (; start < end; start += PAGE_SIZE)
+ tlb_page_demap(TLB_DTLB | TLB_ITLB, ctx, start);
+}
+
+static __inline void
+tlb_tte_demap(struct tte tte, vm_offset_t va)
+{
+ tlb_page_demap(TD_GET_TLB(tte.tte_data), TT_GET_CTX(tte.tte_tag), va);
+}
+
+static __inline void
tlb_store(u_int tlb, vm_offset_t va, u_long ctx, struct tte tte)
{
if (tlb & TLB_DTLB)
OpenPOWER on IntegriCloud