+ arm-mm-do-not-use-virt_to_idmap-for-nommu-systems.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: ARM: mm: do not use virt_to_idmap() for NOMMU systems
has been added to the -mm tree.  Its filename is
     arm-mm-do-not-use-virt_to_idmap-for-nommu-systems.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/arm-mm-do-not-use-virt_to_idmap-for-nommu-systems.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/arm-mm-do-not-use-virt_to_idmap-for-nommu-systems.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Vitaly Andrianov <vitalya@xxxxxx>
Subject: ARM: mm: do not use virt_to_idmap() for NOMMU systems

The "ARM: mm: Introduce virt_to_idmap() with an arch hook" defines
arch_virt_to_idmap hook in arch/arm/mm/idmap.c. That breaks systems w/o
MMU because that file is not built for them.

This patch fixes this bug.

Signed-off-by: Vitaly Andrianov <vitalya@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/arm/include/asm/memory.h |    4 ++++
 1 file changed, 4 insertions(+)

diff -puN arch/arm/include/asm/memory.h~arm-mm-do-not-use-virt_to_idmap-for-nommu-systems arch/arm/include/asm/memory.h
--- a/arch/arm/include/asm/memory.h~arm-mm-do-not-use-virt_to_idmap-for-nommu-systems
+++ a/arch/arm/include/asm/memory.h
@@ -279,6 +279,7 @@ static inline void *phys_to_virt(phys_ad
 
 extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
 
+#ifdef CONFIG_MMU
 /*
  * These are for systems that have a hardware interconnect supported alias of
  * physical memory for idmap purposes.  Most cases should leave these
@@ -293,6 +294,9 @@ static inline phys_addr_t __virt_to_idma
 }
 
 #define virt_to_idmap(x)	__virt_to_idmap((unsigned long)(x))
+#else
+#define virt_to_idmap(x)	__virt_to_phys((unsigned long)(x))
+#endif
 
 /*
  * Virtual <-> DMA view memory address translations
_

Patches currently in -mm which might be from vitalya@xxxxxx are

arm-mm-do-not-use-virt_to_idmap-for-nommu-systems.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux