diff options
author | Torben Hohn <torbenh@gmx.de> | 2011-01-27 10:00:22 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-01-31 08:55:46 -0500 |
commit | 4ea1b72551d052a3993ef72ce06ecf5bdd125859 (patch) | |
tree | 7062b5bfde1c3a1d417d5e144964baa0fc76620c /arch | |
parent | bb1dfc1cf6c51ca42f7c05029a6f06df9092a0fc (diff) |
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: Torben Hohn <torbenh@gmx.de>
Acked-by: David 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: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/pcic.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/time_32.c | 9 |
2 files changed, 3 insertions, 10 deletions
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())); |