Commit | Line | Data |
---|---|---|
5cd16ee9 ME |
1 | #ifndef _ASM_POWERPC_PAGE_32_H |
2 | #define _ASM_POWERPC_PAGE_32_H | |
3 | ||
37dd2bad KG |
4 | #if defined(CONFIG_PHYSICAL_ALIGN) && (CONFIG_PHYSICAL_START != 0) |
5 | #if (CONFIG_PHYSICAL_START % CONFIG_PHYSICAL_ALIGN) != 0 | |
6 | #error "CONFIG_PHYSICAL_START must be a multiple of CONFIG_PHYSICAL_ALIGN" | |
7 | #endif | |
8 | #endif | |
9 | ||
5cd16ee9 ME |
10 | #define VM_DATA_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS32 |
11 | ||
52142e75 BH |
12 | #ifdef CONFIG_NOT_COHERENT_CACHE |
13 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | |
14 | #endif | |
15 | ||
4ee7084e BB |
16 | #ifdef CONFIG_PTE_64BIT |
17 | #define PTE_FLAGS_OFFSET 4 /* offset of PTE flags, in bytes */ | |
18 | #else | |
19 | #define PTE_FLAGS_OFFSET 0 | |
20 | #endif | |
21 | ||
ca9153a3 IY |
22 | #define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2) /* full page */ |
23 | ||
5cd16ee9 ME |
24 | #ifndef __ASSEMBLY__ |
25 | /* | |
26 | * The basic type of a PTE - 64 bits for those CPUs with > 32 bit | |
4ee7084e | 27 | * physical addressing. |
5cd16ee9 ME |
28 | */ |
29 | #ifdef CONFIG_PTE_64BIT | |
30 | typedef unsigned long long pte_basic_t; | |
5cd16ee9 ME |
31 | #else |
32 | typedef unsigned long pte_basic_t; | |
5cd16ee9 ME |
33 | #endif |
34 | ||
35 | struct page; | |
36 | extern void clear_pages(void *page, int order); | |
37 | static inline void clear_page(void *page) { clear_pages(page, 0); } | |
38 | extern void copy_page(void *to, void *from); | |
39 | ||
ef55d53c | 40 | #include <asm-generic/page.h> |
5cd16ee9 | 41 | |
ca9153a3 IY |
42 | #define PGD_T_LOG2 (__builtin_ffs(sizeof(pgd_t)) - 1) |
43 | #define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1) | |
44 | ||
5cd16ee9 ME |
45 | #endif /* __ASSEMBLY__ */ |
46 | ||
47 | #endif /* _ASM_POWERPC_PAGE_32_H */ |