From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Cc: tim@xen.org, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH] xen: arm: vtimer fixes for arm64
Date: Fri, 06 Dec 2013 16:30:25 +0000 [thread overview]
Message-ID: <52A1FBA1.7060402@linaro.org> (raw)
In-Reply-To: <1386248297-16577-1-git-send-email-ian.campbell@citrix.com>
On 12/05/2013 12:58 PM, Ian Campbell wrote:
> The code was writing back the register, even for writes and didn't implement
> CNTPCT at all.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> xen/arch/arm/vtimer.c | 51 ++++++++++++++++++++++++++++++++++---------------
> 1 file changed, 36 insertions(+), 15 deletions(-)
>
> diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
> index f323453..dcda2b2 100644
> --- a/xen/arch/arm/vtimer.c
> +++ b/xen/arch/arm/vtimer.c
> @@ -165,6 +165,27 @@ static void vtimer_cntp_tval(struct cpu_user_regs *regs, uint32_t *r, int read)
> }
> }
>
> +static int vtimer_cntpct(struct cpu_user_regs *regs, uint64_t *r, int read)
> +{
> + struct vcpu *v = current;
> + uint64_t ticks;
> + s_time_t now;
> +
> + if ( read )
> + {
> + now = NOW() - v->domain->arch.phys_timer_base.offset;
> + ticks = ns_to_ticks(now);
> + *r = ticks;
> + return 1;
> + }
> + else
> + {
> + gdprintk(XENLOG_DEBUG, "READ from R/O CNTPCT\n");
s/READ/WRITE/ ?
Except this minor typo:
Acked-by: Julien Grall <julien.grall@linaro.org>
--
Julien Grall
next prev parent reply other threads:[~2013-12-06 16:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 12:58 [PATCH] xen: arm: vtimer fixes for arm64 Ian Campbell
2013-12-06 16:30 ` Julien Grall [this message]
2013-12-06 17:06 ` Ian Campbell
2013-12-06 17:38 ` Stefano Stabellini
2013-12-06 17:42 ` Ian Campbell
2013-12-06 17:49 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52A1FBA1.7060402@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).