Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34B1CC433FE for ; Sat, 27 Nov 2021 02:49:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351440AbhK0CwP (ORCPT ); Fri, 26 Nov 2021 21:52:15 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:53750 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S234464AbhK0CuN (ORCPT ); Fri, 26 Nov 2021 21:50:13 -0500 X-UUID: 63097bdb89564466aacb8ffc82d8cb9c-20211127 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=ujgxNDgOxn13iafpFO6sRZICJ73MLq1oFrLOiv1fYeY=; b=bPmANuoT3cfKXUNqiiCIKIBt36G5QsT5X1foyd6PeX8RDglm4eoXsdsdzOiQLfyxvLnjJUNQQ7x+RBMns+IqBm5AIbKu7ltcdy/u9XRkTjZNLyVeNg2nXZyZCj/z9wMAZRwagN5KI/8k1+yQZ73y7AJ7TWxNAecP+bhl8z43yow=; X-UUID: 63097bdb89564466aacb8ffc82d8cb9c-20211127 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1665839108; Sat, 27 Nov 2021 10:46:57 +0800 Received: from mtkexhb02.mediatek.inc (172.21.101.103) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 27 Nov 2021 10:46:55 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkexhb02.mediatek.inc (172.21.101.103) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 27 Nov 2021 10:46:55 +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; Sat, 27 Nov 2021 10:46:54 +0800 Message-ID: Subject: Re: [PATCH 2/2] iommu/mediatek: always check runtime PM status in tlb flush range callback From: Yong Wu To: Dafna Hirschfeld , CC: Sebastian Reichel , , Joerg Roedel , Will Deacon , Matthias Brugger , "moderated list:MEDIATEK IOMMU DRIVER" , "moderated list:ARM/Mediatek SoC support" , "open list" , Date: Sat, 27 Nov 2021 10:46:54 +0800 In-Reply-To: <20211122104400.4160-3-dafna.hirschfeld@collabora.com> References: <20211122104400.4160-1-dafna.hirschfeld@collabora.com> <20211122104400.4160-3-dafna.hirschfeld@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 T24gTW9uLCAyMDIxLTExLTIyIGF0IDEyOjQ0ICswMjAwLCBEYWZuYSBIaXJzY2hmZWxkIHdyb3Rl Og0KPiBGcm9tOiBTZWJhc3RpYW4gUmVpY2hlbCA8c2ViYXN0aWFuLnJlaWNoZWxAY29sbGFib3Jh LmNvbT4NCj4gDQo+IEluIGNhc2Ugb2YgdjRsMl9yZXFidWZzKCkgaXQgaXMgcG9zc2libGUsIHRo YXQgYSBUTEIgZmx1c2ggaXMgZG9uZQ0KPiB3aXRob3V0IHJ1bnRpbWUgUE0gYmVpbmcgZW5hYmxl ZC4gSW4gdGhhdCBjYXNlIHRoZSAiUGFydGlhbCBUTEIgZmx1c2gNCj4gdGltZWQgb3V0LCBmYWxs aW5nIGJhY2sgdG8gZnVsbCBmbHVzaCIgd2FybmluZyBpcyBwcmludGVkLg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