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

[Minios-devel] [UNIKRAFT PATCHv4 42/43] plat/kvm: Implement time_block_until for arm64


  • To: <minios-devel@xxxxxxxxxxxxxxxxxxxx>, <simon.kuenzer@xxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Fri, 6 Jul 2018 09:03:55 +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, 06 Jul 2018 09:06:07 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Nodisclaimer: True
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

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/kvm/arm/time.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/plat/kvm/arm/time.c b/plat/kvm/arm/time.c
index ab4968f..5c0757c 100644
--- a/plat/kvm/arm/time.c
+++ b/plat/kvm/arm/time.c
@@ -34,6 +34,7 @@
 #include <stdlib.h>
 #include <uk/assert.h>
 #include <uk/plat/time.h>
+#include <uk/arch/atomic.h>
 
 static uint64_t cntvct_at_init;
 static uint32_t counter_freq;
@@ -125,3 +126,13 @@ void ukplat_time_fini(void)
 {
        /* TODO */
 }
+
+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;
+       }
+}
-- 
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®.