summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_events.c
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2017-10-27 19:35:24 -0400
committerOded Gabbay <oded.gabbay@gmail.com>2017-10-27 19:35:24 -0400
commitebf947fe93dd3627774f6bb4daa57b4e2897929d (patch)
tree8407e6df1ca85d8dccc4555ea5365965ece11133 /drivers/gpu/drm/amd/amdkfd/kfd_events.c
parentfe528c13acc764965929b7fcb5fadf2c15b57373 (diff)
downloadtalos-op-linux-ebf947fe93dd3627774f6bb4daa57b4e2897929d.tar.gz
talos-op-linux-ebf947fe93dd3627774f6bb4daa57b4e2897929d.zip
drm/amdkfd: remove redundant kfd_event_waiter.input_index
This always identical with the index of the event_waiter in the array. No need to store it in the waiter record. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_events.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_events.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
index 2f0fe124ce08..b4cda9256225 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
@@ -49,7 +49,6 @@ struct kfd_event_waiter {
/* Event */
struct kfd_event *event;
- uint32_t input_index;
};
/*
@@ -625,8 +624,7 @@ static struct kfd_event_waiter *alloc_event_waiters(uint32_t num_events)
static int init_event_waiter_get_status(struct kfd_process *p,
struct kfd_event_waiter *waiter,
- uint32_t event_id,
- uint32_t input_index)
+ uint32_t event_id)
{
struct kfd_event *ev = lookup_event_by_id(p, event_id);
@@ -634,7 +632,6 @@ static int init_event_waiter_get_status(struct kfd_process *p,
return -EINVAL;
waiter->event = ev;
- waiter->input_index = input_index;
waiter->activated = ev->signaled;
ev->signaled = ev->signaled && !ev->auto_reset;
@@ -702,7 +699,7 @@ static int copy_signaled_event_data(uint32_t num_events,
waiter = &event_waiters[i];
event = waiter->event;
if (waiter->activated && event->type == KFD_EVENT_TYPE_MEMORY) {
- dst = &data[waiter->input_index].memory_exception_data;
+ dst = &data[i].memory_exception_data;
src = &event->memory_exception_data;
if (copy_to_user(dst, src,
sizeof(struct kfd_hsa_memory_exception_data)))
@@ -775,7 +772,7 @@ int kfd_wait_on_events(struct kfd_process *p,
}
ret = init_event_waiter_get_status(p, &event_waiters[i],
- event_data.event_id, i);
+ event_data.event_id);
if (ret)
goto out_unlock;
}
OpenPOWER on IntegriCloud