summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-12-04 18:39:55 +1100
committerPaul Mackerras <paulus@samba.org>2006-01-09 14:52:38 +1100
commitba7594852f4e7121b3f037d59f983637b795f0dd (patch)
tree6949f16d3dff337b4b36ced0b460e4ed9b09365b /arch/powerpc/kernel
parent54c32021eb6feafc32e90104e960b38301521b7b (diff)
downloadlinux-ba7594852f4e7121b3f037d59f983637b795f0dd.tar.gz
linux-ba7594852f4e7121b3f037d59f983637b795f0dd.tar.bz2
linux-ba7594852f4e7121b3f037d59f983637b795f0dd.zip
[PATCH] powerpc: Add support for "linux,usable-memory" on memory nodes
Milton has proposed that we should support a "linux,usable-memory" property on memory nodes which describes, in preference to "reg", the regions of memory Linux should use. This facility is required for kdump to inform the second kernel which memory it should use. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/prom.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index fddc9c13bff5..7e798d5b03b4 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -567,7 +567,10 @@ static int __init interpret_root_props(struct device_node *np,
unsigned int *rp;
int rpsize = (naddrc + nsizec) * sizeof(unsigned int);
- rp = (unsigned int *) get_property(np, "reg", &l);
+ rp = (unsigned int *) get_property(np, "linux,usable-memory", &l);
+ if (rp == NULL)
+ rp = (unsigned int *) get_property(np, "reg", &l);
+
if (rp != 0 && l >= rpsize) {
i = 0;
adr = (struct address_range *) (*mem_start);
@@ -1275,7 +1278,9 @@ static int __init early_init_dt_scan_memory(unsigned long node,
} else if (strcmp(type, "memory") != 0)
return 0;
- reg = (cell_t *)of_get_flat_dt_prop(node, "reg", &l);
+ reg = (cell_t *)of_get_flat_dt_prop(node, "linux,usable-memory", &l);
+ if (reg == NULL)
+ reg = (cell_t *)of_get_flat_dt_prop(node, "reg", &l);
if (reg == NULL)
return 0;