|
@@ -634,43 +634,6 @@ struct timer_rand_state {
|
|
|
unsigned dont_count_entropy:1;
|
|
|
};
|
|
|
|
|
|
-#ifndef CONFIG_GENERIC_HARDIRQS
|
|
|
-
|
|
|
-static struct timer_rand_state *irq_timer_state[NR_IRQS];
|
|
|
-
|
|
|
-static struct timer_rand_state *get_timer_rand_state(unsigned int irq)
|
|
|
-{
|
|
|
- return irq_timer_state[irq];
|
|
|
-}
|
|
|
-
|
|
|
-static void set_timer_rand_state(unsigned int irq,
|
|
|
- struct timer_rand_state *state)
|
|
|
-{
|
|
|
- irq_timer_state[irq] = state;
|
|
|
-}
|
|
|
-
|
|
|
-#else
|
|
|
-
|
|
|
-static struct timer_rand_state *get_timer_rand_state(unsigned int irq)
|
|
|
-{
|
|
|
- struct irq_desc *desc;
|
|
|
-
|
|
|
- desc = irq_to_desc(irq);
|
|
|
-
|
|
|
- return desc->timer_rand_state;
|
|
|
-}
|
|
|
-
|
|
|
-static void set_timer_rand_state(unsigned int irq,
|
|
|
- struct timer_rand_state *state)
|
|
|
-{
|
|
|
- struct irq_desc *desc;
|
|
|
-
|
|
|
- desc = irq_to_desc(irq);
|
|
|
-
|
|
|
- desc->timer_rand_state = state;
|
|
|
-}
|
|
|
-#endif
|
|
|
-
|
|
|
/*
|
|
|
* Add device- or boot-specific data to the input and nonblocking
|
|
|
* pools to help initialize them to unique values.
|
|
@@ -1133,24 +1096,6 @@ static int rand_initialize(void)
|
|
|
}
|
|
|
module_init(rand_initialize);
|
|
|
|
|
|
-void rand_initialize_irq(int irq)
|
|
|
-{
|
|
|
- struct timer_rand_state *state;
|
|
|
-
|
|
|
- state = get_timer_rand_state(irq);
|
|
|
-
|
|
|
- if (state)
|
|
|
- return;
|
|
|
-
|
|
|
- /*
|
|
|
- * If kzalloc returns null, we just won't use that entropy
|
|
|
- * source.
|
|
|
- */
|
|
|
- state = kzalloc(sizeof(struct timer_rand_state), GFP_KERNEL);
|
|
|
- if (state)
|
|
|
- set_timer_rand_state(irq, state);
|
|
|
-}
|
|
|
-
|
|
|
#ifdef CONFIG_BLOCK
|
|
|
void rand_initialize_disk(struct gendisk *disk)
|
|
|
{
|