aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched/core.c2
-rw-r--r--kernel/workqueue.c9
-rw-r--r--kernel/workqueue_internal.h2
3 files changed, 6 insertions, 7 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ea8f49ae0062..4edecc15177d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3174,7 +3174,7 @@ static void __sched notrace __schedule(bool preempt)
3174 if (prev->flags & PF_WQ_WORKER) { 3174 if (prev->flags & PF_WQ_WORKER) {
3175 struct task_struct *to_wakeup; 3175 struct task_struct *to_wakeup;
3176 3176
3177 to_wakeup = wq_worker_sleeping(prev, cpu); 3177 to_wakeup = wq_worker_sleeping(prev);
3178 if (to_wakeup) 3178 if (to_wakeup)
3179 try_to_wake_up_local(to_wakeup); 3179 try_to_wake_up_local(to_wakeup);
3180 } 3180 }
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 16e13d8628a3..2232ae3e3ad6 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -857,7 +857,6 @@ void wq_worker_waking_up(struct task_struct *task, int cpu)
857/** 857/**
858 * wq_worker_sleeping - a worker is going to sleep 858 * wq_worker_sleeping - a worker is going to sleep
859 * @task: task going to sleep 859 * @task: task going to sleep
860 * @cpu: CPU in question, must be the current CPU number
861 * 860 *
862 * This function is called during schedule() when a busy worker is 861 * This function is called during schedule() when a busy worker is
863 * going to sleep. Worker on the same cpu can be woken up by 862 * going to sleep. Worker on the same cpu can be woken up by
@@ -869,7 +868,7 @@ void wq_worker_waking_up(struct task_struct *task, int cpu)
869 * Return: 868 * Return:
870 * Worker task on @cpu to wake up, %NULL if none. 869 * Worker task on @cpu to wake up, %NULL if none.
871 */ 870 */
872struct task_struct *wq_worker_sleeping(struct task_struct *task, int cpu) 871struct task_struct *wq_worker_sleeping(struct task_struct *task)
873{ 872{
874 struct worker *worker = kthread_data(task), *to_wakeup = NULL; 873 struct worker *worker = kthread_data(task), *to_wakeup = NULL;
875 struct worker_pool *pool; 874 struct worker_pool *pool;
@@ -885,7 +884,7 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task, int cpu)
885 pool = worker->pool; 884 pool = worker->pool;
886 885
887 /* this can only happen on the local cpu */ 886 /* this can only happen on the local cpu */
888 if (WARN_ON_ONCE(cpu != raw_smp_processor_id() || pool->cpu != cpu)) 887 if (WARN_ON_ONCE(pool->cpu != raw_smp_processor_id()))
889 return NULL; 888 return NULL;
890 889
891 /* 890 /*
@@ -4695,7 +4694,7 @@ static void work_for_cpu_fn(struct work_struct *work)
4695} 4694}
4696 4695
4697/** 4696/**
4698 * work_on_cpu - run a function in user context on a particular cpu 4697 * work_on_cpu - run a function in thread context on a particular cpu
4699 * @cpu: the cpu to run on 4698 * @cpu: the cpu to run on
4700 * @fn: the function to run 4699 * @fn: the function to run
4701 * @arg: the function arg 4700 * @arg: the function arg
@@ -5221,8 +5220,8 @@ int workqueue_sysfs_register(struct workqueue_struct *wq)
5221 5220
5222 wq_dev->wq = wq; 5221 wq_dev->wq = wq;
5223 wq_dev->dev.bus = &wq_subsys; 5222 wq_dev->dev.bus = &wq_subsys;
5224 wq_dev->dev.init_name = wq->name;
5225 wq_dev->dev.release = wq_device_release; 5223 wq_dev->dev.release = wq_device_release;
5224 dev_set_name(&wq_dev->dev, "%s", wq->name);
5226 5225
5227 /* 5226 /*
5228 * unbound_attrs are created separately. Suppress uevent until 5227 * unbound_attrs are created separately. Suppress uevent until
diff --git a/kernel/workqueue_internal.h b/kernel/workqueue_internal.h
index 45215870ac6c..8635417c587b 100644
--- a/kernel/workqueue_internal.h
+++ b/kernel/workqueue_internal.h
@@ -69,6 +69,6 @@ static inline struct worker *current_wq_worker(void)
69 * sched/core.c and workqueue.c. 69 * sched/core.c and workqueue.c.
70 */ 70 */
71void wq_worker_waking_up(struct task_struct *task, int cpu); 71void wq_worker_waking_up(struct task_struct *task, int cpu);
72struct task_struct *wq_worker_sleeping(struct task_struct *task, int cpu); 72struct task_struct *wq_worker_sleeping(struct task_struct *task);
73 73
74#endif /* _KERNEL_WORKQUEUE_INTERNAL_H */ 74#endif /* _KERNEL_WORKQUEUE_INTERNAL_H */