mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
arm/mem_access: Introduce BIT_ULL bit operation
We introduce the BIT_ULL macro to using values of unsigned long long as to enable setting bits of 64-bit registers on AArch32. In addition, this commit adds a define holding the register width of 64 bit double-word registers. This define simplifies using the associated constants in the following commits. Signed-off-by: Sergej Proskurin <proskurin@sec.in.tum.de> Reviewed-by: Julien Grall <julien.grall@arm.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
f013bc61ec
commit
2af2c66f39
1 file changed
+1
@@ -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)
|
||||
|
||||