public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yhlu.kernel@gmail.com>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Yinghai Lu <yhlu.kernel@gmail.com>
Subject: [PATCH 08/18] x86: apic_xx.c order variables
Date: Sun, 24 Aug 2008 02:01:46 -0700	[thread overview]
Message-ID: <1219568516-681-9-git-send-email-yhlu.kernel@gmail.com> (raw)
In-Reply-To: <1219568516-681-1-git-send-email-yhlu.kernel@gmail.com>

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


  parent reply	other threads:[~2008-08-24  9:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-24  9:01 [PATCH 00/18] merge apic_32.c and apic_64.c Yinghai Lu
2008-08-24  9:01 ` [PATCH 01/18] x86: apic_64.c - setup_APIC_timer has to be __cpuinit function Yinghai Lu
2008-08-24  9:01 ` [PATCH 02/18] x86: apic - introduce get_physical_broadcast for 64bit Yinghai Lu
2008-08-24  9:01 ` [PATCH 03/18] x86: apic - unify setup_apicpmtimer Yinghai Lu
2008-08-24  9:01 ` [PATCH 04/18] x86: apic_64.c - add sanity check for spurious vector definition Yinghai Lu
2008-08-24  9:01 ` [PATCH 05/18] x86: apic - unify setup_local_APIC Yinghai Lu
2008-08-24  9:01 ` [PATCH 06/18] x86: apic_32.c should use __cpuinit section Yinghai Lu
2008-08-24  9:01 ` [PATCH 07/18] x86: apic - unify smp_apic_timer_interrupt Yinghai Lu
2008-08-24  9:01 ` Yinghai Lu [this message]
2008-08-24  9:01 ` [PATCH 09/18] x86: use HAVE_X2APIC in apic_64.c Yinghai Lu
2008-08-24  9:01 ` [PATCH 10/18] x86: add hard_smp_prossor_id with MACRO in io_apic_xx.c Yinghai Lu
2008-08-24  9:01 ` [PATCH 11/18] x86: make apic_32/64.c more like Yinghai Lu
2008-08-24  9:01 ` [PATCH 12/18] x86: merge APIC_init_uniprocessor Yinghai Lu
2008-08-24  9:01 ` [PATCH 13/18] x86: copy detect_init_APIC to the other Yinghai Lu
2008-08-24  9:01 ` [PATCH 14/18] x86: merge header files in apic_xx.c Yinghai Lu
2008-08-24  9:01 ` [PATCH 15/18] x86: apic unify smp_spurious/error_interrupt Yinghai Lu
2008-08-24  9:01 ` [PATCH 16/18] x86: apic copy calibrate_APIC_clock to each other in apic_32/64.c Yinghai Lu
2008-08-24  9:01 ` [PATCH 17/18] x86: apic copy apic_64.c to apic_32.c Yinghai Lu
2008-08-24  9:01 ` [PATCH 18/18] x86: rename apic_32.c and apic_64.c to apic.c Yinghai Lu
2008-08-24  9:14 ` [PATCH 00/18] merge apic_32.c and apic_64.c Ingo Molnar
2008-08-24 12:16 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1219568516-681-9-git-send-email-yhlu.kernel@gmail.com \
    --to=yhlu.kernel@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox