Date: Thu, 3 Aug 2017 09:14:43 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321984 - head/sys/dev/mlx5/mlx5_core Message-ID: <201708030914.v739Ehds034698@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu Aug 3 09:14:43 2017 New Revision: 321984 URL: https://svnweb.freebsd.org/changeset/base/321984 Log: 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 Modified: head/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Thu Aug 3 09:11:51 2017 (r321983) +++ head/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c Thu Aug 3 09:14:43 2017 (r321984) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708030914.v739Ehds034698>