Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp5028515imc; Mon, 25 Feb 2019 16:02:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IZIxtFIXRD4+cWlK0i5W5fSTL1Rqnxd64cIRlrsNwXpPJCykK4GS9PCxguT3p7OX6X1CeSE X-Received: by 2002:a63:6c01:: with SMTP id h1mr21613559pgc.330.1551139361288; Mon, 25 Feb 2019 16:02:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551139361; cv=none; d=google.com; s=arc-20160816; b=ICgow+orInxsSXZOvDj158GJUsXAnSI8dWZRv13yOT5EDkK8K84efnvtbPEvFnNYCl igNV3vqgpp+QktIqXSSCSiC5+znZ1MGgpfchID6cdbblRfzMo0Pk0AySO6sxYs+3TaVi VPrJB6mfg0bzrZGeDByKeT8yHiKsWMYSjf7hQUBBWNsepT54+bAiG7APSnWHj+uUAAZ9 mwSHce7vfH2pR6T2mR9ftMTltsbYEYr8IKb6aHX4agG6tVw48L4JSFSrwzKmDt/8APS5 IA6tbXbk7oD6qwZSiuKc70o0GC/oxB3r/zzVDNdXAMHHk+l/iWO/HPLHhh+CEo0+cQny X9lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4diYRZiwd25fbEdVyDO2DH/OYOgPzTAHtOFBF1MM6EM=; b=q6r+fhR0zwxQrhf/VDo/CLiASkVKsckN90kr8zYqxR8yNcNMMTobjiwvH0JDjHW42y U7T2FY+9tDZGGWJ1by0dnQrhPnE16idaDwpnOziglgwqrcIDXCf8/VvKONnLrylBni0r BESTr5udTlaHVAvoQiJjN8EWAe4Qnnbq1dVsakJISFCZ+VC5PDZnHG+JjEyxe0SZC1M3 B6Ad/AcIhqTUqV2BnVS8d0PEUJaAO3+5GPVD0FYd6OeWFGXt7/e/HCo0pZHQPJ771J/o hu78hk5Cs4i/p5k/gsM60BtQX6exCWBypv37BAHkxzffikER0Djus8KoEridAtYp0qm4 2ihQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hNb+nyER; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si10725284plr.166.2019.02.25.16.02.25; Mon, 25 Feb 2019 16:02:41 -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=@chromium.org header.s=google header.b=hNb+nyER; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728910AbfBZAAi (ORCPT + 99 others); Mon, 25 Feb 2019 19:00:38 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:40572 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727529AbfBZAAi (ORCPT ); Mon, 25 Feb 2019 19:00:38 -0500 Received: by mail-lj1-f196.google.com with SMTP id w6so9098269ljd.7 for ; Mon, 25 Feb 2019 16:00:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4diYRZiwd25fbEdVyDO2DH/OYOgPzTAHtOFBF1MM6EM=; b=hNb+nyERabulX656yx8s65MX5UbbJzEe/H7wPy1UjLoKYV911/npz2gZrN9i6HQ8Cz HYFIPX0+s2kOXIfdgP66S3aH6m84Z56cuv5USYYtxALgZqfJMtHybUPk2b1wnfuhtg9V V8VMGlvLrSVK6iT0jWV+Fombr9DQggmH3BMfs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4diYRZiwd25fbEdVyDO2DH/OYOgPzTAHtOFBF1MM6EM=; b=HAt4EvreW2TpddVykGLYAz8HaG9xeg2BZG8q1P5AbsO1qvPxVHhZysGmtXpJjjD27A nEVN4nj++kWJleO0P8FXnA+wpWtKw19UuZ96SxetXrcN16fSmC1yZhqK49FDtgRsWKIW c2XfhYbgRXB43+XbiO/PpryjDHid4WYoTkCIbC7XEbVOfp5108X0jlbnby8NHmdL9Exp HC/e0cZK5KjEybI1ce+gf4rlcawVpkKANXSGElNhDTPyv4ayzBgFvy/Jt/lUPi2VXJ+f /r2al+cOcwCG0V8A+/DWvXFGSoaJqzY/fh/24TYYZ9VkQ5k5IsP6YCeTs2JUVsmiIOnG Gtcg== X-Gm-Message-State: AHQUAuZzzol9e+zhFmWT4ryYukkCJesUi818jx9QzqXnhi2pFbEq8qwE xGceP+CLpK5/VuQ/ztI3CbWRQm+nlTQ= X-Received: by 2002:a2e:20b:: with SMTP id 11mr11530016ljc.41.1551139236217; Mon, 25 Feb 2019 16:00:36 -0800 (PST) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com. [209.85.167.54]) by smtp.gmail.com with ESMTPSA id j7sm50929ljb.1.2019.02.25.16.00.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Feb 2019 16:00:36 -0800 (PST) Received: by mail-lf1-f54.google.com with SMTP id e27so8261628lfj.8 for ; Mon, 25 Feb 2019 16:00:36 -0800 (PST) X-Received: by 2002:a19:f607:: with SMTP id x7mr11740319lfe.47.1551138876234; Mon, 25 Feb 2019 15:54:36 -0800 (PST) MIME-Version: 1.0 References: <1546318276-18993-1-git-send-email-yong.wu@mediatek.com> <1546318276-18993-4-git-send-email-yong.wu@mediatek.com> In-Reply-To: <1546318276-18993-4-git-send-email-yong.wu@mediatek.com> From: Evan Green Date: Mon, 25 Feb 2019 15:54:00 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 03/13] iommu/mediatek: Add probe_defer for smi-larb To: Yong Wu Cc: Joerg Roedel , Greg Kroah-Hartman , Matthias Brugger , Rob Herring , Robin Murphy , Tomasz Figa , Will Deacon , linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, Arnd Bergmann , yingjoe.chen@mediatek.com, youlin.pei@mediatek.com, Nicolas Boichat Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 31, 2018 at 8:52 PM Yong Wu wrote: > > The iommu consumer should use device_link to connect with the > smi-larb(supplier). then the smi-larb should run before the iommu > consumer. Here we delay the iommu driver until the smi driver is > ready, then all the iommu consumer always is after the smi driver. > > When there is no this patch, if some consumer drivers run before > smi-larb, the supplier link_status is DL_DEV_NO_DRIVER(0) in the > device_link_add, then device_links_driver_bound will use WARN_ON > to complain that the link_status of supplier is not right. > I don't quite have enough knowledge of device links to figure out if this is a) the right fix, b) a deficiency in the device_links code, or c) neither. Perhaps someone else could chime in on this one. -Evan