Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305380
b: refs/heads/master
c: 4726b7b
h: refs/heads/master
v: v3
  • Loading branch information
Kent Yoder authored and Benjamin Herrenschmidt committed May 14, 2012
1 parent d2e113c commit 34a2b1e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d6e0fa1a593b2d7c4b468cb5ac52c29fe20e716
refs/heads/master: 4726b7b5e5a0a3d11a3c80ae8e2d5395003c51af
12 changes: 12 additions & 0 deletions trunk/arch/powerpc/include/asm/pSeries_reconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
#define PSERIES_RECONFIG_REMOVE 0x0002
#define PSERIES_DRCONF_MEM_ADD 0x0003
#define PSERIES_DRCONF_MEM_REMOVE 0x0004
#define PSERIES_UPDATE_PROPERTY 0x0005

/**
* pSeries_reconfig_notify - Notifier value structure for OFDT property updates
*
* @node: Device tree node which owns the property being updated
* @property: Updated property
*/
struct pSeries_reconfig_prop_update {
struct device_node *node;
struct property *property;
};

#ifdef CONFIG_PPC_PSERIES
extern int pSeries_reconfig_notifier_register(struct notifier_block *);
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/powerpc/platforms/pseries/reconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 34a2b1e

Please sign in to comment.