X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Flinux%2Fbitops.h;h=259df43fb00f0320be668aa685d3aa8d7e1fe2a9;hb=bd3c3dd7fbb152412c16688cf3b70c6a302eda8a;hp=a47f6d17bb5f2571982c26650b96c237fad68b5d;hpb=fcc8250c2f7c982f3593a8eecf737f8e2c95f222;p=oweals%2Fu-boot.git diff --git a/include/linux/bitops.h b/include/linux/bitops.h index a47f6d17bb..259df43fb0 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))))