All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: James Hogan <james.hogan@imgtec.com>
Cc: Huacai Chen <chenhc@lemote.com>, John Crispin <john@phrozen.org>,
	"Steven J . Hill" <Steven.Hill@cavium.com>,
	linux-mips@linux-mips.org, Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>
Subject: Re: [PATCH V7 8/9] MIPS: Add __cpu_full_name[] to make CPU names more human-readable
Date: Fri, 23 Jun 2017 19:11:03 +0200	[thread overview]
Message-ID: <20170623171103.GH6306@linux-mips.org> (raw)
In-Reply-To: <20170623151507.GC31455@jhogan-linux.le.imgtec.org>

On Fri, Jun 23, 2017 at 04:15:07PM +0100, James Hogan wrote:

> On Thu, Jun 22, 2017 at 11:06:55PM +0800, Huacai Chen wrote:
> > diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
> > index 4eff2ae..78db63a 100644
> > --- a/arch/mips/kernel/proc.c
> > +++ b/arch/mips/kernel/proc.c
> 
> > @@ -62,6 +63,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
> >  	seq_printf(m, fmt, __cpu_name[n],
> >  		      (version >> 4) & 0x0f, version & 0x0f,
> >  		      (fp_vers >> 4) & 0x0f, fp_vers & 0x0f);
> > +	if (__cpu_full_name[n])
> > +		seq_printf(m, "model name\t\t: %s @ %uMHz\n",
> > +		      __cpu_full_name[n], mips_hpt_frequency / 500000);
> 
> If the core frequency is useful (I can imagine it being useful for
> humans), maybe it should be on a separate line.
> 
> This also assumes that the mips_hpt_frequency is half the core
> frequency, which may not universally be the case. Perhaps that should be
> abstracted too (at some point, I suppose it doesn't matter right away).

Indeed, there is a number of cores where the counter is incrementing at
the full clock rate and some - I think this was the IDT 5230/5260 class
of devices where the clock rate can be configured through a cold reset
time bitstream but the rate in use can not be detected by software in
a configuration register, so it has to be meassured by comparing to
another known clock.  Whops..

Making the clock part of the name is probably sensible on x86 where there
seem to be different CPU packages being marketed for different clock
rates, so this is more of a marketing name in contrast to an actual
core type.

It's not like on MIPS we're not suffering from creative CPU naming as
well.  It all started in '91 with when the R4000 with its 8k primary
caches was upgraded and then primarily due to its 16k caches sold as
the R4400.  From a software perspective there isn't much of a difference
so calling the R4400 an R4000 is sensible but users might miss an inch
or two if their R4400 is called a lowly R4000 ;-)

  Ralf

  reply	other threads:[~2017-06-23 17:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22 15:06 [PATCH V7 0/9] MIPS: Loongson: feature and performance improvements Huacai Chen
2017-06-22 15:06 ` [PATCH V7 1/9] MIPS: Loongson: Add Loongson-3A R3 basic support Huacai Chen
2017-06-22 15:06 ` [PATCH V7 2/9] MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3 Huacai Chen
2017-06-28 14:30   ` James Hogan
2017-06-28 14:30     ` James Hogan
2017-06-29  1:33     ` Huacai Chen
2017-06-29  5:46       ` James Hogan
2017-06-29  5:46         ` James Hogan
2017-06-29 10:07         ` Huacai Chen
2017-06-29 10:23         ` Joshua Kinard
2017-06-30  7:03           ` Huacai Chen
2017-06-22 15:06 ` [PATCH V7 3/9] MIPS: Loongson: Add NMI handler support Huacai Chen
2017-06-22 15:06 ` [PATCH V7 4/9] MIPS: Loongson-3: Support 4 packages in CPU Hwmon driver Huacai Chen
2017-06-22 15:06 ` [PATCH V7 5/9] MIPS: Loongson-3: IRQ balancing for PCI devices Huacai Chen
2017-06-22 15:06 ` [PATCH V7 6/9] MIPS: Loongson-3: support irq_set_affinity() in i8259 chip Huacai Chen
2017-06-22 15:06 ` [PATCH V7 7/9] MIPS: Loogson: Make enum loongson_cpu_type more clear Huacai Chen
2017-06-22 15:06 ` [PATCH V7 8/9] MIPS: Add __cpu_full_name[] to make CPU names more human-readable Huacai Chen
2017-06-23 15:15   ` James Hogan
2017-06-23 15:15     ` James Hogan
2017-06-23 17:11     ` Ralf Baechle [this message]
2017-06-24  8:50       ` Huacai Chen
2017-06-22 15:06 ` [PATCH V7 9/9] MIPS: Loongson: Introduce and use LOONGSON_LLSC_WAR Huacai Chen
2017-06-23 14:54   ` James Hogan
2017-06-23 14:54     ` James Hogan
2017-06-24  8:55     ` Huacai Chen
2017-06-24  9:02       ` James Hogan
2017-06-24  9:02         ` James Hogan
2017-06-24  9:23         ` Huacai Chen
2017-06-26  8:26           ` James Hogan
2017-06-26  9:38             ` Huacai Chen

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=20170623171103.GH6306@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=Steven.Hill@cavium.com \
    --cc=chenhc@lemote.com \
    --cc=james.hogan@imgtec.com \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=wuzhangjin@gmail.com \
    --cc=zhangfx@lemote.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.