commonlib/storage: use ALIGN_UP instead of ALIGN for better readability
Change-Id: I76ec5ff107bc043d9457b3377e88226a96eb3f3c Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/33632 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
This commit is contained in:
parent
e1d57f7610
commit
8d2ec86c5e
@ -88,7 +88,7 @@ int bounce_buffer_stop(struct bounce_buffer *state);
|
||||
#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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user