Skip to content

Commit

Permalink
powerpc/pseries: Allow phandle to be specified in formats other than …
Browse files Browse the repository at this point in the history
…decimal

Allow the phandle passed to the /proc/ppc64/ofdt file to be specified
in formats other than decimal.  This allows us to easily specify phandle
values in hex that would otherwise appear as negative integers.

This is an issue on systems where the value of
/proc/device-tree/ibm,dynamic-reconfiguration-memory.ibm,phandle is
fffffff9.  Having to pass this to the ofdt file as a string results in
a large negative number, and simple_strtoul() does not handle negative
numbers.

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Nathan Fontenot authored and Paul Mackerras committed Jul 3, 2008
1 parent 138fc1e commit 4b6e805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/reconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static char *parse_node(char *buf, size_t bufsize, struct device_node **npp)
*buf = '\0';
buf++;

handle = simple_strtoul(handle_str, NULL, 10);
handle = simple_strtoul(handle_str, NULL, 0);

*npp = of_find_node_by_phandle(handle);
return buf;
Expand Down

0 comments on commit 4b6e805

Please sign in to comment.