tlbflush.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * TLB flush support for Hexagon
  3. *
  4. * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 and
  8. * only version 2 as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  18. * 02110-1301, USA.
  19. */
  20. #ifndef _ASM_TLBFLUSH_H
  21. #define _ASM_TLBFLUSH_H
  22. #include <linux/mm.h>
  23. #include <asm/processor.h>
  24. /*
  25. * TLB flushing -- in "SMP", these routines get defined to be the
  26. * ones from smp.c, else they are some local flavors.
  27. */
  28. /*
  29. * These functions are commonly macros, but in the interests of
  30. * VM vs. native implementation and code size, we simply declare
  31. * the function prototypes here.
  32. */
  33. extern void tlb_flush_all(void);
  34. extern void flush_tlb_mm(struct mm_struct *mm);
  35. extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
  36. extern void flush_tlb_range(struct vm_area_struct *vma,
  37. unsigned long start, unsigned long end);
  38. extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
  39. extern void flush_tlb_one(unsigned long);
  40. /*
  41. * "This is called in munmap when we have freed up some page-table pages.
  42. * We don't need to do anything here..."
  43. *
  44. * The VM kernel doesn't walk page tables, and they are passed to the VMM
  45. * by logical address. There doesn't seem to be any possibility that they
  46. * could be referenced by the VM kernel based on a stale mapping, since
  47. * they would only be located by consulting the mm structure, and they
  48. * will have been purged from that structure by the munmap. Seems like
  49. * a noop on HVM as well.
  50. */
  51. #define flush_tlb_pgtables(mm, start, end)
  52. #endif