[Xen-devel,for-4.11,v7,02/16] xen/arm: setup: use maddr_to_mfn rather than _mfn(paddr_to_pfn(...))

Message ID 20180403153251.19595-3-julien.grall@arm.com
State Accepted
Commit c8d474db606d92496e6284b98cd212b954fbc4b6
Headers show
Series
  • xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN
Related show

Commit Message

Julien Grall April 3, 2018, 3:32 p.m.
Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>

---
Cc: Stefano Stabellini <sstabellini@kernel.org>

    Changes in v6:
        - Remove the justification from the commit message
        - Add George's reviewed-by

    Changes in v4:
        - Patch added
---
 xen/arch/arm/setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefano Stabellini April 5, 2018, 7:55 p.m. | #1
On Tue, 3 Apr 2018, Julien Grall wrote:
> Signed-off-by: Julien Grall <julien.grall@arm.com>
> Reviewed-by: George Dunlap <george.dunlap@citrix.com>

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

> ---
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> 
>     Changes in v6:
>         - Remove the justification from the commit message
>         - Add George's reviewed-by
> 
>     Changes in v4:
>         - Patch added
> ---
>  xen/arch/arm/setup.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index b17797dc97..1ce6a26e84 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -268,8 +268,8 @@ void __init discard_initial_modules(void)
>          if ( mi->module[i].kind == BOOTMOD_XEN )
>              continue;
>  
> -        if ( !mfn_valid(_mfn(paddr_to_pfn(s))) ||
> -             !mfn_valid(_mfn(paddr_to_pfn(e))))
> +        if ( !mfn_valid(maddr_to_mfn(s)) ||
> +             !mfn_valid(maddr_to_mfn(e)) )
>              continue;
>  
>          dt_unreserved_regions(s, e, init_domheap_pages, 0);
> -- 
> 2.11.0
>

Patch

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index b17797dc97..1ce6a26e84 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -268,8 +268,8 @@  void __init discard_initial_modules(void)
         if ( mi->module[i].kind == BOOTMOD_XEN )
             continue;
 
-        if ( !mfn_valid(_mfn(paddr_to_pfn(s))) ||
-             !mfn_valid(_mfn(paddr_to_pfn(e))))
+        if ( !mfn_valid(maddr_to_mfn(s)) ||
+             !mfn_valid(maddr_to_mfn(e)) )
             continue;
 
         dt_unreserved_regions(s, e, init_domheap_pages, 0);