Commit 047b35f2 authored by Dave Airlie's avatar Dave Airlie

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
parents d58e0d90 a550bb3d
...@@ -221,8 +221,14 @@ static int acquire_packet_buffer(struct kernel_queue *kq, ...@@ -221,8 +221,14 @@ static int acquire_packet_buffer(struct kernel_queue *kq,
queue_size_dwords; queue_size_dwords;
if (packet_size_in_dwords >= queue_size_dwords || if (packet_size_in_dwords >= queue_size_dwords ||
packet_size_in_dwords >= available_size) packet_size_in_dwords >= available_size) {
/*
* make sure calling functions know
* acquire_packet_buffer() failed
*/
*buffer_ptr = NULL;
return -ENOMEM; return -ENOMEM;
}
if (wptr + packet_size_in_dwords >= queue_size_dwords) { if (wptr + packet_size_in_dwords >= queue_size_dwords) {
while (wptr > 0) { while (wptr > 0) {
......
...@@ -32,8 +32,7 @@ int kfd_pasid_init(void) ...@@ -32,8 +32,7 @@ int kfd_pasid_init(void)
{ {
pasid_limit = max_num_of_processes; pasid_limit = max_num_of_processes;
pasid_bitmap = kzalloc(DIV_ROUND_UP(pasid_limit, BITS_PER_BYTE), pasid_bitmap = kzalloc(BITS_TO_LONGS(pasid_limit), GFP_KERNEL);
GFP_KERNEL);
if (!pasid_bitmap) if (!pasid_bitmap)
return -ENOMEM; return -ENOMEM;
......
...@@ -196,7 +196,7 @@ static void kfd_process_destroy_delayed(struct rcu_head *rcu) ...@@ -196,7 +196,7 @@ static void kfd_process_destroy_delayed(struct rcu_head *rcu)
mmdrop(p->mm); mmdrop(p->mm);
work = (struct kfd_process_release_work *) work = (struct kfd_process_release_work *)
kmalloc(sizeof(struct kfd_process_release_work), GFP_KERNEL); kmalloc(sizeof(struct kfd_process_release_work), GFP_ATOMIC);
if (work) { if (work) {
INIT_WORK((struct work_struct *) work, kfd_process_wq_release); INIT_WORK((struct work_struct *) work, kfd_process_wq_release);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment