kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* /proc/cpuinfo not showing all info
@ 2021-01-13  9:21 Pankaj  Vinodrao Joshi
  2021-01-13  9:42 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Pankaj  Vinodrao Joshi @ 2021-01-13  9:21 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 977 bytes --]

Hi,
i am using sifive's u540, RISCV64 with custom kernel 5.10.2 and i am trying to get all hardware information with the help of /proc/cpuinfo but i am not able get all information i need.

i am attaching current /proc/cpuinfo


rocessor        : 0
hart            : 2
isa             : rv64imafdc
mmu             : sv39
uarch           : sifive,u54-mc


but i am expecting following kind of output

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 142
model name      : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz
stepping        : 9
microcode       : 0xde
cpu MHz         : 700.027
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes

Can someone suggest me how i can print all info with /proc/cpuinfo  ??



Thanks!

[-- Attachment #1.2: Type: text/html, Size: 2040 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /proc/cpuinfo not showing all info
  2021-01-13  9:21 /proc/cpuinfo not showing all info Pankaj  Vinodrao Joshi
@ 2021-01-13  9:42 ` Greg KH
  2021-01-19  7:38   ` Pankaj  Vinodrao Joshi
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2021-01-13  9:42 UTC (permalink / raw)
  To: Pankaj Vinodrao Joshi; +Cc: kernelnewbies

On Wed, Jan 13, 2021 at 09:21:31AM +0000, Pankaj  Vinodrao Joshi wrote:
> Hi,
> i am using sifive's u540, RISCV64 with custom kernel 5.10.2 and i am trying to get all hardware information with the help of /proc/cpuinfo but i am not able get all information i need.
> 
> i am attaching current /proc/cpuinfo
> 
> 
> rocessor        : 0
> hart            : 2
> isa             : rv64imafdc
> mmu             : sv39
> uarch           : sifive,u54-mc
> 
> 
> but i am expecting following kind of output
> 
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 6
> model           : 142
> model name      : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz
> stepping        : 9
> microcode       : 0xde
> cpu MHz         : 700.027
> cache size      : 3072 KB
> physical id     : 0
> siblings        : 4
> core id         : 0
> cpu cores       : 2
> apicid          : 0
> initial apicid  : 0
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 22
> wp              : yes
> 
> Can someone suggest me how i can print all info with /proc/cpuinfo  ??

Each processor type exports different information in /proc/cpuinfo.  How
would a riscv cpu have the same types as an x86 cpu?

You have to treat each cpu type individually, there is no common format
for all different CPUs out there, sorry.

Hope this helps,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /proc/cpuinfo not showing all info
  2021-01-13  9:42 ` Greg KH
@ 2021-01-19  7:38   ` Pankaj  Vinodrao Joshi
  2021-01-19  7:55     ` Greg KH
  2021-01-19  9:09     ` Valdis Klētnieks
  0 siblings, 2 replies; 7+ messages in thread
From: Pankaj  Vinodrao Joshi @ 2021-01-19  7:38 UTC (permalink / raw)
  To: Greg KH; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1947 bytes --]

i agree each processor type exports different information but i need to pop up information while i do /proc/cpu also i have observed that almost every arch display information w.r.t frequency. Can you suggest how i can add info related to cpufreq into /proc ?



Thanks
________________________________
From: Greg KH <greg@kroah.com>
Sent: Wednesday, January 13, 2021 3:12 PM
To: Pankaj Vinodrao Joshi <Pankaj.VJ@exaleapsemi.com>
Cc: kernelnewbies@kernelnewbies.org <kernelnewbies@kernelnewbies.org>
Subject: Re: /proc/cpuinfo not showing all info

On Wed, Jan 13, 2021 at 09:21:31AM +0000, Pankaj  Vinodrao Joshi wrote:
> Hi,
> i am using sifive's u540, RISCV64 with custom kernel 5.10.2 and i am trying to get all hardware information with the help of /proc/cpuinfo but i am not able get all information i need.
>
> i am attaching current /proc/cpuinfo
>
>
> rocessor        : 0
> hart            : 2
> isa             : rv64imafdc
> mmu             : sv39
> uarch           : sifive,u54-mc
>
>
> but i am expecting following kind of output
>
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 6
> model           : 142
> model name      : Intel(R) Core(TM) i3-7020U CPU @ 2.30GHz
> stepping        : 9
> microcode       : 0xde
> cpu MHz         : 700.027
> cache size      : 3072 KB
> physical id     : 0
> siblings        : 4
> core id         : 0
> cpu cores       : 2
> apicid          : 0
> initial apicid  : 0
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 22
> wp              : yes
>
> Can someone suggest me how i can print all info with /proc/cpuinfo  ??

Each processor type exports different information in /proc/cpuinfo.  How
would a riscv cpu have the same types as an x86 cpu?

You have to treat each cpu type individually, there is no common format
for all different CPUs out there, sorry.

Hope this helps,

greg k-h
[EXT]

[-- Attachment #1.2: Type: text/html, Size: 4292 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /proc/cpuinfo not showing all info
  2021-01-19  7:38   ` Pankaj  Vinodrao Joshi
@ 2021-01-19  7:55     ` Greg KH
  2021-01-19  9:08       ` Pankaj  Vinodrao Joshi
  2021-01-19  9:09     ` Valdis Klētnieks
  1 sibling, 1 reply; 7+ messages in thread
From: Greg KH @ 2021-01-19  7:55 UTC (permalink / raw)
  To: Pankaj Vinodrao Joshi; +Cc: kernelnewbies

On Tue, Jan 19, 2021 at 07:38:13AM +0000, Pankaj  Vinodrao Joshi wrote:
> i agree each processor type exports different information but i need to pop up information while i do /proc/cpu also i have observed that almost every arch display information w.r.t frequency. Can you suggest how i can add info related to cpufreq into /proc ?

I am sorry, but I can not parse this very well, can you please explain
exactly what you wish to do and why the "normal" apis that expose the
current frequency of the processor do not work for you?  (hint, it's not
/proc/cpuinfo)

Also, who is demanding this requirement?

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /proc/cpuinfo not showing all info
  2021-01-19  7:55     ` Greg KH
@ 2021-01-19  9:08       ` Pankaj  Vinodrao Joshi
  2021-01-19 10:15         ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Pankaj  Vinodrao Joshi @ 2021-01-19  9:08 UTC (permalink / raw)
  To: Greg KH; +Cc: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 1419 bytes --]

sorry for the last mail that i was not able to convey what i was meaning to, i have noticed for almost all ARCH when i will do $ cat /proc/cpuinfo ,it will shows all cpu related info including cpu frequency but for my case i am getting almost everything except cpu frequency in /proc/cpuinfo.
Now my question is how i can add this cpufreq related info into /proc/cpuinfo ??

Also what all other alternatives /methods are there to get cpufreq related info from kernel ??



Thanks

________________________________
From: Greg KH <greg@kroah.com>
Sent: Tuesday, January 19, 2021 1:25 PM
To: Pankaj Vinodrao Joshi <Pankaj.VJ@exaleapsemi.com>
Cc: kernelnewbies@kernelnewbies.org <kernelnewbies@kernelnewbies.org>
Subject: Re: /proc/cpuinfo not showing all info

On Tue, Jan 19, 2021 at 07:38:13AM +0000, Pankaj  Vinodrao Joshi wrote:
> i agree each processor type exports different information but i need to pop up information while i do /proc/cpu also i have observed that almost every arch display information w.r.t frequency. Can you suggest how i can add info related to cpufreq into /proc ?

I am sorry, but I can not parse this very well, can you please explain
exactly what you wish to do and why the "normal" apis that expose the
current frequency of the processor do not work for you?  (hint, it's not
/proc/cpuinfo)

Also, who is demanding this requirement?

thanks,

greg k-h
[EXT]

[-- Attachment #1.2: Type: text/html, Size: 3149 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /proc/cpuinfo not showing all info
  2021-01-19  7:38   ` Pankaj  Vinodrao Joshi
  2021-01-19  7:55     ` Greg KH
@ 2021-01-19  9:09     ` Valdis Klētnieks
  1 sibling, 0 replies; 7+ messages in thread
From: Valdis Klētnieks @ 2021-01-19  9:09 UTC (permalink / raw)
  To: Pankaj Vinodrao Joshi; +Cc: Greg KH, kernelnewbies

On Tue, 19 Jan 2021 07:38:13 +0000, "Pankaj Vinodrao Joshi" said:

> i agree each processor type exports different information but i need to pop
> up information while i do /proc/cpu also i have observed that almost every arch
> display information w.r.t frequency. Can you suggest how i can add info related
> to cpufreq into /proc ?

You may wish to issue this command:

find /sys -name '*freq*'

and then meditate on the relative difficulty of parsing /proc/cpuinfo
and a sysfs file, and ask yourself if you want to to re-think your design.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: /proc/cpuinfo not showing all info
  2021-01-19  9:08       ` Pankaj  Vinodrao Joshi
@ 2021-01-19 10:15         ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2021-01-19 10:15 UTC (permalink / raw)
  To: Pankaj Vinodrao Joshi; +Cc: kernelnewbies

On Tue, Jan 19, 2021 at 09:08:23AM +0000, Pankaj  Vinodrao Joshi wrote:
> sorry for the last mail that i was not able to convey what i was meaning to, i have noticed for almost all ARCH when i will do $ cat /proc/cpuinfo ,it will shows all cpu related info including cpu frequency but for my case i am getting almost everything except cpu frequency in /proc/cpuinfo.
> Now my question is how i can add this cpufreq related info into /proc/cpuinfo ??

Why do you want to add cpu frequency to /proc/cpuinfo?

You can do that, but it will not be the "correct" way to export this
information to userspace so that userspace can properly handle it.

> Also what all other alternatives /methods are there to get cpufreq
> related info from kernel ??

See what Valdis wrote, that's the correct api to use.

Good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-19 10:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13  9:21 /proc/cpuinfo not showing all info Pankaj  Vinodrao Joshi
2021-01-13  9:42 ` Greg KH
2021-01-19  7:38   ` Pankaj  Vinodrao Joshi
2021-01-19  7:55     ` Greg KH
2021-01-19  9:08       ` Pankaj  Vinodrao Joshi
2021-01-19 10:15         ` Greg KH
2021-01-19  9:09     ` Valdis Klētnieks

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