Messages in this thread | ![/](/images/icornerl.gif) | | Date | Thu, 12 Jun 2003 08:47:26 +0200 | From | Vojtech Pavlik <> | Subject | Re: [PATCH] New x86_64 time code for 2.5.70 |
| |
On Thu, Jun 12, 2003 at 12:32:01AM +0300, Mika Penttilä wrote: > /* > + * Read the period, compute tick and quotient. > + */ > + > + id = hpet_readl(HPET_ID); > + > + if (!(id & HPET_ID_VENDOR) || !(id & HPET_ID_NUMBER) || > + !(id & HPET_ID_LEGSUP)) > + return -1; > + > + hpet_period = hpet_readl(HPET_PERIOD); > + if (hpet_period < 100000 || hpet_period > 100000000) > + return -1; > + > > > Line below seems to be wrong, given hpet period is in fsecs. > > > + hpet_tick = (tick_nsec + hpet_period / 2) / hpet_period;
Yes, it should be:
hpet_tick = (1000000000L * (USECS_PER_SEC/HZ) + hpet_period / 2) / hpet_period;
> > > > > > --Mika > > > > >
-- Vojtech Pavlik SuSE Labs, SuSE CR - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |