qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: P J P <ppandit@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Qemu Developers <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>, Li Qiang <liqiang6-s@360.cn>
Subject: Re: [Qemu-devel] [PATCH v2] timer: a9gtimer: check auto-increment register value
Date: Mon, 3 Oct 2016 14:43:33 +0530 (IST)	[thread overview]
Message-ID: <alpine.LFD.2.20.1610031435080.21013@wniryva> (raw)
In-Reply-To: <CAFEAcA85-XdSaOYTWr2=JQVt+EBsmrSq-5QcbWe8hrSW0qZ7xA@mail.gmail.com>

  Hello Peter,

+-- On Sun, 2 Oct 2016, Peter Maydell wrote --+
| The timer can't autoincrement by more than a 32 bit value, but
| the timer value is 64 bits, and since this code may be doing more than
| one autoincrement it's better to use 64 bits.

  Okay.

| If in doubt, you need to check the datasheet/technical reference manual for 
| the hardware, in this case 
| http://infocenter.arm.com/help/topic/com.arm.doc.100486_0401_10_en/ada1443777319205.html 
| Zero is a valid value for the auto-increment register, and in fact it is the 
| documented reset value.

  Yes, I was following the same. It does mention zero as a valid reset value, 
but does not mention about value to be writen to Timer Load Register. As in, 
when user attempts to write to a register. 
 
| gtb->status should be set whenever the timer comparator
| fires, whether we are auto-incrementing or not, and
| whatever the value of the auto-increment register is.
| It is the "timer matched" interrupt output. (Your current
| patch is wrong in that it has moved setting gtb->status
| into the wrong place, as I mentioned above.)

  Done; I've sent a revised patch v3.

Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

      reply	other threads:[~2016-10-03  9:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  9:16 [Qemu-devel] [PATCH v2] timer: a9gtimer: check auto-increment register value P J P
2016-09-30 17:30 ` Peter Maydell
2016-10-02  6:15   ` P J P
2016-10-02 14:58     ` Peter Maydell
2016-10-03  9:13       ` P J P [this message]

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=alpine.LFD.2.20.1610031435080.21013@wniryva \
    --to=ppandit@redhat.com \
    --cc=liqiang6-s@360.cn \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.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).