diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sbi/sbi_bitops.h | 1 | ||||
-rw-r--r-- | include/sbi/sbi_heap.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/sbi/sbi_bitops.h b/include/sbi/sbi_bitops.h index 48a2090..7d90334 100644 --- a/include/sbi/sbi_bitops.h +++ b/include/sbi/sbi_bitops.h @@ -26,6 +26,7 @@ #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) #define BIT_WORD(bit) ((bit) / BITS_PER_LONG) #define BIT_WORD_OFFSET(bit) ((bit) & (BITS_PER_LONG - 1)) +#define BIT_ALIGN(bit, align) (((bit) + ((align) - 1)) & ~((align) - 1)) #define GENMASK(h, l) \ (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (BITS_PER_LONG - 1 - (h)))) diff --git a/include/sbi/sbi_heap.h b/include/sbi/sbi_heap.h index 88d176e..16755ec 100644 --- a/include/sbi/sbi_heap.h +++ b/include/sbi/sbi_heap.h @@ -12,6 +12,9 @@ #include <sbi/sbi_types.h> +/* Alignment of heap base address and size */ +#define HEAP_BASE_ALIGN 1024 + struct sbi_scratch; /** Allocate from heap area */ |