Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
58 lines
1.1 KiB
C
58 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2020 Synopsys, Inc. (www.synopsys.com)
|
|
*
|
|
*/
|
|
|
|
#ifndef _ASM_ARC_FPU_H
|
|
#define _ASM_ARC_FPU_H
|
|
|
|
#ifdef CONFIG_ARC_FPU_SAVE_RESTORE
|
|
|
|
#include <asm/ptrace.h>
|
|
|
|
#ifdef CONFIG_ISA_ARCOMPACT
|
|
|
|
/* These DPFP regs need to be saved/restored across ctx-sw */
|
|
struct arc_fpu {
|
|
struct {
|
|
unsigned int l, h;
|
|
} aux_dpfp[2];
|
|
};
|
|
|
|
#define fpu_init_task(regs)
|
|
|
|
#else
|
|
|
|
/*
|
|
* ARCv2 FPU Control aux register
|
|
* - bits to enable Traps on Exceptions
|
|
* - Rounding mode
|
|
*
|
|
* ARCv2 FPU Status aux register
|
|
* - FPU exceptions flags (Inv, Div-by-Zero, overflow, underflow, inexact)
|
|
* - Flag Write Enable to clear flags explicitly (vs. by fpu instructions
|
|
* only
|
|
*/
|
|
|
|
struct arc_fpu {
|
|
unsigned int ctrl, status;
|
|
};
|
|
|
|
extern void fpu_init_task(struct pt_regs *regs);
|
|
|
|
#endif /* !CONFIG_ISA_ARCOMPACT */
|
|
|
|
struct task_struct;
|
|
|
|
extern void fpu_save_restore(struct task_struct *p, struct task_struct *n);
|
|
|
|
#else /* !CONFIG_ARC_FPU_SAVE_RESTORE */
|
|
|
|
#define fpu_save_restore(p, n)
|
|
#define fpu_init_task(regs)
|
|
|
|
#endif /* CONFIG_ARC_FPU_SAVE_RESTORE */
|
|
|
|
#endif /* _ASM_ARC_FPU_H */
|