Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5181809iog; Wed, 22 Jun 2022 13:57:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sdYSYDo9Vcfj2f5uaqQfd4zE8DAcYZKDB9X4kwoAmybDrS+mATb4vxFakS/QI3UiHBne98 X-Received: by 2002:a17:903:2306:b0:16a:2fa4:9dad with SMTP id d6-20020a170903230600b0016a2fa49dadmr13542904plh.57.1655931475767; Wed, 22 Jun 2022 13:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655931475; cv=none; d=google.com; s=arc-20160816; b=WoJIB1y7mCQP2+qfrSW85hnPCsQ5jfZon+eJbf3kFBiKEovZSAHGP0jrK6o9OSbcmg gmjADV7sky0lwZESuo9rpDhg3ugEjm8uF3xLsD17rkIJ1Jo8C2bk4BWvDT+laRyatqfi p6SQqb9rv/a9AWda6T2RTYPCIIV3AV+XzGw7pNn/oD1IBjaSxX/OR34RkSmbaLwDyAQa 1hyKfntFSQj3Vuj8jcZHEFB36YTIMpdvKwGoBEo1LIHSuEyvSLAiCIfvZJ96yJUn1IpY AskDqUC1/TRgu8kCilek69NuZb7Ws5UOGsDNihNNCGp5dn1yKeD3gXQNYpaVYfnw+bZO E7rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=k0Q20J3OyFK4BXoHp26oZBRHT0NT/TPRkGHoG9EjHBM=; b=QF/dFUMa1iUOLKVLbdDn8zZwNZVtfYK6yhHYcnKuzFuHsg4oH8feG8RG3ij5T1gE9k kKnhZMa2ZPmmiRP0fGjm99Sss8XollZqaPKHfYOvRa/2sm1mXeWtmzrWTcbqaIpxJv6t /lb0FTLxpbV232U4OWVgRws5sMTl1/BK1rROIeMreQxlsXe3PMqVLZ3vy/yTk7Fcw7IZ 7pzkd+hdILAnOJJ7+qa9+5Z7+/un+NOdM7eYs3V9g7PMj8TkJmE9s5PP+Thx4tbTknA3 0weVR0jLIW8ouATvXKhypm9VNyLNDJI/PY/fesxSXx/9+5GzbBZ18BY494z/qEVUw7pw u61A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="AIh/u0M6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a632a0d000000b0040ca1e323d0si13708078pgq.724.2022.06.22.13.57.42; Wed, 22 Jun 2022 13:57:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="AIh/u0M6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236164AbiFVUgO (ORCPT + 99 others); Wed, 22 Jun 2022 16:36:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbiFVUgK (ORCPT ); Wed, 22 Jun 2022 16:36:10 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBD0938BEA for ; Wed, 22 Jun 2022 13:36:03 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-3178ea840easo136720877b3.13 for ; Wed, 22 Jun 2022 13:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k0Q20J3OyFK4BXoHp26oZBRHT0NT/TPRkGHoG9EjHBM=; b=AIh/u0M6R759JTz79TyCN93gK6bgpHDzPVQZ1c1GJ5mwFOuIeCYHJ4edi50jml847F YlyEIG6KHqq8aPkZTHE9o8riSh+o+aPdQkAJtuBIbSQJ1Qvz8SxbjAaqCBGJVWgX2P/S /lWL8gVqkrxuDaPOll9RogYmQJePhkDfIDDmdpqwgFqUaxnpkJlZlOJqH2LK8OYh0EHS NkvT2u3I65Z8qEvtK4yyQHIJoLFYRlLWUJzUrck6e096qTWwpgSy4j4OJNJBxKuqt4cm +0dfDWU9Ra9WoP4nC6yrNay035tCUQh6UFCC2SBvyjlcMQdeY4uW7Ka6L/TCcUlvjRXY RbvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k0Q20J3OyFK4BXoHp26oZBRHT0NT/TPRkGHoG9EjHBM=; b=XYjxqVu+hfI6mBRJSyx3s2mAQeithydN1YVakghzKkB9n3GZE186E4V64DhBwOXftL 6ix0MZg37cZiKv1TWyLAGpNjNoRAxhCMw5Beq9FWYksvj4+IlfMvI9xP9guAGoCwC1Ol VcSCQsl7Ij9YObduOpanzX2hLFZKUrbUcWNesGjxpd9IOfkT8elVyIcH/2Cn8ka+WN0c 2P0jQowcZXB15+0zWCjf2ysgrzXLQf4xJtFgdvFfIzZKdrNbebQqt2IdgF21erYl0H5A +FOvSnRylQmMRnH94e5BZyfSBCwKWc7WCy3p0jwZmTF44b52ne/AHgkre6KhO9A/wnyJ Ldow== X-Gm-Message-State: AJIora/hd4PlxIDMr4jI3PvDxEIXLmYH7G0oBffWFFFRXG9j4ddcnpvO 8dcYbwWPWnmiR0wuQsUSIP03sA5/eDtjn1dsc0If3w== X-Received: by 2002:a81:a095:0:b0:317:d4ce:38b6 with SMTP id x143-20020a81a095000000b00317d4ce38b6mr6426893ywg.83.1655930162762; Wed, 22 Jun 2022 13:36:02 -0700 (PDT) MIME-Version: 1.0 References: <20220601070707.3946847-1-saravanak@google.com> <20220601070707.3946847-8-saravanak@google.com> <20220622074756.GA1647@pengutronix.de> In-Reply-To: From: Saravana Kannan Date: Wed, 22 Jun 2022 13:35:26 -0700 Message-ID: Subject: Re: [PATCH v2 7/9] driver core: Set fw_devlink.strict=1 by default To: Linus Walleij Cc: Sascha Hauer , Greg Kroah-Hartman , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Len Brown , Pavel Machek , Joerg Roedel , Will Deacon , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Hideaki YOSHIFUJI , David Ahern , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, iommu@lists.linux-foundation.org, netdev@vger.kernel.org, linux-gpio@vger.kernel.org, kernel@pengutronix.de Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 22, 2022 at 12:40 PM Saravana Kannan wrote: > > On Wed, Jun 22, 2022 at 1:44 AM Linus Walleij wrote: > > > > On Wed, Jun 22, 2022 at 9:48 AM Sascha Hauer wrote: > > > > > This patch has the effect that console UART devices which have "dmas" > > > properties specified in the device tree get deferred for 10 to 20 > > > seconds. This happens on i.MX and likely on other SoCs as well. On i.MX > > > the dma channel is only requested at UART startup time and not at probe > > > time. dma is not used for the console. Nevertheless with this driver probe > > > defers until the dma engine driver is available. > > FYI, if most of the drivers are built in, you could set > deferred_probe_timeout=1 to reduce the impact of this (should drop > down to 1 to 2 seconds). Is that an option until we figure out > something better? > > Actually, why isn't earlyconsole being used? That doesn't get blocked > on anything and the main point of that is to have console working from > really early on. > > > > > > > It shouldn't go in as-is. > > > > This affects all machines with the PL011 UART and DMAs specified as > > well. > > > > It would be best if the console subsystem could be treated special and > > not require DMA devlink to be satisfied before probing. > > If we can mark the console devices somehow before their drivers probe > them, I can make fw_devlink give them special treatment. Is there any > way I could identify them before their drivers probe? > > > It seems devlink is not quite aware of the concept of resources that are > > necessary to probe vs resources that are nice to have and might be > > added after probe. > > Correct, it can't tell them apart. Which is why it tries its best to > enforce them, get most of them ordered properly and then gives up > enforcing the rest after deferred_probe_timeout= expires. There's a > bit more nuance than what I explained here (explained in earlier > commit texts, LPC talks), but that's the gist of it. That's what's > going on in this case Sascha is pointing out.z > > > We need a strong devlink for the first category > > and maybe a weak devlink for the latter category. > > > > I don't know if this is a generic hardware property for all operating > > systems so it could be a DT property such as dma-weak-dependency? > > > > Or maybe compromize and add a linux,dma-weak-dependency; > > property? > > The linux,dma-weak-dependency might be an option, but then if the > kernel version changes and we want to enforce it because we now have a > dma driver (not related to Shasha's example) support, then the > fw_devlink still can't enforce it because of that property. But maybe > that's okay? The consumer can try to use dma and defer probe if it > fails? > > Another option is to mark console devices in DT with some property and > we can give special treatment for those without waiting for > deferred_probe_timeout= to expire. Heh, looks like there's already a property for that: stdout-path. Let me send a series that'll use that to give special treatment to console devices. -Saravana