Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fill modelName for all cores in arm64 devices #1389

Merged
merged 1 commit into from
Dec 19, 2022

Conversation

sgthammer
Copy link
Contributor

If there are more than one core for arm64 based devices, model name of CPU was not filled for all the cores except the last core. For instance, if there are 4 cores, only the last core's model name info is filled. As there is no model name line in /proc/cpuinfo file for arm64 devices(refer to: arch/arm64/kernel/cpuinfo.c in linux kernel code), it is better to move the code under case "model", "CPU part". Also, all the core's model names will filled as this case is inside of loop.

The code is tested for both amd64 and arm64 devices:

  • Arm Cortex-A53
  • 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz

@sgthammer
Copy link
Contributor Author

@shirou, could you please review this change or forward it to someone who can review?

@shirou
Copy link
Owner

shirou commented Dec 17, 2022

Hmm. The model name has been discussed once here. I found at least one device does not have a model line in cpuinfo. Could you share your cpuinfo by using gist?

@sgthammer
Copy link
Contributor Author

Cpuinfo link: https://gist.github.com/sgthammer/6b1b841f313897909bd33d5ce3bf1e49

For arm device we need to focus on "CPU Part" keyword. Kernel provides this line for all arm64 devices. Please refer to cpuinfo.c file as I provided in upper description.

Copy link
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have confirmed CPU part is always provided by cpuinfo.c as you said, I can reproduce with 4 CPU machine on GCP (Thank you sponsors!), and also confirmed all cpus have ModelName with your PR without errors. Thank you so much!

@shirou shirou merged commit 835767a into shirou:master Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants