mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-23 15:35:07 +08:00
dpaa: Implement GENMASK() similar to Linux
This commit is contained in:
parent
7f1f4282dc
commit
e2d48f5335
@ -45,7 +45,7 @@
|
||||
#define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG)
|
||||
#define BIT_MASK(nr) (1UL << ((nr) & (BITS_PER_LONG - 1)))
|
||||
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
|
||||
#define GENMASK(hi, lo) (((2UL << ((hi) - (lo))) - 1UL) << (lo))
|
||||
#define GENMASK(hi, lo) (((~0UL) << (lo)) & (~0UL >> (BITS_PER_LONG - 1 - (hi))))
|
||||
#define BITS_PER_BYTE 8
|
||||
|
||||
static inline int
|
||||
|
Loading…
x
Reference in New Issue
Block a user