From: Nathan Fontenot <nfont@austin.ibm.com>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 1/5 v2] Allow phandle to be specified in formats other than decimal
Date: Wed, 02 Jul 2008 22:19:24 -0500 [thread overview]
Message-ID: <486C453C.1010903@austin.ibm.com> (raw)
In-Reply-To: <486C4462.4010004@austin.ibm.com>
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>
---
arch/powerpc/platforms/pseries/reconfig.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.git/arch/powerpc/platforms/pseries/reconfig.c
===================================================================
--- linux-2.6.git.orig/arch/powerpc/platforms/pseries/reconfig.c 2008-07-01 09:38:22.000000000 -0500
+++ linux-2.6.git/arch/powerpc/platforms/pseries/reconfig.c 2008-07-01 09:38:26.000000000 -0500
@@ -365,7 +365,7 @@
*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;
next prev parent reply other threads:[~2008-07-03 3:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 3:15 [PATCH 0/5 v2] Update memory dlpar for dynamic reconfiguration memory Nathan Fontenot
2008-07-03 3:19 ` Nathan Fontenot [this message]
2008-07-03 3:20 ` [PATCH 2/5 v2] Use base address to derive starting page frame number Nathan Fontenot
2008-07-03 3:22 ` [PATCH 3/5 v2] Update the device tree correctly for drconf memory add/remove Nathan Fontenot
2008-07-03 3:23 ` [PATCH 4/5 v2] Split code into helper routines for drconf memory Nathan Fontenot
2008-07-03 3:35 ` Nathan Fontenot
2008-07-03 3:25 ` [PATCH 5/5 v2] Update numa association of hotplug memory add " Nathan Fontenot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=486C453C.1010903@austin.ibm.com \
--to=nfont@austin.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).