Re: [PATCH][2.6][2/5]Support for HPET based timer

From: Andi Kleen
Date: Tue Aug 19 2003 - 17:46:26 EST


"Pallipadi, Venkatesh" <venkatesh.pallipadi@xxxxxxxxx> writes:

> /*
> + * Default initialization for 8254 timers. If we use other timers like HPET,
> + * we override this later
> + */
> +void (*wait_timer_tick)(void) = wait_8254_wraparound;

It would be much cleaner to just poll the generic monotonic time source here,
not add more special cases.

> diff -purN linux-2.6.0-test1/arch/i386/kernel/time_hpet.c linux-2.6.0-test1-hpet/arch/i386/kernel/time_hpet.c
> --- linux-2.6.0-test1/arch/i386/kernel/time_hpet.c 1969-12-31 16:00:00.000000000 -0800
> +++ linux-2.6.0-test1-hpet/arch/i386/kernel/time_hpet.c 2003-08-18 20:22:06.000
000000 -0700

Shouldn't that be in arch/i386/kernel/timers/hpet.c ?

Also I suspect it should be made an generic timer object there with
a timer_ops structure. If some hook for that is missing it could be added to
timer_ops and timers/timer.c

When there is already a generic framework to add new timers it would be a shame
not to use it.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/