linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YunQiang Su <wzssyqa@gmail.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Manuel Lauss <manuel.lauss@gmail.com>,
	Tiezhu Yang <yangtiezhu@loongson.cn>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Huacai Chen <chenhc@lemote.com>,
	Linux-MIPS <linux-mips@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Xuefeng Li <lixuefeng@loongson.cn>
Subject: Re: [PATCH] MIPS: Loongson: Add model name to /proc/cpuinfo
Date: Sat, 21 Mar 2020 09:20:29 +0800	[thread overview]
Message-ID: <CAKcpw6W=nVWGVkTi2ub82THUe09PGxHR1x9dSDW5A6sYnYGTUg@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.21.2003202109190.2689954@eddie.linux-mips.org>

Maciej W. Rozycki <macro@linux-mips.org> 于2020年3月21日周六 上午5:24写道:
>
> 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).

In fact there do be some code to use cpuinfo to detect cpu. Gcc is
even in this list.
https://codesearch.debian.net/search?q=cpuinfo&literal=1

>
>  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

If we create cpuinfo for a new architecture, we are freely do anything.
it is OK, as the newly write code can know about it, and there is no
old codes about it.

While if we have some modification to /proc/cpuinfo, of exists architectures,
we must be very careful to keep compatible.

>
> [...]
>
> -- every Linux platform is different in this respect and tools have to
> live with that.

Yes, you are some right, the scripts/programs should be robust,
while they cannot forecast how the people change cpuinfo, if they are
freely....

>
>   Maciej



-- 
YunQiang Su

      reply	other threads:[~2020-03-21  1:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  6:33 [PATCH] MIPS: Loongson: Add model name to /proc/cpuinfo Tiezhu Yang
2020-03-11  6:53 ` 回复:[PATCH] " Jiaxun Yang
2020-03-11  9:28   ` Tiezhu Yang
2020-03-11  7:18 ` [PATCH] " YunQiang Su
2020-03-11  7:41   ` Jiaxun Yang
2020-03-11  9:40   ` Tiezhu Yang
2020-03-12  7:25     ` Tiezhu Yang
2020-03-11  9:58 ` Manuel Lauss
2020-03-11 10:27   ` Jiaxun Yang
2020-03-20 21:24     ` Maciej W. Rozycki
2020-03-21  1:20       ` YunQiang Su [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKcpw6W=nVWGVkTi2ub82THUe09PGxHR1x9dSDW5A6sYnYGTUg@mail.gmail.com' \
    --to=wzssyqa@gmail.com \
    --cc=chenhc@lemote.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=macro@linux-mips.org \
    --cc=manuel.lauss@gmail.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).