summaryrefslogtreecommitdiffstats
path: root/include/linux/timex.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-15 07:05:06 +0200
committerIngo Molnar <mingo@kernel.org>2013-10-15 07:05:18 +0200
commit426ee9e3bbc478ed9c0a079a4270f6095f0eb975 (patch)
treed8f295e2e516a61b2ab8ccb49f5b1d9fb67979bd /include/linux/timex.h
parentb7af41a1bc255c0098c37a4bcf5c7e5e168ce875 (diff)
parent61e6cfa80de5760bbe406f4e815b7739205754d2 (diff)
Merge tag 'v3.12-rc5' into perf/core
Merge Linux v3.12-rc5, to pick up the latest fixes. Signed-off-by: Ingo Molnar <mingo@kernel.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 dd3edd7dfc9..9d3f1a5b617 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.