Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: ath79: reduce ARCH_DMA_MINALIGN
@ 2026-05-27 22:25 Rosen Penev
  2026-06-15 10:28 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-05-27 22:25 UTC (permalink / raw)
  To: linux-mips; +Cc: Thomas Bogendoerfer, open list

Currently, ath79 SoCs use the default ARCH_DMA_MINALIGN value of 128
bytes defined in mach-generic. This is excessive for these platforms
and leads to significant memory waste in kmalloc.

Override ARCH_DMA_MINALIGN to use L1_CACHE_BYTES, which is 32 bytes for
ath79 SoCs.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 arch/mips/include/asm/mach-ath79/kmalloc.h | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 arch/mips/include/asm/mach-ath79/kmalloc.h

diff --git a/arch/mips/include/asm/mach-ath79/kmalloc.h b/arch/mips/include/asm/mach-ath79/kmalloc.h
new file mode 100644
index 000000000000..954f5d6e0dd0
--- /dev/null
+++ b/arch/mips/include/asm/mach-ath79/kmalloc.h
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_MACH_ATH79_KMALLOC_H
+#define __ASM_MACH_ATH79_KMALLOC_H
+
+#define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
+
+#endif /* __ASM_MACH_ATH79_KMALLOC_H */
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: ath79: reduce ARCH_DMA_MINALIGN
  2026-05-27 22:25 [PATCH] MIPS: ath79: reduce ARCH_DMA_MINALIGN Rosen Penev
@ 2026-06-15 10:28 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2026-06-15 10:28 UTC (permalink / raw)
  To: Rosen Penev; +Cc: linux-mips, open list

On Wed, May 27, 2026 at 03:25:04PM -0700, Rosen Penev wrote:
> Currently, ath79 SoCs use the default ARCH_DMA_MINALIGN value of 128
> bytes defined in mach-generic. This is excessive for these platforms
> and leads to significant memory waste in kmalloc.
> 
> Override ARCH_DMA_MINALIGN to use L1_CACHE_BYTES, which is 32 bytes for
> ath79 SoCs.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  arch/mips/include/asm/mach-ath79/kmalloc.h | 7 +++++++
>  1 file changed, 7 insertions(+)
>  create mode 100644 arch/mips/include/asm/mach-ath79/kmalloc.h
> 
> diff --git a/arch/mips/include/asm/mach-ath79/kmalloc.h b/arch/mips/include/asm/mach-ath79/kmalloc.h
> new file mode 100644
> index 000000000000..954f5d6e0dd0
> --- /dev/null
> +++ b/arch/mips/include/asm/mach-ath79/kmalloc.h
> @@ -0,0 +1,7 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef __ASM_MACH_ATH79_KMALLOC_H
> +#define __ASM_MACH_ATH79_KMALLOC_H
> +
> +#define ARCH_DMA_MINALIGN	L1_CACHE_BYTES
> +
> +#endif /* __ASM_MACH_ATH79_KMALLOC_H */
> -- 
> 2.54.0

applied to mips-next

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-15 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-27 22:25 [PATCH] MIPS: ath79: reduce ARCH_DMA_MINALIGN Rosen Penev
2026-06-15 10:28 ` Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox