Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1114939ybt; Fri, 10 Jul 2020 23:53:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylAukWWYaMMD1Lfazwld4zhI2g1csGATVQigALYgf1ZIlq61IGKiMuXB2gW4NIBrqjjS1d X-Received: by 2002:a50:d7c1:: with SMTP id m1mr82373358edj.217.1594450415601; Fri, 10 Jul 2020 23:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594450415; cv=none; d=google.com; s=arc-20160816; b=uHujK+xaXFsdnQVElmHtRUVEAIATZFPiNoru8lXFtnYdVCnQ1vvgNuLbSORU2hQWA5 e6W5Pe/84IrgSqQlZtRJxxmjtFYxW7j8PM/6KA7zuc2YILK1Kno6MZwEdPdhVL0VjW9b zNsBEQyJs2D1if3HVnv26C8Zul5ziucXWxi1nY6hpv1S9TLoWl+dyYmJ4RYsLUWSwqxu Hbuk/KDZNib/RivzYCzbEPz6JxTYP2y34X/K1mY0vZVD///gcOglzGpNS5DmtDr9Rinz aP4uGTyCJZzYhGA7UjE2LzZ+7TU3YHKfX4be/OfBZS+TPBcrKnOEeo4K4iLcsYTf3ZbV CHig== 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=kznFAnlvVI8E28pnGJ0/BnIvoymQFbZ9+Ti34/1EQug=; b=HOl1MuYpEeM4K2DLAUJ41+5wrFBZ0Z+f3B3ofv8iA9kNopeM9SBsrIYdaHWE3+elAn 6mY7+X14iHlHM4rc4wlNt3N85RmvWPI5ax8KVXhLWrFHUMEp/h6UENs+ltys49+yrC2M wppU7iRs9dS/A9j1UfzUchqRZV40Ly32q1+dIUZVR6ZXqNWI5NO0OevONiMmoGgn1JRe K+XnvNUP+BweqoGlutIJcMMqs8c9ahA1HeH9vWGgYqLzFiXHX58DdKARC6SKIv5GS2hv 7AJPFDNPcDP5pVcfyHbQZpCm2rt/ZST6r9H8ZrJ7ZyTqQuN0SZlSlTshkt0g4U2XqBKX 0K4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=GjWaSidQ; 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 h17si5077958ejl.514.2020.07.10.23.53.13; Fri, 10 Jul 2020 23:53:35 -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=GjWaSidQ; 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 S1728349AbgGKGwR (ORCPT + 99 others); Sat, 11 Jul 2020 02:52:17 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:59510 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727984AbgGKGwQ (ORCPT ); Sat, 11 Jul 2020 02:52:16 -0400 X-UUID: 4490030669b647798ec9db558a86c0d1-20200711 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=kznFAnlvVI8E28pnGJ0/BnIvoymQFbZ9+Ti34/1EQug=; b=GjWaSidQb/BdnjnMhZu52SacfqS5KGedPpYNn8PVPdeTntcJHb0Om4BgMQ9l/zentJ7v72IY6V9OjDaZzbh0IdKerFsuNjS9cLDwKSk7KHED+I0N0Fbh6keIMo00F1cYQTm8Qn+EZaAX3sK2Nw6Qv8Ig9DhNSJqZBXLnqYzAiTw=; X-UUID: 4490030669b647798ec9db558a86c0d1-20200711 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 501575543; Sat, 11 Jul 2020 14:52:12 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 11 Jul 2020 14:52:08 +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; Sat, 11 Jul 2020 14:52:07 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy CC: Will Deacon , Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , , Subject: [PATCH 16/21] iommu/mediatek: Support up to 34bit iova in tlb invalid Date: Sat, 11 Jul 2020 14:48:41 +0800 Message-ID: <20200711064846.16007-17-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200711064846.16007-1-yong.wu@mediatek.com> References: <20200711064846.16007-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 94E84565E7ABE2763EB78F18C2A62045D3EEEDC73A96018C3CCE6E2D860438812000: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 aGUgdGxiIGZsdXNoDQp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