From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Mon, 23 May 2011 22:32:00 +1000 Subject: [U-Boot] [PATCH] [Timer]Remove calls to [get, reset]_timer outside arch/ In-Reply-To: <4DDA50D8.6060601@psyent.com> References: <1306151649-25640-1-git-send-email-graeme.russ@gmail.com> <4DDA50D8.6060601@psyent.com> Message-ID: <4DDA53C0.9090508@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 23/05/11 22:19, Scott McNutt wrote: > Hi Graeme, > > Graeme Russ wrote: >> There is no need to use get_timer() and reset_timer() and there are build > > I must have missed something WRT reset_timer() -- my apologies > if I'm covering old ground. > > When the timestamp is incremented using an interrupt that occurs with > a period greater than 1 ms, we can get early timeouts. reset_timer() > solved the problem. What's the recommended approach for dealing with > this without reset_timer() ? > There is an active thread on the timer API right now. Short answer - The API is broken - Calling reset_timer() is not the right solution because: a) It breaks recursive or nested timing loops b) For some arches, udelay() has a side-effect as well All this needs fixing Regards, Graeme