From: patrick Date: Tue, 2 Mar 2021 01:34:43 +0000 (+0000) Subject: Do *not* delay while waiting for IOTLB invalidation to complete. A 1ms X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5d8d9ab1e3bf3e4437b36cda436988100ccf7a44;p=openbsd 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) --- 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",