Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc65450c authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

s390/ctl_reg: move control register definitions to ctl_reg.h



The nmi.h header has some constant defines for control register bits.
These definitions should really be located in ctl_reg.h. Move and
rename the defines.

Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent ad3bc0ac
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,16 @@
#ifndef __ASM_CTL_REG_H
#ifndef __ASM_CTL_REG_H
#define __ASM_CTL_REG_H
#define __ASM_CTL_REG_H


#include <linux/const.h>

#define CR14_CHANNEL_REPORT_SUBMASK	_BITUL(63 - 35)
#define CR14_RECOVERY_SUBMASK		_BITUL(63 - 36)
#define CR14_DEGRADATION_SUBMASK	_BITUL(63 - 37)
#define CR14_EXTERNAL_DAMAGE_SUBMASK	_BITUL(63 - 38)
#define CR14_WARNING_SUBMASK		_BITUL(63 - 39)

#ifndef __ASSEMBLY__

#include <linux/bug.h>
#include <linux/bug.h>


#define __ctl_load(array, low, high) do {				\
#define __ctl_load(array, low, high) do {				\
@@ -95,4 +105,5 @@ union ctlreg2 {
# define ctl_clear_bit(cr, bit) __ctl_clear_bit(cr, bit)
# define ctl_clear_bit(cr, bit) __ctl_clear_bit(cr, bit)
#endif
#endif


#endif /* __ASSEMBLY__ */
#endif /* __ASM_CTL_REG_H */
#endif /* __ASM_CTL_REG_H */
+0 −6
Original line number Original line Diff line number Diff line
@@ -26,12 +26,6 @@
#define MCCK_CODE_PSW_MWP_VALID		_BITUL(63 - 20)
#define MCCK_CODE_PSW_MWP_VALID		_BITUL(63 - 20)
#define MCCK_CODE_PSW_IA_VALID		_BITUL(63 - 23)
#define MCCK_CODE_PSW_IA_VALID		_BITUL(63 - 23)


#define MCCK_CR14_CR_PENDING_SUB_MASK	(1 << 28)
#define MCCK_CR14_RECOVERY_SUB_MASK	(1 << 27)
#define MCCK_CR14_DEGRAD_SUB_MASK	(1 << 26)
#define MCCK_CR14_EXT_DAMAGE_SUB_MASK	(1 << 25)
#define MCCK_CR14_WARN_SUB_MASK		(1 << 24)

#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__


union mci {
union mci {
+3 −3
Original line number Original line Diff line number Diff line
@@ -2483,11 +2483,11 @@ void kvm_s390_reinject_machine_check(struct kvm_vcpu *vcpu,


	mci.val = mcck_info->mcic;
	mci.val = mcck_info->mcic;
	if (mci.sr)
	if (mci.sr)
		cr14 |= MCCK_CR14_RECOVERY_SUB_MASK;
		cr14 |= CR14_RECOVERY_SUBMASK;
	if (mci.dg)
	if (mci.dg)
		cr14 |= MCCK_CR14_DEGRAD_SUB_MASK;
		cr14 |= CR14_DEGRADATION_SUBMASK;
	if (mci.w)
	if (mci.w)
		cr14 |= MCCK_CR14_WARN_SUB_MASK;
		cr14 |= CR14_WARNING_SUBMASK;


	mchk = mci.ck ? &inti.mchk : &irq.u.mchk;
	mchk = mci.ck ? &inti.mchk : &irq.u.mchk;
	mchk->cr14 = cr14;
	mchk->cr14 = cr14;