brintos

brintos / linux-shallow public Read only

0
0
Text · 724 B · f3de970 Raw
26 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2#ifndef SELFTEST_RISCV_HWPROBE_H3#define SELFTEST_RISCV_HWPROBE_H4#include <stddef.h>5#include <asm/hwprobe.h>6 7#if __BYTE_ORDER == __BIG_ENDIAN8# define le32_bswap(_x)				\9	((((_x) & 0x000000ffU) << 24) |		\10	 (((_x) & 0x0000ff00U) <<  8) |		\11	 (((_x) & 0x00ff0000U) >>  8) |		\12	 (((_x) & 0xff000000U) >> 24))13#else14# define le32_bswap(_x) (_x)15#endif16 17/*18 * Rather than relying on having a new enough libc to define this, just do it19 * ourselves.  This way we don't need to be coupled to a new-enough libc to20 * contain the call.21 */22long riscv_hwprobe(struct riscv_hwprobe *pairs, size_t pair_count,23		   size_t cpusetsize, unsigned long *cpus, unsigned int flags);24 25#endif26