History

[PATCH] jiffies_64 cleanup

Define jiffies_64 in kernel/timer.c rather than having 24 duplicated defines in each architecture.

Thomas Gleixner committed 21 years ago

Commit ecea8d11 parent 371e8c225 files · +4 −93Browse files

Unified · Split

25 files
  1. arch/alpha/kernel/time.c +0 −4
  2. arch/arm/kernel/time.c +0 −4
  3. arch/arm26/kernel/time.c +0 −4
  4. arch/cris/kernel/time.c +0 −4
  5. arch/frv/kernel/time.c +0 −3
  6. arch/h8300/kernel/time.c +0 −4
  7. arch/i386/kernel/time.c +0 −4
  8. arch/ia64/kernel/time.c +0 −4
  9. arch/m32r/kernel/time.c +0 −4
  10. arch/m68k/kernel/time.c +0 −4
  11. arch/m68knommu/kernel/time.c +0 −4
  12. arch/mips/kernel/time.c +0 −4
  13. arch/parisc/kernel/time.c +0 −4
  14. arch/ppc/kernel/time.c +0 −5
  15. arch/ppc64/kernel/time.c +0 −4
  16. arch/s390/kernel/time.c +0 −4
  17. arch/sh/kernel/time.c +0 −4
  18. arch/sh64/kernel/time.c +0 −2
  19. arch/sparc/kernel/time.c +0 −4
  20. arch/sparc64/kernel/time.c +0 −4
  21. arch/um/kernel/time_kern.c +0 −4
  22. arch/v850/kernel/time.c +0 −4
  23. arch/x86_64/kernel/time.c +0 −4
  24. arch/xtensa/kernel/time.c +0 −3
  25. kernel/timer.c +4 −0
arch/alpha/kernel/time.c+0−4
@@ -55,10 +55,6 @@ · 54 unmodified lines
55#include "proto.h"55#include "proto.h"
56#include "irq_impl.h"56#include "irq_impl.h"
57 57
58u64 jiffies_64 = INITIAL_JIFFIES;
59
60EXPORT_SYMBOL(jiffies_64);
61
62extern unsigned long wall_jiffies; /* kernel/timer.c */58extern unsigned long wall_jiffies; /* kernel/timer.c */
63 59
64static int set_rtc_mmss(unsigned long);60static int set_rtc_mmss(unsigned long);
arch/arm/kernel/time.c+0−4
@@ -36,10 +36,6 @@ · 35 unmodified lines
36#include <asm/thread_info.h>36#include <asm/thread_info.h>
37#include <asm/mach/time.h>37#include <asm/mach/time.h>
38 38
39u64 jiffies_64 = INITIAL_JIFFIES;
40
41EXPORT_SYMBOL(jiffies_64);
42
43/*39/*
44 * Our system timer.40 * Our system timer.
45 */41 */
arch/arm26/kernel/time.c+0−4
@@ -34,10 +34,6 @@ · 33 unmodified lines
34#include <asm/irq.h>34#include <asm/irq.h>
35#include <asm/ioc.h>35#include <asm/ioc.h>
36 36
37u64 jiffies_64 = INITIAL_JIFFIES;
38
39EXPORT_SYMBOL(jiffies_64);
40
41extern unsigned long wall_jiffies;37extern unsigned long wall_jiffies;
42 38
43/* this needs a better home */39/* this needs a better home */
arch/cris/kernel/time.c+0−4
@@ -32,10 +32,6 @@ · 31 unmodified lines
32#include <linux/init.h>32#include <linux/init.h>
33#include <linux/profile.h>33#include <linux/profile.h>
34 34
35u64 jiffies_64 = INITIAL_JIFFIES;
36
37EXPORT_SYMBOL(jiffies_64);
38
39int have_rtc; /* used to remember if we have an RTC or not */;35int have_rtc; /* used to remember if we have an RTC or not */;
40 36
41#define TICK_SIZE tick37#define TICK_SIZE tick
arch/frv/kernel/time.c+0−3
@@ -34,9 +34,6 @@ · 33 unmodified lines
34 34
35extern unsigned long wall_jiffies;35extern unsigned long wall_jiffies;
36 36
37u64 jiffies_64 = INITIAL_JIFFIES;
38EXPORT_SYMBOL(jiffies_64);
39
40unsigned long __nongprelbss __clkin_clock_speed_HZ;37unsigned long __nongprelbss __clkin_clock_speed_HZ;
41unsigned long __nongprelbss __ext_bus_clock_speed_HZ;38unsigned long __nongprelbss __ext_bus_clock_speed_HZ;
42unsigned long __nongprelbss __res_bus_clock_speed_HZ;39unsigned long __nongprelbss __res_bus_clock_speed_HZ;
arch/h8300/kernel/time.c+0−4
@@ -32,10 +32,6 @@ · 31 unmodified lines
32 32
33#define TICK_SIZE (tick_nsec / 1000)33#define TICK_SIZE (tick_nsec / 1000)
34 34
35u64 jiffies_64;
36
37EXPORT_SYMBOL(jiffies_64);
38
39/*35/*
40 * timer_interrupt() needs to keep up the real-time clock,36 * timer_interrupt() needs to keep up the real-time clock,
41 * as well as call the "do_timer()" routine every clocktick37 * as well as call the "do_timer()" routine every clocktick
arch/i386/kernel/time.c+0−4
@@ -74,10 +74,6 @@ int pit_latch_buggy; /* extern */ · 73 unmodified lines
74 74
75#include "do_timer.h"75#include "do_timer.h"
76 76
77u64 jiffies_64 = INITIAL_JIFFIES;
78
79EXPORT_SYMBOL(jiffies_64);
80
81unsigned int cpu_khz; /* Detected as we calibrate the TSC */77unsigned int cpu_khz; /* Detected as we calibrate the TSC */
82EXPORT_SYMBOL(cpu_khz);78EXPORT_SYMBOL(cpu_khz);
83 79
arch/ia64/kernel/time.c+0−4
@@ -32,10 +32,6 @@ · 31 unmodified lines
32 32
33extern unsigned long wall_jiffies;33extern unsigned long wall_jiffies;
34 34
35u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
36
37EXPORT_SYMBOL(jiffies_64);
38
39#define TIME_KEEPER_ID 0 /* smp_processor_id() of time-keeper */35#define TIME_KEEPER_ID 0 /* smp_processor_id() of time-keeper */
40 36
41#ifdef CONFIG_IA64_DEBUG_IRQ37#ifdef CONFIG_IA64_DEBUG_IRQ
arch/m32r/kernel/time.c+0−4
@@ -39,10 +39,6 @@ extern void send_IPI_allbutself(int, int); · 38 unmodified lines
39extern void smp_local_timer_interrupt(struct pt_regs *);39extern void smp_local_timer_interrupt(struct pt_regs *);
40#endif40#endif
41 41
42u64 jiffies_64 = INITIAL_JIFFIES;
43
44EXPORT_SYMBOL(jiffies_64);
45
46extern unsigned long wall_jiffies;42extern unsigned long wall_jiffies;
47#define TICK_SIZE (tick_nsec / 1000)43#define TICK_SIZE (tick_nsec / 1000)
48 44
arch/m68k/kernel/time.c+0−4
@@ -27,10 +27,6 @@ · 26 unmodified lines
27#include <linux/timex.h>27#include <linux/timex.h>
28#include <linux/profile.h>28#include <linux/profile.h>
29 29
30u64 jiffies_64 = INITIAL_JIFFIES;
31
32EXPORT_SYMBOL(jiffies_64);
33
34static inline int set_rtc_mmss(unsigned long nowtime)30static inline int set_rtc_mmss(unsigned long nowtime)
35{31{
36 if (mach_set_clock_mmss)32 if (mach_set_clock_mmss)
arch/m68knommu/kernel/time.c+0−4
@@ -27,10 +27,6 @@ · 26 unmodified lines
27 27
28#define TICK_SIZE (tick_nsec / 1000)28#define TICK_SIZE (tick_nsec / 1000)
29 29
30u64 jiffies_64 = INITIAL_JIFFIES;
31
32EXPORT_SYMBOL(jiffies_64);
33
34extern unsigned long wall_jiffies;30extern unsigned long wall_jiffies;
35 31
36 32
arch/mips/kernel/time.c+0−4
@@ -45,10 +45,6 @@ · 44 unmodified lines
45 45
46#define TICK_SIZE (tick_nsec / 1000)46#define TICK_SIZE (tick_nsec / 1000)
47 47
48u64 jiffies_64 = INITIAL_JIFFIES;
49
50EXPORT_SYMBOL(jiffies_64);
51
52/*48/*
53 * forward reference49 * forward reference
54 */50 */
arch/parisc/kernel/time.c+0−4
@@ -33,10 +33,6 @@ · 32 unmodified lines
33 33
34#include <linux/timex.h>34#include <linux/timex.h>
35 35
36u64 jiffies_64 = INITIAL_JIFFIES;
37
38EXPORT_SYMBOL(jiffies_64);
39
40/* xtime and wall_jiffies keep wall-clock time */36/* xtime and wall_jiffies keep wall-clock time */
41extern unsigned long wall_jiffies;37extern unsigned long wall_jiffies;
42 38
arch/ppc/kernel/time.c+0−5
@@ -66,11 +66,6 @@ · 65 unmodified lines
66 66
67#include <asm/time.h>67#include <asm/time.h>
68 68
69/* XXX false sharing with below? */
70u64 jiffies_64 = INITIAL_JIFFIES;
71
72EXPORT_SYMBOL(jiffies_64);
73
74unsigned long disarm_decr[NR_CPUS];69unsigned long disarm_decr[NR_CPUS];
75 70
76extern struct timezone sys_tz;71extern struct timezone sys_tz;
arch/ppc64/kernel/time.c+0−4
@@ -68,10 +68,6 @@ · 67 unmodified lines
68#include <asm/systemcfg.h>68#include <asm/systemcfg.h>
69#include <asm/firmware.h>69#include <asm/firmware.h>
70 70
71u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
72
73EXPORT_SYMBOL(jiffies_64);
74
75/* keep track of when we need to update the rtc */71/* keep track of when we need to update the rtc */
76time_t last_rtc_update;72time_t last_rtc_update;
77extern int piranha_simulator;73extern int piranha_simulator;
arch/s390/kernel/time.c+0−4
@@ -49,10 +49,6 @@ · 48 unmodified lines
49 49
50#define TICK_SIZE tick50#define TICK_SIZE tick
51 51
52u64 jiffies_64 = INITIAL_JIFFIES;
53
54EXPORT_SYMBOL(jiffies_64);
55
56static ext_int_info_t ext_int_info_cc;52static ext_int_info_t ext_int_info_cc;
57static u64 init_timer_cc;53static u64 init_timer_cc;
58static u64 jiffies_timer_cc;54static u64 jiffies_timer_cc;
arch/sh/kernel/time.c+0−4
@@ -56,10 +56,6 @@ extern unsigned long wall_jiffies; · 55 unmodified lines
56#define TICK_SIZE (tick_nsec / 1000)56#define TICK_SIZE (tick_nsec / 1000)
57DEFINE_SPINLOCK(tmu0_lock);57DEFINE_SPINLOCK(tmu0_lock);
58 58
59u64 jiffies_64 = INITIAL_JIFFIES;
60
61EXPORT_SYMBOL(jiffies_64);
62
63/* XXX: Can we initialize this in a routine somewhere? Dreamcast doesn't want59/* XXX: Can we initialize this in a routine somewhere? Dreamcast doesn't want
64 * these routines anywhere... */60 * these routines anywhere... */
65#ifdef CONFIG_SH_RTC61#ifdef CONFIG_SH_RTC
arch/sh64/kernel/time.c+0−2
@@ -116,8 +116,6 @@ · 115 unmodified lines
116 116
117extern unsigned long wall_jiffies;117extern unsigned long wall_jiffies;
118 118
119u64 jiffies_64 = INITIAL_JIFFIES;
120
121static unsigned long tmu_base, rtc_base;119static unsigned long tmu_base, rtc_base;
122unsigned long cprc_base;120unsigned long cprc_base;
123 121
arch/sparc/kernel/time.c+0−4
@@ -45,10 +45,6 @@ · 44 unmodified lines
45 45
46extern unsigned long wall_jiffies;46extern unsigned long wall_jiffies;
47 47
48u64 jiffies_64 = INITIAL_JIFFIES;
49
50EXPORT_SYMBOL(jiffies_64);
51
52DEFINE_SPINLOCK(rtc_lock);48DEFINE_SPINLOCK(rtc_lock);
53enum sparc_clock_type sp_clock_typ;49enum sparc_clock_type sp_clock_typ;
54DEFINE_SPINLOCK(mostek_lock);50DEFINE_SPINLOCK(mostek_lock);
arch/sparc64/kernel/time.c+0−4
@@ -55,10 +55,6 @@ unsigned long ds1287_regs = 0UL; · 54 unmodified lines
55 55
56extern unsigned long wall_jiffies;56extern unsigned long wall_jiffies;
57 57
58u64 jiffies_64 = INITIAL_JIFFIES;
59
60EXPORT_SYMBOL(jiffies_64);
61
62static void __iomem *mstk48t08_regs;58static void __iomem *mstk48t08_regs;
63static void __iomem *mstk48t59_regs;59static void __iomem *mstk48t59_regs;
64 60
arch/um/kernel/time_kern.c+0−4
@@ -22,10 +22,6 @@ · 21 unmodified lines
22#include "mode.h"22#include "mode.h"
23#include "os.h"23#include "os.h"
24 24
25u64 jiffies_64 = INITIAL_JIFFIES;
26
27EXPORT_SYMBOL(jiffies_64);
28
29int hz(void)25int hz(void)
30{26{
31 return(HZ);27 return(HZ);
arch/v850/kernel/time.c+0−4
@@ -26,10 +26,6 @@ · 25 unmodified lines
26 26
27#include "mach.h"27#include "mach.h"
28 28
29u64 jiffies_64 = INITIAL_JIFFIES;
30
31EXPORT_SYMBOL(jiffies_64);
32
33#define TICK_SIZE (tick_nsec / 1000)29#define TICK_SIZE (tick_nsec / 1000)
34 30
35/*31/*
arch/x86_64/kernel/time.c+0−4
@@ -42,10 +42,6 @@ · 41 unmodified lines
42#include <asm/apic.h>42#include <asm/apic.h>
43#endif43#endif
44 44
45u64 jiffies_64 = INITIAL_JIFFIES;
46
47EXPORT_SYMBOL(jiffies_64);
48
49#ifdef CONFIG_CPU_FREQ45#ifdef CONFIG_CPU_FREQ
50static void cpufreq_delayed_get(void);46static void cpufreq_delayed_get(void);
51#endif47#endif
arch/xtensa/kernel/time.c+0−3
@@ -29,9 +29,6 @@ · 28 unmodified lines
29 29
30extern volatile unsigned long wall_jiffies;30extern volatile unsigned long wall_jiffies;
31 31
32u64 jiffies_64 = INITIAL_JIFFIES;
33EXPORT_SYMBOL(jiffies_64);
34
35spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;32spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
36EXPORT_SYMBOL(rtc_lock);33EXPORT_SYMBOL(rtc_lock);
37 34
kernel/timer.c+4−0
@@ -46,6 +46,10 @@ static void time_interpolator_update(long delta_nsec); · 45 unmodified lines
46#define time_interpolator_update(x)46#define time_interpolator_update(x)
47#endif47#endif
48 48
49u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
50
51EXPORT_SYMBOL(jiffies_64);
52
49/*53/*
50 * per-CPU timer vector definitions:54 * per-CPU timer vector definitions:
51 */55 */