Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp311475pxu; Fri, 23 Oct 2020 01:02:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpmZCcm0o9io2CJ3nDTyQ1e8TXaN/7iLpe25mpZHsYjyrxzqRKdTUsuYq0gHhFvwblMl1h X-Received: by 2002:a17:906:ce5c:: with SMTP id se28mr722979ejb.365.1603440158815; Fri, 23 Oct 2020 01:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603440158; cv=none; d=google.com; s=arc-20160816; b=wwrxKlNurd7uf38SE2wzOTz4M3oOWtEIbNiGevQaWxXvl+di2IiCt8Nwb7MfQU/VxI dyVNZ5JsI89yCv6K7yHrZW+TOUnw09qTi/HVPlbL3pwk1pcA7l/64AURrluLxs8gkkGY vsShjNvnciwrxDKfgNIA/d3FW+NKtWAxl2shHXpM0Oll9ydp19S9noDBagecGnR1uJz+ czelkZVbEUOsc9KA2P1eqMdkCw7EJb1EzZKC0CDx96rDZESusE6tM1EJfZFKDHyclJSv hRn6iXwNqn7kmWkw9Mx2FRC8F0aFCA6zSO3RcIbHoqtbQqtsR3W/Mz264m72KVg314E6 YfqA== 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=lE1AaRbp7IlJWDDgqTmejQzZzwuR5fT51G6JynHVeJ4=; b=elSbQ9jwegTBTGqNuvY7CaBBUDwVAoh84+smdYUfQ3SxB9KpN9oXxa1HRAJgYz8JU/ sm3JIDPHclipPyJC08NTSLPslyumP/jbDpTbdPFHr2WoTa504fK6sxn0qkMfZsQbOfc0 PhbYxL7ANFGmMXsNjspGro4L4uQUnW7wxFoDGuferqVU0ZNWEqoP6EjvOjlkhN1LGwfs 3jp1pagP0LnnltigTcNAj7ileHrcOc/hkNSTsuy1jpcl3YqwwYFvfLdsqqppwkz3uj4a 5EXdiTSFYeuhu5oN59YKTMR/IYTx+0fyXvMkEHpdcq4sFjp1vWXtdJIp6lEOK0i+rMXT RlyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hsuw3fVt; 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 y1si277739edp.57.2020.10.23.01.02.15; Fri, 23 Oct 2020 01:02:38 -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=hsuw3fVt; 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 S2898376AbgJWGLG (ORCPT + 99 others); Fri, 23 Oct 2020 02:11:06 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:44914 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2898027AbgJWGLG (ORCPT ); Fri, 23 Oct 2020 02:11:06 -0400 X-UUID: be932c73ffe54b3d8d46c5418962f501-20201023 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=lE1AaRbp7IlJWDDgqTmejQzZzwuR5fT51G6JynHVeJ4=; b=hsuw3fVt1w54pKwXaTtt9H2NhjLMJjDfNEgAHjjQzhryqu0AmYgsTkOpnTKXHBAWW2AzP3ICyse0Qivy2TN30tzqZ9v4XRyLpblyzruEY1EBPf2I6h2T0Vto7tXLrTBgjjjzUKdCMMIcOwAeXns3ZiTCvhr3yoHiMjjbIz7uYFA=; X-UUID: be932c73ffe54b3d8d46c5418962f501-20201023 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] 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 275060813; Fri, 23 Oct 2020 14:11:01 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 23 Oct 2020 14:11:00 +0800 Received: from [10.15.20.246] (10.15.20.246) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 23 Oct 2020 14:10:59 +0800 Message-ID: <1603433064.2024.6.camel@mbjsdccf07> Subject: Re: [PATCH 2/4] iommu/mediatek: Add iotlb_sync_range() support From: chao hao To: Robin Murphy CC: Joerg Roedel , Matthias Brugger , Jun Wen , FY Yang , , , , , , Mingyuan Ma , Chao Hao Date: Fri, 23 Oct 2020 14:04:24 +0800 In-Reply-To: <1603432677.2024.3.camel@mbjsdccf07> References: <20201019113100.23661-1-chao.hao@mediatek.com> <20201019113100.23661-3-chao.hao@mediatek.com> <7fbe0305-91e4-949e-7d84-bf91e81d6b27@arm.com> <1603432677.2024.3.camel@mbjsdccf07> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gRnJpLCAyMDIwLTEwLTIzIGF0IDEzOjU3ICswODAwLCBjaGFvIGhhbyB3cm90ZToNCj4gT24g V2VkLCAyMDIwLTEwLTI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