NVIDIA: SAUCE: Revert "[UPSTREAM PENDING] iommu/arm-smmu-v3: add suspend/resume support"

This reverts commit b32a76110cbc6e04c7ca96e0a738b2a7c74f7f37.
New upstream friendly change with other fixes are created in
https://git-master.nvidia.com/r/3223010

http://nvbugs/4267541
http://nvbugs/4638077
http://nvbugs/5088995

Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Signed-off-by: Vishwaroop A <va@nvidia.com>
Acked-by: Noah Wager <noah.wager@canonical.com>
Acked-by: Jacob Martin <jacob.martin@canonical.com>
Signed-off-by: Noah Wager <noah.wager@canonical.com>
This commit is contained in:
Pritesh Raithatha
2024-10-01 17:48:22 +05:30
committed by Noah Wager
parent 33cd05a16a
commit 11a6051481
2 changed files with 9 additions and 24 deletions

View File

@@ -3397,6 +3397,12 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu, bool bypass)
}
}
ret = arm_smmu_setup_irqs(smmu);
if (ret) {
dev_err(smmu->dev, "failed to setup irqs\n");
return ret;
}
if (is_kdump_kernel())
enables &= ~(CR0_EVTQEN | CR0_PRIQEN);
@@ -3793,6 +3799,7 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
resource_size_t ioaddr;
struct arm_smmu_device *smmu;
struct device *dev = &pdev->dev;
bool bypass;
smmu = devm_kzalloc(dev, sizeof(*smmu), GFP_KERNEL);
if (!smmu)
@@ -3808,7 +3815,7 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
}
/* Set bypass mode according to firmware probing result */
smmu->bypass = !!ret;
bypass = !!ret;
/* Base address */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -3872,16 +3879,10 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
arm_smmu_rmr_install_bypass_ste(smmu);
/* Reset the device */
ret = arm_smmu_device_reset(smmu, smmu->bypass);
ret = arm_smmu_device_reset(smmu, bypass);
if (ret)
goto err_disable;
ret = arm_smmu_setup_irqs(smmu);
if (ret) {
dev_err(smmu->dev, "failed to setup irqs\n");
return ret;
}
/* And we're up. Go go go! */
ret = iommu_device_sysfs_add(&smmu->iommu, dev, NULL,
"smmu3.%pa", &ioaddr);
@@ -3935,24 +3936,10 @@ static void arm_smmu_driver_unregister(struct platform_driver *drv)
platform_driver_unregister(drv);
}
static int __maybe_unused arm_smmu_runtime_resume(struct device *dev)
{
struct arm_smmu_device *smmu = dev_get_drvdata(dev);
arm_smmu_device_reset(smmu, smmu->bypass);
return 0;
}
static const struct dev_pm_ops arm_smmu_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(NULL, arm_smmu_runtime_resume)
};
static struct platform_driver arm_smmu_driver = {
.driver = {
.name = "arm-smmu-v3",
.of_match_table = arm_smmu_of_match,
.pm = &arm_smmu_pm_ops,
.suppress_bind_attrs = true,
},
.probe = arm_smmu_device_probe,

View File

@@ -685,8 +685,6 @@ struct arm_smmu_device {
struct rb_root streams;
struct mutex streams_mutex;
bool bypass;
};
struct arm_smmu_stream {