lscpu: add flags to ARM implementer and part tables - #4543
Open
karelzak wants to merge 1 commit into
Open
Conversation
Replace the boolean nooverwrite field in struct hw_impl with an unsigned int flags field, shared between hw_impl and id_part structs. The effective flags for a part are (hw_impl.flags | id_part.flags). Two flags are defined: - FL_FOLLOW_KERNEL: prefer the modelname already provided by the kernel in /proc/cpuinfo; the table name is used as a fallback when the kernel does not provide one. - FL_FOLLOW_BIOS: prefer the DMI bios_modelname; the table name is used as a fallback when DMI is unavailable. Convert the existing Phytium nooverwrite to FL_FOLLOW_KERNEL. Add HiSilicon Kunpeng part IDs (0xd02, 0xd03, 0xd06, 0xd22) with FL_FOLLOW_BIOS to prefer the DMI-provided model name. Addresses: util-linux#4531 Signed-off-by: Karel Zak <kzak@redhat.com>
Collaborator
Author
|
@lpyu001 Any feedback? Please. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nooverwritefield instruct hw_implwith anunsigned int flagsfield, shared betweenhw_implandid_partstructs. The effective flags for a part are(hw_impl.flags | id_part.flags), so a flag set at either level applies.FL_FOLLOW_KERNEL(prefer/proc/cpuinfomodelname) andFL_FOLLOW_BIOS(prefer DMIbios_modelname), with the table name as fallback in both cases.nooverwritetoFL_FOLLOW_KERNEL.0xd02,0xd03,0xd06,0xd22) withFL_FOLLOW_BIOSto prefer DMI-provided model name.Based on discussion in #4531.