mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
To: "Andi Kleen" <ak@muc.de>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH][2.6][2/5]Support for HPET based timer
Date: Tue, 19 Aug 2003 18:30:10 -0700	[thread overview]
Message-ID: <C8C38546F90ABF408A5961FC01FDBF1902C7D1CF@fmsmsx405.fm.intel.com> (raw)



The timer stuff in kernel is divided into two levels:
1) Base kernel timer, the one that generates periodic timer interrupt on
IRQ 0. There is also associated initializations like APIC timer
initialization in case of SMP,
which again depends on the timer hardware. As of now, kernel has only
have PIT 
in this level.

2) Various timers under arch/i386/kernel/timers, basically used during
gettimeofday().
we currently have different timers here like, timer_cyclone, timer_tsc
or timer_pit. 
This part has a clean infrastructure to add and/or prioritize different
timers.


With HPET support we are changing stuff at both the levels.
1) We use HPET hardware to generate HZ interrupts on IRQ 0. This is the
change that
is there in PATCH 2/5. Unfortunately, we cannot use the existing timers
infrastructure 
for this part. We tried to keep the changes here as less as possible.
But, still had to
do changes in apic.c as it was assuming PIT for base timer. And the
other change is in
time.c, wherein we have to calibrate/initialize HPET for base timer, in
place of PIT.
The reason we kept timer_hpet.c in arch/i386/kernel is because it has
more to do with
initialization of the base-kernel-timer, than the gettimeofday-timer.

2) The timers for gettimeofday will change too, with HPET. The timer
list will be 
something like, timer_cyclone, timer_hpet, timer_tsc. This change is
there in 
PATCH 3/5. This change uses the exisiting timer infrastructure in 
arch/i386/kernel/timers


Thanks,
-Venkatesh

> -----Original Message-----
> From: Andi Kleen [mailto:ak@muc.de] 
> Sent: Tuesday, August 19, 2003 3:41 PM
> To: Pallipadi, Venkatesh
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: [PATCH][2.6][2/5]Support for HPET based timer
> 
> 
> "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com> 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
> 

             reply	other threads:[~2003-08-20  1:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-20  1:30 Pallipadi, Venkatesh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-08-26 23:50 Pallipadi, Venkatesh
2003-08-26 21:43 Mikael Pettersson
2003-08-26 18:31 Pallipadi, Venkatesh
2003-08-26 18:51 ` Andrew Morton
2003-08-26 18:55   ` Andrew Morton
2003-08-26 23:20     ` john stultz
2003-08-20 17:01 Pallipadi, Venkatesh
     [not found] <C8C38546F90ABF408A5961FC01FDBF1902C7D1C9@fmsmsx405.fm.intel.com.suse.lists.linux.kernel>
     [not found] ` <20030820080513.GB17793@ucw.cz.suse.lists.linux.kernel>
2003-08-20 10:01   ` Andi Kleen
2003-08-20 10:47     ` Mikael Pettersson
2003-08-20 17:09     ` Dave Hansen
2003-08-20  0:18 Pallipadi, Venkatesh
2003-08-20  8:05 ` Vojtech Pavlik
     [not found] <mmZK.Q4.11@gated-at.bofh.it>
2003-08-19 22:41 ` Andi Kleen
2003-08-19 19:20 Pallipadi, Venkatesh
2003-08-19 22:39 ` Vojtech Pavlik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C8C38546F90ABF408A5961FC01FDBF1902C7D1CF@fmsmsx405.fm.intel.com \
    --to=venkatesh.pallipadi@intel.com \
    --cc=ak@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®