summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2016-08-27 17:01:10 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2016-08-27 17:01:10 -0400
commit7cd48422b3e61ce22f9ed3d502bde49f34a7ce9b (patch)
treeaa6191aac9b33e2a99625dc900077acb444f3eff
parent81d794dda533001259374ed776b8cd098bd58648 (diff)
download4.8-rt-patches-7cd48422b3e61ce22f9ed3d502bde49f34a7ce9b.tar.gz
-rw-r--r--patches/random-make-it-work-on-rt.patch32
1 files changed, 19 insertions, 13 deletions
diff --git a/patches/random-make-it-work-on-rt.patch b/patches/random-make-it-work-on-rt.patch
index e114aa02abfe6f..3c02405b78b2cb 100644
--- a/patches/random-make-it-work-on-rt.patch
+++ b/patches/random-make-it-work-on-rt.patch
@@ -1,6 +1,7 @@
-Subject: random: Make it work on rt
+From 4cd401760fdfc392c1f4e35e314c60107756ec40 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 21 Aug 2012 20:38:50 +0200
+Subject: [PATCH] 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
@@ -9,17 +10,11 @@ entropy.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
----
- drivers/char/random.c | 11 +++++------
- include/linux/irqdesc.h | 1 +
- include/linux/random.h | 2 +-
- kernel/irq/handle.c | 8 +++++++-
- kernel/irq/manage.c | 6 ++++++
- 5 files changed, 20 insertions(+), 8 deletions(-)
-
+diff --git a/drivers/char/random.c b/drivers/char/random.c
+index 86400bde0a6f..ac2bd8c62de9 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
-@@ -891,28 +891,27 @@ static __u32 get_reg(struct fast_pool *f
+@@ -888,28 +888,27 @@ static __u32 get_reg(struct fast_pool *f, struct pt_regs *regs)
return *(ptr + f->reg_idx++);
}
@@ -53,6 +48,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
fast_mix(fast_pool);
add_interrupt_bench(cycles);
+diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
+index b51beebf9804..219d9824f762 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -64,6 +64,7 @@ struct irq_desc {
@@ -62,7 +59,9 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+ u64 random_ip;
raw_spinlock_t lock;
struct cpumask *percpu_enabled;
- #ifdef CONFIG_SMP
+ const struct cpumask *percpu_affinity;
+diff --git a/include/linux/random.h b/include/linux/random.h
+index 9c29122037f9..e7f2f8604918 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -20,7 +20,7 @@ struct random_ready_callback {
@@ -74,9 +73,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
extern void get_random_bytes(void *buf, int nbytes);
extern int add_random_ready_callback(struct random_ready_callback *rdy);
+diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
+index a15b5485b446..28c39c16f989 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
-@@ -134,6 +134,8 @@ void __irq_wake_thread(struct irq_desc *
+@@ -134,6 +134,8 @@ void __irq_wake_thread(struct irq_desc *desc, struct irqaction *action)
irqreturn_t handle_irq_event_percpu(struct irq_desc *desc)
{
@@ -85,7 +86,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
irqreturn_t retval = IRQ_NONE;
unsigned int flags = 0, irq = desc->irq_data.irq;
struct irqaction *action;
-@@ -174,7 +176,11 @@ irqreturn_t handle_irq_event_percpu(stru
+@@ -174,7 +176,11 @@ irqreturn_t handle_irq_event_percpu(struct irq_desc *desc)
retval |= res;
}
@@ -98,6 +99,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (!noirqdebug)
note_interrupt(desc, retval);
+diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
+index e2003da04b9e..2f9f271660a1 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1043,6 +1043,12 @@ static int irq_thread(void *data)
@@ -113,3 +116,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
wake_threads_waitq(desc);
}
+--
+2.5.0
+