]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'arnds-jiffies-fix' into fortglx/3.7/time
authorJohn Stultz <john.stultz@linaro.org>
Fri, 28 Sep 2012 22:00:27 +0000 (18:00 -0400)
committerJohn Stultz <john.stultz@linaro.org>
Fri, 28 Sep 2012 22:00:27 +0000 (18:00 -0400)
Sort out conflict with Arnd's patch that preserves
the unconditional LATCH value.

Signed-off-by: John Stultz <john.stultz@linaro.org>
1  2 
include/linux/jiffies.h

index 388edb54bfb6a9e93812b59d42e3ba8fa2942321,44e389d8e8fdea7b26e7f84fbd511afc62d438c3..c6d5b2afdc96de23fdfbe0b1eac4257fd0b23942
  #define SH_DIV(NOM,DEN,LSH) (   (((NOM) / (DEN)) << (LSH))              \
                               + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN))
  
 -#ifdef CLOCK_TICK_RATE
 -
 -/*
 - * HZ is the requested value. However the CLOCK_TICK_RATE may not allow
 - * for exactly HZ. So SHIFTED_HZ is high res HZ ("<< 8" is for accuracy)
 - */
 -# define SHIFTED_HZ (SH_DIV(CLOCK_TICK_RATE, LATCH, 8))
 -#else
 -# define SHIFTED_HZ (HZ << 8)
 -#endif
+ /* LATCH is used in the interval timer and ftape setup. */
+ #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */
 +extern int register_refined_jiffies(long clock_tick_rate);
  
  /* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */
 -#define TICK_NSEC (SH_DIV(1000000UL * 1000, SHIFTED_HZ, 8))
 +#define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ)
  
  /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */
  #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ)