aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/random.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-11-23 03:04:05 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-11-23 03:04:05 -0500
commit92907cbbef8625bb3998d1eb385fc88f23c97a3f (patch)
tree15626ff9287e37c3cb81c7286d6db5a7fd77c854 /include/linux/random.h
parent15fbfccfe92c62ae8d1ecc647c44157ed01ac02e (diff)
parent1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff)
Merge tag 'v4.4-rc2' into drm-intel-next-queued
Linux 4.4-rc2 Backmerge to get at commit 1b0e3a049efe471c399674fd954500ce97438d30 Author: Imre Deak <imre.deak@intel.com> Date: Thu Nov 5 23:04:11 2015 +0200 drm/i915/skl: disable display side power well support for now so that we can proplery re-eanble skl power wells in -next. Conflicts are just adjacent lines changed, except for intel_fbdev.c where we need to interleave the changs. Nothing nefarious. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'include/linux/random.h')
-rw-r--r--include/linux/random.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/random.h b/include/linux/random.h
index e651874df2c9..a75840c1aa71 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -7,6 +7,8 @@
7#define _LINUX_RANDOM_H 7#define _LINUX_RANDOM_H
8 8
9#include <linux/list.h> 9#include <linux/list.h>
10#include <linux/once.h>
11
10#include <uapi/linux/random.h> 12#include <uapi/linux/random.h>
11 13
12struct random_ready_callback { 14struct random_ready_callback {
@@ -45,6 +47,10 @@ struct rnd_state {
45 47
46u32 prandom_u32_state(struct rnd_state *state); 48u32 prandom_u32_state(struct rnd_state *state);
47void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes); 49void prandom_bytes_state(struct rnd_state *state, void *buf, size_t nbytes);
50void prandom_seed_full_state(struct rnd_state __percpu *pcpu_state);
51
52#define prandom_init_once(pcpu_state) \
53 DO_ONCE(prandom_seed_full_state, (pcpu_state))
48 54
49/** 55/**
50 * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro) 56 * prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro)