3034-arm64-add-support-to-remap-kernel-cacheable-memory-t.patch 1.3 KB

12345678910111213141516171819202122232425262728
  1. From 52bffb91d40a3090ecf9138fadca97f77c99afa4 Mon Sep 17 00:00:00 2001
  2. From: Haiying Wang <Haiying.Wang@freescale.com>
  3. Date: Wed, 22 Apr 2015 13:09:47 -0400
  4. Subject: [PATCH 34/70] arm64: add support to remap kernel cacheable memory to
  5. userspace
  6. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
  7. Change-Id: I50ee4798a2929932fa9ff7c9cdb42cd1a215f77a
  8. Reviewed-on: http://git.am.freescale.net:8181/35488
  9. Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
  10. Reviewed-by: Roy Pledge <roy.pledge@freescale.com>
  11. Reviewed-by: Stuart Yoder <stuart.yoder@freescale.com>
  12. ---
  13. arch/arm64/include/asm/pgtable.h | 3 +++
  14. 1 file changed, 3 insertions(+)
  15. --- a/arch/arm64/include/asm/pgtable.h
  16. +++ b/arch/arm64/include/asm/pgtable.h
  17. @@ -389,6 +389,9 @@ static inline int has_transparent_hugepa
  18. __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)
  19. #define pgprot_writecombine(prot) \
  20. __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)
  21. +#define pgprot_cached(prot) \
  22. + __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL) | \
  23. + PTE_PXN | PTE_UXN)
  24. #define pgprot_device(prot) \
  25. __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_PXN | PTE_UXN)
  26. #define __HAVE_PHYS_MEM_ACCESS_PROT