arm64: Create common mmu and mpu interfaces

Include the new introduced include/arch/arm64/mm.h instead of the
arm_mmu.h or arm_mpu.h.

Unify function names z_arm64_thread_pt_init/z_arm64_swap_ptables with
z_arm64_thread_mem_domains_init/z_arm64_swap_mem_domains for mmu and
mpu, because:
1. mmu and mpu have almost the same logic.
2. mpu doesn't have ptables.
3. using the function names help reducing "#if define" macros.

Similarly, change z_arm64_ptable_ipi to z_arm64_domain_sync_ipi

And fix a log bug in arm_mmu.c.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
This commit is contained in:
Jaxson Han 2021-07-20 10:14:17 +08:00 committed by Christopher Friedt
commit d282d86d7e
7 changed files with 27 additions and 24 deletions

View file

@ -218,10 +218,6 @@ typedef struct { uint32_t attrs; } k_mem_partition_attr_t;
*/
extern const struct arm_mmu_config mmu_config;
struct k_thread;
void z_arm64_thread_pt_init(struct k_thread *thread);
void z_arm64_swap_ptables(struct k_thread *thread);
#endif /* _ASMLANGUAGE */
#endif /* ZEPHYR_INCLUDE_ARCH_ARM64_ARM_MMU_H_ */