X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Ftimex.h;h=5fee575ebccfb163fcdb63ec4404119f090a1e99;hb=916446829c46be4a17a578941551428f841d2a05;hp=aa60fe7b6ed646f623253c24403e233654d71025;hpb=071c7783479ac3beb09a21e74305a4f6af1e68d6;p=pandora-kernel.git diff --git a/include/linux/timex.h b/include/linux/timex.h index aa60fe7b6ed6..5fee575ebccf 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -173,6 +173,20 @@ struct timex { #include +#ifndef random_get_entropy +/* + * The random_get_entropy() function is used by the /dev/random driver + * in order to extract entropy via the relative unpredictability of + * when an interrupt takes places versus a high speed, fine-grained + * timing source or cycle counter. Since it will be occurred on every + * single interrupt, it must have a very low cost/overhead. + * + * By default we use get_cycles() for this purpose, but individual + * architectures may override this in their asm/timex.h header file. + */ +#define random_get_entropy() get_cycles() +#endif + /* * SHIFT_PLL is used as a dampening factor to define how much we * adjust the frequency correction for a given offset in PLL mode. @@ -266,7 +280,7 @@ static inline int ntp_synced(void) /* Returns how long ticks are at present, in ns / 2^NTP_SCALE_SHIFT. */ extern u64 tick_length; -extern void second_overflow(void); +extern int second_overflow(unsigned long secs); extern void update_ntp_one_tick(void); extern int do_adjtimex(struct timex *); extern void hardpps(const struct timespec *, const struct timespec *);