summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-11-09 13:29:39 -0500
committerDan Williams <dan.j.williams@intel.com>2015-11-09 13:29:39 -0500
commit85ce230051c37dfb979385eb0244bf3655625ba6 (patch)
tree90abeab25f8c1ea4836b38279790b90f0c780ae3 /kernel
parent538ea4aa44737127ce2b5c8511c7349d2abdcf9c (diff)
parent209851649dc4f7900a6bfe1de5e2640ab2c7d931 (diff)
Merge branch 'for-4.4/hotplug' into libnvdimm-for-next
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/handle.c2
-rw-r--r--kernel/irq/msi.c6
-rw-r--r--kernel/sched/core.c10
-rw-r--r--kernel/sched/sched.h5
-rw-r--r--kernel/time/timekeeping.c2
-rw-r--r--kernel/workqueue.c8
6 files changed, 15 insertions, 18 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index de41a68fc038..e25a83b67cce 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -22,7 +22,6 @@
22 22
23/** 23/**
24 * handle_bad_irq - handle spurious and unhandled irqs 24 * handle_bad_irq - handle spurious and unhandled irqs
25 * @irq: the interrupt number
26 * @desc: description of the interrupt 25 * @desc: description of the interrupt
27 * 26 *
28 * Handles spurious and unhandled IRQ's. It also prints a debugmessage. 27 * Handles spurious and unhandled IRQ's. It also prints a debugmessage.
@@ -35,6 +34,7 @@ void handle_bad_irq(struct irq_desc *desc)
35 kstat_incr_irqs_this_cpu(desc); 34 kstat_incr_irqs_this_cpu(desc);
36 ack_bad_irq(irq); 35 ack_bad_irq(irq);
37} 36}
37EXPORT_SYMBOL_GPL(handle_bad_irq);
38 38
39/* 39/*
40 * Special, empty irq handler: 40 * Special, empty irq handler:
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index 7e6512b9dc1f..be9149f62eb8 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -228,11 +228,7 @@ static void msi_domain_update_chip_ops(struct msi_domain_info *info)
228{ 228{
229 struct irq_chip *chip = info->chip; 229 struct irq_chip *chip = info->chip;
230 230
231 BUG_ON(!chip); 231 BUG_ON(!chip || !chip->irq_mask || !chip->irq_unmask);
232 if (!chip->irq_mask)
233 chip->irq_mask = pci_msi_mask_irq;
234 if (!chip->irq_unmask)
235 chip->irq_unmask = pci_msi_unmask_irq;
236 if (!chip->irq_set_affinity) 232 if (!chip->irq_set_affinity)
237 chip->irq_set_affinity = msi_domain_set_affinity; 233 chip->irq_set_affinity = msi_domain_set_affinity;
238} 234}
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 615953141951..10a8faa1b0d4 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2517,11 +2517,11 @@ static struct rq *finish_task_switch(struct task_struct *prev)
2517 * If a task dies, then it sets TASK_DEAD in tsk->state and calls 2517 * If a task dies, then it sets TASK_DEAD in tsk->state and calls
2518 * schedule one last time. The schedule call will never return, and 2518 * schedule one last time. The schedule call will never return, and
2519 * the scheduled task must drop that reference. 2519 * the scheduled task must drop that reference.
2520 * The test for TASK_DEAD must occur while the runqueue locks are 2520 *
2521 * still held, otherwise prev could be scheduled on another cpu, die 2521 * We must observe prev->state before clearing prev->on_cpu (in
2522 * there before we look at prev->state, and then the reference would 2522 * finish_lock_switch), otherwise a concurrent wakeup can get prev
2523 * be dropped twice. 2523 * running on another CPU and we could rave with its RUNNING -> DEAD
2524 * Manfred Spraul <manfred@colorfullife.com> 2524 * transition, resulting in a double drop.
2525 */ 2525 */
2526 prev_state = prev->state; 2526 prev_state = prev->state;
2527 vtime_task_switch(prev); 2527 vtime_task_switch(prev);
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 68cda117574c..6d2a119c7ad9 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1078,9 +1078,10 @@ static inline void finish_lock_switch(struct rq *rq, struct task_struct *prev)
1078 * After ->on_cpu is cleared, the task can be moved to a different CPU. 1078 * After ->on_cpu is cleared, the task can be moved to a different CPU.
1079 * We must ensure this doesn't happen until the switch is completely 1079 * We must ensure this doesn't happen until the switch is completely
1080 * finished. 1080 * finished.
1081 *
1082 * Pairs with the control dependency and rmb in try_to_wake_up().
1081 */ 1083 */
1082 smp_wmb(); 1084 smp_store_release(&prev->on_cpu, 0);
1083 prev->on_cpu = 0;
1084#endif 1085#endif
1085#ifdef CONFIG_DEBUG_SPINLOCK 1086#ifdef CONFIG_DEBUG_SPINLOCK
1086 /* this is a valid case when another task releases the spinlock */ 1087 /* this is a valid case when another task releases the spinlock */
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 3739ac6aa473..44d2cc0436f4 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -1251,7 +1251,7 @@ void __init timekeeping_init(void)
1251 set_normalized_timespec64(&tmp, -boot.tv_sec, -boot.tv_nsec); 1251 set_normalized_timespec64(&tmp, -boot.tv_sec, -boot.tv_nsec);
1252 tk_set_wall_to_mono(tk, tmp); 1252 tk_set_wall_to_mono(tk, tmp);
1253 1253
1254 timekeeping_update(tk, TK_MIRROR); 1254 timekeeping_update(tk, TK_MIRROR | TK_CLOCK_WAS_SET);
1255 1255
1256 write_seqcount_end(&tk_core.seq); 1256 write_seqcount_end(&tk_core.seq);
1257 raw_spin_unlock_irqrestore(&timekeeper_lock, flags); 1257 raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index ca71582fcfab..bcb14cafe007 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1458,13 +1458,13 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
1458 timer_stats_timer_set_start_info(&dwork->timer); 1458 timer_stats_timer_set_start_info(&dwork->timer);
1459 1459
1460 dwork->wq = wq; 1460 dwork->wq = wq;
1461 /* timer isn't guaranteed to run in this cpu, record earlier */
1462 if (cpu == WORK_CPU_UNBOUND)
1463 cpu = raw_smp_processor_id();
1461 dwork->cpu = cpu; 1464 dwork->cpu = cpu;
1462 timer->expires = jiffies + delay; 1465 timer->expires = jiffies + delay;
1463 1466
1464 if (unlikely(cpu != WORK_CPU_UNBOUND)) 1467 add_timer_on(timer, cpu);
1465 add_timer_on(timer, cpu);
1466 else
1467 add_timer(timer);
1468} 1468}
1469 1469
1470/** 1470/**