[RFC] Mips SIMD architecture (MSA)

63 views
Skip to first unread message

José Vázquez

unread,
Apr 13, 2015, 4:54:06 AM4/13/15
to OpenWrt Development List, mips-creat...@googlegroups.com
As far i can understand MSA is a feature that is only present in the
MIPS Warrior cores and, for now, seems that could be only needed in
malta [1] target.
As you can see in arch/mips/Kconfig MIPS32R2 and MIPS64R2 select
CPU_SUPPORTS_MSA which does not apply to the majority of the mips
targets in OpenWRT.
Deleting "select CPU_SUPPORTS_MSA" in [2] and [3] and changing [4]
with "depends CPU_MIPS32_R2 || CPU_MIPS64_R2" will make MSA selectable
and should make the kernel smaller.

[1]https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/arch/mips/Kconfig?id=refs/tags/v3.18.11#n311
[2]https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/arch/mips/Kconfig?id=refs/tags/v3.18.11#n1256
[3]https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/arch/mips/Kconfig?id=refs/tags/v3.18.11#n1290
[4]https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/arch/mips/Kconfig?id=refs/tags/v3.18.11#n2135

Regards:

Pepe

Paul Burton

unread,
Apr 13, 2015, 5:15:33 AM4/13/15
to José Vázquez, OpenWrt Development List, mips-creat...@googlegroups.com
On Mon, Apr 13, 2015 at 10:54:05AM +0200, José Vázquez wrote:
> As far i can understand MSA is a feature that is only present in the
> MIPS Warrior cores and, for now, seems that could be only needed in
> malta [1] target.
> As you can see in arch/mips/Kconfig MIPS32R2 and MIPS64R2 select
> CPU_SUPPORTS_MSA which does not apply to the majority of the mips
> targets in OpenWRT.
> Deleting "select CPU_SUPPORTS_MSA" in [2] and [3] and changing [4]
> with "depends CPU_MIPS32_R2 || CPU_MIPS64_R2" will make MSA selectable
> and should make the kernel smaller.

Hello,

I'm not sure I understand the problem here - CPU_HAS_MSA should already
be configurable via Kconfig, so you can just disable it if you don't
need it (as indicated in the Kconfig help text). The CPU_SUPPORTS_MSA
entries are there just to enforce that you can only enable CPU_HAS_MSA
on a system which might possibly include MSA (ie. MIPSr2+, well really
MIPSr5+).

In essence, the fact that your system selects CPU_SUPPORTS_MSA shouldn't
increase the size of your kernel unless you also enable the configurable
CPU_HAS_MSA. Am I missing something?

Thanks,
Paul
> --
> You received this message because you are subscribed to the Google Groups "MIPS Creator CI20 Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mips-creator-ci2...@googlegroups.com.
> To post to this group, send an email to mips-creat...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/mips-creator-ci20-dev/CAFXQae%2Ba69G4bgOOzvTgiRHLCH6Mf7Kmy83K_wAVJYSni6TZnw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
signature.asc

José Vázquez

unread,
Apr 13, 2015, 5:59:20 AM4/13/15
to Paul Burton, OpenWrt Development List, mips-creat...@googlegroups.com
MSA is not selectable if in Kconfig the target selects
SYS_HAS_CPU_MIPS32_R2 or SYS_HAS_CPU_MIPS64_R2, like Lantiq, PMC_MSP,
Ralink and some others because of [2] and [3].
I.e., in the case of EVA it is only selected if SYS_HAS_CPU_MIPS32_R3_5.

Pepe

Paul Burton

unread,
Apr 13, 2015, 6:28:53 AM4/13/15
to José Vázquez, OpenWrt Development List, mips-creat...@googlegroups.com
...but [2] & [3] both only select CPU_SUPPORTS_MSA, not CPU_HAS_MSA. You
should still be able to disable CPU_HAS_MSA in your configuration.
Nothing depends upon or selects CPU_HAS_MSA, so you should always be
able to disable it regardless of the platform you build for.

To take one of your examples I just checked out v3.18.11, started from
the Lantiq xway_defconfig and ran menuconfig. MSA is disabled by default
as expected, and can be enabled if (& only if) its dependency
CONFIG_MIPS_O32_FP64_SUPPORT is enabled. Even when that is enabled MSA
is still disabled by default.

I still don't see what you're trying to do here - MSA can already always
be disabled via Kconfig, and is automatically enforced disabled on
systems where it doesn't make sense.

Thanks,
Paul
signature.asc

José Vázquez

unread,
Apr 13, 2015, 8:27:32 AM4/13/15
to Paul Burton, OpenWrt Development List, mips-creat...@googlegroups.com
You are right. Sorry and thanks for the clarification.

Best regards:

Pepe
Reply all
Reply to author
Forward
0 new messages