Re: [PATCH] MIPS: Limit check_bugs32() under CONFIG_32BIT

From: Jiaxun Yang
Date: Thu Apr 09 2020 - 03:10:04 EST


On Thu, 9 Apr 2020 12:43:28 +0800
YunQiang Su <wzssyqa@xxxxxxxxx> wrote:

> Tiezhu Yang <yangtiezhu@xxxxxxxxxxx> ä2020å4æ9æåå
> äå11:10åéï
> >
> > There is no need to build and call check_bugs32() under
> > CONFIG_64BIT, just limit it under CONFIG_32BIT.
>
> Since 32bit is subset of 64bit, and due to the code, I think that the
> initial purpose
> of check_bugs32() is also willing to run even with CONFIG_64BIT.
>
> For example, if we have a CPU which is 64bit, and work well on 64bit
> mode, while has a bug only on 32bit mode, check_bugs32 should be used
> here.
>
> Loongson's 3A 1000 is the example, I cannot support FP32 mode well.

In this case bugs32 only contains a workaround for MIPS34K, which is a
MIPS32 processor. It's safe to do so.

But my suggestion is if you're going to clean-up bugs and workarounds
you'd better establish a file for silicon bugs and provide Kconfig
options to enable & disable them. Manage bug dependencies by Kconfig
will be easier.

Thanks.

--
Jiaxun Yang