Commit 13abe4f
iommu/arm-smmu-v3: Allocate the CD table entry in advance
Avoid arm_smmu_attach_dev() having to undo the changes to the
smmu_domain->devices list, acquire the cdptr earlier so we don't need to
handle that error.
Now there is a clear break in arm_smmu_attach_dev() where all the
prep-work has been done non-disruptively and we commit to making the HW
change, which cannot fail.
This completes transforming arm_smmu_attach_dev() so that it does not
disturb the HW if it fails.
Tested-by: Nicolin Chen <[email protected]>
Tested-by: Shameer Kolothum <[email protected]>
Reviewed-by: Michael Shavit <[email protected]>
Reviewed-by: Nicolin Chen <[email protected]>
Reviewed-by: Mostafa Saleh <[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 b2f4c0f commit 13abe4f
1 file changed
+8
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2635 | 2635 | | |
2636 | 2636 | | |
2637 | 2637 | | |
| 2638 | + | |
2638 | 2639 | | |
2639 | 2640 | | |
2640 | 2641 | | |
| |||
2663 | 2664 | | |
2664 | 2665 | | |
2665 | 2666 | | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
2666 | 2673 | | |
2667 | 2674 | | |
2668 | 2675 | | |
| |||
2682 | 2689 | | |
2683 | 2690 | | |
2684 | 2691 | | |
2685 | | - | |
2686 | | - | |
2687 | | - | |
2688 | | - | |
2689 | | - | |
2690 | | - | |
2691 | | - | |
2692 | 2692 | | |
2693 | 2693 | | |
2694 | 2694 | | |
| |||
2705 | 2705 | | |
2706 | 2706 | | |
2707 | 2707 | | |
2708 | | - | |
2709 | | - | |
2710 | | - | |
2711 | | - | |
2712 | | - | |
2713 | | - | |
2714 | | - | |
2715 | | - | |
2716 | 2708 | | |
2717 | | - | |
| 2709 | + | |
2718 | 2710 | | |
2719 | 2711 | | |
2720 | 2712 | | |
| |||
0 commit comments