lscpu: Print ISA information in summary
PATCH 1/1 lscpu: Print ISA information in summary
The ISA information for RISC-V is an important information to understand the different extensions supported by the CPU. Print this information in the summary.
Signed-off-by Sunil V L <[email protected]>
--- sys-utils/lscpu-cputype.c | 1 + sys-utils/lscpu.c | 3 +++ 2 files changed, 4 insertions(+)
sys-utils/lscpu-cputype.c +1 -0
@@ -233,6 +233,7 @@ static const struct cpuinfo_pattern type_patterns[] =DEF_PAT_CPUTYPE ("family" ,PAT_FAMILY , family),DEF_PAT_CPUTYPE ("features" ,PAT_FEATURES , flags),/* s390 */ DEF_PAT_CPUTYPE ("flags" ,PAT_FLAGS , flags),/* x86 */ +DEF_PAT_CPUTYPE ("isa" ,PAT_ISA , isa),/* riscv */ DEF_PAT_CPUTYPE ("marchid" ,PAT_FAMILY , family),/* riscv */ DEF_PAT_CPUTYPE ("max thread id" ,PAT_MAX_THREAD_ID , mtid),/* s390 */ DEF_PAT_CPUTYPE( "mimpid", PAT_MODEL, model), /* riscv */
sys-utils/lscpu.c +3 -0
@@ -954,6 +954,9 @@ print_summary_cputype(struct lscpu_cxt *cxt,if (ct->flags)add_summary_s (tb, sec,_ ("Flags:" ), ct->flags); + +if (ct->isa) +add_summary_s (tb, sec,_ ("ISA:" ), ct->isa); }/*
Signature · 1 line
2.43.0
Quoted 4 lines · Sunil V L
The ISA information for RISC-V is an important information to understand the different extensions supported by the CPU. Print this information in the summary.
Hi,
I had some offline conversation with Drew and Anup regarding the formatting of the ISA. I will send v2 of this patch to address the feedback from them. So, please ignore this version for now.
Thanks,
Sunil