Merge branch 'locking/urgent' into locking/core, to pick up fixes
[linux-2.6-microblaze.git] / lib / random32.c
index 3d749ab..dfb9981 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/random.h>
 #include <linux/sched.h>
 #include <asm/unaligned.h>
+#include <trace/events/random.h>
 
 #ifdef CONFIG_RANDOM32_SELFTEST
 static void __init prandom_state_selftest(void);
@@ -48,7 +49,7 @@ static inline void prandom_state_selftest(void)
 }
 #endif
 
-DEFINE_PER_CPU(struct rnd_state, net_rand_state);
+DEFINE_PER_CPU(struct rnd_state, net_rand_state)  __latent_entropy;
 
 /**
  *     prandom_u32_state - seeded pseudo-random number generator.
@@ -82,6 +83,7 @@ u32 prandom_u32(void)
        u32 res;
 
        res = prandom_u32_state(state);
+       trace_prandom_u32(res);
        put_cpu_var(net_rand_state);
 
        return res;