]> git.hungrycats.org Git - linux/commit
[PATCH] ppc64: fix missing RELOCs, add linux,phandle property
authorPaul Mackerras <paulus@samba.org>
Tue, 1 Jun 2004 01:36:07 +0000 (18:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 1 Jun 2004 01:36:07 +0000 (18:36 -0700)
commitf7b634c5e90b37a18ec019fbf906564f2330c959
tree66316047f3d3dcdcfdd24522137eb17b89abe6f5
parent9102d1e21ddb02c1f84998116a341941bb99d5c1
[PATCH] ppc64: fix missing RELOCs, add linux,phandle property

This fixes a couple of bugs in arch/ppc64/kernel/prom.c.  We were
missing a couple of places where we needed to use RELOC().  I added the
RELOC in one case, and in the other, moved the variable that we were
accessing onto the stack (and reduced its size).  (We use the variable
to get a property value, but we aren't interested in the value, just in
whether the property exists or not.  Since we pass the size of the
variable to the OF getprop call, it won't overflow.) The effect of
missing the RELOCs would be that random memory locations get used on IBM
pSeries systems (possibly causing random boot failures).

The other thing that this does is add a linux,phandle property to each
node, containing the phandle for the node, which is the token that OF
uses to identify the node.  Some nodes reference other nodes by means
of their phandle.  Without the linux,phandle property, userspace code
looking at the OF device-tree image in /proc/device-tree has no way of
knowing which other node is being referenced.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc64/kernel/prom.c