diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2015-09-02 13:43:30 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-10-28 10:01:05 -0400 |
commit | d40846457fc23cd841a60fdc2786e08a8bedb35b (patch) | |
tree | f606674e78d842c26d7cdf385a64dcb2c998b8b8 /arch/arc/include | |
parent | 8840e14cd82d398d348b2947fad3a630e93260ba (diff) |
ARC: mm: use generic macros _BITUL()/_AC()
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include')
-rw-r--r-- | arch/arc/include/asm/pgtable.h | 11 | ||||
-rw-r--r-- | arch/arc/include/uapi/asm/page.h | 11 |
2 files changed, 8 insertions, 14 deletions
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h index 336267f2e9d9..f7c7273cd537 100644 --- a/arch/arc/include/asm/pgtable.h +++ b/arch/arc/include/asm/pgtable.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/page.h> | 38 | #include <asm/page.h> |
39 | #include <asm/mmu.h> | 39 | #include <asm/mmu.h> |
40 | #include <asm-generic/pgtable-nopmd.h> | 40 | #include <asm-generic/pgtable-nopmd.h> |
41 | #include <linux/const.h> | ||
41 | 42 | ||
42 | /************************************************************************** | 43 | /************************************************************************** |
43 | * Page Table Flags | 44 | * Page Table Flags |
@@ -207,13 +208,9 @@ | |||
207 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) /* vaddr span, not PDG sz */ | 208 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) /* vaddr span, not PDG sz */ |
208 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 209 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
209 | 210 | ||
210 | #ifdef __ASSEMBLY__ | 211 | #define PTRS_PER_PTE _BITUL(BITS_FOR_PTE) |
211 | #define PTRS_PER_PTE (1 << BITS_FOR_PTE) | 212 | #define PTRS_PER_PGD _BITUL(BITS_FOR_PGD) |
212 | #define PTRS_PER_PGD (1 << BITS_FOR_PGD) | 213 | |
213 | #else | ||
214 | #define PTRS_PER_PTE (1UL << BITS_FOR_PTE) | ||
215 | #define PTRS_PER_PGD (1UL << BITS_FOR_PGD) | ||
216 | #endif | ||
217 | /* | 214 | /* |
218 | * Number of entries a user land program use. | 215 | * Number of entries a user land program use. |
219 | * TASK_SIZE is the maximum vaddr that can be used by a userland program. | 216 | * TASK_SIZE is the maximum vaddr that can be used by a userland program. |
diff --git a/arch/arc/include/uapi/asm/page.h b/arch/arc/include/uapi/asm/page.h index 9d129a2a1351..059aff38f10a 100644 --- a/arch/arc/include/uapi/asm/page.h +++ b/arch/arc/include/uapi/asm/page.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef _UAPI__ASM_ARC_PAGE_H | 9 | #ifndef _UAPI__ASM_ARC_PAGE_H |
10 | #define _UAPI__ASM_ARC_PAGE_H | 10 | #define _UAPI__ASM_ARC_PAGE_H |
11 | 11 | ||
12 | #include <linux/const.h> | ||
13 | |||
12 | /* PAGE_SHIFT determines the page size */ | 14 | /* PAGE_SHIFT determines the page size */ |
13 | #if defined(CONFIG_ARC_PAGE_SIZE_16K) | 15 | #if defined(CONFIG_ARC_PAGE_SIZE_16K) |
14 | #define PAGE_SHIFT 14 | 16 | #define PAGE_SHIFT 14 |
@@ -25,13 +27,8 @@ | |||
25 | #define PAGE_SHIFT 13 | 27 | #define PAGE_SHIFT 13 |
26 | #endif | 28 | #endif |
27 | 29 | ||
28 | #ifdef __ASSEMBLY__ | 30 | #define PAGE_SIZE _BITUL(PAGE_SHIFT) /* Default 8K */ |
29 | #define PAGE_SIZE (1 << PAGE_SHIFT) | 31 | #define PAGE_OFFSET _AC(0x80000000, UL) /* Kernel starts at 2G onwrds */ |
30 | #define PAGE_OFFSET (0x80000000) | ||
31 | #else | ||
32 | #define PAGE_SIZE (1UL << PAGE_SHIFT) /* Default 8K */ | ||
33 | #define PAGE_OFFSET (0x80000000UL) /* Kernel starts at 2G onwards */ | ||
34 | #endif | ||
35 | 32 | ||
36 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 33 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
37 | 34 | ||