diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-06-01 03:07:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-01 10:54:14 -0400 |
commit | 5f64f73957f6cae3222f97f2599199ee562f7f3f (patch) | |
tree | 115e11766270637d3c9b2e9e0366b127af7a1fd6 /include | |
parent | f93ea2349832c040bdf66dc7495aa87bfe3394b8 (diff) |
[PATCH] ppc32/ppc64: cleanup /proc/device-tree
This cleans up the /proc/device-tree representation of the Open Firmware
device-tree on ppc and ppc64. It does the following things:
- Workaround an issue in some Apple device-trees where a property may
exist with the same name as a child node of the parent. We now
simply "drop" the property instead of creating duplicate entries in
/proc with random result...
- Do not try to chop off the "@0" at the end of a node name whose unit
address is 0. This is not useful, inconsistent, and the code was
buggy and didn't always work anyway.
- Do not create symlinks for the short name and unit address parts of a
node. These were never really used, bloated the memory footprint of
the device-tree with useless struct proc_dir_entry and their matching
dentry and inode cache bloat.
This results in smaller code, smaller memory footprint, and a more
accurate view of the tree presented to userland.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ppc64/prom.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h index 2440a2c90ae9..04b1a84f7ca3 100644 --- a/include/asm-ppc64/prom.h +++ b/include/asm-ppc64/prom.h | |||
@@ -147,9 +147,7 @@ struct device_node { | |||
147 | struct device_node *sibling; | 147 | struct device_node *sibling; |
148 | struct device_node *next; /* next device of same type */ | 148 | struct device_node *next; /* next device of same type */ |
149 | struct device_node *allnext; /* next in list of all nodes */ | 149 | struct device_node *allnext; /* next in list of all nodes */ |
150 | struct proc_dir_entry *pde; /* this node's proc directory */ | 150 | struct proc_dir_entry *pde; /* this node's proc directory */ |
151 | struct proc_dir_entry *name_link; /* name symlink */ | ||
152 | struct proc_dir_entry *addr_link; /* addr symlink */ | ||
153 | struct kref kref; | 151 | struct kref kref; |
154 | unsigned long _flags; | 152 | unsigned long _flags; |
155 | }; | 153 | }; |
@@ -174,15 +172,6 @@ static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_e | |||
174 | dn->pde = de; | 172 | dn->pde = de; |
175 | } | 173 | } |
176 | 174 | ||
177 | static void inline set_node_name_link(struct device_node *dn, struct proc_dir_entry *de) | ||
178 | { | ||
179 | dn->name_link = de; | ||
180 | } | ||
181 | |||
182 | static void inline set_node_addr_link(struct device_node *dn, struct proc_dir_entry *de) | ||
183 | { | ||
184 | dn->addr_link = de; | ||
185 | } | ||
186 | 175 | ||
187 | /* OBSOLETE: Old stlye node lookup */ | 176 | /* OBSOLETE: Old stlye node lookup */ |
188 | extern struct device_node *find_devices(const char *name); | 177 | extern struct device_node *find_devices(const char *name); |