Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6526847ybf; Thu, 5 Mar 2020 23:02:54 -0800 (PST) X-Google-Smtp-Source: ADFU+vsK0CJrqeatvavosFho1ZPqifygZmegg0YZXh6DrI2/rMSnqWG/dLXs/gubaj9lk8UAQ0wj X-Received: by 2002:a9d:7c97:: with SMTP id q23mr1478423otn.78.1583478174052; Thu, 05 Mar 2020 23:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583478174; cv=none; d=google.com; s=arc-20160816; b=iQBTkANhzXHeIfb3KAk+/Fy4/q4cvQSem8Vftbvbrs0b330TLcsbj217nzFQZbDLqo vs4jkSImTognSBzU8EF0753Zzp75jUhldWGOrJTv9kZFpWZ4wJmfzo1gPXvuMuNY6E1Q nUpiKnGgAo+KeMNiB2D/KvlniDp3Gtc9AYtyf7zpDEIXXRi03SSxJzs9vyEw3+n7zg13 8aU7FTaytLPLcdt+JG/8M2Arv9786JfHs2e4aO7UvPsnUOkqz0WuyT7Xcmsk7ZFWrWFm gmD3I5xmxBpigdgPk9pRCxuPbKM5HBx2/Jk2c364t98F7cAEoCDZC0QHXh5pFhigS8IV gd/g== 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:date:cc:to:from:subject:message-id :dkim-signature; bh=gkqDoOqHIrOTpmFheXHWiY15sLy0Mn7me1/+UDymw5E=; b=zY2rHiN3FWEjJ3BAlxfJLAYQKB+N/ISz2cXpexEeHhsAVFZizmC1/AGY9gtMYINPub 41fT2Mj0mnyI5KZHO2PtEBAMHgB3+ZHDBahAwsGNhp3YuxWkPbJdYHFNCs6UWsuidC/E xP5y1k7ueKiRtY1rUPmtox3J4NhaW+74Cx4Esk6Eg4fB5LqkmuMYcdCEGD70wT7dcAA4 IPQgsW5IpH6udOZfHtri9kRrkM7BbGKvW5dkRK/HoE42NbtP1/NspxARkQH89x/EfGP0 i3nfeplQ40eIgq7t8I5oAJ8KuKdaxqnhVhLk91PENQ5t076nQCYlF45y+D5SeY6pDfcX vZSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=i6eYExUF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id m5si850077ote.187.2020.03.05.23.02.41; Thu, 05 Mar 2020 23:02:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=i6eYExUF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1725941AbgCFHA7 (ORCPT + 99 others); Fri, 6 Mar 2020 02:00:59 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:31107 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725784AbgCFHA6 (ORCPT ); Fri, 6 Mar 2020 02:00:58 -0500 X-UUID: 58704f9f07854fc3bbccf18a0d2e5295-20200306 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=gkqDoOqHIrOTpmFheXHWiY15sLy0Mn7me1/+UDymw5E=; b=i6eYExUFp8TbbpiIpervjhx/AOvdtjC8UwuF1nYDxYHjrF3KjEvZanoYuteF2lkPqc0MkCTTWrHL3DJ39AseRq5SyqC3yOXCkDVOqH85/NyiTO6y+dAry07pgQa7jmYSSlS4/tLuirgD2MfAnh4VarSiM4u4EE/8uGJiP861FnM=; X-UUID: 58704f9f07854fc3bbccf18a0d2e5295-20200306 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1987127789; Fri, 06 Mar 2020 14:59:54 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 6 Mar 2020 14:58:27 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 6 Mar 2020 14:58:41 +0800 Message-ID: <1583477982.4784.37.camel@mhfsdcap03> Subject: Re: [PATCH v3 03/14] iommu/mediatek: Add device_link between the consumer and the larb devices From: Yong Wu To: Nicolas Boichat CC: Matthias Brugger , Joerg Roedel , Rob Herring , Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , "moderated list:ARM/Mediatek SoC support" , srv_heupstream , Devicetree List , lkml , linux-arm Mailing List , , , "Matthias Kaehlcke" , , , , , , , Date: Fri, 6 Mar 2020 14:59:42 +0800 In-Reply-To: References: <1567503456-24725-1-git-send-email-yong.wu@mediatek.com> <1567503456-24725-4-git-send-email-yong.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: B84E2E8EC000FE6B20341D7962063DB72347CFF9209A3FBB475D95CD84B3A5AB2000: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 T24gVGh1LCAy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