From: Jimi Xenidis Date: Fri, 1 Sep 2006 16:12:43 +0000 (-0400) Subject: [POWERPC][XEN] Adjust DEC correctly X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15658^2~90 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4f1a574abf73eb36ae62249920dd64704ebf9b14;p=xen.git [POWERPC][XEN] Adjust DEC correctly If DEC would have expired we now restore DEC to 0 so it will fire. The Domain loses info about how late DEC was from looking at DEC but I don't think anyone tracks that. Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --- diff --git a/xen/arch/powerpc/powerpc64/domain.c b/xen/arch/powerpc/powerpc64/domain.c index 4b205f969e..a6473348c3 100644 --- a/xen/arch/powerpc/powerpc64/domain.c +++ b/xen/arch/powerpc/powerpc64/domain.c @@ -55,7 +55,10 @@ void load_sprs(struct vcpu *v) /* adjust the DEC value to account for cycles while not * running this OS */ timebase_delta = mftb() - v->arch.timebase; - v->arch.dec -= timebase_delta; + if (timebase_delta > v->arch.dec) + v->arch.dec = 0; + else + v->arch.dec -= timebase_delta; } /* XXX evaluate all isyncs in segment code */