[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200510220905.m47swnvbdgx4b65j@mobilestation>
Date: Mon, 11 May 2020 01:09:05 +0300
From: Serge Semin <Sergey.Semin@...kalelectronics.ru>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
CC: Serge Semin <fancer.lancer@...il.com>,
Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
Paul Burton <paulburton@...nel.org>,
Ralf Baechle <ralf@...ux-mips.org>,
Arnd Bergmann <arnd@...db.de>,
Rob Herring <robh+dt@...nel.org>, <linux-pm@...r.kernel.org>,
<devicetree@...r.kernel.org>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Alexander Lobakin <alobakin@...nk.ru>,
Huacai Chen <chenhc@...ote.com>,
Cedric Hombourger <Cedric_Hombourger@...tor.com>,
René van Dorst <opensource@...rst.com>,
Ard Biesheuvel <ardb@...nel.org>, Jessica Yu <jeyu@...nel.org>,
Masahiro Yamada <masahiroy@...nel.org>,
<linux-mips@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 07/20] mips: Add MIPS Warrior P5600 support
On Fri, May 08, 2020 at 02:21:37PM +0200, Thomas Bogendoerfer wrote:
> On Fri, May 08, 2020 at 11:32:59AM +0200, Thomas Bogendoerfer wrote:
> > On Fri, May 08, 2020 at 12:19:23AM +0300, Serge Semin wrote:
> > > On Thu, May 07, 2020 at 01:17:35PM +0200, Thomas Bogendoerfer wrote:
> > > > P5600 is CPU_MIPS_R5 so can't you select it here and drop all the || CPU_5600
> > > > above/below ?
> > >
> > > Alas, We can't do this so easy. CONFIG_CPU_MIPS32_{R2,R5,R6} and any other
> > > CONFIG_CPU_* configs is something that kernel config-file is supposed to select.
> > > Their availability is enabled by the CONFIG_SYS_HAS_CPU_* configs. CONFIG_CPU_*
> > > is supposed to activate CPU-specific features and there is only one
> > > CONFIG_CPU_x can be enabled at a time seeing it's a part of the "CPU type"
> > > choice kconfig menu. In addition the CPU config also tunes a compiler to activate
> > > the arch-specific ISA and optimizations in the arch/mips/Makefile by setting
> > > -march=cpu-name (where cpu-name can be p5600, mips32r5, etc).
> > >
> > > Yes, P5600 is based on the MIPS32r5, but it also has got some specific features
> > > (see config CPU_P5600 and config MIPS32_R5), which makes it to be different from
> > > the ancestor. So In addition to the difficulties described above IMHO converting
> > > CPU_P5600 to a set of features activated on top of the CPU_MIPS32_R5 config
> > > would contradict the design of the CPU-support configs implemented in the MIPS
> > > arch subsystem.
> >
> > maybe I wasn't clear enough, my suggestion is
> >
> > use
> >
> > config CPU_P5600
> > bool "MIPS Warrior P5600"
> > depends on SYS_HAS_CPU_P5600
> > select CPU_MIPS32_R5
> > select CPU_SUPPORTS_UNCACHED_ACCELERATED
> > select CPU_SUPPORTS_CPUFREQ
> > select CPU_MIPSR2_IRQ_VI
> > select CPU_MIPSR2_IRQ_EI
> >
> > That way you don't need to any "|| CPU_P5600" where CPU_MIPS32_R5 is
> > already there. Or are there cases, where this would be wrong ?
>
> nevermind, this would also need a select SYS_HAS_CPU_MIPS32_R5, which
> isn't wanted here. So patch is fine as is.
Ok. Thanks.
-Sergey
>
> Thomas.
>
> --
> Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
> good idea. [ RFC1925, 2.3 ]
Powered by blists - more mailing lists