Skip to content

Commit

Permalink
sh: move the ARCH_DMA_MINALIGN definition to asm/cache.h
Browse files Browse the repository at this point in the history
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/20230613155245.1228274-4-catalin.marinas@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: kernel test robot <lkp@intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Catalin Marinas authored and Andrew Morton committed Jun 19, 2023
1 parent 4ea57ce commit e6926a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions arch/sh/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)

/*
* 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__
Expand Down
6 changes: 0 additions & 6 deletions arch/sh/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,4 @@ typedef struct page *pgtable_t;
#include <asm-generic/memory_model.h>
#include <asm-generic/getorder.h>

/*
* 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

#endif /* __ASM_SH_PAGE_H */

0 comments on commit e6926a4

Please sign in to comment.