1
2
3
4
5
6
7
8
9
10#ifndef _ASM_NIOS2_CACHEFLUSH_H
11#define _ASM_NIOS2_CACHEFLUSH_H
12
13#include <linux/mm_types.h>
14
15
16
17
18
19#define PG_dcache_clean PG_arch_1
20
21struct mm_struct;
22
23extern void flush_cache_all(void);
24extern void flush_cache_mm(struct mm_struct *mm);
25extern void flush_cache_dup_mm(struct mm_struct *mm);
26extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
27 unsigned long end);
28extern void flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr,
29 unsigned long pfn);
30#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
31extern void flush_dcache_page(struct page *page);
32
33extern void flush_icache_range(unsigned long start, unsigned long end);
34extern void flush_icache_page(struct vm_area_struct *vma, struct page *page);
35
36#define flush_cache_vmap(start, end) flush_dcache_range(start, end)
37#define flush_cache_vunmap(start, end) flush_dcache_range(start, end)
38
39extern void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
40 unsigned long user_vaddr,
41 void *dst, void *src, int len);
42extern void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
43 unsigned long user_vaddr,
44 void *dst, void *src, int len);
45
46extern void flush_dcache_range(unsigned long start, unsigned long end);
47extern void invalidate_dcache_range(unsigned long start, unsigned long end);
48
49#define flush_dcache_mmap_lock(mapping) xa_lock_irq(&mapping->i_pages)
50#define flush_dcache_mmap_unlock(mapping) xa_unlock_irq(&mapping->i_pages)
51
52#endif
53