Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4353570pxk; Wed, 30 Sep 2020 00:12:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxFkWh0iKAWaRn+Genf+bzQbGzIk1ret/+Y/68jZZliAqe+TZGLR2UX7HvWaf5Wq+x/MEW X-Received: by 2002:a17:906:9483:: with SMTP id t3mr110851ejx.390.1601449970905; Wed, 30 Sep 2020 00:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601449970; cv=none; d=google.com; s=arc-20160816; b=JHwFozagOlnzao+/R3uyyQ2B92B+E8lroFFpZwMfTT1OBLLVIDDMjyqS2jCAE/HVst LMjTXVfy1RmAU64tAnC6O8I8mcsXYWx+7oztlhnSum5uMDg5NUhJrekCf2K3Z/hmXEPW aupYH3uRcSWa28pkq7F34/zzseKtRmXOFWS2ZPrb1vq3jNrDbVKMzgG0VxtLbhhk+pC0 AWgZ8S0425YKfbcV+nVqkGbOttfKRfLYp2zQO2gCWWy1xg6cofBYr9+2HicOQe1tYjll 7nKevBeEw0FOkBfGzJ6rVwAju0+UfTy5yHD1IuvD5CeCmI7BKP2ziOLSaOBgBudvU2Rs Tblg== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=u5tqR9ENhht0ilsy0f2kHtyPEnKLMCniBaBxwf4wdHg=; b=gf8d5FCRumoQyAV6mEhl9lWxLVD+Gv4vFbb/5Ow45ujTmOVStrvfCbrfXeBxEAORWz uhBWCbqQ7gxEa2J+qXVltWESFdXXgERueYVdIVGFilaTCux6mq4vy1rvF8oYGHbOFYA+ 6kfae49gQPw4SOdPtzEssefuh4f0iW+0YeszxVnjBhUR0JUazXHFrZ6JCtORWfUxLqb8 IyZRPS+EAIgu9XPasNZIPeBfLN1Drhg1jXhvrxqzsmX/llSHyFIMPYBI2LKEobou/f0X 9sl5HLWDUSjk9yLhw0+eh4VJotBsWXjkanEDyyu1IWw08Tv9BUdY3pnTeBc/EnmSmBse x7Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=pAmuNmpm; 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 t23si678207ejs.552.2020.09.30.00.12.28; Wed, 30 Sep 2020 00:12:50 -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=pAmuNmpm; 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 S1728568AbgI3HIr (ORCPT + 99 others); Wed, 30 Sep 2020 03:08:47 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:40417 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725440AbgI3HIq (ORCPT ); Wed, 30 Sep 2020 03:08:46 -0400 X-UUID: 0c766645f6554de8b823bae2d930b1ff-20200930 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=u5tqR9ENhht0ilsy0f2kHtyPEnKLMCniBaBxwf4wdHg=; b=pAmuNmpm4zZR3Bdo3+QuDPMQfSnZs57hZyYG6HqfDXKPIrxl8t8HzXKA/w1tvw0PDs/vXxnvPyWpuCyn2VNJG91OSLeTerdWXI6q5Yf17ypAhfW63I3vfzj+X7vHZeaoj0oJGzhAWA810/FMddTc9pVIeRA+qSl0j4Ml6108quc=; X-UUID: 0c766645f6554de8b823bae2d930b1ff-20200930 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.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 1371739614; Wed, 30 Sep 2020 15:08:43 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Sep 2020 15:08:40 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 30 Sep 2020 15:08:41 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy , Krzysztof Kozlowski , Will Deacon CC: Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , , Greg Kroah-Hartman , Subject: [PATCH v3 08/24] iommu/io-pgtable-arm-v7s: Use ias to check the valid iova in unmap Date: Wed, 30 Sep 2020 15:06:31 +0800 Message-ID: <20200930070647.10188-9-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200930070647.10188-1-yong.wu@mediatek.com> References: <20200930070647.10188-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VXNlIHRoZSBpYXMgZm9yIHRoZSB2YWxpZCBpb3ZhIGNoZWNraW5nIGluIGFybV92N3NfdW5tYXAu IFRoaXMgaXMgYQ0KcHJlcGFyaW5nIHBhdGNoIGZvciBzdXBwb3J0aW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