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

[Minios-devel] [UNIKRAFT PATCHv3 2/7] plat/common: Rename read_virtual_count to generic_timer_get_ticks



From: Wei Chen <wei.chen@xxxxxxx>

Rename to generic_timer_get_ticks would be good for unifing
the prefix of the generic timer functions.

Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
Signed-off-by: Jianyong Wu <jianyong.wu@xxxxxxx>
Signed-off-by: Jia He <justin.he@xxxxxxx>
---
 plat/common/arm/time.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/plat/common/arm/time.c b/plat/common/arm/time.c
index 4c66039..14da0b7 100644
--- a/plat/common/arm/time.c
+++ b/plat/common/arm/time.c
@@ -173,7 +173,7 @@ endnofreq:
  * the two read values. If bit[32] is different, keep the first value,
  * otherwise keep the second value.
  */
-static uint64_t read_virtual_count(void)
+static uint64_t generic_timer_get_ticks(void)
 {
     uint64_t val_1st, val_2nd;
 
@@ -182,7 +182,7 @@ static uint64_t read_virtual_count(void)
     return (((val_1st ^ val_2nd) >> 32) & 1) ? val_1st : val_2nd;
 }
 #else
-static inline uint64_t read_virtual_count(void)
+static inline uint64_t generic_timer_get_ticks(void)
 {
        return SYSREG_READ64(cntvct_el0);
 }
@@ -194,13 +194,13 @@ static inline uint64_t read_virtual_count(void)
  */
 static __nsec generic_timer_monotonic(void)
 {
-       return (__nsec)ticks_to_ns(read_virtual_count() - boot_ticks);
+       return (__nsec)ticks_to_ns(generic_timer_get_ticks() - boot_ticks);
 }
 
 /*
  * Return epoch offset (wall time offset to monotonic clock start).
  */
-static __u64  generic_timer_epochoffset(void)
+static uint64_t generic_timer_epochoffset(void)
 {
        return 0;
 }
@@ -233,7 +233,7 @@ static int generic_timer_init(void)
         * Monotonic time begins at boot_ticks (first read of counter
         * before calibration).
         */
-       boot_ticks = read_virtual_count();
+       boot_ticks = generic_timer_get_ticks();
 
        return 0;
 }
-- 
2.17.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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