diff options
author | Bin Meng <bin.meng@windriver.com> | 2020-05-27 02:04:53 -0700 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2020-06-04 09:44:21 +0800 |
commit | 0a94007e829876c7ebd49daebfaa90eea25801b8 (patch) | |
tree | 716d43d2ac9e49388edba5917b983228de05f3f4 /arch/riscv/lib | |
parent | fe9435571612066cc897e8c80921cba01c068c64 (diff) | |
download | u-boot-0a94007e829876c7ebd49daebfaa90eea25801b8.tar.gz u-boot-0a94007e829876c7ebd49daebfaa90eea25801b8.tar.xz u-boot-0a94007e829876c7ebd49daebfaa90eea25801b8.zip |
riscv: sbi: Move sbi_probe_extension() out of CONFIG_SBI_V01
sbi_probe_extension() is an API defined in SBI v0.2, not v0.1.
Fixes 7e249bc13aaf: ("riscv: Move all SMP related SBI calls to SBI_v01")
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'arch/riscv/lib')
-rw-r--r-- | arch/riscv/lib/sbi.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/arch/riscv/lib/sbi.c b/arch/riscv/lib/sbi.c index f298846e63..8fbc23839d 100644 --- a/arch/riscv/lib/sbi.c +++ b/arch/riscv/lib/sbi.c @@ -53,6 +53,25 @@ void sbi_set_timer(uint64_t stime_value) #endif } +/** + * sbi_probe_extension() - Check if an SBI extension ID is supported or not. + * @extid: The extension ID to be probed. + * + * Return: Extension specific nonzero value f yes, -ENOTSUPP otherwise. + */ +int sbi_probe_extension(int extid) +{ + struct sbiret ret; + + ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_PROBE_EXT, extid, + 0, 0, 0, 0, 0); + if (!ret.error) + if (ret.value) + return ret.value; + + return -ENOTSUPP; +} + #ifdef CONFIG_SBI_V01 /** @@ -162,22 +181,4 @@ void sbi_remote_sfence_vma_asid(const unsigned long *hart_mask, (unsigned long)hart_mask, start, size, asid, 0, 0); } -/** - * sbi_probe_extension() - Check if an SBI extension ID is supported or not. - * @extid: The extension ID to be probed. - * - * Return: Extension specific nonzero value f yes, -ENOTSUPP otherwise. - */ -int sbi_probe_extension(int extid) -{ - struct sbiret ret; - - ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_PROBE_EXT, extid, - 0, 0, 0, 0, 0); - if (!ret.error) - if (ret.value) - return ret.value; - - return -ENOTSUPP; -} #endif /* CONFIG_SBI_V01 */ |