Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4143380pxb; Sun, 24 Oct 2021 21:12:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxae3t8+EV1jNtAmrRjlrPRMIjEi7NSDIDx1QJqqhWfH5lD3W0G95kuDdPq3BoSlAhT8DWb X-Received: by 2002:a17:907:20ac:: with SMTP id pw12mr14725571ejb.449.1635135135107; Sun, 24 Oct 2021 21:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635135135; cv=none; d=google.com; s=arc-20160816; b=NQTTNnIUx99vw/lHgVR+iqEI+Y8kjhvT1RHUljjoo96NJIF4BmwRmymZpTjgrToMpH i2myiiWngIsAutJ6tbSnP0B68LIoO+PG9idtoZxpapC6TKw5FcjK5WgW4GXGOo3ZzF6O UIYUgf6UcOqIwUDpX+oc1y+g4jo4hvOHvASzM1D9NmmxWVSqIApYJWyX/GK+sd5JrJ9/ FxBXRzYsx24F9LekLI6Cjx1hrWQHwguha8Va5sAdIZ4xWdoTJj4D1dtzI8Vot9ZBB57+ pAL+Mf7ZE+yNKNrH+wAoB9ueZyR/cwIjPWuinLGcT+gBaBHwwXlczJAktq0gBBO3C6Y6 Vn9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=ccPzK7FNitJAyHQG9gzX9D65Nz6meMuwCPEHC4/A0GA=; b=nrayrDhCmpnYT2H9hIPHI2aMjNNW1etJrp7L89EoFYNIn7OvFiy1FE1OM+2OG2aeJw hxC+hvdHmO6brlIIrxvzNrA3RXbJw9Xvc1i07y24/2SSAyXC4eaJpQX+WdG6hOKD+AO5 hxqDt8Q6Q2z2Lp09CSKulXdCudejkfVkUTn8xH+ILYaKgcC2/Nx5+fJUd6JFFfC4GHIW 1YjyhV9s4d60WopHS9z949dYJWFFYMcv92IAifJBxsalchs3EZSlXEpjXdT+VtxJlT6G 4ocSe2y7Zr0Um9MfhGn/MExtSf2IeEQyF9wXCRG8bd8K8wYtIGpbw5+l94SsmH/UIVK+ ViGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=r5seQ1fG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si11157488edl.512.2021.10.24.21.11.50; Sun, 24 Oct 2021 21:12:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=r5seQ1fG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230491AbhJYEGW (ORCPT + 99 others); Mon, 25 Oct 2021 00:06:22 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:55208 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229379AbhJYEGW (ORCPT ); Mon, 25 Oct 2021 00:06:22 -0400 X-UUID: 6658fb226bc848409323020410b70184-20211025 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=ccPzK7FNitJAyHQG9gzX9D65Nz6meMuwCPEHC4/A0GA=; b=r5seQ1fGfzsuTK8P0fgBSzHG20y0QJCY6I3lVZpilypgZhQW7W/sJ56QAib/aRno9IthBvuzl8Aym7bKLG7kXC4YrnHSiei8y3P+8Fdqt6iolRRP/ECQKKcmVAAxIZhAPUK5fDgfPuti4Q8DPOdq71dS/GOKfAu93IXb7q1jvss=; X-UUID: 6658fb226bc848409323020410b70184-20211025 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1449531537; Mon, 25 Oct 2021 12:03:54 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Mon, 25 Oct 2021 12:03:54 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 25 Oct 2021 12:03:53 +0800 Message-ID: Subject: Re: [PATCH v3 13/33] iommu/mediatek: Remove the power status checking in tlb flush all From: Yong Wu To: Dafna Hirschfeld , Joerg Roedel , Rob Herring , Matthias Brugger , Will Deacon , Robin Murphy CC: Krzysztof Kozlowski , Tomasz Figa , , , , , , , Hsin-Yi Wang , , , , , Collabora Kernel ML Date: Mon, 25 Oct 2021 12:03:53 +0800 In-Reply-To: <6cff0b97-b861-e02d-e76f-2510c962c452@collabora.com> References: <20210923115840.17813-1-yong.wu@mediatek.com> <20210923115840.17813-14-yong.wu@mediatek.com> <6cff0b97-b861-e02d-e76f-2510c962c452@collabora.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gRnJpLCAyMDIxLTEwLTIyIGF0IDE2OjAzICsw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