xref: /openbmc/linux/arch/riscv/include/asm/hwprobe.h (revision 81e25896)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /*
3  * Copyright 2023 Rivos, Inc
4  */
5 
6 #ifndef _ASM_HWPROBE_H
7 #define _ASM_HWPROBE_H
8 
9 #include <uapi/asm/hwprobe.h>
10 
11 #define RISCV_HWPROBE_MAX_KEY 5
12 
riscv_hwprobe_key_is_valid(__s64 key)13 static inline bool riscv_hwprobe_key_is_valid(__s64 key)
14 {
15 	return key >= 0 && key <= RISCV_HWPROBE_MAX_KEY;
16 }
17 
18 #endif
19