From patchwork Wed Jun 17 11:59:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohan Kumar M X-Patchwork-Id: 28785 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 9D6E1B7105 for ; Wed, 17 Jun 2009 22:08:59 +1000 (EST) Received: by ozlabs.org (Postfix) id 8FF00DDDB6; Wed, 17 Jun 2009 22:08:59 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (bilbo.ozlabs.org [203.10.76.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bilbo.ozlabs.org", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 8B994DDDB2 for ; Wed, 17 Jun 2009 22:08:59 +1000 (EST) Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 60A51B7911 for ; Wed, 17 Jun 2009 21:59:21 +1000 (EST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 24BE3B71F4 for ; Wed, 17 Jun 2009 21:59:14 +1000 (EST) Received: by ozlabs.org (Postfix) id 184CADDDA0; Wed, 17 Jun 2009 21:59:14 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e23smtp03.au.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 0D4D6DDD0B for ; Wed, 17 Jun 2009 21:59:13 +1000 (EST) Received: from d23relay02.au.ibm.com (d23relay02.au.ibm.com [202.81.31.244]) by e23smtp03.au.ibm.com (8.13.1/8.13.1) with ESMTP id n5HBv8Fj015133 for ; Wed, 17 Jun 2009 21:57:08 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay02.au.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5HBxCht819346 for ; Wed, 17 Jun 2009 21:59:12 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5HBxB40010247 for ; Wed, 17 Jun 2009 21:59:12 +1000 Received: from in.ibm.com ([9.124.31.22]) by d23av01.au.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n5HBx9O1010239; Wed, 17 Jun 2009 21:59:10 +1000 Date: Wed, 17 Jun 2009 17:29:17 +0530 From: "M. Mohan Kumar" To: Simon Horman Subject: [PATCH] Do not inline putprops function Message-ID: <20090617115917.GD31595@in.ibm.com> References: <20090617113456.GC31595@in.ibm.com> <20090617114551.GA5672@verge.net.au> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090617114551.GA5672@verge.net.au> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: linuxppc-dev@ozlabs.org, kexec@lists.infradead.org, miltonm@bga.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: mohan@in.ibm.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org 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. Signed-off-by: M. Mohan Kumar --- 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;