Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2023523ybt; Thu, 2 Jul 2020 21:43:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1uPBZRrWgk75gaTWRiik125v/TnUCQt2V1F+MgdNy6d13QLpikGWByu54ZYeNHkC3gYo0 X-Received: by 2002:a17:906:2304:: with SMTP id l4mr29981351eja.104.1593751428911; Thu, 02 Jul 2020 21:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593751428; cv=none; d=google.com; s=arc-20160816; b=HAWMrbvq9wIjjpNZMhMJsYUaosld6uwuuLHT+hggaSaPoMwu9XRm9LrDxz6HLiSt2U VLyWZiLBsb554A4zC/V+RDlgZo7hnW7712QUrf2k2JqVF+cLrLlZBMLEwpXgkZLJUGv5 8UZxEyv4pAimAJaM89F/vYzvQDZLf2cKeRE1hoxSd9zeWNV9pIKGXDtwzsEXKq3NHSgd zp0WJGAOSsicfr3XJWbgva8rBxq6sh3SjDC8LsVa4PHDDrSfJMABXb29F56HvkIZM7/A ngli8a/U/p13sDvrJ2wn1C//zLVXW78H/5fm2Zwjd66MudDqeO3uziYxFLoU5e0SZf35 YkOA== 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=7xgdrx+JEJiGeWM1hd4ETDEgkB7FURHYAoYOjyNzefc=; b=bLsSdrKVw+UqKM01AOlZTPbZqf7lJ1PkXAU374TfrpWGqqksErfePeMp310LN8tR2H s1QtayPb/7mhKEA6uBtFMIVuU+nRSTv3VHOxyEdS91NuBiRdnuKKBDalLske32agphmc ckAr1xWXpPPfhc8tLcKSdsU93H8R8MO34EyaB68wGUR0un/RFbHVZ9P0l2nREhDBSBa4 u0GhB/w6u7bdO5hJmbr2BvWrU9MmIdSyUlEQTy3CquDnJgelR6ONoox/tujwC4kvwIyn Ga4vLJHAmA9o78b9WP2onKNLGrd6ikSz+fh6H5KUQFZzG5zskI7YIbLiEI7P8tZxpUj3 XOWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=kBssw0oH; 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 oa20si6568451ejb.714.2020.07.02.21.43.26; Thu, 02 Jul 2020 21:43:48 -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=kBssw0oH; 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 S1726347AbgGCEnD (ORCPT + 99 others); Fri, 3 Jul 2020 00:43:03 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:2203 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726311AbgGCEnB (ORCPT ); Fri, 3 Jul 2020 00:43:01 -0400 X-UUID: bc2912a0b14840208848f6751fa86ad0-20200703 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=7xgdrx+JEJiGeWM1hd4ETDEgkB7FURHYAoYOjyNzefc=; b=kBssw0oHqyX1b9dws084/KkfY5Z3S/rcHMqlNFr20FHzrC5e+1MK41Yv1GolVNBMDxr9Aje9rRXyAR/GttKRO3ZkU0b3rpGvZIkm6wAW73SGVpMHQJTQS131AXal1xznJ1hmH6v5kSy1Mz/6hCfUuJDJD5w1HkbCvnKE+DRR9zk=; X-UUID: bc2912a0b14840208848f6751fa86ad0-20200703 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 351006648; Fri, 03 Jul 2020 12:42:56 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Jul 2020 12:42:48 +0800 Received: from localhost.localdomain (10.15.20.246) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 3 Jul 2020 12:42:43 +0800 From: Chao Hao To: Joerg Roedel , Rob Herring , "Matthias Brugger" CC: , , , , , , Chao Hao , FY Yang , Yong Wu , TH Yang Subject: [PATCH v6 06/10] iommu/mediatek: Add sub_comm id in translation fault Date: Fri, 3 Jul 2020 12:41:23 +0800 Message-ID: <20200703044127.27438-7-chao.hao@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200703044127.27438-1-chao.hao@mediatek.com> References: <20200703044127.27438-1-chao.hao@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 666672718C089DB23071EA990091CB312E71F1BE98E3763CACF562D9D970DCB42000: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 cmI3IGluIHRoZSBiZWxvdw0KZGlhZ3JhbSkuDQpJZiB0aGUgbGFyYidzIG51bWJlciBpcyBvdmVy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