Michael Ellerman | 5cd16ee | 2005-11-11 14:25:24 +1100 | [diff] [blame] | 1 | #ifndef _ASM_POWERPC_PAGE_32_H |
| 2 | #define _ASM_POWERPC_PAGE_32_H |
| 3 | |
Kumar Gala | 37dd2ba | 2008-04-22 04:22:34 +1000 | [diff] [blame] | 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 | |
Michael Ellerman | 5cd16ee | 2005-11-11 14:25:24 +1100 | [diff] [blame] | 10 | #define VM_DATA_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS32 |
| 11 | |
Benjamin Herrenschmidt | 52142e7 | 2007-11-19 19:25:06 +1100 | [diff] [blame] | 12 | #ifdef CONFIG_NOT_COHERENT_CACHE |
| 13 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES |
| 14 | #endif |
| 15 | |
Michael Ellerman | 5cd16ee | 2005-11-11 14:25:24 +1100 | [diff] [blame] | 16 | #ifndef __ASSEMBLY__ |
| 17 | /* |
| 18 | * The basic type of a PTE - 64 bits for those CPUs with > 32 bit |
| 19 | * physical addressing. For now this just the IBM PPC440. |
| 20 | */ |
| 21 | #ifdef CONFIG_PTE_64BIT |
| 22 | typedef unsigned long long pte_basic_t; |
| 23 | #define PTE_SHIFT (PAGE_SHIFT - 3) /* 512 ptes per page */ |
Michael Ellerman | 5cd16ee | 2005-11-11 14:25:24 +1100 | [diff] [blame] | 24 | #else |
| 25 | typedef unsigned long pte_basic_t; |
| 26 | #define PTE_SHIFT (PAGE_SHIFT - 2) /* 1024 ptes per page */ |
Michael Ellerman | 5cd16ee | 2005-11-11 14:25:24 +1100 | [diff] [blame] | 27 | #endif |
| 28 | |
| 29 | struct page; |
| 30 | extern void clear_pages(void *page, int order); |
| 31 | static inline void clear_page(void *page) { clear_pages(page, 0); } |
| 32 | extern void copy_page(void *to, void *from); |
| 33 | |
David Howells | ef55d53 | 2006-12-08 02:37:53 -0800 | [diff] [blame] | 34 | #include <asm-generic/page.h> |
Michael Ellerman | 5cd16ee | 2005-11-11 14:25:24 +1100 | [diff] [blame] | 35 | |
| 36 | #endif /* __ASSEMBLY__ */ |
| 37 | |
Michael Ellerman | 5cd16ee | 2005-11-11 14:25:24 +1100 | [diff] [blame] | 38 | #endif /* _ASM_POWERPC_PAGE_32_H */ |