From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
To: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 5/8] powerpc/pseries: do all node initialization in dlpar_parse_cc_node
Date: Mon, 19 Aug 2013 08:49:21 -0500 [thread overview]
Message-ID: <52122261.7030501@linux.vnet.ibm.com> (raw)
In-Reply-To: <1376544232-24936-6-git-send-email-tyreld@linux.vnet.ibm.com>
On 08/15/2013 12:23 AM, Tyrel Datwyler wrote:
> Currently the OF_DYNAMIC and kref initialization for a node happens in
> dlpar_attach_node. However, a node passed to dlpar_attach_node may be a tree
> containing child nodes, and no initialization traversal is done on the
> tree. Since the children never get their kref initialized or the OF_DYNAMIC
> flag set these nodes are prevented from ever being released from memory
> should they become detached. This initialization step is better done at the
> time each node is allocated in dlpar_parse_cc_node.
>
> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> ---
> arch/powerpc/platforms/pseries/dlpar.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
> index a1a7b9a..c855233 100644
> --- a/arch/powerpc/platforms/pseries/dlpar.c
> +++ b/arch/powerpc/platforms/pseries/dlpar.c
> @@ -83,6 +83,9 @@ static struct device_node *dlpar_parse_cc_node(struct cc_workarea *ccwa)
> return NULL;
> }
>
> + of_node_set_flag(dn, OF_DYNAMIC);
> + kref_init(&dn->kref);
> +
> return dn;
> }
>
> @@ -256,8 +259,6 @@ int dlpar_attach_node(struct device_node *dn)
> {
> int rc;
>
> - of_node_set_flag(dn, OF_DYNAMIC);
> - kref_init(&dn->kref);
> dn->parent = derive_parent(dn->full_name);
> if (!dn->parent)
> return -ENOMEM;
>
next prev parent reply other threads:[~2013-08-19 13:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 5:23 [PATCH 0/8] powerpc/pseries: fix/cleanup broken mobility device-tree update code Tyrel Datwyler
2013-08-15 5:23 ` [PATCH 1/8] powerpc/pseries: fix creation of loop in device node property list Tyrel Datwyler
2013-08-19 13:43 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 2/8] powerpc/pseries: fix over writing of rtas return code in update_dt_node Tyrel Datwyler
2013-08-19 13:44 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 3/8] powerpc/pseries: pack update_props_workarea to map correctly to rtas buffer header Tyrel Datwyler
2013-08-19 13:46 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 4/8] powerpc/pseries: fix parsing of initial node path in update_dt_node Tyrel Datwyler
2013-08-19 13:48 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 5/8] powerpc/pseries: do all node initialization in dlpar_parse_cc_node Tyrel Datwyler
2013-08-19 13:49 ` Nathan Fontenot [this message]
2013-08-15 5:23 ` [PATCH 6/8] powerpc/pseries: make dlpar_configure_connector parent node aware Tyrel Datwyler
2013-08-19 13:53 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 7/8] powerpc/pseries: add mising of_node_put in delete_dt_node Tyrel Datwyler
2013-08-19 13:54 ` Nathan Fontenot
2013-08-15 5:23 ` [PATCH 8/8] powerpc/pseries: child nodes are not detached by dlpar_detach_node Tyrel Datwyler
2013-08-19 13:56 ` Nathan Fontenot
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=52122261.7030501@linux.vnet.ibm.com \
--to=nfont@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=tyreld@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).