Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1884800pxk; Sat, 5 Sep 2020 01:17:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3RFlsn1BOju8EkmGCrONMrbDSCy4j4Tt3qjtbkEsE9YZuz0BWyQtkbyQZ1wJHh9jnoRSG X-Received: by 2002:a17:906:9941:: with SMTP id zm1mr11266750ejb.288.1599293869339; Sat, 05 Sep 2020 01:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599293869; cv=none; d=google.com; s=arc-20160816; b=Fzzx4pZLGXvHp8Ww170mS2br7HsDWJ2xgLzeVXU/IfEg02g9I5F3U4t6t7YwX8wK4Y kYgx4ZQQOa37tZ77shH0Oq7P9nHnbz5jGWG0N5Htbm/rRxWni6x4aStrUrljwADlefp9 KOcwf2Z7khu/owgGYSLcvzcx7PlP4CVgNSOyfCt8eYwDeL+5cPXA8oKXFEoMadnevTo3 z0CxyNdoa9agj3jet1ZDrFZ8t4DR2CloRsEdIJjxOfDaF+eiDVIjd9trrk+ZvLSYAmu2 mnz/eJN+kHZ32k1PD854uoysHtb7V9k6i+u2caT68C3B+qzCoqCP3dNd9mzXklG0MaDD ep5A== 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=oz8nF/O5DEM+ruQBFr1fmCos9I+cM4wdZKMWELCXako=; b=Gh4qoPkBOZW31zXaHQONo7ud87yJ/yqX03NGhj/bqAGzKHBo6wB2UU08rqIlfj2hDO gCP8ER3djmwp3V8ZgZqaO/OKpjvr5/nLfsIBACiEsXYtEQ//A/Qca7ZYBu4LvasxYIb0 GDx+E37Rb85sDycxYzbaO+wQPqN8bkH61ij3RSkKMPpd9LTBULtBJeIbAMUHxBb8QrYz GB27Cbcw9MWiFSlnBqylACydrlgkTqYfZ7ILGON8TUeFPDW7EwFJMRI6ExNH5vtl0BnW c3F+TjqdkIH5jc0J56POxwIWCfJdolmNUlQbhzmf5PLT54m7nwVcHsgUNSOITMR7PwAx 58Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hsrla56n; 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 o25si5386657edf.503.2020.09.05.01.17.26; Sat, 05 Sep 2020 01:17:49 -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=hsrla56n; 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 S1728580AbgIEIO3 (ORCPT + 99 others); Sat, 5 Sep 2020 04:14:29 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:45327 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726398AbgIEIOW (ORCPT ); Sat, 5 Sep 2020 04:14:22 -0400 X-UUID: c58bd589b13047adb3d1229e79782b47-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=oz8nF/O5DEM+ruQBFr1fmCos9I+cM4wdZKMWELCXako=; b=hsrla56nHUJ1n+PuxDooNUobI4Coej6pqwduUpqoosGx4Bex8/tC4K2/c8V+8DYuYyA9zYCHiRAH5TjjBL8sr5P8tU76Yl0jKKzjCIBXnWglqHowRUmMTTsXYDnZ7476Vxo+3NA81MdYg8eVIStgwDw3S0BEk9uffCd2m4JR0G4=; X-UUID: c58bd589b13047adb3d1229e79782b47-20200905 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] 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 38352271; Sat, 05 Sep 2020 16:14:18 +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:14:09 +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:14:09 +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 18/23] iommu/mediatek: Support up to 34bit iova in tlb flush Date: Sat, 5 Sep 2020 16:09:15 +0800 Message-ID: <20200905080920.13396-19-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: 707BF9E0B5763FFE53C76E1B1ABD8E34A67C5356A6D0A7E61567458B3BA72F402000: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 SWYgdGhlIGlvdmEgaXMgMzRiaXQsIHRoZSBpb3ZhWzMyXVszM10gaXMgdGhlIGJpdDAvMSBpbiB0 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