* [PATCH] 2.5.43-tick
@ 2002-10-17 10:45 Russell King
2002-10-17 16:32 ` george anzinger
0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2002-10-17 10:45 UTC (permalink / raw)
To: LKML
This patch appears not to be in 2.5.43, but applies cleanly.
On some ARM platforms, CLOCK_TICK_RATE is not a constant (it is specified
at boot time), which means that TICK_USEC/TICK_NSEC is not constant.
We therefore can not initialise static variables with these definitions;
they must be done at run time.
kernel/timer.c | 7 +++++--
1 files changed, 5 insertions, 2 deletions
diff -ur orig/kernel/timer.c linux/kernel/timer.c
--- orig/kernel/timer.c Wed Oct 16 09:17:13 2002
+++ linux/kernel/timer.c Wed Oct 16 09:15:00 2002
@@ -376,8 +376,8 @@
/*
* Timekeeping variables
*/
-unsigned long tick_usec = TICK_USEC; /* ACTHZ period (usec) */
-unsigned long tick_nsec = TICK_NSEC(TICK_USEC); /* USER_HZ period (nsec) */
+unsigned long tick_usec; /* ACTHZ period (usec) */
+unsigned long tick_nsec; /* USER_HZ period (nsec) */
/* The current time */
struct timespec xtime __attribute__ ((aligned (16)));
@@ -1069,6 +1069,9 @@
void __init init_timers(void)
{
int i, j;
+
+ tick_usec = TICK_USEC;
+ tick_nsec = TICK_NSEC(TICK_USEC);
for (i = 0; i < NR_CPUS; i++) {
tvec_base_t *base;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] 2.5.43-tick
2002-10-17 10:45 [PATCH] 2.5.43-tick Russell King
@ 2002-10-17 16:32 ` george anzinger
0 siblings, 0 replies; 2+ messages in thread
From: george anzinger @ 2002-10-17 16:32 UTC (permalink / raw)
To: Russell King; +Cc: LKML
Russell King wrote:
>
> This patch appears not to be in 2.5.43, but applies cleanly.
>
> On some ARM platforms, CLOCK_TICK_RATE is not a constant (it is specified
> at boot time), which means that TICK_USEC/TICK_NSEC is not constant.
> We therefore can not initialise static variables with these definitions;
> they must be done at run time.
I must be missing something here. Why can't both be done?
That is, leave timer.c alone and add code to the arch time
init to correct the values?
-g
>
> kernel/timer.c | 7 +++++--
> 1 files changed, 5 insertions, 2 deletions
>
> diff -ur orig/kernel/timer.c linux/kernel/timer.c
> --- orig/kernel/timer.c Wed Oct 16 09:17:13 2002
> +++ linux/kernel/timer.c Wed Oct 16 09:15:00 2002
> @@ -376,8 +376,8 @@
> /*
> * Timekeeping variables
> */
> -unsigned long tick_usec = TICK_USEC; /* ACTHZ period (usec) */
> -unsigned long tick_nsec = TICK_NSEC(TICK_USEC); /* USER_HZ period (nsec) */
> +unsigned long tick_usec; /* ACTHZ period (usec) */
> +unsigned long tick_nsec; /* USER_HZ period (nsec) */
>
> /* The current time */
> struct timespec xtime __attribute__ ((aligned (16)));
> @@ -1069,6 +1069,9 @@
> void __init init_timers(void)
> {
> int i, j;
> +
> + tick_usec = TICK_USEC;
> + tick_nsec = TICK_NSEC(TICK_USEC);
>
> for (i = 0; i < NR_CPUS; i++) {
> tvec_base_t *base;
>
> -
> 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/
--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-17 16:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-17 10:45 [PATCH] 2.5.43-tick Russell King
2002-10-17 16:32 ` george anzinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox