tlb.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef _ASM_ARC_TLB_H
  9. #define _ASM_ARC_TLB_H
  10. #define tlb_flush(tlb) \
  11. do { \
  12. if (tlb->fullmm) \
  13. flush_tlb_mm((tlb)->mm); \
  14. } while (0)
  15. /*
  16. * This pair is called at time of munmap/exit to flush cache and TLB entries
  17. * for mappings being torn down.
  18. * 1) cache-flush part -implemented via tlb_start_vma( ) for VIPT aliasing D$
  19. * 2) tlb-flush part - implemted via tlb_end_vma( ) flushes the TLB range
  20. *
  21. * Note, read http://lkml.org/lkml/2004/1/15/6
  22. */
  23. #ifndef CONFIG_ARC_CACHE_VIPT_ALIASING
  24. #define tlb_start_vma(tlb, vma)
  25. #else
  26. #define tlb_start_vma(tlb, vma) \
  27. do { \
  28. if (!tlb->fullmm) \
  29. flush_cache_range(vma, vma->vm_start, vma->vm_end); \
  30. } while(0)
  31. #endif
  32. #define tlb_end_vma(tlb, vma) \
  33. do { \
  34. if (!tlb->fullmm) \
  35. flush_tlb_range(vma, vma->vm_start, vma->vm_end); \
  36. } while (0)
  37. #define __tlb_remove_tlb_entry(tlb, ptep, address)
  38. #include <linux/pagemap.h>
  39. #include <asm-generic/tlb.h>
  40. #endif /* _ASM_ARC_TLB_H */