Commit 19c7022c authored by Thomas Gambier's avatar Thomas Gambier Committed by Kirill Smelkov

support systems where 'model name' doesn't exist in /proc/cpuinfo

--------
kirr: I looked around a bit and I see that RISC-V indeed misses many
things, including model name in its /proc/cpuinfo but has isa there:

https://www.reddit.com/r/RISCV/comments/wfz050/samples_of_riscv_proccpuinfo/
https://lore.kernel.org/lkml/1538507707-22299-14-git-send-email-atish.patra@wdc.com/

However I also see that model name is x86-specific and isa is also not
present on other architectures, e.g. /proc/cpuinfo for ARM misses both
model name and isa.

So I adjusted the patch a bit to support environment where both `model
name` and `isa` are not present in /proc/cpuinfo - for example ARM.

In the future we might change to rely on `lscpu` instead completely to
avoid dealing with all these arch-specific peculiarities.

/reviewed-by @kirr
/reviewed-on !18
parent 39464b65
Pipeline #34572 passed with stage
in 0 seconds