From: "Randy.Dunlap" <rddunlap@osdl.org>
To: dl8bcu@dl8bcu.de
Cc: linux-kernel@vger.kernel.org, rth@twiddle.net, spyro@f2s.com,
rmk@arm.linux.org.uk, davidm@hpl.hp.com, paulus@au.ibm.com,
benh@kernel.crashing.org, jes@trained-monkey.org, ralf@gnu.org,
matthew@wil.cx, davem@redhat.com, wesolows@foobazco.org,
jdike@karaya.com, ak@suse.de
Subject: Re: [PATCH] sort out CLOCK_TICK_RATE usage, 2nd try [3/3]
Date: Tue, 13 Apr 2004 15:39:08 -0700 [thread overview]
Message-ID: <20040413153908.50131465.rddunlap@osdl.org> (raw)
In-Reply-To: <20040413220230.D7047@Marvin.DL8BCU.ampr.org>
General comment: diffstat -p1 patch_file
would be a good addition.
On Tue, 13 Apr 2004 22:02:30 +0000 Thorsten Kranzkowski wrote:
|
| 3/3 use CLOCK_TICK_RATE where 1193182 constant was used in timing
| calculations
|
|
| diff -urN linux-2.6.5-2a/drivers/input/joystick/analog.c linux-2.6.5-3a/drivers/input/joystick/analog.c
| --- linux-2.6.5-2a/drivers/input/joystick/analog.c Sun Apr 11 14:24:48 2004
| +++ linux-2.6.5-3a/drivers/input/joystick/analog.c Tue Apr 13 18:38:03 2004
| @@ -142,7 +142,7 @@
|
| #ifdef __i386__
| #define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)
| -#define DELTA(x,y) (cpu_has_tsc?((y)-(x)):((x)-(y)+((x)<(y)?1193182L/HZ:0)))
| +#define DELTA(x,y) (cpu_has_tsc?((y)-(x)):((x)-(y)+((x)<(y)?CLOCK_TICK_RATE/HZ:0)))
| #define TIME_NAME (cpu_has_tsc?"TSC":"PIT")
| static unsigned int get_time_pit(void)
| {
* Add spaces around operators please. It's much more readable
that way.
| diff -urN linux-2.6.5-2a/sound/oss/pas2_pcm.c linux-2.6.5-3a/sound/oss/pas2_pcm.c
| --- linux-2.6.5-2a/sound/oss/pas2_pcm.c Thu Dec 18 02:58:28 2003
| +++ linux-2.6.5-3a/sound/oss/pas2_pcm.c Tue Apr 13 18:39:22 2004
| @@ -62,13 +63,13 @@
|
| if (pcm_channels & 2)
| {
| - foo = (596590 + (arg / 2)) / arg;
| - arg = (596590 + (foo / 2)) / foo;
| + foo = ((CLOCK_TICK_RATE/2) + (arg / 2)) / arg;
| + arg = ((CLOCK_TICK_RATE/2) + (foo / 2)) / foo;
* Add spaces around operators, as: ((CLOCK_TICK_RATE / 2)
And finally, does this change support (or allow) CLOCK_TICK_RATE
to be a variable instead of a #define?
as in include/asm-i386/mach-pc9800/setup_arch_pre.h:
int CLOCK_TICK_RATE;
and include/asm-i386/timex.h:
#ifdef CONFIG_X86_PC9800
extern int CLOCK_TICK_RATE;
More likely (IMO), X86_PC9800 sub-arch will have to be changed
(if it ever works).
--
~Randy
next prev parent reply other threads:[~2004-04-13 22:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-12 7:55 [PATCH][RFC] sort out CLOCK_TICK_RATE usage [0/3] Thorsten Kranzkowski
2004-04-12 7:57 ` [PATCH][RFC] sort out CLOCK_TICK_RATE usage [1/3] Thorsten Kranzkowski
2004-04-12 7:57 ` [PATCH][RFC] sort out CLOCK_TICK_RATE usage [2/3] Thorsten Kranzkowski
2004-04-12 7:58 ` [PATCH][RFC] sort out CLOCK_TICK_RATE usage [3/3] Thorsten Kranzkowski
2004-04-12 16:39 ` [PATCH][RFC] sort out CLOCK_TICK_RATE usage [1/3] David Mosberger
2004-04-12 20:08 ` Thorsten Kranzkowski
2004-04-12 20:32 ` David Mosberger
2004-04-12 21:17 ` Thorsten Kranzkowski
2004-04-13 4:04 ` Miles Bader
2004-04-13 17:00 ` Thorsten Kranzkowski
2004-04-14 1:45 ` Miles Bader
2004-04-12 16:47 ` [PATCH][RFC] sort out CLOCK_TICK_RATE usage [0/3] Zwane Mwaikambo
2004-04-12 20:11 ` Thorsten Kranzkowski
2004-04-12 20:50 ` Zwane Mwaikambo
2004-04-13 21:58 ` [PATCH] sort out CLOCK_TICK_RATE usage, 2nd try [0/3] Thorsten Kranzkowski
2004-04-13 21:59 ` [PATCH] sort out CLOCK_TICK_RATE usage, 2nd try [1/3] Thorsten Kranzkowski
2004-04-13 22:01 ` [PATCH] sort out CLOCK_TICK_RATE usage, 2nd try [2/3] Thorsten Kranzkowski
2004-04-13 22:02 ` [PATCH] sort out CLOCK_TICK_RATE usage, 2nd try [3/3] Thorsten Kranzkowski
2004-04-13 22:39 ` Randy.Dunlap [this message]
2004-04-14 14:12 ` [PATCH] sort out CLOCK_TICK_RATE usage, 2nd try [0/3] Matthew Wilcox
2004-04-16 9:05 ` Geert Uytterhoeven
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=20040413153908.50131465.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=ak@suse.de \
--cc=benh@kernel.crashing.org \
--cc=davem@redhat.com \
--cc=davidm@hpl.hp.com \
--cc=dl8bcu@dl8bcu.de \
--cc=jdike@karaya.com \
--cc=jes@trained-monkey.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=paulus@au.ibm.com \
--cc=ralf@gnu.org \
--cc=rmk@arm.linux.org.uk \
--cc=rth@twiddle.net \
--cc=spyro@f2s.com \
--cc=wesolows@foobazco.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®