From: mason.huo Date: Wed, 22 Jun 2022 05:11:59 +0000 (+0800) Subject: riscv: Add the make function for SBI version X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=071fe3c10041657d4b201218824b0cd41b244cae;p=platform%2Fkernel%2Flinux-starfive.git riscv: Add the make function for SBI version After cherry pick the riscv cpuidle driver, there is a compilation error due to lack of sbi_mk_version(); add it manually. Signed-off-by: mason.huo --- diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index aca43fc..f59c9b0 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -164,6 +164,14 @@ static inline unsigned long sbi_minor_version(void) return sbi_spec_version & SBI_SPEC_VERSION_MINOR_MASK; } +/* Make SBI version */ +static inline unsigned long sbi_mk_version(unsigned long major, + unsigned long minor) +{ + return ((major & SBI_SPEC_VERSION_MAJOR_MASK) << + SBI_SPEC_VERSION_MAJOR_SHIFT) | minor; +} + int sbi_err_map_linux_errno(int err); #else /* CONFIG_RISCV_SBI */ static inline int sbi_remote_fence_i(const unsigned long *hart_mask) { return -1; }