LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH, resend] x86: fix section mismatch in LAPIC initialization
@ 2011-02-09 8:21 Jan Beulich
2011-02-10 14:43 ` [tip:x86/urgent] x86: Fix " tip-bot for Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2011-02-09 8:21 UTC (permalink / raw)
To: mingo, tglx, hpa; +Cc: linux-kernel
Additionally doing things conditionally upon smp_processor_id() being
zero is generally a bad idea, as this means CPU 0 cannot be offlined
and brought back online later again. While there may be other places
where this is done, I think adding more of those should be avoided so
that some day SMP can really become "symmetrical".
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
arch/x86/include/asm/apic.h | 1 +
arch/x86/kernel/apic/apic.c | 9 +++++++--
arch/x86/kernel/smpboot.c | 4 ++--
3 files changed, 10 insertions(+), 4 deletions(-)
--- 2.6.38-rc4/arch/x86/include/asm/apic.h
+++ 2.6.38-rc4-x86-end-lapic-setup/arch/x86/include/asm/apic.h
@@ -233,6 +233,7 @@ extern void sync_Arb_IDs(void);
extern void init_bsp_APIC(void);
extern void setup_local_APIC(void);
extern void end_local_APIC_setup(void);
+extern void bsp_end_local_APIC_setup(void);
extern void init_apic_mappings(void);
void register_lapic_address(unsigned long address);
extern void setup_boot_APIC_clock(void);
--- 2.6.38-rc4/arch/x86/kernel/apic/apic.c
+++ 2.6.38-rc4-x86-end-lapic-setup/arch/x86/kernel/apic/apic.c
@@ -1381,12 +1381,17 @@ void __cpuinit end_local_APIC_setup(void
#endif
apic_pm_activate();
+}
+
+void __init bsp_end_local_APIC_setup(void)
+{
+ end_local_APIC_setup();
/*
* Now that local APIC setup is completed for BP, configure the fault
* handling for interrupt remapping.
*/
- if (!smp_processor_id() && intr_remapping_enabled)
+ if (intr_remapping_enabled)
enable_drhd_fault_handling();
}
@@ -1756,7 +1761,7 @@ int __init APIC_init_uniprocessor(void)
enable_IO_APIC();
#endif
- end_local_APIC_setup();
+ bsp_end_local_APIC_setup();
#ifdef CONFIG_X86_IO_APIC
if (smp_found_config && !skip_ioapic_setup && nr_ioapics)
--- 2.6.38-rc4/arch/x86/kernel/smpboot.c
+++ 2.6.38-rc4-x86-end-lapic-setup/arch/x86/kernel/smpboot.c
@@ -1060,7 +1060,7 @@ static int __init smp_sanity_check(unsig
connect_bsp_APIC();
setup_local_APIC();
- end_local_APIC_setup();
+ bsp_end_local_APIC_setup();
return -1;
}
@@ -1137,7 +1137,7 @@ void __init native_smp_prepare_cpus(unsi
if (!skip_ioapic_setup && nr_ioapics)
enable_IO_APIC();
- end_local_APIC_setup();
+ bsp_end_local_APIC_setup();
map_cpu_to_logical_apicid();
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:x86/urgent] x86: Fix section mismatch in LAPIC initialization
2011-02-09 8:21 [PATCH, resend] x86: fix section mismatch in LAPIC initialization Jan Beulich
@ 2011-02-10 14:43 ` tip-bot for Jan Beulich
2011-02-10 19:48 ` Cyrill Gorcunov
0 siblings, 1 reply; 3+ messages in thread
From: tip-bot for Jan Beulich @ 2011-02-10 14:43 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, jbeulich, JBeulich, tglx, gorcunov, mingo
Commit-ID: 2fb270f3212a1e6a73f86f76c85caee93aae4386
Gitweb: http://git.kernel.org/tip/2fb270f3212a1e6a73f86f76c85caee93aae4386
Author: Jan Beulich <JBeulich@novell.com>
AuthorDate: Wed, 9 Feb 2011 08:21:02 +0000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 10 Feb 2011 13:26:53 +0100
x86: Fix section mismatch in LAPIC initialization
Additionally doing things conditionally upon smp_processor_id()
being zero is generally a bad idea, as this means CPU 0 cannot
be offlined and brought back online later again.
While there may be other places where this is done, I think adding
more of those should be avoided so that some day SMP can really
become "symmetrical".
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
LKML-Reference: <4D525C7E0200007800030EE1@vpn.id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/include/asm/apic.h | 1 +
arch/x86/kernel/apic/apic.c | 9 +++++++--
arch/x86/kernel/smpboot.c | 4 ++--
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index 5e3969c..3c89694 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -233,6 +233,7 @@ extern void sync_Arb_IDs(void);
extern void init_bsp_APIC(void);
extern void setup_local_APIC(void);
extern void end_local_APIC_setup(void);
+extern void bsp_end_local_APIC_setup(void);
extern void init_apic_mappings(void);
void register_lapic_address(unsigned long address);
extern void setup_boot_APIC_clock(void);
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 06c196d..76b96d7 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1381,12 +1381,17 @@ void __cpuinit end_local_APIC_setup(void)
#endif
apic_pm_activate();
+}
+
+void __init bsp_end_local_APIC_setup(void)
+{
+ end_local_APIC_setup();
/*
* Now that local APIC setup is completed for BP, configure the fault
* handling for interrupt remapping.
*/
- if (!smp_processor_id() && intr_remapping_enabled)
+ if (intr_remapping_enabled)
enable_drhd_fault_handling();
}
@@ -1756,7 +1761,7 @@ int __init APIC_init_uniprocessor(void)
enable_IO_APIC();
#endif
- end_local_APIC_setup();
+ bsp_end_local_APIC_setup();
#ifdef CONFIG_X86_IO_APIC
if (smp_found_config && !skip_ioapic_setup && nr_ioapics)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 03273b6..08776a9 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1060,7 +1060,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
connect_bsp_APIC();
setup_local_APIC();
- end_local_APIC_setup();
+ bsp_end_local_APIC_setup();
return -1;
}
@@ -1137,7 +1137,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
if (!skip_ioapic_setup && nr_ioapics)
enable_IO_APIC();
- end_local_APIC_setup();
+ bsp_end_local_APIC_setup();
map_cpu_to_logical_apicid();
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tip:x86/urgent] x86: Fix section mismatch in LAPIC initialization
2011-02-10 14:43 ` [tip:x86/urgent] x86: Fix " tip-bot for Jan Beulich
@ 2011-02-10 19:48 ` Cyrill Gorcunov
0 siblings, 0 replies; 3+ messages in thread
From: Cyrill Gorcunov @ 2011-02-10 19:48 UTC (permalink / raw)
To: mingo, hpa, linux-kernel, jbeulich, JBeulich, tglx, gorcunov, mingo
Cc: linux-tip-commits
On 02/10/2011 05:43 PM, tip-bot for Jan Beulich wrote:
> Commit-ID: 2fb270f3212a1e6a73f86f76c85caee93aae4386
...
Thanks a lot Jan!
--
Cyrill
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-10 19:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09 8:21 [PATCH, resend] x86: fix section mismatch in LAPIC initialization Jan Beulich
2011-02-10 14:43 ` [tip:x86/urgent] x86: Fix " tip-bot for Jan Beulich
2011-02-10 19:48 ` Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).