[PATCH] kill install_file_pte's pte_val
[linux-2.6/zen-sources.git] / include / asm-powerpc / page_32.h
blob2677bad70f401c92236170f1fe27a1c3f4ceee51
1 #ifndef _ASM_POWERPC_PAGE_32_H
2 #define _ASM_POWERPC_PAGE_32_H
3 #ifdef __KERNEL__
5 #define VM_DATA_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS32
7 #define PPC_MEMSTART 0
9 #ifndef __ASSEMBLY__
11 * The basic type of a PTE - 64 bits for those CPUs with > 32 bit
12 * physical addressing. For now this just the IBM PPC440.
14 #ifdef CONFIG_PTE_64BIT
15 typedef unsigned long long pte_basic_t;
16 #define PTE_SHIFT (PAGE_SHIFT - 3) /* 512 ptes per page */
17 #define PTE_FMT "%16Lx"
18 #else
19 typedef unsigned long pte_basic_t;
20 #define PTE_SHIFT (PAGE_SHIFT - 2) /* 1024 ptes per page */
21 #define PTE_FMT "%.8lx"
22 #endif
24 struct page;
25 extern void clear_pages(void *page, int order);
26 static inline void clear_page(void *page) { clear_pages(page, 0); }
27 extern void copy_page(void *to, void *from);
29 /* Pure 2^n version of get_order */
30 extern __inline__ int get_order(unsigned long size)
32 int lz;
34 size = (size-1) >> PAGE_SHIFT;
35 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (size));
36 return 32 - lz;
39 #endif /* __ASSEMBLY__ */
41 #endif /* __KERNEL__ */
42 #endif /* _ASM_POWERPC_PAGE_32_H */