1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2020 SiFive
6 #ifndef __ASM_RISCV_VECTOR_H
7 #define __ASM_RISCV_VECTOR_H
9 #include <linux/types.h>
11 #ifdef CONFIG_RISCV_ISA_V
13 #include <asm/hwcap.h>
15 static __always_inline bool has_vector(void)
17 return riscv_has_extension_unlikely(RISCV_ISA_EXT_v);
20 #else /* ! CONFIG_RISCV_ISA_V */
22 static __always_inline bool has_vector(void) { return false; }
24 #endif /* CONFIG_RISCV_ISA_V */
26 #endif /* ! __ASM_RISCV_VECTOR_H */