cacheflush.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (C) 2003 Microtronix Datacom Ltd.
  3. * Copyright (C) 2000-2002 Greg Ungerer <gerg@snapgear.com>
  4. *
  5. * This file is subject to the terms and conditions of the GNU General Public
  6. * License. See the file "COPYING" in the main directory of this archive
  7. * for more details.
  8. */
  9. #ifndef _ASM_NIOS2_CACHEFLUSH_H
  10. #define _ASM_NIOS2_CACHEFLUSH_H
  11. #include <linux/mm_types.h>
  12. /*
  13. * This flag is used to indicate that the page pointed to by a pte is clean
  14. * and does not require cleaning before returning it to the user.
  15. */
  16. #define PG_dcache_clean PG_arch_1
  17. struct mm_struct;
  18. extern void flush_cache_all(void);
  19. extern void flush_cache_mm(struct mm_struct *mm);
  20. extern void flush_cache_dup_mm(struct mm_struct *mm);
  21. extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
  22. unsigned long end);
  23. extern void flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr,
  24. unsigned long pfn);
  25. #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1
  26. extern void flush_dcache_page(struct page *page);
  27. extern void flush_icache_range(unsigned long start, unsigned long end);
  28. extern void flush_icache_page(struct vm_area_struct *vma, struct page *page);
  29. #define flush_cache_vmap(start, end) flush_dcache_range(start, end)
  30. #define flush_cache_vunmap(start, end) flush_dcache_range(start, end)
  31. extern void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
  32. unsigned long user_vaddr,
  33. void *dst, void *src, int len);
  34. extern void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
  35. unsigned long user_vaddr,
  36. void *dst, void *src, int len);
  37. extern void flush_dcache_range(unsigned long start, unsigned long end);
  38. extern void invalidate_dcache_range(unsigned long start, unsigned long end);
  39. #define flush_dcache_mmap_lock(mapping) do { } while (0)
  40. #define flush_dcache_mmap_unlock(mapping) do { } while (0)
  41. #endif /* _ASM_NIOS2_CACHEFLUSH_H */