Skip to content

Commit e6926a4

Browse files
ctmarinasakpm00
authored andcommitted
sh: move the ARCH_DMA_MINALIGN definition to asm/cache.h
The sh architecture defines ARCH_DMA_MINALIGN in asm/page.h. Move it to asm/cache.h to allow a generic ARCH_DMA_MINALIGN definition in linux/cache.h without redefine errors/warnings. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Rich Felker <[email protected]> Cc: John Paul Adrian Glaubitz <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: kernel test robot <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Simek <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 4ea57ce commit e6926a4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

arch/sh/include/asm/cache.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
1616

17+
/*
18+
* Some drivers need to perform DMA into kmalloc'ed buffers
19+
* and so we have to increase the kmalloc minalign for this.
20+
*/
21+
#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
22+
1723
#define __read_mostly __section(".data..read_mostly")
1824

1925
#ifndef __ASSEMBLY__

arch/sh/include/asm/page.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,4 @@ typedef struct page *pgtable_t;
174174
#include <asm-generic/memory_model.h>
175175
#include <asm-generic/getorder.h>
176176

177-
/*
178-
* Some drivers need to perform DMA into kmalloc'ed buffers
179-
* and so we have to increase the kmalloc minalign for this.
180-
*/
181-
#define ARCH_DMA_MINALIGN L1_CACHE_BYTES
182-
183177
#endif /* __ASM_SH_PAGE_H */

0 commit comments

Comments
 (0)