Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp250603ybk; Sat, 9 May 2020 01:42:31 -0700 (PDT) X-Google-Smtp-Source: APiQypL7qvXk0YnHOo8624vLNWJ11u+DJASA56qSTOxuYfO2mKoGRM6Y8vM80Y3m1FUikzfVWsEs X-Received: by 2002:aa7:db0b:: with SMTP id t11mr5162932eds.304.1589013751293; Sat, 09 May 2020 01:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589013751; cv=none; d=google.com; s=arc-20160816; b=oT6dVfWQzjaKjA/Vwc+ls8SO3jQfUTb2FRIuFtKsGQKwqtwUFM4JO4k3eUtPs0YMOJ 85zM3YmB1ihBLhvc2dLix0lHKaEfdq8E9NHax8LvHVx6S4vHDJ3qlONnQ3y/1fDSkanu DVmy70wcFZm6BPuIUOVNXTRzSOiVJm6Y0mLneV3KljWpZ9jh9rpqDfHaNpV3fWsGHS+4 CJGGZSnNwlY4EHetx91caGwqtuxcsC4E4HWvit/xTp/Lpz6PY7aIkHjB6VAVdD6V88FC Cc4thW9k1yIlBmJ/cM7wi2Rk4UjTptFeN1PbdLGO6rdYQ3Y0lyLhY1tcl9vAKOfkxXxj FUQw== 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=rPAnzwaR6O/GGAIhKQLkHATI14Jacs04rANBVEp2mY0=; b=VXtsApsMlIN2wBFMLk6xXGRob5lPgxjGWfDarlOcna9ELFtZzPG0Gs6y09LyO0gHbx USY5I5NIGuj3uUEg8OoeNoxU9Y9YGRimkMehHQe/UkNCL0Ugun5WTl4FsF7GK823mehc 2S+bkt0styPSW5uLdvEWKKddgu/hC27RMpHfRKvSVCCnZ7j1DU5yEiDRAlrcscJCgRNL Qw6g7AdPETpifg7brkyOTs2l7kbNrj2CkP6wfvWSXvB7KUQ49qoJBuHN5ohYY3RjSveS siTac0lvoNUdmPwhzr+c6IB8sxL+EExsG1R3npG8x3YhUMoaZfU2+rd7dy9nK+yLlWvc nmgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="Xp+IWSS/"; 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 oo21si2443486ejb.453.2020.05.09.01.42.08; Sat, 09 May 2020 01:42:31 -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="Xp+IWSS/"; 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 S1728098AbgEIIka (ORCPT + 99 others); Sat, 9 May 2020 04:40:30 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:49373 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728007AbgEIIkY (ORCPT ); Sat, 9 May 2020 04:40:24 -0400 X-UUID: 3a659193b7cc4238a6993e8efbfb5df3-20200509 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=rPAnzwaR6O/GGAIhKQLkHATI14Jacs04rANBVEp2mY0=; b=Xp+IWSS/nf5d5eLxm/0xWpJMa0TyoXi4zrnBnzhZb4qLZoPnF5UwoUgKsutoWmB6AT6cjg+E636O2uhwVKKfsLo2XPmhdWVLUAxRGiyzSnJ82R3FHKkC68GZY2chsJJRmfLo4q6mFM6oPR7q7XnfO1yAtMLKALlobpEd7GwUe/U=; X-UUID: 3a659193b7cc4238a6993e8efbfb5df3-20200509 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 1600407145; Sat, 09 May 2020 16:40:19 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 9 May 2020 16:40:14 +0800 Received: from localhost.localdomain (10.15.20.246) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 9 May 2020 16:40:13 +0800 From: Chao Hao To: Joerg Roedel , Rob Herring , Matthias Brugger CC: , , , , , , Chao Hao , Yong Wu , FY Yang , Jun Yan Subject: [PATCH v3 5/7] iommu/mediatek: Add sub_comm id in translation fault Date: Sat, 9 May 2020 16:36:52 +0800 Message-ID: <20200509083654.5178-6-chao.hao@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200509083654.5178-1-chao.hao@mediatek.com> References: <20200509083654.5178-1-chao.hao@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: A3C151D800C9A29925EFA4791AFBA4D946A49C30C4A8135BEDDDE73D30FB8C6F2000: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 VGhlIG1heCBsYXJiIG51bWJlciB0aGF0IGEgaW9tbXUgSFcgc3VwcG9ydCBpcyA4KGxhcmIwfmxh cmI3IGluIHRoZSBiZWxvdw0KZGlhZ3JhbSkuDQpJZiB0aGUgbGFyYid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