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

Commit 63b5d7af authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar
Browse files

x86: add ->pre_time_init to x86_quirks



so NUMAQ can use that to call numaq_pre_time_init()

This allows us to remove a NUMAQ special from arch/x86/kernel/setup.c.

(and paves the way to remove the NUMAQ subarch)

Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 64898a8b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -84,6 +84,12 @@ void __init numaq_tsc_disable(void)
	}
}

static int __init numaq_pre_time_init(void)
{
	numaq_tsc_disable();
	return 0;
}

int found_numaq;
/*
 * Have to match translation table entries to main table entries by counter
@@ -224,6 +230,7 @@ static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable,
}

static struct x86_quirks numaq_x86_quirks __initdata = {
	.arch_pre_time_init	= numaq_pre_time_init,
	.arch_time_init		= NULL,
	.arch_pre_intr_init	= NULL,
	.arch_memory_setup	= NULL,
+0 −8
Original line number Diff line number Diff line
@@ -853,14 +853,6 @@ void __init setup_arch(char **cmdline_p)
	init_cpu_to_node();
#endif

#ifdef CONFIG_X86_NUMAQ
	/*
	 * need to check online nodes num, call it
	 * here before time_init/tsc_init
	 */
	numaq_tsc_disable();
#endif

	init_apic_mappings();
	ioapic_init_mappings();

+1 −0
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ void __init hpet_time_init(void)
 */
void __init time_init(void)
{
	pre_time_init_hook();
	tsc_init();
	late_time_init = choose_time_init();
}
+10 −0
Original line number Diff line number Diff line
@@ -102,6 +102,16 @@ static struct irqaction irq0 = {
	.name = "timer"
};

/**
 * pre_time_init_hook - do any specific initialisations before.
 *
 **/
void __init pre_time_init_hook(void)
{
	if (x86_quirks->arch_pre_time_init)
		x86_quirks->arch_pre_time_init();
}

/**
 * time_init_hook - do any specific initialisations for the system timer.
 *
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ extern void intr_init_hook(void);
extern void pre_intr_init_hook(void);
extern void pre_setup_arch_hook(void);
extern void trap_init_hook(void);
extern void pre_time_init_hook(void);
extern void time_init_hook(void);
extern void mca_nmi_hook(void);

Loading