From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH ARM v8 1/4] mini-os: arm: time Date: Tue, 21 Oct 2014 11:50:16 +0100 Message-ID: <1413888616.23337.22.camel@citrix.com> References: <1412328051-20015-1-git-send-email-talex5@gmail.com> <1412328051-20015-2-git-send-email-talex5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XgX1B-0008LJ-5r for xen-devel@lists.xenproject.org; Tue, 21 Oct 2014 10:50:21 +0000 In-Reply-To: <1412328051-20015-2-git-send-email-talex5@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Thomas Leonard Cc: Dave.Scott@eu.citrix.com, anil@recoil.org, stefano.stabellini@eu.citrix.com, samuel.thibault@ens-lyon.org, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Fri, 2014-10-03 at 10:20 +0100, Thomas Leonard wrote: > Based on an initial patch by Karim Raslan. > > Signed-off-by: Karim Allah Ahmed > Signed-off-by: Thomas Leonard Acked-by: Ian Campbell > +/* Wall-clock time is not currently available on ARM, so this is always zero for now: > + * http://wiki.xenproject.org/wiki/Xen_ARM_TODO#Expose_Wallclock_time_to_guests I have some slightly hacky patches for this, I really should dust them off and submit them... > +void block_domain(s_time_t until) > +{ > + uint64_t until_count = ns_to_ticks(until) + cntvct_at_init; > + ASSERT(irqs_disabled()); > + if (read_virtual_count() < until_count) > + { > + set_vtimer_compare(until_count); > + __asm__ __volatile__("wfi"); > + unset_vtimer_compare(); > + > + /* Give the IRQ handler a chance to handle whatever woke us up. */ > + local_irq_enable(); > + local_irq_disable(); > + } Just wondering, is this not roughly equivalent to a wfi loop with interrupts enabled?