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

[Minios-devel] [UNIKRAFT PATCHv3 3/7] plat/common: Record boot_ticks at very beginning



From: Wei Chen <wei.chen@xxxxxxx>

The position of recording boot_ticks is a little later. We moved
it to the very beginning of platform call timer initialization
function.

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 | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/plat/common/arm/time.c b/plat/common/arm/time.c
index 14da0b7..aea379c 100644
--- a/plat/common/arm/time.c
+++ b/plat/common/arm/time.c
@@ -229,12 +229,6 @@ static int generic_timer_init(void)
        /* We disallow zero ns_per_tick */
        UK_BUGON(!tick_per_ns);
 
-       /*
-        * Monotonic time begins at boot_ticks (first read of counter
-        * before calibration).
-        */
-       boot_ticks = generic_timer_get_ticks();
-
        return 0;
 }
 
@@ -276,6 +270,12 @@ void ukplat_time_init(void)
 {
        int rc;
 
+       /*
+        * Monotonic time begins at boot_ticks (first read of counter
+        * before calibration).
+        */
+       boot_ticks = generic_timer_get_ticks();
+
        rc = ukplat_irq_register(0, timer_handler, NULL);
        if (rc < 0)
                UK_CRASH("Failed to register timer interrupt handler\n");
-- 
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®.