summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 293ca49391..fc2c8ca8be 100644
--- a/include/common.h
+++ b/include/common.h
@@ -184,6 +184,7 @@ int run_shell(void);
#define ALIGN(x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1)
#define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask))
+#define ALIGN_DOWN(x, a) ((x) & ~((typeof(x))(a) - 1))
#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a)))
#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0)