Module Name: src Committed By: skrll Date: Sun Nov 29 10:09:55 UTC 2009
Modified Files: src/sys/arch/hppa/include: cpufunc.h Log Message: Add lci to get coherence index for an address. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hppa/include/cpufunc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/hppa/include/cpufunc.h diff -u src/sys/arch/hppa/include/cpufunc.h:1.13 src/sys/arch/hppa/include/cpufunc.h:1.14 --- src/sys/arch/hppa/include/cpufunc.h:1.13 Sun Nov 29 10:08:10 2009 +++ src/sys/arch/hppa/include/cpufunc.h Sun Nov 29 10:09:54 2009 @@ -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;