From 8ecc67c4d87f9ccdfef7138ea64c2cc297393081 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 14 Jul 2011 09:56:44 +0200
Subject: [PATCH 131/414] 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 b15697fd8a03..82f75ad53217 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2580,12 +2580,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
 
 static inline void cond_resched_rcu(void)
 {
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2656bbbb9d15..f84ae603de4e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4031,6 +4031,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());
@@ -4044,6 +4045,7 @@ int __sched __cond_resched_softirq(void)
 	return 0;
 }
 EXPORT_SYMBOL(__cond_resched_softirq);
+#endif
 
 /**
  * yield - yield the current processor to other threads.
-- 
2.10.2

