aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-22 18:34:39 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-22 18:08:11 -0500
commit8e6dafd6c741cd4679b4de3c5d9698851e4fa59c (patch)
tree43ceda76cfd6de5577bd7df3ef35909051ce6c6c /arch/x86/kernel/setup.c
parentd85a881d780cc7aaebe1b7aefcddbcb939acbe2d (diff)
x86: refactor x86_quirks support
Impact: cleanup Make x86_quirks support more transparent. The highlevel methods are now named: extern void x86_quirk_pre_intr_init(void); extern void x86_quirk_intr_init(void); extern void x86_quirk_trap_init(void); extern void x86_quirk_pre_time_init(void); extern void x86_quirk_time_init(void); This makes it clear that if some platform extension has to do something here that it is considered ... weird, and is discouraged. Also remove arch_hooks.h and move it into setup.h (and other header files where appropriate). Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r--arch/x86/kernel/setup.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index d4de1e4c2045..5b85759e7972 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -74,8 +74,9 @@
74#include <asm/e820.h> 74#include <asm/e820.h>
75#include <asm/mpspec.h> 75#include <asm/mpspec.h>
76#include <asm/setup.h> 76#include <asm/setup.h>
77#include <asm/arch_hooks.h>
78#include <asm/efi.h> 77#include <asm/efi.h>
78#include <asm/timer.h>
79#include <asm/i8259.h>
79#include <asm/sections.h> 80#include <asm/sections.h>
80#include <asm/dmi.h> 81#include <asm/dmi.h>
81#include <asm/io_apic.h> 82#include <asm/io_apic.h>
@@ -987,7 +988,7 @@ void __init setup_arch(char **cmdline_p)
987#ifdef CONFIG_X86_32 988#ifdef CONFIG_X86_32
988 989
989/** 990/**
990 * pre_intr_init_hook - initialisation prior to setting up interrupt vectors 991 * x86_quirk_pre_intr_init - initialisation prior to setting up interrupt vectors
991 * 992 *
992 * Description: 993 * Description:
993 * Perform any necessary interrupt initialisation prior to setting up 994 * Perform any necessary interrupt initialisation prior to setting up
@@ -995,7 +996,7 @@ void __init setup_arch(char **cmdline_p)
995 * interrupts should be initialised here if the machine emulates a PC 996 * interrupts should be initialised here if the machine emulates a PC
996 * in any way. 997 * in any way.
997 **/ 998 **/
998void __init pre_intr_init_hook(void) 999void __init x86_quirk_pre_intr_init(void)
999{ 1000{
1000 if (x86_quirks->arch_pre_intr_init) { 1001 if (x86_quirks->arch_pre_intr_init) {
1001 if (x86_quirks->arch_pre_intr_init()) 1002 if (x86_quirks->arch_pre_intr_init())
@@ -1005,7 +1006,7 @@ void __init pre_intr_init_hook(void)
1005} 1006}
1006 1007
1007/** 1008/**
1008 * intr_init_hook - post gate setup interrupt initialisation 1009 * x86_quirk_intr_init - post gate setup interrupt initialisation
1009 * 1010 *
1010 * Description: 1011 * Description:
1011 * Fill in any interrupts that may have been left out by the general 1012 * Fill in any interrupts that may have been left out by the general
@@ -1013,7 +1014,7 @@ void __init pre_intr_init_hook(void)
1013 * than the devices on the I/O bus (like APIC interrupts in intel MP 1014 * than the devices on the I/O bus (like APIC interrupts in intel MP
1014 * systems) are started here. 1015 * systems) are started here.
1015 **/ 1016 **/
1016void __init intr_init_hook(void) 1017void __init x86_quirk_intr_init(void)
1017{ 1018{
1018 if (x86_quirks->arch_intr_init) { 1019 if (x86_quirks->arch_intr_init) {
1019 if (x86_quirks->arch_intr_init()) 1020 if (x86_quirks->arch_intr_init())
@@ -1022,13 +1023,13 @@ void __init intr_init_hook(void)
1022} 1023}
1023 1024
1024/** 1025/**
1025 * trap_init_hook - initialise system specific traps 1026 * x86_quirk_trap_init - initialise system specific traps
1026 * 1027 *
1027 * Description: 1028 * Description:
1028 * Called as the final act of trap_init(). Used in VISWS to initialise 1029 * Called as the final act of trap_init(). Used in VISWS to initialise
1029 * the various board specific APIC traps. 1030 * the various board specific APIC traps.
1030 **/ 1031 **/
1031void __init trap_init_hook(void) 1032void __init x86_quirk_trap_init(void)
1032{ 1033{
1033 if (x86_quirks->arch_trap_init) { 1034 if (x86_quirks->arch_trap_init) {
1034 if (x86_quirks->arch_trap_init()) 1035 if (x86_quirks->arch_trap_init())
@@ -1044,23 +1045,23 @@ static struct irqaction irq0 = {
1044}; 1045};
1045 1046
1046/** 1047/**
1047 * pre_time_init_hook - do any specific initialisations before. 1048 * x86_quirk_pre_time_init - do any specific initialisations before.
1048 * 1049 *
1049 **/ 1050 **/
1050void __init pre_time_init_hook(void) 1051void __init x86_quirk_pre_time_init(void)
1051{ 1052{
1052 if (x86_quirks->arch_pre_time_init) 1053 if (x86_quirks->arch_pre_time_init)
1053 x86_quirks->arch_pre_time_init(); 1054 x86_quirks->arch_pre_time_init();
1054} 1055}
1055 1056
1056/** 1057/**
1057 * time_init_hook - do any specific initialisations for the system timer. 1058 * x86_quirk_time_init - do any specific initialisations for the system timer.
1058 * 1059 *
1059 * Description: 1060 * Description:
1060 * Must plug the system timer interrupt source at HZ into the IRQ listed 1061 * Must plug the system timer interrupt source at HZ into the IRQ listed
1061 * in irq_vectors.h:TIMER_IRQ 1062 * in irq_vectors.h:TIMER_IRQ
1062 **/ 1063 **/
1063void __init time_init_hook(void) 1064void __init x86_quirk_time_init(void)
1064{ 1065{
1065 if (x86_quirks->arch_time_init) { 1066 if (x86_quirks->arch_time_init) {
1066 /* 1067 /*