|
|
| File: [Development] / linux-2.6-xfs / include / asm-generic / page.h (download)
Revision 1.3, Tue Mar 20 15:37:21 2007 UTC (10 years, 7 months ago) by tes.longdrop.melbourne.sgi.com
Merge up to 2.6.21-rc4 Merge of 2.6.x-xfs-melb:linux:28276b by kenmcd. |
#ifndef _ASM_GENERIC_PAGE_H
#define _ASM_GENERIC_PAGE_H
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
#include <linux/compiler.h>
/* Pure 2^n version of get_order */
static __inline__ __attribute_const__ int get_order(unsigned long size)
{
int order;
size = (size - 1) >> (PAGE_SHIFT - 1);
order = -1;
do {
size >>= 1;
order++;
} while (size);
return order;
}
#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ASM_GENERIC_PAGE_H */