Re: [PATCH] MIPS: add support for buggy MT7621S core detection

2021-04-07 Thread Ilya Lipnitskiy
On Wed, Apr 7, 2021 at 6:49 AM Maciej W. Rozycki wrote: > > On Mon, 5 Apr 2021, Ilya Lipnitskiy wrote: > > > Thanks for the comments. Including asm/bugs.h in asm/mips-cps.h led to > > some circular dependencies when I tried it, but I will try again based > > on your feedback - indeed it would be m

Re: [PATCH] MIPS: add support for buggy MT7621S core detection

2021-04-07 Thread Maciej W. Rozycki
On Mon, 5 Apr 2021, Ilya Lipnitskiy wrote: > Thanks for the comments. Including asm/bugs.h in asm/mips-cps.h led to > some circular dependencies when I tried it, but I will try again based > on your feedback - indeed it would be much cleaner to have this logic > in mips_cps_numcores. The only wrin

Re: [PATCH] MIPS: add support for buggy MT7621S core detection

2021-04-05 Thread Ilya Lipnitskiy
On Mon, Apr 5, 2021 at 6:22 PM Maciej W. Rozycki wrote: > > On Fri, 2 Apr 2021, Ilya Lipnitskiy wrote: > > > diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h > > index d72dc6e1cf3c..d32f0c4e61f7 100644 > > --- a/arch/mips/include/asm/bugs.h > > +++ b/arch/mips/include/asm/b

Re: [PATCH] MIPS: add support for buggy MT7621S core detection

2021-04-05 Thread Maciej W. Rozycki
On Fri, 2 Apr 2021, Ilya Lipnitskiy wrote: > diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h > index d72dc6e1cf3c..d32f0c4e61f7 100644 > --- a/arch/mips/include/asm/bugs.h > +++ b/arch/mips/include/asm/bugs.h > @@ -50,4 +51,21 @@ static inline int r4k_daddiu_bug(void) >

[PATCH] MIPS: add support for buggy MT7621S core detection

2021-04-02 Thread Ilya Lipnitskiy
Most MT7621 SoCs have 2 cores, which is detected and supported properly by CPS. Unfortunately, MT7621 SoC has a less common S variant with only one core. On MT7621S, GCR_CONFIG still reports 2 cores, which leads to hangs when starting SMP. CPULAUNCH registers can be used in that case to detect the