Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1883224pxk; Sat, 5 Sep 2020 01:14:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZd8aIOND5DKdLNqT/KUNX1h0V4uXAZg+CAOmIN9lj1WcAOlPy13iOa2JZV0EGt0+rJTj7 X-Received: by 2002:a05:6402:3102:: with SMTP id dc2mr12871843edb.152.1599293651767; Sat, 05 Sep 2020 01:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599293651; cv=none; d=google.com; s=arc-20160816; b=dSmBpzBgSOGzZ6XRW06Fc1ARIztypjtasgCOyqzRI5xX3OS0c2qLt3CP2U5jGtxnsc KtT3OVMg7e4cPpR5b792/SAPxXnewkCAIQa5Np77l2H2CnFX+xwRjINUW8v/XBccPWeX HBTyKvF1bwRG3IeRwGIdWYjZd1KaXPHzKiPMVg0Nf254rPsQQwi+RhtRWMx+ZM2VJkmw vNyS4tFqrg1+8Rbi6ivRKVth1uvmPTlfrqF6vP4DKJRqlQjaT0CkGa1mK9SuMzQvFbr8 upy8Jv385OKBQyaVbDUZ7Tt+ZSnQemBG/qSlMGfuYhAECKxA9IE8TC+f6i1K0OCVgzKR B4CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fVTu26LyCKzBlLT+q4InPS1WNj1J5XPYdCFSzH70Ufg=; b=EobSQZ/N4ICUUXm7CIu/q5bQFFD6Ca4e5eukg5XrsD+Foz41LYmmat4k18krq8rzlU leJy04vMGBoOSBgeSPJWfTKdlh7kb7H+qjnwBkznpljAjLjv2XBPJZ9E1vyhEaNQNejY hLm79EgL8xyplahelWfGpLf21C/r0QUNxM+IQpvPaGF00aBfqg42YDLCLmT74E8Hk2cF Mw04byz8BH5E6m+ePuO0rP9A7npYkjqjP1lnnbki+Gx+jo/ohD94oL0YeqsRpjQZpeXP zA75vsukcgZdbw2+I9vjKLWGZuTrnJAsy8vIWfj5ygp8xWHXSlfODujF6IF6lVMiAsWo HoMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ATDR5DIR; 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 v6si5298255edt.456.2020.09.05.01.13.48; Sat, 05 Sep 2020 01:14:11 -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=ATDR5DIR; 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 S1728426AbgIEIMk (ORCPT + 99 others); Sat, 5 Sep 2020 04:12:40 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:15287 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728421AbgIEIMh (ORCPT ); Sat, 5 Sep 2020 04:12:37 -0400 X-UUID: c2a6177ed475481aa4aa3a39f34bb4d8-20200905 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=fVTu26LyCKzBlLT+q4InPS1WNj1J5XPYdCFSzH70Ufg=; b=ATDR5DIRYegW/pS5ak7Fcgvjb0X3ezaujLhh3wLEoy7N/0jeTD33IH5KCf+ZK/mKMlNE67hZzIiQuUNy0+RQwVTQrAImPqGeoIE8cGgf0+ivRf3aO1BNrca6bZ0cLZPNbepUPnQkq7ltDCF2tcrhJ4639wEurZHf+JUA3HFe4hU=; X-UUID: c2a6177ed475481aa4aa3a39f34bb4d8-20200905 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 777265787; Sat, 05 Sep 2020 16:12:35 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 5 Sep 2020 16:12:31 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 5 Sep 2020 16:12:32 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy CC: Will Deacon , Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , Subject: [PATCH v2 08/23] iommu/io-pgtable-arm-v7s: Use ias to check the valid iova in unmap Date: Sat, 5 Sep 2020 16:09:05 +0800 Message-ID: <20200905080920.13396-9-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200905080920.13396-1-yong.wu@mediatek.com> References: <20200905080920.13396-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: AE7A0A50BF80425BF08DA5E0CE699E64A00E22E4CFB98D7B17BD8F91B247F7E02000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QXMgdGl0bGUuDQpCVFcsIGNoYW5nZSB0aGUgaWFzL29hcyBjaGV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