summaryrefslogtreecommitdiff
path: root/include/linux/bitops.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-02-07 14:48:56 -0500
committerTom Rini <trini@konsulko.com>2019-02-07 14:48:56 -0500
commit50e24381c097579ff2a8b171838347c82c2fba04 (patch)
tree211a78888bf1fa02244bb7dcd5963eaa050b9199 /include/linux/bitops.h
parent4dfe43849a4c76ac5fc2486d20e37d459f980a00 (diff)
parent4d40e009c06742df9582f8b54f37f6cea0680ba1 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-spi
- SPI-NOR support
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r--include/linux/bitops.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index a47f6d17bb5..259df43fb00 100644
--- 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.
*/
+#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))))
+#endif
#define GENMASK_ULL(h, l) \
(((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))