Commit afad94a
iommu: Improve map/unmap sanity checks
The current checks for the __IOMMU_DOMAIN_PAGING capability seem a
bit stifled, since it is quite likely now that a non-paging domain
won't have a pgsize_bitmap and/or mapping ops, and thus get caught
by the earlier condition anyway. Swap them around to test the more
fundamental condition first, then we can reasonably also upgrade
the other to a WARN_ON, since if a driver does ever expose a paging
domain without the means to actually page, it's clearly very broken.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/524db1ec0139c964d26928a6a264945aa66d010c.1694525662.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>1 parent bd111e9 commit afad94a
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2519 | 2519 | | |
2520 | 2520 | | |
2521 | 2521 | | |
2522 | | - | |
2523 | | - | |
2524 | | - | |
2525 | 2522 | | |
2526 | 2523 | | |
2527 | 2524 | | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
2528 | 2528 | | |
2529 | 2529 | | |
2530 | 2530 | | |
| |||
2602 | 2602 | | |
2603 | 2603 | | |
2604 | 2604 | | |
2605 | | - | |
| 2605 | + | |
2606 | 2606 | | |
2607 | 2607 | | |
2608 | | - | |
| 2608 | + | |
2609 | 2609 | | |
2610 | 2610 | | |
2611 | 2611 | | |
| |||
0 commit comments