[Xen-devel,11/24] xen/arm: mm: Replace __va(pfn_to_paddr(...)) by mfn_to_virt

Message ID 20170613161323.25196-12-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.
__va(pfn_to_paddr(...)) and mfn_to_virt are equivalent.

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

Comments

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

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


> ---
>  xen/arch/arm/mm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index 08116679ec..f5df669d92 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -999,7 +999,7 @@ static int create_xen_entries(enum xenmap_operation op,
>  
>          BUG_ON(!xen_second[second_linear_offset(addr)].pt.valid);
>  
> -        third = __va(pfn_to_paddr(xen_second[second_linear_offset(addr)].pt.base));
> +        third = mfn_to_virt(xen_second[second_linear_offset(addr)].pt.base);
>  
>          switch ( op ) {
>              case INSERT:
> -- 
> 2.11.0
>

Patch hide | download patch | download mbox

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 08116679ec..f5df669d92 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -999,7 +999,7 @@  static int create_xen_entries(enum xenmap_operation op,
 
         BUG_ON(!xen_second[second_linear_offset(addr)].pt.valid);
 
-        third = __va(pfn_to_paddr(xen_second[second_linear_offset(addr)].pt.base));
+        third = mfn_to_virt(xen_second[second_linear_offset(addr)].pt.base);
 
         switch ( op ) {
             case INSERT: