aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include/asm/page.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/include/asm/page.h')
-rw-r--r--arch/microblaze/include/asm/page.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h
index 464ff32bee3d..4f268faa0126 100644
--- a/arch/microblaze/include/asm/page.h
+++ b/arch/microblaze/include/asm/page.h
@@ -23,8 +23,16 @@
23#ifdef __KERNEL__ 23#ifdef __KERNEL__
24 24
25/* PAGE_SHIFT determines the page size */ 25/* PAGE_SHIFT determines the page size */
26#define PAGE_SHIFT (12) 26#if defined(CONFIG_MICROBLAZE_32K_PAGES)
27#define PAGE_SIZE (_AC(1, UL) << PAGE_SHIFT) 27#define PAGE_SHIFT 15
28#elif defined(CONFIG_MICROBLAZE_16K_PAGES)
29#define PAGE_SHIFT 14
30#elif defined(CONFIG_MICROBLAZE_8K_PAGES)
31#define PAGE_SHIFT 13
32#else
33#define PAGE_SHIFT 12
34#endif
35#define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT)
28#define PAGE_MASK (~(PAGE_SIZE-1)) 36#define PAGE_MASK (~(PAGE_SIZE-1))
29 37
30#define LOAD_OFFSET ASM_CONST((CONFIG_KERNEL_START-CONFIG_KERNEL_BASE_ADDR)) 38#define LOAD_OFFSET ASM_CONST((CONFIG_KERNEL_START-CONFIG_KERNEL_BASE_ADDR))
@@ -39,13 +47,6 @@
39#define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1))) 47#define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1)))
40#define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1))) 48#define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1)))
41 49
42/* align addr on a size boundary - adjust address up/down if needed */
43#define _ALIGN_UP(addr, size) (((addr)+((size)-1))&(~((size)-1)))
44#define _ALIGN_DOWN(addr, size) ((addr)&(~((size)-1)))
45
46/* align addr on a size boundary - adjust address up if needed */
47#define _ALIGN(addr, size) _ALIGN_UP(addr, size)
48
49#ifndef CONFIG_MMU 50#ifndef CONFIG_MMU
50/* 51/*
51 * PAGE_OFFSET -- the first address of the first page of memory. When not 52 * PAGE_OFFSET -- the first address of the first page of memory. When not