diff mbox

[21/22] xen/arm: p2m: Replace flush_tlb_domain by p2m_flush_tlb

Message ID 1469031064-23344-22-git-send-email-julien.grall@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Julien Grall July 20, 2016, 4:11 p.m. UTC
The function to flush the TLBs for a given p2m does not need to know about
the domain. So pass directly the p2m in parameter.

At the same time rename the function to p2m_flush_tlb to match the
parameter change.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/p2m.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Stefano Stabellini July 27, 2016, 1:15 a.m. UTC | #1
On Wed, 20 Jul 2016, Julien Grall wrote:
> The function to flush the TLBs for a given p2m does not need to know about
> the domain. So pass directly the p2m in parameter.
> 
> At the same time rename the function to p2m_flush_tlb to match the
> parameter change.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>

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


>  xen/arch/arm/p2m.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index 8541171..5511d25 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -137,9 +137,8 @@ void p2m_restore_state(struct vcpu *n)
>      isb();
>  }
>  
> -static void flush_tlb_domain(struct domain *d)
> +static void p2m_flush_tlb(struct p2m_domain *p2m)
>  {
> -    struct p2m_domain *p2m = &d->arch.p2m;
>      unsigned long flags = 0;
>      uint64_t ovttbr;
>  
> @@ -1158,7 +1157,7 @@ static int apply_p2m_changes(struct domain *d,
>  out:
>      if ( flush )
>      {
> -        flush_tlb_domain(d);
> +        p2m_flush_tlb(&d->arch.p2m);
>          ret = iommu_iotlb_flush(d, gfn_x(sgfn), nr);
>          if ( !rc )
>              rc = ret;
> @@ -1303,7 +1302,7 @@ static int p2m_alloc_table(struct domain *d)
>       * Make sure that all TLBs corresponding to the new VMID are flushed
>       * before using it
>       */
> -    flush_tlb_domain(d);
> +    p2m_flush_tlb(p2m);
>  
>      return 0;
>  }
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 8541171..5511d25 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -137,9 +137,8 @@  void p2m_restore_state(struct vcpu *n)
     isb();
 }
 
-static void flush_tlb_domain(struct domain *d)
+static void p2m_flush_tlb(struct p2m_domain *p2m)
 {
-    struct p2m_domain *p2m = &d->arch.p2m;
     unsigned long flags = 0;
     uint64_t ovttbr;
 
@@ -1158,7 +1157,7 @@  static int apply_p2m_changes(struct domain *d,
 out:
     if ( flush )
     {
-        flush_tlb_domain(d);
+        p2m_flush_tlb(&d->arch.p2m);
         ret = iommu_iotlb_flush(d, gfn_x(sgfn), nr);
         if ( !rc )
             rc = ret;
@@ -1303,7 +1302,7 @@  static int p2m_alloc_table(struct domain *d)
      * Make sure that all TLBs corresponding to the new VMID are flushed
      * before using it
      */
-    flush_tlb_domain(d);
+    p2m_flush_tlb(p2m);
 
     return 0;
 }