diff options
author | Alexander Gordeev <agordeev@linux.ibm.com> | 2022-03-17 15:03:02 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2022-03-27 22:18:39 +0200 |
commit | 9097fc793f74ef9c677f8c4aed0c24f6f07f0133 (patch) | |
tree | 99665808ffa32d536492c332e87cfa92e1249bdc /arch/s390/include/asm | |
parent | dc2ab23b992c9d5dab93b9bf01b10b10465e537e (diff) | |
download | linux-9097fc793f74ef9c677f8c4aed0c24f6f07f0133.tar.gz linux-9097fc793f74ef9c677f8c4aed0c24f6f07f0133.tar.bz2 linux-9097fc793f74ef9c677f8c4aed0c24f6f07f0133.zip |
s390/smp: cleanup control register update routines
Get rid of duplicate code and redundant data.
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@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/ctl_reg.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/s390/include/asm/ctl_reg.h b/arch/s390/include/asm/ctl_reg.h index c800199a376b..82388da3f95f 100644 --- a/arch/s390/include/asm/ctl_reg.h +++ b/arch/s390/include/asm/ctl_reg.h @@ -74,8 +74,17 @@ static __always_inline void __ctl_clear_bit(unsigned int cr, unsigned int bit) __ctl_load(reg, cr, cr); } -void smp_ctl_set_bit(int cr, int bit); -void smp_ctl_clear_bit(int cr, int bit); +void smp_ctl_set_clear_bit(int cr, int bit, bool set); + +static inline void ctl_set_bit(int cr, int bit) +{ + smp_ctl_set_clear_bit(cr, bit, true); +} + +static inline void ctl_clear_bit(int cr, int bit) +{ + smp_ctl_set_clear_bit(cr, bit, false); +} union ctlreg0 { unsigned long val; @@ -130,8 +139,5 @@ union ctlreg15 { }; }; -#define ctl_set_bit(cr, bit) smp_ctl_set_bit(cr, bit) -#define ctl_clear_bit(cr, bit) smp_ctl_clear_bit(cr, bit) - #endif /* __ASSEMBLY__ */ #endif /* __ASM_CTL_REG_H */ |