linux/arch/riscv/kernel
Andrew Jones ccfe866220 RISC-V: Align SBI probe implementation with spec
commit 41cad8284d 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: b9dcd9e415 ("RISC-V: Add basic support for SBI v0.2")
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Conor 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: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-11 23:03:04 +09:00
..
compat_vdso RISC-V: Stop emitting attributes 2023-03-17 08:50:14 +01:00
probes riscv: kprobe: Fixup misaligned load text 2023-02-14 19:11:53 +01:00
vdso riscv: vdso: fix section overlapping under some conditions 2022-11-29 18:45:53 -08:00
.gitignore
alternative.c riscv: make patch-function pointer more generic in cpu_manufacturer_info struct 2022-06-16 15:47:40 -07:00
asm-offsets.c
cacheinfo.c
compat_signal.c
compat_syscall_table.c
cpu_ops_sbi.c riscv: cpu_ops_sbi: Add 64bit hartid support on RV64 2022-07-19 16:38:58 -07:00
cpu_ops_spinwait.c RISC-V: cpu_ops_spinwait.c should include head.h 2022-08-11 13:24:16 -07:00
cpu_ops.c RISC-V: Align SBI probe implementation with spec 2023-05-11 23:03:04 +09:00
cpu-hotplug.c
cpu.c RISC-V: Fix /proc/cpuinfo cpumask warning 2022-10-27 15:23:19 -07:00
cpufeature.c RISC-V Patches for the 6.1 Merge Window, Part 2 2022-10-14 11:21:11 -07:00
crash_dump.c
crash_save_regs.S RISC-V: Fixup get incorrect user mode PC for kernel mode regs 2022-08-11 08:54:40 -07:00
efi-header.S
efi.c
elf_kexec.c RISC-V: kexec: Fix memory leak of elf header buffer 2023-01-07 11:11:53 +01:00
entry.S RISC-V: Fix unannoted hardirqs-on in return to userspace slow-path 2022-12-31 13:32:37 +01:00
fpu.S
ftrace.c RISC-V: Don't check text_mutex during stop_machine 2023-03-17 08:50:29 +01:00
head.h
head.S riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT 2023-02-01 08:34:39 +01:00
image-vars.h efi/libstub: use EFI provided memcpy/memset routines 2022-09-17 15:13:21 +02:00
irq.c
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kexec_relocate.S
kgdb.c
machine_kexec_file.c
machine_kexec.c riscv: kexec: Fixup crash_smp_send_stop without multi cores 2022-11-29 21:50:59 -08:00
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
mcount-dyn.S riscv: ftrace: Reduce the detour code size to half 2023-03-10 09:34:30 +01:00
mcount.S
module-sections.c
module.c
patch.c RISC-V: Don't check text_mutex during stop_machine 2023-03-17 08:50:29 +01:00
perf_callchain.c
perf_regs.c
process.c riscv: process: fix kernel info leakage 2022-11-10 13:43:15 -08:00
ptrace.c
reset.c
riscv_ksyms.c
sbi.c RISC-V: Align SBI probe implementation with spec 2023-05-11 23:03:04 +09:00
setup.c riscv: Do not set initial_boot_params to the linear address of the dtb 2023-05-01 08:26:28 +09:00
signal.c riscv: add icache flush for nommu sigreturn trampoline 2023-04-20 12:35:12 +02:00
smp.c riscv: kexec: Fixup crash_smp_send_stop without multi cores 2022-11-29 21:50:59 -08:00
smpboot.c riscv: Move call to init_cpu_topology() to later initialization stage 2023-02-01 08:34:48 +01:00
soc.c
stacktrace.c riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode 2023-03-17 08:50:29 +01:00
suspend_entry.S
suspend.c
sys_riscv.c riscv: Allow PROT_WRITE-only mmap() 2022-09-22 09:44:59 -07:00
syscall_table.c
time.c RISC-V: time: initialize hrtimer based broadcast clock event device 2023-03-10 09:33:03 +01:00
trace_irq.c
trace_irq.h
traps_misaligned.c riscv: traps_misaligned: do not duplicate stringify 2022-08-11 08:56:53 -07:00
traps.c riscv: Avoid enabling interrupts in die() 2023-03-10 09:34:29 +01:00
vdso.c RISC-V Patches for the 6.1 Merge Window, Part 2 2022-10-14 11:21:11 -07:00
vmlinux-xip.lds.S
vmlinux.lds.S