From: Manfred Spraul <manfred@colorfullife.com>
To: linux-ia64@vger.kernel.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
tony.luck@intel.com
Subject: ia64 start secondary cpus: what's the first line where interrupts
Date: Sun, 07 Sep 2008 09:13:38 +0000 [thread overview]
Message-ID: <48C39B42.4080504@colorfullife.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
Hi,
For my rcu implementation, I try to figure out how the boot process for
secondary cpus works.
arch/ia64/kernel/smpboot.c contains the following code:
> static void __cpuinit
> smp_callin (void)
> {
> [snip]
> per_cpu(cpu_state, cpuid) = CPU_ONLINE;
> spin_unlock(&vector_lock);
> ipi_call_unlock_irq();
> <<<<<
> <<<<< ipi_call_unlock_irq() does local_irq_enable()
> <<<<<
> smp_setup_percpu_timer();
>
> ia64_mca_cmc_vector_setup(); /* Setup vector on AP */
>
> #ifdef CONFIG_PERFMON
> pfm_init_percpu();
> #endif
>
> local_irq_enable();
> <<<<<
> <<<<< Another local_irq_enable().
> <<<<<
Which of these two local_irq_enable()'s is the right one?
And: IMHO it's unclean to abuse ipi_call_unlock_irq() to enable the
local interrupts.
What about the attached patch? Untested due to lack of test hardware.
--
Manfred
[-- Attachment #2: patch-ia64-smpboot --]
[-- Type: text/plain, Size: 868 bytes --]
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 03f1a99..f4868d2 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -396,14 +396,17 @@ smp_callin (void)
fix_b0_for_bsp();
- ipi_call_lock_irq();
+ ipi_call_lock();
spin_lock(&vector_lock);
/* Setup the per cpu irq handling data structures */
__setup_vector_irq(cpuid);
cpu_set(cpuid, cpu_online_map);
per_cpu(cpu_state, cpuid) = CPU_ONLINE;
spin_unlock(&vector_lock);
- ipi_call_unlock_irq();
+ ipi_call_unlock();
+
+ /* begin processing interrupts */
+ local_irq_enable();
smp_setup_percpu_timer();
@@ -413,8 +416,6 @@ smp_callin (void)
pfm_init_percpu();
#endif
- local_irq_enable();
-
if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) {
/*
* Synchronize the ITC with the BP. Need to do this after irqs are
WARNING: multiple messages have this Message-ID (diff)
From: Manfred Spraul <manfred@colorfullife.com>
To: linux-ia64@vger.kernel.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
tony.luck@intel.com
Subject: ia64 start secondary cpus: what's the first line where interrupts can arrive?
Date: Sun, 07 Sep 2008 11:13:38 +0200 [thread overview]
Message-ID: <48C39B42.4080504@colorfullife.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
Hi,
For my rcu implementation, I try to figure out how the boot process for
secondary cpus works.
arch/ia64/kernel/smpboot.c contains the following code:
> static void __cpuinit
> smp_callin (void)
> {
> [snip]
> per_cpu(cpu_state, cpuid) = CPU_ONLINE;
> spin_unlock(&vector_lock);
> ipi_call_unlock_irq();
> <<<<<
> <<<<< ipi_call_unlock_irq() does local_irq_enable()
> <<<<<
> smp_setup_percpu_timer();
>
> ia64_mca_cmc_vector_setup(); /* Setup vector on AP */
>
> #ifdef CONFIG_PERFMON
> pfm_init_percpu();
> #endif
>
> local_irq_enable();
> <<<<<
> <<<<< Another local_irq_enable().
> <<<<<
Which of these two local_irq_enable()'s is the right one?
And: IMHO it's unclean to abuse ipi_call_unlock_irq() to enable the
local interrupts.
What about the attached patch? Untested due to lack of test hardware.
--
Manfred
[-- Attachment #2: patch-ia64-smpboot --]
[-- Type: text/plain, Size: 868 bytes --]
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 03f1a99..f4868d2 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -396,14 +396,17 @@ smp_callin (void)
fix_b0_for_bsp();
- ipi_call_lock_irq();
+ ipi_call_lock();
spin_lock(&vector_lock);
/* Setup the per cpu irq handling data structures */
__setup_vector_irq(cpuid);
cpu_set(cpuid, cpu_online_map);
per_cpu(cpu_state, cpuid) = CPU_ONLINE;
spin_unlock(&vector_lock);
- ipi_call_unlock_irq();
+ ipi_call_unlock();
+
+ /* begin processing interrupts */
+ local_irq_enable();
smp_setup_percpu_timer();
@@ -413,8 +416,6 @@ smp_callin (void)
pfm_init_percpu();
#endif
- local_irq_enable();
-
if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) {
/*
* Synchronize the ITC with the BP. Need to do this after irqs are
next reply other threads:[~2008-09-07 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-07 9:13 Manfred Spraul [this message]
2008-09-07 9:13 ` ia64 start secondary cpus: what's the first line where interrupts can arrive? Manfred Spraul
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=48C39B42.4080504@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.