Re: [RFC] timer-changes_A0

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Wed Aug 14 2002 - 08:32:54 EST


On Wed, 2002-08-14 at 00:58, john stultz wrote:
> where you have clock_tsc.c, clock_pit.c, clock_cyclone.c etc. Each one
> implementing init_clock_xxxx, mark_timeoffset_xxxx, and
> do_gettimeoffset_xxxx (possibly probing functions too?). But for now I
> just kept it all in time.c

Longer term a struct timer_ops would indeed be really clean. Splitting
it makes sense

> }
>
> +enum clock_type {CLOCK_PIT, CLOCK_TSC};
> +enum clock_type select_clock(void)
> +{
> + if(cpu_has_tsc)
> + return CLOCK_TSC;
> + return CLOCK_PIT;
> +}

I put this in setup.c in my case so I could also cover the VISWS more
nicely, and also because of the 2.5 plans to do a nice architecture
split

Pulling the other code out of the switch into functions is definitely
good. I'll go apply that bit now

-
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/



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:36 EST