Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp762956ybh; Sun, 12 Jul 2020 23:54:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKdSxwP2r+XoB8YPX1vumZNYfN0YqfbArmLR7UhHyTlM1XVHmfyWGPoQw7LRRTG9kY8Gza X-Received: by 2002:a17:906:9c9:: with SMTP id r9mr2095347eje.223.1594623243507; Sun, 12 Jul 2020 23:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594623243; cv=none; d=google.com; s=arc-20160816; b=U9tnIONB1s8d1jtwDQNCWvZ/zazq2FZccCthl9T/tamSuMHVgHYQQged1tV9ITqE34 m/qqSFtoUmM5MWWvdkUbpp4jZhFiOzXozJDAlUVfgtwLctZRvRpF5BjfSctI4y7ChKrH C2ENW7cZYIIp2roKUJ3f8k9cJnaNK+AvBgkqhN0yHvZxhMFbKPqQDgjNZN5R3Unz4lvG rmu5A+KSR0Jp+6ITQWtAoHr6qnRMP9FDVM1qoEr53b6E6baoRc3/0z2ihfNQVg18gy2S Z45l8ueEzWHlyYl8QHVcaLCymkBK3eXcPEyvAyVAQ5Dp20B54dsk+6rBozum41QVbY5p 7qbw== 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:date:cc:to:from:subject:message-id :dkim-signature; bh=/O8b95ILqstFIgFUi/t1yv/IWDQZ/y0hmoi2/61jPNE=; b=oKCpcHOKwIIWewVExzoFETeT3XB+AN/PRwrxwl42HprAfRK7q9x6UpBtxEJReKbpFq r15Q+dKM0cVM4mrTQlQh5yBnizWGB3f88k95FWrt1XDd79B3m8MPjOn92idXOuf4RGYA W5UMaRiM2XPINpEg80AY0r1yBnqfhADvEei0b7mVWZ4lugQtGX0GFdDMUsEZE1hfkZyy yK6cJm04CNrtwLzCVIVT9WDi5SNXZrTkFOWM+8d7wE/vbtf62/fiDsqu6EBrxLrfUDyj 1sxEeeTKxCgga7R4H1KJqUEJkUJitRvV2iDfbKk4q0gmpyi7GYC2Hlayla5YQx9doj37 XbAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="P6yD1jK/"; 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 z16si8797183edr.480.2020.07.12.23.53.41; Sun, 12 Jul 2020 23:54:03 -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="P6yD1jK/"; 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 S1728198AbgGMGxB (ORCPT + 99 others); Mon, 13 Jul 2020 02:53:01 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:54985 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725804AbgGMGxB (ORCPT ); Mon, 13 Jul 2020 02:53:01 -0400 X-UUID: 582f5c57478b4a80bcb48956f6a3a476-20200713 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=/O8b95ILqstFIgFUi/t1yv/IWDQZ/y0hmoi2/61jPNE=; b=P6yD1jK/2TDrIjPFxMR0YTBlV+IWP8ekI2X4Si87kWwy8oy/33u2LEzKrj7pedVwr5n1XENvFYUtYyOwil+PyKKeAatWnY20L8vmIKwdUe6NTvxiFh4hx6TwfJy1LJnOjPJCrn+I4cH8PfpQEDJQCid/yI0FPuZAbsI75MnT1sk=; X-UUID: 582f5c57478b4a80bcb48956f6a3a476-20200713 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1774102177; Mon, 13 Jul 2020 14:52:56 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 13 Jul 2020 14:52:55 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 13 Jul 2020 14:52:54 +0800 Message-ID: <1594623128.16172.27.camel@mhfsdcap03> Subject: Re: [PATCH 06/21] iommu/io-pgtable-arm-v7s: Use ias to check the valid iova in unmap From: Yong Wu To: Nicolas Boichat CC: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy , Will Deacon , Evan Green , Tomasz Figa , "moderated list:ARM/Mediatek SoC support" , srv_heupstream , Devicetree List , lkml , linux-arm Mailing List , , , , , , Date: Mon, 13 Jul 2020 14:52:08 +0800 In-Reply-To: References: <20200711064846.16007-1-yong.wu@mediatek.com> <20200711064846.16007-7-yong.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: F3CF35EF42678060759801117619B4C940E2D810BF19205DF4368001F842ACB22000: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 T24gTW9uLCAyMDIwLTA3LTEzIGF0IDA4OjM4ICswODAwLCBOaWN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