summaryrefslogtreecommitdiffstats
path: root/include/asm-avr32/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-15 16:13:46 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-15 16:13:46 -0700
commite00eea42f24550beb9940e641402450f695c888a (patch)
tree2a83ae36db1d1bf0dd8b8be46e41f17b9dd459b5 /include/asm-avr32/cache.h
parentbc90ba093af2e5022b9d055a2148b54a6aa35bc9 (diff)
parent093d0faf57e59feee224217273f944e10e4e3562 (diff)
downloadop-kernel-dev-e00eea42f24550beb9940e641402450f695c888a.zip
op-kernel-dev-e00eea42f24550beb9940e641402450f695c888a.tar.gz
Merge branch 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32
* 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32: [AVR32] Define ARCH_KMALLOC_MINALIGN to L1_CACHE_BYTES [AVR32] STK1000: Set SPI_MODE_3 in the ltv350qv board info [AVR32] gpio_*_cansleep() fix [AVR32] ratelimit segfault reporting rate
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 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;
OpenPOWER on IntegriCloud