include/linux/log2.h: define PAGE_SHIFT when needed

This commit is contained in:
Leah Neukirchen 2018-02-09 22:21:46 +01:00
parent 3217fffd09
commit c725c69d77

View File

@ -12,7 +12,13 @@
#ifndef _TOOLS_LINUX_LOG2_H #ifndef _TOOLS_LINUX_LOG2_H
#define _TOOLS_LINUX_LOG2_H #define _TOOLS_LINUX_LOG2_H
#include <limits.h>
#ifndef PAGE_SHIFT
#define PAGE_SHIFT ilog2(PAGE_SIZE)
#endif
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/compiler.h>
/* /*
* deal with unrepresentable constant logarithms * deal with unrepresentable constant logarithms