aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-09 22:30:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-09 22:30:17 -0400
commite5149cc44cf9c5e23fbe34515fc6b4b91c0e48c4 (patch)
treef6c3c7401f827d91d77702cb2177d3c4fa0e625d
parent45d7f32c7a43cbb9592886d38190e379e2eb2226 (diff)
parent9a919c46dfa48a9c1f465174609b90253eb8ffc1 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: drm: fix fallouts from slow-work -> wq conversion workqueue: workqueue_cpu_callback() should be cpu_notifier instead of hotcpu_notifier workqueue: add missing __percpu markup in kernel/workqueue.c
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c16
-rw-r--r--kernel/workqueue.c4
2 files changed, 6 insertions, 14 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 45981304feb8..b9e4dbfa0533 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -839,7 +839,6 @@ static void output_poll_execute(struct work_struct *work)
839 struct drm_connector *connector; 839 struct drm_connector *connector;
840 enum drm_connector_status old_status, status; 840 enum drm_connector_status old_status, status;
841 bool repoll = false, changed = false; 841 bool repoll = false, changed = false;
842 int ret;
843 842
844 mutex_lock(&dev->mode_config.mutex); 843 mutex_lock(&dev->mode_config.mutex);
845 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 844 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
@@ -874,11 +873,8 @@ static void output_poll_execute(struct work_struct *work)
874 dev->mode_config.funcs->output_poll_changed(dev); 873 dev->mode_config.funcs->output_poll_changed(dev);
875 } 874 }
876 875
877 if (repoll) { 876 if (repoll)
878 ret = queue_delayed_work(system_nrt_wq, delayed_work, DRM_OUTPUT_POLL_PERIOD); 877 queue_delayed_work(system_nrt_wq, delayed_work, DRM_OUTPUT_POLL_PERIOD);
879 if (ret)
880 DRM_ERROR("delayed enqueue failed %d\n", ret);
881 }
882} 878}
883 879
884void drm_kms_helper_poll_disable(struct drm_device *dev) 880void drm_kms_helper_poll_disable(struct drm_device *dev)
@@ -893,18 +889,14 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
893{ 889{
894 bool poll = false; 890 bool poll = false;
895 struct drm_connector *connector; 891 struct drm_connector *connector;
896 int ret;
897 892
898 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 893 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
899 if (connector->polled) 894 if (connector->polled)
900 poll = true; 895 poll = true;
901 } 896 }
902 897
903 if (poll) { 898 if (poll)
904 ret = queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD); 899 queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD);
905 if (ret)
906 DRM_ERROR("delayed enqueue failed %d\n", ret);
907 }
908} 900}
909EXPORT_SYMBOL(drm_kms_helper_poll_enable); 901EXPORT_SYMBOL(drm_kms_helper_poll_enable);
910 902
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 9ca34cddaf6d..2994a0e3a61c 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2568,7 +2568,7 @@ EXPORT_SYMBOL(schedule_delayed_work_on);
2568int schedule_on_each_cpu(work_func_t func) 2568int schedule_on_each_cpu(work_func_t func)
2569{ 2569{
2570 int cpu; 2570 int cpu;
2571 struct work_struct *works; 2571 struct work_struct __percpu *works;
2572 2572
2573 works = alloc_percpu(struct work_struct); 2573 works = alloc_percpu(struct work_struct);
2574 if (!works) 2574 if (!works)
@@ -3527,7 +3527,7 @@ static int __init init_workqueues(void)
3527 unsigned int cpu; 3527 unsigned int cpu;
3528 int i; 3528 int i;
3529 3529
3530 hotcpu_notifier(workqueue_cpu_callback, CPU_PRI_WORKQUEUE); 3530 cpu_notifier(workqueue_cpu_callback, CPU_PRI_WORKQUEUE);
3531 3531
3532 /* initialize gcwqs */ 3532 /* initialize gcwqs */
3533 for_each_gcwq_cpu(cpu) { 3533 for_each_gcwq_cpu(cpu) {