ia64/xen-unstable

changeset 15149:c0afc89cda75

[IA64] Consolidate non-virtualized PSR bits into macro

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author Alex Williamson <alex.williamson@hp.com>
date Thu May 31 11:18:50 2007 -0600 (2007-05-31)
parents 409f9849fa68
children b1b80a14d023
files xen/arch/ia64/xen/vcpu.c
line diff
     1.1 --- a/xen/arch/ia64/xen/vcpu.c	Thu May 31 11:05:33 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/vcpu.c	Thu May 31 11:18:50 2007 -0600
     1.3 @@ -52,6 +52,14 @@ typedef union {
     1.4  #define	IA64_PTA_LFMT		(1UL << IA64_PTA_VF_BIT)
     1.5  #define	IA64_PTA_SZ(x)		(x##UL << IA64_PTA_SZ_BIT)
     1.6  
     1.7 +#define IA64_PSR_NON_VIRT_BITS				\
     1.8 +	(IA64_PSR_BE | IA64_PSR_UP | IA64_PSR_AC |	\
     1.9 +	 IA64_PSR_MFL| IA64_PSR_MFH| IA64_PSR_PK |	\
    1.10 +	 IA64_PSR_DFL| IA64_PSR_SP | IA64_PSR_DB |	\
    1.11 +	 IA64_PSR_LP | IA64_PSR_TB | IA64_PSR_ID |	\
    1.12 +	 IA64_PSR_DA | IA64_PSR_DD | IA64_PSR_SS |	\
    1.13 +	 IA64_PSR_RI | IA64_PSR_ED | IA64_PSR_IA)
    1.14 +
    1.15  unsigned long vcpu_verbose = 0;
    1.16  
    1.17  /**************************************************************************
    1.18 @@ -455,12 +463,7 @@ IA64FAULT vcpu_set_psr(VCPU * vcpu, u64 
    1.19  	u64 enabling_interrupts = 0;
    1.20  
    1.21  	/* Copy non-virtualized bits.  */
    1.22 -	newpsr.val = val & (IA64_PSR_BE | IA64_PSR_UP | IA64_PSR_AC |
    1.23 -			    IA64_PSR_MFL| IA64_PSR_MFH| IA64_PSR_PK |
    1.24 -			    IA64_PSR_DFL| IA64_PSR_SP | IA64_PSR_DB |
    1.25 -			    IA64_PSR_LP | IA64_PSR_TB | IA64_PSR_ID |
    1.26 -			    IA64_PSR_DA | IA64_PSR_DD | IA64_PSR_SS |
    1.27 -			    IA64_PSR_RI | IA64_PSR_ED | IA64_PSR_IA);
    1.28 +	newpsr.val = val & IA64_PSR_NON_VIRT_BITS;
    1.29  
    1.30  	/* Bits forced to 1 (psr.si, psr.is and psr.mc are forced to 0)  */
    1.31  	newpsr.val |= IA64_PSR_DI;
    1.32 @@ -518,12 +521,7 @@ u64 vcpu_get_psr(VCPU * vcpu)
    1.33  	ipsr.i64 = regs->cr_ipsr;
    1.34  
    1.35  	/* Copy non-virtualized bits.  */
    1.36 -	newpsr.i64 = ipsr.i64 & (IA64_PSR_BE | IA64_PSR_UP | IA64_PSR_AC |
    1.37 -				 IA64_PSR_MFL| IA64_PSR_MFH| IA64_PSR_PK |
    1.38 -				 IA64_PSR_DFL| IA64_PSR_SP | IA64_PSR_DB |
    1.39 -				 IA64_PSR_LP | IA64_PSR_TB | IA64_PSR_ID |
    1.40 -				 IA64_PSR_DA | IA64_PSR_DD | IA64_PSR_SS |
    1.41 -				 IA64_PSR_RI | IA64_PSR_ED | IA64_PSR_IA);
    1.42 +	newpsr.i64 = ipsr.i64 & IA64_PSR_NON_VIRT_BITS;
    1.43  
    1.44  	/* Bits forced to 1 (psr.si and psr.is are forced to 0)  */
    1.45  	newpsr.i64 |= IA64_PSR_DI;