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.
This commit is contained in:
Marcel Moolenaar 2008-07-07 17:43:56 +00:00
parent 43dcfbc191
commit d3fc9d46d4
2 changed files with 10 additions and 1 deletions

View File

@ -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();
}

View File

@ -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.
*/