Resolve locking issue for non-sleepable context in the mlx5core.
Code inspection reveals the busdma unload and free functions do not write to the belonging dma tag and does not need to be serialized. This allows mlx5_fwp_free() to be called from software interrupt context. MFC after: 3 days Sponsored by: Mellanox Technologies
This commit is contained in:
parent
1d4905b5b0
commit
713dd5cb9e
@ -190,13 +190,10 @@ mlx5_fwp_free(struct mlx5_fw_page *fwp)
|
||||
num = fwp->numpages;
|
||||
dev = fwp->dev;
|
||||
|
||||
/* serialize unloading the DMA maps */
|
||||
sx_xlock(&dev->cmd.dma_sx);
|
||||
while (num--) {
|
||||
bus_dmamap_unload(dev->cmd.dma_tag, fwp[num].dma_map);
|
||||
bus_dmamem_free(dev->cmd.dma_tag, fwp[num].virt_addr, fwp[num].dma_map);
|
||||
}
|
||||
sx_xunlock(&dev->cmd.dma_sx);
|
||||
|
||||
kfree(fwp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user