Commit e9d1e4f
iommu/arm-smmu-v3: Move the CD generation for S1 domains into a function
Introduce arm_smmu_make_s1_cd() to build the CD from the paging S1 domain,
and reorganize all the places programming S1 domain CD table entries to
call it.
Split arm_smmu_update_s1_domain_cd_entry() from
arm_smmu_update_ctx_desc_devices() so that the S1 path has its own call
chain separate from the unrelated SVA path.
arm_smmu_update_s1_domain_cd_entry() only works on S1 domains attached to
RIDs and refreshes all their CDs. Remove case (3) from
arm_smmu_write_ctx_desc() as it is now handled by directly calling
arm_smmu_write_cd_entry().
Remove the forced clear of the CD during S1 domain attach,
arm_smmu_write_cd_entry() will do this automatically if necessary.
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Michael Shavit <mshavit@google.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/3-v9-5040dc602008+177d7-smmuv3_newapi_p2_jgg@nvidia.com
[will: Drop unused arm_smmu_clean_cd_entry() function]
Signed-off-by: Will Deacon <will@kernel.org>1 parent 78a5fbe commit e9d1e4f
3 files changed
Lines changed: 76 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
56 | 79 | | |
57 | 80 | | |
58 | 81 | | |
| |||
96 | 119 | | |
97 | 120 | | |
98 | 121 | | |
99 | | - | |
| 122 | + | |
100 | 123 | | |
101 | 124 | | |
102 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
1206 | | - | |
1207 | | - | |
| 1206 | + | |
| 1207 | + | |
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
| |||
1269 | 1269 | | |
1270 | 1270 | | |
1271 | 1271 | | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
1275 | 1275 | | |
1276 | 1276 | | |
1277 | 1277 | | |
| |||
1284 | 1284 | | |
1285 | 1285 | | |
1286 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
1287 | 1313 | | |
1288 | 1314 | | |
1289 | 1315 | | |
| |||
1292 | 1318 | | |
1293 | 1319 | | |
1294 | 1320 | | |
1295 | | - | |
1296 | | - | |
1297 | 1321 | | |
1298 | 1322 | | |
1299 | 1323 | | |
1300 | 1324 | | |
1301 | 1325 | | |
1302 | | - | |
1303 | 1326 | | |
1304 | 1327 | | |
1305 | 1328 | | |
| |||
1315 | 1338 | | |
1316 | 1339 | | |
1317 | 1340 | | |
1318 | | - | |
1319 | 1341 | | |
1320 | 1342 | | |
1321 | 1343 | | |
| |||
1328 | 1350 | | |
1329 | 1351 | | |
1330 | 1352 | | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | 1353 | | |
1339 | 1354 | | |
1340 | 1355 | | |
| |||
2633 | 2648 | | |
2634 | 2649 | | |
2635 | 2650 | | |
2636 | | - | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
2637 | 2655 | | |
2638 | 2656 | | |
2639 | 2657 | | |
2640 | 2658 | | |
2641 | | - | |
2642 | | - | |
2643 | | - | |
2644 | | - | |
2645 | | - | |
2646 | | - | |
2647 | | - | |
2648 | | - | |
2649 | | - | |
2650 | 2659 | | |
2651 | 2660 | | |
2652 | | - | |
2653 | | - | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
2654 | 2664 | | |
| 2665 | + | |
2655 | 2666 | | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
2656 | 2670 | | |
2657 | 2671 | | |
2658 | 2672 | | |
| 2673 | + | |
2659 | 2674 | | |
2660 | 2675 | | |
2661 | 2676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
754 | 763 | | |
755 | 764 | | |
756 | 765 | | |
| |||
0 commit comments