Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 845b3944 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

x86: Add timer_init to x86_init_ops



The timer init code is convoluted with several quirks and the paravirt
timer chooser. Figuring out which code path is actually taken is not
for the faint hearted.

Move the numaq TSC quirk to tsc_pre_init x86_init_ops function and
replace the paravirt time chooser and the remaining x86 quirk with a
simple x86_init_ops function.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 736decac
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -34,11 +34,6 @@ static inline int set_wallclock(unsigned long nowtime)
	return PVOP_CALL1(int, pv_time_ops.set_wallclock, nowtime);
}

static inline void (*choose_time_init(void))(void)
{
	return pv_time_ops.time_init;
}

/* The paravirtualized CPUID instruction. */
static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
			   unsigned int *ecx, unsigned int *edx)
+0 −2
Original line number Diff line number Diff line
@@ -88,8 +88,6 @@ struct pv_lazy_ops {
};

struct pv_time_ops {
	void (*time_init)(void);

	/* Set and set time of day */
	unsigned long (*get_wallclock)(void);
	int (*set_wallclock)(unsigned long);
+2 −19
Original line number Diff line number Diff line
@@ -5,24 +5,6 @@

#define COMMAND_LINE_SIZE 2048

#ifndef __ASSEMBLY__

#include <asm/x86_init.h>

/*
 * Any setup quirks to be performed?
 */

struct x86_quirks {
	int (*arch_pre_time_init)(void);
	int (*arch_time_init)(void);
};

extern void x86_quirk_pre_time_init(void);
extern void x86_quirk_time_init(void);

#endif /* __ASSEMBLY__ */

#ifdef __i386__

#include <linux/pfn.h>
@@ -42,6 +24,7 @@ extern void x86_quirk_time_init(void);

#ifndef __ASSEMBLY__
#include <asm/bootparam.h>
#include <asm/x86_init.h>

/* Interrupt control for vSMPowered x86_64 systems */
#ifdef CONFIG_X86_64
@@ -60,11 +43,11 @@ static inline void visws_early_detect(void) { }
static inline int is_visws_box(void) { return 0; }
#endif

extern struct x86_quirks *x86_quirks;
extern unsigned long saved_video_mode;

extern void reserve_standard_io_resources(void);
extern void i386_reserve_resources(void);
extern void setup_default_timer_irq(void);

#ifndef _SETUP

+0 −1
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ extern void time_init(void);

#define get_wallclock() native_get_wallclock()
#define set_wallclock(x) native_set_wallclock(x)
#define choose_time_init() hpet_time_init

#endif /* CONFIG_PARAVIRT */

+1 −2
Original line number Diff line number Diff line
@@ -12,8 +12,7 @@ unsigned long native_calibrate_tsc(void);

#ifdef CONFIG_X86_32
extern int timer_ack;
extern irqreturn_t timer_interrupt(int irq, void *dev_id);
#endif /* CONFIG_X86_32 */
#endif
extern int recalibrate_cpu_khz(void);

extern int no_timer_check;
Loading