Revision 406e56c9dfa0e654870631cd4d9ea20391a527eb authored by Mark Brown on 22 February 2011, 04:41:25 UTC, committed by Mark Brown on 22 February 2011, 18:37:32 UTC
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
1 parent 3017358
getorder.h
#ifndef __ASM_GENERIC_GETORDER_H
#define __ASM_GENERIC_GETORDER_H
#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 /* __ASM_GENERIC_GETORDER_H */
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...