1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
9 #define BIT_ULL(nr) (1ULL << (nr))
13 #define BIT(nr) (1UL << (nr))
17 #define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
19 #ifndef BITS_PER_LONG_LONG
20 #define BITS_PER_LONG_LONG (__SIZEOF_LONG_LONG__ * 8)
24 #define GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
27 #define GENMASK_ULL(h, l) \
28 (((~0ULL) - (1ULL << (l)) + 1) & \
29 (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))
32 #endif /* _ROC_BITS_H_ */