All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Lingzhu Xiang <lxiang@redhat.com>,
	kexec@lists.infradead.org, Simon Horman <horms@verge.net.au>,
	"Suzuki K. Poulose" <suzuki@in.ibm.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Jeremy Kerr <jk@ozlabs.org>
Subject: Re: [PATCH] ppc/ppc64: Compile purgatory code with gcc option -msoft-float
Date: Fri, 8 Jun 2012 10:39:49 -0400	[thread overview]
Message-ID: <20120608143949.GC29471@redhat.com> (raw)
In-Reply-To: <20120608134801.GZ24904@tucnak.redhat.com>

On Fri, Jun 08, 2012 at 03:48:01PM +0200, Jakub Jelinek wrote:
> On Fri, Jun 08, 2012 at 09:43:15AM -0400, Vivek Goyal wrote:
> > Recently we faced an issue on power7 machine where kernel hanged in purgatory.
> > Some investigation revealed that gcc is generating hardware FPU instructions.
> > I have been told we can't use it at this point of time and as kernel is
> > compiled with -msoft-float for ppc/ppc64, so should be purgatory (as it runs
> > inside kernel context).
> > 
> > Thanks to Jakub Jelinek and Lingzhu Xiang for debugging and coming up with
> > a fix for this issue.
> 
> IMNSHO as a follow-up all other architectures should be changed to
> compile kernel code with the right kernel CFLAGS (e.g. -mcmodel=kernel
> -mno-sse -mno-mmx should be used probably on x86_64, etc.).

Sure. These changes can be done in separate patches.

BTW, What does -mcmodel do and why should we use -mcmodel? purgatory, is a
separate binary which we reloate at turn time based on physical memory
location. IOW, why should we make any assumptions about running location
of purgatory and pass -mcmodel flag.

Eric, would have have any objections to making use of above gcc flags
for purgatory?

> 
> Furthermore, is there still a reason to compile sha256.c with -O0?  If
> there was a compiler bug? on ia64 6 years ago, with which gcc version
> it was, has the problem been reported and resolved?  Compiling code like
> hash computation unconditionally everywhere at -O0 must IMHO pessimize
> things unnecessarily.

git blame points to following commit for forcing -O0 on sha256. CCing
Jermey, if we can give some details why -O2 was a problem on IA6 and
if problem is still there if he has objections if we swtich back to -O2.

commit adf85cbc1756e56c1f52f56235a3c08b3c5b8e05
Author: Jeremy Kerr <jk@ozlabs.org>
Date:   Thu Dec 13 16:18:53 2007 +0900

    Build system simplification/standardisation
    
Thanks
Vivek

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2012-06-08 14:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08 13:43 [PATCH] ppc/ppc64: Compile purgatory code with gcc option -msoft-float Vivek Goyal
     [not found] ` <20120608134801.GZ24904@tucnak.redhat.com>
2012-06-08 14:39   ` Vivek Goyal [this message]
     [not found]     ` <20120608145113.GB24904@tucnak.redhat.com>
2012-06-08 15:19       ` Vivek Goyal
2012-06-08 17:36         ` Eric W. Biederman
2012-06-11  1:43         ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120608143949.GC29471@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=horms@verge.net.au \
    --cc=jakub@redhat.com \
    --cc=jk@ozlabs.org \
    --cc=kexec@lists.infradead.org \
    --cc=lxiang@redhat.com \
    --cc=suzuki@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.