This source file includes following definitions.
- sys_cacheflush
- sys_getpagesize
1
2
3
4
5
6
7
8
9
10
11 #include <linux/export.h>
12 #include <linux/file.h>
13 #include <linux/fs.h>
14 #include <linux/slab.h>
15 #include <linux/syscalls.h>
16
17 #include <asm/cacheflush.h>
18 #include <asm/traps.h>
19
20
21 asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len,
22 unsigned int op)
23 {
24 struct vm_area_struct *vma;
25
26 if (len == 0)
27 return 0;
28
29
30 if (op)
31 return -EINVAL;
32
33
34 if (addr + len < addr)
35 return -EFAULT;
36
37
38
39
40
41 vma = find_vma(current->mm, addr);
42 if (vma == NULL || addr < vma->vm_start || addr + len > vma->vm_end)
43 return -EFAULT;
44
45 flush_cache_range(vma, addr, addr + len);
46
47 return 0;
48 }
49
50 asmlinkage int sys_getpagesize(void)
51 {
52 return PAGE_SIZE;
53 }