diff options
Diffstat (limited to 'arch/mips/kernel/time.c')
-rw-r--r-- | arch/mips/kernel/time.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 0dd0df7a3b04..a24651dfaaba 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * Free Software Foundation; either version 2 of the License, or (at your | 11 | * Free Software Foundation; either version 2 of the License, or (at your |
12 | * option) any later version. | 12 | * option) any later version. |
13 | */ | 13 | */ |
14 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
15 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
@@ -25,6 +26,7 @@ | |||
25 | #include <linux/module.h> | 26 | #include <linux/module.h> |
26 | 27 | ||
27 | #include <asm/bootinfo.h> | 28 | #include <asm/bootinfo.h> |
29 | #include <asm/cache.h> | ||
28 | #include <asm/compiler.h> | 30 | #include <asm/compiler.h> |
29 | #include <asm/cpu.h> | 31 | #include <asm/cpu.h> |
30 | #include <asm/cpu-features.h> | 32 | #include <asm/cpu-features.h> |
@@ -76,7 +78,7 @@ int (*rtc_set_mmss)(unsigned long); | |||
76 | static unsigned int sll32_usecs_per_cycle; | 78 | static unsigned int sll32_usecs_per_cycle; |
77 | 79 | ||
78 | /* how many counter cycles in a jiffy */ | 80 | /* how many counter cycles in a jiffy */ |
79 | static unsigned long cycles_per_jiffy; | 81 | static unsigned long cycles_per_jiffy __read_mostly; |
80 | 82 | ||
81 | /* Cycle counter value at the previous timer interrupt.. */ | 83 | /* Cycle counter value at the previous timer interrupt.. */ |
82 | static unsigned int timerhi, timerlo; | 84 | static unsigned int timerhi, timerlo; |
@@ -98,7 +100,10 @@ static unsigned int null_hpt_read(void) | |||
98 | return 0; | 100 | return 0; |
99 | } | 101 | } |
100 | 102 | ||
101 | static void null_hpt_init(unsigned int count) { /* nothing */ } | 103 | static void null_hpt_init(unsigned int count) |
104 | { | ||
105 | /* nothing */ | ||
106 | } | ||
102 | 107 | ||
103 | 108 | ||
104 | /* | 109 | /* |
@@ -108,8 +113,10 @@ static void c0_timer_ack(void) | |||
108 | { | 113 | { |
109 | unsigned int count; | 114 | unsigned int count; |
110 | 115 | ||
116 | #ifndef CONFIG_SOC_PNX8550 /* pnx8550 resets to zero */ | ||
111 | /* Ack this timer interrupt and set the next one. */ | 117 | /* Ack this timer interrupt and set the next one. */ |
112 | expirelo += cycles_per_jiffy; | 118 | expirelo += cycles_per_jiffy; |
119 | #endif | ||
113 | write_c0_compare(expirelo); | 120 | write_c0_compare(expirelo); |
114 | 121 | ||
115 | /* Check to see if we have missed any timer interrupts. */ | 122 | /* Check to see if we have missed any timer interrupts. */ |
@@ -224,7 +231,6 @@ int do_settimeofday(struct timespec *tv) | |||
224 | set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); | 231 | set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); |
225 | 232 | ||
226 | ntp_clear(); | 233 | ntp_clear(); |
227 | |||
228 | write_sequnlock_irq(&xtime_lock); | 234 | write_sequnlock_irq(&xtime_lock); |
229 | clock_was_set(); | 235 | clock_was_set(); |
230 | return 0; | 236 | return 0; |