From 9278b94623bbadcf64c1e3b6feb5f770379e18aa Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 22 Jan 2017 21:12:38 +0100 Subject: pc/pc64: get rid of timerset(0) case, was used with "i8253set off" ctl --- sys/src/9/pc/apic.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'sys/src/9/pc/apic.c') diff --git a/sys/src/9/pc/apic.c b/sys/src/9/pc/apic.c index f27adb81e..30ca0b50a 100644 --- a/sys/src/9/pc/apic.c +++ b/sys/src/9/pc/apic.c @@ -396,15 +396,12 @@ lapictimerset(uvlong next) Apictimer *a; a = &lapictimer[m->machno]; - period = a->max; - if(next != 0){ - period = next - fastticks(nil); - period /= a->div; - if(period < a->min) - period = a->min; - else if(period > a->max - a->min) - period = a->max; - } + period = next - fastticks(nil); + period /= a->div; + if(period < a->min) + period = a->min; + else if(period > a->max - a->min) + period = a->max; lapicw(LapicTICR, period); } -- cgit v1.2.3