diff options
| author | George Anzinger <george@mvista.com> | 2002-05-10 06:14:02 -0700 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@mandrakesoft.com> | 2002-05-10 06:14:02 -0700 |
| commit | fa44005c7639940d5205fe470f2bd88fb96a3ada (patch) | |
| tree | 89d0fe7b26ecf0e8e56f306a7e95bac358fc6fdc /kernel | |
| parent | 2b5adb1d588e1af9e104efdd9953ed5a2ed8dc85 (diff) | |
[PATCH] 64-bit jiffies, a better solution
Ok, here it is. The following arch are not covered:
Mips, Mips64 in 32-bit mode, parisc in __LP64__ mode.
In addition, x86_64 mentions jiffies in the existing script.
This may be a problem.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/ksyms.c | 1 | ||||
| -rw-r--r-- | kernel/timer.c | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/kernel/ksyms.c b/kernel/ksyms.c index 7161915677b9..9001c829f4ef 100644 --- a/kernel/ksyms.c +++ b/kernel/ksyms.c @@ -471,6 +471,7 @@ EXPORT_SYMBOL_GPL(idle_cpu); EXPORT_SYMBOL_GPL(set_cpus_allowed); #endif EXPORT_SYMBOL(jiffies); +EXPORT_SYMBOL(jiffies_64); EXPORT_SYMBOL(xtime); EXPORT_SYMBOL(do_gettimeofday); EXPORT_SYMBOL(do_settimeofday); diff --git a/kernel/timer.c b/kernel/timer.c index 504af956c037..6fc0466711cc 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -67,7 +67,12 @@ unsigned long event; extern int do_setitimer(int, struct itimerval *, struct itimerval *); -unsigned long volatile jiffies; +/* + * The 64-bit value is not volatile - you MUST NOT read it + * without holding read_lock_irq(&xtime_lock). + * jiffies is defined in the linker script... + */ +u64 jiffies_64; unsigned int * prof_buffer; unsigned long prof_len; @@ -664,7 +669,7 @@ void timer_bh(void) void do_timer(struct pt_regs *regs) { - (*(unsigned long *)&jiffies)++; + jiffies_64++; #ifndef CONFIG_SMP /* SMP process accounting uses the local APIC timer */ |
