From: Jan Kiszka <[email protected]>

It still contained fragments of the Linux back-off mechanism which was
removed already. Adjust the loop counters to the new iteration count.
Will wait at least one second now.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/arch/arm64/smmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hypervisor/arch/arm64/smmu.c b/hypervisor/arch/arm64/smmu.c
index 25084b16..347ce223 100644
--- a/hypervisor/arch/arm64/smmu.c
+++ b/hypervisor/arch/arm64/smmu.c
@@ -185,14 +185,14 @@ static void arm_smmu_write_s2cr(struct arm_smmu_device 
*smmu, int idx,
 static int arm_smmu_tlb_sync_global(struct arm_smmu_device *smmu)
 {
        void *base = ARM_SMMU_GR0(smmu);
-       unsigned int delay, i;
+       unsigned int loop, n;
 
        mmio_write32(base + ARM_SMMU_GR0_sTLBGSYNC, 0);
-       for (delay = 1; delay < TLB_LOOP_TIMEOUT; delay *= 2) {
+       for (loop = 0; loop < TLB_LOOP_TIMEOUT; loop++) {
                if (!(mmio_read32(base + ARM_SMMU_GR0_sTLBGSTATUS) &
                      sTLBGSTATUS_GSACTIVE))
                        return 0;
-               for (i = 0; i < 10 * 1000000; i++)
+               for (n = 0; n < 1000; n++)
                        cpu_relax();
        }
        printk("TLB sync timed out -- SMMU may be deadlocked\n");
-- 
2.26.2

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/a910f9b26572cd64462b16a6345288062a5fd844.1601838005.git.jan.kiszka%40siemens.com.

Reply via email to