On 2022-06-23 09:03, Joerg Roedel wrote:
On Fri, Jun 03, 2022 at 04:51:03PM +0530, Vasant Hegde wrote:
Fix below sparse warning:
   CHECK   drivers/iommu/amd/iommu.c
   drivers/iommu/amd/iommu.c:73:24: warning: symbol 'amd_iommu_ops' was not 
declared. Should it be static?

Also we are going to introduce v2 page table which has different
pgsize_bitmaps. Hence remove 'const' qualifier.

I am not a fan of removing the consts. Please use separate ops
structures for v2 page-tables and make then const as well. This probably
also has some optimization potential in the future when we can make the
ops call-back functions page-table specific.

TBH it's probably time to retire iommu_ops->pgsize_bitmap anyway. At the very least it would be logical to move it to iommu_domain_ops now, but maybe we could skip ahead and just rely on drivers initialising domain->pgsize_bitmap directly in their .domain_alloc?

(and FWIW I'm leaning towards the same for the domain->ops as well; the more I look at ops->default_domain_ops, the more it starts looking like a stupid mess... my stupid mess... sorry about that)

Robin.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to