From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqzJl-0000kK-6X for qemu-devel@nongnu.org; Mon, 03 Oct 2016 05:13:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqzJi-00007Q-TF for qemu-devel@nongnu.org; Mon, 03 Oct 2016 05:13:48 -0400 Date: Mon, 3 Oct 2016 14:43:33 +0530 (IST) From: P J P In-Reply-To: Message-ID: References: <1475054208-20288-1-git-send-email-ppandit@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH v2] timer: a9gtimer: check auto-increment register value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Qemu Developers , qemu-arm , Li Qiang 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