arm-smmu: remove reset logic for GVM

Avoid resetting all SME's and context banks which are used by host.

Change-Id: I28175186c5d996bc716ba305b6b9f723feeba294
Signed-off-by: vagdhan kumar kanukurthi <quic_vagdhank@quicinc.com>
This commit is contained in:
vagdhan kumar kanukurthi 2023-10-31 15:33:47 +05:30
parent 83d3f0f03e
commit e1e2de9ba2

View File

@ -2916,29 +2916,17 @@ static struct qcom_iommu_ops arm_smmu_ops = {
static void arm_smmu_device_reset(struct arm_smmu_device *smmu)
{
#if !defined CONFIG_QTI_QUIN_GVM
int i;
#endif
u32 reg;
/* clear global FSR */
reg = arm_smmu_gr0_read(smmu, ARM_SMMU_GR0_sGFSR);
arm_smmu_gr0_write(smmu, ARM_SMMU_GR0_sGFSR, reg);
#if defined CONFIG_QTI_QUIN_GVM
/*
* Reset stream mapping groups for unused sme's: Initial values mark all SMRn as
* invalid and all S2CRn as bypass unless overridden.
*/
for (i = 0; i < smmu->num_mapping_groups; ++i)
if (!smmu->s2crs[i].pinned)
arm_smmu_write_sme(smmu, i);
/* Make sure only unpinned context banks are disabled and clear CB_FSR */
for (i = 0; i < smmu->num_context_banks; ++i)
if (!smmu->s2crs[i].pinned) {
arm_smmu_write_context_bank(smmu, i);
arm_smmu_cb_write(smmu, i, ARM_SMMU_CB_FSR, ARM_SMMU_FSR_FAULT);
}
#else
#if !defined CONFIG_QTI_QUIN_GVM
/*
* Reset stream mapping groups: Initial values mark all SMRn as
* invalid and all S2CRn as bypass unless overridden.