From: Rosen Penev <rosenp@gmail.com>
To: linux-mips@vger.kernel.org
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] MIPS: ath79: reduce ARCH_DMA_MINALIGN
Date: Wed, 27 May 2026 15:25:04 -0700 [thread overview]
Message-ID: <20260527222504.17381-1-rosenp@gmail.com> (raw)
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
next reply other threads:[~2026-05-27 22:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 22:25 Rosen Penev [this message]
2026-06-15 10:28 ` [PATCH] MIPS: ath79: reduce ARCH_DMA_MINALIGN Thomas Bogendoerfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260527222504.17381-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox