All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Haren Myneni <haren@linux.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org,
	maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com,
	saravanak@kernel.org, ritesh.list@gmail.com, hbabu@us.ibm.com
Subject: Re: [PATCH 2/2] powerpc/pseries/dlpar: Remove DT entries if failure from CPU ADD notifier
Date: Wed, 16 Sep 2026 16:33:08 -0500	[thread overview]
Message-ID: <20260916213308.GF1926857-robh@kernel.org> (raw)
In-Reply-To: <20260916043249.2062676-2-haren@linux.ibm.com>

On Tue, Sep 15, 2026 at 09:32:49PM -0700, Haren Myneni wrote:
> For CPU ADD, the device tree entries are retrieved with
> configure-connector RTAS call and attached to the device tree.
> Then the CPU is added as part of DT node notification. If the CPU
> ADD notifier returns failure, the corresponding CPU node entries
> should be deleted from the device-tree. See pseries_add_processor()
> for the possible failure cases.
> 
> The current code does not remove CPU node entries during CPU ADD
> notifier failure and causing the following issues:
> - Can not add this CPU later since already present in the
>   device-tree.
> - Trying to free memory allocated to CPU node without detaching
>   the node and it causes freeing its sibling node (existing CPU
>   nodes).
> 
> This patch fixes this issue by calling of_detach_node_no_notify()
> for the failure from CPU ADD notifier which removes CPU node
> entries without calling CPU REMOVE notifier.

Would using the of_changeset_ API directly solve your issue? It's better 
designed for handling reverting a changeset. The of_attach_node/ 
of_detach_node() APIs have limited users and I'd really like to remove 
them. Or make them PPC specific perhaps. Looks like there is 1 non-PPC 
user that snuck in.

Rob

  parent reply	other threads:[~2026-09-16 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  4:32 [PATCH 1/2] drivers/of: Add of_detach_node_no_notify() Haren Myneni
2026-09-16  4:32 ` [PATCH 2/2] powerpc/pseries/dlpar: Remove DT entries if failure from CPU ADD notifier Haren Myneni
2026-09-16  4:47   ` sashiko-bot
2026-09-17  3:57     ` Haren Myneni
2026-09-16 21:33   ` Rob Herring [this message]
2026-09-17  3:42     ` Haren Myneni
2026-09-16  4:43 ` [PATCH 1/2] drivers/of: Add of_detach_node_no_notify() sashiko-bot
2026-09-17  4:11   ` Haren Myneni

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=20260916213308.GF1926857-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=haren@linux.ibm.com \
    --cc=hbabu@us.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=ritesh.list@gmail.com \
    --cc=saravanak@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.