Re: Distincting very similar CPUs in cpu-probe.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 30, 2013 at 11:03:12AM +0100, Rafał Miłecki wrote:

> 2013/1/30 Rafał Miłecki <zajec5@xxxxxxxxx>:
> > I can see current code in cpu-probe.c handles some (very slightly)
> > different CPUs in the same way:
> >
> > case PRID_IMP_24K:
> > case PRID_IMP_24KE:
> >         c->cputype = CPU_24K;
> >         __cpu_name[cpu] = "MIPS 24Kc";
> >         break;
> >
> > There is almost nothing wrong about this, but setting the same name is
> > a little confusing for users. I wish to see different names in
> > /proc/cpuinfo for PRID_IMP_24K==24Kc and PRID_IMP_24KE==24KEc.
> >
> > Is there a preferred way of handling this? The simplest one seems to
> > be using separated "cases" while still using CPU_24K:
> > case PRID_IMP_24K:
> >         c->cputype = CPU_24K;
> >         __cpu_name[cpu] = "MIPS 24Kc";
> >         break;
> > case PRID_IMP_24KE:
> >         c->cputype = CPU_24K;
> >         __cpu_name[cpu] = "MIPS 24KEc";
> >         break;
> >
> > What do you think about this? Is this acceptable?
> >
> > For some reason I'm not aware of you may prefer adding CPU_24KE at the
> > same time. Does it make any sense?
> 
> Yet another option would be to use
> __cpu_name[cpu] = "MIPS 24Kc / MIPS 24KEc";
> 
> User still won't know which CPU he has, but at least we won't make
> aware MIPS 24KEc owners confused.

Yes, the MIPS naming is confusing.  A 1004K is basically a bunch of 34Ks,
a 1074K a bunch of 74Ks.  1004K/1074K is more the product name of the
whole cluster of CPUs so what should we call the individual CPU cores,
would 34K / 74K be better?

Unfortunately marketing-based naming has a long history in the MIPS world.
>From a software perspective the R4000 and R4400 are virtually identical
processors except the different (8kB vs 16kB) primary caches.  Then again
more significant changes to a core happened that were not reflected in a
change of the marketing name, for example there are MIPS32 R1 and R2
variants of 4K series cores.

Maybe we should use the marketing-names in /proc/cpuinfo primarily for human
consumption but software should rather rely on ISA, ASE and other features
indicates elsewhere.  The patch to export the cp0 config registers in sysfs
by Steven Hill is a good step into that direction.

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux