diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 21:53:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 21:53:35 -0400 |
commit | 420c1c572d4ceaa2f37b6311b7017ac6cf049fe2 (patch) | |
tree | df04e6b4b756b7a46d9887462d54a3ad0e1f91d5 /arch | |
parent | 9620639b7ea3843983f4ced8b4c81eb4d8974838 (diff) | |
parent | 6e6823d17b157f185be09f4c70181299f9273f0b (diff) |
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (62 commits)
posix-clocks: Check write permissions in posix syscalls
hrtimer: Remove empty hrtimer_init_hres_timer()
hrtimer: Update hrtimer->state documentation
hrtimer: Update base[CLOCK_BOOTTIME].offset correctly
timers: Export CLOCK_BOOTTIME via the posix timers interface
timers: Add CLOCK_BOOTTIME hrtimer base
time: Extend get_xtime_and_monotonic_offset() to also return sleep
time: Introduce get_monotonic_boottime and ktime_get_boottime
hrtimers: extend hrtimer base code to handle more then 2 clockids
ntp: Remove redundant and incorrect parameter check
mn10300: Switch do_timer() to xtimer_update()
posix clocks: Introduce dynamic clocks
posix-timers: Cleanup namespace
posix-timers: Add support for fd based clocks
x86: Add clock_adjtime for x86
posix-timers: Introduce a syscall for clock tuning.
time: Splitout compat timex accessors
ntp: Add ADJ_SETOFFSET mode bit
time: Introduce timekeeping_inject_offset
posix-timer: Update comment
...
Fix up new system-call-related conflicts in
arch/x86/ia32/ia32entry.S
arch/x86/include/asm/unistd_32.h
arch/x86/include/asm/unistd_64.h
arch/x86/kernel/syscall_table_32.S
(name_to_handle_at()/open_by_handle_at() vs clock_adjtime()), and some
due to movement of get_jiffies_64() in:
kernel/time.c
Diffstat (limited to 'arch')
27 files changed, 50 insertions, 102 deletions
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index c1f3e7cb82a4..a58e84f1a63b 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
@@ -159,7 +159,7 @@ void read_persistent_clock(struct timespec *ts) | |||
159 | 159 | ||
160 | /* | 160 | /* |
161 | * timer_interrupt() needs to keep up the real-time clock, | 161 | * timer_interrupt() needs to keep up the real-time clock, |
162 | * as well as call the "do_timer()" routine every clocktick | 162 | * as well as call the "xtime_update()" routine every clocktick |
163 | */ | 163 | */ |
164 | irqreturn_t timer_interrupt(int irq, void *dev) | 164 | irqreturn_t timer_interrupt(int irq, void *dev) |
165 | { | 165 | { |
@@ -172,8 +172,6 @@ irqreturn_t timer_interrupt(int irq, void *dev) | |||
172 | profile_tick(CPU_PROFILING); | 172 | profile_tick(CPU_PROFILING); |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | write_seqlock(&xtime_lock); | ||
176 | |||
177 | /* | 175 | /* |
178 | * Calculate how many ticks have passed since the last update, | 176 | * Calculate how many ticks have passed since the last update, |
179 | * including any previous partial leftover. Save any resulting | 177 | * including any previous partial leftover. Save any resulting |
@@ -187,9 +185,7 @@ irqreturn_t timer_interrupt(int irq, void *dev) | |||
187 | nticks = delta >> FIX_SHIFT; | 185 | nticks = delta >> FIX_SHIFT; |
188 | 186 | ||
189 | if (nticks) | 187 | if (nticks) |
190 | do_timer(nticks); | 188 | xtime_update(nticks); |
191 | |||
192 | write_sequnlock(&xtime_lock); | ||
193 | 189 | ||
194 | if (test_irq_work_pending()) { | 190 | if (test_irq_work_pending()) { |
195 | clear_irq_work_pending(); | 191 | clear_irq_work_pending(); |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 3d76bf233734..1ff46cabc7ef 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -107,9 +107,7 @@ void timer_tick(void) | |||
107 | { | 107 | { |
108 | profile_tick(CPU_PROFILING); | 108 | profile_tick(CPU_PROFILING); |
109 | do_leds(); | 109 | do_leds(); |
110 | write_seqlock(&xtime_lock); | 110 | xtime_update(1); |
111 | do_timer(1); | ||
112 | write_sequnlock(&xtime_lock); | ||
113 | #ifndef CONFIG_SMP | 111 | #ifndef CONFIG_SMP |
114 | update_process_times(user_mode(get_irq_regs())); | 112 | update_process_times(user_mode(get_irq_regs())); |
115 | #endif | 113 | #endif |
diff --git a/arch/arm/mach-clps711x/include/mach/time.h b/arch/arm/mach-clps711x/include/mach/time.h index 8fe283ccd1f3..61fef9129c6a 100644 --- a/arch/arm/mach-clps711x/include/mach/time.h +++ b/arch/arm/mach-clps711x/include/mach/time.h | |||
@@ -30,7 +30,7 @@ p720t_timer_interrupt(int irq, void *dev_id) | |||
30 | { | 30 | { |
31 | struct pt_regs *regs = get_irq_regs(); | 31 | struct pt_regs *regs = get_irq_regs(); |
32 | do_leds(); | 32 | do_leds(); |
33 | do_timer(1); | 33 | xtime_update(1); |
34 | #ifndef CONFIG_SMP | 34 | #ifndef CONFIG_SMP |
35 | update_process_times(user_mode(regs)); | 35 | update_process_times(user_mode(regs)); |
36 | #endif | 36 | #endif |
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c index c9113619029f..8d73724c0092 100644 --- a/arch/blackfin/kernel/time.c +++ b/arch/blackfin/kernel/time.c | |||
@@ -114,16 +114,14 @@ u32 arch_gettimeoffset(void) | |||
114 | 114 | ||
115 | /* | 115 | /* |
116 | * timer_interrupt() needs to keep up the real-time clock, | 116 | * timer_interrupt() needs to keep up the real-time clock, |
117 | * as well as call the "do_timer()" routine every clocktick | 117 | * as well as call the "xtime_update()" routine every clocktick |
118 | */ | 118 | */ |
119 | #ifdef CONFIG_CORE_TIMER_IRQ_L1 | 119 | #ifdef CONFIG_CORE_TIMER_IRQ_L1 |
120 | __attribute__((l1_text)) | 120 | __attribute__((l1_text)) |
121 | #endif | 121 | #endif |
122 | irqreturn_t timer_interrupt(int irq, void *dummy) | 122 | irqreturn_t timer_interrupt(int irq, void *dummy) |
123 | { | 123 | { |
124 | write_seqlock(&xtime_lock); | 124 | xtime_update(1); |
125 | do_timer(1); | ||
126 | write_sequnlock(&xtime_lock); | ||
127 | 125 | ||
128 | #ifdef CONFIG_IPIPE | 126 | #ifdef CONFIG_IPIPE |
129 | update_root_process_times(get_irq_regs()); | 127 | update_root_process_times(get_irq_regs()); |
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c index 00eb36f8debf..20c85b5dc7d0 100644 --- a/arch/cris/arch-v10/kernel/time.c +++ b/arch/cris/arch-v10/kernel/time.c | |||
@@ -140,7 +140,7 @@ stop_watchdog(void) | |||
140 | 140 | ||
141 | /* | 141 | /* |
142 | * timer_interrupt() needs to keep up the real-time clock, | 142 | * timer_interrupt() needs to keep up the real-time clock, |
143 | * as well as call the "do_timer()" routine every clocktick | 143 | * as well as call the "xtime_update()" routine every clocktick |
144 | */ | 144 | */ |
145 | 145 | ||
146 | //static unsigned short myjiff; /* used by our debug routine print_timestamp */ | 146 | //static unsigned short myjiff; /* used by our debug routine print_timestamp */ |
@@ -176,7 +176,7 @@ timer_interrupt(int irq, void *dev_id) | |||
176 | 176 | ||
177 | /* call the real timer interrupt handler */ | 177 | /* call the real timer interrupt handler */ |
178 | 178 | ||
179 | do_timer(1); | 179 | xtime_update(1); |
180 | 180 | ||
181 | cris_do_profile(regs); /* Save profiling information */ | 181 | cris_do_profile(regs); /* Save profiling information */ |
182 | return IRQ_HANDLED; | 182 | return IRQ_HANDLED; |
diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c index a545211e999d..bb978ede8985 100644 --- a/arch/cris/arch-v32/kernel/time.c +++ b/arch/cris/arch-v32/kernel/time.c | |||
@@ -183,7 +183,7 @@ void handle_watchdog_bite(struct pt_regs *regs) | |||
183 | 183 | ||
184 | /* | 184 | /* |
185 | * timer_interrupt() needs to keep up the real-time clock, | 185 | * timer_interrupt() needs to keep up the real-time clock, |
186 | * as well as call the "do_timer()" routine every clocktick. | 186 | * as well as call the "xtime_update()" routine every clocktick. |
187 | */ | 187 | */ |
188 | extern void cris_do_profile(struct pt_regs *regs); | 188 | extern void cris_do_profile(struct pt_regs *regs); |
189 | 189 | ||
@@ -216,9 +216,7 @@ static inline irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
216 | return IRQ_HANDLED; | 216 | return IRQ_HANDLED; |
217 | 217 | ||
218 | /* Call the real timer interrupt handler */ | 218 | /* Call the real timer interrupt handler */ |
219 | write_seqlock(&xtime_lock); | 219 | xtime_update(1); |
220 | do_timer(1); | ||
221 | write_sequnlock(&xtime_lock); | ||
222 | return IRQ_HANDLED; | 220 | return IRQ_HANDLED; |
223 | } | 221 | } |
224 | 222 | ||
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index 0ddbbae83cb2..b457de496b70 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c | |||
@@ -50,21 +50,13 @@ static struct irqaction timer_irq = { | |||
50 | 50 | ||
51 | /* | 51 | /* |
52 | * timer_interrupt() needs to keep up the real-time clock, | 52 | * timer_interrupt() needs to keep up the real-time clock, |
53 | * as well as call the "do_timer()" routine every clocktick | 53 | * as well as call the "xtime_update()" routine every clocktick |
54 | */ | 54 | */ |
55 | static irqreturn_t timer_interrupt(int irq, void *dummy) | 55 | static irqreturn_t timer_interrupt(int irq, void *dummy) |
56 | { | 56 | { |
57 | profile_tick(CPU_PROFILING); | 57 | profile_tick(CPU_PROFILING); |
58 | /* | ||
59 | * Here we are in the timer irq handler. We just have irqs locally | ||
60 | * disabled but we don't know if the timer_bh is running on the other | ||
61 | * CPU. We need to avoid to SMP race with it. NOTE: we don't need | ||
62 | * the irq version of write_lock because as just said we have irq | ||
63 | * locally disabled. -arca | ||
64 | */ | ||
65 | write_seqlock(&xtime_lock); | ||
66 | 58 | ||
67 | do_timer(1); | 59 | xtime_update(1); |
68 | 60 | ||
69 | #ifdef CONFIG_HEARTBEAT | 61 | #ifdef CONFIG_HEARTBEAT |
70 | static unsigned short n; | 62 | static unsigned short n; |
@@ -72,8 +64,6 @@ static irqreturn_t timer_interrupt(int irq, void *dummy) | |||
72 | __set_LEDS(n); | 64 | __set_LEDS(n); |
73 | #endif /* CONFIG_HEARTBEAT */ | 65 | #endif /* CONFIG_HEARTBEAT */ |
74 | 66 | ||
75 | write_sequnlock(&xtime_lock); | ||
76 | |||
77 | update_process_times(user_mode(get_irq_regs())); | 67 | update_process_times(user_mode(get_irq_regs())); |
78 | 68 | ||
79 | return IRQ_HANDLED; | 69 | return IRQ_HANDLED; |
diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index 165005aff9df..32263a138aa6 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c | |||
@@ -35,9 +35,7 @@ void h8300_timer_tick(void) | |||
35 | { | 35 | { |
36 | if (current->pid) | 36 | if (current->pid) |
37 | profile_tick(CPU_PROFILING); | 37 | profile_tick(CPU_PROFILING); |
38 | write_seqlock(&xtime_lock); | 38 | xtime_update(1); |
39 | do_timer(1); | ||
40 | write_sequnlock(&xtime_lock); | ||
41 | update_process_times(user_mode(get_irq_regs())); | 39 | update_process_times(user_mode(get_irq_regs())); |
42 | } | 40 | } |
43 | 41 | ||
diff --git a/arch/h8300/kernel/timer/timer8.c b/arch/h8300/kernel/timer/timer8.c index 3946c0fa8374..7a1533fad47d 100644 --- a/arch/h8300/kernel/timer/timer8.c +++ b/arch/h8300/kernel/timer/timer8.c | |||
@@ -61,7 +61,7 @@ | |||
61 | 61 | ||
62 | /* | 62 | /* |
63 | * timer_interrupt() needs to keep up the real-time clock, | 63 | * timer_interrupt() needs to keep up the real-time clock, |
64 | * as well as call the "do_timer()" routine every clocktick | 64 | * as well as call the "xtime_update()" routine every clocktick |
65 | */ | 65 | */ |
66 | 66 | ||
67 | static irqreturn_t timer_interrupt(int irq, void *dev_id) | 67 | static irqreturn_t timer_interrupt(int irq, void *dev_id) |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 9702fa92489e..156ad803d5b7 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -190,19 +190,10 @@ timer_interrupt (int irq, void *dev_id) | |||
190 | 190 | ||
191 | new_itm += local_cpu_data->itm_delta; | 191 | new_itm += local_cpu_data->itm_delta; |
192 | 192 | ||
193 | if (smp_processor_id() == time_keeper_id) { | 193 | if (smp_processor_id() == time_keeper_id) |
194 | /* | 194 | xtime_update(1); |
195 | * Here we are in the timer irq handler. We have irqs locally | 195 | |
196 | * disabled, but we don't know if the timer_bh is running on | 196 | local_cpu_data->itm_next = new_itm; |
197 | * another CPU. We need to avoid to SMP race by acquiring the | ||
198 | * xtime_lock. | ||
199 | */ | ||
200 | write_seqlock(&xtime_lock); | ||
201 | do_timer(1); | ||
202 | local_cpu_data->itm_next = new_itm; | ||
203 | write_sequnlock(&xtime_lock); | ||
204 | } else | ||
205 | local_cpu_data->itm_next = new_itm; | ||
206 | 197 | ||
207 | if (time_after(new_itm, ia64_get_itc())) | 198 | if (time_after(new_itm, ia64_get_itc())) |
208 | break; | 199 | break; |
@@ -222,7 +213,7 @@ skip_process_time_accounting: | |||
222 | * comfort, we increase the safety margin by | 213 | * comfort, we increase the safety margin by |
223 | * intentionally dropping the next tick(s). We do NOT | 214 | * intentionally dropping the next tick(s). We do NOT |
224 | * update itm.next because that would force us to call | 215 | * update itm.next because that would force us to call |
225 | * do_timer() which in turn would let our clock run | 216 | * xtime_update() which in turn would let our clock run |
226 | * too fast (with the potentially devastating effect | 217 | * too fast (with the potentially devastating effect |
227 | * of losing monotony of time). | 218 | * of losing monotony of time). |
228 | */ | 219 | */ |
diff --git a/arch/ia64/xen/time.c b/arch/ia64/xen/time.c index c1c544513e8d..1f8244a78bee 100644 --- a/arch/ia64/xen/time.c +++ b/arch/ia64/xen/time.c | |||
@@ -139,14 +139,11 @@ consider_steal_time(unsigned long new_itm) | |||
139 | run_posix_cpu_timers(p); | 139 | run_posix_cpu_timers(p); |
140 | delta_itm += local_cpu_data->itm_delta * (stolen + blocked); | 140 | delta_itm += local_cpu_data->itm_delta * (stolen + blocked); |
141 | 141 | ||
142 | if (cpu == time_keeper_id) { | 142 | if (cpu == time_keeper_id) |
143 | write_seqlock(&xtime_lock); | 143 | xtime_update(stolen + blocked); |
144 | do_timer(stolen + blocked); | 144 | |
145 | local_cpu_data->itm_next = delta_itm + new_itm; | 145 | local_cpu_data->itm_next = delta_itm + new_itm; |
146 | write_sequnlock(&xtime_lock); | 146 | |
147 | } else { | ||
148 | local_cpu_data->itm_next = delta_itm + new_itm; | ||
149 | } | ||
150 | per_cpu(xen_stolen_time, cpu) += NS_PER_TICK * stolen; | 147 | per_cpu(xen_stolen_time, cpu) += NS_PER_TICK * stolen; |
151 | per_cpu(xen_blocked_time, cpu) += NS_PER_TICK * blocked; | 148 | per_cpu(xen_blocked_time, cpu) += NS_PER_TICK * blocked; |
152 | } | 149 | } |
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c index bda86820bffd..84dd04048db9 100644 --- a/arch/m32r/kernel/time.c +++ b/arch/m32r/kernel/time.c | |||
@@ -107,15 +107,14 @@ u32 arch_gettimeoffset(void) | |||
107 | 107 | ||
108 | /* | 108 | /* |
109 | * timer_interrupt() needs to keep up the real-time clock, | 109 | * timer_interrupt() needs to keep up the real-time clock, |
110 | * as well as call the "do_timer()" routine every clocktick | 110 | * as well as call the "xtime_update()" routine every clocktick |
111 | */ | 111 | */ |
112 | static irqreturn_t timer_interrupt(int irq, void *dev_id) | 112 | static irqreturn_t timer_interrupt(int irq, void *dev_id) |
113 | { | 113 | { |
114 | #ifndef CONFIG_SMP | 114 | #ifndef CONFIG_SMP |
115 | profile_tick(CPU_PROFILING); | 115 | profile_tick(CPU_PROFILING); |
116 | #endif | 116 | #endif |
117 | /* XXX FIXME. Uh, the xtime_lock should be held here, no? */ | 117 | xtime_update(1); |
118 | do_timer(1); | ||
119 | 118 | ||
120 | #ifndef CONFIG_SMP | 119 | #ifndef CONFIG_SMP |
121 | update_process_times(user_mode(get_irq_regs())); | 120 | update_process_times(user_mode(get_irq_regs())); |
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c index 9fe6fefb5e14..1edd95095cb4 100644 --- a/arch/m68k/bvme6000/config.c +++ b/arch/m68k/bvme6000/config.c | |||
@@ -45,8 +45,8 @@ extern int bvme6000_set_clock_mmss (unsigned long); | |||
45 | extern void bvme6000_reset (void); | 45 | extern void bvme6000_reset (void); |
46 | void bvme6000_set_vectors (void); | 46 | void bvme6000_set_vectors (void); |
47 | 47 | ||
48 | /* Save tick handler routine pointer, will point to do_timer() in | 48 | /* Save tick handler routine pointer, will point to xtime_update() in |
49 | * kernel/sched.c, called via bvme6000_process_int() */ | 49 | * kernel/timer/timekeeping.c, called via bvme6000_process_int() */ |
50 | 50 | ||
51 | static irq_handler_t tick_handler; | 51 | static irq_handler_t tick_handler; |
52 | 52 | ||
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 06438dac08ff..18b34ee5db3b 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c | |||
@@ -37,11 +37,11 @@ static inline int set_rtc_mmss(unsigned long nowtime) | |||
37 | 37 | ||
38 | /* | 38 | /* |
39 | * timer_interrupt() needs to keep up the real-time clock, | 39 | * timer_interrupt() needs to keep up the real-time clock, |
40 | * as well as call the "do_timer()" routine every clocktick | 40 | * as well as call the "xtime_update()" routine every clocktick |
41 | */ | 41 | */ |
42 | static irqreturn_t timer_interrupt(int irq, void *dummy) | 42 | static irqreturn_t timer_interrupt(int irq, void *dummy) |
43 | { | 43 | { |
44 | do_timer(1); | 44 | xtime_update(1); |
45 | update_process_times(user_mode(get_irq_regs())); | 45 | update_process_times(user_mode(get_irq_regs())); |
46 | profile_tick(CPU_PROFILING); | 46 | profile_tick(CPU_PROFILING); |
47 | 47 | ||
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c index 100baaa692a1..6cb9c3a9b6c9 100644 --- a/arch/m68k/mvme147/config.c +++ b/arch/m68k/mvme147/config.c | |||
@@ -46,8 +46,8 @@ extern void mvme147_reset (void); | |||
46 | 46 | ||
47 | static int bcd2int (unsigned char b); | 47 | static int bcd2int (unsigned char b); |
48 | 48 | ||
49 | /* Save tick handler routine pointer, will point to do_timer() in | 49 | /* Save tick handler routine pointer, will point to xtime_update() in |
50 | * kernel/sched.c, called via mvme147_process_int() */ | 50 | * kernel/time/timekeeping.c, called via mvme147_process_int() */ |
51 | 51 | ||
52 | irq_handler_t tick_handler; | 52 | irq_handler_t tick_handler; |
53 | 53 | ||
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c index 11edf61cc2c4..0b28e2621653 100644 --- a/arch/m68k/mvme16x/config.c +++ b/arch/m68k/mvme16x/config.c | |||
@@ -51,8 +51,8 @@ extern void mvme16x_reset (void); | |||
51 | 51 | ||
52 | int bcd2int (unsigned char b); | 52 | int bcd2int (unsigned char b); |
53 | 53 | ||
54 | /* Save tick handler routine pointer, will point to do_timer() in | 54 | /* Save tick handler routine pointer, will point to xtime_update() in |
55 | * kernel/sched.c, called via mvme16x_process_int() */ | 55 | * kernel/time/timekeeping.c, called via mvme16x_process_int() */ |
56 | 56 | ||
57 | static irq_handler_t tick_handler; | 57 | static irq_handler_t tick_handler; |
58 | 58 | ||
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c index 2d9e21bd313a..6464ad3ae3e6 100644 --- a/arch/m68k/sun3/sun3ints.c +++ b/arch/m68k/sun3/sun3ints.c | |||
@@ -66,7 +66,7 @@ static irqreturn_t sun3_int5(int irq, void *dev_id) | |||
66 | #ifdef CONFIG_SUN3 | 66 | #ifdef CONFIG_SUN3 |
67 | intersil_clear(); | 67 | intersil_clear(); |
68 | #endif | 68 | #endif |
69 | do_timer(1); | 69 | xtime_update(1); |
70 | update_process_times(user_mode(get_irq_regs())); | 70 | update_process_times(user_mode(get_irq_regs())); |
71 | if (!(kstat_cpu(0).irqs[irq] % 20)) | 71 | if (!(kstat_cpu(0).irqs[irq] % 20)) |
72 | sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 160) / 20]); | 72 | sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 160) / 20]); |
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c index d6ac2a43453c..6623909f70e6 100644 --- a/arch/m68knommu/kernel/time.c +++ b/arch/m68knommu/kernel/time.c | |||
@@ -36,7 +36,7 @@ static inline int set_rtc_mmss(unsigned long nowtime) | |||
36 | #ifndef CONFIG_GENERIC_CLOCKEVENTS | 36 | #ifndef CONFIG_GENERIC_CLOCKEVENTS |
37 | /* | 37 | /* |
38 | * timer_interrupt() needs to keep up the real-time clock, | 38 | * timer_interrupt() needs to keep up the real-time clock, |
39 | * as well as call the "do_timer()" routine every clocktick | 39 | * as well as call the "xtime_update()" routine every clocktick |
40 | */ | 40 | */ |
41 | irqreturn_t arch_timer_interrupt(int irq, void *dummy) | 41 | irqreturn_t arch_timer_interrupt(int irq, void *dummy) |
42 | { | 42 | { |
@@ -44,11 +44,7 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy) | |||
44 | if (current->pid) | 44 | if (current->pid) |
45 | profile_tick(CPU_PROFILING); | 45 | profile_tick(CPU_PROFILING); |
46 | 46 | ||
47 | write_seqlock(&xtime_lock); | 47 | xtime_update(1); |
48 | |||
49 | do_timer(1); | ||
50 | |||
51 | write_sequnlock(&xtime_lock); | ||
52 | 48 | ||
53 | update_process_times(user_mode(get_irq_regs())); | 49 | update_process_times(user_mode(get_irq_regs())); |
54 | 50 | ||
diff --git a/arch/mn10300/kernel/time.c b/arch/mn10300/kernel/time.c index 75da468090b9..5b955000626d 100644 --- a/arch/mn10300/kernel/time.c +++ b/arch/mn10300/kernel/time.c | |||
@@ -104,8 +104,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
104 | unsigned tsc, elapse; | 104 | unsigned tsc, elapse; |
105 | irqreturn_t ret; | 105 | irqreturn_t ret; |
106 | 106 | ||
107 | write_seqlock(&xtime_lock); | ||
108 | |||
109 | while (tsc = get_cycles(), | 107 | while (tsc = get_cycles(), |
110 | elapse = tsc - mn10300_last_tsc, /* time elapsed since last | 108 | elapse = tsc - mn10300_last_tsc, /* time elapsed since last |
111 | * tick */ | 109 | * tick */ |
@@ -114,11 +112,9 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
114 | mn10300_last_tsc += MN10300_TSC_PER_HZ; | 112 | mn10300_last_tsc += MN10300_TSC_PER_HZ; |
115 | 113 | ||
116 | /* advance the kernel's time tracking system */ | 114 | /* advance the kernel's time tracking system */ |
117 | do_timer(1); | 115 | xtime_update(1); |
118 | } | 116 | } |
119 | 117 | ||
120 | write_sequnlock(&xtime_lock); | ||
121 | |||
122 | ret = local_timer_interrupt(); | 118 | ret = local_timer_interrupt(); |
123 | #ifdef CONFIG_SMP | 119 | #ifdef CONFIG_SMP |
124 | send_IPI_allbutself(LOCAL_TIMER_IPI); | 120 | send_IPI_allbutself(LOCAL_TIMER_IPI); |
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c index 05511ccb61d2..45b7389d77aa 100644 --- a/arch/parisc/kernel/time.c +++ b/arch/parisc/kernel/time.c | |||
@@ -162,11 +162,8 @@ irqreturn_t __irq_entry timer_interrupt(int irq, void *dev_id) | |||
162 | update_process_times(user_mode(get_irq_regs())); | 162 | update_process_times(user_mode(get_irq_regs())); |
163 | } | 163 | } |
164 | 164 | ||
165 | if (cpu == 0) { | 165 | if (cpu == 0) |
166 | write_seqlock(&xtime_lock); | 166 | xtime_update(ticks_elapsed); |
167 | do_timer(ticks_elapsed); | ||
168 | write_sequnlock(&xtime_lock); | ||
169 | } | ||
170 | 167 | ||
171 | return IRQ_HANDLED; | 168 | return IRQ_HANDLED; |
172 | } | 169 | } |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index aeaa09a3c655..2cdc131b50ac 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -700,10 +700,8 @@ static void pcic_clear_clock_irq(void) | |||
700 | 700 | ||
701 | static irqreturn_t pcic_timer_handler (int irq, void *h) | 701 | static irqreturn_t pcic_timer_handler (int irq, void *h) |
702 | { | 702 | { |
703 | write_seqlock(&xtime_lock); /* Dummy, to show that we remember */ | ||
704 | pcic_clear_clock_irq(); | 703 | pcic_clear_clock_irq(); |
705 | do_timer(1); | 704 | xtime_update(1); |
706 | write_sequnlock(&xtime_lock); | ||
707 | #ifndef CONFIG_SMP | 705 | #ifndef CONFIG_SMP |
708 | update_process_times(user_mode(get_irq_regs())); | 706 | update_process_times(user_mode(get_irq_regs())); |
709 | #endif | 707 | #endif |
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 9c743b1886ff..4211bfc9bcad 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -85,7 +85,7 @@ int update_persistent_clock(struct timespec now) | |||
85 | 85 | ||
86 | /* | 86 | /* |
87 | * timer_interrupt() needs to keep up the real-time clock, | 87 | * timer_interrupt() needs to keep up the real-time clock, |
88 | * as well as call the "do_timer()" routine every clocktick | 88 | * as well as call the "xtime_update()" routine every clocktick |
89 | */ | 89 | */ |
90 | 90 | ||
91 | #define TICK_SIZE (tick_nsec / 1000) | 91 | #define TICK_SIZE (tick_nsec / 1000) |
@@ -96,14 +96,9 @@ static irqreturn_t timer_interrupt(int dummy, void *dev_id) | |||
96 | profile_tick(CPU_PROFILING); | 96 | profile_tick(CPU_PROFILING); |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | /* Protect counter clear so that do_gettimeoffset works */ | ||
100 | write_seqlock(&xtime_lock); | ||
101 | |||
102 | clear_clock_irq(); | 99 | clear_clock_irq(); |
103 | 100 | ||
104 | do_timer(1); | 101 | xtime_update(1); |
105 | |||
106 | write_sequnlock(&xtime_lock); | ||
107 | 102 | ||
108 | #ifndef CONFIG_SMP | 103 | #ifndef CONFIG_SMP |
109 | update_process_times(user_mode(get_irq_regs())); | 104 | update_process_times(user_mode(get_irq_regs())); |
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index f27b709754bf..2f0d7b450150 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
@@ -855,4 +855,5 @@ ia32_sys_call_table: | |||
855 | .quad sys_prlimit64 /* 340 */ | 855 | .quad sys_prlimit64 /* 340 */ |
856 | .quad sys_name_to_handle_at | 856 | .quad sys_name_to_handle_at |
857 | .quad compat_sys_open_by_handle_at | 857 | .quad compat_sys_open_by_handle_at |
858 | .quad compat_sys_clock_adjtime | ||
858 | ia32_syscall_end: | 859 | ia32_syscall_end: |
diff --git a/arch/x86/include/asm/unistd_32.h b/arch/x86/include/asm/unistd_32.h index f4c4973fc2ac..ffaf183c619a 100644 --- a/arch/x86/include/asm/unistd_32.h +++ b/arch/x86/include/asm/unistd_32.h | |||
@@ -348,10 +348,11 @@ | |||
348 | #define __NR_prlimit64 340 | 348 | #define __NR_prlimit64 340 |
349 | #define __NR_name_to_handle_at 341 | 349 | #define __NR_name_to_handle_at 341 |
350 | #define __NR_open_by_handle_at 342 | 350 | #define __NR_open_by_handle_at 342 |
351 | #define __NR_clock_adjtime 343 | ||
351 | 352 | ||
352 | #ifdef __KERNEL__ | 353 | #ifdef __KERNEL__ |
353 | 354 | ||
354 | #define NR_syscalls 343 | 355 | #define NR_syscalls 344 |
355 | 356 | ||
356 | #define __ARCH_WANT_IPC_PARSE_VERSION | 357 | #define __ARCH_WANT_IPC_PARSE_VERSION |
357 | #define __ARCH_WANT_OLD_READDIR | 358 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h index 81a3d5b70235..5466bea670e7 100644 --- a/arch/x86/include/asm/unistd_64.h +++ b/arch/x86/include/asm/unistd_64.h | |||
@@ -673,6 +673,8 @@ __SYSCALL(__NR_prlimit64, sys_prlimit64) | |||
673 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) | 673 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) |
674 | #define __NR_open_by_handle_at 304 | 674 | #define __NR_open_by_handle_at 304 |
675 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) | 675 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) |
676 | #define __NR_clock_adjtime 305 | ||
677 | __SYSCALL(__NR_clock_adjtime, sys_clock_adjtime) | ||
676 | 678 | ||
677 | #ifndef __NO_STUBS | 679 | #ifndef __NO_STUBS |
678 | #define __ARCH_WANT_OLD_READDIR | 680 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S index c314b2199efd..5f181742e8f9 100644 --- a/arch/x86/kernel/syscall_table_32.S +++ b/arch/x86/kernel/syscall_table_32.S | |||
@@ -342,3 +342,4 @@ ENTRY(sys_call_table) | |||
342 | .long sys_prlimit64 /* 340 */ | 342 | .long sys_prlimit64 /* 340 */ |
343 | .long sys_name_to_handle_at | 343 | .long sys_name_to_handle_at |
344 | .long sys_open_by_handle_at | 344 | .long sys_open_by_handle_at |
345 | .long sys_clock_adjtime | ||
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 19df764f6399..f3e5eb43f71c 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c | |||
@@ -96,16 +96,12 @@ again: | |||
96 | update_process_times(user_mode(get_irq_regs())); | 96 | update_process_times(user_mode(get_irq_regs())); |
97 | #endif | 97 | #endif |
98 | 98 | ||
99 | write_seqlock(&xtime_lock); | 99 | xtime_update(1); /* Linux handler in kernel/time/timekeeping */ |
100 | |||
101 | do_timer(1); /* Linux handler in kernel/timer.c */ | ||
102 | 100 | ||
103 | /* Note that writing CCOMPARE clears the interrupt. */ | 101 | /* Note that writing CCOMPARE clears the interrupt. */ |
104 | 102 | ||
105 | next += CCOUNT_PER_JIFFY; | 103 | next += CCOUNT_PER_JIFFY; |
106 | set_linux_timer(next); | 104 | set_linux_timer(next); |
107 | |||
108 | write_sequnlock(&xtime_lock); | ||
109 | } | 105 | } |
110 | 106 | ||
111 | /* Allow platform to do something useful (Wdog). */ | 107 | /* Allow platform to do something useful (Wdog). */ |