Re: [PATCH] deinline sleep/delay functions

Russell King
2005-06-30T08:52:54Z

On Thu, Jun 30, 2005 at 08:52:25AM +0300, Denis Vlasenko wrote:
> Hi Andrew,
>
> Optimizing delay functions for speed is utterly pointless.
>
> This patch turns ssleep(n), mdelay(n), udelay(n) and ndelay(n)
> into functions, thus they generate the smallest possible code
> at the callsite. Previously they were more or less inlined.
>
> Run tested. Saved a few kb off vmlinux.
>
> Signed-off-by: Denis Vlasenko <vda@ilport.com.ua>

Rejected-by: Russell King 8)

The reason is that now we're unable to find out if anyone's doing
udelay(100000000000000000) which breaks on most architectures.

There are a number of compile-time checks that your patch has removed
which catch such things, and as such your patch is not acceptable.
Some architectures have a lower threshold of acceptability for the
maximum udelay value, so it's absolutely necessary to keep this.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core