[PATCH 08/27] ARM: mmu64: Use arch_remap_range where possible
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri May 12 10:40:28 PDT 2023
On 12.05.23 13:09, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
LGTM.
Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> arch/arm/cpu/mmu_64.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/cpu/mmu_64.c b/arch/arm/cpu/mmu_64.c
> index a22e0c81ab..0639d0f1ce 100644
> --- a/arch/arm/cpu/mmu_64.c
> +++ b/arch/arm/cpu/mmu_64.c
> @@ -174,12 +174,12 @@ static void mmu_enable(void)
>
> void zero_page_access(void)
> {
> - create_sections(0x0, 0x0, PAGE_SIZE, CACHED_MEM);
> + arch_remap_range(0x0, PAGE_SIZE, MAP_CACHED);
> }
>
> void zero_page_faulting(void)
> {
> - create_sections(0x0, 0x0, PAGE_SIZE, 0x0);
> + arch_remap_range(0x0, PAGE_SIZE, MAP_FAULT);
> }
>
> /*
> @@ -201,17 +201,17 @@ void __mmu_init(bool mmu_on)
> pr_debug("ttb: 0x%p\n", ttb);
>
> /* create a flat mapping */
> - create_sections(0, 0, 1UL << (BITS_PER_VA - 1), attrs_uncached_mem());
> + arch_remap_range(0, 1UL << (BITS_PER_VA - 1), MAP_UNCACHED);
>
> /* Map sdram cached. */
> for_each_memory_bank(bank) {
> struct resource *rsv;
>
> - create_sections(bank->start, bank->start, bank->size, CACHED_MEM);
> + arch_remap_range((void *)bank->start, bank->size, MAP_CACHED);
>
> for_each_reserved_region(bank, rsv) {
> - create_sections(resource_first_page(rsv), resource_first_page(rsv),
> - resource_count_pages(rsv), attrs_uncached_mem());
> + arch_remap_range((void *)resource_first_page(rsv),
> + resource_count_pages(rsv), MAP_UNCACHED);
> }
> }
>
--
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