static inline unsigned int order_to_pindex(int migratetype, int order)
{
int base = order;
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
if (order > PAGE_ALLOC_COSTLY_ORDER) {
VM_BUG_ON(order != pageblock_order);
base = PAGE_ALLOC_COSTLY_ORDER + 1;
}
#else
VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER);
#endif
return (MIGRATE_PCPTYPES * base) + migratetype;
}