[Xen-devel,10/24] xen/arm: domain_build: Replace paddr_to_pfn(virt_to_maddr(.)) by virt_to_mfn(.)

Message ID 20170613161323.25196-11-julien.grall@arm.com
State New
Headers show
Series
  • xen/arm: Extend the usage of typesafe MFN
Related show

Commit Message

Julien Grall June 13, 2017, 4:13 p.m.
paddr_to_pfn(virt_to_maddr(.)) and virt_to_mfn(.) are equivalent.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/domain_build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Stabellini June 15, 2017, 10:44 p.m. | #1
On Tue, 13 Jun 2017, Julien Grall wrote:
> paddr_to_pfn(virt_to_maddr(.)) and virt_to_mfn(.) are equivalent.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

> ---
>  xen/arch/arm/domain_build.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 3abacc0d80..a04c8862db 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -1903,7 +1903,7 @@ static int prepare_acpi(struct domain *d, struct kernel_info *kinfo)
>      rc = map_regions_p2mt(d,
>                            _gfn(paddr_to_pfn(d->arch.efi_acpi_gpa)),
>                            PFN_UP(d->arch.efi_acpi_len),
> -                          _mfn(paddr_to_pfn(virt_to_maddr(d->arch.efi_acpi_table))),
> +                          _mfn(virt_to_mfn(d->arch.efi_acpi_table)),
>                            p2m_mmio_direct_c);
>      if ( rc != 0 )
>      {
> -- 
> 2.11.0
>

Patch hide | download patch | download mbox

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 3abacc0d80..a04c8862db 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1903,7 +1903,7 @@  static int prepare_acpi(struct domain *d, struct kernel_info *kinfo)
     rc = map_regions_p2mt(d,
                           _gfn(paddr_to_pfn(d->arch.efi_acpi_gpa)),
                           PFN_UP(d->arch.efi_acpi_len),
-                          _mfn(paddr_to_pfn(virt_to_maddr(d->arch.efi_acpi_table))),
+                          _mfn(virt_to_mfn(d->arch.efi_acpi_table)),
                           p2m_mmio_direct_c);
     if ( rc != 0 )
     {