iommu/arm-smmu-v3: Disable ECMDQ before the system is suspended
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5TE5L CVE: NA ------------------------------------------------------------------------- We are currently not doing anything in arm_smmu_suspend(), but ECMDQ may have executed some commands. In arm_smmu_device_reset(), we assume that the index value of prod and cons are zero. Therefore, when ecmdq is enabled again, the index values of prod and cons are inconsistent. As a result, the hardware mistakenly considers that there are commands in the queue and executes them and reports invalid commands. On the other hand, when we disable ecmdq, we need to wait for ENACK to become 0 before writing cons. Disable ECMDQ in arm_smmu_suspend() to save energy. Fixes: 4b009f70 ("iommu/arm-smmu-v3: Add suspend and resume support") Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com> Tested-by: NLiyan Liu <liuliyan6@h-partners.com> Reviewed-by: NHanjun Guo <guohanjun@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录