Sachin P. Sant wrote:
Horms,
Today i tried the kexec-tools testing git tree on a ppc64 box, but had
some problems
while using the kexec command.
<SNIP >
Will do some debugging to find out what's the problem.
Did some debugging on this and was able to find the root cause. The problem
happens because of spurious value of errno in putnode() function defined
in kexec/arch/ppc64/fs2dt.c. There is a check at the end on errno
if (errno)
err(pathname, ERR_READDIR);
None of the function calls in the ppc64 code path set the errno value. When
the control reaches putnode() the errno value is already set to 2. I tried
to trace who set's the value to 2, and found that stat() call in
xen_present( ) function changes the errno value to 2. [ /proc/xen being
not present on the system ] This value 2 gets percolated all the way to
putnode() causing this failure.
I can fix this in ppc64 code using the below attached patch. What i am
wondering is, is this problem only seen on ppc64 and not on other archs?
xen_present() function seems to be generic one.
Let me know your thoughts.
Thanks
-Sachin
Thanks
-Sachin
_______________________________________________
fastboot mailing list
fastboot@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/fastboot
* With the kexec-tools-testing git tree download on Dec 6th 2006, kexec command
* failed to load panic kernel with the following error.
*
* /sbin/kexec -p /boot/vmlinux-xxx --initrd=initrd-xxxx --append="xxxx"
* get memory ranges:2
* /proc/device-tree//: No such file or directory
*
Signed-off-by : Sachin Sant <[EMAIL PROTECTED]>
---
diff -Naurp hormsgittree/kexec/arch/ppc64/fs2dt.c hormsgittree-new/kexec/arch/ppc64/fs2dt.c
--- hormsgittree/kexec/arch/ppc64/fs2dt.c 2006-12-05 17:08:18.000000000 +0530
+++ hormsgittree-new/kexec/arch/ppc64/fs2dt.c 2006-12-06 16:08:25.000000000 +0530
@@ -409,6 +409,7 @@ int create_flatten_tree(struct kexec_inf
unsigned long tlen;
unsigned char *buf;
unsigned long me;
+ int errsv = errno;
me = 0;
@@ -420,7 +421,15 @@ int create_flatten_tree(struct kexec_inf
if (cmdline)
strcpy(local_cmdline, cmdline);
+ /* Save the errno value in errsv and then reset errno
+ * to zero value as putnode() and putprops() functions
+ * extensively use errno value */
+
+ errno = 0;
putnode();
+ /* Restore the errno value to the original one */
+ errno = errsv;
+
*dt++ = 9;
_______________________________________________
fastboot mailing list
fastboot@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/fastboot