Commit caac3d0
committed
cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT
JIRA: https://issues.redhat.com/browse/RHEL-26081
Upstream Status: Posted https://lore.kernel.org/all/20240201233400.3394996-1-cleech@redhat.com/
Author: Chris Leech <cleech@redhat.com>
Date: Thu Feb 1 15:33:58 2024 -0800
cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT
Use the UIO_MEM_DMA_COHERENT type to properly handle mmap for
dma_alloc_coherent buffers.
The cnic l2_ring and l2_buf mmaps have caused page refcount issues as
the dma_alloc_coherent no longer provide __GFP_COMP allocation as per
commit "dma-mapping: reject __GFP_COMP in dma_alloc_attrs".
Fix this by having the uio device use dma_mmap_coherent.
The bnx2 and bnx2x status block allocations are also dma_alloc_coherent,
and should use dma_mmap_coherent. They don't allocate multiple pages,
but this interface does not work correctly with an iommu enabled unless
dma_mmap_coherent is used.
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Chris Leech <cleech@redhat.com>1 parent ba126da commit caac3d0
File tree
5 files changed
+22
-8
lines changed- drivers/net/ethernet/broadcom
- bnx2x
5 files changed
+22
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14900 | 14900 | | |
14901 | 14901 | | |
14902 | 14902 | | |
| 14903 | + | |
14903 | 14904 | | |
14904 | 14905 | | |
14905 | 14906 | | |
| 14907 | + | |
14906 | 14908 | | |
14907 | 14909 | | |
14908 | 14910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
| 1110 | + | |
1110 | 1111 | | |
1111 | | - | |
| 1112 | + | |
1112 | 1113 | | |
1113 | | - | |
| 1114 | + | |
1114 | 1115 | | |
1115 | 1116 | | |
1116 | 1117 | | |
1117 | 1118 | | |
1118 | 1119 | | |
1119 | 1120 | | |
1120 | 1121 | | |
1121 | | - | |
| 1122 | + | |
| 1123 | + | |
1122 | 1124 | | |
1123 | 1125 | | |
1124 | 1126 | | |
1125 | 1127 | | |
1126 | | - | |
| 1128 | + | |
| 1129 | + | |
1127 | 1130 | | |
1128 | 1131 | | |
1129 | | - | |
1130 | | - | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1131 | 1136 | | |
1132 | 1137 | | |
1133 | | - | |
1134 | | - | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1135 | 1142 | | |
1136 | 1143 | | |
1137 | 1144 | | |
| |||
1313 | 1320 | | |
1314 | 1321 | | |
1315 | 1322 | | |
| 1323 | + | |
1316 | 1324 | | |
1317 | 1325 | | |
1318 | 1326 | | |
| |||
5324 | 5332 | | |
5325 | 5333 | | |
5326 | 5334 | | |
| 5335 | + | |
5327 | 5336 | | |
5328 | 5337 | | |
5329 | 5338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| |||
0 commit comments