Skip to content

lscpu: add flags to ARM implementer and part tables - #4543

Open
karelzak wants to merge 1 commit into
util-linux:masterfrom
karelzak:PR/lscpu-arm-flags
Open

lscpu: add flags to ARM implementer and part tables#4543
karelzak wants to merge 1 commit into
util-linux:masterfrom
karelzak:PR/lscpu-arm-flags

Conversation

@karelzak

@karelzak karelzak commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 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), so a flag set at either level applies.
  • Define FL_FOLLOW_KERNEL (prefer /proc/cpuinfo modelname) and FL_FOLLOW_BIOS (prefer DMI bios_modelname), with the table name as fallback in both cases.
  • Convert the existing Phytium nooverwrite to FL_FOLLOW_KERNEL.
  • Add HiSilicon Kunpeng part IDs (0xd02, 0xd03, 0xd06, 0xd22) with FL_FOLLOW_BIOS to prefer DMI-provided model name.

Based on discussion in #4531.

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>
@karelzak

Copy link
Copy Markdown
Collaborator Author

@lpyu001 Any feedback? Please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant