summaryrefslogtreecommitdiffstats
path: root/patches/0130-cond-resched-softirq-fix.patch.patch
blob: 7a5a71e696510d9396af596285184ea42c5956c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From 47298e766a802bca93c2fffedf577ca1207b2ea7 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 14 Jul 2011 09:56:44 +0200
Subject: [PATCH 130/274] cond-resched-softirq-fix.patch

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 include/linux/sched.h |    4 ++++
 kernel/sched/core.c   |    2 ++
 2 files changed, 6 insertions(+)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3dc5b7c..ce14075 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2711,12 +2711,16 @@ extern int __cond_resched_lock(spinlock_t *lock);
 	__cond_resched_lock(lock);				\
 })
 
+#ifndef CONFIG_PREEMPT_RT_FULL
 extern int __cond_resched_softirq(void);
 
 #define cond_resched_softirq() ({					\
 	__might_sleep(__FILE__, __LINE__, SOFTIRQ_DISABLE_OFFSET);	\
 	__cond_resched_softirq();					\
 })
+#else
+# define cond_resched_softirq()		cond_resched()
+#endif
 
 /*
  * Does a critical section need to be broken due to another
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index e7bd476..2507257 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4742,6 +4742,7 @@ int __cond_resched_lock(spinlock_t *lock)
 }
 EXPORT_SYMBOL(__cond_resched_lock);
 
+#ifndef CONFIG_PREEMPT_RT_FULL
 int __sched __cond_resched_softirq(void)
 {
 	BUG_ON(!in_softirq());
@@ -4755,6 +4756,7 @@ int __sched __cond_resched_softirq(void)
 	return 0;
 }
 EXPORT_SYMBOL(__cond_resched_softirq);
+#endif
 
 /**
  * yield - yield the current processor to other threads.
-- 
1.7.10.4