Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1884048pxk; Sat, 5 Sep 2020 01:16:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziID12uZNrRJx9b3mfXgIb7r0og63lYqxXYRFNHceH209CdNA62O4ud3M1S23q8Cx17AJZ X-Received: by 2002:a05:6402:12d1:: with SMTP id k17mr12269803edx.323.1599293769557; Sat, 05 Sep 2020 01:16:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599293769; cv=none; d=google.com; s=arc-20160816; b=bUbMwb2nYsdtearLAf92s1nOaLw1cpXmeX6HDnEUqnNKICV1EHaAr7oWwl45shwVSI 9yJDuNC1lHnzUiORUHRLFaQOmi4+PftrlHJY2z41pEqHE+ClQ5m/S8D+2sitIWD4Y5O3 tJuZCd3PFkGDefRZPyT5FAzs8aAjvu6lF5SOLTxOt/tzx5SuY1+/FDW7SjkkIHZcTCQH QTLiq1mNbOdVkLjbcZGvv93yWhIvmI6CHB7euXfL1R14UjEWuhp52I1Hu48Vv8LM2Hn1 A9f4LnNatANUXUBEMMP+c3s61DhM0oJ/caIoQ+/CguupmmPYvvhh7ukwjaHPoEDiwhMJ Rtig== 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=PIbXELuPQjFkrh0UItyRLEdShKd20XSdsaqHYcx2M7M=; b=jIpNsDVb4spjvNnaf9WjiXSw73u1Nd1sKuTGPXRO0xaKofMt8K2iRzkKdbPCWIZQB3 +SaLTDOSNYL0/4IP5L120ZVvuvQf/cz/J4Hni3u/Mjk7+M4jpvdByuTzaw1tL3wA4+qY Qg88oXlJ/QJUAC6KjG+7w9uiCyacHWCMhhoqvwRwgD50TfuS5w0NL6Ngl0f52TzU1RLj aqd58SXjeaXkcEx48roVXZLy0CwBJz+vctEQZ7kHOSubtoYpqKNssGnFlFL/qKzWs/yr ODHPMQC4Fu59O2y0+Y3h/ae+9hvhkxAoUqeWVTL2wDnXzom1pHyW69d7v9dwEJ5rGufD BSAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=rr1eBPx0; 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 e5si5723100ejc.182.2020.09.05.01.15.46; Sat, 05 Sep 2020 01:16:09 -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=rr1eBPx0; 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 S1728316AbgIEIO2 (ORCPT + 99 others); Sat, 5 Sep 2020 04:14:28 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:28111 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726590AbgIEIOZ (ORCPT ); Sat, 5 Sep 2020 04:14:25 -0400 X-UUID: 9918ef2972f745c5a988aa7a270bf88f-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=PIbXELuPQjFkrh0UItyRLEdShKd20XSdsaqHYcx2M7M=; b=rr1eBPx0oPeFlvwAuoX2D4uFBnObgwj+qUM3EUeSVKjeWAd7zjsI3pgAurYMx6q3zJTNv+z8BY9+0BnYRMqZLb+YlGdLPsdWJ+qV/SlJ0Vh4TaZb36YtS/bT2NnQWLyk402PuioirzuyFdwkP3c9iuHTvr4exr9kTpMtCnke5BE=; X-UUID: 9918ef2972f745c5a988aa7a270bf88f-20200905 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.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 1730784127; Sat, 05 Sep 2020 16:14:20 +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:17 +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:17 +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 19/23] iommu/mediatek: Support report iova 34bit translation fault in ISR Date: Sat, 5 Sep 2020 16:09:16 +0800 Message-ID: <20200905080920.13396-20-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: 3105DFC150F724EE161285D9AE1E3D08F98FB508E4D67BFC24705C50D97D03932000: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 SWYgdGhlIGlvdmEgaXMgb3ZlciAzMmJpdCwgdGhlIGZhdWx0IHN0YXR1cyByZWdpc3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