alistair23-linux/arch/ia64/lib/flush.S
David Mosberger-Tang 2074615a13 [IA64] use fc.i for fluch_icache_range()
This is a small patch to switch fluch_icache_range() to use fc.i
instead of fc.  This would save time on processors which can establish
i-cache coherency without flushing the cache-line out to memory (not
that any current processors do).  On existing processors, fc.i behaves
like fc.  The only caveat is that very old assemblers may not know
about fc.i yet.

Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-05-03 11:27:33 -07:00

40 lines
763 B
ArmAsm

/*
* Cache flushing routines.
*
* Copyright (C) 1999-2001, 2005 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
#include <asm/asmmacro.h>
#include <asm/page.h>
/*
* flush_icache_range(start,end)
* Must flush range from start to end-1 but nothing else (need to
* be careful not to touch addresses that may be unmapped).
*/
GLOBAL_ENTRY(flush_icache_range)
.prologue
alloc r2=ar.pfs,2,0,0,0
sub r8=in1,in0,1
;;
shr.u r8=r8,5 // we flush 32 bytes per iteration
.save ar.lc, r3
mov r3=ar.lc // save ar.lc
;;
.body
mov ar.lc=r8
;;
.Loop: fc.i in0 // issuable on M2 only
add in0=32,in0
br.cloop.sptk.few .Loop
;;
sync.i
;;
srlz.i
;;
mov ar.lc=r3 // restore ar.lc
br.ret.sptk.many rp
END(flush_icache_range)