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

Re: Porting linuxinfo to aarch64



W dniu 05.09.2014 o 19:49, Helge Kreutzmann pisze:
> Hello,
> I recently read [1] about the new Debian architecture aarch64.
> I maintain a small tool "linuxinfo", which checks for the architecture
> and prints some system information.

I do wonder when all those tools which just parse /proc/cpuinfo will
finally die. Most of time new architecture comes and one of those
breaks. Sometimes it is even build dependency for something else ;(

There is /sys/devices/system/cpu/ which can provide more data. There is
cpufreq subsystem which can give cpu frequencies.

Check 'lscpu' tool which does even more than your linuxinfo.

> It would be kind if you could check on aarch64 [2] if linuxinfo works
> and produces sensible output. I basically added aarch64 as a variant 
> for arm, however, [3] tells me not to do this?

16:02 hrw@pinkypie-rawhide:linuxinfo-2.1.0$ ./linuxinfo
Linux pinkypie 3.17.0-0.rc0.git7.1.fc22.h1.4k.aarch64 #1 SMP Mon Aug 18
13:06:46 CEST 2014
Unknown   processors, 0.00 total bogomips, 16103M RAM
System library 2.19.90

I looked at code. Looks like each new architecture is just copy/paste of
other + some changes. Rewrite which would parse /proc/cpuinfo in unified
way nevermind which architecture would be better (if you insist on
having such useless tool).

There is Sys-CPU module for Perl which does the same and we also had to
patch for AArch64 in past. Maybe will need to do the same again when
format of /proc/cpuinfo will change again.

> If you see any problems, bugs or replies to this e-mail
> (including a description and /proc/cpuinfo) would be very welcome.

Under 3.17-rc I got this:

16:00 hrw@pinkypie-rawhide:linuxinfo-2.1.0$ cat /proc/cpuinfo
features        : fp asimd evtstrm

processor       : 0
implementer     : 0x50
variant         : 0x0
partnum         : 0x000
revision        : 0x0

processor       : 1
implementer     : 0x50
variant         : 0x0
partnum         : 0x000
revision        : 0x0

processor       : 2
implementer     : 0x50
variant         : 0x0
partnum         : 0x000
revision        : 0x0

processor       : 3
implementer     : 0x50
variant         : 0x0
partnum         : 0x000
revision        : 0x0

processor       : 4
implementer     : 0x50
variant         : 0x0
partnum         : 0x000
revision        : 0x0

processor       : 5
implementer     : 0x50
variant         : 0x0
partnum         : 0x000
revision        : 0x0

processor       : 6
implementer     : 0x50
variant         : 0x0
partnum         : 0x000
revision        : 0x0

processor       : 7
implementer     : 0x50
variant         : 0x0
partnum         : 0x000
revision        : 0x0

Under 3.16 output was different.


Reply to: