Re: [PATCH] Provide u64 version of jiffies_to_usecs() in kernel/tsacct.c

From: Roman Zippel
Date: Wed Mar 12 2008 - 19:53:42 EST


Hi,

On Monday 25. February 2008, Jonathan Lim wrote:

> +u64 jiffies_64_to_usecs(const u64 j)
> +{
> + return div64_64(j*HZ_TO_USEC_NUM + HZ_TO_USEC_DEN-1, HZ_TO_USEC_DEN);
> +}
> +EXPORT_SYMBOL(jiffies_64_to_usecs);

Please also adapt the "BITS_PER_LONG == 32" part from jiffies_to_usecs(), it
should provide enough resolution to avoid the div64_64() here.

bye, Roman
--
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/