Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4142702pxb; Sun, 24 Oct 2021 21:11:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhywtD4XPEehTHHBOrR8V0mfGalNk1LaXl1azzxDETMER+HPoKjVfq69H1vnEd/40X+zPO X-Received: by 2002:a17:906:38db:: with SMTP id r27mr18802570ejd.338.1635135072269; Sun, 24 Oct 2021 21:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635135072; cv=none; d=google.com; s=arc-20160816; b=QVJUAU38Ut5i9V+cbzIS9QF0ATb74Zk1VzChKVeQPsZ2PxiMbXM0Dfjwuwx8kh6hsi pocBqLEu8W0GI/R3u4KOEpqgR1LrrOMRnQM25OrflC213pJGr8MqOJ2DmzCgR8nJTwgP NAyZQh22javGOdi7CFWIIHzcCYCG3aPMA3WlppQExctPWSHkkYcasG0jyDPpnQ6LhEI+ Kh2C3EnlnaBzl0slbgk/XEbG/cyNx5HgK7oX50TrmZH9O1EAZx8Kyph7Qe+GzJSOSgTx BS5IcvjfMPe+csJjFbcXFrwS/ead6dkVyG3/88/e4bt9bJPS6ytz4BtwlOWsI7kTLITX gdNA== 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=cV6dg7PsYHB6+UKop/Sg0rROLJ+oreSSfppKhlC8xGE=; b=tubOdxPzS8u3tW48dtNDCrtnflaTKa0AXqkLkxRd2BwLipNn4oVxqzptqxA/Ujt1ZI 0fHt+e2TqTJ3OCsQPlc87PiGc/yEAH/pi2sk2UNbvWM+1mwvJl3k99+ZRoIY6M32WUWL eRcFJOMTHiT6RGCk0GXZzGT03mMVNt6cuOAxV6P+oXjDeuiPx71fLcTiLylQEpPbgC9p AKyWdL7gZU/53C522VJint8JyPsNELaFr8DWW97oVymSQ6imK2+LI2DwEpezXvEUOvsh xbZpYwHdREDkanebPYEOLANM+QBm0IOsNfwcBSRfypE+2ocoq6IfHhR4kvR/AqiwKklO 3olQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=nBkGbQeC; 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 gg1si4013606ejc.409.2021.10.24.21.10.48; Sun, 24 Oct 2021 21:11:12 -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=nBkGbQeC; 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 S229515AbhJYEAI (ORCPT + 99 others); Mon, 25 Oct 2021 00:00:08 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:56082 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229379AbhJYEAG (ORCPT ); Mon, 25 Oct 2021 00:00:06 -0400 X-UUID: 6cf5dab4038e407b895180c1d1649248-20211025 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=cV6dg7PsYHB6+UKop/Sg0rROLJ+oreSSfppKhlC8xGE=; b=nBkGbQeC+Sa3c4WFbs6Ky01mc0hcpUC1VdMIVgp0Ci+nREwXGSXct8xkBhX2s3ToXb8z7bOAWuCxF6sm2/w1ZbvpyLWXSZSkGdcufbA7YrxHi4qeoC1Ri9RoqAAxoOpOmRoxjwmLJ+sjifSy3adpDDGLiZMJznJ7HwbTckMDANs=; X-UUID: 6cf5dab4038e407b895180c1d1649248-20211025 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 77251011; Mon, 25 Oct 2021 11:57:42 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Mon, 25 Oct 2021 11:57:40 +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; Mon, 25 Oct 2021 11:57:39 +0800 Message-ID: <15d4ccb984f9e3919d6d7535d05aec0332dbe301.camel@mediatek.com> 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: Mon, 25 Oct 2021 11:57:39 +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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