File Index
Files and directories
Sign in
FILE

fpu.h

File preview with syntax highlighting.

linux-6.19.14/arch/arm64/include/asm/fpu.h C
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * Copyright (C) 2023 SiFive
 4 */
 5
 6#ifndef __ASM_FPU_H
 7#define __ASM_FPU_H
 8
 9#include <linux/preempt.h>
10#include <asm/neon.h>
11
12#define kernel_fpu_available()	cpu_has_neon()
13
14static inline void kernel_fpu_begin(void)
15{
16	BUG_ON(!in_task());
17	preempt_disable();
18	kernel_neon_begin(NULL);
19}
20
21static inline void kernel_fpu_end(void)
22{
23	kernel_neon_end(NULL);
24	preempt_enable();
25}
26
27#endif /* ! __ASM_FPU_H */
~/ Read-only file preview.