From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76DFBC7EE2F for ; Sat, 25 Feb 2023 06:25:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229581AbjBYGZl (ORCPT ); Sat, 25 Feb 2023 01:25:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjBYGZk (ORCPT ); Sat, 25 Feb 2023 01:25:40 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 959432A9AC for ; Fri, 24 Feb 2023 22:25:37 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id y15-20020a17090aa40f00b00237ad8ee3a0so1389867pjp.2 for ; Fri, 24 Feb 2023 22:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4QPCIfZpunPpGQRjZ0CLzZgvh1bMrAOlRsJYurE9VOI=; b=i2OnX+qtVkxWkVFcUUUtHoMVo58k8kPteFOU3yRJoch4UrZVjVtoKgQCILPsSIH2IM 9SuCn3vu72nb3n2gCsoCb9MQcwZbuXYf5jgyHDO34s/gR8M5CxRU5gV0+YnHw+9V/jL3 UereLqEbLRdif9+wLl1Wv9EJQ5zwKS3GE8nA8qUJSHw1j151949EZ1cDEtx0EJ19hLV9 2i4mG+2eo1p0BSS1qZavXyXOVwVlLf24HyC12nbm1kz7x2IzYuc7LLP1/1i2knyLhN87 asicV45YD46sfQWagebPdNnXBrCMp8DyEYimgDowgWuBomRC1Gc2M0hNTbO7Evf7ew4Y cwsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4QPCIfZpunPpGQRjZ0CLzZgvh1bMrAOlRsJYurE9VOI=; b=qHiQg79f9mnOJWqoDf0Fyparw4A1KwtfA+cVw620InHs/BYca8G6Wko0Cnc+oG5V0R nUPxesXCF5MhorvMZd1NBLs7I+YutHiCpUHy8CKG5z3aKiSNToeYB2zyxceizO2tCD7K MmjHX8f1KTO6P0ENI+WBzVfaulzrzp65s2HaFNlMn9pLs3uWyRprPj7zEXfiOP/M+zvw puurZr8Sij0oZCWBTSZ+At05T04d3McximCU2yTjvPlttBHxibiZkm6zpGkAiu7pcal4 Hwu0GeSXzp8SEpHf7GBj9P4uRkX69kNYSQwJLzfM3EpWOkJmvqwVGViR1TH9qRCHleY+ 9nSQ== X-Gm-Message-State: AO0yUKWJylnAzWJzRpr05O0OvkI0RIsA83BH2HunG6oLs0GaKKMBgF0g hjWaW00ME3sTHQBI1JWsO9KK1n6uXF4INRi1nmb4mQ== X-Google-Smtp-Source: AK7set/k/0eO1pGMhcQMet0YU6e3h9+c98wFu1JipuFF0QZYfLgw6WY/Kw7NUyUCthebeNVAXRQmnWBsB84kG+im0+I= X-Received: by 2002:a17:903:2402:b0:19c:a7a7:7072 with SMTP id e2-20020a170903240200b0019ca7a77072mr3005999plo.10.1677306336589; Fri, 24 Feb 2023 22:25:36 -0800 (PST) MIME-Version: 1.0 References: <20230207014207.1678715-1-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Fri, 24 Feb 2023 22:24:59 -0800 Message-ID: Subject: Re: [PATCH v3 00/12] fw_devlink improvements To: Dmitry Baryshkov Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Sudeep Holla , Cristian Marussi , Linus Walleij , Bartosz Golaszewski , Thomas Gleixner , Marc Zyngier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Frank Rowand , Geert Uytterhoeven , Magnus Damm , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Len Brown , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Abel Vesa , Alexander Stein , Tony Lindgren , Geert Uytterhoeven , John Stultz , Doug Anderson , Guenter Roeck , Maxim Kiselev , Maxim Kochetkov , Luca Weiss , Colin Foster , Martin Kepplinger , Jean-Philippe Brucker , Vladimir Oltean , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-acpi@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Wed, Feb 15, 2023 at 7:12 PM Dmitry Baryshkov 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 # 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 > > Cc: Alexander Stein > > Cc: Tony Lindgren > > Cc: Sudeep Holla > > Cc: Geert Uytterhoeven > > Cc: John Stultz > > Cc: Doug Anderson > > Cc: Guenter Roeck > > Cc: Dmitry Baryshkov > > Cc: Maxim Kiselev > > Cc: Maxim Kochetkov > > Cc: Miquel Raynal > > Cc: Luca Weiss > > Cc: Colin Foster > > Cc: Martin Kepplinger > > Cc: Jean-Philippe Brucker > > Cc: Vladimir Oltean > > > > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D6A36C64EC7 for ; Sat, 25 Feb 2023 06:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8VJaC9VtSdBJUIwDolq2D0Xa/1uqwxxQf2gXzsSToPQ=; b=nljalefV5jP+Rb Mzyxev1Bzd6o6vJzGjYeJJSzyFhS8p8lreg0k/+bHmrgCHU3qTCmtaFg70ov0KsKlSN2Fq7UZxdwO sXRqs3SIJuJPCu1DeZ/Jhew6qZ5fkCCo4HTylva2QE6+o9u5RtgZLkzpWypx5BxwEntrSBkZvb6T+ 83VeF+OR2IsdPZ5iXDBlAV5v/94IvtowvKAJuLbJ2En557bfihk63wzsW92aqGB8AS7bZCpkm0Jy2 BaIoOPau9cwOQY6/zGhm4F1UFUNuLkQcpuYD/Z/1LvnmoeOnxHsIVAyq3vhanEm5T9GtkBxCQJy0s aZ3NSY17l2QY7VACxZ0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVo0G-00519s-NB; Sat, 25 Feb 2023 06:25:52 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVo05-00516l-5j for linux-mtd@lists.infradead.org; Sat, 25 Feb 2023 06:25:43 +0000 Received: by mail-pl1-x633.google.com with SMTP id c1so1683514plg.4 for ; Fri, 24 Feb 2023 22:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4QPCIfZpunPpGQRjZ0CLzZgvh1bMrAOlRsJYurE9VOI=; b=i2OnX+qtVkxWkVFcUUUtHoMVo58k8kPteFOU3yRJoch4UrZVjVtoKgQCILPsSIH2IM 9SuCn3vu72nb3n2gCsoCb9MQcwZbuXYf5jgyHDO34s/gR8M5CxRU5gV0+YnHw+9V/jL3 UereLqEbLRdif9+wLl1Wv9EJQ5zwKS3GE8nA8qUJSHw1j151949EZ1cDEtx0EJ19hLV9 2i4mG+2eo1p0BSS1qZavXyXOVwVlLf24HyC12nbm1kz7x2IzYuc7LLP1/1i2knyLhN87 asicV45YD46sfQWagebPdNnXBrCMp8DyEYimgDowgWuBomRC1Gc2M0hNTbO7Evf7ew4Y cwsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4QPCIfZpunPpGQRjZ0CLzZgvh1bMrAOlRsJYurE9VOI=; b=ooDpeX21hNXIiFPOM137GnfQTmCvJ3rG9w3P540sCEjqYPafSreLUPTVRl4B/+Dthv 9Y8Ejbzdf6UUdU62s0ZcSd01/trFW7TCxbEuurSsd+uXPXuSYdQKf6HKz1kXQ5Eu9JQG axNVJaFatsRJ1suC66W7uMYRkcWRs8p6L/3jiB7t3Nr3l269VsR8m3XzjT2UMOp/5jeM xgflT4Zjra4s7Tc0aN/KR92Khlwk6s0wk0AqeeB2pZku5oc9qYnQsNHz2lIIu9NafFXz YtOQRSDfIdMAk044jWPGrNe0FK+4ELFV52OVWXzWZOP32TbLNDzEEle/audeKAHLhxNw sT2w== X-Gm-Message-State: AO0yUKU/KphVF+Um/xC3vvx/GFn2QASCrW0kpcXuX6mzHM8Bed3kY86P CnDQ/RkJcD8ZJedpKGiKlOr3B6pl2KVb7BVjBGIYgw== X-Google-Smtp-Source: AK7set/k/0eO1pGMhcQMet0YU6e3h9+c98wFu1JipuFF0QZYfLgw6WY/Kw7NUyUCthebeNVAXRQmnWBsB84kG+im0+I= X-Received: by 2002:a17:903:2402:b0:19c:a7a7:7072 with SMTP id e2-20020a170903240200b0019ca7a77072mr3005999plo.10.1677306336589; Fri, 24 Feb 2023 22:25:36 -0800 (PST) MIME-Version: 1.0 References: <20230207014207.1678715-1-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Fri, 24 Feb 2023 22:24:59 -0800 Message-ID: Subject: Re: [PATCH v3 00/12] fw_devlink improvements To: Dmitry Baryshkov Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Sudeep Holla , Cristian Marussi , Linus Walleij , Bartosz Golaszewski , Thomas Gleixner , Marc Zyngier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Frank Rowand , Geert Uytterhoeven , Magnus Damm , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Len Brown , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Abel Vesa , Alexander Stein , Tony Lindgren , Geert Uytterhoeven , John Stultz , Doug Anderson , Guenter Roeck , Maxim Kiselev , Maxim Kochetkov , Luca Weiss , Colin Foster , Martin Kepplinger , Jean-Philippe Brucker , Vladimir Oltean , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-acpi@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230224_222541_245955_B5DBE426 X-CRM114-Status: GOOD ( 47.67 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Wed, Feb 15, 2023 at 7:12 PM Dmitry Baryshkov 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 # 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 > > Cc: Alexander Stein > > Cc: Tony Lindgren > > Cc: Sudeep Holla > > Cc: Geert Uytterhoeven > > Cc: John Stultz > > Cc: Doug Anderson > > Cc: Guenter Roeck > > Cc: Dmitry Baryshkov > > Cc: Maxim Kiselev > > Cc: Maxim Kochetkov > > Cc: Miquel Raynal > > Cc: Luca Weiss > > Cc: Colin Foster > > Cc: Martin Kepplinger > > Cc: Jean-Philippe Brucker > > Cc: Vladimir Oltean > > > > 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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 03AE2C7EE23 for ; Sat, 25 Feb 2023 06:26:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Rtd7POETwaL+pXIuiffjFefxmRVqBmhUUdRvx8coBjk=; b=Mx65jOw2kD82nX vVNVkojZaCzxGdJOLg3IqECxVhOixdBcGmfSFvxsaFhWfOyX6VUJjJtuXrzgjFbb/C73dx5rxVYg0 FiiOC4YLSuAIfcaGdqfFGGOJJBK60ZCtRAp8eOdrxcyNQSH5Jrwfj//epO/GsIIO5on2pq4Cn9/Za nZQl6v377OJTeEj7XK5T9vnbZXXuLCPyj+GhOsEIUdLR/06C62grZfa3djOD9i4dCEKvMEWrVrUVN 4sn8O2c9T0Qa7zx3XEWdHCFPWm2x08SFIajD9lvYeRdVk+Mmywp+3JULl3+1ezL/rKI3MlWRH9s22 a4/sfSUC4di2KaOnbVUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVo09-00518E-3f; Sat, 25 Feb 2023 06:25:45 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pVo05-00516k-50 for linux-arm-kernel@lists.infradead.org; Sat, 25 Feb 2023 06:25:43 +0000 Received: by mail-pj1-x1033.google.com with SMTP id q31-20020a17090a17a200b0023750b69614so1351651pja.5 for ; Fri, 24 Feb 2023 22:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4QPCIfZpunPpGQRjZ0CLzZgvh1bMrAOlRsJYurE9VOI=; b=i2OnX+qtVkxWkVFcUUUtHoMVo58k8kPteFOU3yRJoch4UrZVjVtoKgQCILPsSIH2IM 9SuCn3vu72nb3n2gCsoCb9MQcwZbuXYf5jgyHDO34s/gR8M5CxRU5gV0+YnHw+9V/jL3 UereLqEbLRdif9+wLl1Wv9EJQ5zwKS3GE8nA8qUJSHw1j151949EZ1cDEtx0EJ19hLV9 2i4mG+2eo1p0BSS1qZavXyXOVwVlLf24HyC12nbm1kz7x2IzYuc7LLP1/1i2knyLhN87 asicV45YD46sfQWagebPdNnXBrCMp8DyEYimgDowgWuBomRC1Gc2M0hNTbO7Evf7ew4Y cwsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4QPCIfZpunPpGQRjZ0CLzZgvh1bMrAOlRsJYurE9VOI=; b=gP/Y3UYdVO5ETh3xV+yCNkPTLqf4jADOmP8/fzqkutL0m1n0V9WLXDx4q5a1Vp+UV6 KKfPoM8pV7vM6ou+crgqfQfrSX4fRzcGHXYaU5x5cDDbQ1kwokp4CuSYsiPtzI1HtZYs kshrfc/SofbgO1RrdQaEDjBfWpbYKrdhZNcPzMZhLIj2RNB6o2vxzqOu2bbuGLtkjxCs C0lNTnx2CdwNP17BJAmfh15/SD9SritaG5dvnsJ7nAVmz9aYn1LoioDollydqXVf90Ll QpfEM0tzqrXvP0AKk8MPytyjLGcVtGUVL0LfDqm5YApLUqC720BomSKndcmxB9Z6dsFu OgEw== X-Gm-Message-State: AO0yUKUny1w4rVkIbk9QNDCkRwlYMQSdvemxseC84mw+TwmCEJIArE9Y 9VppNETknxm9gaaPWtVfAZ9dQePKKK6Frw8xbZdNHw== X-Google-Smtp-Source: AK7set/k/0eO1pGMhcQMet0YU6e3h9+c98wFu1JipuFF0QZYfLgw6WY/Kw7NUyUCthebeNVAXRQmnWBsB84kG+im0+I= X-Received: by 2002:a17:903:2402:b0:19c:a7a7:7072 with SMTP id e2-20020a170903240200b0019ca7a77072mr3005999plo.10.1677306336589; Fri, 24 Feb 2023 22:25:36 -0800 (PST) MIME-Version: 1.0 References: <20230207014207.1678715-1-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Fri, 24 Feb 2023 22:24:59 -0800 Message-ID: Subject: Re: [PATCH v3 00/12] fw_devlink improvements To: Dmitry Baryshkov Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Sudeep Holla , Cristian Marussi , Linus Walleij , Bartosz Golaszewski , Thomas Gleixner , Marc Zyngier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Frank Rowand , Geert Uytterhoeven , Magnus Damm , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Len Brown , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Abel Vesa , Alexander Stein , Tony Lindgren , Geert Uytterhoeven , John Stultz , Doug Anderson , Guenter Roeck , Maxim Kiselev , Maxim Kochetkov , Luca Weiss , Colin Foster , Martin Kepplinger , Jean-Philippe Brucker , Vladimir Oltean , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-acpi@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230224_222541_246171_C2B77FD2 X-CRM114-Status: GOOD ( 48.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 15, 2023 at 7:12 PM Dmitry Baryshkov 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 # 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 > > Cc: Alexander Stein > > Cc: Tony Lindgren > > Cc: Sudeep Holla > > Cc: Geert Uytterhoeven > > Cc: John Stultz > > Cc: Doug Anderson > > Cc: Guenter Roeck > > Cc: Dmitry Baryshkov > > Cc: Maxim Kiselev > > Cc: Maxim Kochetkov > > Cc: Miquel Raynal > > Cc: Luca Weiss > > Cc: Colin Foster > > Cc: Martin Kepplinger > > Cc: Jean-Philippe Brucker > > Cc: Vladimir Oltean > > > > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel