From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A02D3C4332E for ; Fri, 20 Mar 2020 21:24:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7429E20724 for ; Fri, 20 Mar 2020 21:24:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727209AbgCTVYa (ORCPT ); Fri, 20 Mar 2020 17:24:30 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:52820 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726983AbgCTVYa (ORCPT ); Fri, 20 Mar 2020 17:24:30 -0400 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23992645AbgCTVYZhCTr9 (ORCPT + 1 other); Fri, 20 Mar 2020 22:24:25 +0100 Date: Fri, 20 Mar 2020 21:24:25 +0000 (GMT) From: "Maciej W. Rozycki" To: Jiaxun Yang cc: Manuel Lauss , Tiezhu Yang , Thomas Bogendoerfer , Huacai Chen , Linux-MIPS , LKML , Xuefeng Li Subject: Re: [PATCH] MIPS: Loongson: Add model name to /proc/cpuinfo In-Reply-To: <788597FA-6AD6-4218-886F-35C0916EA3F2@flygoat.com> Message-ID: References: <1583908414-22858-1-git-send-email-yangtiezhu@loongson.cn> <788597FA-6AD6-4218-886F-35C0916EA3F2@flygoat.com> 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 On Wed, 11 Mar 2020, Jiaxun Yang wrote: > __cpu_name[] will be displayed as "cpu model" in cpuinfo, however > in x86 world, the name line is started with "model name". > Most user applications like lscpu, hwinfo is following x86's rule, we don't have superpower to move all of them. > > Also rename "cpu model" will break current ABI, so just create a new array > for it would be a better option. Well, /proc/cpuinfo is not an ABI, it's meant for human interaction (use `sysfs' for machine processing). If tools want to use it anyway, then fine, but they need to adapt to the relative volatility of the free-form text interface, and also learn all the world is not x86 (just like all the MIPS world is not Loongson, so if you argue about adding effectively a duplicate field, then that would have to be applied across all the platforms). IOW fix the tool and do not work its deficiencies around in the kernel just because it seems easier for you to do. Here's how example /proc/cpuinfo looks like on RISC-V/Linux BTW: processor : 0 hart : 1 isa : rv64imafdc mmu : sv39 uarch : sifive,rocket0 [...] -- every Linux platform is different in this respect and tools have to live with that. Maciej