aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorDave C Boutcher <sleddog@us.ibm.com>2006-01-12 17:08:27 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-13 05:02:50 -0500
commit088186ded490ced80758200cf8f906ed741df306 (patch)
tree0afbaac2b9843937c63da79dfbd91a60f606c00f /include/asm-powerpc
parent898b5395e915210f41223caa30312994d64cba1d (diff)
[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')
-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 329e9bf62260..25d8d5974d19 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -87,6 +87,7 @@ struct device_node {
87 char *full_name; 87 char *full_name;
88 88
89 struct property *properties; 89 struct property *properties;
90 struct property *deadprops; /* removed properties */
90 struct device_node *parent; 91 struct device_node *parent;
91 struct device_node *child; 92 struct device_node *child;
92 struct device_node *sibling; 93 struct device_node *sibling;
@@ -164,6 +165,10 @@ extern int prom_n_size_cells(struct device_node* np);
164extern int prom_n_intr_cells(struct device_node* np); 165extern int prom_n_intr_cells(struct device_node* np);
165extern void prom_get_irq_senses(unsigned char *senses, int off, int max); 166extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
166extern int prom_add_property(struct device_node* np, struct property* prop); 167extern int prom_add_property(struct device_node* np, struct property* prop);
168extern int prom_remove_property(struct device_node *np, struct property *prop);
169extern int prom_update_property(struct device_node *np,
170 struct property *newprop,
171 struct property *oldprop);
167 172
168#ifdef CONFIG_PPC32 173#ifdef CONFIG_PPC32
169/* 174/*