Commit 43312b7
iommu/amd: Refactor amd_iommu_domain_enable_v2 to remove locking
The current function to enable IOMMU v2 also lock the domain.
In order to reuse the same code in different code path, in which
the domain has already been locked, refactor the function to separate
the locking from the enabling logic.
Co-developed-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Link: https://lore.kernel.org/r/20220825063939.8360-5-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>1 parent 6b080c4 commit 43312b7
1 file changed
Lines changed: 27 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
2450 | 2451 | | |
2451 | 2452 | | |
2452 | 2453 | | |
2453 | | - | |
| 2454 | + | |
| 2455 | + | |
2454 | 2456 | | |
2455 | | - | |
2456 | | - | |
2457 | | - | |
| 2457 | + | |
2458 | 2458 | | |
2459 | 2459 | | |
2460 | 2460 | | |
| |||
2463 | 2463 | | |
2464 | 2464 | | |
2465 | 2465 | | |
2466 | | - | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
2467 | 2485 | | |
2468 | 2486 | | |
2469 | 2487 | | |
2470 | 2488 | | |
2471 | 2489 | | |
2472 | 2490 | | |
2473 | 2491 | | |
2474 | | - | |
2475 | | - | |
2476 | | - | |
2477 | | - | |
2478 | | - | |
2479 | | - | |
| 2492 | + | |
2480 | 2493 | | |
2481 | 2494 | | |
2482 | | - | |
2483 | | - | |
2484 | | - | |
2485 | | - | |
2486 | | - | |
2487 | | - | |
| 2495 | + | |
| 2496 | + | |
2488 | 2497 | | |
2489 | 2498 | | |
2490 | | - | |
2491 | | - | |
| 2499 | + | |
2492 | 2500 | | |
2493 | 2501 | | |
2494 | 2502 | | |
| |||
0 commit comments