From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: Cyril Bur <cyril.bur@au1.ibm.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 1/3] drivers/of: add of_changeset_apply_locked
Date: Thu, 25 Sep 2014 15:35:14 -0700 [thread overview]
Message-ID: <542498A2.2070209@linux.vnet.ibm.com> (raw)
In-Reply-To: <1411627290-20302-2-git-send-email-cyril.bur@au1.ibm.com>
On 09/24/2014 11:41 PM, Cyril Bur wrote:
> Due to the requirement of of_changesets that of_changeset_apply be called
> holding the of_mutex and that the of_mutex cannot be accessed nicely outside
> the of code, added a wrapper which grabs the lock and called
> of_changeset_apply.
>
> Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
> ---
> drivers/of/dynamic.c | 11 +++++++++++
> include/linux/of.h | 1 +
> 2 files changed, 12 insertions(+)
This patch needs to go through Grant Likely and the device tree list.
When unsure scripts/get_maintainer.pl can help point the way.
-Tyrel
>
> diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
> index 54fecc4..cbff2a2 100644
> --- a/drivers/of/dynamic.c
> +++ b/drivers/of/dynamic.c
> @@ -542,6 +542,17 @@ void of_changeset_destroy(struct of_changeset *ocs)
> __of_changeset_entry_destroy(ce);
> }
>
> +int of_changeset_apply_locked(struct of_changeset *ocs)
> +{
> + int ret;
> +
> + mutex_lock(&of_mutex);
> + ret = of_changeset_apply(ocs);
> + mutex_unlock(&of_mutex);
> +
> + return ret;
> +}
> +
> /**
> * of_changeset_apply - Applies a changeset
> *
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 6c4363b..f5c48fa 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -827,6 +827,7 @@ struct of_changeset {
> extern void of_changeset_init(struct of_changeset *ocs);
> extern void of_changeset_destroy(struct of_changeset *ocs);
> extern int of_changeset_apply(struct of_changeset *ocs);
> +extern int of_changeset_apply_locked(struct of_changeset *ocs);
> extern int of_changeset_revert(struct of_changeset *ocs);
> extern int of_changeset_action(struct of_changeset *ocs,
> unsigned long action, struct device_node *np,
>
next prev parent reply other threads:[~2014-09-25 22:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 6:41 [PATCH v2 0/3] fix bugs in mobility RTAS calls Cyril Bur
2014-09-25 6:41 ` [PATCH v2 1/3] drivers/of: add of_changeset_apply_locked Cyril Bur
2014-09-25 7:01 ` Stephen Rothwell
2014-09-25 22:35 ` Tyrel Datwyler [this message]
2014-09-25 6:41 ` [PATCH v2 2/3] powerpc/pseries: create rtas buffer accessor Cyril Bur
2014-09-25 22:47 ` Tyrel Datwyler
2014-09-26 1:32 ` Cyril Bur
2014-09-25 6:41 ` [PATCH v2 3/3] powerpc/pseries: fix bugs in mobility RTAS calls Cyril Bur
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=542498A2.2070209@linux.vnet.ibm.com \
--to=tyreld@linux.vnet.ibm.com \
--cc=cyril.bur@au1.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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 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).