From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XcdIE-0007C6-CX for mharc-grub-devel@gnu.org; Fri, 10 Oct 2014 12:43:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcdI7-0007Al-FP for grub-devel@gnu.org; Fri, 10 Oct 2014 12:43:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcdI1-0004XK-N8 for grub-devel@gnu.org; Fri, 10 Oct 2014 12:43:43 -0400 Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:51789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcdI1-0004X0-Bn for grub-devel@gnu.org; Fri, 10 Oct 2014 12:43:37 -0400 Received: by mail-la0-f44.google.com with SMTP id hs14so3631461lab.3 for ; Fri, 10 Oct 2014 09:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=V/XaoAt0vCACKhTNP27guWmGjQd/JB+ykHxk3sBZrIw=; b=qz1a3pNkR4hzaOlI3mf9p++0tEmBuyhzUYYKaM3zR3VQy8/qDMsC1CEYUyl7V0NpWT 2RY/g0Bzcn70qejXiEIcIPT2y6jT3ri4YbLiP/uyvxVvKguomAbr9UnCISLq0AmUWO+o GrBeGXnHuAtU6he1kZHy+cM+fETvxpoQluP5IERrrzSrbg44Aa8q28/NWq+6FW27U3Ps jYkQzhZyAfDuR3sucoxs25YodWZfOfib7iiwTHPrUVUxP22ehhqTDATgTN04umbW7Okl SvDsUSu4hwtVvyTBNNfz4q23ljj18IEi7FAPBoVoF51K+cPFUJMQSoDFMrciY4Kj1wJR 3x+Q== X-Received: by 10.112.72.38 with SMTP id a6mr5929588lbv.65.1412959415837; Fri, 10 Oct 2014 09:43:35 -0700 (PDT) Received: from opensuse.site (ppp94-29-94-89.pppoe.spdop.ru. [94.29.94.89]) by mx.google.com with ESMTPSA id 2sm1957614lai.36.2014.10.10.09.43.34 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Oct 2014 09:43:34 -0700 (PDT) Date: Fri, 10 Oct 2014 20:43:33 +0400 From: Andrei Borzenkov To: The development of GNU GRUB Subject: Re: [PATCH] Add flags for powerpc in order to avoid exceptions Message-ID: <20141010204333.6e9aa851@opensuse.site> In-Reply-To: <20141008233827.GA7716@beren.chocolate> References: <20140926192936.GA30134@beren.chocolate> <20140927090653.062225be@opensuse.site> <20140929223016.1ebb5d7b@opensuse.site> <20141008233827.GA7716@beren.chocolate> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.23; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22c Cc: pfsmorigo@linux.vnet.ibm.com X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2014 16:43:49 -0000 =D0=92 Wed, 8 Oct 2014 20:38:29 -0300 Paulo Flabiano Smorigo =D0=BF=D0=B8=D1=88=D0= =B5=D1=82: > Mon, Sep 29, 2014 at 10:30:16PM +0400, Andrei Borzenkov wrote: > > =D0=92 Sat, 27 Sep 2014 09:06:53 +0400 > > Andrei Borzenkov =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >=20 > > > =D0=92 Fri, 26 Sep 2014 16:29:40 -0300 > > > Paulo Flabiano Smorigo =D0=BF=D0=B8=D1= =88=D0=B5=D1=82: > > >=20 > > > > * conf/Makefile.common [COND_powerpc_ieee1275] (CFLAGS_PLATFORM): A= dd > > > > -msoft-float -mno-vsx -mno-altivec. > > > >=20 > > > > Also-By: Adhemerval Zanella > > > > --- > > > > ChangeLog | 7 +++++++ > > > > conf/Makefile.common | 3 +++ > > > > 2 files changed, 10 insertions(+) > > > >=20 > > > > diff --git a/ChangeLog b/ChangeLog > > > > index 192e8bc..40eb90c 100644 > > > > --- a/ChangeLog > > > > +++ b/ChangeLog > > > > @@ -1,3 +1,10 @@ > > > > +2014-09-26 Paulo Flabiano Smorigo > > > > + > > > > + Add flags for powerpc in order to avoid exceptions > > > > + > > > > + * conf/Makefile.common [COND_powerpc_ieee1275] (CFLAGS_PLATFORM):= Add > > > > + -msoft-float -mno-vsx -mno-altivec. > > > > + > > > > 2014-09-25 Colin Watson > > > > =20 > > > > Fix in-tree --platform=3Dnone > > > > diff --git a/conf/Makefile.common b/conf/Makefile.common > > > > index 51fbaf9..57c491a 100644 > > > > --- a/conf/Makefile.common > > > > +++ b/conf/Makefile.common > > > > @@ -22,6 +22,9 @@ endif > > > > if COND_arm64 > > > > CFLAGS_PLATFORM +=3D -mcmodel=3Dlarge > > > > endif > > > > +if COND_powerpc_ieee1275 > > > > + CFLAGS_PLATFORM +=3D -msoft-float -mno-vsx -mno-altivec > > > > +endif > > > > =20 > > > > #FIXME: discover and check XEN headers > > > > CPPFLAGS_XEN =3D -I/usr/include > > >=20 > > > Thank you! I confirm that this patch works and does not break grub on > > > earlier CPU :) > > >=20 > > > There are still differences in generated code, so we probably need to > > > tune some more flags. > >=20 > > I looked at compiler options for PowerPC and I think instead of trying > > to catch individual flags which may change with every release we should > > simply force the most common platform by > >=20 > > +if COND_powerpc_ieee1275 > > + CFLAGS_PLATFORM +=3D -mcpu=3Dpowerpc -mtune=3Dpowerpc > > +endif > >=20 > >=20 > > This makes sure result is identical on every platform and provides most > > generic code that is expected to run on every(?) system. > >=20 > > WDYT? >=20 > Hi Andrei, >=20 > Sorry to take so long to answer your question. >=20 > After an internal discussion with some toolchain experts we found out > that your approach is good. It works and it's more generic but we think > that we should change it a little bit: >=20 > * skip -mtune, not really necessary Fine if you say so. > * add "-msoft-float" to be completly safe. >=20 Is it really necessary? I do not think grub is using floating point anywhere. > Something like: >=20 > +if COND_powerpc_ieee1275 > + CFLAGS_PLATFORM +=3D -mcpu=3Dpowerpc -msoft-float > +endif >=20 Should not we also add -mbig-endian here, and not in configure? This is really something we always use, not something we need to detect dynamically. > This approach is similar to what the linux kernel do. >=20 > In addition, they recomend to set FP MSR value to zero as well. >=20 > Andrei, Vladimir, agree? >=20 Could you resend your patches as discussed and rebased to git master, so they are easier to review and comment?