Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=093d0faf57e59feee224217273f944e10e4e3562 Commit: 093d0faf57e59feee224217273f944e10e4e3562 Parent: 2fdfe8d9a2687718b07a35196b89fbf48ba0c82f Author: Haavard Skinnemoen <[EMAIL PROTECTED]> AuthorDate: Mon Jun 11 17:17:14 2007 +0200 Committer: Haavard Skinnemoen <[EMAIL PROTECTED]> CommitDate: Thu Jun 14 18:30:50 2007 +0200
[AVR32] Define ARCH_KMALLOC_MINALIGN to L1_CACHE_BYTES This allows SLUB debugging to be used without fear of messing up DMA transfers. SPI is one example that easily breaks without this patch. Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]> --- include/asm-avr32/cache.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/asm-avr32/cache.h b/include/asm-avr32/cache.h index dabb955..d3cf35a 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; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html