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/timer.c | |
| 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/timer.c')
| -rw-r--r-- | kernel/timer.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 */ |
