projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux/time.h: include vsprintf.h
[oweals/u-boot.git]
/
include
/
linux
/
bitops.h
diff --git
a/include/linux/bitops.h
b/include/linux/bitops.h
index a47f6d17bb5f2571982c26650b96c237fad68b5d..259df43fb00f0320be668aa685d3aa8d7e1fe2a9 100644
(file)
--- a/
include/linux/bitops.h
+++ b/
include/linux/bitops.h
@@
-21,8
+21,13
@@
* position @h. For example
* GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
*/
* position @h. For example
* GENMASK_ULL(39, 21) gives us the 64bit vector 0x000000ffffe00000.
*/
+#ifdef CONFIG_SANDBOX
+#define GENMASK(h, l) \
+ (((~0UL) << (l)) & (~0UL >> (CONFIG_SANDBOX_BITS_PER_LONG - 1 - (h))))
+#else
#define GENMASK(h, l) \
(((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
#define GENMASK(h, l) \
(((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
+#endif
#define GENMASK_ULL(h, l) \
(((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))
#define GENMASK_ULL(h, l) \
(((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))