aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-avr32/cache.h
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-06-11 11:17:14 -0400
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-06-14 12:30:50 -0400
commit093d0faf57e59feee224217273f944e10e4e3562 (patch)
treeafecbd1b0ee1ca66fad714a9accadd8ce9efd897 /include/asm-avr32/cache.h
parent2fdfe8d9a2687718b07a35196b89fbf48ba0c82f (diff)
[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 <hskinnemoen@atmel.com>
Diffstat (limited to 'include/asm-avr32/cache.h')
-rw-r--r--include/asm-avr32/cache.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-avr32/cache.h b/include/asm-avr32/cache.h
index dabb955f3c00..d3cf35ab11ab 100644
--- a/include/asm-avr32/cache.h
+++ b/include/asm-avr32/cache.h
@@ -4,6 +4,15 @@
4#define L1_CACHE_SHIFT 5 4#define L1_CACHE_SHIFT 5
5#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 5#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
6 6
7/*
8 * Memory returned by kmalloc() may be used for DMA, so we must make
9 * sure that all such allocations are cache aligned. Otherwise,
10 * unrelated code may cause parts of the buffer to be read into the
11 * cache before the transfer is done, causing old data to be seen by
12 * the CPU.
13 */
14#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
15
7#ifndef __ASSEMBLER__ 16#ifndef __ASSEMBLER__
8struct cache_info { 17struct cache_info {
9 unsigned int ways; 18 unsigned int ways;