Linux 2.6.28-rc5
[cris-mirror.git] / arch / powerpc / include / asm / page_32.h
blobd77072a32cc68b2553b1e329542b1f4925656c57
1 #ifndef _ASM_POWERPC_PAGE_32_H
2 #define _ASM_POWERPC_PAGE_32_H
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
10 #define VM_DATA_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS32
12 #ifdef CONFIG_NOT_COHERENT_CACHE
13 #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
14 #endif
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
22 #ifndef __ASSEMBLY__
24 * The basic type of a PTE - 64 bits for those CPUs with > 32 bit
25 * physical addressing.
27 #ifdef CONFIG_PTE_64BIT
28 typedef unsigned long long pte_basic_t;
29 #define PTE_SHIFT (PAGE_SHIFT - 3) /* 512 ptes per page */
30 #else
31 typedef unsigned long pte_basic_t;
32 #define PTE_SHIFT (PAGE_SHIFT - 2) /* 1024 ptes per page */
33 #endif
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);
40 #include <asm-generic/page.h>
42 #endif /* __ASSEMBLY__ */
44 #endif /* _ASM_POWERPC_PAGE_32_H */