diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-02 11:05:21 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-02 11:17:13 +0000 |
commit | 4de67b26788c60c19254c3e69e151ee200453895 (patch) | |
tree | 566eda27dcfe0f8266ba1931681003b9b76d8642 /tests/gem_ctx_thrash.c | |
parent | 0517d877b65bade23332cba0828acae7ae5fccb9 (diff) |
igt: Mass conversion to to_user_pointer()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_ctx_thrash.c')
-rw-r--r-- | tests/gem_ctx_thrash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/gem_ctx_thrash.c b/tests/gem_ctx_thrash.c index b0711894..cc7ea1a7 100644 --- a/tests/gem_ctx_thrash.c +++ b/tests/gem_ctx_thrash.c @@ -113,7 +113,7 @@ static int has_engine(int fd, const struct intel_execution_engine *e, uint32_t c gem_write(fd, exec.handle, 0, &bbe, sizeof(bbe)); memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)&exec; + execbuf.buffers_ptr = to_user_pointer(&exec); execbuf.buffer_count = 1; execbuf.flags = e->exec_id | e->flags; execbuf.rsvd1 = ctx; @@ -185,7 +185,7 @@ static void single(const char *name, bool all_engines) if (gen >= 4 && gen < 8) reloc[n].offset += sizeof(uint32_t); - obj[2*n + 1].relocs_ptr = (uintptr_t)&reloc[n]; + obj[2*n + 1].relocs_ptr = to_user_pointer(&reloc[n]); obj[2*n + 1].relocation_count = 1; } @@ -225,7 +225,7 @@ static void single(const char *name, bool all_engines) obj[2*r + 1].handle = handle; memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)&obj[2*r]; + execbuf.buffers_ptr = to_user_pointer(&obj[2*r]); execbuf.buffer_count = 2; execbuf.flags = engines[n % num_engines]; execbuf.rsvd1 = all[n]; @@ -319,7 +319,7 @@ static void processes(void) memset(&obj, 0, sizeof(obj)); memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)&obj; + execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; igt_permute_array(fds, num_ctx, xchg_int); @@ -356,7 +356,7 @@ static void *thread(void *data) obj.handle = t->batch; memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)&obj; + execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; ctx = malloc(t->num_ctx * sizeof(uint32_t)); |