Message ID | 1491434362-30310-3-git-send-email-andre.przywara@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 6 Apr 2017, Andre Przywara wrote: > To safely handle 64-bit registers even on 32-bit systems, introduce > a BIT_ULL variant (lifted from Linux). > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > --- > xen/include/asm-arm/bitops.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/xen/include/asm-arm/bitops.h b/xen/include/asm-arm/bitops.h > index bda8898..1cbfb9e 100644 > --- a/xen/include/asm-arm/bitops.h > +++ b/xen/include/asm-arm/bitops.h > @@ -24,6 +24,7 @@ > #define BIT(nr) (1UL << (nr)) > #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_WORD)) > #define BIT_WORD(nr) ((nr) / BITS_PER_WORD) > +#define BIT_ULL(nr) (1ULL << (nr)) > #define BITS_PER_BYTE 8 > > #define ADDR (*(volatile int *) addr) > -- > 2.8.2 >
diff --git a/xen/include/asm-arm/bitops.h b/xen/include/asm-arm/bitops.h index bda8898..1cbfb9e 100644 --- a/xen/include/asm-arm/bitops.h +++ b/xen/include/asm-arm/bitops.h @@ -24,6 +24,7 @@ #define BIT(nr) (1UL << (nr)) #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_WORD)) #define BIT_WORD(nr) ((nr) / BITS_PER_WORD) +#define BIT_ULL(nr) (1ULL << (nr)) #define BITS_PER_BYTE 8 #define ADDR (*(volatile int *) addr)
To safely handle 64-bit registers even on 32-bit systems, introduce a BIT_ULL variant (lifted from Linux). Signed-off-by: Andre Przywara <andre.przywara@arm.com> --- xen/include/asm-arm/bitops.h | 1 + 1 file changed, 1 insertion(+)