drm/atomic-helper: document drm_atomic_helper_check() restrictions
[drm/drm-misc.git] / tools / testing / selftests / riscv / hwprobe / hwprobe.h
blobf3de970c32227bcfc6c9ce8608ba497724326b1c
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef SELFTEST_RISCV_HWPROBE_H
3 #define SELFTEST_RISCV_HWPROBE_H
4 #include <stddef.h>
5 #include <asm/hwprobe.h>
7 #if __BYTE_ORDER == __BIG_ENDIAN
8 # define le32_bswap(_x) \
9 ((((_x) & 0x000000ffU) << 24) | \
10 (((_x) & 0x0000ff00U) << 8) | \
11 (((_x) & 0x00ff0000U) >> 8) | \
12 (((_x) & 0xff000000U) >> 24))
13 #else
14 # define le32_bswap(_x) (_x)
15 #endif
18 * Rather than relying on having a new enough libc to define this, just do it
19 * ourselves. This way we don't need to be coupled to a new-enough libc to
20 * contain the call.
22 long riscv_hwprobe(struct riscv_hwprobe *pairs, size_t pair_count,
23 size_t cpusetsize, unsigned long *cpus, unsigned int flags);
25 #endif