From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Franck Bui-Huu <vagabon.xyz@gmail.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH 3/5] Deforest the function pointer jungle in the time code.
Date: Fri, 15 Jun 2007 18:35:52 +0400 [thread overview]
Message-ID: <4672A3C8.70308@ru.mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.64N.0706151117180.3754@blysk.ds.pg.gda.pl>
Maciej W. Rozycki wrote:
>>I don't see how you can have hrtimer support if you choose a periodic
>>timer...
> Well, periodic timers do seem to work somehow for everybody else with no
> hassle whatsoever,
Except the purely periodic timers can't serve as HRT (unless one cheats
and also declares them as one-shot).
> starting from the DEC code I referred to and including
> other platforms, like the i386, which uses the 8254 for the timer
> interrupt and as a HPT, by default, the very same counter or the TSC in
What do you mean by HPT -- clocksource?
> the CPU if available or, I think, some chipset timer, because some
Weel there was ACPI timer (32-bit free running counter, IIRC) -- but
somehow I was unable to find the code for it in the current source. And there
is HPET which is indeed preferred over broken TSC.
> brilliant soul decided to break the TSC at one point.
> Note that the 8254 can be reprogrammed into a one-shot mode, but somehow
> nobody does it. ;-)
Well, hrtimers can do it but the LAPIC timer is preferred over 8254.
> Similarly for the local APIC timer that is used for
> scheduling on i386 systems (if available).
LAPIC timer is also used for HRT, i.e. in one-shot mode (simply because
it's the best choice for such purpose -- HRTs are per-CPU).
>>>mips_timer_state appropriately, i.e. to flip at the HZ rate (it may be
>>>based on one of the south bridge choices mentioned above or some
>>>free-running counter for example), but people seem to prefer to write
>>>their own code for some reason. ;-)
>>Do you have any examples in mind which rewrite their own calibration
>>code ? I'm too lazy to search into all board code.
> See arch/mips/mips-boards/generic/time.c for example. Or any platform
> that uses the CP0 timer interrupt and has a configurable CPU frequency --
> you can find them easily by looking for ones that calculate
> mips_hpt_frequency rather than set it to a fixed value.
Alchemy for one.
> Maciej
WBR, Sergei
next prev parent reply other threads:[~2007-06-15 14:34 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-14 10:19 [RFD] Time rework [take #2] Franck Bui-Huu
2007-06-14 10:19 ` [PATCH 1/5] Use generic NTP code for all MIPS platforms Franck Bui-Huu
2007-06-14 10:19 ` [PATCH 2/5] Remove unused time.c for swarm Franck Bui-Huu
2007-06-14 10:19 ` [PATCH 3/5] Deforest the function pointer jungle in the time code Franck Bui-Huu
2007-06-14 11:17 ` Thomas Bogendoerfer
2007-06-14 13:43 ` Franck Bui-Huu
2007-06-14 14:09 ` Maciej W. Rozycki
2007-06-14 14:31 ` Franck Bui-Huu
2007-06-14 16:33 ` Maciej W. Rozycki
2007-06-14 16:54 ` Maciej W. Rozycki
2007-06-15 8:59 ` Franck Bui-Huu
2007-06-15 11:07 ` Maciej W. Rozycki
2007-06-15 13:26 ` Ralf Baechle
2007-06-15 14:08 ` Maciej W. Rozycki
2007-06-15 14:21 ` Ralf Baechle
2007-06-15 14:24 ` Franck Bui-Huu
2007-06-15 14:38 ` Ralf Baechle
2007-06-15 15:34 ` Franck Bui-Huu
2007-06-15 14:35 ` Sergei Shtylyov [this message]
2007-06-15 13:49 ` Ralf Baechle
2007-06-15 14:42 ` Sergei Shtylyov
2007-06-17 13:36 ` Franck Bui-Huu
2007-06-17 16:14 ` Atsushi Nemoto
2007-06-18 9:38 ` Franck Bui-Huu
2007-06-18 15:51 ` Atsushi Nemoto
2007-06-19 7:33 ` Franck Bui-Huu
2007-06-19 16:08 ` Atsushi Nemoto
2007-06-19 16:22 ` Sergei Shtylyov
2007-06-19 16:55 ` Franck Bui-Huu
2007-06-19 21:58 ` Ralf Baechle
2007-06-20 10:27 ` Franck Bui-Huu
2007-06-19 17:00 ` Franck Bui-Huu
2007-06-19 17:26 ` Sergei Shtylyov
2007-06-19 17:31 ` Sergei Shtylyov
2007-06-19 19:34 ` Sergei Shtylyov
2007-06-18 12:41 ` Franck Bui-Huu
2007-06-19 19:25 ` Sergei Shtylyov
2007-06-20 10:24 ` Franck Bui-Huu
2007-06-14 15:52 ` Franck Bui-Huu
2007-06-14 16:45 ` Maciej W. Rozycki
2007-06-14 10:20 ` [PATCH 4/5] Consolidate all variants of MIPS cp0 timer interrupt handlers Franck Bui-Huu
2007-06-14 10:20 ` [PATCH 5/5] Implement clockevents for R4000-style cp0 timer Franck Bui-Huu
2007-06-14 12:29 ` Atsushi Nemoto
2007-06-14 13:00 ` Franck Bui-Huu
2007-06-17 0:04 ` Ralf Baechle
2007-06-17 17:23 ` Atsushi Nemoto
2007-06-17 19:25 ` Ralf Baechle
2007-06-18 14:22 ` Franck Bui-Huu
2007-06-18 15:14 ` Ralf Baechle
2007-06-18 15:38 ` Franck Bui-Huu
2007-06-18 15:55 ` Franck Bui-Huu
2007-06-18 16:01 ` Ralf Baechle
2007-06-18 17:42 ` Ralf Baechle
2007-06-18 15:37 ` Ralf Baechle
2007-06-19 17:00 ` Sergei Shtylyov
2007-06-20 8:15 ` Ralf Baechle
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=4672A3C8.70308@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=tsbogend@alpha.franken.de \
--cc=vagabon.xyz@gmail.com \
/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