ia64/linux-2.6.18-xen.hg

view include/asm-generic/page.h @ 782:9ab1c319531f

merge with linux-2.6.18-xen.hg
author Isaku Yamahata <yamahata@valinux.co.jp>
date Wed Jan 28 13:07:23 2009 +0900 (2009-01-28)
parents 831230e53067
children
line source
1 #ifndef _ASM_GENERIC_PAGE_H
2 #define _ASM_GENERIC_PAGE_H
4 #ifdef __KERNEL__
5 #ifndef __ASSEMBLY__
7 #include <linux/compiler.h>
9 /* Pure 2^n version of get_order */
10 static __inline__ __attribute_const__ int get_order(unsigned long size)
11 {
12 int order;
14 size = (size - 1) >> (PAGE_SHIFT - 1);
15 order = -1;
16 do {
17 size >>= 1;
18 order++;
19 } while (size);
20 return order;
21 }
23 #endif /* __ASSEMBLY__ */
24 #endif /* __KERNEL__ */
26 #endif /* _ASM_GENERIC_PAGE_H */