Commit 5a1c759
iommu/arm-smmu-v3: Do not bother impl_ops if IOMMU_VIOMMU_TYPE_ARM_SMMUV3
When viommu type is IOMMU_VIOMMU_TYPE_ARM_SMMUV3, always return or init the
standard struct arm_vsmmu, instead of going through impl_ops that must have
its own viommu type than the standard IOMMU_VIOMMU_TYPE_ARM_SMMUV3.
Given that arm_vsmmu_init() is called after arm_smmu_get_viommu_size(), any
unsupported viommu->type must be a corruption. And it must be a driver bug
that its vsmmu_size and vsmmu_init ops aren't paired. Warn these two cases.
Link: https://patch.msgid.link/r/[email protected]
Suggested-by: Will Deacon <[email protected]>
Acked-by: Will Deacon <[email protected]>
Reviewed-by: Pranjal Shrivastava <[email protected]>
Signed-off-by: Nicolin Chen <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>1 parent ab6bc44 commit 5a1c759
2 files changed
Lines changed: 30 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 423 | + | |
| 424 | + | |
426 | 425 | | |
427 | | - | |
| 426 | + | |
| 427 | + | |
428 | 428 | | |
429 | | - | |
430 | | - | |
| 429 | + | |
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
| |||
447 | 446 | | |
448 | 447 | | |
449 | 448 | | |
450 | | - | |
451 | | - | |
452 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
453 | 453 | | |
454 | | - | |
455 | | - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
456 | 461 | | |
457 | 462 | | |
458 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4703 | 4703 | | |
4704 | 4704 | | |
4705 | 4705 | | |
| 4706 | + | |
4706 | 4707 | | |
4707 | 4708 | | |
4708 | 4709 | | |
| |||
4713 | 4714 | | |
4714 | 4715 | | |
4715 | 4716 | | |
| 4717 | + | |
| 4718 | + | |
| 4719 | + | |
| 4720 | + | |
| 4721 | + | |
| 4722 | + | |
| 4723 | + | |
| 4724 | + | |
| 4725 | + | |
4716 | 4726 | | |
4717 | 4727 | | |
4718 | 4728 | | |
4719 | 4729 | | |
4720 | 4730 | | |
| 4731 | + | |
| 4732 | + | |
| 4733 | + | |
| 4734 | + | |
4721 | 4735 | | |
4722 | 4736 | | |
4723 | 4737 | | |
| |||
0 commit comments