From 5d8d9ab1e3bf3e4437b36cda436988100ccf7a44 Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 2 Mar 2021 01:34:43 +0000 Subject: [PATCH] Do *not* delay while waiting for IOTLB invalidation to complete. A 1ms delay is awful in a hot path, and the SMMU is actually quite quick on invalidation, so simply removing the delay is worth a thousand roses. Found with mental support from dlg@ (and btrace) --- sys/arch/arm64/dev/smmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/arch/arm64/dev/smmu.c b/sys/arch/arm64/dev/smmu.c index 5be66346c1c..0b206a63875 100644 --- a/sys/arch/arm64/dev/smmu.c +++ b/sys/arch/arm64/dev/smmu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smmu.c,v 1.3 2021/03/01 21:38:20 patrick Exp $ */ +/* $OpenBSD: smmu.c,v 1.4 2021/03/02 01:34:43 patrick Exp $ */ /* * Copyright (c) 2008-2009,2014-2016 Dale Rahn * Copyright (c) 2021 Patrick Wildt @@ -389,7 +389,6 @@ smmu_tlb_sync_global(struct smmu_softc *sc) if ((smmu_gr0_read_4(sc, SMMU_STLBGSTATUS) & SMMU_STLBGSTATUS_GSACTIVE) == 0) return; - delay(1000); } printf("%s: global TLB sync timeout\n", @@ -407,7 +406,6 @@ smmu_tlb_sync_context(struct smmu_domain *dom) if ((smmu_cb_read_4(sc, dom->sd_cb_idx, SMMU_CB_TLBSTATUS) & SMMU_CB_TLBSTATUS_SACTIVE) == 0) return; - delay(1000); } printf("%s: context TLB sync timeout\n", -- 2.20.1