2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 03 by Ralf Baechle
7 * Copyright (C) 1999, 2000, 2001 Silicon Graphics, Inc.
9 #ifndef _ASM_CACHEFLUSH_H
10 #define _ASM_CACHEFLUSH_H
12 #include <linux/config.h>
14 /* Keep includes the same across arches. */
19 * - flush_cache_all() flushes entire cache
20 * - flush_cache_mm(mm) flushes the specified mm context's cache lines
21 * - flush_cache_page(mm, vmaddr) flushes a single page
22 * - flush_cache_range(vma, start, end) flushes a range of pages
23 * - flush_icache_range(start, end) flush a range of instructions
24 * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache
25 * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache
27 * MIPS specific flush operations:
29 * - flush_cache_sigtramp() flush signal trampoline
30 * - flush_icache_all() flush the entire instruction cache
31 * - flush_data_cache_page() flushes a page from the data cache
33 extern void (*flush_cache_all
)(void);
34 extern void (*__flush_cache_all
)(void);
35 extern void (*flush_cache_mm
)(struct mm_struct
*mm
);
36 extern void (*flush_cache_range
)(struct vm_area_struct
*vma
,
37 unsigned long start
, unsigned long end
);
38 extern void (*flush_cache_page
)(struct vm_area_struct
*vma
,
40 extern void flush_dcache_page(struct page
*page
);
41 extern void (*flush_icache_page
)(struct vm_area_struct
*vma
,
43 extern void (*flush_icache_range
)(unsigned long start
, unsigned long end
);
44 #define flush_icache_user_range(vma, page, addr, len) \
45 flush_icache_page(vma, page)
48 extern void (*flush_cache_sigtramp
)(unsigned long addr
);
49 extern void (*flush_icache_all
)(void);
50 extern void (*flush_data_cache_page
)(unsigned long addr
);
53 * This flag is used to indicate that the page pointed to by a pte
54 * is dirty and requires cleaning before returning it to the user.
56 #define PG_dcache_dirty PG_arch_1
58 #define Page_dcache_dirty(page) \
59 test_bit(PG_dcache_dirty, &(page)->flags)
60 #define SetPageDcacheDirty(page) \
61 set_bit(PG_dcache_dirty, &(page)->flags)
62 #define ClearPageDcacheDirty(page) \
63 clear_bit(PG_dcache_dirty, &(page)->flags)
65 #endif /* _ASM_CACHEFLUSH_H */