Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33632
Change subject: commonlib/storage: use ALIGN_UP instead of ALIGN for better readability ......................................................................
commonlib/storage: use ALIGN_UP instead of ALIGN for better readability
Change-Id: I76ec5ff107bc043d9457b3377e88226a96eb3f3c Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/commonlib/storage/bouncebuf.h M src/commonlib/storage/storage.h 2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/33632/1
diff --git a/src/commonlib/storage/bouncebuf.h b/src/commonlib/storage/bouncebuf.h index 27d92e8..0d81be1 100644 --- a/src/commonlib/storage/bouncebuf.h +++ b/src/commonlib/storage/bouncebuf.h @@ -88,7 +88,7 @@ #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) \ char __##name[ROUND(size * sizeof(type), DMA_MINALIGN) + \ DMA_MINALIGN - 1]; \ - type *name = (type *) ALIGN((uintptr_t)__##name, DMA_MINALIGN) + type *name = (type *) ALIGN_UP((uintptr_t)__##name, DMA_MINALIGN) #ifndef ARCH_DMA_MINALIGN #define ARCH_DMA_MINALIGN (DMA_MINALIGN) #endif diff --git a/src/commonlib/storage/storage.h b/src/commonlib/storage/storage.h index 645b6c1a..c71510d 100644 --- a/src/commonlib/storage/storage.h +++ b/src/commonlib/storage/storage.h @@ -23,7 +23,7 @@ #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) \ char __##name[ROUND(size * sizeof(type), DMA_MINALIGN) + \ DMA_MINALIGN - 1]; \ - type *name = (type *) ALIGN((uintptr_t)__##name, DMA_MINALIGN) + type *name = (type *) ALIGN_UP((uintptr_t)__##name, DMA_MINALIGN)
/* NOOPs mirroring ARM's cache API, since x86 devices usually cache snoop */ #define dcache_invalidate_by_mva(addr, len)