• Paul Mackerras's avatar
    [PATCH] ppc64: fix missing RELOCs, add linux,phandle property · f7b634c5
    Paul Mackerras authored
    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: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    f7b634c5
prom.c 88.1 KB