| * Copyright (C) 2013 Altera Corporation |
| * Copyright (C) 2011-2012 Tobias Klauser <tklauser@distanz.ch> |
| * Copyright (C) 2004 Microtronix Datacom Ltd. |
| * This file is subject to the terms and conditions of the GNU General Public |
| * License. See the file "COPYING" in the main directory of this archive |
| #include <linux/export.h> |
| #include <linux/syscalls.h> |
| #include <asm/cacheflush.h> |
| /* sys_cacheflush -- flush the processor cache. */ |
| asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, |
| struct vm_area_struct *vma; |
| struct mm_struct *mm = current->mm; |
| /* We only support op 0 now, return error if op is non-zero.*/ |
| if (mmap_read_lock_killable(mm)) |
| * Verify that the specified address region actually belongs |
| vma = find_vma(mm, addr); |
| if (vma == NULL || addr < vma->vm_start || addr + len > vma->vm_end) { |
| flush_cache_range(vma, addr, addr + len); |
| asmlinkage int sys_getpagesize(void) |