Re: [PATCH v2] add acpi pmtimer support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 14, 2012 at 07:29:19AM +0200, Gerd Hoffmann wrote:
> This patch makes seabios use the acpi pmtimer instead of tsc for
> timekeeping.  The pmtimer has a fixed frequency and doesn't need
> calibration, thus it doesn't suffer from calibration errors due to a
> loaded host machine.

The patch looks okay to me, but is it still needed?  (I recall seeing
something on the kvm list about a bug fix to the main timer.)

[...]
> +static u64 pmtimer_get(void)
> +{
> +    u16 ioport = GET_GLOBAL(pmtimer_ioport);
> +    u32 wraps = GET_LOW(pmtimer_wraps);
> +    u32 pmtimer = inl(ioport);
> +
> +    if (pmtimer < GET_LOW(pmtimer_last)) {
> +        wraps++;
> +        SET_LOW(pmtimer_wraps, wraps);
> +    }
> +    SET_LOW(pmtimer_last, pmtimer);
> +
> +    dprintf(9, "pmtimer: %u:%u\n", wraps, pmtimer);
> +    return (u64)wraps << 24 | pmtimer;

BTW, why is this "<< 24", and if it should be that way, shouldn't the
pmtimer be "inl(ioport) & 0xffffff" ?

-Kevin
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux