File: flush.S

package info (click to toggle)
kernel-image-2.4.17-hppa 32.4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 156,356 kB
  • ctags: 442,585
  • sloc: ansic: 2,542,442; asm: 144,771; makefile: 8,468; sh: 3,097; perl: 2,578; yacc: 1,177; tcl: 577; lex: 352; awk: 251; lisp: 218; sed: 72
file content (39 lines) | stat: -rw-r--r-- 780 bytes parent folder | download | duplicates (10)
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
/*
 * Cache flushing routines.
 *
 * Copyright (C) 1999-2001 Hewlett-Packard Co
 * Copyright (C) 1999-2001 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 in0				// issuable on M0 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)