summaryrefslogtreecommitdiffstats
path: root/sys/ofed/include/linux/log2.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ofed/include/linux/log2.h')
-rw-r--r--sys/ofed/include/linux/log2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/ofed/include/linux/log2.h b/sys/ofed/include/linux/log2.h
index ffc1fdb..77a2924 100644
--- a/sys/ofed/include/linux/log2.h
+++ b/sys/ofed/include/linux/log2.h
@@ -167,4 +167,6 @@ int __ilog2_u64(u64 n)
__ilog2_u64(n) \
)
+#define order_base_2(x) ilog2(roundup_pow_of_two(x))
+
#endif /* _LINUX_LOG2_H_ */
OpenPOWER on IntegriCloud