diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/drm_crtc_helper.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_drv.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_irq.c | 18 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_display.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_dp.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/intel_pm.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/evergreen.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/r100.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/r600.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_display.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_pm.c | 14 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/rs600.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/radeon/si.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/ttm/ttm_bo.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/vmwpvs.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_task.c | 12 | ||||
-rw-r--r-- | sys/sys/task.h | 5 |
17 files changed, 62 insertions, 65 deletions
diff --git a/sys/dev/pci/drm/drm_crtc_helper.c b/sys/dev/pci/drm/drm_crtc_helper.c index 1dec408a87b..f35d44f80e5 100644 --- a/sys/dev/pci/drm/drm_crtc_helper.c +++ b/sys/dev/pci/drm/drm_crtc_helper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_crtc_helper.c,v 1.4 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: drm_crtc_helper.c,v 1.5 2013/10/30 02:11:32 dlg Exp $ */ /* * Copyright (c) 2006-2008 Intel Corporation * Copyright (c) 2007 Dave Airlie <airlied@linux.ie> @@ -1023,7 +1023,7 @@ drm_output_poll_tick(void *arg) { struct drm_device *dev = arg; - task_add(taskq_systq(), &dev->mode_config.poll_task); + task_add(systq, &dev->mode_config.poll_task); } void drm_kms_helper_poll_disable(struct drm_device *dev) @@ -1031,7 +1031,7 @@ void drm_kms_helper_poll_disable(struct drm_device *dev) if (!dev->mode_config.poll_enabled) return; timeout_del(&dev->mode_config.output_poll_to); - task_del(taskq_systq(), &dev->mode_config.poll_task); + task_del(systq, &dev->mode_config.poll_task); } EXPORT_SYMBOL(drm_kms_helper_poll_disable); diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c index b382e9f6fe9..2248dae1211 100644 --- a/sys/dev/pci/drm/i915/i915_drv.c +++ b/sys/dev/pci/drm/i915/i915_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.c,v 1.43 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: i915_drv.c,v 1.44 2013/10/30 02:11:32 dlg Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -497,7 +497,7 @@ i915_drm_freeze(struct drm_device *dev) } timeout_del(&dev_priv->rps.delayed_resume_to); - task_del(taskq_systq(), &dev_priv->rps.delayed_resume_task); + task_del(systq, &dev_priv->rps.delayed_resume_task); intel_modeset_disable(dev); diff --git a/sys/dev/pci/drm/i915/i915_irq.c b/sys/dev/pci/drm/i915/i915_irq.c index 055696c8eb7..44456eeec04 100644 --- a/sys/dev/pci/drm/i915/i915_irq.c +++ b/sys/dev/pci/drm/i915/i915_irq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_irq.c,v 1.8 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: i915_irq.c,v 1.9 2013/10/30 02:11:32 dlg Exp $ */ /* i915_irq.c -- IRQ support for the I915 -*- linux-c -*- */ /* @@ -471,7 +471,7 @@ static void ivybridge_handle_parity_error(struct drm_device *dev) I915_WRITE(GTIMR, dev_priv->gt_irq_mask); mtx_leave(&dev_priv->irq_lock); - task_add(taskq_systq(), &dev_priv->l3_parity.error_task); + task_add(systq, &dev_priv->l3_parity.error_task); } static void snb_gt_irq_handler(struct drm_device *dev, @@ -517,7 +517,7 @@ static void gen6_queue_rps_work(struct drm_i915_private *dev_priv, POSTING_READ(GEN6_PMIMR); mtx_leave(&dev_priv->rps.lock); - task_add(taskq_systq(), &dev_priv->rps.task); + task_add(systq, &dev_priv->rps.task); } static int valleyview_intr(void *arg) @@ -578,7 +578,7 @@ static int valleyview_intr(void *arg) DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x\n", hotplug_status); if (hotplug_status & dev_priv->hotplug_supported_mask) - task_add(taskq_systq(), &dev_priv->hotplug_task); + task_add(systq, &dev_priv->hotplug_task); I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); I915_READ(PORT_HOTPLUG_STAT); @@ -605,7 +605,7 @@ static void ibx_irq_handler(struct drm_device *dev, u32 pch_iir) int pipe; if (pch_iir & SDE_HOTPLUG_MASK) - task_add(taskq_systq(), &dev_priv->hotplug_task); + task_add(systq, &dev_priv->hotplug_task); if (pch_iir & SDE_AUDIO_POWER_MASK) DRM_DEBUG_DRIVER("PCH audio power change on port %d\n", @@ -648,7 +648,7 @@ static void cpt_irq_handler(struct drm_device *dev, u32 pch_iir) int pipe; if (pch_iir & SDE_HOTPLUG_MASK_CPT) - task_add(taskq_systq(), &dev_priv->hotplug_task); + task_add(systq, &dev_priv->hotplug_task); if (pch_iir & SDE_AUDIO_POWER_MASK_CPT) DRM_DEBUG_DRIVER("PCH audio power change on port %d\n", @@ -1467,7 +1467,7 @@ void i915_handle_error(struct drm_device *dev, bool wedged) wakeup(ring); } - task_add(taskq_systq(), &dev_priv->error_task); + task_add(systq, &dev_priv->error_task); } static void i915_pageflip_stall_check(struct drm_device *dev, int pipe) @@ -2370,7 +2370,7 @@ static int i915_intr(void *arg) DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x\n", hotplug_status); if (hotplug_status & dev_priv->hotplug_supported_mask) - task_add(taskq_systq(), &dev_priv->hotplug_task); + task_add(systq, &dev_priv->hotplug_task); I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); POSTING_READ(PORT_HOTPLUG_STAT); @@ -2606,7 +2606,7 @@ static int i965_intr(void *arg) DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x\n", hotplug_status); if (hotplug_status & dev_priv->hotplug_supported_mask) - task_add(taskq_systq(), &dev_priv->hotplug_task); + task_add(systq, &dev_priv->hotplug_task); I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status); I915_READ(PORT_HOTPLUG_STAT); diff --git a/sys/dev/pci/drm/i915/intel_display.c b/sys/dev/pci/drm/i915/intel_display.c index cd506fa8f69..2c8fe1c595d 100644 --- a/sys/dev/pci/drm/i915/intel_display.c +++ b/sys/dev/pci/drm/i915/intel_display.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_display.c,v 1.13 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: intel_display.c,v 1.14 2013/10/30 02:11:32 dlg Exp $ */ /* * Copyright © 2006-2007 Intel Corporation * @@ -7175,7 +7175,7 @@ static void intel_crtc_destroy(struct drm_crtc *crtc) mtx_leave(&dev->event_lock); if (work) { - task_del(taskq_systq(), &work->task); + task_del(systq, &work->task); free(work, M_DRM); } @@ -7243,7 +7243,7 @@ static void do_intel_finish_page_flip(struct drm_device *dev, atomic_clear_int(&obj->pending_flip, 1 << intel_crtc->plane); wakeup(&dev_priv->pending_flip_queue); - task_add(taskq_systq(), &work->task); + task_add(systq, &work->task); // trace_i915_flip_complete(intel_crtc->plane, work->pending_flip_obj); } @@ -9498,8 +9498,8 @@ void intel_modeset_cleanup(struct drm_device *dev) /* Disable the irq before mode object teardown, for the irq might * enqueue unpin/hotplug work. */ drm_irq_uninstall(dev); - task_del(taskq_systq(), &dev_priv->hotplug_task); - task_del(taskq_systq(), &dev_priv->rps.task); + task_del(systq, &dev_priv->hotplug_task); + task_del(systq, &dev_priv->rps.task); /* flush any delayed tasks or pending work */ #ifdef notyet diff --git a/sys/dev/pci/drm/i915/intel_dp.c b/sys/dev/pci/drm/i915/intel_dp.c index d4545d5f3bb..5b14f9dcdba 100644 --- a/sys/dev/pci/drm/i915/intel_dp.c +++ b/sys/dev/pci/drm/i915/intel_dp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_dp.c,v 1.9 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: intel_dp.c,v 1.10 2013/10/30 02:11:33 dlg Exp $ */ /* * Copyright © 2008 Intel Corporation * @@ -1106,7 +1106,7 @@ ironlake_panel_vdd_tick(void *arg) { struct intel_dp *intel_dp = arg; - task_add(taskq_systq(), &intel_dp->panel_vdd_task); + task_add(systq, &intel_dp->panel_vdd_task); } void ironlake_edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync) @@ -2520,7 +2520,7 @@ void intel_dp_encoder_destroy(struct drm_encoder *encoder) drm_encoder_cleanup(encoder); if (is_edp(intel_dp)) { timeout_del(&intel_dp->panel_vdd_to); - task_del(taskq_systq(), &intel_dp->panel_vdd_task); + task_del(systq, &intel_dp->panel_vdd_task); ironlake_panel_vdd_off_sync(intel_dp); } free(intel_dig_port, M_DRM); diff --git a/sys/dev/pci/drm/i915/intel_pm.c b/sys/dev/pci/drm/i915/intel_pm.c index 696def0b9a9..3628b9decb8 100644 --- a/sys/dev/pci/drm/i915/intel_pm.c +++ b/sys/dev/pci/drm/i915/intel_pm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intel_pm.c,v 1.11 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: intel_pm.c,v 1.12 2013/10/30 02:11:33 dlg Exp $ */ /* * Copyright © 2012 Intel Corporation * @@ -307,7 +307,7 @@ intel_fbc_work_tick(void *arg) { struct intel_fbc_work *work = arg; - task_add(taskq_systq(), &work->task); + task_add(systq, &work->task); } static void intel_cancel_fbc_work(struct drm_i915_private *dev_priv) @@ -322,7 +322,7 @@ static void intel_cancel_fbc_work(struct drm_i915_private *dev_priv) * entirely asynchronously. */ timeout_del(&dev_priv->fbc_work->to); - if (task_del(taskq_systq(), &dev_priv->fbc_work->task)) + if (task_del(systq, &dev_priv->fbc_work->task)) /* tasklet was killed before being run, clean up */ free(dev_priv->fbc_work, M_DRM); @@ -3476,7 +3476,7 @@ void intel_disable_gt_powersave(struct drm_device *dev) ironlake_disable_rc6(dev); } else if (INTEL_INFO(dev)->gen >= 6 && !IS_VALLEYVIEW(dev)) { timeout_del(&dev_priv->rps.delayed_resume_to); - task_del(taskq_systq(), &dev_priv->rps.delayed_resume_task); + task_del(systq, &dev_priv->rps.delayed_resume_task); rw_enter_write(&dev_priv->rps.hw_lock); gen6_disable_rps(dev); rw_exit_write(&dev_priv->rps.hw_lock); @@ -3499,7 +3499,7 @@ intel_gen6_powersave_tick(void *arg) { drm_i915_private_t *dev_priv = arg; - task_add(taskq_systq(), &dev_priv->rps.delayed_resume_task); + task_add(systq, &dev_priv->rps.delayed_resume_task); } void intel_enable_gt_powersave(struct drm_device *dev) diff --git a/sys/dev/pci/drm/radeon/evergreen.c b/sys/dev/pci/drm/radeon/evergreen.c index ef1e15169d4..58ae11609d2 100644 --- a/sys/dev/pci/drm/radeon/evergreen.c +++ b/sys/dev/pci/drm/radeon/evergreen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evergreen.c,v 1.6 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: evergreen.c,v 1.7 2013/10/30 02:11:33 dlg Exp $ */ /* * Copyright 2010 Advanced Micro Devices, Inc. * @@ -3379,9 +3379,9 @@ restart_ih: rptr &= rdev->ih.ptr_mask; } if (queue_hotplug) - task_add(taskq_systq(), &rdev->hotplug_task); + task_add(systq, &rdev->hotplug_task); if (queue_hdmi) - task_add(taskq_systq(), &rdev->audio_task); + task_add(systq, &rdev->audio_task); rdev->ih.rptr = rptr; WREG32(IH_RB_RPTR, rdev->ih.rptr); atomic_set(&rdev->ih.lock, 0); diff --git a/sys/dev/pci/drm/radeon/r100.c b/sys/dev/pci/drm/radeon/r100.c index 9b6d2d1ca8f..9a6897a223e 100644 --- a/sys/dev/pci/drm/radeon/r100.c +++ b/sys/dev/pci/drm/radeon/r100.c @@ -1,4 +1,4 @@ -/* $OpenBSD: r100.c,v 1.2 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: r100.c,v 1.3 2013/10/30 02:11:33 dlg Exp $ */ /* * Copyright 2008 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -814,7 +814,7 @@ int r100_irq_process(struct radeon_device *rdev) status = r100_irq_ack(rdev); } if (queue_hotplug) - task_add(taskq_systq(), &rdev->hotplug_task); + task_add(systq, &rdev->hotplug_task); if (rdev->msi_enabled) { switch (rdev->family) { case CHIP_RS400: diff --git a/sys/dev/pci/drm/radeon/r600.c b/sys/dev/pci/drm/radeon/r600.c index b3586091f0d..130fb0afb37 100644 --- a/sys/dev/pci/drm/radeon/r600.c +++ b/sys/dev/pci/drm/radeon/r600.c @@ -1,4 +1,4 @@ -/* $OpenBSD: r600.c,v 1.5 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: r600.c,v 1.6 2013/10/30 02:11:33 dlg Exp $ */ /* * Copyright 2008 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -4041,9 +4041,9 @@ restart_ih: rptr &= rdev->ih.ptr_mask; } if (queue_hotplug) - task_add(taskq_systq(), &rdev->hotplug_task); + task_add(systq, &rdev->hotplug_task); if (queue_hdmi) - task_add(taskq_systq(), &rdev->audio_task); + task_add(systq, &rdev->audio_task); rdev->ih.rptr = rptr; WREG32(IH_RB_RPTR, rdev->ih.rptr); atomic_set(&rdev->ih.lock, 0); diff --git a/sys/dev/pci/drm/radeon/radeon_display.c b/sys/dev/pci/drm/radeon/radeon_display.c index da4d7edbd97..1b39e64649a 100644 --- a/sys/dev/pci/drm/radeon/radeon_display.c +++ b/sys/dev/pci/drm/radeon/radeon_display.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radeon_display.c,v 1.2 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: radeon_display.c,v 1.3 2013/10/30 02:11:33 dlg Exp $ */ /* * Copyright 2007-8 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -345,7 +345,7 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id) drm_vblank_put(rdev->ddev, radeon_crtc->crtc_id); radeon_fence_unref(&work->fence); radeon_post_page_flip(work->rdev, work->crtc_id); - task_add(taskq_systq(), &work->task); + task_add(systq, &work->task); } static int radeon_crtc_page_flip(struct drm_crtc *crtc, diff --git a/sys/dev/pci/drm/radeon/radeon_pm.c b/sys/dev/pci/drm/radeon/radeon_pm.c index 8d770f2cd74..46672da41a9 100644 --- a/sys/dev/pci/drm/radeon/radeon_pm.c +++ b/sys/dev/pci/drm/radeon/radeon_pm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radeon_pm.c,v 1.3 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: radeon_pm.c,v 1.4 2013/10/30 02:11:33 dlg Exp $ */ /* * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -442,7 +442,7 @@ radeon_set_pm_method(struct device *dev, rdev->pm.pm_method = PM_METHOD_PROFILE; rw_exit_write(&rdev->pm.rwlock); timeout_del(&rdev->pm.dynpm_idle_to); - task_del(taskq_systq(), &rdev->pm.dynpm_idle_task); + task_del(systq, &rdev->pm.dynpm_idle_task); } else { count = -EINVAL; goto fail; @@ -573,7 +573,7 @@ void radeon_pm_suspend(struct radeon_device *rdev) rw_exit_write(&rdev->pm.rwlock); timeout_del(&rdev->pm.dynpm_idle_to); - task_del(taskq_systq(), &rdev->pm.dynpm_idle_task); + task_del(systq, &rdev->pm.dynpm_idle_task); } void radeon_pm_resume(struct radeon_device *rdev) @@ -700,7 +700,7 @@ void radeon_pm_fini(struct radeon_device *rdev) rw_exit_write(&rdev->pm.rwlock); timeout_del(&rdev->pm.dynpm_idle_to); - task_del(taskq_systq(), &rdev->pm.dynpm_idle_task); + task_del(systq, &rdev->pm.dynpm_idle_task); #ifdef notyet device_remove_file(rdev->dev, &dev_attr_power_profile); @@ -744,7 +744,7 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev) if (rdev->pm.active_crtc_count > 1) { if (rdev->pm.dynpm_state == DYNPM_STATE_ACTIVE) { timeout_del(&rdev->pm.dynpm_idle_to); - task_del(taskq_systq(), &rdev->pm.dynpm_idle_task); + task_del(systq, &rdev->pm.dynpm_idle_task); rdev->pm.dynpm_state = DYNPM_STATE_PAUSED; rdev->pm.dynpm_planned_action = DYNPM_ACTION_DEFAULT; @@ -771,7 +771,7 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev) } else { /* count == 0 */ if (rdev->pm.dynpm_state != DYNPM_STATE_MINIMUM) { timeout_del(&rdev->pm.dynpm_idle_to); - task_del(taskq_systq(), &rdev->pm.dynpm_idle_task); + task_del(systq, &rdev->pm.dynpm_idle_task); rdev->pm.dynpm_state = DYNPM_STATE_MINIMUM; rdev->pm.dynpm_planned_action = DYNPM_ACTION_MINIMUM; @@ -823,7 +823,7 @@ radeon_dynpm_idle_tick(void *arg) { struct radeon_device *rdev = arg; - task_add(taskq_systq(), &rdev->pm.dynpm_idle_task); + task_add(systq, &rdev->pm.dynpm_idle_task); } void diff --git a/sys/dev/pci/drm/radeon/rs600.c b/sys/dev/pci/drm/radeon/rs600.c index ba46707384c..4605223a8c2 100644 --- a/sys/dev/pci/drm/radeon/rs600.c +++ b/sys/dev/pci/drm/radeon/rs600.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rs600.c,v 1.3 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: rs600.c,v 1.4 2013/10/30 02:11:33 dlg Exp $ */ /* * Copyright 2008 Advanced Micro Devices, Inc. * Copyright 2008 Red Hat Inc. @@ -755,9 +755,9 @@ int rs600_irq_process(struct radeon_device *rdev) status = rs600_irq_ack(rdev); } if (queue_hotplug) - task_add(taskq_systq(), &rdev->hotplug_task); + task_add(systq, &rdev->hotplug_task); if (queue_hdmi) - task_add(taskq_systq(), &rdev->audio_task); + task_add(systq, &rdev->audio_task); if (rdev->msi_enabled) { switch (rdev->family) { case CHIP_RS600: diff --git a/sys/dev/pci/drm/radeon/si.c b/sys/dev/pci/drm/radeon/si.c index 6ce8386dff9..d3fff3bbeae 100644 --- a/sys/dev/pci/drm/radeon/si.c +++ b/sys/dev/pci/drm/radeon/si.c @@ -1,4 +1,4 @@ -/* $OpenBSD: si.c,v 1.4 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: si.c,v 1.5 2013/10/30 02:11:33 dlg Exp $ */ /* * Copyright 2011 Advanced Micro Devices, Inc. * @@ -3991,7 +3991,7 @@ restart_ih: rptr &= rdev->ih.ptr_mask; } if (queue_hotplug) - task_add(taskq_systq(), &rdev->hotplug_task); + task_add(systq, &rdev->hotplug_task); rdev->ih.rptr = rptr; WREG32(IH_RB_RPTR, rdev->ih.rptr); atomic_set(&rdev->ih.lock, 0); diff --git a/sys/dev/pci/drm/ttm/ttm_bo.c b/sys/dev/pci/drm/ttm/ttm_bo.c index 662cb52d11e..e49187823d3 100644 --- a/sys/dev/pci/drm/ttm/ttm_bo.c +++ b/sys/dev/pci/drm/ttm/ttm_bo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttm_bo.c,v 1.3 2013/10/29 06:30:57 jsg Exp $ */ +/* $OpenBSD: ttm_bo.c,v 1.4 2013/10/30 02:11:33 dlg Exp $ */ /************************************************************************** * * Copyright (c) 2006-2009 VMware, Inc., Palo Alto, CA., USA @@ -754,7 +754,7 @@ ttm_bo_delayed_tick(void *arg) { struct ttm_bo_device *bdev = arg; - task_add(taskq_systq(), &bdev->task); + task_add(systq, &bdev->task); } void @@ -805,7 +805,7 @@ int ttm_bo_lock_delayed_workqueue(struct ttm_bo_device *bdev) { timeout_del(&bdev->to); - task_del(taskq_systq(), &bdev->task); + task_del(systq, &bdev->task); return 0; } EXPORT_SYMBOL(ttm_bo_lock_delayed_workqueue); @@ -1608,7 +1608,7 @@ ttm_bo_device_release(struct ttm_bo_device *bdev) rw_exit_write(&glob->device_list_rwlock); timeout_del(&bdev->to); - task_del(taskq_systq(), &bdev->task); + task_del(systq, &bdev->task); while (ttm_bo_delayed_delete(bdev, true)) ; diff --git a/sys/dev/pci/vmwpvs.c b/sys/dev/pci/vmwpvs.c index 2f37d7ef6e1..57fd0f6175f 100644 --- a/sys/dev/pci/vmwpvs.c +++ b/sys/dev/pci/vmwpvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmwpvs.c,v 1.7 2013/10/29 05:47:15 dlg Exp $ */ +/* $OpenBSD: vmwpvs.c,v 1.8 2013/10/30 02:11:32 dlg Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -760,7 +760,7 @@ vmwpvs_intr(void *xsc) } if (msg) - task_add(taskq_systq(), &sc->sc_msg_task); + task_add(systq, &sc->sc_msg_task); return (1); } diff --git a/sys/kern/kern_task.c b/sys/kern/kern_task.c index 42823a2339a..f04a1b750d1 100644 --- a/sys/kern/kern_task.c +++ b/sys/kern/kern_task.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_task.c,v 1.4 2013/10/29 23:39:02 dlg Exp $ */ +/* $OpenBSD: kern_task.c,v 1.5 2013/10/30 02:11:32 dlg Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -48,6 +48,8 @@ struct taskq taskq_sys = { TAILQ_HEAD_INITIALIZER(taskq_sys.tq_worklist) }; +struct taskq *const systq = &taskq_sys; + void taskq_init(void); /* called in init_main.c */ void taskq_create_thread(void *); int taskq_next_work(struct taskq *, struct task *); @@ -56,13 +58,7 @@ void taskq_thread(void *); void taskq_init(void) { - kthread_create_deferred(taskq_create_thread, &taskq_sys); -} - -struct taskq * -taskq_systq(void) -{ - return (&taskq_sys); + kthread_create_deferred(taskq_create_thread, systq); } struct taskq * diff --git a/sys/sys/task.h b/sys/sys/task.h index 7cdcfd1e4ed..350fc8171bc 100644 --- a/sys/sys/task.h +++ b/sys/sys/task.h @@ -1,4 +1,4 @@ -/* $OpenBSD: task.h,v 1.2 2013/10/29 04:32:08 dlg Exp $ */ +/* $OpenBSD: task.h,v 1.3 2013/10/30 02:11:32 dlg Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -31,7 +31,8 @@ struct task { unsigned int t_flags; }; -struct taskq *taskq_systq(void); +extern struct taskq *const systq; + struct taskq *taskq_create(const char *, unsigned int, int); void taskq_destroy(struct taskq *); |