[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 3/3] xen/arm64/mmu: head: Replace load_paddr with adr_l where appropriate
Macros load_paddr and adr_l are equivalent when used before the MMU is enabled, resulting in obtaining physical address of a symbol. The former requires to know the physical offset (PA - VA) and can be used both before and after the MMU is enabled. In the spirit of using something only when truly necessary, replace all instances of load_paddr with adr_l, except in create_table_entry macro. Even though there is currently no use of load_paddr after MMU is enabled, this macro used to be call in such a context and we can't rule out that it won't happen again. This way, the logic behind using load_paddr/adr_l is consistent between arm32 and arm64, making it easier for developers to determine which one to use and when. Take the opportunity to fix a comment with incorrect function name. Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx> --- xen/arch/arm/arm64/mmu/head.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/arm64/mmu/head.S b/xen/arch/arm/arm64/mmu/head.S index 10774f30e40e..41779020eb4d 100644 --- a/xen/arch/arm/arm64/mmu/head.S +++ b/xen/arch/arm/arm64/mmu/head.S @@ -146,10 +146,10 @@ create_page_tables: /* * We need to use a stash register because - * create_table_entry_paddr() will clobber the register storing + * create_table_entry_from_paddr() will clobber the register storing * the physical address of the table to point to. */ - load_paddr x4, boot_third + adr_l x4, boot_third ldr x1, =XEN_VIRT_START .rept XEN_NR_ENTRIES(2) mov x0, x4 /* x0 := paddr(l3 table) */ @@ -311,7 +311,7 @@ ENDPROC(enable_mmu) ENTRY(enable_secondary_cpu_mm) mov x6, lr - load_paddr x0, init_ttbr + adr_l x0, init_ttbr ldr x0, [x0] mov x1, #SCTLR_Axx_ELx_WXN /* Enable WxN from the start */ @@ -336,7 +336,7 @@ ENTRY(enable_boot_cpu_mm) mov x6, lr bl create_page_tables - load_paddr x0, boot_pgtable + adr_l x0, boot_pgtable mov x1, #0 /* No extra SCTLR flags */ bl enable_mmu -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |