aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/reconfig.c
diff options
context:
space:
mode:
authorKent Yoder <key@linux.vnet.ibm.com>2012-04-12 05:04:11 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-05-14 10:49:06 +1000
commit4726b7b5e5a0a3d11a3c80ae8e2d5395003c51af (patch)
tree37f5236d2ebf5b3598836bae69245358a6905961 /arch/powerpc/platforms/pseries/reconfig.c
parentpowerpc/pseries: Add new hvcall constants to support PFO (diff)
downloadlinux-dev-4726b7b5e5a0a3d11a3c80ae8e2d5395003c51af.tar.xz
linux-dev-4726b7b5e5a0a3d11a3c80ae8e2d5395003c51af.zip
powerpc/pseries: Add pseries update notifier for OFDT prop changes
This adds an update notifier mechanism for changes to properties in the device tree. One use of this would be a device driver that needs to act on changes to it's properties in the device tree after a live migration or a dynamic activation that is triggered by updates to ofdt properties. Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/reconfig.c')
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 168651acdd83..7b3bf76ef834 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -103,11 +103,13 @@ int pSeries_reconfig_notifier_register(struct notifier_block *nb)
{
return blocking_notifier_chain_register(&pSeries_reconfig_chain, nb);
}
+EXPORT_SYMBOL_GPL(pSeries_reconfig_notifier_register);
void pSeries_reconfig_notifier_unregister(struct notifier_block *nb)
{
blocking_notifier_chain_unregister(&pSeries_reconfig_chain, nb);
}
+EXPORT_SYMBOL_GPL(pSeries_reconfig_notifier_unregister);
int pSeries_reconfig_notify(unsigned long action, void *p)
{
@@ -426,6 +428,7 @@ static int do_remove_property(char *buf, size_t bufsize)
static int do_update_property(char *buf, size_t bufsize)
{
struct device_node *np;
+ struct pSeries_reconfig_prop_update upd_value;
unsigned char *value;
char *name, *end, *next_prop;
int rc, length;
@@ -454,6 +457,10 @@ static int do_update_property(char *buf, size_t bufsize)
return -ENODEV;
}
+ upd_value.node = np;
+ upd_value.property = newprop;
+ pSeries_reconfig_notify(PSERIES_UPDATE_PROPERTY, &upd_value);
+
rc = prom_update_property(np, newprop, oldprop);
if (rc)
return rc;