From: Sunil V L <sunilvl@ventanamicro.com>
To: util-linux@vger.kernel.org
Cc: Sunil V L <sunilvl@ventanamicro.com>
Subject: [PATCH] lscpu: Print ISA information in summary
Date: Tue, 4 Mar 2025 20:12:10 +0530 [thread overview]
Message-ID: <20250304144210.182961-1-sunilvl@ventanamicro.com> (raw)
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 <sunilvl@ventanamicro.com>
---
sys-utils/lscpu-cputype.c | 1 +
sys-utils/lscpu.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/sys-utils/lscpu-cputype.c b/sys-utils/lscpu-cputype.c
index 739dd99c5..bdb33ac78 100644
--- a/sys-utils/lscpu-cputype.c
+++ b/sys-utils/lscpu-cputype.c
@@ -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 */
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index ffec37206..9f00b1757 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -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);
}
/*
--
2.43.0
next reply other threads:[~2025-03-04 14:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 14:42 Sunil V L [this message]
2025-03-05 12:29 ` [PATCH] lscpu: Print ISA information in summary Sunil V L
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250304144210.182961-1-sunilvl@ventanamicro.com \
--to=sunilvl@ventanamicro.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.