[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZcDWQ52BGix3ocUC@smile.fi.intel.com>
Date: Mon, 5 Feb 2024 14:36:19 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: nuno.sa@...log.com
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] of: dynamic: flush devlinks workqueue before
destroying the changeset
On Mon, Feb 05, 2024 at 01:09:33PM +0100, Nuno Sa via B4 Relay wrote:
> From: Nuno Sa <nuno.sa@...log.com>
>
> Device links will drop their supplier + consumer refcounts
> asynchronously. That means that the refcount of the of_node attached to
> these devices will also be dropped asynchronously and so we cannot
> guarantee the DT overlay assumption that the of_node refcount must be 1 in
> __of_changeset_entry_destroy().
>
> Given the above, call the new fwnode_links_flush_queue() helper to flush
> the devlink workqueue so we can be sure that all links are dropped before
> doing the proper checks.
Have you seen my comments against v1?
> +++ b/drivers/of/dynamic.c
> @@ -14,6 +14,7 @@
> #include <linux/slab.h>
> #include <linux/string.h>
> #include <linux/proc_fs.h>
> +#include <linux/fwnode.h>
Try to squeeze this to make it ordered (with given context it may go before
linux/s* ones, but maybe you may find a better spot).
..
> + /*
> + * device links drop their device references (and hence their of_node
Device links...
> + * references) asynchronously on a dedicated workqueue. Hence we need
> + * to flush it to make sure everything is done before doing the below
> + * checks.
> + */
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists