[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [PATCH 34/40] arm64: implement the timer helpers for arm64
On Mon, Nov 06, 2017 at 05:51:58PM +0000, Julien Grall wrote: > Hi Shijie, > > On 03/11/17 03:12, Huang Shijie wrote: > > Implement the timer helpers: > > read_virtual_count/write_timer_ctl/set_vtimer_compare(empty) > > > > Change-Id: I8ec2bd775f726e93ee9bcf24239c610e4bccfbe5 > > Jira: ENTOS-247 > > Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx> > > --- > > arch/arm/time.c | 14 ++++++++++++++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/arch/arm/time.c b/arch/arm/time.c > > index 0e68a4f..32d9c59 100644 > > --- a/arch/arm/time.c > > +++ b/arch/arm/time.c > > @@ -58,9 +58,15 @@ static struct timespec shadow_ts; > > static inline uint64_t read_virtual_count(void) > > { > > +#if defined(__arm__) > > uint32_t c_lo, c_hi; > > __asm__ __volatile__("mrrc p15, 1, %0, %1, c14":"=r"(c_lo), > > "=r"(c_hi)); > > return (((uint64_t) c_hi) << 32) + c_lo; > > +#elif defined(__aarch64__) > > + uint64_t c; > > + __asm__ __volatile__("mrs %0, cntvct_el0":"=r"(c)); > > + return c; > > +#endif > > I think it is time to introduce helpers reading a > system-register/co-processors. This will be much nicer to read that code and > make the code fairly common. okay. You will see them in next version.. Thanks Huang Shijie _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |