Hi James, On Wednesday, 9 August 2017 01:14:24 PDT James Hogan wrote: > On Mon, Aug 07, 2017 at 04:01:14PM -0700, Paul Burton wrote: > > The NI 169445 board uses a little endian MIPS32r2 CPU, and therefore > > including board support in kernels that are unable to run on such a CPU > > is pointless. > > > > Specify requirements in the board config fragment that cause the NI > > 169445 board support to only be included in generic kernels that target > > little endian MIPS32r2 CPUs. > > > > For example, NI 169445 support will be included when configuring using > > 32r2el_defconfig but not when using 64r6_defconfig. > > > > Signed-off-by: Paul Burton <paul.burton@xxxxxxxxxx> > > Cc: Nathan Sullivan <nathan.sullivan@xxxxxx> > > Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> > > Cc: linux-mips@xxxxxxxxxxxxxx > > > > --- > > I'm basing this upon the Kconfig entries that were present in the > > initial upstream submission of NI 169445 board support[1]. If this is > > wrong at all please let me know :) > > > > [1] https://www.linux-mips.org/archives/linux-mips/2016-12/msg00016.html > > > > arch/mips/configs/generic/board-ni169445.config | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/arch/mips/configs/generic/board-ni169445.config > > b/arch/mips/configs/generic/board-ni169445.config index > > 0bae1f861a5b..f72223b366ca 100644 > > --- a/arch/mips/configs/generic/board-ni169445.config > > +++ b/arch/mips/configs/generic/board-ni169445.config > > @@ -1,3 +1,6 @@ > > +# require CONFIG_CPU_MIPS32_R2=y > > Technically, won't this unnecessarily prevent it being included in r1 > configs? Yes, I suppose it does... > I suppose the only better suggestion I have at the moment is > # require CONFIG_32BIT=y > # require CONFIG_CPU_MIPS32_R6=n > > I suppose being specific about exclusions is probably inevitable (e.g. > for boards which can't support micromips). It would just seem a shame to eventually end up with: # require CONFIG_CPU_MIPS32_R6=n # require CONFIG_CPU_MIPS32_R7=n # require CONFIG_CPU_MIPS32_R8=n # require CONFIG_CPU_MIPS32_R9=n # require CONFIG_CPU_MIPS32_RX=n # require CONFIG_CPU_MIPS32_RXI=n # require CONFIG_CPU_MIPS32_RXII=n # require CONFIG_CPU_MIPS32_RXIII=n # require CONFIG_CPU_MIPS32_RXIV=n Or whatever. I guess one option would be to add Kconfig entries that indicate the ISA being less-than or greater-than-equal some version. Then we could have for example: # require CONFIG_ISA_GE_R6=n ...and that would allow the board support to be included in any kernel targeting a pre-r6 ISA. That might be handy for selecting support for arch features in Kconfig too actually, where we currently have things like: default y if CPU_MIPSR1 || CPU_MIPSR2 || CPU_MIPSR6 and could instead have: default y if ISA_GE_R1 Thanks, Paul
Attachment:
signature.asc
Description: This is a digitally signed message part.