Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1492650ybj; Fri, 8 May 2020 02:35:05 -0700 (PDT) X-Google-Smtp-Source: APiQypJha1Stu9DkpwhZrTiZZH5tPzJgByrwUZnWZg3rZBXUfvmzTAiknW9Fi/sNHpaPhVV8eziV X-Received: by 2002:aa7:c04a:: with SMTP id k10mr1249041edo.241.1588930505552; Fri, 08 May 2020 02:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588930505; cv=none; d=google.com; s=arc-20160816; b=A/J9A5/kmmHlq6dfm0XowwCvJuSrZuIrEtIlzTghvRJuMjqF3Y5Lc57U3bZ4fKccXu g0ZKANwj6mZTJugW/Q1SKiFMzM+/niZ3ujTzLMDxLGrKrHnY1ANP8u4wbOI1RFP5ku9W ZHlGYtjHoXARBwYXlHNfYZXk2H2GtlKcuL/Mq5gEoN1Xg0426oIGxilEpv/YOnHjo/kJ 1LyCknfz5C36rR8wW5pg/fPLOOOqZTe/sVuktPSDZKV7hSSS8RZEMD1jVy7pm1YW7E0g iwMwpeM3LYqx/srckuL5zIBgcFvHLVErrnlCuoQ3ffmDk10RuYu5kDFg+iMdeMx5eiez fGaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nxCKHJOyxGGwa5GeaFr41U1vEGKpZVxg8gTY+pR9J4s=; b=zmHOCETT+UAtHVszSJdxSJGEAImKeZfHA16t9txgeauEHMdrUThh+rK073f4bkYd53 pd4I3q8d34RsKJ1Yoa2h+5uvydOLCHL8+WQWWRC4HEm5+LiWovFXCMvfZb+LG3s0QS9l uxfYzB7Au8OAWwi/SVb0bBOhD3xjHdMaR1d3n0Wn1TQBn6N74qipc2/13Ag7E5Onmmj/ 0bcTqOzshW3B6Q8zHmaTu3AbeRoux0k/g9Jgc6SGWdKW9LP5GYE40Qt8jY6gGDVwIwRO p6Ll0nDCr+RmNfz1Qs8wKBtCCPv1Zu2J89ddTnHErKJUQMipvrE8wzZb79UmGMgTIjnO +KSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk9si624340edb.403.2020.05.08.02.34.42; Fri, 08 May 2020 02:35:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbgEHJdP (ORCPT + 99 others); Fri, 8 May 2020 05:33:15 -0400 Received: from elvis.franken.de ([193.175.24.41]:44684 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbgEHJdO (ORCPT ); Fri, 8 May 2020 05:33:14 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1jWzNV-0001bD-01; Fri, 08 May 2020 11:33:09 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id DB100C0418; Fri, 8 May 2020 11:32:59 +0200 (CEST) Date: Fri, 8 May 2020 11:32:59 +0200 From: Thomas Bogendoerfer To: Serge Semin Cc: Alexey Malahov , Paul Burton , Ralf Baechle , Arnd Bergmann , Rob Herring , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, Jiaxun Yang , Alexander Lobakin , Huacai Chen , Cedric Hombourger , =?iso-8859-1?Q?Ren=E9?= van Dorst , Ard Biesheuvel , Jessica Yu , Masahiro Yamada , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 07/20] mips: Add MIPS Warrior P5600 support Message-ID: <20200508093259.GB9085@alpha.franken.de> References: <20200306124807.3596F80307C2@mail.baikalelectronics.ru> <20200506174238.15385-1-Sergey.Semin@baikalelectronics.ru> <20200506174238.15385-8-Sergey.Semin@baikalelectronics.ru> <20200507111735.GF11616@alpha.franken.de> <20200507211923.kfu2ly3ncqms4c2u@mobilestation> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200507211923.kfu2ly3ncqms4c2u@mobilestation> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]