tlb-v3.S 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * linux/arch/arm/mm/tlbv3.S
  3. *
  4. * Copyright (C) 1997-2002 Russell King
  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 as
  8. * published by the Free Software Foundation.
  9. *
  10. * ARM architecture version 3 TLB handling functions.
  11. *
  12. * Processors: ARM610, ARM710.
  13. */
  14. #include <linux/linkage.h>
  15. #include <linux/init.h>
  16. #include <asm/asm-offsets.h>
  17. #include <asm/tlbflush.h>
  18. #include "proc-macros.S"
  19. .align 5
  20. /*
  21. * v3_flush_user_tlb_range(start, end, mm)
  22. *
  23. * Invalidate a range of TLB entries in the specified address space.
  24. *
  25. * - start - range start address
  26. * - end - range end address
  27. * - mm - mm_struct describing address space
  28. */
  29. .align 5
  30. ENTRY(v3_flush_user_tlb_range)
  31. vma_vm_mm r2, r2
  32. act_mm r3 @ get current->active_mm
  33. teq r2, r3 @ == mm ?
  34. movne pc, lr @ no, we dont do anything
  35. ENTRY(v3_flush_kern_tlb_range)
  36. bic r0, r0, #0x0ff
  37. bic r0, r0, #0xf00
  38. 1: mcr p15, 0, r0, c6, c0, 0 @ invalidate TLB entry
  39. add r0, r0, #PAGE_SZ
  40. cmp r0, r1
  41. blo 1b
  42. mov pc, lr
  43. __INITDATA
  44. .type v3_tlb_fns, #object
  45. ENTRY(v3_tlb_fns)
  46. .long v3_flush_user_tlb_range
  47. .long v3_flush_kern_tlb_range
  48. .long v3_tlb_flags
  49. .size v3_tlb_fns, . - v3_tlb_fns