Commit 2c3262f
iommu/vt-d: Acquiring lock in domain ID allocation helpers
The iommu->lock is used to protect the per-IOMMU domain ID resource.
Moving the lock into the ID alloc/free helpers makes the code more
compact. At the same time, the device_domain_lock is irrelevant to
the domain ID resource, remove its assertion as well.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20220706025524.2904370-7-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>1 parent ffd5869 commit 2c3262f
1 file changed
Lines changed: 9 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1779 | 1779 | | |
1780 | 1780 | | |
1781 | 1781 | | |
1782 | | - | |
1783 | 1782 | | |
1784 | 1783 | | |
1785 | 1784 | | |
1786 | 1785 | | |
1787 | | - | |
1788 | | - | |
1789 | | - | |
1790 | | - | |
| 1786 | + | |
1791 | 1787 | | |
| 1788 | + | |
1792 | 1789 | | |
1793 | 1790 | | |
1794 | 1791 | | |
| |||
1797 | 1794 | | |
1798 | 1795 | | |
1799 | 1796 | | |
1800 | | - | |
| 1797 | + | |
| 1798 | + | |
1801 | 1799 | | |
1802 | 1800 | | |
1803 | 1801 | | |
| |||
1806 | 1804 | | |
1807 | 1805 | | |
1808 | 1806 | | |
1809 | | - | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
1810 | 1810 | | |
1811 | 1811 | | |
1812 | 1812 | | |
1813 | 1813 | | |
1814 | 1814 | | |
1815 | 1815 | | |
1816 | 1816 | | |
1817 | | - | |
1818 | | - | |
1819 | | - | |
| 1817 | + | |
1820 | 1818 | | |
1821 | 1819 | | |
1822 | 1820 | | |
1823 | 1821 | | |
1824 | 1822 | | |
1825 | 1823 | | |
1826 | 1824 | | |
| 1825 | + | |
1827 | 1826 | | |
1828 | 1827 | | |
1829 | 1828 | | |
| |||
2472 | 2471 | | |
2473 | 2472 | | |
2474 | 2473 | | |
2475 | | - | |
2476 | 2474 | | |
2477 | | - | |
2478 | 2475 | | |
2479 | 2476 | | |
2480 | 2477 | | |
| |||
4178 | 4175 | | |
4179 | 4176 | | |
4180 | 4177 | | |
4181 | | - | |
4182 | | - | |
4183 | 4178 | | |
4184 | | - | |
4185 | 4179 | | |
4186 | 4180 | | |
4187 | 4181 | | |
| |||
0 commit comments