[PATCH 3/8] arm-mmu: move PAGE_ALIGN macro to common.h
Alexander Aring
alex.aring at gmail.com
Tue Jan 15 08:48:45 EST 2013
PAGE_ALIGN macro is needed to align addresses to page boundaries.
Move this macro to another PAGE_* defines.
Commands which uses remap_range function needs this macro.
Signed-off-by: Alexander Aring <alex.aring at gmail.com>
---
arch/arm/cpu/mmu.c | 2 --
include/common.h | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index 6e2ecca..6e24356 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -308,8 +308,6 @@ void mmu_disable(void)
__mmu_cache_off();
}
-#define PAGE_ALIGN(s) (((s) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
-
void *dma_alloc_coherent(size_t size)
{
void *ret;
diff --git a/include/common.h b/include/common.h
index b1c96de..9533344 100644
--- a/include/common.h
+++ b/include/common.h
@@ -225,6 +225,7 @@ int run_shell(void);
#define PAGE_SIZE 4096
#define PAGE_SHIFT 12
+#define PAGE_ALIGN(s) (((s) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
int memory_display(char *addr, loff_t offs, ulong nbytes, int size, int swab);
--
1.8.1
More information about the barebox
mailing list