Commit 078c0bba authored by Ingo Molnar's avatar Ingo Molnar

x86, VisWS: turn into generic arch, add early quirks to default architectures

add early quirk support to the generic architecture code.

this allows VISWS to be supported by the generic code and allows us
to remove the VISWS subarch.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 8bfaba87
...@@ -10,6 +10,14 @@ ...@@ -10,6 +10,14 @@
#include <asm/e820.h> #include <asm/e820.h>
#include <asm/setup.h> #include <asm/setup.h>
/*
* Any quirks to be performed to initialize timers/irqs/etc?
*/
int (*arch_time_init_quirk)(void);
int (*arch_pre_intr_init_quirk)(void);
int (*arch_intr_init_quirk)(void);
int (*arch_trap_init_quirk)(void);
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
#define DEFAULT_SEND_IPI (1) #define DEFAULT_SEND_IPI (1)
#else #else
...@@ -29,6 +37,10 @@ int no_broadcast=DEFAULT_SEND_IPI; ...@@ -29,6 +37,10 @@ int no_broadcast=DEFAULT_SEND_IPI;
**/ **/
void __init pre_intr_init_hook(void) void __init pre_intr_init_hook(void)
{ {
if (arch_pre_intr_init_quirk) {
if (arch_pre_intr_init_quirk())
return;
}
init_ISA_irqs(); init_ISA_irqs();
} }
...@@ -52,6 +64,10 @@ static struct irqaction irq2 = { ...@@ -52,6 +64,10 @@ static struct irqaction irq2 = {
**/ **/
void __init intr_init_hook(void) void __init intr_init_hook(void)
{ {
if (arch_intr_init_quirk) {
if (arch_intr_init_quirk())
return;
}
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
apic_intr_init(); apic_intr_init();
#endif #endif
...@@ -81,6 +97,10 @@ void __init pre_setup_arch_hook(void) ...@@ -81,6 +97,10 @@ void __init pre_setup_arch_hook(void)
**/ **/
void __init trap_init_hook(void) void __init trap_init_hook(void)
{ {
if (arch_trap_init_quirk) {
if (arch_trap_init_quirk())
return;
}
} }
static struct irqaction irq0 = { static struct irqaction irq0 = {
...@@ -99,6 +119,16 @@ static struct irqaction irq0 = { ...@@ -99,6 +119,16 @@ static struct irqaction irq0 = {
**/ **/
void __init time_init_hook(void) void __init time_init_hook(void)
{ {
if (arch_time_init_quirk) {
/*
* A nonzero return code does not mean failure, it means
* that the architecture quirk does not want any
* generic (timer) setup to be performed after this:
*/
if (arch_time_init_quirk())
return;
}
irq0.mask = cpumask_of_cpu(0); irq0.mask = cpumask_of_cpu(0);
setup_irq(0, &irq0); setup_irq(0, &irq0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment