random32: update the net random state on interrupt and activity
[linux-2.6-microblaze.git] / drivers / char / random.c
index a7cf6aa..d20ba1b 100644 (file)
@@ -1277,6 +1277,7 @@ void add_interrupt_randomness(int irq, int irq_flags)
 
        fast_mix(fast_pool);
        add_interrupt_bench(cycles);
+       this_cpu_add(net_rand_state.s1, fast_pool->pool[cycles & 3]);
 
        if (unlikely(crng_init == 0)) {
                if ((fast_pool->count >= 64) &&
@@ -2087,7 +2088,7 @@ static int proc_do_uuid(struct ctl_table *table, int write,
  * Return entropy available scaled to integral bits
  */
 static int proc_do_entropy(struct ctl_table *table, int write,
-                          void __user *buffer, size_t *lenp, loff_t *ppos)
+                          void *buffer, size_t *lenp, loff_t *ppos)
 {
        struct ctl_table fake_table;
        int entropy_count;