[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 08/12] arm/mem_access: Introduce GENMASK_ULL bit operation
The current implementation of GENMASK is capable of creating bitmasks of 32-bit values on AArch32 and 64-bit values on AArch64. As we need to create masks for 64-bit values on AArch32 as well, in this commit we introduce the GENMASK_ULL bit operation. Signed-off-by: Sergej Proskurin <proskurin@xxxxxxxxxxxxx> --- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Julien Grall <julien.grall@xxxxxxx> --- xen/include/asm-arm/config.h | 2 ++ xen/include/xen/bitops.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h index 5b6f3c985d..7fa412f1b1 100644 --- a/xen/include/asm-arm/config.h +++ b/xen/include/asm-arm/config.h @@ -19,6 +19,8 @@ #define BITS_PER_LONG (BYTES_PER_LONG << 3) #define POINTER_ALIGN BYTES_PER_LONG +#define BITS_PER_LONG_LONG 64 + /* xen_ulong_t is always 64 bits */ #define BITS_PER_XEN_ULONG 64 diff --git a/xen/include/xen/bitops.h b/xen/include/xen/bitops.h index bd0883ab22..47170c9bfd 100644 --- a/xen/include/xen/bitops.h +++ b/xen/include/xen/bitops.h @@ -9,6 +9,8 @@ */ #define GENMASK(h, l) \ (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) +#define GENMASK_ULL(h, l) \ + (((~0ULL) << (l)) & (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h)))) /* * ffs: find first bit set. This is defined the same way as -- 2.13.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |