diff options
author | Dave Airlie <airlied@redhat.com> | 2014-12-04 20:10:59 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-12-04 20:10:59 -0500 |
commit | 047b35f27bcbca485f06a60340de8d552be2b4e5 (patch) | |
tree | 6e6584a1454c77169d3c44f46e4697d32c78c8e4 | |
parent | d58e0d903477f5a158d7d4901eb6f96f8f4b6289 (diff) | |
parent | a550bb3d5313c3d894cac552e13037394ac78fd4 (diff) |
Merge branch 'amdkfd-next-3.19' of git://people.freedesktop.org/~gabbayo/linux into drm-next
Just three more fixes for 3.19.
This is the last request until -rc1. I will have our QA team run a full
HSA stack test on 3.19-rc1 and if we find problems, I will send a fixes pull
request.
* 'amdkfd-next-3.19' of git://people.freedesktop.org/~gabbayo/linux:
amdkfd: Set *buffer_ptr to NULL in case of error
amdkfd: use atomic allocations within srcu callbacks
amdkfd: use sizeof(long) granularity for the pasid bitmask
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_pasid.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c index 9abac48de499..935071410724 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | |||
@@ -221,8 +221,14 @@ static int acquire_packet_buffer(struct kernel_queue *kq, | |||
221 | queue_size_dwords; | 221 | queue_size_dwords; |
222 | 222 | ||
223 | if (packet_size_in_dwords >= queue_size_dwords || | 223 | if (packet_size_in_dwords >= queue_size_dwords || |
224 | packet_size_in_dwords >= available_size) | 224 | packet_size_in_dwords >= available_size) { |
225 | /* | ||
226 | * make sure calling functions know | ||
227 | * acquire_packet_buffer() failed | ||
228 | */ | ||
229 | *buffer_ptr = NULL; | ||
225 | return -ENOMEM; | 230 | return -ENOMEM; |
231 | } | ||
226 | 232 | ||
227 | if (wptr + packet_size_in_dwords >= queue_size_dwords) { | 233 | if (wptr + packet_size_in_dwords >= queue_size_dwords) { |
228 | while (wptr > 0) { | 234 | while (wptr > 0) { |
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_pasid.c b/drivers/gpu/drm/amd/amdkfd/kfd_pasid.c index 2458ab7c0c6e..71699ad97d74 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_pasid.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_pasid.c | |||
@@ -32,8 +32,7 @@ int kfd_pasid_init(void) | |||
32 | { | 32 | { |
33 | pasid_limit = max_num_of_processes; | 33 | pasid_limit = max_num_of_processes; |
34 | 34 | ||
35 | pasid_bitmap = kzalloc(DIV_ROUND_UP(pasid_limit, BITS_PER_BYTE), | 35 | pasid_bitmap = kzalloc(BITS_TO_LONGS(pasid_limit), GFP_KERNEL); |
36 | GFP_KERNEL); | ||
37 | if (!pasid_bitmap) | 36 | if (!pasid_bitmap) |
38 | return -ENOMEM; | 37 | return -ENOMEM; |
39 | 38 | ||
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index b4f49ac13334..b85eb0b830b4 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c | |||
@@ -196,7 +196,7 @@ static void kfd_process_destroy_delayed(struct rcu_head *rcu) | |||
196 | mmdrop(p->mm); | 196 | mmdrop(p->mm); |
197 | 197 | ||
198 | work = (struct kfd_process_release_work *) | 198 | work = (struct kfd_process_release_work *) |
199 | kmalloc(sizeof(struct kfd_process_release_work), GFP_KERNEL); | 199 | kmalloc(sizeof(struct kfd_process_release_work), GFP_ATOMIC); |
200 | 200 | ||
201 | if (work) { | 201 | if (work) { |
202 | INIT_WORK((struct work_struct *) work, kfd_process_wq_release); | 202 | INIT_WORK((struct work_struct *) work, kfd_process_wq_release); |