[PATCH] [PPC64] Fix wrong max_memory_ranges value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The value of max_memory_ranges is calculated in count_memory_ranges() and only
counts the memory@ nodes. However, in get_devtree_details(), pci@ nodes are also
added to exclude_range just at the end of the loop.

This patch changes count_memory_ranges() to also consider pci@ nodes in 

Signed-off-by: Bernhard Walle <bwalle@xxxxxxx>

 kexec/arch/ppc64/kexec-ppc64.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: kexec-tools-1.101/kexec/arch/ppc64/kexec-ppc64.c
--- kexec-tools-1.101.orig/kexec/arch/ppc64/kexec-ppc64.c
+++ kexec-tools-1.101/kexec/arch/ppc64/kexec-ppc64.c
@@ -118,7 +118,8 @@ static int count_memory_ranges()
 	while ((dentry = readdir(dir)) != NULL) {
-		if (strncmp(dentry->d_name, "memory@", 7))
+		if (strncmp(dentry->d_name, "memory@", 7) &&
+				strncmp(dentry->d_name, "pci@", 4))
fastboot mailing list

[Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Linux Media]     [Linux Resources]

Powered by Linux