RE: [PATCHSET][2.6-test4][0/6]Support for HPET based timer - Take 2

From: Pallipadi, Venkatesh
Date: Sat Aug 30 2003 - 11:28:33 EST



> -----Original Message-----
> From: David Mosberger-Tang [mailto:davidm@xxxxxxxxxxx]
> >>>>> On Fri, 29 Aug 2003 09:12:52 -0700, "Pallipadi,
> Venkatesh" <venkatesh.pallipadi@xxxxxxxxx> said:
>
> Venkatesh> The part of the patch that does the HPET initialization
> Venkatesh> for timer interrupt, and general HPET registers
> Venkatesh> read/write/programming can be common across
> Venkatesh> architectures. However, different archs diverge, when it
> Venkatesh> comes to gettimeofday-timer implementation (tsc, pit,
> Venkatesh> itc, hpet, ) and we may still have to keep that part
> Venkatesh> architecture specific.
>
> Is the time_interpolator interface provided by timex.h sufficient for
> HPET timer-interrupt needs? I think It ought to be. If so, perhaps
> all that's missing is that x86 needs to be switched over to that
> interface?
>

timer_interpolator kind of interface helps for one part of HPET changes.
That is using HPET during gettimeofday(). Unfortunately, i386 has its
own timer infrastructure (which is quite similar to timer_interpolator),
which is already being used by variety of timers that exist (cyclone_timer,
tsc, pit - code under arch/i386/kernel/timers). i386 timers seems to be
the superset of timer_interpolator.
struct timer_opts{
int (*init)(char *override);
void (*mark_offset)(void);
unsigned long (*get_offset)(void);
unsigned long long (*monotonic_clock)(void);
void (*delay)(unsigned long);
};
I agree, in future, it is best to integrate these timers in an
architecture independent way.

The other part of HPET change is, change in kernel base timer. In i386,
along with local APIC timer interrupts, we also have a IRQ0 timer interrupt.
This is where kernel time-keeping happens (similar to TIME_KEEPER_ID in IPF).
This will also used for process times in UP case, when there is no LAPIC.
As of now this interrupt comes from PIT/8254. HPET will replace this too,
and can be programmed to generate periodic interrupts at a particular rate.
This part may be specific to i386.


Thanks,
-Venkatesh

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