summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorAriane van der Steldt <ariane@cvs.openbsd.org>2011-04-28 20:46:31 +0000
committerAriane van der Steldt <ariane@cvs.openbsd.org>2011-04-28 20:46:31 +0000
commit9667e4f62326bb70e0405ee239dcfed0d1d6382d (patch)
tree83e3b687404975b53651bea98df2cdd03a13050d /sys/arch/mips64
parent6a424431dcfe5509b844f93b4b20d8814efd077d (diff)
Expose pmap_prefer parameters.
This will enable future uvm_map code to make intelligent decisions during allocation.
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/include/pmap.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/mips64/include/pmap.h b/sys/arch/mips64/include/pmap.h
index 7c969b277db..f360a24cd48 100644
--- a/sys/arch/mips64/include/pmap.h
+++ b/sys/arch/mips64/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.25 2011/03/23 16:54:36 pirofti Exp $ */
+/* $OpenBSD: pmap.h,v 1.26 2011/04/28 20:46:30 ariane Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -125,6 +125,13 @@ extern struct pmap *const kernel_pmap_ptr;
#define PMAP_PREFER(pa, va) pmap_prefer(pa, va)
+extern vaddr_t CpuCacheAliasMask; /* from mips64/mips64/cpu.c */
+/* pmap prefer alignment */
+#define PMAP_PREFER_ALIGN() \
+ (CpuCacheAliasMask ? CpuCacheAliasMask + 1 : 0)
+/* pmap prefer offset in alignment */
+#define PMAP_PREFER_OFFSET(of) ((of) & CpuCacheAliasMask)
+
#define pmap_update(x) do { /* nothing */ } while (0)
void pmap_bootstrap(void);