gpu: host1x: hw: intr_hw: Remove create_workqueue
System workqueues have been able to handle high level of concurrency for a long time now and there's no reason to use dedicated workqueues just to gain concurrency. Since the workqueue host->intr_wq is involved in sync point interrupts, and sync point wait and is not being used on a memory reclaim path, dedicated host->intr_wq has been replaced with the use of system_wq. Unlike a dedicated per-cpu workqueue created with create_workqueue(), system_wq allows multiple work items to overlap executions even on the same CPU; however, a per-cpu workqueue doesn't have any CPU locality or global ordering guarantees unless the target CPU is explicitly specified and thus the increase of local concurrency shouldn't make any difference. cancel_work_sync() has been used in _host1x_free_syncpt_irq() to ensure that no work is pending by the time exit path runs. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:

committed by
Thierry Reding

parent
dfa7573e84
commit
57574bd779
@@ -38,7 +38,7 @@ static void host1x_intr_syncpt_handle(struct host1x_syncpt *syncpt)
|
||||
host1x_sync_writel(host, BIT_MASK(id),
|
||||
HOST1X_SYNC_SYNCPT_THRESH_CPU0_INT_STATUS(BIT_WORD(id)));
|
||||
|
||||
queue_work(host->intr_wq, &syncpt->intr.work);
|
||||
schedule_work(&syncpt->intr.work);
|
||||
}
|
||||
|
||||
static irqreturn_t syncpt_thresh_isr(int irq, void *dev_id)
|
||||
@@ -127,8 +127,12 @@ static void _host1x_intr_disable_syncpt_intr(struct host1x *host, u32 id)
|
||||
|
||||
static int _host1x_free_syncpt_irq(struct host1x *host)
|
||||
{
|
||||
int i;
|
||||
|
||||
devm_free_irq(host->dev, host->intr_syncpt_irq, host);
|
||||
flush_workqueue(host->intr_wq);
|
||||
|
||||
for (i = 0; i < host->info->nb_pts; i++)
|
||||
cancel_work_sync(&host->syncpt[i].intr.work);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user