Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp699315pxa; Fri, 21 Aug 2020 19:31:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrAvTseeQ3EOZVkQteV1HJylSVVbbNITULORfWkNdiTf13llTmtJ8e0geOcTU0My6WjihD X-Received: by 2002:a17:906:1a0f:: with SMTP id i15mr5866339ejf.293.1598063515366; Fri, 21 Aug 2020 19:31:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598063515; cv=none; d=google.com; s=arc-20160816; b=OCNmCKVZVTrjTUrj1JHVlVIG4t4J8FFqxiKIZnJS0ckQ8H4IjR/IYXjJuB0iVeRO9r FP9MNvJAKQ7f19AcPaqDE49P5q9JneFxWlvOsa8BTzpy0cBz7+7E4yJdDRS3/NamvvZ9 d/MJdd3g3/bo9FrqGO2yOUdQjgPFOYLEOzjVL2+BoqTIAwtdF//miXnOZGg2LrKyLdJD gGS63XSTibef1B2ubovlzVeFRIGn+ogimXmtO7unnfVcI+/nz29hD7MFctdT/Cz6T7H+ D2b15uBcSXVbF0tbsp/s7wOoI3y3+CsgFULLHq314JYShuXXVc7NsgOhmA5fX6ndLQ2d p6Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date; bh=Q5UcKGYPa4OFPZ00DCHFWoZXBaxLs3yCs0CaNSyPNIM=; b=o/Z9Gtkbdy0SzvKLfVDvqh6Ot/ssTpigbqd9vLYxkA9rv5fIvGzjiiv8qnwnzd0gD9 gxOnZbBHBDPizpEMLyv+a0hhGfXiR2fi8QcludhN+U8Rd6BNayrwRS3O6SnLitMJS6kK 6SDCv0ZPZPxRJmV0u1waYBUk/cOqUvBzWonnIpZo2qv4sPCybLnhguu3vzkz3Cy84SQm 8xP68qTT6I3HL/R9pJuFR2fdxbGBiiORg7l5L35QSkNSdlNHmq4aTwOZcudO00AIwA3F 40lTmnLOBxUVexeYXJJywnMifz99YHSE7mYI1Ky3pJKBiLLM1JUxMSpIDXi6dH4ZJ+hq tReQ== 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 v9si2412455ejg.518.2020.08.21.19.30.56; Fri, 21 Aug 2020 19:31:55 -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 S1726387AbgHVC3l (ORCPT + 99 others); Fri, 21 Aug 2020 22:29:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbgHVC3k (ORCPT ); Fri, 21 Aug 2020 22:29:40 -0400 X-Greylist: delayed 25574 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 21 Aug 2020 19:29:39 PDT Received: from orcam.me.uk (tpp.orcam.me.uk [IPv6:2001:8b0:154:0:ea6a:64ff:fe24:f2fc]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E41E8C061573; Fri, 21 Aug 2020 19:29:39 -0700 (PDT) Received: from bugs.linux-mips.org (eddie.linux-mips.org [IPv6:2a01:4f8:201:92aa::3]) by orcam.me.uk (Postfix) with ESMTPS id 1DAFF2BE086; Sat, 22 Aug 2020 03:29:38 +0100 (BST) Date: Sat, 22 Aug 2020 03:29:36 +0100 (BST) From: "Maciej W. Rozycki" To: Paul Cercueil cc: Zhou Yanjie , Thomas Bogendoerfer , Paul Burton , Krzysztof Kozlowski , od@zcrc.me, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, =?UTF-8?B?5ryG6bmP5oyv?= , dongsheng.qiu@ingenic.com, rick.tyliu@ingenic.com, yanfei.li@ingenic.com, xuwanhao@wanyeetech.com Subject: Re: [PATCH 00/13] MIPS: Convert Ingenic to a generic board In-Reply-To: <4SSFFQ.3I498N5I41LP3@crapouillou.net> Message-ID: References: <20200803170124.231110-1-paul@crapouillou.net> <4SSFFQ.3I498N5I41LP3@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, > > FAOD is not a hack, but an optimisation measure > > so that features known to be hardwired for a given machine/CPU do not have > > to be dynamically queried every time referred. In some cases that results > > in large portions of code being optimised away by the compiler as well. > > Fair enough. Bloat-o-meter reports about ~100 KiB saved when that file is > present. But we can't use it in a generic kernel, unfortunately. Well, run-time patching might be an alternative to get the best of both worlds, but someone would have to reimplement our feature selection system to use it. > > The hardcoded value for a feature defined in > > always has to be the same as one in the corresponding bit of the `options' > > member of `struct cpuinfo_mips', in this case MIPS_CPU_TLBINV. > > In theory yes, in practice the CPU detection code is lagging behind... I wasn't aware of that. In that case it has been a design abuse which has been missed by the maintainer when accepting patches. It used to be the case that run-time detection was accurate and overrides were rather lazily added. Also I note Ingenic must have had a CPU erratum if our `decode_configs' doesn't just work, as the interpretation of CP0.Config[5:0] registers has been architectural and mandatory, and that for a reason. It's only legacy MIPS I-IV processors that should require special attention here. Maciej