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/include/asm | |
parent | s390/ctlreg: add local_ctl_load() and local_ctl_store() (diff) | |
download | linux-2372d391421350e318c98844d21ab9ad16e3eac0.tar.xz linux-2372d391421350e318c98844d21ab9ad16e3eac0.zip |
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/include/asm')
-rw-r--r-- | arch/s390/include/asm/ctlreg.h | 8 | ||||
-rw-r--r-- | arch/s390/include/asm/lowcore.h | 6 | ||||
-rw-r--r-- | arch/s390/include/asm/mmu_context.h | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/arch/s390/include/asm/ctlreg.h b/arch/s390/include/asm/ctlreg.h index e8e5aef08bfd..86887b490bb5 100644 --- a/arch/s390/include/asm/ctlreg.h +++ b/arch/s390/include/asm/ctlreg.h @@ -90,18 +90,18 @@ static __always_inline void local_ctl_set_bit(unsigned int cr, unsigned int bit) { unsigned long reg; - __local_ctl_store(reg, cr, cr); + local_ctl_store(cr, ®); reg |= 1UL << bit; - __local_ctl_load(reg, cr, cr); + local_ctl_load(cr, ®); } static __always_inline void local_ctl_clear_bit(unsigned int cr, unsigned int bit) { unsigned long reg; - __local_ctl_store(reg, cr, cr); + local_ctl_store(cr, ®); reg &= ~(1UL << bit); - __local_ctl_load(reg, cr, cr); + local_ctl_load(cr, ®); } void system_ctlreg_lock(void); diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index 69ccc464a430..2174f00e188b 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h @@ -139,8 +139,8 @@ struct lowcore { __u32 restart_flags; /* 0x0384 */ /* Address space pointer. */ - __u64 kernel_asce; /* 0x0388 */ - __u64 user_asce; /* 0x0390 */ + unsigned long kernel_asce; /* 0x0388 */ + unsigned long user_asce; /* 0x0390 */ /* * The lpp and current_pid fields form a @@ -199,7 +199,7 @@ struct lowcore { __u32 clock_comp_save_area[2]; /* 0x1330 */ __u64 last_break_save_area; /* 0x1338 */ __u32 access_regs_save_area[16]; /* 0x1340 */ - __u64 cregs_save_area[16]; /* 0x1380 */ + unsigned long cregs_save_area[16]; /* 0x1380 */ __u8 pad_0x1400[0x1500-0x1400]; /* 0x1400 */ /* Cryptography-counter designation */ __u64 ccd; /* 0x1500 */ diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index a72865fce0ad..0e93275f80f0 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h @@ -81,7 +81,7 @@ static inline void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct * S390_lowcore.user_asce = next->context.asce; cpumask_set_cpu(cpu, &next->context.cpu_attach_mask); /* Clear previous user-ASCE from CR7 */ - __local_ctl_load(s390_invalid_asce, 7, 7); + local_ctl_load(7, &s390_invalid_asce); if (prev != next) cpumask_clear_cpu(cpu, &prev->context.cpu_attach_mask); } @@ -111,7 +111,7 @@ static inline void finish_arch_post_lock_switch(void) __tlb_flush_mm_lazy(mm); preempt_enable(); } - __local_ctl_load(S390_lowcore.user_asce, 7, 7); + local_ctl_load(7, &S390_lowcore.user_asce); } #define activate_mm activate_mm @@ -120,7 +120,7 @@ static inline void activate_mm(struct mm_struct *prev, { switch_mm(prev, next, current); cpumask_set_cpu(smp_processor_id(), mm_cpumask(next)); - __local_ctl_load(S390_lowcore.user_asce, 7, 7); + local_ctl_load(7, &S390_lowcore.user_asce); } #include <asm-generic/mmu_context.h> |