Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67059460 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "iommu: arm-smmu: dump tbu pwr status in tlb sync timeout"

parents 69238bc0 02ce686c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -192,6 +192,7 @@ enum arm_smmu_s2cr_privcfg {
#define ARM_SMMU_CB_ATS1PR		0x800
#define ARM_SMMU_CB_ATSR		0x8f0
#define ARM_SMMU_STATS_SYNC_INV_TBU_ACK 0x25dc
#define ARM_SMMU_TBU_PWR_STATUS         0x2204

#define SCTLR_SHCFG_SHIFT		22
#define SCTLR_SHCFG_MASK		0x3
+5 −4
Original line number Diff line number Diff line
@@ -1103,7 +1103,7 @@ static int __arm_smmu_tlb_sync(struct arm_smmu_device *smmu,
				void __iomem *sync, void __iomem *status)
{
	unsigned int spin_cnt, delay;
	u32 sync_inv_ack;
	u32 sync_inv_ack, tbu_pwr_status;

	writel_relaxed(0, sync);
	for (delay = 1; delay < TLB_LOOP_TIMEOUT; delay *= 2) {
@@ -1116,12 +1116,13 @@ static int __arm_smmu_tlb_sync(struct arm_smmu_device *smmu,
	}
	sync_inv_ack = scm_io_read((unsigned long)(smmu->phys_addr +
				     ARM_SMMU_STATS_SYNC_INV_TBU_ACK));
	tbu_pwr_status = scm_io_read((unsigned long)(smmu->phys_addr +
				     ARM_SMMU_TBU_PWR_STATUS));
	trace_tlbsync_timeout(smmu->dev, 0);
	dev_err_ratelimited(smmu->dev,
			    "TLB sync timed out -- SMMU may be deadlocked, ack 0x%x\n",
			    sync_inv_ack);
			    "TLB sync timed out -- SMMU may be deadlocked ack 0x%x pwr 0x%x\n",
			    sync_inv_ack, tbu_pwr_status);
	BUG_ON(IS_ENABLED(CONFIG_IOMMU_TLBSYNC_DEBUG));

	return -EINVAL;
}