mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
iommu: hack for disable rockchip iommu
Get iommu_ops from platform bus of dev if domain is NULL to avoid kernel crash Change-Id: I5554b06a450805fb3812f1ade60f335efa4d2a4e Signed-off-by: Simon Xue <xxm@rock-chips.com>
This commit is contained in:
@@ -1321,6 +1321,13 @@ static int __iommu_attach_device(struct iommu_domain *domain,
|
||||
struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Hack for disable iommu */
|
||||
if (!domain) {
|
||||
ret = dev->bus->iommu_ops->attach_dev(domain, dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((domain->ops->is_attach_deferred != NULL) &&
|
||||
domain->ops->is_attach_deferred(domain, dev))
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user