diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c b/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c index 2bf2e653..39f8948b 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_clk_arb.c | |||
@@ -16,9 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/cdev.h> | 17 | #include <linux/cdev.h> |
18 | #include <linux/file.h> | 18 | #include <linux/file.h> |
19 | #include <linux/list.h> | ||
19 | #include <linux/anon_inodes.h> | 20 | #include <linux/anon_inodes.h> |
20 | #include <linux/rculist.h> | ||
21 | #include <linux/llist.h> | ||
22 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
23 | #include <linux/poll.h> | 22 | #include <linux/poll.h> |
24 | #ifdef CONFIG_DEBUG_FS | 23 | #ifdef CONFIG_DEBUG_FS |
@@ -103,12 +102,11 @@ static int nvgpu_clk_arb_release_event_dev(struct inode *inode, | |||
103 | 102 | ||
104 | if (arb) { | 103 | if (arb) { |
105 | nvgpu_spinlock_acquire(&arb->users_lock); | 104 | nvgpu_spinlock_acquire(&arb->users_lock); |
106 | list_del_rcu(&dev->link); | 105 | list_del(&dev->link); |
107 | nvgpu_spinlock_release(&arb->users_lock); | 106 | nvgpu_spinlock_release(&arb->users_lock); |
108 | nvgpu_clk_notification_queue_free(arb->g, &dev->queue); | 107 | nvgpu_clk_notification_queue_free(arb->g, &dev->queue); |
109 | } | 108 | } |
110 | 109 | ||
111 | synchronize_rcu(); | ||
112 | nvgpu_ref_put(&session->refcount, nvgpu_clk_arb_free_session); | 110 | nvgpu_ref_put(&session->refcount, nvgpu_clk_arb_free_session); |
113 | nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd); | 111 | nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd); |
114 | 112 | ||
@@ -372,7 +370,7 @@ int nvgpu_clk_arb_install_event_fd(struct gk20a *g, | |||
372 | dev->arb_queue_head = nvgpu_atomic_read(&arb->notification_queue.head); | 370 | dev->arb_queue_head = nvgpu_atomic_read(&arb->notification_queue.head); |
373 | 371 | ||
374 | nvgpu_spinlock_acquire(&arb->users_lock); | 372 | nvgpu_spinlock_acquire(&arb->users_lock); |
375 | list_add_tail_rcu(&dev->link, &arb->users); | 373 | list_add_tail(&dev->link, &arb->users); |
376 | nvgpu_spinlock_release(&arb->users_lock); | 374 | nvgpu_spinlock_release(&arb->users_lock); |
377 | 375 | ||
378 | *event_fd = fd; | 376 | *event_fd = fd; |
@@ -423,7 +421,9 @@ int nvgpu_clk_arb_commit_request_fd(struct gk20a *g, | |||
423 | goto fdput_fd; | 421 | goto fdput_fd; |
424 | } | 422 | } |
425 | nvgpu_ref_get(&dev->refcount); | 423 | nvgpu_ref_get(&dev->refcount); |
426 | llist_add(&dev->node, &session->targets); | 424 | nvgpu_spinlock_acquire(&session->session_lock); |
425 | list_add(&dev->node, &session->targets); | ||
426 | nvgpu_spinlock_release(&session->session_lock); | ||
427 | if (arb->update_work_queue) | 427 | if (arb->update_work_queue) |
428 | queue_work(arb->update_work_queue, &arb->update_fn_work); | 428 | queue_work(arb->update_work_queue, &arb->update_fn_work); |
429 | 429 | ||