tlb.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * include/asm-xtensa/tlb.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2001 - 2005 Tensilica Inc.
  9. */
  10. #ifndef _XTENSA_TLB_H
  11. #define _XTENSA_TLB_H
  12. #include <asm/cache.h>
  13. #include <asm/page.h>
  14. #if (DCACHE_WAY_SIZE <= PAGE_SIZE)
  15. /* Note, read http://lkml.org/lkml/2004/1/15/6 */
  16. # define tlb_start_vma(tlb,vma) do { } while (0)
  17. # define tlb_end_vma(tlb,vma) do { } while (0)
  18. #else
  19. # define tlb_start_vma(tlb, vma) \
  20. do { \
  21. if (!tlb->fullmm) \
  22. flush_cache_range(vma, vma->vm_start, vma->vm_end); \
  23. } while(0)
  24. # define tlb_end_vma(tlb, vma) \
  25. do { \
  26. if (!tlb->fullmm) \
  27. flush_tlb_range(vma, vma->vm_start, vma->vm_end); \
  28. } while(0)
  29. #endif
  30. #define __tlb_remove_tlb_entry(tlb,pte,addr) do { } while (0)
  31. #define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
  32. #include <asm-generic/tlb.h>
  33. #define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
  34. #endif /* _XTENSA_TLB_H */