Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2610485pxb; Sun, 17 Oct 2021 20:25:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKE9mFMF80ZwDrQmtswb2zNvdYwDz36cnqC+CoHHV0V6uzyZVKcZ0JdWs74zBAM4lcgtmj X-Received: by 2002:a17:90a:2a0d:: with SMTP id i13mr30082372pjd.166.1634527552908; Sun, 17 Oct 2021 20:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634527552; cv=none; d=google.com; s=arc-20160816; b=H0Nndz2hlq3tXkj348dG6SfCwlVyO0K7W8Ehb0LGQDKaMm///uSJo1OrRSK7gpmCoo bJUc44XfIefFaiUbSQ6L95hDA4WrzeDor2+PN2L3g6NsoXKLEQ1/Hj4emznWeOcuzTSP TdujGOzncNe2WsgjEdH6U0Rpz9k3KRekt2sqod4n6EQzk6RgbJzOrgXhWBFNMM48xw0W j9LDiTvY+sX5gttsdOgv2/2eOaE9YzXSk+fRfIUtbrESp+oygp4yTKc9wa1AQaDpCoWk F3L8uHlORdyaNGZa8mwLBob8RtFJTixslABOwdNpya5PcMoiYf7i1amtSKb473ZVuVEm 0hPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=gpCAjs3PTP2pnFObJBoM1HpsrUqmuM8h33+4tQMr9Fg=; b=X31q6zY91kSGERnWfiX2zToO0E4FBM+te9rl6BzN99bYJ3hKVEHZ4DJGXNyVzM0OmG v5JNb0xBMIaq/FvIT7yq2jdG87cdX51dG1T5NKpOq9ZlXrgxccjDPMwkPiCBwQD2khuw SGWu9zUXub013SBsE+lxEg8yeKKq5w2aQPIl+iFlnKhBlJEEfM9UUUnnwiMBwaCrK9wV cn6+m61AANEFBiGqwMi3R7DOp5i8V4BLI48r7PK/cPL/BeUSEmKxKCPHNloLoorrfk4+ aY9azN6bbeyh8oMAIeBsPejnLxhqOybWWGSbQAGmc/lGAWGGzlvKlWlqsZxX1P2SnyN0 24Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=f37Cri4k; 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 f6si6514524pfv.33.2021.10.17.20.25.41; Sun, 17 Oct 2021 20:25:52 -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=f37Cri4k; 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 S239601AbhJPCZn (ORCPT + 98 others); Fri, 15 Oct 2021 22:25:43 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:57106 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232812AbhJPCZm (ORCPT ); Fri, 15 Oct 2021 22:25:42 -0400 X-UUID: 7a68abb896e64edbbeb56cd2c621ec1d-20211016 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=gpCAjs3PTP2pnFObJBoM1HpsrUqmuM8h33+4tQMr9Fg=; b=f37Cri4kRTZnAg8vcCnQg3UJTmJ+wXWad9EI/peDZuGOd14fWPr96VujvlDDfYrxfTimhpVivvoVgZGg2Hm1ayFXlM14XZxF60gMtJ9zjcUJyv65OJSoGlgQfjzWuj6YrXmn7mM4vWYaXllHZNMnTYzutgaOOAtBG6Ttorzxbsw=; X-UUID: 7a68abb896e64edbbeb56cd2c621ec1d-20211016 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1174071897; Sat, 16 Oct 2021 10:23:30 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Sat, 16 Oct 2021 10:23:29 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 16 Oct 2021 10:23:27 +0800 Message-ID: Subject: Re: [PATCH v8 04/12] iommu/mediatek: Add device_link between the consumer and the larb devices From: Yong Wu To: Dafna Hirschfeld , Matthias Brugger , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , David Airlie , "Mauro Carvalho Chehab" CC: Evan Green , Robin Murphy , Tomasz Figa , Will Deacon , , , , , , , , Matthias Kaehlcke , , , , , , "Daniel Vetter" , Chun-Kuang Hu , "Philipp Zabel" , Tiffany Lin , Hsin-Yi Wang , Eizan Miyamoto , , Frank Wunderlich Date: Sat, 16 Oct 2021 10:23:27 +0800 In-Reply-To: References: <20210929013719.25120-1-yong.wu@mediatek.com> <20210929013719.25120-5-yong.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gTW9uLCAyM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