Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7A438C43334 for ; Thu, 23 Jun 2022 06:51:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id F1FCC60C05; Thu, 23 Jun 2022 06:51:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org F1FCC60C05 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LjVzkptKrjHj; Thu, 23 Jun 2022 06:51:23 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id B9B3760773; Thu, 23 Jun 2022 06:51:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B9B3760773 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6240FC0032; Thu, 23 Jun 2022 06:51:22 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2FEC0C002D for ; Thu, 23 Jun 2022 06:51:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 06C2060B74 for ; Thu, 23 Jun 2022 06:51:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 06C2060B74 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zNYqm6nlDyz3 for ; Thu, 23 Jun 2022 06:51:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org DFD3960773 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by smtp3.osuosl.org (Postfix) with ESMTPS id DFD3960773 for ; Thu, 23 Jun 2022 06:51:19 +0000 (UTC) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o4Gfk-0001vC-Io; Thu, 23 Jun 2022 08:50:36 +0200 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1o4Gff-0003Pg-AE; Thu, 23 Jun 2022 08:50:31 +0200 Date: Thu, 23 Jun 2022 08:50:31 +0200 From: Sascha Hauer To: Saravana Kannan Subject: Re: [PATCH v1 1/2] driver core: fw_devlink: Allow firmware to mark devices as best effort Message-ID: <20220623065031.GX1615@pengutronix.de> References: <20220622215912.550419-1-saravanak@google.com> <20220622215912.550419-2-saravanak@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220622215912.550419-2-saravanak@google.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: iommu@lists.linux-foundation.org Cc: Andrew Lunn , Peng Fan , Heikki Krogerus , "Rafael J. Wysocki" , Linus Walleij , Ulf Hansson , Eric Dumazet , Pavel Machek , Will Deacon , Kevin Hilman , Frank Rowand , Russell King , linux-acpi@vger.kernel.org, Jakub Kicinski , Paolo Abeni , kernel-team@android.com, Len Brown , Len Brown , kernel@pengutronix.de, linux-pm@vger.kernel.org, linux-gpio@vger.kernel.org, Rob Herring , Andy Shevchenko , Hideaki YOSHIFUJI , Greg Kroah-Hartman , David Ahern , linux-kernel@vger.kernel.org, Daniel Scally , iommu@lists.linux-foundation.org, Sakari Ailus , netdev@vger.kernel.org, "David S. Miller" , devicetree@vger.kernel.org, Heiner Kallweit X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Wed, Jun 22, 2022 at 02:59:10PM -0700, Saravana Kannan wrote: > When firmware sets the FWNODE_FLAG_BEST_EFFORT flag for a fwnode, > fw_devlink will do a best effort ordering for that device where it'll > only enforce the probe/suspend/resume ordering of that device with > suppliers that have drivers. The driver of that device can then decide > if it wants to defer probe or probe without the suppliers. > > This will be useful for avoid probe delays of the console device that > were caused by commit 71066545b48e ("driver core: Set > fw_devlink.strict=1 by default"). > > Fixes: 71066545b48e ("driver core: Set fw_devlink.strict=1 by default") > Reported-by: Sascha Hauer > Reported-by: Peng Fan > Signed-off-by: Saravana Kannan > --- > drivers/base/core.c | 3 ++- > include/linux/fwnode.h | 4 ++++ > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/base/core.c b/drivers/base/core.c > index 839f64485a55..61edd18b7bf3 100644 > --- a/drivers/base/core.c > +++ b/drivers/base/core.c > @@ -968,7 +968,8 @@ static void device_links_missing_supplier(struct device *dev) > > static bool dev_is_best_effort(struct device *dev) > { > - return fw_devlink_best_effort && dev->can_match; > + return (fw_devlink_best_effort && dev->can_match) || > + dev->fwnode->flags & FWNODE_FLAG_BEST_EFFORT; Check for dev->fwnode first. I am running in a NULL pointer exception here for a device that doesn't have a fwnode. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu