[PATCH 08/18] x86: apic_xx.c order variables

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, Andrew Morton <akpm@...>
Cc: <linux-kernel@...>, Yinghai Lu <yhlu.kernel@...>
Date: Sunday, August 24, 2008 - 5:01 am

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
---
 arch/x86/kernel/apic_32.c |   46 ++++++++++++++++++++++--------------------
 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 0f52bdd..cbac5ff 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -50,16 +50,37 @@
 # error SPURIOUS_APIC_VECTOR definition error
 #endif
 
-unsigned long mp_lapic_addr;
-
+#ifdef CONFIG_X86_32
 /*
  * Knob to control our willingness to enable the local APIC.
  *
  * +1=force-enable
  */
 static int force_enable_local_apic;
-int disable_apic;
+/*
+ * APIC command line parameters
+ */
+static int __init parse_lapic(char *arg)
+{
+	force_enable_local_apic = 1;
+	return 0;
+}
+early_param("lapic", parse_lapic);
+#endif
 
+#ifdef CONFIG_X86_64
+static int apic_calibrate_pmtmr __initdata;
+static __init int setup_apicpmtimer(char *s)
+{
+	apic_calibrate_pmtmr = 1;
+	notsc_setup(NULL);
+	return 0;
+}
+__setup("apicpmtimer", setup_apicpmtimer);
+#endif
+
+unsigned long mp_lapic_addr;
+int disable_apic;
 /* Disable local APIC timer from the kernel commandline or via dmi quirk */
 static int disable_apic_timer __cpuinitdata;
 /* Local APIC timer works in C2 */
@@ -1742,15 +1763,6 @@ static void apic_pm_activate(void) { }
 
 #endif	/* CONFIG_PM */
 
-/*
- * APIC command line parameters
- */
-static int __init parse_lapic(char *arg)
-{
-	force_enable_local_apic = 1;
-	return 0;
-}
-early_param("lapic", parse_lapic);
 
 static int __init setup_disableapic(char *arg)
 {
@@ -1788,16 +1800,6 @@ static int __init parse_nolapic_timer(char *arg)
 }
 early_param("nolapic_timer", parse_nolapic_timer);
 
-#ifdef CONFIG_X86_64
-static __init int setup_apicpmtimer(char *s)
-{
-	apic_calibrate_pmtmr = 1;
-	notsc_setup(NULL);
-	return 0;
-}
-__setup("apicpmtimer", setup_apicpmtimer);
-#endif
-
 static int __init apic_set_verbosity(char *arg)
 {
 	if (!arg)  {
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 2e10911..c40a900 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -53,16 +53,44 @@
 # error SPURIOUS_APIC_VECTOR definition error
 #endif
 
-/* Disable local APIC timer from the kernel commandline or via dmi quirk */
-static int disable_apic_timer __cpuinitdata;
+#ifdef CONFIG_X86_32
+/*
+ * Knob to control our willingness to enable the local APIC.
+ *
+ * +1=force-enable
+ */
+static int force_enable_local_apic;
+/*
+ * APIC command line parameters
+ */
+static int __init parse_lapic(char *arg)
+{
+	force_enable_local_apic = 1;
+	return 0;
+}
+early_param("lapic", parse_lapic);
+#endif
+
+#ifdef CONFIG_X86_64
 static int apic_calibrate_pmtmr __initdata;
-int disable_apic;
+static __init int setup_apicpmtimer(char *s)
+{
+	apic_calibrate_pmtmr = 1;
+	notsc_setup(NULL);
+	return 0;
+}
+__setup("apicpmtimer", setup_apicpmtimer);
+#endif
+
 int disable_x2apic;
 int x2apic;
-
 /* x2apic enabled before OS handover */
 int x2apic_preenabled;
 
+unsigned long mp_lapic_addr;
+int disable_apic;
+/* Disable local APIC timer from the kernel commandline or via dmi quirk */
+static int disable_apic_timer __cpuinitdata;
 /* Local APIC timer works in C2 */
 int local_apic_timer_c2_ok;
 EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok);
@@ -113,8 +141,6 @@ static DEFINE_PER_CPU(struct clock_event_device, lapic_events);
 
 static unsigned long apic_phys;
 
-unsigned long mp_lapic_addr;
-
 /*
  * Get the LAPIC version
  */
@@ -1858,16 +1884,6 @@ static int __init parse_nolapic_timer(char *arg)
 }
 early_param("nolapic_timer", parse_nolapic_timer);
 
-#ifdef CONFIG_X86_64
-static __init int setup_apicpmtimer(char *s)
-{
-	apic_calibrate_pmtmr = 1;
-	notsc_setup(NULL);
-	return 0;
-}
-__setup("apicpmtimer", setup_apicpmtimer);
-#endif
-
 static int __init apic_set_verbosity(char *arg)
 {
 	if (!arg)  {
-- 
1.5.4.5

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
An idea .... with code, jassi brar, (Sun Aug 24, 4:53 am)
[PATCH 00/18] merge apic_32.c and apic_64.c, Yinghai Lu, (Sun Aug 24, 5:01 am)
Re: An idea .... with code, Andi Kleen, (Tue Aug 26, 4:24 am)
Re: An idea .... with code, jassi brar, (Wed Aug 27, 3:24 am)
Re: An idea .... with code, Andi Kleen, (Wed Aug 27, 3:47 am)
Re: An idea .... with code, jassi brar, (Wed Aug 27, 8:38 am)
Re: An idea .... with code, Andi Kleen, (Wed Aug 27, 8:47 am)
Re: An idea .... with code, Kasper Sandberg, (Wed Aug 27, 10:49 am)
Re: An idea .... with code, Bill Davidsen, (Fri Aug 29, 10:57 pm)
Re: An idea .... with code, Andi Kleen, (Wed Aug 27, 11:02 am)
Re: An idea .... with code, Kasper Sandberg, (Thu Aug 28, 5:41 am)
Re: An idea .... with code, jassi brar, (Wed Aug 27, 9:24 pm)
Re: An idea .... with code, David Newall, (Wed Aug 27, 5:57 am)
Re: An idea .... with code, Andi Kleen, (Wed Aug 27, 6:01 am)
Re: An idea .... with code, Alexey Dobriyan, (Tue Aug 26, 6:44 am)
Re: An idea .... with code, Andi Kleen, (Tue Aug 26, 7:08 am)
Re: An idea .... with code, Bill Davidsen, (Mon Aug 25, 10:47 pm)
Re: An idea .... with code, Jochen Voß, (Mon Aug 25, 8:22 am)
Re: An idea .... with code, Marcin Slusarz, (Mon Aug 25, 4:53 pm)
Re: [PATCH 00/18] merge apic_32.c and apic_64.c, Ingo Molnar, (Sun Aug 24, 8:16 am)
Re: [PATCH 00/18] merge apic_32.c and apic_64.c, Ingo Molnar, (Sun Aug 24, 5:14 am)
[PATCH 17/18] x86: apic copy apic_64.c to apic_32.c, Yinghai Lu, (Sun Aug 24, 5:01 am)
[PATCH 14/18] x86: merge header files in apic_xx.c, Yinghai Lu, (Sun Aug 24, 5:01 am)
[PATCH 12/18] x86: merge APIC_init_uniprocessor, Yinghai Lu, (Sun Aug 24, 5:01 am)
[PATCH 11/18] x86: make apic_32/64.c more like, Yinghai Lu, (Sun Aug 24, 5:01 am)
[PATCH 09/18] x86: use HAVE_X2APIC in apic_64.c, Yinghai Lu, (Sun Aug 24, 5:01 am)
[PATCH 08/18] x86: apic_xx.c order variables, Yinghai Lu, (Sun Aug 24, 5:01 am)
[PATCH 05/18] x86: apic - unify setup_local_APIC, Yinghai Lu, (Sun Aug 24, 5:01 am)
[PATCH 03/18] x86: apic - unify setup_apicpmtimer, Yinghai Lu, (Sun Aug 24, 5:01 am)