[PATCH 1/6] ppc64-fix-function-parameters

R Sharada sharada at in.ibm.com
Tue Jan 17 02:08:55 EST 2006



Fix the input parameters for get_memory_ranges and arch_compat_trampoline
keeping in line with the function prototypes defined in kexec/kexec.h. Also
changed variable references in /proc/device-tree
- modified the function parameters for get_memory_ranges and 
arch_compat_trampoline
- fixed the names for kernel_end, htab_base and htab_size, in 
line with the kernel variable names for the same

Signed-off-by: R Sharada <sharada at in.ibm.com>
---


diff -puN kexec/arch/ppc64/kexec-ppc64.c~ppc64-fix-function-parameters kexec/arch/ppc64/kexec-ppc64.c
--- kexec-tools-1.101/kexec/arch/ppc64/kexec-ppc64.c~ppc64-fix-function-parameters	2005-12-24 04:15:37.000000000 +0530
+++ kexec-tools-1.101-sharada/kexec/arch/ppc64/kexec-ppc64.c	2005-12-24 04:51:51.000000000 +0530
@@ -64,7 +64,6 @@ static int get_base_ranges()
 	FILE *file;
 	struct dirent *dentry, *mentry;
 	int n;
-	unsigned long long start, end;
 
 	if ((dir = opendir(device_tree)) == NULL) {
 		perror(device_tree);
@@ -193,7 +192,7 @@ static int get_devtree_details()
 			memset(fname, 0, sizeof(fname));
 			strcpy(fname, device_tree);
 			strcat(fname, dentry->d_name);
-			strcat(fname, "/kernel_end");
+			strcat(fname, "/linux,kernel-end");
 			if ((file = fopen(fname, "r")) == NULL) {
 				perror(fname);
 				closedir(cdir);
@@ -220,7 +219,7 @@ static int get_devtree_details()
 			memset(fname, 0, sizeof(fname));
 			strcpy(fname, device_tree);
 			strcat(fname, dentry->d_name);
-			strcat(fname, "/htab_base");
+			strcat(fname, "/linux,htab-base");
 			if ((file = fopen(fname, "r")) == NULL) {
 				perror(fname);
 				closedir(cdir);
@@ -238,7 +237,7 @@ static int get_devtree_details()
 			memset(fname, 0, sizeof(fname));
 			strcpy(fname, device_tree);
 			strcat(fname, dentry->d_name);
-			strcat(fname, "/htab_size");
+			strcat(fname, "/linux,htab-size");
 			if ((file = fopen(fname, "r")) == NULL) {
 				perror(fname);
 				closedir(cdir);
@@ -452,7 +451,8 @@ int setup_memory_ranges(void)
 }
 
 /* Return a list of valid memory ranges */
-int get_memory_ranges(struct memory_range **range, int *ranges)
+int get_memory_ranges(struct memory_range **range, int *ranges,
+			unsigned long kexec_flags)
 {
 	setup_memory_ranges();
 	*range = memory_range;
@@ -497,7 +497,7 @@ int arch_process_options(int argc, char 
 	return 0;
 }
 
-int arch_compat_trampoline(struct kexec_info *info, unsigned long *flags)
+int arch_compat_trampoline(struct kexec_info *info)
 {
 	int result;
 	struct utsname utsname;
@@ -512,7 +512,7 @@ int arch_compat_trampoline(struct kexec_
 		/* We are running a 32-bit kexec-tools on 64-bit ppc64.
 		 * So pass KEXEC_ARCH_PPC64 here
 		 */
-		*flags |= KEXEC_ARCH_PPC64;
+		info->kexec_flags |= KEXEC_ARCH_PPC64;
 	}
 	else {
 		fprintf(stderr, "Unsupported machine type: %s\n",
diff -puN kexec/arch/ppc64/fs2dt.c~ppc64-fix-function-parameters kexec/arch/ppc64/fs2dt.c
--- kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c~ppc64-fix-function-parameters	2005-12-24 06:57:29.000000000 +0530
+++ kexec-tools-1.101-sharada/kexec/arch/ppc64/fs2dt.c	2005-12-24 06:58:07.000000000 +0530
@@ -162,9 +162,9 @@ void putprops(char *fn, DIR *dir)
 		 * boot. So, ignore it.
 		 */
 		if (!strcmp(dp->d_name, "linux,pci-domain") ||
-			!strcmp(dp->d_name, "htab_base") ||
-			!strcmp(dp->d_name, "htab_size") ||
-			!strcmp(dp->d_name, "kernel_end"))
+			!strcmp(dp->d_name, "linux,htab-base") ||
+			!strcmp(dp->d_name, "linux,htab-size") ||
+			!strcmp(dp->d_name, "linux,kernel-end"))
 			continue;
 
 		if (S_ISREG(statbuf[0].st_mode)) {
_



More information about the Linuxppc64-dev mailing list