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

[Minios-devel] [UNIKRAFT PATCHv5 45/46] plat/kvm: Implement time_block_until for arm64


  • To: <minios-devel@xxxxxxxxxxxxxxxxxxxx>, <simon.kuenzer@xxxxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Fri, 10 Aug 2018 07:08:35 +0000
  • Authentication-results: spf=fail (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Cc: Kaly.Xin@xxxxxxx, nd@xxxxxxx, wei.chen@xxxxxxx
  • Delivery-date: Fri, 10 Aug 2018 07:10:53 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Nodisclaimer: True
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

From: Wei Chen <Wei.Chen@xxxxxxx>

As we haven't implement full functions for timer for arm64.
But this function is needed by Unikraft. So we impplement
a temporary function to make compiler happy.

Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
---
 plat/common/arm/time.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/plat/common/arm/time.c b/plat/common/arm/time.c
index 1829938..7deb745 100644
--- a/plat/common/arm/time.c
+++ b/plat/common/arm/time.c
@@ -33,6 +33,7 @@
  */
 #include <uk/assert.h>
 #include <uk/plat/time.h>
+#include <uk/arch/atomic.h>
 #include <cpu.h>
 
 static uint64_t boot_ticks;
@@ -136,6 +137,16 @@ static int generic_timer_init(void)
        return 0;
 }
 
+long sched_have_pending_events;
+
+void time_block_until(__snsec until)
+{
+       while ((__snsec) ukplat_monotonic_clock() < until) {
+               if (ukarch_test_and_clr_bit(0, &sched_have_pending_events))
+                       break;
+       }
+}
+
 struct ukplat_time_ops arch_timer_ops = {
        .init = generic_timer_init,
        .monotonic = generic_timer_monotonic,
-- 
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®.