From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: ARM, time: alternative of using udelay() before init time Date: Mon, 20 Oct 2014 13:30:17 +0100 Message-ID: <54450059.1080208@linaro.org> References: <54411282.7000204@linaro.org> <54414241.9050901@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Oleksandr Tyshchenko Cc: Stefano Stabellini , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Hi Oleksandr, On 10/20/2014 11:12 AM, Oleksandr Tyshchenko wrote: > On Fri, Oct 17, 2014 at 7:22 PM, Julien Grall wrote: >> >> I'm wondering how Linux deal with the time when the timer is not >> initialized? > > If I understood correctly the udelay() can works before timer initialized. I gave a look to the Linux code and it looks like they have an implementation based on jiffies to used when the timer is not initialized. (see __loop_udelay in arch/arm/lib/delay.c). I'm not sure if it's relevant to do exactly the same. But we could implement a loop-based udelay when the timer is not correctly initialized. Regards, -- Julien Grall