linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Do not inline putprops function
@ 2009-06-17 11:34 M. Mohan Kumar
  2009-06-17 11:45 ` Simon Horman
  0 siblings, 1 reply; 19+ messages in thread
From: M. Mohan Kumar @ 2009-06-17 11:34 UTC (permalink / raw)
  To: kexec, linuxppc-dev; +Cc: horms, miltonm

Do not inline putprops function

With the recent kexec-tools git tree, both kexec and kdump kernels hang (i.e
kexec -l and kexec -p respectively). This happened after the patch "ppc64:
cleanups" commit b43a84a31a4be6ed025c1bdef3bb1c3c12e01b16. I tried
reverting each hunk and then found out that retaining following lines in
fs2dt.c makes kexec/kdump work.

-static unsigned *dt_len; /* changed len of modified cmdline
-                           in flat device-tree */

[....]

-               dt_len = dt;

I don't have any clue why removing a unused variable would cause the kexec
kernel to hang. After further investigation, I observed that if the putprops
function is not inlined, kexec/kdump kernel would work even after removing
the above lines.

This patch directs gcc to not inline the putprops function. Now we could
invoke kexec and kdump kernels.
---
 kexec/arch/ppc64/fs2dt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kexec/arch/ppc64/fs2dt.c b/kexec/arch/ppc64/fs2dt.c
index 1f551fd..1e01f74 100644
--- a/kexec/arch/ppc64/fs2dt.c
+++ b/kexec/arch/ppc64/fs2dt.c
@@ -259,7 +259,7 @@ static void add_usable_mem_property(int fd, int len)
 }
 
 /* put all properties (files) in the property structure */
-static void putprops(char *fn, struct dirent **nlist, int numlist)
+__attribute__ ((noinline)) static void putprops(char *fn, struct dirent **nlist, int numlist)
 {
 	struct dirent *dp;
 	int i = 0, fd, len;
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-08-10  8:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 11:34 [PATCH] Do not inline putprops function M. Mohan Kumar
2009-06-17 11:45 ` Simon Horman
2009-06-17 11:59   ` M. Mohan Kumar
2009-06-17 12:26     ` Michael Ellerman
2009-06-17 13:04       ` Neil Horman
2009-06-17 13:34         ` M. Mohan Kumar
2009-06-17 14:05           ` Neil Horman
2009-06-17 14:26             ` M. Mohan Kumar
2009-06-17 14:40               ` Neil Horman
2009-06-23 12:55                 ` M. Mohan Kumar
2009-06-23 13:56                   ` Neil Horman
2009-06-24  0:27                     ` Michael Ellerman
2009-08-03  5:49                       ` M. Mohan Kumar
2009-08-05 16:49                         ` M. Mohan Kumar
2009-08-06 14:24                           ` Michael Ellerman
2009-08-07 14:35                             ` M. Mohan Kumar
2009-08-07 14:54                               ` M. Mohan Kumar
2009-08-10  1:51                                 ` Michael Ellerman
2009-08-10  7:37                           ` Milton Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).