lib: sbi: sse: fix invalid errors returned for sse_hart_mask/unmask()
PATCH 1/1 lib: sbi: sse: fix invalid errors returned for sse_hart_mask/unmask()
When called twice, sse_hart_mask()/sse_hart_unmask() should return SBI_EALREADY_STOPPED/SBI_EALREADY_STARTED. This was currently inverted.
--- lib/sbi/sbi_sse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/sbi/sbi_sse.c +2 -2
@@ -882,7 +882,7 @@ int sbi_sse_hart_mask(void)return SBI_EFAIL ;if (state->masked) -return SBI_EALREADY_STARTED ; +return SBI_EALREADY_STOPPED ; state->masked = true;
@@ -897,7 +897,7 @@ int sbi_sse_hart_unmask(void)return SBI_EFAIL ;if (!state->masked) -return SBI_EALREADY_STOPPED ; +return SBI_EALREADY_STARTED ; state->masked = false;
Signature · 1 line
2.47.2
PATCH 1/1 lib: sbi: sse: fix invalid errors returned for sse_hart_mask/unmask()
Quoted 9 lines · Cl?ment L?ger
When called twice, sse_hart_mask()/sse_hart_unmask() should return SBI_EALREADY_STOPPED/SBI_EALREADY_STARTED. This was currently inverted.
Fixes b919daf49582 ("lib: sbi: Add support to mask/unmask SSE events")Reported-by Andrew Jones <[email protected]>Signed-off-by Cl?ment L?ger <[email protected]>--- lib/sbi/sbi_sse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Anup Patel
AppliedPATCH 1/1 lib: sbi: sse: fix invalid errors returned for sse_hart_mask/unmask()
In reply to Clément LégerQuoted 7 lines · On Thu, Feb 13, 2025 at 3:01?PM Cl?ment L?ger <[email protected]> wrote:
When called twice, sse_hart_mask()/sse_hart_unmask() should return SBI_EALREADY_STOPPED/SBI_EALREADY_STARTED. This was currently inverted.
Fixes b919daf49582 ("lib: sbi: Add support to mask/unmask SSE events")Reported-by Andrew Jones <[email protected]>Signed-off-by Cl?ment L?ger <[email protected]>
LGTM.
Applied this patch to the riscv/opensbi repo.
Thanks,
Anup
Quoted 34 lines
--- lib/sbi/sbi_sse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)lib/sbi/sbi_sse.c +2
-3@@ -882,7 +882,7 @@ int sbi_sse_hart_mask(void)return SBI_EFAIL ;if (state->masked) -return SBI_EALREADY_STARTED ; +return SBI_EALREADY_STOPPED ; state->masked = true;@@ -897,7 +897,7 @@ int sbi_sse_hart_unmask(void)return SBI_EFAIL ;if (!state->masked) -return SBI_EALREADY_STOPPED ; +return SBI_EALREADY_STARTED ; state->masked = false; --2.47.2
--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi