Re: [PATCH] MIPS: Fix GCC `noreorder' for undefined R5900 short loops

2019-07-24 Thread Fredrik Noring
Hi Maciej, > > > > How can one reasonably prevent the bug when compiling a whole Linux > > > > distribution with thousands of packages if GAS merely warns and proceeds > > > > in many cases? > > > > > > I think the tools must not set a policy. By using `.set noreorder' the > > > user told the

Re: [PATCH] MIPS: Fix GCC `noreorder' for undefined R5900 short loops

2019-07-23 Thread Fredrik Noring
Hi Maciej, > > How can one reasonably prevent the bug when compiling a whole Linux > > distribution with thousands of packages if GAS merely warns and proceeds > > in many cases? > > I think the tools must not set a policy. By using `.set noreorder' the > user told the toolchain he knows

Re: [PATCH] MIPS: Fix GCC `noreorder' for undefined R5900 short loops

2019-07-22 Thread Fredrik Noring
Hi Maciej, I'm glad to hear from you again! > I think that should be a GAS warning really (similarly to macros that > expand to multiple instructions in a delay slot) as people ought to be > allowed to do what they wish, and then `-Werror' can be used for code > quality enforcement (and

[PATCH] MIPS: Fix GCC `noreorder' for undefined R5900 short loops

2019-07-21 Thread Fredrik Noring
Hi Paul, Matthew, Paul -- as I'm preparing the R5900 kernel patches there was a USB DMA series and breakage that needed attention. The fixes ending with ff2437befd8f ("usb: host: Fix excessive alignment restriction for local memory allocations") are now merged with Linus' kernel, and recommended

Re: [PATCH] MIPS: Add `-mfix-r5900' option for the R5900 short loop erratum

2018-11-11 Thread Fredrik Noring
Hi Matthew, > [ As mentioned in the commit message, the test was done with GCC 8.2.0 > since there was an unrelated problem compiling some sanitizer component > at the time. I will try to test a current GCC version during the weekend. ] The compilation problem, more specifically, is In file

Re: [PATCH] MIPS: Add `-mfix-r5900' option for the R5900 short loop erratum

2018-11-10 Thread Fredrik Noring
Thank you for your reviews, Matthew, > Has your copyright assignment come through for GCC? I can't access > the copyright info at the moment to check myself. Obviously that will > be a blocker otherwise. I filled in and posted request-assign.future to the FSF 1 October, but I have not heard from

[PATCH v2] MIPS: Add `-mfix-r5900' option for the R5900 short loop erratum

2018-11-09 Thread Fredrik Noring
The short loop bug under certain conditions causes loops to execute only once or twice, due to a hardware bug in the R5900 chip. `-march=r5900' already enables the R5900 short loop workaround. However, the R5900 ISA and most other MIPS ISAs are mutually exclusive since R5900-specific instructions

Re: [PATCH] MIPS: Add `-mfix-r5900' option for the R5900 short loop erratum

2018-11-09 Thread Fredrik Noring
Many thanks for your prompt review, Maciej! > > * gcc/config/mips/mips.c (mips_reorg_process_insns) > > (mips_option_override): Default to working around R5900 > > errata only if the processor was selected explicitly. > > I think this only describes the `mips_option_override'

Re: [PATCH v2] MIPS: Default to --with-llsc for the R5900 Linux target as well

2018-11-07 Thread Fredrik Noring
Hello global GCC reviewers, Would it be possible to apply the reviewed patch below? Thank you, Fredrik On Fri, Oct 19, 2018 at 08:33:33PM +0200, Fredrik Noring wrote: > The Linux kernel requires and emulates LL and SC for the R5900 too. The > special --without-llsc default for the

[PATCH] MIPS: Add `-mfix-r5900' option for the R5900 short loop erratum

2018-11-07 Thread Fredrik Noring
The short loop bug under certain conditions causes loops to execute only once or twice, due to a hardware bug in the R5900 chip. `-march=r5900' already enables the R5900 short loop workaround. However, the R5900 ISA and most other MIPS ISAs are mutually exclusive since R5900-specific instructions

[PATCH v2] MIPS: Default to --with-llsc for the R5900 Linux target as well

2018-10-19 Thread Fredrik Noring
The Linux kernel requires and emulates LL and SC for the R5900 too. The special --without-llsc default for the R5900 is therefore not applicable in that case. Reviewed-by: Maciej W. Rozycki --- Changes in v2: - Double spacing instead of single spacing in commit message --- gcc/config.gcc | 8

Re: [PATCH] MIPS: Default to --with-llsc for the R5900 Linux target as well

2018-10-19 Thread Fredrik Noring
Thank you for your review, Maciej, > > The Linux kernel requires and emulates LL and SC for the R5900 too. The > > Two spaces after a full stop please (in commit descriptions too). Fixed in v2, to be posted shortly. > I hope this helps you get a general maintainer's approval. Thanks! It

[PATCH] MIPS: Default to --with-llsc for the R5900 Linux target as well

2018-10-06 Thread Fredrik Noring
The Linux kernel requires and emulates LL and SC for the R5900 too. The special --without-llsc default for the R5900 is therefore not applicable in that case. --- gcc/config.gcc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index