diff mbox series

[v2] Revert "target/mips: Deprecate nanoMIPS ISA"

Message ID VI1PR0302MB34862F042D9B1C72C7E4AD239C749@VI1PR0302MB3486.eurprd03.prod.outlook.com (mailing list archive)
State New, archived
Headers show
Series [v2] Revert "target/mips: Deprecate nanoMIPS ISA" | expand

Commit Message

Aleksandar Rikalo April 8, 2021, 5:01 p.m. UTC
NanoMIPS ISA is supported again, since MediaTek is taking over
nanoMIPS toolchain development (confirmed at
https://www.spinics.net/linux/fedora/libvir/msg217107.html).

New release of the toolchain can be found at
(https://github.com/MediaTek-Labs/nanomips-gnu-toolchain/releases/tag/nanoMIPS-2021.02-01).

Reverting deprecation of nanoMIPS ISA requires following changes:
    MAINTAINERS: remove nanoMIPS ISA from orphaned ISAs
    deprecated.rst: remove nanoMIPS ISA from deprecated ISAs

Signed-off-by: Filip Vidojevic <Filip.Vidojevic@Syrmia.com>
Signed-off-by: Aleksandar Rikalo <Aleksandar.Rikalo@Syrmia.com>
---
 MAINTAINERS                |  4 ----
 docs/system/deprecated.rst | 20 --------------------
 2 files changed, 24 deletions(-)

--
2.25.1

Comments

Richard Henderson April 8, 2021, 6:16 p.m. UTC | #1
On 4/8/21 10:01 AM, Aleksandar Rikalo wrote:
> NanoMIPS ISA is supported again, since MediaTek is taking over
> nanoMIPS toolchain development (confirmed at
> https://www.spinics.net/linux/fedora/libvir/msg217107.html 
> <https://www.spinics.net/linux/fedora/libvir/msg217107.html>).
> 
> New release of the toolchain can be found at
> (https://github.com/MediaTek-Labs/nanomips-gnu-toolchain/releases/tag/nanoMIPS-2021.02-01 
> <https://github.com/MediaTek-Labs/nanomips-gnu-toolchain/releases/tag/nanoMIPS-2021.02-01>).
> 
> Reverting deprecation of nanoMIPS ISA requires following changes:
>      MAINTAINERS: remove nanoMIPS ISA from orphaned ISAs
>      deprecated.rst: remove nanoMIPS ISA from deprecated ISAs
> 
> Signed-off-by: Filip Vidojevic <Filip.Vidojevic@Syrmia.com>
> Signed-off-by: Aleksandar Rikalo <Aleksandar.Rikalo@Syrmia.com>
> ---
>   MAINTAINERS                |  4 ----
>   docs/system/deprecated.rst | 20 --------------------
>   2 files changed, 24 deletions(-)

NACK, for the reasons stated against v1:
https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg00663.html

We're not going to remove nanomips this cycle, but we're not going to reset the 
clock on deprecation either.


r~
Vince Del Vecchio April 9, 2021, 1:10 a.m. UTC | #2
On Thursday, April 8, 2021 2:17 PM, Richard Henderson wrote:

> NACK, for the reasons stated against v1:
> https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg00663.html

On Tuesday, April 6, 2021 11:21 AM, Richard Henderson wrote:

> I think we should retain the deprecation until you actually follow through with any of the upstreaming.
> 
> You didn't even bother to commit your changes to a code repository -- merely uploaded tarballs.  There have been no posts to the > gcc mailing lists about nanomips.
> 
> A mere code dump is not active development.

Maybe not, but we are in fact actively developing.  :-)

You’re right we haven’t published the source repos on github yet.  It's been on our list.  Maybe not today/tomorrow, but it'll definitely be done by next week.

The nanoMIPS toolchain we inherited is based on gcc 6.3.  We’ve been working on upgrading to gcc trunk since late February, but it's not a trivial task.  As soon as we're done (hopefully before the summer), we'll propose the changes to the gcc mailing list.

For now, we don't have many topics for the gcc lists, although https://gcc.gnu.org/pipermail/gcc/2021-March/235082.html is from our work.

We've also started an LLVM port (https://github.com/MediaTek-Labs/llvm-project) as I mentioned in my previous message (https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg09764.html).

In sum, we're investing in open source nanoMIPS tools because it's an important technology for us, and QEMU is one of the key projects we want to have nanoMIPS supported in.

-Vince Del Vecchio
Compiler Team Lead & Deputy Director, DSP Core Technology, MediaTek
Richard Henderson April 9, 2021, 2:44 p.m. UTC | #3
On 4/8/21 6:10 PM, Vince Del Vecchio wrote:
>> I think we should retain the deprecation until you actually follow through with any of the upstreaming.
>> 
>> You didn't even bother to commit your changes to a code repository -- merely uploaded tarballs.  There have been no posts to the > gcc mailing lists about nanomips.
>> 
>> A mere code dump is not active development.
> 
> Maybe not, but we are in fact actively developing.  :-)

Good to hear.

> The nanoMIPS toolchain we inherited is based on gcc 6.3.  We’ve been working on upgrading to gcc trunk since late February, but it's not a trivial task.  As soon as we're done (hopefully before the summer), we'll propose the changes to the gcc mailing list.

Ouch.  I understand that's a big job rebasing to mainline.

> In sum, we're investing in open source nanoMIPS tools because it's an important technology for us, and QEMU is one of the key projects we want to have nanoMIPS supported in.

Well, hopefully that means you'll have made some progress by late summer, when 
qemu 6.1 is due.


r~
Philippe Mathieu-Daudé April 19, 2021, 6:11 p.m. UTC | #4
Hi Vince,

On 4/9/21 3:10 AM, Vince Del Vecchio wrote:
> On Tuesday, April 6, 2021 11:21 AM, Richard Henderson wrote:
> 
>> I think we should retain the deprecation until you actually follow through with any of the upstreaming.

> In sum, we're investing in open source nanoMIPS tools because it's an important technology for us, and QEMU is one of the key projects we want to have nanoMIPS supported in.

I'm glad MediaTek has interest in MIPS and is willing to contribute
upstream and help in maintenance! QEMU MIPS codebase is huge and I
don't have the time/resources to maintain it alone.

Regarding the nanoMIPS deprecation, don't worry, we are not going to
remove the nanoMIPS TCG and I7200 core because 1/ it is not breaking
anything, 2/ it is in good shape and 3/ most importantly there are
users in the community.

The plan is to drop the nanoMIPS disassembler because it is broken
since more than 2 years and nobody ever cared to fix it after Stefan's
attempt in Nov 2018:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg576504.html
So it is certainly unused. Unused unmaintained code has a cost and
negative impact to the generic project development.

If you think it is worth having, you should consider moving it to
the capstone project (https://www.capstone-engine.org/ - it also
uses C++ btw), so other projects could disassemble nanoMIPS blobs.

I prepared a series [1] which split the TCG code from the big
translate.c in one file per ISA. It helps maintenance, as we can
have finer granularity in who reviews/maintains what (using
MAINTAINERS sections) easing collective maintenance in a community.
I'll Cc your team for help with reviewing it when I repost it
(give me up to 1 month).

Regards,

Phil.

[1] https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg05879.html
Aleksandar Rikalo April 20, 2021, 4:06 p.m. UTC | #5
Hi Philippe,

> The plan is to drop the nanoMIPS disassembler because it is broken
> since more than 2 years and nobody ever cared to fix it after Stefan's
> attempt in Nov 2018:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg576504.html
> So it is certainly unused. Unused unmaintained code has a cost and
> negative impact to the generic project development.

How do you conclude it is broken ? It seems to work well.
Aleksandar Markovic did few fixes during 2019.

NanoMIPS needs disassembler, like other architectures...

Thank you,
-- Aleksandar
Philippe Mathieu-Daudé April 20, 2021, 4:47 p.m. UTC | #6
On 4/20/21 6:06 PM, Aleksandar Rikalo wrote:
> Hi Philippe,
> 
>> The plan is to drop the nanoMIPS disassembler because it is broken
>> since more than 2 years and nobody ever cared to fix it after Stefan's
>> attempt in Nov 2018:
>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg576504.html
>> So it is certainly unused. Unused unmaintained code has a cost and
>> negative impact to the generic project development.
> 
> How do you conclude it is broken ? It seems to work well.
> Aleksandar Markovic did few fixes during 2019.

One community user tried it, reported a bug which got never
fixed. This means the code is not used by the mainstream community,
but is a burden for maintenance.

> 
> NanoMIPS needs disassembler, like other architectures...

I totally agreed, but we need a working disassembler; this is why
I started looking for other alternatives (binutils libopcodes or
capstone) and realized nanoMIPS toolchain was never upstreamed,
so started the deprecation process.
Petar Jovanovic April 20, 2021, 11:24 p.m. UTC | #7
On 4/20/21 6:06 PM, Aleksandar Rikalo wrote:
> Hi Philippe,
> 
>> The plan is to drop the nanoMIPS disassembler because it is broken 
>> since more than 2 years and nobody ever cared to fix it after 
>> Stefan's attempt in Nov 2018:
>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg576504.html
>> So it is certainly unused. Unused unmaintained code has a cost and 
>> negative impact to the generic project development.
> 
> How do you conclude it is broken ? It seems to work well.
> Aleksandar Markovic did few fixes during 2019.

> One community user tried it, reported a bug which got never fixed. This
means the code is not used by the mainstream community, but is a burden for
maintenance.

Hi Philippe,

I am not sure I understand this. What bug about nanomips disassembler was
reported?

> 
> NanoMIPS needs disassembler, like other architectures...

> I totally agreed, but we need a working disassembler;

We have a working disassembler in. If there is a bug that needs to be
resolved, please bring it to our attention.
Thanks.

Regards,
Petar
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 69003cdc3c..498dbf0ae4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -254,10 +254,6 @@  F: include/hw/timer/mips_gictimer.h
 F: tests/tcg/mips/
 K: ^Subject:.*(?i)mips

-MIPS TCG CPUs (nanoMIPS ISA)
-S: Orphan
-F: disas/nanomips.*
-
 Moxie TCG CPUs
 M: Anthony Green <green@moxielogic.com>
 S: Maintained
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 80cae86252..a25293cb01 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -228,13 +228,6 @@  to build binaries for it.
 ``Icelake-Client`` CPU Models are deprecated. Use ``Icelake-Server`` CPU
 Models instead.

-MIPS ``I7200`` CPU Model (since 5.2)
-''''''''''''''''''''''''''''''''''''
-
-The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
-(the ISA has never been upstreamed to a compiler toolchain). Therefore
-this CPU is also deprecated.
-
 System emulator machines
 ------------------------

@@ -305,13 +298,6 @@  The ``ppc64abi32`` architecture has a number of issues which regularly
 trip up our CI testing and is suspected to be quite broken. For that
 reason the maintainers strongly suspect no one actually uses it.

-MIPS ``I7200`` CPU (since 5.2)
-''''''''''''''''''''''''''''''
-
-The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
-(the ISA has never been upstreamed to a compiler toolchain). Therefore
-this CPU is also deprecated.
-
 Related binaries
 ----------------

@@ -378,9 +364,3 @@  resolve CPU model aliases before starting a virtual machine.

 Guest Emulator ISAs
 -------------------
-
-nanoMIPS ISA
-''''''''''''
-
-The ``nanoMIPS`` ISA has never been upstreamed to any compiler toolchain.
-As it is hard to generate binaries for it, declare it deprecated.