diff options
author | Paul Mackerras <paulus@samba.org> | 2010-06-20 15:04:14 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-08 21:26:16 -0400 |
commit | c1aa687d499a8bce55cb8cf962f0b72c0f933f14 (patch) | |
tree | d109be2df88ec056659b7ff4192bfa7e405ff9c4 /arch/powerpc/include | |
parent | 8fd63a9ea7528463211a6c88d500c51851d960c8 (diff) |
powerpc: Clean up obsolete code relating to decrementer and timebase
Since the decrementer and timekeeping code was moved over to using
the generic clockevents and timekeeping infrastructure, several
variables and functions have been obsolete and effectively unused.
This deletes them.
In particular, wakeup_decrementer() is no longer needed since the
generic code reprograms the decrementer as part of the process of
resuming the timekeeping code, which happens during sysdev resume.
Thus the wakeup_decrementer calls in the suspend_enter methods for
52xx platforms have been removed. The call in the powermac cpu
frequency change code has been replaced by set_dec(1), which will
cause a timer interrupt as soon as interrupts are enabled, and the
generic code will then reprogram the decrementer with the correct
value.
This also simplifies the generic_suspend_en/disable_irqs functions
and makes them static since they are not referenced outside time.c.
The preempt_enable/disable calls are removed because the generic
code has disabled all but the boot cpu at the point where these
functions are called, so we can't be moved to another cpu.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/machdep.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/time.h | 7 |
2 files changed, 0 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 9f0fc9e6ce0d..7716e68f7b18 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h | |||
@@ -366,8 +366,5 @@ static inline void log_error(char *buf, unsigned int err_type, int fatal) | |||
366 | #define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7) | 366 | #define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7) |
367 | #define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s) | 367 | #define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s) |
368 | 368 | ||
369 | void generic_suspend_disable_irqs(void); | ||
370 | void generic_suspend_enable_irqs(void); | ||
371 | |||
372 | #endif /* __KERNEL__ */ | 369 | #endif /* __KERNEL__ */ |
373 | #endif /* _ASM_POWERPC_MACHDEP_H */ | 370 | #endif /* _ASM_POWERPC_MACHDEP_H */ |
diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h index 27ccb764fdab..dc779dfcf258 100644 --- a/arch/powerpc/include/asm/time.h +++ b/arch/powerpc/include/asm/time.h | |||
@@ -28,16 +28,12 @@ | |||
28 | extern unsigned long tb_ticks_per_jiffy; | 28 | extern unsigned long tb_ticks_per_jiffy; |
29 | extern unsigned long tb_ticks_per_usec; | 29 | extern unsigned long tb_ticks_per_usec; |
30 | extern unsigned long tb_ticks_per_sec; | 30 | extern unsigned long tb_ticks_per_sec; |
31 | extern u64 tb_to_xs; | ||
32 | extern unsigned tb_to_us; | ||
33 | 31 | ||
34 | struct rtc_time; | 32 | struct rtc_time; |
35 | extern void to_tm(int tim, struct rtc_time * tm); | 33 | extern void to_tm(int tim, struct rtc_time * tm); |
36 | extern void GregorianDay(struct rtc_time *tm); | 34 | extern void GregorianDay(struct rtc_time *tm); |
37 | extern time_t last_rtc_update; | ||
38 | 35 | ||
39 | extern void generic_calibrate_decr(void); | 36 | extern void generic_calibrate_decr(void); |
40 | extern void wakeup_decrementer(void); | ||
41 | extern void snapshot_timebase(void); | 37 | extern void snapshot_timebase(void); |
42 | 38 | ||
43 | extern void set_dec_cpu6(unsigned int val); | 39 | extern void set_dec_cpu6(unsigned int val); |
@@ -204,9 +200,6 @@ static inline unsigned long tb_ticks_since(unsigned long tstamp) | |||
204 | extern u64 mulhdu(u64, u64); | 200 | extern u64 mulhdu(u64, u64); |
205 | #endif | 201 | #endif |
206 | 202 | ||
207 | extern void smp_space_timers(unsigned int); | ||
208 | |||
209 | extern unsigned mulhwu_scale_factor(unsigned, unsigned); | ||
210 | extern void div128_by_32(u64 dividend_high, u64 dividend_low, | 203 | extern void div128_by_32(u64 dividend_high, u64 dividend_low, |
211 | unsigned divisor, struct div_result *dr); | 204 | unsigned divisor, struct div_result *dr); |
212 | 205 | ||