sched/clock: Move sched clock initialization and merge with generic clock
sched_clock_postinit() initializes a generic clock on systems where no other clock is provided. This function may be called only after timekeeping_init(). Rename sched_clock_postinit to generic_clock_inti() and call it from sched_clock_init(). Move the call for sched_clock_init() until after time_init(). Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: steven.sistare@oracle.com Cc: daniel.m.jordan@oracle.com Cc: linux@armlinux.org.uk Cc: schwidefsky@de.ibm.com Cc: heiko.carstens@de.ibm.com Cc: john.stultz@linaro.org Cc: sboyd@codeaurora.org Cc: hpa@zytor.com Cc: douly.fnst@cn.fujitsu.com Cc: prarit@redhat.com Cc: feng.tang@intel.com Cc: pmladek@suse.com Cc: gnomes@lxorguk.ukuu.org.uk Cc: linux-s390@vger.kernel.org Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: pbonzini@redhat.com Link: https://lkml.kernel.org/r/20180719205545.16512-23-pasha.tatashin@oracle.com
This commit is contained in:

committed by
Thomas Gleixner

parent
4763f03d3d
commit
5d2a4e91a5
@@ -9,17 +9,16 @@
|
||||
#define LINUX_SCHED_CLOCK
|
||||
|
||||
#ifdef CONFIG_GENERIC_SCHED_CLOCK
|
||||
extern void sched_clock_postinit(void);
|
||||
extern void generic_sched_clock_init(void);
|
||||
|
||||
extern void sched_clock_register(u64 (*read)(void), int bits,
|
||||
unsigned long rate);
|
||||
#else
|
||||
static inline void sched_clock_postinit(void) { }
|
||||
static inline void generic_sched_clock_init(void) { }
|
||||
|
||||
static inline void sched_clock_register(u64 (*read)(void), int bits,
|
||||
unsigned long rate)
|
||||
{
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user