summaryrefslogtreecommitdiffstats
path: root/arch/ia64/lib/flush.S
blob: ba9d59f84e479b4206b70a5541be65e625b01099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * Cache flushing routines.
 *
 * Copyright (C) 1999-2000 Hewlett-Packard Co
 * Copyright (C) 1999-2000 David Mosberger-Tang <davidm@hpl.hp.com>
 */
#include <asm/asmmacro.h>
#include <asm/page.h>

	.text
	.psr abi64
	.psr lsb
	.lsb

GLOBAL_ENTRY(ia64_flush_icache_page)
	UNW(.prologue)
	alloc r2=ar.pfs,1,0,0,0
	UNW(.save ar.lc, r3)
	mov r3=ar.lc			// save ar.lc	

	.body

	mov r8=PAGE_SIZE/64-1		// repeat/until loop
	;;
	mov ar.lc=r8
	add r8=32,in0
	;;
.Loop1:	fc in0				// issuable on M0 only
	add in0=64,in0
	fc r8
	add r8=64,r8
	br.cloop.sptk.few .Loop1
	;;
	sync.i
	;;
	srlz.i
	;;	
	mov ar.lc=r3			// restore ar.lc
	br.ret.sptk.few rp
END(ia64_flush_icache_page)