3010-arm-add-pgprot_cached-and-pgprot_cached_ns-support.patch 902 B

1234567891011121314151617181920212223242526
  1. From 31a5b5189bdd33bb87f88320964a47c0da983af2 Mon Sep 17 00:00:00 2001
  2. From: Jianhua Xie <jianhua.xie@nxp.com>
  3. Date: Fri, 29 Jan 2016 16:40:46 +0800
  4. Subject: [PATCH 10/70] arm: add pgprot_cached and pgprot_cached_ns support
  5. Signed-off-by: Jianhua Xie <jianhua.xie@nxp.com>
  6. ---
  7. arch/arm/include/asm/pgtable.h | 7 +++++++
  8. 1 file changed, 7 insertions(+)
  9. --- a/arch/arm/include/asm/pgtable.h
  10. +++ b/arch/arm/include/asm/pgtable.h
  11. @@ -116,6 +116,13 @@ extern pgprot_t pgprot_s2_device;
  12. #define pgprot_noncached(prot) \
  13. __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED)
  14. +#define pgprot_cached(prot) \
  15. + __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_DEV_CACHED)
  16. +
  17. +#define pgprot_cached_ns(prot) \
  18. + __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_DEV_CACHED | \
  19. + L_PTE_MT_DEV_NONSHARED)
  20. +
  21. #define pgprot_writecombine(prot) \
  22. __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE)