From: Anup Patel <apatel@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH 3/4] lib: sbi: Alphabetically sort HART ISA extensions
Date: Wed, 5 Jul 2023 17:28:04 +0530 [thread overview]
Message-ID: <20230705115805.1054915-4-apatel@ventanamicro.com> (raw)
In-Reply-To: <20230705115805.1054915-1-apatel@ventanamicro.com>
Let us follow alphabetical order for HART ISA extension so that
it is simpler to maintain.
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
---
include/sbi/sbi_hart.h | 10 +++++-----
lib/sbi/sbi_hart.c | 16 ++++++++--------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h
index 938248f..b97f78c 100644
--- a/include/sbi/sbi_hart.h
+++ b/include/sbi/sbi_hart.h
@@ -26,16 +26,16 @@ enum sbi_hart_priv_versions {
/** Possible ISA extensions of a hart */
enum sbi_hart_extensions {
- /** Hart has Sscofpmt extension */
- SBI_HART_EXT_SSCOFPMF = 0,
- /** HART has Zicntr extension (i.e. HW cycle, time & instret CSRs) */
- SBI_HART_EXT_ZICNTR,
/** HART has AIA M-mode CSRs */
- SBI_HART_EXT_SMAIA,
+ SBI_HART_EXT_SMAIA = 0,
/** HART has Smstateen CSR **/
SBI_HART_EXT_SMSTATEEN,
+ /** Hart has Sscofpmt extension */
+ SBI_HART_EXT_SSCOFPMF,
/** HART has Sstc extension */
SBI_HART_EXT_SSTC,
+ /** HART has Zicntr extension (i.e. HW cycle, time & instret CSRs) */
+ SBI_HART_EXT_ZICNTR,
/** HART has Zihpm extension */
SBI_HART_EXT_ZIHPM,
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
index 435771c..380e615 100644
--- a/lib/sbi/sbi_hart.c
+++ b/lib/sbi/sbi_hart.c
@@ -438,20 +438,20 @@ static inline char *sbi_hart_extension_id2string(int ext)
char *estr = NULL;
switch (ext) {
- case SBI_HART_EXT_SSCOFPMF:
- estr = "sscofpmf";
- break;
- case SBI_HART_EXT_ZICNTR:
- estr = "zicntr";
- break;
case SBI_HART_EXT_SMAIA:
estr = "smaia";
break;
+ case SBI_HART_EXT_SMSTATEEN:
+ estr = "smstateen";
+ break;
+ case SBI_HART_EXT_SSCOFPMF:
+ estr = "sscofpmf";
+ break;
case SBI_HART_EXT_SSTC:
estr = "sstc";
break;
- case SBI_HART_EXT_SMSTATEEN:
- estr = "smstateen";
+ case SBI_HART_EXT_ZICNTR:
+ estr = "zicntr";
break;
case SBI_HART_EXT_ZIHPM:
estr = "zihpm";
--
2.34.1
next prev parent reply other threads:[~2023-07-05 11:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 11:58 [PATCH 0/4] Misc OpenSBI HART ISA extension improvements Anup Patel
2023-07-05 11:58 ` [PATCH 1/4] lib: sbi: Add Zicntr as a HART ISA extension Anup Patel
2023-07-05 14:46 ` Xiang W
2023-07-05 11:58 ` [PATCH 2/4] lib: sbi: Add Zihpm " Anup Patel
2023-07-05 14:46 ` Xiang W
2023-07-05 15:06 ` Xiang W
2023-07-06 4:09 ` Anup Patel
2023-07-05 11:58 ` Anup Patel [this message]
2023-07-05 14:46 ` [PATCH 3/4] lib: sbi: Alphabetically sort HART ISA extensions Xiang W
2023-07-05 11:58 ` [PATCH 4/4] lib: sbi: Rename hart_pmu_get_allowed_bits() function Anup Patel
2023-07-05 14:47 ` Xiang W
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=20230705115805.1054915-4-apatel@ventanamicro.com \
--to=apatel@ventanamicro.com \
--cc=opensbi@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox