aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/include
diff options
context:
space:
mode:
authorThomas Moestl <tmm@FreeBSD.org>2002-01-02 18:49:20 +0000
committerThomas Moestl <tmm@FreeBSD.org>2002-01-02 18:49:20 +0000
commit62ec4add59e6f0a221309e91146a17ad857adc2f (patch)
treeede4b5f3510aa0b31e91d799d06b9233fc002087 /sys/sparc64/include
parent0b4a1071456b6109a482a402d54277cb2dacae1e (diff)
1. Implement an optimization for pmap_remove() and pmap_protect(): if a
substantial fraction of the number of entries of tte's in the tsb would need to be looked up, traverse the tsb instead. This is crucial in some places, e.g. when swapping out a process, where a certain pmap_remove() call would take very long time to complete without this. 2. Implement pmap_qenter_flags(), which will become used later 3. Reactivate the instruction cache flush done when mapping as executable. This is required e.g. when executing files via NFS, but is known to cause problems on UltraSPARC-IIe CPU's. If you have such a CPU, you will need to comment this call out for now. Submitted by: jake (3)
Notes
Notes: svn path=/head/; revision=88826
Diffstat (limited to 'sys/sparc64/include')
-rw-r--r--sys/sparc64/include/pmap.h1
-rw-r--r--sys/sparc64/include/tsb.h9
2 files changed, 9 insertions, 1 deletions
diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h
index 7ab24097b350..71496c34cf6d 100644
--- a/sys/sparc64/include/pmap.h
+++ b/sys/sparc64/include/pmap.h
@@ -87,6 +87,7 @@ struct pv_entry {
void pmap_bootstrap(vm_offset_t ekva);
vm_offset_t pmap_kextract(vm_offset_t va);
void pmap_kenter_flags(vm_offset_t va, vm_offset_t pa, u_long flags);
+void pmap_qenter_flags(vm_offset_t va, vm_page_t *m, int count, u_long fl);
int pmap_cache_enter(vm_page_t m, vm_offset_t va);
void pmap_cache_remove(vm_page_t m, vm_offset_t va);
diff --git a/sys/sparc64/include/tsb.h b/sys/sparc64/include/tsb.h
index 9391e6077fd5..b99621717a1f 100644
--- a/sys/sparc64/include/tsb.h
+++ b/sys/sparc64/include/tsb.h
@@ -32,10 +32,13 @@
#ifndef _MACHINE_TSB_H_
#define _MACHINE_TSB_H_
+#define TSB_BSHIFT PAGE_SHIFT_8K
+#define TSB_BSIZE (1UL << TSB_BSHIFT)
+#define TSB_SIZE (TSB_BSIZE / sizeof(struct tte))
#define TSB_BUCKET_SHIFT (2)
#define TSB_BUCKET_SIZE (1 << TSB_BUCKET_SHIFT)
#define TSB_BUCKET_ADDRESS_BITS \
- (PAGE_SHIFT_8K - TSB_BUCKET_SHIFT - TTE_SHIFT)
+ (TSB_BSHIFT - TSB_BUCKET_SHIFT - TTE_SHIFT)
#define TSB_BUCKET_MASK ((1 << TSB_BUCKET_ADDRESS_BITS) - 1)
#define TSB_KERNEL_SIZE \
@@ -70,10 +73,14 @@ tsb_kvtotte(vm_offset_t va)
return (tsb_kvpntotte(va >> PAGE_SHIFT));
}
+typedef int (tsb_callback_t)(struct pmap *, struct tte *, vm_offset_t);
+
struct tte *tsb_tte_lookup(pmap_t pm, vm_offset_t va);
void tsb_tte_remove(struct tte *stp);
struct tte *tsb_tte_enter(pmap_t pm, vm_page_t m, vm_offset_t va,
struct tte tte);
void tsb_tte_local_remove(struct tte *tp);
+void tsb_foreach(pmap_t pm, vm_offset_t start, vm_offset_t end,
+ tsb_callback_t *callback);
#endif /* !_MACHINE_TSB_H_ */