From: Mayuresh Chitale <mchitale@ventanamicro.com>
To: palmer@dabbelt.com, aou@eecs.berkeley.edu, paul.walmsley@sifive.com
Cc: anup@brainfault.org, atishp@rivosinc.com,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Mayuresh Chitale <mchitale@ventanamicro.com>
Subject: [RFC PATCH 1/2] riscv: enum for svinval extension
Date: Wed, 16 Feb 2022 10:51:09 +0530 [thread overview]
Message-ID: <20220216052110.1053665-2-mchitale@ventanamicro.com> (raw)
In-Reply-To: <20220216052110.1053665-1-mchitale@ventanamicro.com>
Similar to the other ISA extensions, this patch enables
callers to check for the presence for the svinval extension.
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
---
arch/riscv/include/asm/hwcap.h | 1 +
arch/riscv/kernel/cpu.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h
index 691fc9c8099b..bbff7cb279ea 100644
--- a/arch/riscv/include/asm/hwcap.h
+++ b/arch/riscv/include/asm/hwcap.h
@@ -51,6 +51,7 @@ extern unsigned long elf_hwcap;
* available logical extension id.
*/
enum riscv_isa_ext_id {
+ RISCV_ISA_EXT_SVINVAL = RISCV_ISA_EXT_BASE,
RISCV_ISA_EXT_ID_MAX = RISCV_ISA_EXT_MAX,
};
diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c
index ced7e5be8641..ff0613f8cc39 100644
--- a/arch/riscv/kernel/cpu.c
+++ b/arch/riscv/kernel/cpu.c
@@ -71,6 +71,7 @@ int riscv_of_parent_hartid(struct device_node *node)
}
static struct riscv_isa_ext_data isa_ext_arr[] = {
+ __RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL),
__RISCV_ISA_EXT_DATA("", RISCV_ISA_EXT_MAX),
};
--
2.25.1
next prev parent reply other threads:[~2022-02-16 5:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 5:21 [RFC PATCH 0/2] Risc-V Svinval support Mayuresh Chitale
2022-02-16 5:21 ` Mayuresh Chitale [this message]
2022-02-28 13:09 ` [RFC PATCH 1/2] riscv: enum for svinval extension Anup Patel
2022-02-16 5:21 ` [RFC PATCH 2/2] riscv: mm: use svinval instructions instead of sfence.vma Mayuresh Chitale
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=20220216052110.1053665-2-mchitale@ventanamicro.com \
--to=mchitale@ventanamicro.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atishp@rivosinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/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