From: Dave Jiang <dave.jiang@intel.com>
To: alucerop@amd.com, linux-cxl@vger.kernel.org, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, ecree.xilinx@gmail.com, icheng@nvidia.com,
rafael@kernel.org
Subject: Re: [PATCH v2 1/4] driver core: Check for supplier requiring PM at link creation
Date: Thu, 1 Oct 2026 13:31:47 -0700 [thread overview]
Message-ID: <9e8a45df-1755-495f-8e80-52c65b832dc9@intel.com> (raw)
In-Reply-To: <20261001132023.17032-2-alucerop@amd.com>
On 10/1/26 6:20 AM, alucerop@amd.com wrote:
> From: Alejandro Lucero <alucerop@amd.com>
>
> PM initialization could not be necessary for some devices.
>
> Avoid checking for supplier PM initialization if so.
>
> Signed-off-by: Alejandro Lucero <alucerop@amd.com>
> ---
> drivers/base/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 4c0c373998a1..bf0513beafad 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -840,7 +840,7 @@ struct device_link *device_link_add(struct device *consumer,
> * SYNC_STATE_ONLY link, we don't check for reverse dependencies
> * because it only affects sync_state() callbacks.
> */
> - if (!device_pm_initialized(supplier)
> + if ((!device_pm_not_required(supplier) && !device_pm_initialized(supplier))
> || (!(flags & DL_FLAG_SYNC_STATE_ONLY) &&
> device_is_dependent(consumer, supplier))) {
> link = NULL;
A no PM supplier can now be linked at any point: before device_add(), while it fails, or after device_del(). Maybe replace with a helper like this?
static bool device_link_supplier_ready(struct device *supplier)
{
/* no PM devices never enter dpm_list, so check registration directly */
if (device_pm_not_required(supplier))
return device_is_registered(supplier);
return device_pm_initialized(supplier);
}
...
if (!device_link_supplier_ready(supplier) ||
(!(flags & DL_FLAG_SYNC_STATE_ONLY) &&
device_is_dependent(consumer, supplier))) {
link = NULL;
goto out;
}
next prev parent reply other threads:[~2026-10-01 20:31 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 13:20 [PATCH v2 0/4] Type2 multipf support alucerop
2026-10-01 13:20 ` [PATCH v2 1/4] driver core: Check for supplier requiring PM at link creation alucerop
2026-10-01 20:31 ` Dave Jiang [this message]
2026-10-02 4:32 ` Lucero Palau, Alejandro
2026-10-02 15:31 ` Dave Jiang
2026-10-02 12:02 ` sashiko-bot
2026-10-01 13:20 ` [PATCH v2 2/4] cxl/region: Add region reference in memdev attach alucerop
2026-10-01 21:38 ` Dave Jiang
2026-10-02 4:41 ` Lucero Palau, Alejandro
2026-10-02 15:52 ` Dave Jiang
2026-10-08 13:50 ` Lucero Palau, Alejandro
2026-10-08 16:18 ` Dave Jiang
2026-10-08 18:07 ` Lucero Palau, Alejandro
2026-10-08 21:05 ` Dave Jiang
2026-10-09 6:58 ` Lucero Palau, Alejandro
2026-10-09 16:57 ` Dave Jiang
2026-10-02 12:02 ` sashiko-bot
2026-10-01 13:20 ` [PATCH v2 3/4] cxl/memdev: Add support for multi PF devices alucerop
2026-10-01 22:11 ` Dave Jiang
2026-10-01 22:41 ` Dave Jiang
2026-10-02 4:50 ` Lucero Palau, Alejandro
2026-10-02 15:55 ` Dave Jiang
2026-10-02 12:02 ` sashiko-bot
2026-10-01 13:20 ` [PATCH v2 4/4] sfc: add multipf support alucerop
2026-10-01 22:32 ` Dave Jiang
2026-10-02 5:33 ` Lucero Palau, Alejandro
2026-10-02 12:02 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e8a45df-1755-495f-8e80-52c65b832dc9@intel.com \
--to=dave.jiang@intel.com \
--cc=alucerop@amd.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=icheng@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.