diff options
author | Heiko Carstens <hca@linux.ibm.com> | 2023-09-11 21:40:00 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2023-09-19 13:26:56 +0200 |
commit | 2372d391421350e318c98844d21ab9ad16e3eac0 (patch) | |
tree | ef23030da35c0b5a005c8ae3556306d26bd16724 /arch/s390/kernel | |
parent | dfa33ce1245a4b88402947fa0a847e179044d2fc (diff) |
s390/ctlreg: use local_ctl_load() and local_ctl_store() where possible
Convert all single control register usages of __local_ctl_load() and
__local_ctl_store() to local_ctl_load() and local_ctl_store().
This also requires to change the type of some struct lowcore members
from __u64 to unsigned long.
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/machine_kexec.c | 6 | ||||
-rw-r--r-- | arch/s390/kernel/nmi.c | 10 | ||||
-rw-r--r-- | arch/s390/kernel/ptrace.c | 8 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 12 |
4 files changed, 18 insertions, 18 deletions
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index 07152e74afb1..fe9d65060fa4 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c @@ -94,12 +94,12 @@ static noinline void __machine_kdump(void *image) if (MACHINE_HAS_VX) save_vx_regs((__vector128 *) mcesa->vector_save_area); if (MACHINE_HAS_GS) { - __local_ctl_store(cr2_old.val, 2, 2); + local_ctl_store(2, &cr2_old.val); cr2_new = cr2_old; cr2_new.gse = 1; - __local_ctl_load(cr2_new.val, 2, 2); + local_ctl_load(2, &cr2_new.val); save_gs_cb((struct gs_cb *) mcesa->guarded_storage_save_area); - __local_ctl_load(cr2_old.val, 2, 2); + local_ctl_load(2, &cr2_old.val); } /* * To create a good backchain for this CPU in the dump store_status diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c index 927bd83ac9c0..7880a42896a3 100644 --- a/arch/s390/kernel/nmi.c +++ b/arch/s390/kernel/nmi.c @@ -131,10 +131,10 @@ static notrace void s390_handle_damage(void) * Disable low address protection and make machine check new PSW a * disabled wait PSW. Any additional machine check cannot be handled. */ - __local_ctl_store(cr0.val, 0, 0); + local_ctl_store(0, &cr0.val); cr0_new = cr0; cr0_new.lap = 0; - __local_ctl_load(cr0_new.val, 0, 0); + local_ctl_load(0, &cr0_new.val); psw_save = S390_lowcore.mcck_new_psw; psw_bits(S390_lowcore.mcck_new_psw).io = 0; psw_bits(S390_lowcore.mcck_new_psw).ext = 0; @@ -146,7 +146,7 @@ static notrace void s390_handle_damage(void) * values. This makes possible system dump analysis easier. */ S390_lowcore.mcck_new_psw = psw_save; - __local_ctl_load(cr0.val, 0, 0); + local_ctl_load(0, &cr0.val); disabled_wait(); while (1); } @@ -271,7 +271,7 @@ static int notrace s390_validate_registers(union mci mci) kill_task = 1; cr0.val = S390_lowcore.cregs_save_area[0]; cr0.afp = cr0.vx = 1; - __local_ctl_load(cr0.val, 0, 0); + local_ctl_load(0, &cr0.val); asm volatile( " la 1,%0\n" " VLM 0,15,0,1\n" @@ -279,7 +279,7 @@ static int notrace s390_validate_registers(union mci mci) : : "Q" (*(struct vx_array *)mcesa->vector_save_area) : "1"); - __local_ctl_load(S390_lowcore.cregs_save_area[0], 0, 0); + local_ctl_load(0, &S390_lowcore.cregs_save_area[0]); } /* Validate access registers */ asm volatile( diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 1824c1208852..a1fb4536784f 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c @@ -46,8 +46,8 @@ void update_cr_regs(struct task_struct *task) union ctlreg2 cr2_old, cr2_new; int cr0_changed, cr2_changed; - __local_ctl_store(cr0_old.val, 0, 0); - __local_ctl_store(cr2_old.val, 2, 2); + local_ctl_store(0, &cr0_old.val); + local_ctl_store(2, &cr2_old.val); cr0_new = cr0_old; cr2_new = cr2_old; /* Take care of the enable/disable of transactional execution. */ @@ -75,9 +75,9 @@ void update_cr_regs(struct task_struct *task) cr0_changed = cr0_new.val != cr0_old.val; cr2_changed = cr2_new.val != cr2_old.val; if (cr0_changed) - __local_ctl_load(cr0_new.val, 0, 0); + local_ctl_load(0, &cr0_new.val); if (cr2_changed) - __local_ctl_load(cr2_new.val, 2, 2); + local_ctl_load(2, &cr2_new.val); /* Copy user specified PER registers */ new.control = thread->per_user.control; new.start = thread->per_user.start; diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index c516e2e909e6..48a456a10206 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -791,15 +791,15 @@ static void __init setup_cr(void) __ctl_duct[4] = (unsigned long)__ctl_duald; /* Update control registers CR2, CR5 and CR15 */ - __local_ctl_store(cr2.val, 2, 2); - __local_ctl_store(cr5.val, 5, 5); - __local_ctl_store(cr15.val, 15, 15); + local_ctl_store(2, &cr2.val); + local_ctl_store(5, &cr5.val); + local_ctl_store(15, &cr15.val); cr2.ducto = (unsigned long)__ctl_duct >> 6; cr5.pasteo = (unsigned long)__ctl_duct >> 6; cr15.lsea = (unsigned long)__ctl_linkage_stack >> 3; - __local_ctl_load(cr2.val, 2, 2); - __local_ctl_load(cr5.val, 5, 5); - __local_ctl_load(cr15.val, 15, 15); + local_ctl_load(2, &cr2.val); + local_ctl_load(5, &cr5.val); + local_ctl_load(15, &cr15.val); } /* |