diff options
Diffstat (limited to 'arch/sh/kernel/time_32.c')
| -rw-r--r-- | arch/sh/kernel/time_32.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c index 2bc04bfee738..7281342c044d 100644 --- a/arch/sh/kernel/time_32.c +++ b/arch/sh/kernel/time_32.c | |||
| @@ -120,10 +120,6 @@ static long last_rtc_update; | |||
| 120 | */ | 120 | */ |
| 121 | void handle_timer_tick(void) | 121 | void handle_timer_tick(void) |
| 122 | { | 122 | { |
| 123 | do_timer(1); | ||
| 124 | #ifndef CONFIG_SMP | ||
| 125 | update_process_times(user_mode(get_irq_regs())); | ||
| 126 | #endif | ||
| 127 | if (current->pid) | 123 | if (current->pid) |
| 128 | profile_tick(CPU_PROFILING); | 124 | profile_tick(CPU_PROFILING); |
| 129 | 125 | ||
| @@ -133,6 +129,16 @@ void handle_timer_tick(void) | |||
| 133 | #endif | 129 | #endif |
| 134 | 130 | ||
| 135 | /* | 131 | /* |
| 132 | * Here we are in the timer irq handler. We just have irqs locally | ||
| 133 | * disabled but we don't know if the timer_bh is running on the other | ||
| 134 | * CPU. We need to avoid to SMP race with it. NOTE: we don' t need | ||
| 135 | * the irq version of write_lock because as just said we have irq | ||
| 136 | * locally disabled. -arca | ||
| 137 | */ | ||
| 138 | write_seqlock(&xtime_lock); | ||
| 139 | do_timer(1); | ||
| 140 | |||
| 141 | /* | ||
| 136 | * If we have an externally synchronized Linux clock, then update | 142 | * If we have an externally synchronized Linux clock, then update |
| 137 | * RTC clock accordingly every ~11 minutes. Set_rtc_mmss() has to be | 143 | * RTC clock accordingly every ~11 minutes. Set_rtc_mmss() has to be |
| 138 | * called as close as possible to 500 ms before the new second starts. | 144 | * called as close as possible to 500 ms before the new second starts. |
| @@ -147,6 +153,11 @@ void handle_timer_tick(void) | |||
| 147 | /* do it again in 60s */ | 153 | /* do it again in 60s */ |
| 148 | last_rtc_update = xtime.tv_sec - 600; | 154 | last_rtc_update = xtime.tv_sec - 600; |
| 149 | } | 155 | } |
| 156 | write_sequnlock(&xtime_lock); | ||
| 157 | |||
| 158 | #ifndef CONFIG_SMP | ||
| 159 | update_process_times(user_mode(get_irq_regs())); | ||
| 160 | #endif | ||
| 150 | } | 161 | } |
| 151 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ | 162 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ |
| 152 | 163 | ||
