Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] ci20_defconfig: disable madd instructions to avoid FPU bug
Date: Tue, 18 Oct 2016 14:54:13 +0200	[thread overview]
Message-ID: <20161018145413.37ae0751@free-electrons.com> (raw)
In-Reply-To: <20161018122421.64118-1-Vincent.Riera@imgtec.com>

Hello,

On Tue, 18 Oct 2016 13:24:21 +0100, Vicente Olivert Riera wrote:
> MIPS Creator CI20 has an Ingenic JZ4780 SoC which features an XBurst
> CPU. The FPU on that CPU has a bug that can generate incorrect results
> in certain cases. The problem shows up when you have several of these
> instructions in sequence with dependant operands.
> 
> Using the -mno-fused-madd option prevents gcc from emitting these
> instructions.
> 
> More details here:
>  - https://groups.google.com/forum/#!topic/mips-creator-ci20/spDB2jjbizM
>  - https://android.googlesource.com/platform/build/+/90ce45347064210585a3a1f59a0514c22c753c8a
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
>  configs/ci20_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/configs/ci20_defconfig b/configs/ci20_defconfig
> index 0455170..1894554 100644
> --- a/configs/ci20_defconfig
> +++ b/configs/ci20_defconfig
> @@ -8,6 +8,8 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y
>  
>  # system
>  BR2_TARGET_GENERIC_GETTY_PORT="ttyS4"
> +# Avoid FPU bug
> +BR2_TARGET_OPTIMIZATION="-mno-fused-madd"

Unfortunately, this means that other people using the same MIPS CPU,
but not using your defconfig will fall into this issue.

For the Intel X1000, which also had a bug, we've added a separate
entry in arch/Config.in.x86. Should we be doing the same here for this
MIPS CPU ?

Note: this is *really* a question. I am not sure we want to make such a
change to the MIPS CPU selection.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2016-10-18 12:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 12:24 [Buildroot] [PATCH] ci20_defconfig: disable madd instructions to avoid FPU bug Vicente Olivert Riera
2016-10-18 12:54 ` Thomas Petazzoni [this message]
2016-10-19  8:47   ` Vicente Olivert Riera
2016-10-19  9:31     ` Peter Korsgaard
2016-10-19  9:32     ` Thomas Petazzoni
2016-10-19 10:19       ` Vicente Olivert Riera
2016-10-21 19:45       ` Arnout Vandecappelle
2016-10-22 12:08         ` Thomas Petazzoni

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=20161018145413.37ae0751@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox