3009-armv8-aarch32-Allow-RAM-to-be-mapped-for-LayerScape-.patch 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. From ef25bf644b7de83849a2f804c84bb54cd2f1255f Mon Sep 17 00:00:00 2001
  2. From: Alison Wang <b18965@freescale.com>
  3. Date: Mon, 11 Apr 2016 17:25:40 +0800
  4. Subject: [PATCH 09/70] armv8: aarch32: Allow RAM to be mapped for LayerScape
  5. SoC
  6. This patch is based on Kernel v4.1.8. As in v4.1.8, memremap() is not
  7. introduced and the WARN() check is not relaxed to allow MT_MEMORY_RW
  8. mappings of pfn_valid() pages, this patch is needed as a workaround for
  9. spin-table address which locates in RAM to be mapped.
  10. For the latest kernel in upstream, this patch is not needed anymore.
  11. Signed-off-by: Alison Wang <alison.wang@nxp.com>
  12. ---
  13. arch/arm/mm/ioremap.c | 2 ++
  14. 1 file changed, 2 insertions(+)
  15. --- a/arch/arm/mm/ioremap.c
  16. +++ b/arch/arm/mm/ioremap.c
  17. @@ -298,8 +298,10 @@ static void __iomem * __arm_ioremap_pfn_
  18. /*
  19. * Don't allow RAM to be mapped - this causes problems with ARMv6+
  20. */
  21. +#ifndef CONFIG_ARCH_LAYERSCAPE
  22. if (WARN_ON(pfn_valid(pfn)))
  23. return NULL;
  24. +#endif
  25. area = get_vm_area_caller(size, VM_IOREMAP, caller);
  26. if (!area)