diff options
author | Chandru <chandru@in.ibm.com> | 2010-03-02 16:09:49 +0530 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2010-03-03 08:32:09 +1100 |
commit | 5996651eccbffb7c195c2911f37fda2f2258e48d (patch) | |
tree | d9638fb5c82ab3d3739ce9acd290f694b5049267 | |
parent | 0e669a27ec55d2baaf47fdab87da08ed189b5ac6 (diff) |
kexec/kdump: RMO region does not exist in drconf memory
The RMO region can only exist in '/memory@0' node in the device tree.
While adding support for '/ibm,dynamic-reconfiguration-memory' in
kexec-tools, I incorrectly extended the code of '/memory@' nodes to
drconf memory with the assumption that what applies to '/memory@'
nodes would also apply to drconf memory. This is incorrect and
hence removing the code from kexec-tools now.
With this code in place, kexec on kexec fails. The first kexec
works because '/memory@0' node is read after drconf memory and
that correctly sets rmo_base and rmo_top from '/memory@0' node.
While in the kexec'ed kernel, '/ibm,dynamic-reconfiguration-memory'
is read after '/memory@xxx' nodes and this incorrectly sets both
rmo_base and rmo_top from drconf memory.
Sorry for introducing this bug.
Signed-off-by: Chandru Siddalingappa <chandru@linux.vnet.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/ppc64/kexec-ppc64.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c index d83cc3f..f9dc65b 100644 --- a/kexec/arch/ppc64/kexec-ppc64.c +++ b/kexec/arch/ppc64/kexec-ppc64.c @@ -342,9 +342,7 @@ static int get_devtree_details(unsigned long kexec_flags) strncmp(dentry->d_name, "memory@", 7) && strcmp(dentry->d_name, "memory") && strncmp(dentry->d_name, "pci@", 4) && - strncmp(dentry->d_name, "rtas", 4) && - strncmp(dentry->d_name, - "ibm,dynamic-reconfiguration-memory", 35)) + strncmp(dentry->d_name, "rtas", 4)) continue; strcpy(fname, device_tree); strcat(fname, dentry->d_name); @@ -550,29 +548,6 @@ static int get_devtree_details(unsigned long kexec_flags) closedir(cdir); } /* memory */ - if (!strncmp(dentry->d_name, - "ibm,dynamic-reconfiguration-memory", 35)) { - unsigned int k; - strcat(fname, "/ibm,dynamic-memory"); - if ((file = fopen(fname, "r")) == NULL) { - perror(fname); - goto error_opencdir; - } - fseek(file, 4, SEEK_SET); - for (k = 0; k < num_of_lmbs; k++) { - if ((n = fread(buf, 1, 24, file)) < 0) { - perror(fname); - goto error_openfile; - } - rmo_base = ((uint64_t *)buf)[0]; - rmo_top = rmo_base + lmb_size; - if (rmo_top > 0x30000000UL) - rmo_top = 0x30000000UL; - } - fclose(file); - closedir(cdir); - } /* ibm,dynamic-reconfiguration-memory */ - if (strncmp(dentry->d_name, "pci@", 4) == 0) { strcat(fname, "/linux,tce-base"); if ((file = fopen(fname, "r")) == NULL) { |