diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-10-30 09:35:29 -0700 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-10-30 09:35:29 -0700 |
commit | 016f484f9176bb50a279a08a133f2ab191f51e60 (patch) | |
tree | 5f347b0191a60a73a2828735c5d0d36bd91e8a8a /kernel | |
parent | 698d0a9bb80d94adef58122717c61f55dd61e22d (diff) | |
parent | 10f9e3bce7f3ab7ab4d09a9b78c7208c9a1455f7 (diff) |
Merge tag 'v4.1.12' into toradex_vf_4.1-next
This is the 4.1.12 stable release
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 6 | ||||
-rw-r--r-- | kernel/workqueue.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 8476206a1e19..4d870eb6086b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -4232,7 +4232,7 @@ SYSCALL_DEFINE0(sched_yield) int __sched _cond_resched(void) { - if (should_resched()) { + if (should_resched(0)) { preempt_schedule_common(); return 1; } @@ -4250,7 +4250,7 @@ EXPORT_SYMBOL(_cond_resched); */ int __cond_resched_lock(spinlock_t *lock) { - int resched = should_resched(); + int resched = should_resched(PREEMPT_LOCK_OFFSET); int ret = 0; lockdep_assert_held(lock); @@ -4272,7 +4272,7 @@ int __sched __cond_resched_softirq(void) { BUG_ON(!in_softirq()); - if (should_resched()) { + if (should_resched(SOFTIRQ_DISABLE_OFFSET)) { local_bh_enable(); preempt_schedule_common(); local_bh_disable(); diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 586ad91300b0..5c01664c26e2 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1451,13 +1451,13 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq, timer_stats_timer_set_start_info(&dwork->timer); dwork->wq = wq; + /* timer isn't guaranteed to run in this cpu, record earlier */ + if (cpu == WORK_CPU_UNBOUND) + cpu = raw_smp_processor_id(); dwork->cpu = cpu; timer->expires = jiffies + delay; - if (unlikely(cpu != WORK_CPU_UNBOUND)) - add_timer_on(timer, cpu); - else - add_timer(timer); + add_timer_on(timer, cpu); } /** |