Re: [PATCH] ARC: Fix __udelay parentheses

From: Vineet Gupta
Date: Thu Aug 29 2013 - 02:49:28 EST


On 08/29/2013 12:07 PM, Joe Perches wrote:
>> On the topic of multiply vs. divide (which probably is not relevant to topic at
>> hand though), since ARCompact doesn't have native divide, we end up emulating it
>> using libgcc routines. That makes it slightly non-deterministic (not a big deal)
>> and also adds to boot time (which those delays sprinkled all over the place in
>> crazy device probes and such). Seriously we got hammered by a customer for that once.
> That argues more for reducing the uses of hard delays
> than making the hard delay count calculation simpler.

Right, but most often the drivers are written/maintained by non arch people.

I'm with you in terms of simplification and I think the following

loops = ((u64)usecs * 4295 * HZ * loops_per_jiffy) >> 32;

is fairly simple, well commented, and optimal for ARC.

-Vineet
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/