public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option
@ 2014-10-10 10:59 Kyrill Tkachov
  2014-10-10 12:27 ` Marcus Shawcroft
  2014-10-19 20:35 ` Gerald Pfeifer
  0 siblings, 2 replies; 8+ messages in thread
From: Kyrill Tkachov @ 2014-10-10 10:59 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Earnshaw, Marcus Shawcroft

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

Hi all,

This adds a new configure-time option --enable-fix-cortex-a53-835769 that
will enable the Cortex-A53 erratum fix by default
so you don't have to specify -mfix-cortex-a53-835769 every time.

Documentation in install.texi is added.

Ok for trunk?

Thanks,
Kyrill

     2014-10-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

         * configure.ac: Add --enable-fix-cortex-a53-835769 option.
         * configure: Regenerate.
         * config/aarch64/aarch64.c (aarch64_override_options): Handle
         TARGET_FIX_ERR_A53_835769_DEFAULT.
         * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init
         value to 2.
         * doc/install.texi (aarch64*-*-*): Document
         new --enable-fix-cortex-a53-835769 option.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: a53-config.patch --]
[-- Type: text/x-patch; name=a53-config.patch, Size: 6167 bytes --]

commit ed8a64d6a7a23919b6b6d3a76cad90b9eae8a530
Author: Kyrill Tkachov <kyrylo.tkachov@arm.com>
Date:   Wed Oct 8 16:28:25 2014 +0000

    [AArch64] Add --enable-fix-cortex-a53-835769 configure switch.
    
    2014-10-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
    
    	* configure.ac: Add --enable-fix-cortex-a53-835769 option.
    	* configure: Regenerate.
    	* config/aarch64/aarch64.c (aarch64_override_options): Handle
    	TARGET_FIX_ERR_A53_835769_DEFAULT.
    	* config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init
    	value to 2.
    	* doc/install.texi (aarch64*-*-*): Document
    	new --enable-fix-cortex-a53-835769 option.

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 76a2480..db5ff59 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6387,6 +6387,15 @@ aarch64_override_options (void)
   aarch64_tune = selected_tune->core;
   aarch64_tune_params = selected_tune->tune;
 
+  if (aarch64_fix_a53_err835769 == 2)
+    {
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
+      aarch64_fix_a53_err835769 = 1;
+#else
+      aarch64_fix_a53_err835769 = 0;
+#endif
+    }
+
   aarch64_override_options_after_change ();
 }
 
diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt
index 77deb2e..fc0307e 100644
--- a/gcc/config/aarch64/aarch64.opt
+++ b/gcc/config/aarch64/aarch64.opt
@@ -68,7 +68,7 @@ Target Report RejectNegative Mask(GENERAL_REGS_ONLY)
 Generate code which uses only the general registers
 
 mfix-cortex-a53-835769
-Target Report Var(aarch64_fix_a53_err835769) Init(0)
+Target Report Var(aarch64_fix_a53_err835769) Init(2)
 Workaround for ARM Cortex-A53 Erratum number 835769
 
 mlittle-endian
diff --git a/gcc/configure b/gcc/configure
index 380a235..bd1215d 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -920,6 +920,7 @@ with_plugin_ld
 enable_gnu_indirect_function
 enable_initfini_array
 enable_comdat
+enable_fix_cortex_a53_835769
 with_glibc_version
 enable_gnu_unique_object
 enable_linker_build_id
@@ -1638,6 +1639,14 @@ Optional Features:
                           glibc systems
   --enable-initfini-array	use .init_array/.fini_array sections
   --enable-comdat         enable COMDAT group support
+
+  --enable-fix-cortex-a53-835769
+                          enable workaround for AArch64 Cortex-A53 erratum
+                          835769 by default
+  --disable-fix-cortex-a53-835769
+                          disable workaround for AArch64 Cortex-A53 erratum
+                          835769 by default
+
   --enable-gnu-unique-object
                           enable the use of the @gnu_unique_object ELF
                           extension on glibc systems
@@ -18049,7 +18058,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18052 "configure"
+#line 18061 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -18155,7 +18164,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 18158 "configure"
+#line 18167 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -23979,6 +23988,25 @@ $as_echo "#define HAVE_AS_MABI_OPTION 1" >>confdefs.h
         done
       fi
     fi
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
+    # Check whether --enable-fix-cortex-a53-835769 was given.
+if test "${enable_fix_cortex_a53_835769+set}" = set; then :
+  enableval=$enable_fix_cortex_a53_835769;
+        case $enableval in
+          yes)
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
+            ;;
+          no)
+            ;;
+          *)
+            as_fn_error "'$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
+  Valid choices are 'yes' and 'no'." "$LINENO" 5
+            ;;
+
+        esac
+
+fi
+
     ;;
 
   # All TARGET_ABI_OSF targets.
diff --git a/gcc/configure.ac b/gcc/configure.ac
index eb480de..8f7c814 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3526,6 +3526,29 @@ case "$target" in
         done
       fi
     fi
+    # Enable default workaround for AArch64 Cortex-A53 erratum 835769.
+    AC_ARG_ENABLE(fix-cortex-a53-835769,
+    [
+AS_HELP_STRING([--enable-fix-cortex-a53-835769],
+        [enable workaround for AArch64 Cortex-A53 erratum 835769 by default])
+AS_HELP_STRING([--disable-fix-cortex-a53-835769],
+        [disable workaround for AArch64 Cortex-A53 erratum 835769 by default])
+    ],
+      [
+        case $enableval in
+          yes)
+            tm_defines="${tm_defines} TARGET_FIX_ERR_A53_835769_DEFAULT=1"
+            ;;
+          no)
+            ;;
+          *)
+            AC_MSG_ERROR(['$enableval' is an invalid value for --enable-fix-cortex-a53-835769.\
+  Valid choices are 'yes' and 'no'.])
+            ;;
+
+        esac
+      ],
+    [])
     ;;
 
   # All TARGET_ABI_OSF targets.
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 75ac9a6..3df78ff 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -3762,6 +3762,16 @@ Binutils pre 2.24 does not have support for selecting @option{-mabi} and
 does not support ILP32.  If it is used to build GCC 4.9 or later, GCC will
 not support option @option{-mabi=ilp32}.
 
+To enable a workaround for the Cortex-A53 erratum number 835769 by default
+(for all CPUs regardless of -mcpu option given) at configure time use the
+@option{--enable-fix-cortex-a53-835769} option.  This will enable the fix by
+default and can be explicitly disabled during during compilation by passing the
+@option{-mno-fix-cortex-a53-835769} option.  Conversely,
+@option{--disable-fix-cortex-a53-835769} will disable the workaround by
+default.  The workaround is disabled by default if neither of
+@option{--enable-fix-cortex-a53-835769} or
+@option{--disable-fix-cortex-a53-835769} is given at configure time.
+
 @html
 <hr />
 <!-- rs6000-ibm-aix*, powerpc-ibm-aix* -->

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

* Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option
  2014-10-10 10:59 [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option Kyrill Tkachov
@ 2014-10-10 12:27 ` Marcus Shawcroft
  2014-10-10 12:47   ` Kyrill Tkachov
  2014-10-19 20:35 ` Gerald Pfeifer
  1 sibling, 1 reply; 8+ messages in thread
From: Marcus Shawcroft @ 2014-10-10 12:27 UTC (permalink / raw)
  To: Kyrill Tkachov; +Cc: GCC Patches, Richard Earnshaw, Marcus Shawcroft

On 10 October 2014 11:53, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
> Hi all,
>
> This adds a new configure-time option --enable-fix-cortex-a53-835769 that
> will enable the Cortex-A53 erratum fix by default
> so you don't have to specify -mfix-cortex-a53-835769 every time.
>
> Documentation in install.texi is added.
>
> Ok for trunk?
>
> Thanks,
> Kyrill
>
>     2014-10-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>
>         * configure.ac: Add --enable-fix-cortex-a53-835769 option.
>         * configure: Regenerate.
>         * config/aarch64/aarch64.c (aarch64_override_options): Handle
>         TARGET_FIX_ERR_A53_835769_DEFAULT.
>         * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init
>         value to 2.
>         * doc/install.texi (aarch64*-*-*): Document
>         new --enable-fix-cortex-a53-835769 option.

OK /Marcus

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

* Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option
  2014-10-10 12:27 ` Marcus Shawcroft
@ 2014-10-10 12:47   ` Kyrill Tkachov
  2014-10-10 13:58     ` Marcus Shawcroft
  0 siblings, 1 reply; 8+ messages in thread
From: Kyrill Tkachov @ 2014-10-10 12:47 UTC (permalink / raw)
  To: Marcus Shawcroft; +Cc: GCC Patches, Richard Earnshaw, Marcus Shawcroft


On 10/10/14 13:25, Marcus Shawcroft wrote:
> On 10 October 2014 11:53, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
>> Hi all,
>>
>> This adds a new configure-time option --enable-fix-cortex-a53-835769 that
>> will enable the Cortex-A53 erratum fix by default
>> so you don't have to specify -mfix-cortex-a53-835769 every time.
>>
>> Documentation in install.texi is added.
>>
>> Ok for trunk?
>>
>> Thanks,
>> Kyrill
>>
>>      2014-10-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>>
>>          * configure.ac: Add --enable-fix-cortex-a53-835769 option.
>>          * configure: Regenerate.
>>          * config/aarch64/aarch64.c (aarch64_override_options): Handle
>>          TARGET_FIX_ERR_A53_835769_DEFAULT.
>>          * config/aarch64/aarch64.opt (mfix-cortex-a53-835769): Set Init
>>          value to 2.
>>          * doc/install.texi (aarch64*-*-*): Document
>>          new --enable-fix-cortex-a53-835769 option.
> OK /Marcus

Thanks Marcus, committed as r216076.
Can this go to the 4.9 branch as well? It applies cleanly there (with 
appropriately regenerated configure) and I tested it there with 
bootstraps with and without the option.

Kyrill

>


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

* Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option
  2014-10-10 12:47   ` Kyrill Tkachov
@ 2014-10-10 13:58     ` Marcus Shawcroft
  0 siblings, 0 replies; 8+ messages in thread
From: Marcus Shawcroft @ 2014-10-10 13:58 UTC (permalink / raw)
  To: Kyrill Tkachov; +Cc: GCC Patches, Richard Earnshaw, Marcus Shawcroft

On 10 October 2014 13:38, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:

> Thanks Marcus, committed as r216076.
> Can this go to the 4.9 branch as well? It applies cleanly there (with
> appropriately regenerated configure) and I tested it there with bootstraps
> with and without the option.

Yes that's ok /Marcus

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

* Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option
  2014-10-10 10:59 [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option Kyrill Tkachov
  2014-10-10 12:27 ` Marcus Shawcroft
@ 2014-10-19 20:35 ` Gerald Pfeifer
  2014-10-20  9:45   ` Kyrill Tkachov
  1 sibling, 1 reply; 8+ messages in thread
From: Gerald Pfeifer @ 2014-10-19 20:35 UTC (permalink / raw)
  To: Kyrill Tkachov; +Cc: GCC Patches, Richard Earnshaw, Marcus Shawcroft

On Friday 2014-10-10 11:53, Kyrill Tkachov wrote:
> This adds a new configure-time option --enable-fix-cortex-a53-835769 that
> will enable the Cortex-A53 erratum fix by default
> so you don't have to specify -mfix-cortex-a53-835769 every time.
> 
> Documentation in install.texi is added.

Thank you.  Can you please also update gcc-5/changes.html on the
web side of things?

Gerald

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

* Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option
  2014-10-19 20:35 ` Gerald Pfeifer
@ 2014-10-20  9:45   ` Kyrill Tkachov
  2014-10-27 11:44     ` Gerald Pfeifer
  0 siblings, 1 reply; 8+ messages in thread
From: Kyrill Tkachov @ 2014-10-20  9:45 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: GCC Patches, Richard Earnshaw, Marcus Shawcroft


On 19/10/14 21:31, Gerald Pfeifer wrote:
> On Friday 2014-10-10 11:53, Kyrill Tkachov wrote:
>> This adds a new configure-time option --enable-fix-cortex-a53-835769 that
>> will enable the Cortex-A53 erratum fix by default
>> so you don't have to specify -mfix-cortex-a53-835769 every time.
>>
>> Documentation in install.texi is added.
> Thank you.  Can you please also update gcc-5/changes.html on the
> web side of things?

Sure, but I'm not sure how to get access to the web pages cvs.
Could you point me to the magic runes please?

Thanks,
Kyrill

>
> Gerald
>


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

* Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option
  2014-10-20  9:45   ` Kyrill Tkachov
@ 2014-10-27 11:44     ` Gerald Pfeifer
  2014-10-27 11:51       ` Kyrill Tkachov
  0 siblings, 1 reply; 8+ messages in thread
From: Gerald Pfeifer @ 2014-10-27 11:44 UTC (permalink / raw)
  To: Kyrill Tkachov; +Cc: GCC Patches, Richard Earnshaw, Marcus Shawcroft

Hi Kyrill,

On Monday 2014-10-20 10:41, Kyrill Tkachov wrote:
>> Thank you.  Can you please also update gcc-5/changes.html on the
>> web side of things?
> Sure, but I'm not sure how to get access to the web pages cvs.
> Could you point me to the magic runes please?

does https://gcc.gnu.org/about.html help?

I'd really love to migrate the pages to SVN as well, but haven't
had much time lately and importing the tree with history also seems
a bit tricky.  Any volunteers for that?

Gerald

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

* Re: [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option
  2014-10-27 11:44     ` Gerald Pfeifer
@ 2014-10-27 11:51       ` Kyrill Tkachov
  0 siblings, 0 replies; 8+ messages in thread
From: Kyrill Tkachov @ 2014-10-27 11:51 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: GCC Patches, Richard Earnshaw, Marcus Shawcroft


On 27/10/14 11:41, Gerald Pfeifer wrote:
> Hi Kyrill,
>
> On Monday 2014-10-20 10:41, Kyrill Tkachov wrote:
>>> Thank you.  Can you please also update gcc-5/changes.html on the
>>> web side of things?
>> Sure, but I'm not sure how to get access to the web pages cvs.
>> Could you point me to the magic runes please?
> does https://gcc.gnu.org/about.html help?

Thanks, that helps. I'll whip something up.

Kyrill

>
> I'd really love to migrate the pages to SVN as well, but haven't
> had much time lately and importing the tree with history also seems
> a bit tricky.  Any volunteers for that?
>
> Gerald
>


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

end of thread, other threads:[~2014-10-27 11:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-10 10:59 [AArch64] Add --enable-fix-cortex-a53-835769 configure-time option Kyrill Tkachov
2014-10-10 12:27 ` Marcus Shawcroft
2014-10-10 12:47   ` Kyrill Tkachov
2014-10-10 13:58     ` Marcus Shawcroft
2014-10-19 20:35 ` Gerald Pfeifer
2014-10-20  9:45   ` Kyrill Tkachov
2014-10-27 11:44     ` Gerald Pfeifer
2014-10-27 11:51       ` Kyrill Tkachov

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 read-only IMAP folder(s) and NNTP newsgroup(s).