Lines Matching defs:size
30 * 2) The size of the aligned portion of the array is a multiple of the minimum
63 * Note that the size parameter is the number of array elements to allocate,
72 #define ALLOC_ALIGN_BUFFER_PAD(type, name, size, align, pad) \
73 char __##name[ROUND(PAD_SIZE((size) * sizeof(type), pad), align) \
77 #define ALLOC_ALIGN_BUFFER(type, name, size, align) \
78 ALLOC_ALIGN_BUFFER_PAD(type, name, size, align, 1)
79 #define ALLOC_CACHE_ALIGN_BUFFER_PAD(type, name, size, pad) \
80 ALLOC_ALIGN_BUFFER_PAD(type, name, size, ARCH_DMA_MINALIGN, pad)
81 #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) \
82 ALLOC_ALIGN_BUFFER(type, name, size, ARCH_DMA_MINALIGN)
89 #define DEFINE_ALIGN_BUFFER(type, name, size, align) \
90 static char __##name[ALIGN(size * sizeof(type), align)] \
94 #define DEFINE_CACHE_ALIGN_BUFFER(type, name, size) \
95 DEFINE_ALIGN_BUFFER(type, name, size, ARCH_DMA_MINALIGN)
98 * malloc_cache_aligned() - allocate a memory region aligned to cache line size
102 * cache-line size. This ensured that subsequent cache operations on this
105 * @size: Minimum number of bytes to allocate
110 static inline void *malloc_cache_aligned(size_t size)
112 return memalign(ARCH_DMA_MINALIGN, ALIGN(size, ARCH_DMA_MINALIGN));