[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGETcx8iR20dtrKMu+5VdqqTG8xYY7PFjLnkgUfvMNV2bmfhkw@mail.gmail.com>
Date: Fri, 24 Feb 2023 22:24:59 -0800
From: Saravana Kannan <saravanak@...gle.com>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Sudeep Holla <sudeep.holla@....com>,
Cristian Marussi <cristian.marussi@....com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Thomas Gleixner <tglx@...utronix.de>,
Marc Zyngier <maz@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Len Brown <lenb@...nel.org>,
Rafał Miłecki <rafal@...ecki.pl>,
Abel Vesa <abel.vesa@...aro.org>,
Alexander Stein <alexander.stein@...tq-group.com>,
Tony Lindgren <tony@...mide.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
John Stultz <jstultz@...gle.com>,
Doug Anderson <dianders@...omium.org>,
Guenter Roeck <linux@...ck-us.net>,
Maxim Kiselev <bigunclemax@...il.com>,
Maxim Kochetkov <fido_max@...ox.ru>,
Luca Weiss <luca.weiss@...rphone.com>,
Colin Foster <colin.foster@...advantage.com>,
Martin Kepplinger <martin.kepplinger@...i.sm>,
Jean-Philippe Brucker <jpb@...nel.org>,
Vladimir Oltean <vladimir.oltean@....com>,
kernel-team@...roid.com, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
linux-mtd@...ts.infradead.org, devicetree@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH v3 00/12] fw_devlink improvements
On Wed, Feb 15, 2023 at 7:12 PM Dmitry Baryshkov
<dmitry.baryshkov@...aro.org> wrote:
>
> On 07/02/2023 03:41, Saravana Kannan wrote:
> > Naresh, Tony, Abel, Geert, Dmitry, Maxim(s), Miquel, Luca, Doug, Martin,
> > Jean-Philippe,
> >
> > Can I get your Tested-by's for this v3 series please?
> >
> > Vladimir,
> >
> > Ccing you because DSA's and fw_devlink have known/existing problems
> > (still in my TODOs to fix). But I want to make sure this series doesn't
> > cause additional problems for DSA.
> >
> > All,
> >
> > This patch series improves fw_devlink in the following ways:
> >
> > 1. It no longer cares about a fwnode having a "compatible" property. It
> > figures this out more dynamically. The only expectation is that
> > fwnodes that are converted to devices actually get probed by a driver
> > for the dependencies to be enforced correctly.
> >
> > 2. Finer grained dependency tracking. fw_devlink will now create device
> > links from the consumer to the actual resource's device (if it has one,
> > Eg: gpio_device) instead of the parent supplier device. This improves
> > things like async suspend/resume ordering, potentially remove the need
> > for frameworks to create device links, more parallelized async probing,
> > and better sync_state() tracking.
> >
> > 3. Handle hardware/software quirks where a child firmware node gets
> > populated as a device before its parent firmware node AND actually
> > supplies a non-optional resource to the parent firmware node's
> > device.
> >
> > 4. Way more robust at cycle handling (see patch for the insane cases).
> >
> > 5. Stops depending on OF_POPULATED to figure out some corner cases.
> >
> > 6. Simplifies the work that needs to be done by the firmware specific
> > code.
> >
> > The v3 series has gone through my usual testing on my end and looks good
> > to me.
>
> Saravana,
>
> Please excuse me, I was completely overwhelmed with my regular work and
> had no time to properly test the series, while doing just the light
> test would defeat the purpose of testing.
>
> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org> # Qualcomm RB3
>
> Thanks a lot for going through all the troubles and hunting all the issues!
You are welcome! Thanks for testing it.
> Just a note: on an RB3 device (arm64 qcom/sdm845-db845c.dtsi) extended
> with the patch at [3] I got the following messages in dmesg:
>
> [ 1.051325] platform ae00000.mdss: Failed to create device link
> with ae00000.mdss
> [ 1.059368] platform ae00000.mdss: Failed to create device link
> with ae00000.mdss
> [ 1.067174] platform ae00000.mdss: Failed to create device link
> with ae00000.mdss
> [ 1.088322] platform c440000.spmi: Failed to create device link
> with c440000.spmi
> [ 1.096019] platform c440000.spmi: Failed to create device link
> with c440000.spmi
> [ 1.103707] platform c440000.spmi: Failed to create device link
> with c440000.spmi
> [ 1.111400] platform c440000.spmi: Failed to create device link
> with c440000.spmi
> [ 1.119141] platform c440000.spmi: Failed to create device link
> with c440000.spmi
> [ 1.126825] platform c440000.spmi: Failed to create device link
> with c440000.spmi
> [ 2.024763] qcom-lab-ibb-regulator c440000.spmi:pmic@3:labibb:
> Failed to create device link with c440000.spmi
> [ 2.035026] qcom-lab-ibb-regulator c440000.spmi:pmic@3:labibb:
> Failed to create device link with c440000.spmi
>
> They look to be harmless, but it might be good to filter some of them
> out? Especially the ones which tell about creating a device link
> pointing back to the same device.
I'm sure it's harmless when the supplier == consumer. Agreed on
filtering these out.
I looked at [3], but it's not obvious to me how this is happening for
your specific case. There are a couple of ways I can think of:
1. A SYNC_STATE_ONLY link being created as a proxy link (I don't do as
many checks here because it can't break anything)
2. __fw_devlink_pickup_dangling_consumers() causing the consumer and
supplier to be the same.
But I want to understand which one is happening in your case. Can you
add a WARN_ON(1) after the error message and give me the list of stack
dumps that are unique?
Thanks,
Saravana
>
> [3] https://lore.kernel.org/linux-arm-msm/20230118082048.2198715-1-dmitry.baryshkov@linaro.org/
>
> >
> > Thanks,
> > Saravana
> >
> > [1] - https://lore.kernel.org/lkml/20220810060040.321697-1-saravanak@google.com/
> > [2] - https://lore.kernel.org/lkml/CAGETcx-JUV1nj8wBJrTPfyvM7=Mre5j_vkVmZojeiumUGG6QZQ@mail.gmail.com/
> >
> > v1 -> v2:
> > - Fixed Patch 1 to handle a corner case discussed in [2].
> > - New patch 10 to handle "fsl,imx8mq-gpc" being initialized by 2 drivers.
> > - New patch 11 to add fw_devlink support for SCMI devices.
> >
> > v2 -> v3:
> > - Addressed most of Andy's comments in v2
> > - Added Colin and Sudeep's Tested-by for the series (except the imx and
> > renesas patches)
> > - Added Sudeep's Acked-by for the scmi patch.
> > - Added Geert's Reviewed-by for the renesas patch.
> > - Fixed gpiolib crash reported by Naresh.
> > - Patch 6: Fix __fwnode_links_move_consumers() to preserve fwnode link flags.
> > - New Patch 12 to fix nvmem-cells issue reported by Maxim(s)/Miquel.
> > - Deleted some stale function doc in Patch 8
> >
> > Cc: Abel Vesa <abel.vesa@...aro.org>
> > Cc: Alexander Stein <alexander.stein@...tq-group.com>
> > Cc: Tony Lindgren <tony@...mide.com>
> > Cc: Sudeep Holla <sudeep.holla@....com>
> > Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
> > Cc: John Stultz <jstultz@...gle.com>
> > Cc: Doug Anderson <dianders@...omium.org>
> > Cc: Guenter Roeck <linux@...ck-us.net>
> > Cc: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> > Cc: Maxim Kiselev <bigunclemax@...il.com>
> > Cc: Maxim Kochetkov <fido_max@...ox.ru>
> > Cc: Miquel Raynal <miquel.raynal@...tlin.com>
> > Cc: Luca Weiss <luca.weiss@...rphone.com>
> > Cc: Colin Foster <colin.foster@...advantage.com>
> > Cc: Martin Kepplinger <martin.kepplinger@...i.sm>
> > Cc: Jean-Philippe Brucker <jpb@...nel.org>
> > Cc: Vladimir Oltean <vladimir.oltean@....com>
> >
> > Saravana Kannan (12):
> > driver core: fw_devlink: Don't purge child fwnode's consumer links
> > driver core: fw_devlink: Improve check for fwnode with no
> > device/driver
> > soc: renesas: Move away from using OF_POPULATED for fw_devlink
> > gpiolib: Clear the gpio_device's fwnode initialized flag before adding
> > driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links
> > driver core: fw_devlink: Allow marking a fwnode link as being part of
> > a cycle
> > driver core: fw_devlink: Consolidate device link flag computation
> > driver core: fw_devlink: Make cycle detection more robust
> > of: property: Simplify of_link_to_phandle()
> > irqchip/irq-imx-gpcv2: Mark fwnode device as not initialized
> > firmware: arm_scmi: Set fwnode for the scmi_device
> > mtd: mtdpart: Don't create platform device that'll never probe
> >
> > drivers/base/core.c | 449 +++++++++++++++++++++-----------
> > drivers/firmware/arm_scmi/bus.c | 3 +-
> > drivers/gpio/gpiolib.c | 7 +
> > drivers/irqchip/irq-imx-gpcv2.c | 1 +
> > drivers/mtd/mtdpart.c | 10 +
> > drivers/of/property.c | 84 +-----
> > drivers/soc/imx/gpcv2.c | 2 +-
> > drivers/soc/renesas/rcar-sysc.c | 2 +-
> > include/linux/device.h | 1 +
> > include/linux/fwnode.h | 12 +-
> > 10 files changed, 344 insertions(+), 227 deletions(-)
> >
>
> --
> With best wishes
>
> Dmitry
Powered by blists - more mailing lists