summaryrefslogtreecommitdiff
path: root/include/linux/timex.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-20 00:02:47 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-20 00:02:47 +0400
commitdfc568e6bc08916f1035af456e4631c47166b5cf (patch)
tree3c96bdc26687e0f6958e790c8c93c0c6efb6b8d6 /include/linux/timex.h
parentfdf91dae6f024c6dfee425fe754df6b1957f6c53 (diff)
parent31d141e3a666269a3b6fcccddb0351caf7454240 (diff)
downloadlinux-dfc568e6bc08916f1035af456e4631c47166b5cf.tar.xz
Merge 3.12-rc6 into char-misc-next
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/timex.h')
-rw-r--r--include/linux/timex.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/timex.h b/include/linux/timex.h
index dd3edd7dfc94..9d3f1a5b6178 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -64,6 +64,20 @@
#include <asm/timex.h>
+#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.