Commit b2f4c0f
iommu/arm-smmu-v3: Make arm_smmu_alloc_cd_ptr()
Only the attach callers can perform an allocation for the CD table entry,
the other callers must not do so, they do not have the correct locking and
they cannot sleep. Split up the functions so this is clear.
arm_smmu_get_cd_ptr() will return pointer to a CD table entry without
doing any kind of allocation.
arm_smmu_alloc_cd_ptr() will allocate the table and any required
leaf.
A following patch will add lockdep assertions to arm_smmu_alloc_cd_ptr()
once the restructuring is completed and arm_smmu_alloc_cd_ptr() is never
called in the wrong context.
Tested-by: Nicolin Chen <[email protected]>
Reviewed-by: Nicolin Chen <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>1 parent af8f0b8 commit b2f4c0f
2 files changed
+39
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
1206 | 1207 | | |
1207 | 1208 | | |
1208 | 1209 | | |
1209 | | - | |
1210 | | - | |
1211 | 1210 | | |
1212 | | - | |
1213 | 1211 | | |
1214 | 1212 | | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
1215 | 1216 | | |
1216 | 1217 | | |
1217 | 1218 | | |
1218 | 1219 | | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1223 | 1234 | | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
1224 | 1244 | | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
1229 | 1253 | | |
1230 | | - | |
1231 | | - | |
| 1254 | + | |
1232 | 1255 | | |
1233 | 1256 | | |
1234 | 1257 | | |
| |||
1344 | 1367 | | |
1345 | 1368 | | |
1346 | 1369 | | |
1347 | | - | |
| 1370 | + | |
1348 | 1371 | | |
1349 | 1372 | | |
1350 | 1373 | | |
| |||
2661 | 2684 | | |
2662 | 2685 | | |
2663 | 2686 | | |
2664 | | - | |
2665 | | - | |
2666 | | - | |
2667 | | - | |
2668 | | - | |
2669 | | - | |
2670 | | - | |
| 2687 | + | |
2671 | 2688 | | |
2672 | 2689 | | |
2673 | 2690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
| 278 | + | |
280 | 279 | | |
281 | 280 | | |
282 | 281 | | |
| |||
0 commit comments