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

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



Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

On 14.09.2018 09:57, Wei Chen wrote:
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)
  {


_______________________________________________
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®.