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

[Minios-devel] [UNIKRAFT PATCHv6 33/37] plat/kvm: Implement time_block_until for arm64


  • To: <minios-devel@xxxxxxxxxxxxxxxxxxxx>, <simon.kuenzer@xxxxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Fri, 14 Sep 2018 07:57:06 +0000
  • Authentication-results: spf=pass (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=bestguesspass action=none header.from=arm.com;
  • Cc: Kaly.Xin@xxxxxxx, nd@xxxxxxx, wei.chen@xxxxxxx
  • Delivery-date: Fri, 14 Sep 2018 07:59:02 +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 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/plat/common/arm/time.c b/plat/common/arm/time.c
index 93b0521..8457511 100644
--- a/plat/common/arm/time.c
+++ b/plat/common/arm/time.c
@@ -139,6 +139,21 @@ 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) {
+               /*
+                * TODO:
+                * As we haven't support interrupt on Arm, so we just
+                * use busy polling for now.
+                */
+               if (ukarch_test_and_clr_bit(0, &sched_have_pending_events))
+               break;
+       }
+}
+
 /* return ns since time_init() */
 __nsec ukplat_monotonic_clock(void)
 {
-- 
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®.