diff mbox series

[Xen-devel,06/24] xen/arm: mm: Fix coding style of mfn_to_xen_entry

Message ID 20170613161323.25196-7-julien.grall@arm.com
State Accepted
Commit b8d6b337d945de9cc5a29b50bf5c6adfe0d4d3df
Headers show
Series xen/arm: Extend the usage of typesafe MFN | expand

Commit Message

Julien Grall June 13, 2017, 4:13 p.m. UTC
Fix the comment coding style and add a newline before the return.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/mm.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

Comments

Stefano Stabellini June 15, 2017, 10:35 p.m. UTC | #1
On Tue, 13 Jun 2017, Julien Grall wrote:
> Fix the comment coding style and add a newline before the return.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>

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

> ---
>  xen/arch/arm/mm.c | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index 587a6b3975..6f63e4315a 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -254,9 +254,11 @@ void dump_hyp_walk(vaddr_t addr)
>      dump_pt_walk(ttbr, addr, HYP_PT_ROOT_LEVEL, 1);
>  }
>  
> -/* Standard entry type that we'll use to build Xen's own pagetables.
> +/*
> + * Standard entry type that we'll use to build Xen's own pagetables.
>   * We put the same permissions at every level, because they're ignored
> - * by the walker in non-leaf entries. */
> + * by the walker in non-leaf entries.
> + */
>  static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
>  {
>      paddr_t pa = ((paddr_t) mfn) << PAGE_SHIFT;
> @@ -274,10 +276,12 @@ static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
>              .xn = 1,              /* No need to execute outside .text */
>              .avail = 0,           /* Reference count for domheap mapping */
>          }};;
> -    /* Setting the User bit is strange, but the ATS1H[RW] instructions
> +    /*
> +     * Setting the User bit is strange, but the ATS1H[RW] instructions
>       * don't seem to work otherwise, and since we never run on Xen
>       * pagetables in User mode it's OK.  If this changes, remember
> -     * to update the hard-coded values in head.S too */
> +     * to update the hard-coded values in head.S too.
> +     */
>  
>      switch ( attr )
>      {
> @@ -298,7 +302,8 @@ static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
>          break;
>      case UNCACHED:
>      case DEV_SHARED:
> -        /* Shareability is ignored for non-Normal memory, Outer is as
> +        /*
> +         * Shareability is ignored for non-Normal memory, Outer is as
>           * good as anything.
>           *
>           * On ARMv8 sharability is ignored and explicitly treated as Outer
> @@ -314,8 +319,9 @@ static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
>      ASSERT(!(pa & ~PAGE_MASK));
>      ASSERT(!(pa & ~PADDR_MASK));
>  
> -    // XXX shifts
> +    /* XXX shifts */
>      e.bits |= pa;
> +
>      return e;
>  }
>  
> -- 
> 2.11.0
>
diff mbox series

Patch

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 587a6b3975..6f63e4315a 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -254,9 +254,11 @@  void dump_hyp_walk(vaddr_t addr)
     dump_pt_walk(ttbr, addr, HYP_PT_ROOT_LEVEL, 1);
 }
 
-/* Standard entry type that we'll use to build Xen's own pagetables.
+/*
+ * Standard entry type that we'll use to build Xen's own pagetables.
  * We put the same permissions at every level, because they're ignored
- * by the walker in non-leaf entries. */
+ * by the walker in non-leaf entries.
+ */
 static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
 {
     paddr_t pa = ((paddr_t) mfn) << PAGE_SHIFT;
@@ -274,10 +276,12 @@  static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
             .xn = 1,              /* No need to execute outside .text */
             .avail = 0,           /* Reference count for domheap mapping */
         }};;
-    /* Setting the User bit is strange, but the ATS1H[RW] instructions
+    /*
+     * Setting the User bit is strange, but the ATS1H[RW] instructions
      * don't seem to work otherwise, and since we never run on Xen
      * pagetables in User mode it's OK.  If this changes, remember
-     * to update the hard-coded values in head.S too */
+     * to update the hard-coded values in head.S too.
+     */
 
     switch ( attr )
     {
@@ -298,7 +302,8 @@  static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
         break;
     case UNCACHED:
     case DEV_SHARED:
-        /* Shareability is ignored for non-Normal memory, Outer is as
+        /*
+         * Shareability is ignored for non-Normal memory, Outer is as
          * good as anything.
          *
          * On ARMv8 sharability is ignored and explicitly treated as Outer
@@ -314,8 +319,9 @@  static inline lpae_t mfn_to_xen_entry(unsigned long mfn, unsigned attr)
     ASSERT(!(pa & ~PAGE_MASK));
     ASSERT(!(pa & ~PADDR_MASK));
 
-    // XXX shifts
+    /* XXX shifts */
     e.bits |= pa;
+
     return e;
 }