From: Joerg Roedel Date: Thu, 20 Dec 2018 09:05:20 +0000 (+0100) Subject: Merge branches 'iommu/fixes', 'arm/renesas', 'arm/mediatek', 'arm/tegra', 'arm/omap... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=03ebe48e235f17d70f34890d34d8153b8a84c02e;p=linux.git Merge branches 'iommu/fixes', 'arm/renesas', 'arm/mediatek', 'arm/tegra', 'arm/omap', 'arm/smmu', 'x86/vt-d', 'x86/amd' and 'core' into next --- 03ebe48e235f17d70f34890d34d8153b8a84c02e diff --cc drivers/iommu/arm-smmu.c index 5a28ae892504a,5a28ae892504a,5a28ae892504a,5a28ae892504a,5a28ae892504a,ba18d89d4732f,5a28ae892504a,5a28ae892504a,44bff7de5fe2e..af18a7e7f9172 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@@@@@@@@@ -1445,10 -1445,10 -1445,10 -1445,10 -1445,10 -1515,10 -1445,10 -1445,10 -1450,10 +1520,10 @@@@@@@@@@ out_free static void arm_smmu_remove_device(struct device *dev) { -------- struct iommu_fwspec *fwspec = dev->iommu_fwspec; ++++++++ struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); struct arm_smmu_master_cfg *cfg; struct arm_smmu_device *smmu; ----- --- +++++ +++ int ret; if (!fwspec || fwspec->ops != &arm_smmu_ops) return; @@@@@@@@@@ -1962,9 -1962,9 -1962,9 -1962,9 -1962,9 -2040,10 -1962,9 -1962,9 -1967,8 +2045,9 @@@@@@@@@@ static const struct of_device_id arm_sm { .compatible = "arm,mmu-401", .data = &arm_mmu401 }, { .compatible = "arm,mmu-500", .data = &arm_mmu500 }, { .compatible = "cavium,smmu-v2", .data = &cavium_smmuv2 }, +++++ +++ { .compatible = "qcom,smmu-v2", .data = &qcom_smmuv2 }, { }, }; -------- MODULE_DEVICE_TABLE(of, arm_smmu_of_match); #ifdef CONFIG_ACPI static int acpi_smmu_get_data(u32 model, struct arm_smmu_device *smmu) @@@@@@@@@@ -2234,25 -2234,25 -2234,25 -2234,25 -2234,25 -2335,70 -2234,25 -2234,25 -2238,19 +2339,63 @@@@@@@@@@ static void arm_smmu_device_shutdown(st if (!bitmap_empty(smmu->context_map, ARM_SMMU_MAX_CBS)) dev_err(&pdev->dev, "removing device with active domains!\n"); +++++ +++ arm_smmu_rpm_get(smmu); /* Turn the thing off */ writel(sCR0_CLIENTPD, ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0); ----- -- return 0; +++++ +++ arm_smmu_rpm_put(smmu); +++++ +++ +++++ +++ if (pm_runtime_enabled(smmu->dev)) +++++ +++ pm_runtime_force_suspend(smmu->dev); +++++ +++ else +++++ +++ clk_bulk_disable(smmu->num_clks, smmu->clks); +++++ +++ +++++ +++ clk_bulk_unprepare(smmu->num_clks, smmu->clks); - - return 0; - } - - static void arm_smmu_device_shutdown(struct platform_device *pdev) - { - arm_smmu_device_remove(pdev); } ----- -- static void arm_smmu_device_shutdown(struct platform_device *pdev) -static int __maybe_unused arm_smmu_pm_resume(struct device *dev) +++++ +++static int __maybe_unused arm_smmu_runtime_resume(struct device *dev) { ----- -- arm_smmu_device_remove(pdev); +++++ ++ struct arm_smmu_device *smmu = dev_get_drvdata(dev); +++++ +++ int ret; +++++ +++ +++++ +++ ret = clk_bulk_enable(smmu->num_clks, smmu->clks); +++++ +++ if (ret) +++++ +++ return ret; +++++ ++ +++++ ++ arm_smmu_device_reset(smmu); +++++ +++ +++++ ++ return 0; } ----- -- static int __maybe_unused arm_smmu_pm_resume(struct device *dev) -static SIMPLE_DEV_PM_OPS(arm_smmu_pm_ops, NULL, arm_smmu_pm_resume); +++++ +++static int __maybe_unused arm_smmu_runtime_suspend(struct device *dev) +{ + struct arm_smmu_device *smmu = dev_get_drvdata(dev); + ----- -- arm_smmu_device_reset(smmu); +++++ +++ clk_bulk_disable(smmu->num_clks, smmu->clks); +++++ +++ + return 0; +} + ----- -- static SIMPLE_DEV_PM_OPS(arm_smmu_pm_ops, NULL, arm_smmu_pm_resume); +++++ +++static int __maybe_unused arm_smmu_pm_resume(struct device *dev) +++++ +++{ +++++ +++ if (pm_runtime_suspended(dev)) +++++ +++ return 0; +++++ +++ +++++ +++ return arm_smmu_runtime_resume(dev); +++++ +++} +++++ +++ +++++ +++static int __maybe_unused arm_smmu_pm_suspend(struct device *dev) +++++ +++{ +++++ +++ if (pm_runtime_suspended(dev)) +++++ +++ return 0; +++++ +++ +++++ +++ return arm_smmu_runtime_suspend(dev); +++++ +++} +++++ +++ +++++ +++static const struct dev_pm_ops arm_smmu_pm_ops = { +++++ +++ SET_SYSTEM_SLEEP_PM_OPS(arm_smmu_pm_suspend, arm_smmu_pm_resume) +++++ +++ SET_RUNTIME_PM_OPS(arm_smmu_runtime_suspend, +++++ +++ arm_smmu_runtime_resume, NULL) +++++ +++}; static struct platform_driver arm_smmu_driver = { .driver = { diff --cc drivers/iommu/ipmmu-vmsa.c index ddf3a492e1d59,f6c4199970871,b98a031895803,b98a031895803,b98a031895803,b98a031895803,b98a031895803,b98a031895803,4b264b63035b4..7a4529c61c19f --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@@@@@@@@@ -750,17 -747,13 -747,17 -747,17 -747,17 -747,17 -747,17 -747,17 -751,18 +754,14 @@@@@@@@@@ static int ipmmu_init_platform_device(s if (!ipmmu_pdev) return -ENODEV; -------- dev->iommu_fwspec->iommu_priv = platform_get_drvdata(ipmmu_pdev); - ------ return 0; - ------ } ++++++++ fwspec->iommu_priv = platform_get_drvdata(ipmmu_pdev); + - ------ static bool ipmmu_slave_whitelist(struct device *dev) - ------ { - ------ /* By default, do not allow use of IPMMU */ - ------ return false; + ++++++ return 0; } -static bool ipmmu_slave_whitelist(struct device *dev) -{ - /* By default, do not allow use of IPMMU */ - return false; -} - static const struct soc_device_attribute soc_rcar_gen3[] = { + +++++++ { .soc_id = "r8a774a1", }, + +++++++ { .soc_id = "r8a774c0", }, { .soc_id = "r8a7795", }, { .soc_id = "r8a7796", }, { .soc_id = "r8a77965", },