Hi,

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

I still do not understand why psr is read/set in vcpu_reset_psr_sm and
vcpu_set_psr_sm.  I think this is useless because psr is set at rfi from
cr_ipsr.  Furthermore this is not done in vcpu_set_psr_l.

Simply cross-compiled.

Tristan.
# HG changeset patch
# User Tristan Gingold <[EMAIL PROTECTED]>
# Date 1172444320 -3600
# Node ID 33506da1649930bfb8e0de67b41f3cc0d2b4041f
# Parent  daed7655377ffc6deb3c93122743e4d8d0e2c1d1
Remove unused code.

Signed-off-by: Tristan Gingold <[EMAIL PROTECTED]>

diff -r daed7655377f -r 33506da16499 xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Sat Feb 24 22:02:39 2007 +0100
+++ b/xen/arch/ia64/xen/vcpu.c  Sun Feb 25 23:58:40 2007 +0100
@@ -383,12 +383,10 @@ IA64FAULT vcpu_set_psr_sm(VCPU * vcpu, u
 
 IA64FAULT vcpu_set_psr_l(VCPU * vcpu, u64 val)
 {
-       struct ia64_psr psr, newpsr, *ipsr;
+       struct ia64_psr newpsr, *ipsr;
        REGS *regs = vcpu_regs(vcpu);
        u64 enabling_interrupts = 0;
 
-       // TODO: All of these bits need to be virtualized
-       __asm__ __volatile("mov %0=psr;;":"=r"(psr)::"memory");
        newpsr = *(struct ia64_psr *)&val;
        ipsr = (struct ia64_psr *)&regs->cr_ipsr;
        // just handle psr.up and psr.pp for now
@@ -406,21 +404,15 @@ IA64FAULT vcpu_set_psr_l(VCPU * vcpu, u6
                ipsr->dfl = 1;
        if (newpsr.pp) {
                ipsr->pp = 1;
-               psr.pp = 1;
                PSCB(vcpu, vpsr_pp) = 1;
        } else {
                ipsr->pp = 1;
-               psr.pp = 1;
                PSCB(vcpu, vpsr_pp) = 0;
        }
-       if (newpsr.up) {
+       if (newpsr.up)
                ipsr->up = 1;
-               psr.up = 1;
-       }
-       if (newpsr.sp) {
+       if (newpsr.sp)
                ipsr->sp = 1;
-               psr.sp = 1;
-       }
        if (newpsr.i) {
                if (vcpu->vcpu_info->evtchn_upcall_mask)
                        enabling_interrupts = 1;
@@ -428,22 +420,14 @@ IA64FAULT vcpu_set_psr_l(VCPU * vcpu, u6
        }
        if (newpsr.ic)
                PSCB(vcpu, interrupt_collection_enabled) = 1;
-       if (newpsr.mfl) {
+       if (newpsr.mfl)
                ipsr->mfl = 1;
-               psr.mfl = 1;
-       }
-       if (newpsr.mfh) {
+       if (newpsr.mfh)
                ipsr->mfh = 1;
-               psr.mfh = 1;
-       }
-       if (newpsr.ac) {
+       if (newpsr.ac)
                ipsr->ac = 1;
-               psr.ac = 1;
-       }
-       if (newpsr.up) {
+       if (newpsr.up)
                ipsr->up = 1;
-               psr.up = 1;
-       }
        if (newpsr.dt && newpsr.rt)
                vcpu_set_metaphysical_mode(vcpu, FALSE);
        else
_______________________________________________
Xen-ia64-devel mailing list
[email protected]
http://lists.xensource.com/xen-ia64-devel

Reply via email to