summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-07-07 17:43:56 +0000
committermarcel <marcel@FreeBSD.org>2008-07-07 17:43:56 +0000
commit1c800dbdb5e15c6385c702e7e6e78199ef26b790 (patch)
tree12a478daa2453a908ca20a37c8a53bd22644ad20 /sys/ia64
parent489d9dac95998c0f638072ca1c2eba28ce34e58e (diff)
downloadFreeBSD-src-1c800dbdb5e15c6385c702e7e6e78199ef26b790.zip
FreeBSD-src-1c800dbdb5e15c6385c702e7e6e78199ef26b790.tar.gz
Add inline function ia64_fc_i() to abstract inline assembly.
Use the new inline function in ia64_invalidate_icache(). While there, add proper synchronization so that we know the fc.i instructions have taken effect when we return.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/machdep.c5
-rw-r--r--sys/ia64/include/ia64_cpu.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index 9955a8e..3c6e61d 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -1531,7 +1531,10 @@ ia64_invalidate_icache(vm_offset_t va, vm_offset_t sz)
lim = va + sz;
while (va < lim) {
- __asm __volatile("fc.i %0" :: "r"(va));
+ ia64_fc_i(va);
va += 32; /* XXX */
}
+
+ ia64_sync_i();
+ ia64_srlz_i();
}
diff --git a/sys/ia64/include/ia64_cpu.h b/sys/ia64/include/ia64_cpu.h
index 44926e7..3d6c725 100644
--- a/sys/ia64/include/ia64_cpu.h
+++ b/sys/ia64/include/ia64_cpu.h
@@ -197,6 +197,12 @@ ia64_fc(u_int64_t va)
__asm __volatile("fc %0" :: "r"(va));
}
+static __inline void
+ia64_fc_i(u_int64_t va)
+{
+ __asm __volatile("fc.i %0" :: "r"(va));
+}
+
/*
* Sync instruction stream.
*/
OpenPOWER on IntegriCloud