From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>,
BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH v3 2/6] ARM: mmu: move ARCH_MAP_WRITECOMBINE to header
Date: Wed, 18 Jun 2025 11:34:48 +0200 [thread overview]
Message-ID: <20250618-mmu-xn-ro-v3-2-2a9825725934@pengutronix.de> (raw)
In-Reply-To: <20250618-mmu-xn-ro-v3-0-2a9825725934@pengutronix.de>
ARCH_MAP_WRITECOMBINE is defined equally for both mmu_32 and mmu_64 and
we'll add more mapping types later, so move it to a header file to be
shared by both mmu implementations.
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/cpu/mmu-common.h | 2 ++
arch/arm/cpu/mmu_32.c | 1 -
arch/arm/cpu/mmu_64.c | 2 --
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/cpu/mmu-common.h b/arch/arm/cpu/mmu-common.h
index d0b50662570a48fafd47edac9fbc12fe2a62458a..0f11a4b73d1199ec2400f64a2f057cf940d4ff2d 100644
--- a/arch/arm/cpu/mmu-common.h
+++ b/arch/arm/cpu/mmu-common.h
@@ -9,6 +9,8 @@
#include <linux/kernel.h>
#include <linux/sizes.h>
+#define ARCH_MAP_WRITECOMBINE ((unsigned)-1)
+
struct device;
void dma_inv_range(void *ptr, size_t size);
diff --git a/arch/arm/cpu/mmu_32.c b/arch/arm/cpu/mmu_32.c
index 2c2144327380c7cbb6c7426212d94a4a9ba5f70f..104780ff6b9827982e16c1e2b8ac8aae6e4b5c6a 100644
--- a/arch/arm/cpu/mmu_32.c
+++ b/arch/arm/cpu/mmu_32.c
@@ -23,7 +23,6 @@
#include "mmu_32.h"
#define PTRS_PER_PTE (PGDIR_SIZE / PAGE_SIZE)
-#define ARCH_MAP_WRITECOMBINE ((unsigned)-1)
static inline uint32_t *get_ttb(void)
{
diff --git a/arch/arm/cpu/mmu_64.c b/arch/arm/cpu/mmu_64.c
index cb0803400cfd6a55f0b34dea823576d6593e96f1..121dd136af33967e516b66091a6c671d45e6e119 100644
--- a/arch/arm/cpu/mmu_64.c
+++ b/arch/arm/cpu/mmu_64.c
@@ -24,8 +24,6 @@
#include "mmu_64.h"
-#define ARCH_MAP_WRITECOMBINE ((unsigned)-1)
-
static uint64_t *get_ttb(void)
{
return (uint64_t *)get_ttbr(current_el());
--
2.39.5
next prev parent reply other threads:[~2025-06-18 9:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 9:34 [PATCH v3 0/6] ARM: Map sections RO/XN Sascha Hauer
2025-06-18 9:34 ` [PATCH v3 1/6] ARM: pass barebox base to mmu_early_enable() Sascha Hauer
2025-06-18 9:34 ` Sascha Hauer [this message]
2025-06-18 9:34 ` [PATCH v3 3/6] ARM: MMU: map memory for barebox proper pagewise Sascha Hauer
2025-06-18 9:34 ` [PATCH v3 4/6] ARM: MMU: map text segment ro and data segments execute never Sascha Hauer
2025-06-18 9:34 ` [PATCH v3 5/6] ARM: MMU64: map memory for barebox proper pagewise Sascha Hauer
2025-06-18 9:34 ` [PATCH v3 6/6] ARM: MMU64: map text segment ro and data segments execute never Sascha Hauer
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=20250618-mmu-xn-ro-v3-2-2a9825725934@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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