Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync up with Linus #27

Merged
merged 84 commits into from
Jan 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
ed9a842
drm: tda998x: Protect the page register
moinejf Nov 29, 2014
6833d26
drm: tda998x: Fix EDID read timeout on HDMI connect
moinejf Nov 29, 2014
de3b7a0
xfrm6: Fix transport header offset in _decode_session6.
klassert Dec 4, 2014
f855691
xfrm6: Fix the nexthdr offset in _decode_session6.
klassert Dec 8, 2014
1f9c418
iwlwifi: mvm: fix EBS on single scan
DavidSpinadel Dec 1, 2014
4e6c48e
iwlwifi: mvm: drop non VO frames when flushing
egrumbach Jan 12, 2015
9b3b43d
iwlwifi: mvm: set the tx cmd tid for BAR frame correctly
Dec 31, 2014
781f51d
Merge tag 'iwlwifi-for-kalle-2015-01-13' of https://git.kernel.org/pu…
Jan 15, 2015
f046bfd
drm/amdkfd: PQM handle queue creation fault
Jan 15, 2015
b8cbab0
drm/amdkfd: Allow user to limit only queues per device
Jan 18, 2015
90ea15c
iwlwifi: mvm: abort scheduled scan upon RFKILL
egrumbach Jan 18, 2015
e6eb2eb
powerpc/xmon: Fix another endiannes issue in RTAS call from xmon
Jan 15, 2015
7b05520
Merge tag 'iwlwifi-for-kalle-2015-01-15' of https://git.kernel.org/pu…
Jan 19, 2015
496eb6f
drm/vmwgfx: Replace the hw mutex with a hw spinlock
thomashvmw Jan 14, 2015
e3f3117
ath9k: fix race condition in irq processing during hardware reset
Jan 14, 2015
cfe3875
drm/i2c: tda998x: set the CEC I2C address based on the slave I2C address
Nov 7, 2014
7ffd7b4
can: c_can: end pending transmission on network stop (ifdown)
Jan 18, 2015
c366321
Merge branch 'vmwgfx-fixes-3.19' of git://people.freedesktop.org/~tho…
airlied Jan 22, 2015
0eb1320
powerpc/powernv: Restore LPCR with LPCR_PECE1 cleared
shreyasbp Jan 14, 2015
5a8888a
drm/radeon: Don't increment pipe_id in kgd_init_pipeline
Jan 22, 2015
749042b
drm/amdkfd: Fix bug in pipelines initialization
Jan 22, 2015
9fa843e
drm/amdkfd: Fix bug in call to init_pipelines()
Jan 22, 2015
cb65890
drm/radeon: Split off gart_get_page_entry ASIC hook from set_page_entry
Jan 21, 2015
5636d2f
drm/radeon: Restore GART table contents after pinning it in VRAM v3
Jan 22, 2015
16653db
drm/radeon: Remove rdev->gart.pages_addr array
Jan 21, 2015
dc4515e
scsi: always increment reference count
rustyrussell Jan 23, 2015
2af81d6
mac80211: only roll back station states for WDS when suspending
lucacoelho Jan 21, 2015
fb142f4
mac80211: correct header length calculation
fredchound Jan 20, 2015
3a5c5e8
mac80211: properly set CCK flag in radiotap
vanhoefm Jan 20, 2015
0fa7b39
nl80211: fix per-station group key get/del and memory leak
jmberg-intel Jan 23, 2015
e2a2729
amd-xgbe: Use proper Rx flow control register
tlendacky Jan 20, 2015
9143e39
ARM: dts: imx6sx: correct i.MX6sx sdb board enet phy address
Jan 20, 2015
5d7b045
Merge tag 'wireless-drivers-for-davem-2015-01-20' of git://git.kernel…
davem330 Jan 25, 2015
f104fed
enic: fix rx napi poll return value
Jan 20, 2015
6088bee
netxen: fix netxen_nic_poll() logic
Jan 22, 2015
6b8d911
net: llc: use correct size for sysctl timeout entries
sashalevin Jan 24, 2015
2aab952
ipvlan: fix incorrect usage of IS_ERR() macro in IPv6 code path.
Jan 25, 2015
24df898
net: dsa: set slave MII bus PHY mask
vivien Jan 21, 2015
b0a1ba5
ipv6: Fix __ip6_route_redirect
iamkafai Jan 21, 2015
efbbc1d
qeth: clean up error handling
Jan 21, 2015
1aec42b
390/qeth: Fix locking warning during qeth device setup
Jan 21, 2015
03a6058
Merge branch 's390'
davem330 Jan 26, 2015
104b615
Merge branch 'drm-tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/l…
airlied Jan 26, 2015
9e79ce6
Merge tag 'linux-can-fixes-for-3.19-20150121' of git://git.kernel.org…
davem330 Jan 26, 2015
22cbbce
Merge tag 'v3.19-rc6' into drm-fixes
airlied Jan 26, 2015
db9098b
Merge tag 'drm-amdkfd-fixes-2015-01-26' of git://people.freedesktop.o…
airlied Jan 26, 2015
7913ecf
net: cls_bpf: fix size mismatch on filter preparation
borkmann Jan 22, 2015
3f2ab13
net: cls_bpf: fix auto generation of per list handles
borkmann Jan 22, 2015
b6663ad
Merge branch 'cls_bpf'
davem330 Jan 26, 2015
5159571
Merge branch 'drm-fixes-3.19' of git://people.freedesktop.org/~agd5f/…
airlied Jan 26, 2015
02a5416
drivers: net: cpsw: discard dual emac default vlan configuration
mugunthanvnm Jan 22, 2015
eebfb64
sh_eth: Fix padding of short frames on TX
bwh-ct Jan 22, 2015
bd88891
sh_eth: Detach net device when stopping queue to resize DMA rings
bwh-ct Jan 22, 2015
084236d
sh_eth: Fix crash or memory leak when resizing rings on device that i…
bwh-ct Jan 22, 2015
283e38d
sh_eth: Fix serialisation of interrupt disable with interrupt & NAPI …
bwh-ct Jan 22, 2015
9d08da9
Merge branch 'sh_eth'
davem330 Jan 27, 2015
9e91141
net: mv643xx_eth: Fix highmem support in non-TSO egress path
ezequielgarcia Jan 22, 2015
600ddd6
net: sctp: fix slab corruption from use after free on INIT collisions
borkmann Jan 22, 2015
8ebe667
bpf: rcu lock must not be held when calling copy_to_user()
Jan 23, 2015
ba1a68b
samples: bpf: relax test_maps check
Jan 23, 2015
412d290
Merge branch 'bpf'
davem330 Jan 27, 2015
df4d925
ipv4: try to cache dst_entries which would cause a redirect
strssndktn Jan 23, 2015
7d63585
Merge tag 'mac80211-for-davem-2015-01-23' of git://git.kernel.org/pub…
davem330 Jan 27, 2015
ded5006
can: kvaser_usb: Do not sleep in atomic context
Jan 26, 2015
3803fa6
can: kvaser_usb: Send correct context to URB completion
Jan 26, 2015
14c10c2
can: kvaser_usb: Retry the first bulk transfer on -ETIMEDOUT
Jan 26, 2015
e638642
can: kvaser_usb: Fix state handling upon BUS_ERROR events
Jan 26, 2015
86f3cdd
udp_diag: Fix socket skipping within chain
herbertx Jan 23, 2015
fc752f1
ping: Fix race in free in receive path
Jan 23, 2015
8d8d67f
Merge tag 'linux-can-fixes-for-3.19-20150127' of git://git.kernel.org…
davem330 Jan 27, 2015
dc1d0e6
sh_eth: Remove RX overflow log messages
bwh-ct Jan 27, 2015
740c7f3
sh_eth: Ensure DMA engines are stopped before freeing buffers
bwh-ct Jan 27, 2015
aa3933b
sh_eth: Check for DMA mapping errors on transmit
bwh-ct Jan 27, 2015
52b9fa3
sh_eth: Fix DMA-API usage for RX buffers
bwh-ct Jan 27, 2015
2257760
Merge branch 'sh_eth'
davem330 Jan 27, 2015
6e9e16e
ipv6: replacing a rt6_info needs to purge possible propagated rt6_inf…
strssndktn Jan 26, 2015
bf693f7
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
davem330 Jan 27, 2015
24e579c
bnx2x: fix napi poll return value for repoll
Jan 25, 2015
41592e2
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/ker…
torvalds Jan 27, 2015
7da323b
Merge tag 'powerpc-3.19-5' of git://git.kernel.org/pub/scm/linux/kern…
torvalds Jan 27, 2015
9afec6e
stmmac: prevent probe drivers to crash kernel
andy-shev Jan 27, 2015
06539d3
net: don't OOPS on socket aio
Jan 27, 2015
59343cd
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
torvalds Jan 27, 2015
c59c961
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
torvalds Jan 28, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions arch/arm/boot/dts/imx6sx-sdb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@
#address-cells = <1>;
#size-cells = <0>;

ethphy1: ethernet-phy@0 {
reg = <0>;
ethphy1: ethernet-phy@1 {
reg = <1>;
};

ethphy2: ethernet-phy@1 {
reg = <1>;
ethphy2: ethernet-phy@2 {
reg = <2>;
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/powernv/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ int pnv_save_sprs_for_winkle(void)
* all cpus at boot. Get these reg values of current cpu and use the
* same accross all cpus.
*/
uint64_t lpcr_val = mfspr(SPRN_LPCR);
uint64_t lpcr_val = mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1;
uint64_t hid0_val = mfspr(SPRN_HID0);
uint64_t hid1_val = mfspr(SPRN_HID1);
uint64_t hid4_val = mfspr(SPRN_HID4);
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ static inline void disable_surveillance(void)
args.token = rtas_token("set-indicator");
if (args.token == RTAS_UNKNOWN_SERVICE)
return;
args.token = cpu_to_be32(args.token);
args.nargs = cpu_to_be32(3);
args.nret = cpu_to_be32(1);
args.rets = &args.args[3];
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/amdkfd/kfd_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/slab.h>
#include "kfd_priv.h"
#include "kfd_device_queue_manager.h"
#include "kfd_pm4_headers.h"

#define MQD_SIZE_ALIGNED 768

Expand Down Expand Up @@ -169,9 +170,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
kfd->shared_resources = *gpu_resources;

/* calculate max size of mqds needed for queues */
size = max_num_of_processes *
max_num_of_queues_per_process *
kfd->device_info->mqd_size_aligned;
size = max_num_of_queues_per_device *
kfd->device_info->mqd_size_aligned;

/* add another 512KB for all other allocations on gart */
size += 512 * 1024;
Expand Down
78 changes: 76 additions & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm,

mutex_lock(&dqm->lock);

if (dqm->total_queue_count >= max_num_of_queues_per_device) {
pr_warn("amdkfd: Can't create new usermode queue because %d queues were already created\n",
dqm->total_queue_count);
mutex_unlock(&dqm->lock);
return -EPERM;
}

if (list_empty(&qpd->queues_list)) {
retval = allocate_vmid(dqm, qpd, q);
if (retval != 0) {
Expand All @@ -207,6 +214,14 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm,
list_add(&q->list, &qpd->queues_list);
dqm->queue_count++;

/*
* Unconditionally increment this counter, regardless of the queue's
* type or whether the queue is active.
*/
dqm->total_queue_count++;
pr_debug("Total of %d queues are accountable so far\n",
dqm->total_queue_count);

mutex_unlock(&dqm->lock);
return 0;
}
Expand Down Expand Up @@ -326,6 +341,15 @@ static int destroy_queue_nocpsch(struct device_queue_manager *dqm,
if (list_empty(&qpd->queues_list))
deallocate_vmid(dqm, qpd, q);
dqm->queue_count--;

/*
* Unconditionally decrement this counter, regardless of the queue's
* type
*/
dqm->total_queue_count--;
pr_debug("Total of %d queues are accountable so far\n",
dqm->total_queue_count);

out:
mutex_unlock(&dqm->lock);
return retval;
Expand Down Expand Up @@ -541,10 +565,14 @@ static int init_pipelines(struct device_queue_manager *dqm,

for (i = 0; i < pipes_num; i++) {
inx = i + first_pipe;
/*
* HPD buffer on GTT is allocated by amdkfd, no need to waste
* space in GTT for pipelines we don't initialize
*/
pipe_hpd_addr = dqm->pipelines_addr + i * CIK_HPD_EOP_BYTES;
pr_debug("kfd: pipeline address %llX\n", pipe_hpd_addr);
/* = log2(bytes/4)-1 */
kfd2kgd->init_pipeline(dqm->dev->kgd, i,
kfd2kgd->init_pipeline(dqm->dev->kgd, inx,
CIK_HPD_EOP_BYTES_LOG2 - 3, pipe_hpd_addr);
}

Expand All @@ -560,7 +588,7 @@ static int init_scheduler(struct device_queue_manager *dqm)

pr_debug("kfd: In %s\n", __func__);

retval = init_pipelines(dqm, get_pipes_num(dqm), KFD_DQM_FIRST_PIPE);
retval = init_pipelines(dqm, get_pipes_num(dqm), get_first_pipe(dqm));
if (retval != 0)
return retval;

Expand Down Expand Up @@ -752,6 +780,21 @@ static int create_kernel_queue_cpsch(struct device_queue_manager *dqm,
pr_debug("kfd: In func %s\n", __func__);

mutex_lock(&dqm->lock);
if (dqm->total_queue_count >= max_num_of_queues_per_device) {
pr_warn("amdkfd: Can't create new kernel queue because %d queues were already created\n",
dqm->total_queue_count);
mutex_unlock(&dqm->lock);
return -EPERM;
}

/*
* Unconditionally increment this counter, regardless of the queue's
* type or whether the queue is active.
*/
dqm->total_queue_count++;
pr_debug("Total of %d queues are accountable so far\n",
dqm->total_queue_count);

list_add(&kq->list, &qpd->priv_queue_list);
dqm->queue_count++;
qpd->is_debug = true;
Expand All @@ -775,6 +818,13 @@ static void destroy_kernel_queue_cpsch(struct device_queue_manager *dqm,
dqm->queue_count--;
qpd->is_debug = false;
execute_queues_cpsch(dqm, false);
/*
* Unconditionally decrement this counter, regardless of the queue's
* type.
*/
dqm->total_queue_count++;
pr_debug("Total of %d queues are accountable so far\n",
dqm->total_queue_count);
mutex_unlock(&dqm->lock);
}

Expand All @@ -793,6 +843,13 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q,

mutex_lock(&dqm->lock);

if (dqm->total_queue_count >= max_num_of_queues_per_device) {
pr_warn("amdkfd: Can't create new usermode queue because %d queues were already created\n",
dqm->total_queue_count);
retval = -EPERM;
goto out;
}

mqd = dqm->get_mqd_manager(dqm, KFD_MQD_TYPE_CIK_CP);
if (mqd == NULL) {
mutex_unlock(&dqm->lock);
Expand All @@ -810,6 +867,15 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q,
retval = execute_queues_cpsch(dqm, false);
}

/*
* Unconditionally increment this counter, regardless of the queue's
* type or whether the queue is active.
*/
dqm->total_queue_count++;

pr_debug("Total of %d queues are accountable so far\n",
dqm->total_queue_count);

out:
mutex_unlock(&dqm->lock);
return retval;
Expand Down Expand Up @@ -930,6 +996,14 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,

mqd->uninit_mqd(mqd, q->mqd, q->mqd_mem_obj);

/*
* Unconditionally decrement this counter, regardless of the queue's
* type
*/
dqm->total_queue_count--;
pr_debug("Total of %d queues are accountable so far\n",
dqm->total_queue_count);

mutex_unlock(&dqm->lock);

return 0;
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ struct device_queue_manager {
struct list_head queues;
unsigned int processes_count;
unsigned int queue_count;
unsigned int total_queue_count;
unsigned int next_pipe_to_allocate;
unsigned int *allocated_queues;
unsigned int vmid_bitmap;
Expand Down
27 changes: 8 additions & 19 deletions drivers/gpu/drm/amd/amdkfd/kfd_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,10 @@ module_param(sched_policy, int, 0444);
MODULE_PARM_DESC(sched_policy,
"Kernel cmdline parameter that defines the amdkfd scheduling policy");

int max_num_of_processes = KFD_MAX_NUM_OF_PROCESSES_DEFAULT;
module_param(max_num_of_processes, int, 0444);
MODULE_PARM_DESC(max_num_of_processes,
"Kernel cmdline parameter that defines the amdkfd maximum number of supported processes");

int max_num_of_queues_per_process = KFD_MAX_NUM_OF_QUEUES_PER_PROCESS_DEFAULT;
module_param(max_num_of_queues_per_process, int, 0444);
MODULE_PARM_DESC(max_num_of_queues_per_process,
"Kernel cmdline parameter that defines the amdkfd maximum number of supported queues per process");
int max_num_of_queues_per_device = KFD_MAX_NUM_OF_QUEUES_PER_DEVICE_DEFAULT;
module_param(max_num_of_queues_per_device, int, 0444);
MODULE_PARM_DESC(max_num_of_queues_per_device,
"Maximum number of supported queues per device (1 = Minimum, 4096 = default)");

bool kgd2kfd_init(unsigned interface_version,
const struct kfd2kgd_calls *f2g,
Expand Down Expand Up @@ -100,16 +95,10 @@ static int __init kfd_module_init(void)
}

/* Verify module parameters */
if ((max_num_of_processes < 0) ||
(max_num_of_processes > KFD_MAX_NUM_OF_PROCESSES)) {
pr_err("kfd: max_num_of_processes must be between 0 to KFD_MAX_NUM_OF_PROCESSES\n");
return -1;
}

if ((max_num_of_queues_per_process < 0) ||
(max_num_of_queues_per_process >
KFD_MAX_NUM_OF_QUEUES_PER_PROCESS)) {
pr_err("kfd: max_num_of_queues_per_process must be between 0 to KFD_MAX_NUM_OF_QUEUES_PER_PROCESS\n");
if ((max_num_of_queues_per_device < 0) ||
(max_num_of_queues_per_device >
KFD_MAX_NUM_OF_QUEUES_PER_DEVICE)) {
pr_err("kfd: max_num_of_queues_per_device must be between 0 to KFD_MAX_NUM_OF_QUEUES_PER_DEVICE\n");
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdkfd/kfd_pasid.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static DEFINE_MUTEX(pasid_mutex);

int kfd_pasid_init(void)
{
pasid_limit = max_num_of_processes;
pasid_limit = KFD_MAX_NUM_OF_PROCESSES;

pasid_bitmap = kcalloc(BITS_TO_LONGS(pasid_limit), sizeof(long), GFP_KERNEL);
if (!pasid_bitmap)
Expand Down
17 changes: 8 additions & 9 deletions drivers/gpu/drm/amd/amdkfd/kfd_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,19 @@
#define kfd_alloc_struct(ptr_to_struct) \
((typeof(ptr_to_struct)) kzalloc(sizeof(*ptr_to_struct), GFP_KERNEL))

/* Kernel module parameter to specify maximum number of supported processes */
extern int max_num_of_processes;

#define KFD_MAX_NUM_OF_PROCESSES_DEFAULT 32
#define KFD_MAX_NUM_OF_PROCESSES 512
#define KFD_MAX_NUM_OF_QUEUES_PER_PROCESS 1024

/*
* Kernel module parameter to specify maximum number of supported queues
* per process
* Kernel module parameter to specify maximum number of supported queues per
* device
*/
extern int max_num_of_queues_per_process;
extern int max_num_of_queues_per_device;

#define KFD_MAX_NUM_OF_QUEUES_PER_PROCESS_DEFAULT 128
#define KFD_MAX_NUM_OF_QUEUES_PER_PROCESS 1024
#define KFD_MAX_NUM_OF_QUEUES_PER_DEVICE_DEFAULT 4096
#define KFD_MAX_NUM_OF_QUEUES_PER_DEVICE \
(KFD_MAX_NUM_OF_PROCESSES * \
KFD_MAX_NUM_OF_QUEUES_PER_PROCESS)

#define KFD_KERNEL_QUEUE_SIZE 2048

Expand Down
12 changes: 8 additions & 4 deletions drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ static int find_available_queue_slot(struct process_queue_manager *pqm,
pr_debug("kfd: in %s\n", __func__);

found = find_first_zero_bit(pqm->queue_slot_bitmap,
max_num_of_queues_per_process);
KFD_MAX_NUM_OF_QUEUES_PER_PROCESS);

pr_debug("kfd: the new slot id %lu\n", found);

if (found >= max_num_of_queues_per_process) {
if (found >= KFD_MAX_NUM_OF_QUEUES_PER_PROCESS) {
pr_info("amdkfd: Can not open more queues for process with pasid %d\n",
pqm->process->pasid);
return -ENOMEM;
Expand All @@ -76,7 +76,7 @@ int pqm_init(struct process_queue_manager *pqm, struct kfd_process *p)

INIT_LIST_HEAD(&pqm->queues);
pqm->queue_slot_bitmap =
kzalloc(DIV_ROUND_UP(max_num_of_queues_per_process,
kzalloc(DIV_ROUND_UP(KFD_MAX_NUM_OF_QUEUES_PER_PROCESS,
BITS_PER_BYTE), GFP_KERNEL);
if (pqm->queue_slot_bitmap == NULL)
return -ENOMEM;
Expand Down Expand Up @@ -203,6 +203,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
pqn->kq = NULL;
retval = dev->dqm->create_queue(dev->dqm, q, &pdd->qpd,
&q->properties.vmid);
pr_debug("DQM returned %d for create_queue\n", retval);
print_queue(q);
break;
case KFD_QUEUE_TYPE_DIQ:
Expand All @@ -222,7 +223,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
}

if (retval != 0) {
pr_err("kfd: error dqm create queue\n");
pr_debug("Error dqm create queue\n");
goto err_create_queue;
}

Expand All @@ -241,7 +242,10 @@ int pqm_create_queue(struct process_queue_manager *pqm,
err_create_queue:
kfree(pqn);
err_allocate_pqn:
/* check if queues list is empty unregister process from device */
clear_bit(*qid, pqm->queue_slot_bitmap);
if (list_empty(&pqm->queues))
dev->dqm->unregister_process(dev->dqm, &pdd->qpd);
return retval;
}

Expand Down
Loading