ia64/xen-unstable

changeset 14070:ac28d6c41e6f

[IA64] Remove unused code

In vcpu_set_psr_l, psr is set but never read. This dead code is removed.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
author awilliam@xenbuild2.aw
date Wed Feb 28 09:43:09 2007 -0700 (2007-02-28)
parents dda691c7f25f
children 21d0d23a2cca
files xen/arch/ia64/xen/vcpu.c
line diff
     1.1 --- a/xen/arch/ia64/xen/vcpu.c	Wed Feb 28 09:40:36 2007 -0700
     1.2 +++ b/xen/arch/ia64/xen/vcpu.c	Wed Feb 28 09:43:09 2007 -0700
     1.3 @@ -383,12 +383,10 @@ IA64FAULT vcpu_set_psr_sm(VCPU * vcpu, u
     1.4  
     1.5  IA64FAULT vcpu_set_psr_l(VCPU * vcpu, u64 val)
     1.6  {
     1.7 -	struct ia64_psr psr, newpsr, *ipsr;
     1.8 +	struct ia64_psr newpsr, *ipsr;
     1.9  	REGS *regs = vcpu_regs(vcpu);
    1.10  	u64 enabling_interrupts = 0;
    1.11  
    1.12 -	// TODO: All of these bits need to be virtualized
    1.13 -	__asm__ __volatile("mov %0=psr;;":"=r"(psr)::"memory");
    1.14  	newpsr = *(struct ia64_psr *)&val;
    1.15  	ipsr = (struct ia64_psr *)&regs->cr_ipsr;
    1.16  	// just handle psr.up and psr.pp for now
    1.17 @@ -406,21 +404,15 @@ IA64FAULT vcpu_set_psr_l(VCPU * vcpu, u6
    1.18  		ipsr->dfl = 1;
    1.19  	if (newpsr.pp) {
    1.20  		ipsr->pp = 1;
    1.21 -		psr.pp = 1;
    1.22  		PSCB(vcpu, vpsr_pp) = 1;
    1.23  	} else {
    1.24  		ipsr->pp = 1;
    1.25 -		psr.pp = 1;
    1.26  		PSCB(vcpu, vpsr_pp) = 0;
    1.27  	}
    1.28 -	if (newpsr.up) {
    1.29 +	if (newpsr.up)
    1.30  		ipsr->up = 1;
    1.31 -		psr.up = 1;
    1.32 -	}
    1.33 -	if (newpsr.sp) {
    1.34 +	if (newpsr.sp)
    1.35  		ipsr->sp = 1;
    1.36 -		psr.sp = 1;
    1.37 -	}
    1.38  	if (newpsr.i) {
    1.39  		if (vcpu->vcpu_info->evtchn_upcall_mask)
    1.40  			enabling_interrupts = 1;
    1.41 @@ -428,22 +420,14 @@ IA64FAULT vcpu_set_psr_l(VCPU * vcpu, u6
    1.42  	}
    1.43  	if (newpsr.ic)
    1.44  		PSCB(vcpu, interrupt_collection_enabled) = 1;
    1.45 -	if (newpsr.mfl) {
    1.46 +	if (newpsr.mfl)
    1.47  		ipsr->mfl = 1;
    1.48 -		psr.mfl = 1;
    1.49 -	}
    1.50 -	if (newpsr.mfh) {
    1.51 +	if (newpsr.mfh)
    1.52  		ipsr->mfh = 1;
    1.53 -		psr.mfh = 1;
    1.54 -	}
    1.55 -	if (newpsr.ac) {
    1.56 +	if (newpsr.ac)
    1.57  		ipsr->ac = 1;
    1.58 -		psr.ac = 1;
    1.59 -	}
    1.60 -	if (newpsr.up) {
    1.61 +	if (newpsr.up)
    1.62  		ipsr->up = 1;
    1.63 -		psr.up = 1;
    1.64 -	}
    1.65  	if (newpsr.dt && newpsr.rt)
    1.66  		vcpu_set_metaphysical_mode(vcpu, FALSE);
    1.67  	else