summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-14 07:56:44 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:19:11 (GMT)
commit9cdcfaed714ae3fac60287e712017a4a64adb4f8 (patch)
treef4e63ada12e0a5e38a119aaa999b503c05388572
parent8a1275be207e70273c6170b24be2f553add716b4 (diff)
downloadlinux-fsl-qoriq-9cdcfaed714ae3fac60287e712017a4a64adb4f8.tar.xz
cond-resched-softirq-fix.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--include/linux/sched.h4
-rw-r--r--kernel/sched/core.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 51e84f0..a99e9e2 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2539,12 +2539,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 d9e3b58..3ec1cdc 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3954,6 +3954,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());
@@ -3967,6 +3968,7 @@ int __sched __cond_resched_softirq(void)
return 0;
}
EXPORT_SYMBOL(__cond_resched_softirq);
+#endif
/**
* yield - yield the current processor to other threads.