Commit 86403107 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Move jiffies_64 down into architectures

x86-64 needs an own special declaration of jiffies_64.

prepare for this by moving the jiffies_64 declaration from
kernel/timer.c down into each architecture.
parent b068ec41
...@@ -48,6 +48,8 @@ ...@@ -48,6 +48,8 @@
#include "proto.h" #include "proto.h"
#include "irq_impl.h" #include "irq_impl.h"
u64 jiffies_64;
extern rwlock_t xtime_lock; extern rwlock_t xtime_lock;
extern unsigned long wall_jiffies; /* kernel/timer.c */ extern unsigned long wall_jiffies; /* kernel/timer.c */
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/leds.h> #include <asm/leds.h>
u64 jiffies_64;
extern rwlock_t xtime_lock; extern rwlock_t xtime_lock;
extern unsigned long wall_jiffies; extern unsigned long wall_jiffies;
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#include <asm/svinto.h> #include <asm/svinto.h>
u64 jiffies_64;
static int have_rtc; /* used to remember if we have an RTC or not */ static int have_rtc; /* used to remember if we have an RTC or not */
/* define this if you need to use print_timestamp */ /* define this if you need to use print_timestamp */
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
*/ */
#include <linux/irq.h> #include <linux/irq.h>
u64 jiffies_64;
unsigned long cpu_khz; /* Detected as we calibrate the TSC */ unsigned long cpu_khz; /* Detected as we calibrate the TSC */
......
...@@ -27,6 +27,8 @@ extern rwlock_t xtime_lock; ...@@ -27,6 +27,8 @@ extern rwlock_t xtime_lock;
extern unsigned long wall_jiffies; extern unsigned long wall_jiffies;
extern unsigned long last_time_offset; extern unsigned long last_time_offset;
u64 jiffies_64;
#ifdef CONFIG_IA64_DEBUG_IRQ #ifdef CONFIG_IA64_DEBUG_IRQ
unsigned long last_cli_ip; unsigned long last_cli_ip;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/timex.h> #include <linux/timex.h>
u64 jiffies_64;
static inline int set_rtc_mmss(unsigned long nowtime) static inline int set_rtc_mmss(unsigned long nowtime)
{ {
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#define USECS_PER_JIFFY (1000000/HZ) #define USECS_PER_JIFFY (1000000/HZ)
#define USECS_PER_JIFFY_FRAC ((1000000ULL << 32) / HZ & 0xffffffff) #define USECS_PER_JIFFY_FRAC ((1000000ULL << 32) / HZ & 0xffffffff)
u64 jiffies_64;
/* /*
* forward reference * forward reference
*/ */
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include <asm/sysmips.h> #include <asm/sysmips.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
u64 jiffies_64;
extern asmlinkage void syscall_trace(void); extern asmlinkage void syscall_trace(void);
asmlinkage int sys_pipe(abi64_no_regargs, struct pt_regs regs) asmlinkage int sys_pipe(abi64_no_regargs, struct pt_regs regs)
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include <linux/timex.h> #include <linux/timex.h>
u64 jiffies_64;
extern rwlock_t xtime_lock; extern rwlock_t xtime_lock;
static int timer_value; static int timer_value;
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
#include <asm/time.h> #include <asm/time.h>
/* XXX false sharing with below? */
u64 jiffies_64;
unsigned long disarm_decr[NR_CPUS]; unsigned long disarm_decr[NR_CPUS];
extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz); extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz);
......
...@@ -64,6 +64,8 @@ ...@@ -64,6 +64,8 @@
void smp_local_timer_interrupt(struct pt_regs *); void smp_local_timer_interrupt(struct pt_regs *);
u64 jiffies_64;
/* keep track of when we need to update the rtc */ /* keep track of when we need to update the rtc */
time_t last_rtc_update; time_t last_rtc_update;
extern rwlock_t xtime_lock; extern rwlock_t xtime_lock;
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#define TICK_SIZE tick #define TICK_SIZE tick
u64 jiffies_64;
static ext_int_info_t ext_int_info_timer; static ext_int_info_t ext_int_info_timer;
static uint64_t init_timer_cc; static uint64_t init_timer_cc;
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#define TICK_SIZE tick #define TICK_SIZE tick
u64 jiffies_64;
static ext_int_info_t ext_int_info_timer; static ext_int_info_t ext_int_info_timer;
static uint64_t init_timer_cc; static uint64_t init_timer_cc;
......
...@@ -70,6 +70,8 @@ ...@@ -70,6 +70,8 @@
#endif /* CONFIG_CPU_SUBTYPE_ST40STB1 */ #endif /* CONFIG_CPU_SUBTYPE_ST40STB1 */
#endif /* __sh3__ or __SH4__ */ #endif /* __sh3__ or __SH4__ */
u64 jiffies_64;
extern rwlock_t xtime_lock; extern rwlock_t xtime_lock;
extern unsigned long wall_jiffies; extern unsigned long wall_jiffies;
#define TICK_SIZE tick #define TICK_SIZE tick
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
extern rwlock_t xtime_lock; extern rwlock_t xtime_lock;
u64 jiffies_64;
enum sparc_clock_type sp_clock_typ; enum sparc_clock_type sp_clock_typ;
spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED; spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED;
unsigned long mstk48t02_regs = 0UL; unsigned long mstk48t02_regs = 0UL;
......
...@@ -44,6 +44,8 @@ unsigned long mstk48t02_regs = 0UL; ...@@ -44,6 +44,8 @@ unsigned long mstk48t02_regs = 0UL;
unsigned long ds1287_regs = 0UL; unsigned long ds1287_regs = 0UL;
#endif #endif
u64 jiffies_64;
static unsigned long mstk48t08_regs = 0UL; static unsigned long mstk48t08_regs = 0UL;
static unsigned long mstk48t59_regs = 0UL; static unsigned long mstk48t59_regs = 0UL;
......
...@@ -69,11 +69,11 @@ unsigned long event; ...@@ -69,11 +69,11 @@ unsigned long event;
extern int do_setitimer(int, struct itimerval *, struct itimerval *); extern int do_setitimer(int, struct itimerval *, struct itimerval *);
/* /*
* The 64-bit value is not volatile - you MUST NOT read it * The 64-bit jiffies value is not atomic - you MUST NOT read it
* without holding read_lock_irq(&xtime_lock). * without holding read_lock_irq(&xtime_lock).
* jiffies is defined in the linker script... * jiffies is defined in the linker script...
*/ */
u64 jiffies_64;
unsigned int * prof_buffer; unsigned int * prof_buffer;
unsigned long prof_len; unsigned long prof_len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment