From: David Rientjes <rientjes@google.com>
To: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: [patch 4/4] x86, apic: Always define nox2apic and define it as initdata
Date: Tue, 4 Feb 2014 23:55:06 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.02.1402042354380.7839@chino.kir.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1402042353030.7839@chino.kir.corp.google.com>
The "nox2apic" variable can be defined as __initdata since it is only
used for bootstrap. It can now unconditionally be defined since it will
later be freed.
At the same time, it is also better off as a bool.
Signed-off-by: David Rientjes <rientjes@google.com>
---
arch/x86/include/asm/apic.h | 1 -
arch/x86/kernel/apic/apic.c | 9 ++++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -217,7 +217,6 @@ static inline void x2apic_force_phys(void)
{
}
-#define nox2apic 0
#define x2apic_preenabled 0
#define x2apic_supported() 0
#endif
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -133,6 +133,10 @@ static inline void imcr_apic_to_pic(void)
* +1=force-enable
*/
static int force_enable_local_apic __initdata;
+
+/* Control whether x2APIC mode is enabled or not */
+static bool nox2apic __initdata;
+
/*
* APIC command line parameters
*/
@@ -162,8 +166,7 @@ int x2apic_mode;
/* x2apic enabled before OS handover */
int x2apic_preenabled;
static int x2apic_disabled;
-static int nox2apic;
-static __init int setup_nox2apic(char *str)
+static int __init setup_nox2apic(char *str)
{
if (x2apic_enabled()) {
int apicid = native_apic_msr_read(APIC_ID);
@@ -178,7 +181,7 @@ static __init int setup_nox2apic(char *str)
} else
setup_clear_cpu_cap(X86_FEATURE_X2APIC);
- nox2apic = 1;
+ nox2apic = true;
return 0;
}
next prev parent reply other threads:[~2014-02-05 7:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 7:54 [patch 1/4] x86, apic: Only use default_wait_for_init_deassert David Rientjes
2014-02-05 7:55 ` [patch 2/4] x86, apic: Switch wait_for_init_deassert to bool David Rientjes
2014-02-05 20:29 ` Thomas Gleixner
2014-02-10 13:31 ` [tip:x86/apic] x86/apic: Switch wait_for_init_deassert() to a bool flag tip-bot for David Rientjes
2014-02-05 7:55 ` [patch 3/4] x86, apic: Remove unused function prototypes David Rientjes
2014-02-05 20:31 ` Thomas Gleixner
2014-02-10 13:31 ` [tip:x86/apic] x86/apic: " tip-bot for David Rientjes
2014-02-05 7:55 ` David Rientjes [this message]
2014-02-05 20:31 ` [patch 4/4] x86, apic: Always define nox2apic and define it as initdata Thomas Gleixner
2014-02-10 13:31 ` [tip:x86/apic] x86/apic: " tip-bot for David Rientjes
2014-02-06 19:59 ` [patch 1/4] x86, apic: Only use default_wait_for_init_deassert Andi Kleen
2014-02-06 22:31 ` David Rientjes
2014-02-06 22:39 ` H. Peter Anvin
2014-02-06 22:52 ` Thomas Gleixner
2014-02-06 22:57 ` H. Peter Anvin
2014-02-06 22:58 ` Dave Hansen
2014-02-12 2:53 ` [GIT PULL] x86, apic: Remove support for Summit and ES7000 David Rientjes
2014-02-12 2:53 ` [patch 1/2] x86, apic: Remove support for ia32-based Unisys ES7000 David Rientjes
2014-02-12 2:53 ` [patch 2/2] x86, apic: Remove support for IBM Summit/EXA chipset David Rientjes
2014-02-12 4:29 ` [GIT PULL] x86, apic: Remove support for Summit and ES7000 H. Peter Anvin
2014-02-12 5:20 ` David Rientjes
2014-02-12 7:06 ` Ingo Molnar
2014-02-12 8:39 ` H. Peter Anvin
2014-02-12 12:50 ` Andi Kleen
2014-02-12 15:17 ` H. Peter Anvin
2014-02-10 13:31 ` [tip:x86/apic] x86/apic: Only use default_wait_for_init_deassert( ) tip-bot for David Rientjes
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=alpine.DEB.2.02.1402042354380.7839@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®