[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen/arm: Correct the coding style of get_cycles



commit 896128e9352327c4ff2b5c0c6cfa3856e45e2ca3
Author:     Wei Chen <wei.chen@xxxxxxx>
AuthorDate: Tue Jan 5 15:19:45 2021 +0800
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Wed Jan 13 19:56:32 2021 +0000

    xen/arm: Correct the coding style of get_cycles
    
    It seems the arm inline function get_cycles has used 8 spaces for
    line indent since 2012. This patch correct them to 4 spaces and
    remove extra space between function name and bracket.
    
    Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
    Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
---
 xen/include/asm-arm/time.h | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/xen/include/asm-arm/time.h b/xen/include/asm-arm/time.h
index 1b2c13614b..5c4529ebb5 100644
--- a/xen/include/asm-arm/time.h
+++ b/xen/include/asm-arm/time.h
@@ -11,29 +11,29 @@
 
 typedef uint64_t cycles_t;
 
-static inline cycles_t get_cycles (void)
+static inline cycles_t get_cycles(void)
 {
-        isb();
+    isb();
+    /*
+     * ARM_WORKAROUND_858921: Cortex-A73 (all versions) counter read
+     * can return a wrong value when the counter crosses a 32bit boundary.
+     */
+    if ( !check_workaround_858921() )
+        return READ_SYSREG64(CNTPCT_EL0);
+    else
+    {
         /*
-         * ARM_WORKAROUND_858921: Cortex-A73 (all versions) counter read
-         * can return a wrong value when the counter crosses a 32bit boundary.
+         * A recommended workaround for erratum 858921 is to:
+         *  1- Read twice CNTPCT.
+         *  2- Compare bit[32] of the two read values.
+         *      - If bit[32] is different, keep the old value.
+         *      - If bit[32] is the same, keep the new value.
          */
-        if ( !check_workaround_858921() )
-            return READ_SYSREG64(CNTPCT_EL0);
-        else
-        {
-            /*
-             * A recommended workaround for erratum 858921 is to:
-             *  1- Read twice CNTPCT.
-             *  2- Compare bit[32] of the two read values.
-             *      - If bit[32] is different, keep the old value.
-             *      - If bit[32] is the same, keep the new value.
-             */
-            cycles_t old, new;
-            old = READ_SYSREG64(CNTPCT_EL0);
-            new = READ_SYSREG64(CNTPCT_EL0);
-            return (((old ^ new) >> 32) & 1) ? old : new;
-        }
+        cycles_t old, new;
+        old = READ_SYSREG64(CNTPCT_EL0);
+        new = READ_SYSREG64(CNTPCT_EL0);
+        return (((old ^ new) >> 32) & 1) ? old : new;
+    }
 }
 
 /* List of timer's IRQ */
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.