Ok. I didn't make 2.4.0 in 2000. Tough. I tried, but we had some
[davej-history.git] / arch / ia64 / lib / flush.S
blobba9d59f84e479b4206b70a5541be65e625b01099
1 /*
2  * Cache flushing routines.
3  *
4  * Copyright (C) 1999-2000 Hewlett-Packard Co
5  * Copyright (C) 1999-2000 David Mosberger-Tang <davidm@hpl.hp.com>
6  */
7 #include <asm/asmmacro.h>
8 #include <asm/page.h>
10         .text
11         .psr abi64
12         .psr lsb
13         .lsb
15 GLOBAL_ENTRY(ia64_flush_icache_page)
16         UNW(.prologue)
17         alloc r2=ar.pfs,1,0,0,0
18         UNW(.save ar.lc, r3)
19         mov r3=ar.lc                    // save ar.lc   
21         .body
23         mov r8=PAGE_SIZE/64-1           // repeat/until loop
24         ;;
25         mov ar.lc=r8
26         add r8=32,in0
27         ;;
28 .Loop1: fc in0                          // issuable on M0 only
29         add in0=64,in0
30         fc r8
31         add r8=64,r8
32         br.cloop.sptk.few .Loop1
33         ;;
34         sync.i
35         ;;
36         srlz.i
37         ;;      
38         mov ar.lc=r3                    // restore ar.lc
39         br.ret.sptk.few rp
40 END(ia64_flush_icache_page)