forked from luck/tmp_suning_uos_patched
69dcf3db03
Architectures that handle DMA-non-coherent memory need to set ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe: the buffer doesn't share a cache with the others. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: David Howells <dhowells@redhat.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
26 lines
773 B
C
26 lines
773 B
C
/* cache.h: FRV cache definitions
|
|
*
|
|
* Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
|
|
* Written by David Howells (dhowells@redhat.com)
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef __ASM_CACHE_H
|
|
#define __ASM_CACHE_H
|
|
|
|
|
|
/* bytes per L1 cache line */
|
|
#define L1_CACHE_SHIFT (CONFIG_FRV_L1_CACHE_SHIFT)
|
|
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
|
|
|
|
#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
|
|
|
|
#define __cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES)))
|
|
#define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES)))
|
|
|
|
#endif
|