From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 830FBC433DF for ; Tue, 30 Jun 2020 15:19:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53CBC2073E for ; Tue, 30 Jun 2020 15:19:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LefPQW0R"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="q9Bxtrvg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53CBC2073E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/2hUni23Tw8Pbjn+WbU2Wx9E7VimFWQ+/58vzz8vg7I=; b=LefPQW0R1mrV6MY/PHkXDIC9C 4se1sQ3vOUF825sCadaKKLZQxWhizsfXuJyXGOTt2UsXpC+IgPc7sng2W+XMJoCTOq0ArrhPthCAP HghPqJWTJJtkkNN/Pm/I8xg5bgjfvArukB/qF/FuAVOBhln4nYdXtGir76PUwj+LOYAKRdrueqkZl uuqId7akUP1LIbHRKP5spfV6awqtd5kjQesqlxugtDCz+yiWzSU8oNszg7tn3xVfynm58/F9KOpc4 TrJfM3KYL/8qVGPM+9P+CqEEbJaDJAZRRh3c4+gejjw/LsdN84BAmZhMqA5ndKWcadanq93k1MoxG ExYF9HqMw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqI1L-0000fi-OY; Tue, 30 Jun 2020 15:18:03 +0000 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqI1D-0000eB-Rc for linux-arm-kernel@lists.infradead.org; Tue, 30 Jun 2020 15:18:01 +0000 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 30 Jun 2020 08:17:04 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 30 Jun 2020 08:17:54 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 30 Jun 2020 08:17:54 -0700 Received: from [10.26.75.203] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 30 Jun 2020 15:17:47 +0000 Subject: Re: [PATCH v8 1/3] iommu/arm-smmu: add NVIDIA implementation for dual ARM MMU-500 usage To: Robin Murphy , Krishna Reddy References: <20200630001051.12350-1-vdumpa@nvidia.com> <20200630001051.12350-2-vdumpa@nvidia.com> <53bfa5c8-c32d-6fa3-df60-a18ab33ca1c2@nvidia.com> From: Jon Hunter Message-ID: Date: Tue, 30 Jun 2020 16:17:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1593530224; bh=91KsOAnm+BDzvr6bvaKraTo/wHSaB0sGjCjoXk18ABA=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=q9BxtrvgjxBZFZAUIswW2E+r9jYacMdtRAXU31UzobonciMILCOiTgOrglSBJWXOC Nw3Ld3OJhRkalYzLHH6M6kaQEDByt/jtTjFRrLnlErsAZMdnejdtXGLw1KUiIWGYpb xAYw9H68xASCHxw1KB8ySRZZPWT/UC0ykO89X7KdmPhuSFwModgBnGKcX3mANhq4cA 1jUaHUwaV277q2HZRs76LVNMDr7HqpnG3uB5TjwjQR+mgZW16EGe8bO4ySAU87ovHL KC7amklSwvERe8WmBdhZcfamoWB3m75rZDrJSuvtt9Sh3dSz214FWxGsEZkOkFxGhS u+d/2ZM3DBT1A== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200630_111755_994825_AD348F37 X-CRM114-Status: GOOD ( 23.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: talho@nvidia.com, treding@nvidia.com, bhuntsman@nvidia.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, mperttunen@nvidia.com, nicoleotsuka@gmail.com, snikam@nvidia.com, nicolinc@nvidia.com, linux-tegra@vger.kernel.org, yhsu@nvidia.com, praithatha@nvidia.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, bbiswas@nvidia.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Ck9uIDMwLzA2LzIwMjAgMTU6NTMsIFJvYmluIE11cnBoeSB3cm90ZToKPiBPbiAyMDIwLTA2LTMw IDA5OjE5LCBKb24gSHVudGVyIHdyb3RlOgo+Pgo+PiBPbiAzMC8wNi8yMDIwIDAxOjEwLCBLcmlz aG5hIFJlZGR5IHdyb3RlOgo+Pj4gTlZJRElBJ3MgVGVncmExOTQgU29DIHVzZXMgdHdvIEFSTSBN TVUtNTAwcyB0b2dldGhlciB0byBpbnRlcmxlYXZlCj4+PiBJT1ZBIGFjY2Vzc2VzIGFjcm9zcyB0 aGVtLgo+Pj4gQWRkIE5WSURJQSBpbXBsZW1lbnRhdGlvbiBmb3IgZHVhbCBBUk0gTU1VLTUwMHMg YW5kIGFkZCBuZXcgY29tcGF0aWJsZQo+Pj4gc3RyaW5nIGZvciBUZWdyYTE5NCBTb0MgU01NVSB0 b3BvbG9neS4KPj4KPj4gVGhlcmUgaXMgbm8gZGVzY3JpcHRpb24gaGVyZSBvZiB0aGUgM3JkIFNN TVUgdGhhdCB5b3UgbWVudGlvbiBiZWxvdy4KPj4gSSB0aGluayB0aGF0IHdlIHNob3VsZCBkZXNj cmliZSB0aGUgZnVsbCBwaWN0dXJlIGhlcmUuCj4+IMKgCj4+PiBTaWduZWQtb2ZmLWJ5OiBLcmlz aG5hIFJlZGR5IDx2ZHVtcGFAbnZpZGlhLmNvbT4KCi4uLg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