[PATCH 3/7] ARM: mmu: move ARCH_MAP_WRITECOMBINE to header

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Jun 13 02:18:27 PDT 2025


On 6/13/25 09:58, Sascha Hauer wrote:
> 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.
> 
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum at 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 2754bea88a514c2886e43ffc4dbf310d75055fca..3e0c761cd43486d3193b80b5f79097bdd5cd333c 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 65c6f1bb9f8ac2f4b55baf46c2af3d3714060088..440258fa767735a4537abd71030a5540813fc443 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());
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list