Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1189358ybm; Sat, 30 May 2020 01:15:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzdxVRP0PgGBDL1FxjTGl21xm53zV+rpDJNm82UTk1BRuJtB10x/gZOHSE5pd24VRqW9nO X-Received: by 2002:a05:6402:959:: with SMTP id h25mr11866851edz.287.1590826522706; Sat, 30 May 2020 01:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590826522; cv=none; d=google.com; s=arc-20160816; b=soa0l0K3t7G1yVbtQkaUInheUMNPdhxlmI0DGKoF+pRQBmwxTg3GHVxeBv/tcgejtk V+9id1pGAKPRP8EjhZGkjxNLT5YHEPMtRVOovT5b21c43+wyzMNonKa44vYa295xM+5k AVYd3dLzliiAL4JfIGNbAOS8gfR5vniEgpZF0tpdIKd2t4B0p3gzcAptfHnh+E1AkpIZ YEBx3/TCbUn5PgaK1FyBKHcNIkPmOw7ME+KrlWZ/ENSKC0IIqwt7T6GLrEMstEpc9GFE +S5/ZB6X8oBOHKeOUgEtGtmoQWnynv5V1/yXN6XEmq83Gd6ZlJ2dnCSRYZFM/v3Vc0h7 Hbsg== 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=FVvAj8hrseke26uN4MdXVYbX/cu/UQsw+RdzhV9mMw0=; b=urZ6qgBNX+uKrL3hPWfZkbG1IqYhhSr1nmOFxcMaWszw9tG1Itk6Si1oBpizgr7Np1 4PPjIur6nQQe3z2g+f5jEoauAhwzSuoyspobLvQTz+ottrzK+JWtl2AMBSf3lKfTrQvj 1UhkhmzOYmeQF+Sld2TTK8c7aolxt+jFEu+2pfBojgU9CljyRy6+0uk7IyrBMpdoZCGF LK7bfd9DF2m7e2i74lSp8DxsWq+3NG0Nb+X13183t8FXqXhMjnnkLz7ChQG2gI5r0ykj wHe44LvzRFfapPycYsqr/GK3mYmEY0jKIoF7+c4ZPQly4Ia/IHjzkhcRP2K8dZoIBkC/ vcYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=dojQKfoU; 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 n12si3968376edy.470.2020.05.30.01.15.00; Sat, 30 May 2020 01:15:22 -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=dojQKfoU; 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 S1728867AbgE3IMu (ORCPT + 99 others); Sat, 30 May 2020 04:12:50 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:39166 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725813AbgE3IMt (ORCPT ); Sat, 30 May 2020 04:12:49 -0400 X-UUID: da84064dafd24f1dad25d509d15d93a4-20200530 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=FVvAj8hrseke26uN4MdXVYbX/cu/UQsw+RdzhV9mMw0=; b=dojQKfoU6Nzs4/LGEGXwCARwzd0PhIno8wEVc06NoeijjrrOVuS/Iri870D4j+tNe4YzJaU+Y0xg5/X8xLt6KtpNwUz0nENMPH1RGFsJmaQXaGhNYhifHpCtS4njO87OJ0fzWota/5bRZPsJaxpoaUEgAKXeZA+WtD+nhgek5Fs=; X-UUID: da84064dafd24f1dad25d509d15d93a4-20200530 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 935374056; Sat, 30 May 2020 16:12:47 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 30 May 2020 16:12:44 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 30 May 2020 16:12:44 +0800 From: Yong Wu To: Matthias Brugger , Joerg Roedel , Rob Herring CC: Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , , , , , , , , , Nicolas Boichat , Matthias Kaehlcke , , , , , , Subject: [PATCH v4 03/17] iommu/mediatek: Add probe_defer for smi-larb Date: Sat, 30 May 2020 16:10:04 +0800 Message-ID: <1590826218-23653-4-git-send-email-yong.wu@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1590826218-23653-1-git-send-email-yong.wu@mediatek.com> References: <1590826218-23653-1-git-send-email-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 VGhlIGlvbW11IGNvbnN1bWVyIHNob3VsZCB1c2UgZGV2aWNlX2xpbmsgdG8gY29ubmVjdCB3aXRo IHRoZQ0Kc21pLWxhcmIoc3VwcGxpZXIpLiB0aGVuIHRoZSBzbWktbGFyYiBzaG91bGQgcnVuIGJl Zm9yZSB0aGU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