Discussion:
[PATCH][MIPS] GAS: Fix Loongson3 LLSC errata.
(too old to reply)
Paul Hua
2018-11-30 12:45:48 UTC
Permalink
Hi:

In some older Loongson 3A1000 processors there is a LL/SC errata that
can cause the CPU to deadlock occasionally. The details are very
complicated. We find a way to work around this errata by adding a sync
before ll/lld instruction.

This patch also add a configure options
--enable-mips-fix-loongson3-llsc=[yes|no] to enable fix-loongson3-llsc
by config.

[MIPS] GAS: Fix Loongson3 LLSC errata.

gas/
* NEWS: Mention -m[no-]fix-loongson3-llsc.
* configure.ac: Add --enable-mips-fix-loongson3-llsc.
Define DEFAULT_MIPS_FIX_LOONGSON3_LLSC.
* config.in: Regenerated.
* configure: Likewise.
* config/tc-mips.c (sync_insn, mips_fix_loongson3_llsc):
New variables.
(options): New OPTION_FIX_LOONGSON3_LLSC,
OPTION_NO_FIX_LOONGSON3_LLSC.
(md_longopts): Add -m[no-]fix-loongson3-llsc.
(md_begin): Initialize sync insn.
(fix_loongson3_llsc): New.
(append_insn): Call fix_loongson3_llsc.
(md_parse_option): Handle OPTION_FIX_LOONGSON3_LLSC,
OPTION_NO_FIX_LOONGSON3_LLSC.
(md_show_usage): Display -m[no-]fix-loongson3-llsc.
* doc/c-mips.texi: Document -m[no-]fix-loongson3-llsc,
--enable-mips-fix-loongson3-llsc=[yes|no].
YunQiang Su
2018-12-01 06:17:28 UTC
Permalink
Post by Paul Hua
In some older Loongson 3A1000 processors there is a LL/SC errata that
This problem only exists on "some older Loongson 3A1000"?
Does it exists on current 3A 3000 machines?
Post by Paul Hua
can cause the CPU to deadlock occasionally. The details are very
complicated. We find a way to work around this errata by adding a sync
before ll/lld instruction.
This patch also add a configure options
--enable-mips-fix-loongson3-llsc=[yes|no] to enable fix-loongson3-llsc
by config.
[MIPS] GAS: Fix Loongson3 LLSC errata.
gas/
* NEWS: Mention -m[no-]fix-loongson3-llsc.
* configure.ac: Add --enable-mips-fix-loongson3-llsc.
Define DEFAULT_MIPS_FIX_LOONGSON3_LLSC.
* config.in: Regenerated.
* configure: Likewise.
Is configure patch needed here?
It seems been generated by some newer version autotools.
Post by Paul Hua
New variables.
(options): New OPTION_FIX_LOONGSON3_LLSC,
OPTION_NO_FIX_LOONGSON3_LLSC.
(md_longopts): Add -m[no-]fix-loongson3-llsc.
(md_begin): Initialize sync insn.
(fix_loongson3_llsc): New.
(append_insn): Call fix_loongson3_llsc.
(md_parse_option): Handle OPTION_FIX_LOONGSON3_LLSC,
OPTION_NO_FIX_LOONGSON3_LLSC.
(md_show_usage): Display -m[no-]fix-loongson3-llsc.
* doc/c-mips.texi: Document -m[no-]fix-loongson3-llsc,
--enable-mips-fix-loongson3-llsc=[yes|no].
https://sourceware.org/ml/binutils/2018-01/msg00303.html
here is an older version of patch.
While somebody told me that it will generate a .fixup section.
What about this one?
Paul Hua
2018-12-03 10:09:10 UTC
Permalink
Post by YunQiang Su
Post by Paul Hua
In some older Loongson 3A1000 processors there is a LL/SC errata that
This problem only exists on "some older Loongson 3A1000"?
Does it exists on current 3A 3000 machines?
Theoretically does not exist on 3A 3000.
Post by YunQiang Su
Post by Paul Hua
gas/
* NEWS: Mention -m[no-]fix-loongson3-llsc.
* configure.ac: Add --enable-mips-fix-loongson3-llsc.
Define DEFAULT_MIPS_FIX_LOONGSON3_LLSC.
* config.in: Regenerated.
* configure: Likewise.
Is configure patch needed here?
It seems been generated by some newer version autotools.
Yes, We change the configure.ac file, so regenerated.
Post by YunQiang Su
Post by Paul Hua
New variables.
(options): New OPTION_FIX_LOONGSON3_LLSC,
OPTION_NO_FIX_LOONGSON3_LLSC.
(md_longopts): Add -m[no-]fix-loongson3-llsc.
(md_begin): Initialize sync insn.
(fix_loongson3_llsc): New.
(append_insn): Call fix_loongson3_llsc.
(md_parse_option): Handle OPTION_FIX_LOONGSON3_LLSC,
OPTION_NO_FIX_LOONGSON3_LLSC.
(md_show_usage): Display -m[no-]fix-loongson3-llsc.
* doc/c-mips.texi: Document -m[no-]fix-loongson3-llsc,
--enable-mips-fix-loongson3-llsc=[yes|no].
https://sourceware.org/ml/binutils/2018-01/msg00303.html
here is an older version of patch.
While somebody told me that it will generate a .fixup section.
What about this one?
Both patch does not generate a .fixup section.

Loading...