cregit-Linux how code gets into the kernel

Release 4.14 arch/s390/include/asm/fpu/internal.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * FPU state and register content conversion primitives
 *
 * Copyright IBM Corp. 2015
 * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
 */

#ifndef _ASM_S390_FPU_INTERNAL_H

#define _ASM_S390_FPU_INTERNAL_H

#include <linux/string.h>
#include <asm/ctl_reg.h>
#include <asm/fpu/types.h>


static inline void save_vx_regs(__vector128 *vxrs) { asm volatile( " la 1,%0\n" " .word 0xe70f,0x1000,0x003e\n" /* vstm 0,15,0(1) */ " .word 0xe70f,0x1100,0x0c3e\n" /* vstm 16,31,256(1) */ : "=Q" (*(struct vx_array *) vxrs) : : "1"); }

Contributors

PersonTokensPropCommitsCommitProp
Hendrik Brueckner1794.44%266.67%
Martin Schwidefsky15.56%133.33%
Total18100.00%3100.00%


static inline void convert_vx_to_fp(freg_t *fprs, __vector128 *vxrs) { int i; for (i = 0; i < __NUM_FPRS; i++) fprs[i] = *(freg_t *)(vxrs + i); }

Contributors

PersonTokensPropCommitsCommitProp
Hendrik Brueckner47100.00%1100.00%
Total47100.00%1100.00%


static inline void convert_fp_to_vx(__vector128 *vxrs, freg_t *fprs) { int i; for (i = 0; i < __NUM_FPRS; i++) *(freg_t *)(vxrs + i) = fprs[i]; }

Contributors

PersonTokensPropCommitsCommitProp
Hendrik Brueckner47100.00%1100.00%
Total47100.00%1100.00%


static inline void fpregs_store(_s390_fp_regs *fpregs, struct fpu *fpu) { fpregs->pad = 0; fpregs->fpc = fpu->fpc; if (MACHINE_HAS_VX) convert_vx_to_fp((freg_t *)&fpregs->fprs, fpu->vxrs); else memcpy((freg_t *)&fpregs->fprs, fpu->fprs, sizeof(fpregs->fprs)); }

Contributors

PersonTokensPropCommitsCommitProp
Hendrik Brueckner6689.19%266.67%
Martin Schwidefsky810.81%133.33%
Total74100.00%3100.00%


static inline void fpregs_load(_s390_fp_regs *fpregs, struct fpu *fpu) { fpu->fpc = fpregs->fpc; if (MACHINE_HAS_VX) convert_fp_to_vx(fpu->vxrs, (freg_t *)&fpregs->fprs); else memcpy(fpu->fprs, (freg_t *)&fpregs->fprs, sizeof(fpregs->fprs)); }

Contributors

PersonTokensPropCommitsCommitProp
Hendrik Brueckner6088.24%266.67%
Martin Schwidefsky811.76%133.33%
Total68100.00%3100.00%

#endif /* _ASM_S390_FPU_INTERNAL_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Hendrik Brueckner25693.43%457.14%
Martin Schwidefsky176.20%228.57%
Greg Kroah-Hartman10.36%114.29%
Total274100.00%7100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.