summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-08-21 18:38:50 (GMT)
committerEmil Medve <Emilian.Medve@Freescale.com>2013-05-26 07:14:06 (GMT)
commit4755b2f208bec849f47c8f677e6862843c6805d6 (patch)
tree2c5c2cb6ebce288339357e5bb3b1816d47024ef6 /include
parent072d19ad75626e60c7aae6b0da2e78d879dc56ef (diff)
downloadlinux-fsl-qoriq-4755b2f208bec849f47c8f677e6862843c6805d6.tar.xz
random: Make it work on rt
Delegate the random insertion to the forced threaded interrupt handler. Store the return IP of the hard interrupt handler in the irq descriptor and feed it into the random generator as a source of entropy. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'include')
-rw-r--r--include/linux/irqdesc.h1
-rw-r--r--include/linux/random.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 623325e..a7edc47 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -52,6 +52,7 @@ struct irq_desc {
unsigned int irq_count; /* For detecting broken IRQs */
unsigned long last_unhandled; /* Aging timer for unhandled count */
unsigned int irqs_unhandled;
+ u64 random_ip;
raw_spinlock_t lock;
struct cpumask *percpu_enabled;
#ifdef CONFIG_SMP
diff --git a/include/linux/random.h b/include/linux/random.h
index d984608..f975382 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -12,7 +12,7 @@
extern void add_device_randomness(const void *, unsigned int);
extern void add_input_randomness(unsigned int type, unsigned int code,
unsigned int value);
-extern void add_interrupt_randomness(int irq, int irq_flags);
+extern void add_interrupt_randomness(int irq, int irq_flags, __u64 ip);
extern void get_random_bytes(void *buf, int nbytes);
extern void get_random_bytes_arch(void *buf, int nbytes);