mem: add ALIGN_UP
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
f9a94f76dc
commit
bfdc13af24
1 changed files with 2 additions and 0 deletions
|
|
@ -10,6 +10,8 @@
|
|||
#define TO_VIRT(addr) ((addr) + hhdm_start)
|
||||
#define TO_PHYS(addr) ((addr) - hhdm_start)
|
||||
|
||||
#define ALIGN_UP(x, a) (((x) + (a) - 1) & ~((__typeof__(x))(a) - 1))
|
||||
|
||||
#define genrw(reg) \
|
||||
uint64_t reg##_read(); \
|
||||
void reg##_write(uint64_t reg);
|
||||
|
|
|
|||
Loading…
Reference in a new issue