mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/8] remap_range: make function 'remap_range' global
Date: Tue, 15 Jan 2013 14:48:43 +0100	[thread overview]
Message-ID: <1358257730-20579-2-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1358257730-20579-1-git-send-email-alex.aring@gmail.com>

Change function remap_range in arm architecture to make it
global accessable. For example command 'memtest' can change
pte flags to enable or disable cache.

Add dummy function for others architectures that doesn't
have mmu or pte support.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 arch/arm/cpu/mmu.c              | 2 +-
 arch/arm/include/asm/mmu.h      | 5 +++++
 arch/blackfin/include/asm/mmu.h | 9 +++++++++
 arch/mips/include/asm/mmu.h     | 9 +++++++++
 arch/nios2/include/asm/mmu.h    | 9 +++++++++
 arch/openrisc/include/asm/mmu.h | 9 +++++++++
 arch/ppc/include/asm/mmu.h      | 5 +++++
 arch/sandbox/include/asm/mmu.h  | 9 +++++++++
 arch/x86/include/asm/mmu.h      | 9 +++++++++
 9 files changed, 65 insertions(+), 1 deletion(-)
 create mode 100644 arch/blackfin/include/asm/mmu.h
 create mode 100644 arch/mips/include/asm/mmu.h
 create mode 100644 arch/nios2/include/asm/mmu.h
 create mode 100644 arch/openrisc/include/asm/mmu.h
 create mode 100644 arch/sandbox/include/asm/mmu.h
 create mode 100644 arch/x86/include/asm/mmu.h

diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index 40b7ec4..b5c9c60 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -93,7 +93,7 @@ static u32 *find_pte(unsigned long adr)
 	return &table[(adr >> PAGE_SHIFT) & 0xff];
 }
 
-static void remap_range(void *_start, size_t size, uint32_t flags)
+void remap_range(void *_start, size_t size, uint32_t flags)
 {
 	unsigned long start = (unsigned long)_start;
 	u32 *p;
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index a66da8c..ae1686b 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -41,6 +41,7 @@ void dma_flush_range(unsigned long, unsigned long);
 void dma_inv_range(unsigned long, unsigned long);
 unsigned long virt_to_phys(void *virt);
 void *phys_to_virt(unsigned long phys);
+void remap_range(void *_start, size_t size, uint32_t flags);
 void *map_io_sections(unsigned long physaddr, void *start, size_t size);
 
 #else
@@ -76,6 +77,10 @@ static inline void dma_inv_range(unsigned long s, unsigned long e)
 {
 }
 
+static inline void remap_range(void *_start, size_t size, uint32_t flags)
+{
+}
+
 static inline void *map_io_sections(unsigned long phys, void *start, size_t size)
 {
 	return (void *)phys;
diff --git a/arch/blackfin/include/asm/mmu.h b/arch/blackfin/include/asm/mmu.h
new file mode 100644
index 0000000..0485a43
--- /dev/null
+++ b/arch/blackfin/include/asm/mmu.h
@@ -0,0 +1,9 @@
+#ifndef __ASM_MMU_H
+#define __ASM_MMU_H
+
+static inline void remap_range(void *_start, size_t size, uint32_t flags)
+{
+}
+
+#endif /* __ASM_MMU_H */
+
diff --git a/arch/mips/include/asm/mmu.h b/arch/mips/include/asm/mmu.h
new file mode 100644
index 0000000..0485a43
--- /dev/null
+++ b/arch/mips/include/asm/mmu.h
@@ -0,0 +1,9 @@
+#ifndef __ASM_MMU_H
+#define __ASM_MMU_H
+
+static inline void remap_range(void *_start, size_t size, uint32_t flags)
+{
+}
+
+#endif /* __ASM_MMU_H */
+
diff --git a/arch/nios2/include/asm/mmu.h b/arch/nios2/include/asm/mmu.h
new file mode 100644
index 0000000..0485a43
--- /dev/null
+++ b/arch/nios2/include/asm/mmu.h
@@ -0,0 +1,9 @@
+#ifndef __ASM_MMU_H
+#define __ASM_MMU_H
+
+static inline void remap_range(void *_start, size_t size, uint32_t flags)
+{
+}
+
+#endif /* __ASM_MMU_H */
+
diff --git a/arch/openrisc/include/asm/mmu.h b/arch/openrisc/include/asm/mmu.h
new file mode 100644
index 0000000..0485a43
--- /dev/null
+++ b/arch/openrisc/include/asm/mmu.h
@@ -0,0 +1,9 @@
+#ifndef __ASM_MMU_H
+#define __ASM_MMU_H
+
+static inline void remap_range(void *_start, size_t size, uint32_t flags)
+{
+}
+
+#endif /* __ASM_MMU_H */
+
diff --git a/arch/ppc/include/asm/mmu.h b/arch/ppc/include/asm/mmu.h
index b2dd0b7..af263ae 100644
--- a/arch/ppc/include/asm/mmu.h
+++ b/arch/ppc/include/asm/mmu.h
@@ -540,4 +540,9 @@ extern int write_bat(ppc_bat_t bat, unsigned long upper, unsigned long lower);
 					(rt<<21)|(ra<<16)|(ws<<11)|(946<<1)
 
 #endif
+
+static inline void remap_range(void *_start, size_t size, uint32_t flags)
+{
+}
+
 #endif /* _PPC_MMU_H_ */
diff --git a/arch/sandbox/include/asm/mmu.h b/arch/sandbox/include/asm/mmu.h
new file mode 100644
index 0000000..0485a43
--- /dev/null
+++ b/arch/sandbox/include/asm/mmu.h
@@ -0,0 +1,9 @@
+#ifndef __ASM_MMU_H
+#define __ASM_MMU_H
+
+static inline void remap_range(void *_start, size_t size, uint32_t flags)
+{
+}
+
+#endif /* __ASM_MMU_H */
+
diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h
new file mode 100644
index 0000000..0485a43
--- /dev/null
+++ b/arch/x86/include/asm/mmu.h
@@ -0,0 +1,9 @@
+#ifndef __ASM_MMU_H
+#define __ASM_MMU_H
+
+static inline void remap_range(void *_start, size_t size, uint32_t flags)
+{
+}
+
+#endif /* __ASM_MMU_H */
+
-- 
1.8.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-01-15 13:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 13:48 [PATCH v2 0/8] add new memtest command Alexander Aring
2013-01-15 13:48 ` Alexander Aring [this message]
2013-01-15 13:48 ` [PATCH 2/8] mmu: add getters for pte cache flags Alexander Aring
2013-01-15 13:48 ` [PATCH 3/8] arm-mmu: move PAGE_ALIGN macro to common.h Alexander Aring
2013-01-15 13:48 ` [PATCH 4/8] common: add PAGE_ALIGN_DOWN macro Alexander Aring
2013-01-15 13:48 ` [PATCH 5/8] memory: add function address_in_sdram_regions Alexander Aring
2013-01-15 13:48 ` [PATCH 6/8] barebox-data: add barebox-data sections Alexander Aring
2013-01-15 13:48 ` [PATCH 7/8] memtest: remove memtest command Alexander Aring
2013-01-15 13:48 ` [PATCH 8/8] memtest: add rewritten " Alexander Aring
2013-01-17  9:54   ` Sascha Hauer
2013-01-23 20:01     ` Alexander Aring
2013-01-23 20:18       ` Sascha Hauer
2013-01-23 20:25         ` Alexander Aring
2013-01-23 20:30           ` Jean-Christophe PLAGNIOL-VILLARD
2013-01-23 20:43             ` Alexander Aring
2013-01-23 20:55               ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358257730-20579-2-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox