diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-08-24 05:01:46 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:53:01 -0400 |
commit | b3c5117050e8028d48b2fa0ea09c7a50dd7f3414 (patch) | |
tree | 3919939c185da0cd4b65836588133b2d8edf8f0b /arch | |
parent | 6460bc73aac970135104a0bc407c2c8b85394d59 (diff) |
x86: apic_xx.c order variables
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/apic_32.c | 46 | ||||
-rw-r--r-- | arch/x86/kernel/apic_64.c | 48 |
2 files changed, 56 insertions, 38 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 913d9924b101..a54512bea629 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -50,16 +50,37 @@ | |||
50 | # error SPURIOUS_APIC_VECTOR definition error | 50 | # error SPURIOUS_APIC_VECTOR definition error |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | unsigned long mp_lapic_addr; | 53 | #ifdef CONFIG_X86_32 |
54 | |||
55 | /* | 54 | /* |
56 | * Knob to control our willingness to enable the local APIC. | 55 | * Knob to control our willingness to enable the local APIC. |
57 | * | 56 | * |
58 | * +1=force-enable | 57 | * +1=force-enable |
59 | */ | 58 | */ |
60 | static int force_enable_local_apic; | 59 | static int force_enable_local_apic; |
61 | int disable_apic; | 60 | /* |
61 | * APIC command line parameters | ||
62 | */ | ||
63 | static int __init parse_lapic(char *arg) | ||
64 | { | ||
65 | force_enable_local_apic = 1; | ||
66 | return 0; | ||
67 | } | ||
68 | early_param("lapic", parse_lapic); | ||
69 | #endif | ||
62 | 70 | ||
71 | #ifdef CONFIG_X86_64 | ||
72 | static int apic_calibrate_pmtmr __initdata; | ||
73 | static __init int setup_apicpmtimer(char *s) | ||
74 | { | ||
75 | apic_calibrate_pmtmr = 1; | ||
76 | notsc_setup(NULL); | ||
77 | return 0; | ||
78 | } | ||
79 | __setup("apicpmtimer", setup_apicpmtimer); | ||
80 | #endif | ||
81 | |||
82 | unsigned long mp_lapic_addr; | ||
83 | int disable_apic; | ||
63 | /* Disable local APIC timer from the kernel commandline or via dmi quirk */ | 84 | /* Disable local APIC timer from the kernel commandline or via dmi quirk */ |
64 | static int disable_apic_timer __cpuinitdata; | 85 | static int disable_apic_timer __cpuinitdata; |
65 | /* Local APIC timer works in C2 */ | 86 | /* Local APIC timer works in C2 */ |
@@ -1742,15 +1763,6 @@ static void apic_pm_activate(void) { } | |||
1742 | 1763 | ||
1743 | #endif /* CONFIG_PM */ | 1764 | #endif /* CONFIG_PM */ |
1744 | 1765 | ||
1745 | /* | ||
1746 | * APIC command line parameters | ||
1747 | */ | ||
1748 | static int __init parse_lapic(char *arg) | ||
1749 | { | ||
1750 | force_enable_local_apic = 1; | ||
1751 | return 0; | ||
1752 | } | ||
1753 | early_param("lapic", parse_lapic); | ||
1754 | 1766 | ||
1755 | static int __init setup_disableapic(char *arg) | 1767 | static int __init setup_disableapic(char *arg) |
1756 | { | 1768 | { |
@@ -1788,16 +1800,6 @@ static int __init parse_nolapic_timer(char *arg) | |||
1788 | } | 1800 | } |
1789 | early_param("nolapic_timer", parse_nolapic_timer); | 1801 | early_param("nolapic_timer", parse_nolapic_timer); |
1790 | 1802 | ||
1791 | #ifdef CONFIG_X86_64 | ||
1792 | static __init int setup_apicpmtimer(char *s) | ||
1793 | { | ||
1794 | apic_calibrate_pmtmr = 1; | ||
1795 | notsc_setup(NULL); | ||
1796 | return 0; | ||
1797 | } | ||
1798 | __setup("apicpmtimer", setup_apicpmtimer); | ||
1799 | #endif | ||
1800 | |||
1801 | static int __init apic_set_verbosity(char *arg) | 1803 | static int __init apic_set_verbosity(char *arg) |
1802 | { | 1804 | { |
1803 | if (!arg) { | 1805 | if (!arg) { |
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index 2e109119f647..c40a900e155b 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -53,16 +53,44 @@ | |||
53 | # error SPURIOUS_APIC_VECTOR definition error | 53 | # error SPURIOUS_APIC_VECTOR definition error |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | /* Disable local APIC timer from the kernel commandline or via dmi quirk */ | 56 | #ifdef CONFIG_X86_32 |
57 | static int disable_apic_timer __cpuinitdata; | 57 | /* |
58 | * Knob to control our willingness to enable the local APIC. | ||
59 | * | ||
60 | * +1=force-enable | ||
61 | */ | ||
62 | static int force_enable_local_apic; | ||
63 | /* | ||
64 | * APIC command line parameters | ||
65 | */ | ||
66 | static int __init parse_lapic(char *arg) | ||
67 | { | ||
68 | force_enable_local_apic = 1; | ||
69 | return 0; | ||
70 | } | ||
71 | early_param("lapic", parse_lapic); | ||
72 | #endif | ||
73 | |||
74 | #ifdef CONFIG_X86_64 | ||
58 | static int apic_calibrate_pmtmr __initdata; | 75 | static int apic_calibrate_pmtmr __initdata; |
59 | int disable_apic; | 76 | static __init int setup_apicpmtimer(char *s) |
77 | { | ||
78 | apic_calibrate_pmtmr = 1; | ||
79 | notsc_setup(NULL); | ||
80 | return 0; | ||
81 | } | ||
82 | __setup("apicpmtimer", setup_apicpmtimer); | ||
83 | #endif | ||
84 | |||
60 | int disable_x2apic; | 85 | int disable_x2apic; |
61 | int x2apic; | 86 | int x2apic; |
62 | |||
63 | /* x2apic enabled before OS handover */ | 87 | /* x2apic enabled before OS handover */ |
64 | int x2apic_preenabled; | 88 | int x2apic_preenabled; |
65 | 89 | ||
90 | unsigned long mp_lapic_addr; | ||
91 | int disable_apic; | ||
92 | /* Disable local APIC timer from the kernel commandline or via dmi quirk */ | ||
93 | static int disable_apic_timer __cpuinitdata; | ||
66 | /* Local APIC timer works in C2 */ | 94 | /* Local APIC timer works in C2 */ |
67 | int local_apic_timer_c2_ok; | 95 | int local_apic_timer_c2_ok; |
68 | EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); | 96 | EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); |
@@ -113,8 +141,6 @@ static DEFINE_PER_CPU(struct clock_event_device, lapic_events); | |||
113 | 141 | ||
114 | static unsigned long apic_phys; | 142 | static unsigned long apic_phys; |
115 | 143 | ||
116 | unsigned long mp_lapic_addr; | ||
117 | |||
118 | /* | 144 | /* |
119 | * Get the LAPIC version | 145 | * Get the LAPIC version |
120 | */ | 146 | */ |
@@ -1858,16 +1884,6 @@ static int __init parse_nolapic_timer(char *arg) | |||
1858 | } | 1884 | } |
1859 | early_param("nolapic_timer", parse_nolapic_timer); | 1885 | early_param("nolapic_timer", parse_nolapic_timer); |
1860 | 1886 | ||
1861 | #ifdef CONFIG_X86_64 | ||
1862 | static __init int setup_apicpmtimer(char *s) | ||
1863 | { | ||
1864 | apic_calibrate_pmtmr = 1; | ||
1865 | notsc_setup(NULL); | ||
1866 | return 0; | ||
1867 | } | ||
1868 | __setup("apicpmtimer", setup_apicpmtimer); | ||
1869 | #endif | ||
1870 | |||
1871 | static int __init apic_set_verbosity(char *arg) | 1887 | static int __init apic_set_verbosity(char *arg) |
1872 | { | 1888 | { |
1873 | if (!arg) { | 1889 | if (!arg) { |