Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4303657pxb; Mon, 1 Feb 2021 19:03:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJySer2JBEX0CI/1zqm1AOfJtEfBfcv+dxgQH0LxbtqCZagyl2OjMc2nKgl+jyKiMTsqSRit X-Received: by 2002:a50:fd84:: with SMTP id o4mr21900396edt.340.1612235028426; Mon, 01 Feb 2021 19:03:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612235028; cv=none; d=google.com; s=arc-20160816; b=UT5zNTn2x6ef9Of5RrxdnnLCf7bQ4Gqt0R5BNe7bcRQ42WeDQy+JkHbyVdU8u8b0Nz PXyM+3t5+kydLCOwYNdEeef0cpT/DwZZ9X9OBz+coWLa/uWivl8bOXtZPg1mBU5yhJKJ fNsYWynyvcHKlDCk2vfc3uBUwr6UpVmHC8NxO4gCakH/HK5fNaIPhwWEAhOkOXeeOOPJ RmDbQM/y9EQMs8pPAgWubFPAMSoHQ3tuy7Nba1Ndj882mfdpMkXWPImz4fWo1/oztbg2 fkDtPI/M8UpFQNER/g4PwVcGuzrkJCn94wK4/vfoZ2UyHSw5K8O+dglxOw3NQunxVU8g QQuw== 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=QKlES40ZuuTnQtRZPjfqK6jrJL4AVKwk6AC0/Xfkqm4=; b=IEcXF/oJEqjNBSE7T6C1mRUpcq7ByoTgcZaKBc7N1Zx7JtTwuoGDVNkpOzqXqF6fAT KvQaJSrxHuvsIh6cEwM83IgXk3gzqbwQF7+h0eiQXLm39rtBnqncP38SXtR+P63bzGtg mgBkQLRAjEOYq42IItsihWEH+nPTpIwPpEUIsWv4+PvW4BnEA8XW1WjJrqQzk21WrwdZ DuWsFlNKienrHMp626jma43MAIZ5cvohaxbPKfxUXtqY+L7Vju0jMQQZezHIyZ+Cnk24 RQhd1UALyvGssuD6yUbOEaKuFeEGuNFzNwvtIA4SNBbGUkwoEaq9RkneyEc92DppKQtB n+TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TKINA+ss; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gj7si237796ejb.706.2021.02.01.19.03.23; Mon, 01 Feb 2021 19:03:48 -0800 (PST) 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=@google.com header.s=20161025 header.b=TKINA+ss; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229537AbhBBDBo (ORCPT + 99 others); Mon, 1 Feb 2021 22:01:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbhBBDBj (ORCPT ); Mon, 1 Feb 2021 22:01:39 -0500 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 482D7C06174A for ; Mon, 1 Feb 2021 19:00:58 -0800 (PST) Received: by mail-yb1-xb31.google.com with SMTP id q201so15429875ybg.8 for ; Mon, 01 Feb 2021 19:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QKlES40ZuuTnQtRZPjfqK6jrJL4AVKwk6AC0/Xfkqm4=; b=TKINA+ss6nSCUFev9F01YHAkMmRw70CqR6dFHclmYWCEWAxry26XMjSUdMWBta7bUa w6peKJSmF5RPlr4ypNZ3fkaiBYqUXhVjRHLMKOnfmbNoPXdBX+BCd2LGcLW2KXNnyUZ0 nDx4MCOiucEk454n6jR7yGGho/FtjF7gX6F4i4lxnXEAtAJtN4vGZVepQaBpHvtTquUS vLi9bpfV/Hm5+T2CyAuYhJLW2mRdPwXsrsVsvI7XGq0ieBNMxNQhpJx8U1XbBRwPZLx/ FCm5rJKNmGfMFnKJAw9QdLB2PR54g2bgE74hA2Myk8bEB46RzgmwXduDXUAvT6YVAN1C K5CA== 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=QKlES40ZuuTnQtRZPjfqK6jrJL4AVKwk6AC0/Xfkqm4=; b=dx/bclErdikxOdg6TA+Jdapi86+86uggoI9dPJ9dFWUxh2CCyqiaZedepuE7jvMYjh 0TU2GhoY/RUKM/5MSylDrnAbv2DLXv67qFlN1RpG0ZNikCzivvCTrhsRqTLF0uPGlXEU DfZjWcQBpSZXf2UvEMBA2HTRhuRMkj6/P9fNabB14jhKGmfyTlj6FDVxR3k5mGWo0Uy+ EpEEHtze8sXfTirtZwtYPzPmxX5uotSquZJ9TyWbZLlyT6joqkCHTUcJYHduYdTMENjt ekrTQQORjoTUPrX6Ftx1KQbv9DQcXHEDAJm1N5uFvZL2mw0dchs7H9sgV4UfDgtOe+og zDvg== X-Gm-Message-State: AOAM5339aoBoAN7s48uqOsdN5fEGNUf2LO8T6HkFJpzV8OIejHLqFrrm fMdp1TtYwwKyojXzSI1Cojr9qyWmXAiE1/b2ik5npA== X-Received: by 2002:a25:3345:: with SMTP id z66mr29578976ybz.466.1612234857051; Mon, 01 Feb 2021 19:00:57 -0800 (PST) MIME-Version: 1.0 References: <20210130040344.2807439-1-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Mon, 1 Feb 2021 19:00:21 -0800 Message-ID: Subject: Re: [PATCH v1 0/2] Make fw_devlink=on more forgiving To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Marek Szyprowski , Marc Zyngier , Tudor Ambarus , Linus Walleij , Bartosz Golaszewski , LKML , Android Kernel Team , Wolfram Sang , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 1, 2021 at 2:40 AM Geert Uytterhoeven wrote: > > Hi Saravana, > > On Sat, Jan 30, 2021 at 5:09 AM Saravana Kannan wrote: > > On Fri, Jan 29, 2021 at 8:03 PM Saravana Kannan wrote: > > > This patch series solves two general issues with fw_devlink=on > > > > > > Patch 1/2 addresses the issue of firmware nodes that look like they'll > > > have struct devices created for them, but will never actually have > > > struct devices added for them. For example, DT nodes with a compatible > > > property that don't have devices added for them. > > > > > > Patch 2/2 address (for static kernels) the issue of optional suppliers > > > that'll never have a driver registered for them. So, if the device could > > > have probed with fw_devlink=permissive with a static kernel, this patch > > > should allow those devices to probe with a fw_devlink=on. This doesn't > > > solve it for the case where modules are enabled because there's no way > > > to tell if a driver will never be registered or it's just about to be > > > registered. I have some other ideas for that, but it'll have to come > > > later thinking about it a bit. > > > > > > These two patches might remove the need for several other patches that > > > went in as fixes for commit e590474768f1 ("driver core: Set > > > fw_devlink=on by default"), but I think all those fixes are good > > > changes. So I think we should leave those in. > > > > > > Marek, Geert, > > > > > > Can you try this series on a static kernel with your OF_POPULATED > > > changes reverted? I just want to make sure these patches can identify > > > and fix those cases. > > > > > > Tudor, > > > > > > You should still make the clock driver fix (because it's a bug), but I > > > think this series will fix your issue too (even without the clock driver > > > fix). Can you please give this a shot? > > > > Marek, Geert, Tudor, > > > > Forgot to say that this will probably fix your issues only in a static > > kernel. So please try this with a static kernel. If you can also try > > and confirm that this does not fix the issue for a modular kernel, > > that'd be good too. > > Thanks for your series! > > For the modular case, this series has no impact, as expected (i.e. fails > to boot, no I/O devices probed). > With modules disabled, both r8a7791/koelsch and r8a77951/salvator-xs > seem to boot fine, except for one issue on koelsch: Thanks a lot for testing the series! Regarding the koelsch issue, do you not see it with your OF_POPULATED fix for rcar-sysc driver? But only see if you revert it and use this series? > > dmesg: > > +i2c-demux-pinctrl i2c-12: failed to setup demux-adapter 0 (-19) > +i2c-demux-pinctrl i2c-13: failed to setup demux-adapter 0 (-19) > +i2c-demux-pinctrl i2c-14: failed to setup demux-adapter 0 (-19) > > - #0: rsnd-dai.0-ak4642-hifi > + No soundcards found. > > regulator_summary: > > -13-0050-vcc 0 0mA 0mV 0mV > -13-0039-dvdd-3v 1 0mA 0mV 0mV > -13-0039-bgvdd 1 0mA 0mV 0mV > -13-0039-pvdd 1 0mA 0mV 0mV > -13-0039-dvdd 1 0mA 0mV 0mV > -13-0039-avdd 1 0mA 0mV 0mV > > pm_genpd_summary: > > -/devices/platform/soc/e6518000.i2c suspended 0 > -/devices/platform/soc/e6530000.i2c suspended 0 > -/devices/platform/soc/e6520000.i2c suspended 0 > > These are all symptoms of the same issue: i2c buses and devices are not > probed, due to the use of the i2c demuxer. > I guess the fw_devlink tracker doesn't consider "i2c-parent" links? No, it doesn't parse "i2c-parent". Ugh... looked at it. It's going to be a problem to parse because it requires the parents to be disbled in DT and then fixes them up during run time. fw_devlink can handle DT overlay changing a specific node, but the problem is that the consumer DT node doesn't get changed. So the i2c-parent will first be parsed, fw_devlink will notice they are disabled, so it'll ignore them. Then those nodes are enabled, but the i2c-parent isn't reparsed because the consumer isn't updated. > Note that I only tested this on R-Car Gen2 and Gen3. > I did not test this on Renesas SH/R-Mobile or RZ/A SoCs. Thanks for any testing you can do :) So overall, this series seems to be helping, but doesn't cover 100% of the cases. So I suppose this is still a useful series. I'll be happy to take any Tested-by or Reviewed-by. -Saravana