basicAlgorithmEncapsulation.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * arch/arm/include/asm/cacheflush.h
  3. *
  4. * Copyright (C) 1999-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. #ifndef _ASMARM_CACHEFLUSH_H
  11. #define _ASMARM_CACHEFLUSH_H
  12. #include <linux/mm.h>
  13. #include <asm/glue-cache.h>
  14. #include <asm/shmparam.h>
  15. #include <asm/cachetype.h>
  16. #include <asm/outercache.h>
  17. #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
  18. /*
  19. * This flag is used to indicate that the page pointed to by a pte is clean
  20. * and does not require cleaning before returning it to the user.
  21. */
  22. #define PG_dcache_clean PG_arch_1
  23. /*
  24. * MM Cache Management
  25. * ===================
  26. *
  27. * The arch/arm/mm/cache-*.S and arch/arm/mm/proc-*.S files
  28. * implement these methods.
  29. *
  30. * Start addresses are inclusive and end addresses are exclusive;
  31. * start addresses should be rounded down, end addresses up.
  32. *
  33. * See Documentation/cachetlb.txt for more information.
  34. * Please note that the implementation of these, and the required
  35. * effects are cache-type (VIVT/VIPT/PIPT) specific.
  36. *
  37. * flush_icache_all()
  38. *
  39. * Unconditionally clean and invalidate the entire icache.
  40. * Currently only needed for cache-v6.S and cache-v7.S, see
  41. * __flush_icache_all for the generic implementation.
  42. *
  43. * flush_kern_all()
  44. *
  45. * Unconditionally clean and invalidate the entire cache.
  46. *
  47. * flush_kern_louis()
  48. *
  49. * Flush data cache levels up to the level of unification
  50. * inner shareable and invalidate the I-cache.
  51. * Only needed from v7 onwards, falls back to flush_cache_all()
  52. * for all other processor versions.
  53. *
  54. * flush_user_all()
  55. *
  56. * Clean and invalidate all user space cache entries
  57. * before a change of page tables.
  58. *
  59. * flush_user_range(start, end, flags)
  60. *
  61. * Clean and invalidate a range of cache entries in the