According to the conversion in the following link:
https://lore.kernel.org/linux-iommu/20231020135501.GG3952@xxxxxxxxxx/
The enforce_cache_coherency should be set/enforced in the hwpt allocation
routine. The iommu driver in its attach_dev() op should decide whether to
reject or not a device that doesn't match with the configuration of cache
coherency. Drop the enforce_cache_coherency piece in attach(), so it will
be called only in the allocation routine. Then, drop it in the header and
mark it as a static function.
Cc: stable@xxxxxxxxxxxxxxx
Fixes: 17bad52708b4 ("iommufd: Add enforced_cache_coherency to iommufd_hw_pagetable_alloc()")
Suggested-by: Tian, Kevin <kevin.tian@xxxxxxxxx>
Signed-off-by: Nicolin Chen <nicolinc@xxxxxxxxxx>
---
drivers/iommu/iommufd/device.c | 7 -------
drivers/iommu/iommufd/hw_pagetable.c | 2 +-
drivers/iommu/iommufd/iommufd_private.h | 1 -
3 files changed, 1 insertion(+), 9 deletions(-)