summaryrefslogtreecommitdiff
path: root/include/asm-powerpc/prom.h
diff options
context:
space:
mode:
authorDave C Boutcher <sleddog@us.ibm.com>2006-01-12 16:08:27 -0600
committerPaul Mackerras <paulus@samba.org>2006-01-13 21:02:50 +1100
commit088186ded490ced80758200cf8f906ed741df306 (patch)
tree0afbaac2b9843937c63da79dfbd91a60f606c00f /include/asm-powerpc/prom.h
parent898b5395e915210f41223caa30312994d64cba1d (diff)
downloadlinux-3.10-088186ded490ced80758200cf8f906ed741df306.tar.gz
linux-3.10-088186ded490ced80758200cf8f906ed741df306.tar.bz2
linux-3.10-088186ded490ced80758200cf8f906ed741df306.zip
[PATCH] powerpc: Add/remove/update properties in firmware device tree
Add support for updating and removing device tree properties. Since we hand out pointers to properties with gay abandon, we can't just free the property storage. Instead we move deleted, or the old copy of an updated property, to a "dead properties" list. Also note, its not feasable to kref device tree properties. we call get_property() all over the kernel in a wild variety of contexts. One consequence of this change is that we now take a read_lock(&devtree_lock) when doing get_property(). Signed-off-by: Dave Boutcher <sleddog@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/prom.h')
-rw-r--r--include/asm-powerpc/prom.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 329e9bf6226..25d8d5974d1 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -87,6 +87,7 @@ struct device_node {
char *full_name;
struct property *properties;
+ struct property *deadprops; /* removed properties */
struct device_node *parent;
struct device_node *child;
struct device_node *sibling;
@@ -164,6 +165,10 @@ extern int prom_n_size_cells(struct device_node* np);
extern int prom_n_intr_cells(struct device_node* np);
extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
extern int prom_add_property(struct device_node* np, struct property* prop);
+extern int prom_remove_property(struct device_node *np, struct property *prop);
+extern int prom_update_property(struct device_node *np,
+ struct property *newprop,
+ struct property *oldprop);
#ifdef CONFIG_PPC32
/*