summaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/include/asm/cache.h')
-rw-r--r--arch/sh/include/asm/cache.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/sh/include/asm/cache.h b/arch/sh/include/asm/cache.h
index 2408ac4873aa..e7ac9c950275 100644
--- a/arch/sh/include/asm/cache.h
+++ b/arch/sh/include/asm/cache.h
@@ -8,16 +8,21 @@
*/
#ifndef __ASM_SH_CACHE_H
#define __ASM_SH_CACHE_H
-#ifdef __KERNEL__
#include <linux/init.h>
#include <cpu/cache.h>
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
-#define __read_mostly __attribute__((__section__(".data..read_mostly")))
+/*
+ * Some drivers need to perform DMA into kmalloc'ed buffers
+ * and so we have to increase the kmalloc minalign for this.
+ */
+#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
+
+#define __read_mostly __section(".data..read_mostly")
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct cache_info {
unsigned int ways; /* Number of cache ways */
unsigned int sets; /* Number of cache sets */
@@ -43,6 +48,5 @@ struct cache_info {
unsigned long flags;
};
-#endif /* __ASSEMBLY__ */
-#endif /* __KERNEL__ */
+#endif /* __ASSEMBLER__ */
#endif /* __ASM_SH_CACHE_H */