Skip to content
Snippets Groups Projects
Commit ccfe8662 authored by Andrew Jones's avatar Andrew Jones Committed by Greg Kroah-Hartman
Browse files

RISC-V: Align SBI probe implementation with spec


commit 41cad828 upstream.

sbi_probe_extension() is specified with "Returns 0 if the given SBI
extension ID (EID) is not available, or 1 if it is available unless
defined as any other non-zero value by the implementation."
Additionally, sbiret.value is a long. Fix the implementation to
ensure any nonzero long value is considered a success, rather
than only positive int values.

Fixes: b9dcd9e4 ("RISC-V: Add basic support for SBI v0.2")
Signed-off-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230427163626.101042-1-ajones@ventanamicro.com


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f8076d2a
No related branches found
No related tags found
1 merge request!82🤖 Sync Bot: Update v6.1-ktn to Latest Stable Kernel (v6.1.29)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment