On Wed, Feb 21, 2018 at 10:09:06AM +0000, Maciej W. Rozycki wrote: > On Tue, 20 Feb 2018, James Hogan wrote: > > > > diff --git a/arch/mips/loongson64/Platform b/arch/mips/loongson64/Platform > > > index 0fce460..3700dcf 100644 > > > --- a/arch/mips/loongson64/Platform > > > +++ b/arch/mips/loongson64/Platform > > > @@ -23,6 +23,9 @@ ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS > > > endif > > > > > > cflags-$(CONFIG_CPU_LOONGSON3) += -Wa,--trap > > > +ifneq ($(call as-option,-Wa$(comma)-mfix-loongson3-llsc,),) > > > + cflags-$(CONFIG_CPU_LOONGSON3) += -Wa$(comma)-mno-fix-loongson3-llsc > > > +endif > > > > Could this be a separate patch? > > > > This needs more explanation. > > - What does this do exactly? > > - Why are you turning *OFF* the compiler fix? > > - Was some fix we don't want already in use by default? > > FYI, support for `-mfix-loongson3-llsc' in GAS has only recently been > proposed: <https://sourceware.org/ml/binutils/2018-01/msg00303.html> and > is still pending review. Thanks for that link Maciej. GNU changelogs are useless, so this is the interesting bit: > +@item -mfix-loongson3-llsc > +@itemx -mno-fix-loongson3-llsc > +Insert @code{sync} instruction before @samp{ll} or @samp{lld} instrction > +to work around Loongson3 @samp{LL}/@samp{SC} errata. > +This issue exists in all Loongson3 CPUs. Cheers James
Attachment:
signature.asc
Description: Digital signature