sys_hwprobe.c (d1703dc7bc8ec7adb91f5ceaf1556ff1ed212858) sys_hwprobe.c (e7c9d66e313bc0f7cb185c4972c3c9383a0da70f)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * The hwprobe interface, for allowing userspace to probe to see which features
4 * are supported by the hardware. See Documentation/arch/riscv/hwprobe.rst for
5 * more details.
6 */
7#include <linux/syscalls.h>
8#include <asm/cacheflush.h>

--- 214 unchanged lines hidden (view full) ---

223 if (perf == -1ULL)
224 return RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN;
225
226 return perf;
227}
228#else
229static u64 hwprobe_vec_misaligned(const struct cpumask *cpus)
230{
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * The hwprobe interface, for allowing userspace to probe to see which features
4 * are supported by the hardware. See Documentation/arch/riscv/hwprobe.rst for
5 * more details.
6 */
7#include <linux/syscalls.h>
8#include <asm/cacheflush.h>

--- 214 unchanged lines hidden (view full) ---

223 if (perf == -1ULL)
224 return RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN;
225
226 return perf;
227}
228#else
229static u64 hwprobe_vec_misaligned(const struct cpumask *cpus)
230{
231 if (IS_ENABLED(CONFIG_RISCV_EFFICIENT_VECTOR_UNALIGNED_ACCESS))
232 return RISCV_HWPROBE_MISALIGNED_VECTOR_FAST;
233
234 if (IS_ENABLED(CONFIG_RISCV_SLOW_VECTOR_UNALIGNED_ACCESS))
235 return RISCV_HWPROBE_MISALIGNED_VECTOR_SLOW;
236
231 return RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN;
232}
233#endif
234
235static void hwprobe_one_pair(struct riscv_hwprobe *pair,
236 const struct cpumask *cpus)
237{
238 switch (pair->key) {

--- 247 unchanged lines hidden ---
237 return RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN;
238}
239#endif
240
241static void hwprobe_one_pair(struct riscv_hwprobe *pair,
242 const struct cpumask *cpus)
243{
244 switch (pair->key) {

--- 247 unchanged lines hidden ---