Commit c038b984 authored by Heiko Carstens's avatar Heiko Carstens

s390/fpu: change type of fpu mask from u32 to int

Change type of fpu mask consistently from u32 to int. This is a
prerequisite to make the kernel fpu usage preemptible. Upcoming code
uses __atomic* ops which work with int pointers.
Reviewed-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 87c5c700
......@@ -24,7 +24,7 @@ struct fpu {
/* In-kernel FPU state structure */
struct kernel_fpu {
u32 mask;
int mask;
u32 fpc;
union {
freg_t fprs[__NUM_FPRS];
......
......@@ -89,8 +89,8 @@ enum {
*
* Prefer using the kernel_fpu_begin()/kernel_fpu_end() pair of functions.
*/
void __kernel_fpu_begin(struct kernel_fpu *state, u32 flags);
void __kernel_fpu_end(struct kernel_fpu *state, u32 flags);
void __kernel_fpu_begin(struct kernel_fpu *state, int flags);
void __kernel_fpu_end(struct kernel_fpu *state, int flags);
static __always_inline void save_vx_regs(__vector128 *vxrs)
{
......@@ -144,7 +144,7 @@ static __always_inline void load_fp_regs(freg_t *fprs)
fpu_ld(15, &fprs[15]);
}
static inline void kernel_fpu_begin(struct kernel_fpu *state, u32 flags)
static inline void kernel_fpu_begin(struct kernel_fpu *state, int flags)
{
preempt_disable();
state->mask = S390_lowcore.fpu_flags;
......@@ -158,7 +158,7 @@ static inline void kernel_fpu_begin(struct kernel_fpu *state, u32 flags)
S390_lowcore.fpu_flags |= flags;
}
static inline void kernel_fpu_end(struct kernel_fpu *state, u32 flags)
static inline void kernel_fpu_end(struct kernel_fpu *state, int flags)
{
S390_lowcore.fpu_flags = state->mask;
if (state->mask & flags) {
......
......@@ -10,10 +10,10 @@
#include <linux/sched.h>
#include <asm/fpu.h>
void __kernel_fpu_begin(struct kernel_fpu *state, u32 flags)
void __kernel_fpu_begin(struct kernel_fpu *state, int flags)
{
__vector128 *vxrs = state->vxrs;
u32 mask;
int mask;
/*
* Limit the save to the FPU/vector registers already
......@@ -58,10 +58,10 @@ void __kernel_fpu_begin(struct kernel_fpu *state, u32 flags)
}
EXPORT_SYMBOL(__kernel_fpu_begin);
void __kernel_fpu_end(struct kernel_fpu *state, u32 flags)
void __kernel_fpu_end(struct kernel_fpu *state, int flags)
{
__vector128 *vxrs = state->vxrs;
u32 mask;
int mask;
/*
* Limit the restore to the FPU/vector registers of the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment