Commit 4ea1b725 authored by Torben Hohn's avatar Torben Hohn Committed by Thomas Gleixner

sparc: Switch do_timer() to xtime_update()

xtime_update() takes the xtime_lock itself.

pcic_clear_clock_irq() and clear_clock_irq do not need
to be protected by xtime_lock.
Signed-off-by: default avatarTorben Hohn <torbenh@gmx.de>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: johnstul@us.ibm.com
Cc: hch@infradead.org
Cc: yong.zhang0@gmail.com
LKML-Reference: <20110127150022.23248.80369.stgit@localhost>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent bb1dfc1c
...@@ -700,10 +700,8 @@ static void pcic_clear_clock_irq(void) ...@@ -700,10 +700,8 @@ static void pcic_clear_clock_irq(void)
static irqreturn_t pcic_timer_handler (int irq, void *h) static irqreturn_t pcic_timer_handler (int irq, void *h)
{ {
write_seqlock(&xtime_lock); /* Dummy, to show that we remember */
pcic_clear_clock_irq(); pcic_clear_clock_irq();
do_timer(1); xtime_update(1);
write_sequnlock(&xtime_lock);
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
update_process_times(user_mode(get_irq_regs())); update_process_times(user_mode(get_irq_regs()));
#endif #endif
......
...@@ -85,7 +85,7 @@ int update_persistent_clock(struct timespec now) ...@@ -85,7 +85,7 @@ int update_persistent_clock(struct timespec now)
/* /*
* timer_interrupt() needs to keep up the real-time clock, * timer_interrupt() needs to keep up the real-time clock,
* as well as call the "do_timer()" routine every clocktick * as well as call the "xtime_update()" routine every clocktick
*/ */
#define TICK_SIZE (tick_nsec / 1000) #define TICK_SIZE (tick_nsec / 1000)
...@@ -96,14 +96,9 @@ static irqreturn_t timer_interrupt(int dummy, void *dev_id) ...@@ -96,14 +96,9 @@ static irqreturn_t timer_interrupt(int dummy, void *dev_id)
profile_tick(CPU_PROFILING); profile_tick(CPU_PROFILING);
#endif #endif
/* Protect counter clear so that do_gettimeoffset works */
write_seqlock(&xtime_lock);
clear_clock_irq(); clear_clock_irq();
do_timer(1); xtime_update(1);
write_sequnlock(&xtime_lock);
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
update_process_times(user_mode(get_irq_regs())); update_process_times(user_mode(get_irq_regs()));
......
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