X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-avr32%2Fcache.h;h=d3cf35ab11ab127854c90385554f743848bfe371;hb=bf22f6fe2d72b4d7e9035be8ceb340414cf490e3;hp=dabb955f3c00fd167dfca1671ea36f6257ba3371;hpb=ccaa36f73544163ef6e15eb29a620130755f6001;p=linux-2.6 diff --git a/include/asm-avr32/cache.h b/include/asm-avr32/cache.h index dabb955f3c..d3cf35ab11 100644 --- a/include/asm-avr32/cache.h +++ b/include/asm-avr32/cache.h @@ -4,6 +4,15 @@ #define L1_CACHE_SHIFT 5 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) +/* + * Memory returned by kmalloc() may be used for DMA, so we must make + * sure that all such allocations are cache aligned. Otherwise, + * unrelated code may cause parts of the buffer to be read into the + * cache before the transfer is done, causing old data to be seen by + * the CPU. + */ +#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES + #ifndef __ASSEMBLER__ struct cache_info { unsigned int ways;