summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-02-03 13:45:11 +0300
committerHeiko Carstens <hca@linux.ibm.com>2024-02-16 16:30:15 +0300
commitc038b984a9af1010555986d6fe32d4da9db9fc3d (patch)
tree65603533bddc541324db31fe8cffab1734e92d06 /arch
parent87c5c70036813d26e6e7e4393747a4fdc63cf193 (diff)
downloadlinux-c038b984a9af1010555986d6fe32d4da9db9fc3d.tar.xz
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: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/include/asm/fpu-types.h2
-rw-r--r--arch/s390/include/asm/fpu.h8
-rw-r--r--arch/s390/kernel/fpu.c8
3 files changed, 9 insertions, 9 deletions
diff --git a/arch/s390/include/asm/fpu-types.h b/arch/s390/include/asm/fpu-types.h
index 743858dbc7fb..fee4468a85d3 100644
--- a/arch/s390/include/asm/fpu-types.h
+++ b/arch/s390/include/asm/fpu-types.h
@@ -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];
diff --git a/arch/s390/include/asm/fpu.h b/arch/s390/include/asm/fpu.h
index 5d3533569925..447d68fb41b2 100644
--- a/arch/s390/include/asm/fpu.h
+++ b/arch/s390/include/asm/fpu.h
@@ -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) {
diff --git a/arch/s390/kernel/fpu.c b/arch/s390/kernel/fpu.c
index 62c9b2809057..b976da5bf71b 100644
--- a/arch/s390/kernel/fpu.c
+++ b/arch/s390/kernel/fpu.c
@@ -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