/* For most cases the normal get_order is sufficient, however it limits us to PAGE_SIZE being the minimum mapping alignment and TC flush granularity. It only incurs about 1 clock cycle to use this one with the static variable and makes the code more intuitive.  */
static SBA_INLINE int get_iovp_order(unsigned long size)
/* For most cases the normal get_order is sufficient, however it limits us to PAGE_SIZE being the minimum mapping alignment and TC flush granularity. It only incurs about 1 clock cycle to use this one with the static variable and makes the code more intuitive.  */
static SBA_INLINE int get_iovp_order(unsigned long size)
{
	long double d = size - 1;
	long order;
	order = ia64_getf_exp(d);
	order = order - iovp_shift - 0xffff + 1;
	if (order < 0)
		order = 0;
	return order;
}