Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hppa/include Add lci to get coherence index for an ...
details: https://anonhg.NetBSD.org/src/rev/e6e3115005c2
branches: trunk
changeset: 749419:e6e3115005c2
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Nov 29 10:09:54 2009 +0000
description:
Add lci to get coherence index for an address.
diffstat:
sys/arch/hppa/include/cpufunc.h | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 3a123df75225 -r e6e3115005c2 sys/arch/hppa/include/cpufunc.h
--- a/sys/arch/hppa/include/cpufunc.h Sun Nov 29 10:08:15 2009 +0000
+++ b/sys/arch/hppa/include/cpufunc.h Sun Nov 29 10:09:54 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.h,v 1.13 2009/11/29 10:08:10 skrll Exp $ */
+/* $NetBSD: cpufunc.h,v 1.14 2009/11/29 10:09:54 skrll Exp $ */
/* $OpenBSD: cpufunc.h,v 1.17 2000/05/15 17:22:40 mickey Exp $ */
@@ -89,6 +89,19 @@
#define ssm(v,r) __asm volatile("ssm %1,%0": "=r" (r): "i" (v))
#define rsm(v,r) __asm volatile("rsm %1,%0": "=r" (r): "i" (v))
+
+/* Get coherence index for an address */
+static __inline register_t
+lci(pa_space_t sp, vaddr_t va) {
+ register_t ret;
+
+ mtsp((sp), 1); \
+ __asm volatile("lci 0(%%sr1, %1), %0" : "=r" (ret) : "r" (va));
+
+ return ret;
+}
+
+
/* Move to system mask. Old value of system mask is returned. */
static __inline register_t mtsm(register_t mask) {
register_t ret;
Home |
Main Index |
Thread Index |
Old Index