summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAtish Patra <atishp@rivosinc.com>2022-01-07 21:54:08 +0300
committerAnup Patel <anup@brainfault.org>2022-02-04 07:38:57 +0300
commit3b7c204dcaa58e415ad7451c2a690bb88773abbf (patch)
treedd2fc5d0ef1fbf6947f375a9f78d487fbd49d886 /include
parent632f59392bbaa05176376b7d7a9f77f611816614 (diff)
downloadopensbi-3b7c204dcaa58e415ad7451c2a690bb88773abbf.tar.xz
lib: sbi: Disable interrupt during config matching
PMU overflow interrupt should be disabled durinig initial configuration of counters. They should be enabled while starting counters. Fixes: 730f01bb41a6 ("lib: sbi: Support sscofpmf extension in OpenSBI") Signed-off-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/riscv_encoding.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h
index 8a29f8e..ac8590d 100644
--- a/include/sbi/riscv_encoding.h
+++ b/include/sbi/riscv_encoding.h
@@ -181,13 +181,14 @@
#define MHPMEVENT_VSINH (_UL(1) << 59)
#define MHPMEVENT_VUINH (_UL(1) << 58)
#else
-#define MHPMEVENTH_OF (_UL(1) << 31)
+#define MHPMEVENTH_OF (_ULL(1) << 31)
#define MHPMEVENTH_MINH (_ULL(1) << 30)
#define MHPMEVENTH_SINH (_ULL(1) << 29)
#define MHPMEVENTH_UINH (_ULL(1) << 28)
#define MHPMEVENTH_VSINH (_ULL(1) << 27)
#define MHPMEVENTH_VUINH (_ULL(1) << 26)
+#define MHPMEVENT_OF (MHPMEVENTH_OF << 32)
#define MHPMEVENT_MINH (MHPMEVENTH_MINH << 32)
#define MHPMEVENT_SINH (MHPMEVENTH_SINH << 32)
#define MHPMEVENT_UINH (MHPMEVENTH_UINH << 32)