Having scared you to death with some of the strange weirdness of
ia64 ... it turns out that you made a trivial typo in the ia64
specific part of the patch ... see below.
With this patch and a hack to call init_call_single_data() early
enough the patch boots fine on ia64.
-Tony
commit 8ffe2551f04e55176f7f7935c5a3395cc641d514
Author: Tony Luck <tony.luck@intel.com>
Date: Mon Mar 24 13:04:11 2008 -0700
[IA64] Fix typo'd call to generic_smp_call_function_single_interrupt
Should really be calling generic_smp_call_function_interrupt() for
the IPI_CALL_FUNC case.
Signed-off-by: Tony Luck <tony.luck@intel.com>
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index fa26528..55cbc2c 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -124,7 +124,7 @@ handle_IPI (int irq, void *dev_id)
switch (which) {
case IPI_CALL_FUNC:
- generic_smp_call_function_single_interrupt();
+ generic_smp_call_function_interrupt();
break;
case IPI_CALL_FUNC_SINGLE:
generic_smp_call_function_single_interrupt();
--
Doh, that was a pretty silly typo. Thanks, I've merged it with the patch! So now I/we just need to figure out why the hack to call init_call_single_data() is needed. You seem to imply it was being called too late, I thought perhaps too early. Where did you stick the init_call_single_data() call in? -- Jens Axboe --
In ia64 the first calls to smp_call_function_single() are made
while bringing up other cpus ... which happens from:
kernel_init()
smp_init()
The init calls are made a few lines later (still in kernel_init):
do_basic_setup()
do_initcalls()
I moved the call radically earlier (before sched_init() in
init/main.c:start_kernel()) just to be sure, but that was
overkill.
Perhaps making the call from do_pre_smp_initcalls() is the
logical place? Like this (though purists will say that the
extern declaration should be in some header file):
Signed-off-by: Tony Luck <tony.luck@intel.com>
diff --git a/init/main.c b/init/main.c
index 99ce949..0c140ed 100644
--- a/init/main.c
+++ b/init/main.c
@@ -750,7 +750,9 @@ __setup("nosoftlockup", nosoftlockup_setup);
static void __init do_pre_smp_initcalls(void)
{
extern int spawn_ksoftirqd(void);
+ extern int __cpuinit init_call_single_data(void);
+ init_call_single_data();
migration_init();
spawn_ksoftirqd();
if (!nosoftlockup)
diff --git a/kernel/smp.c b/kernel/smp.c
index ab2da5c..df1b651 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -40,7 +40,7 @@ struct call_single_queue {
static struct call_function_data call_data_fallback;
static unsigned long call_fallback_used;
-static int __cpuinit init_call_single_data(void)
+int __cpuinit init_call_single_data(void)
{
int i;
@@ -53,7 +53,6 @@ static int __cpuinit init_call_single_data(void)
}
return 0;
}
-core_initcall(init_call_single_data);
/*
* Insert a previously allocated call_single_data element for execution
--
It looks fine to me, not a big deal I think... I was woried that core_initcall() would not suit all, so this helps. Thanks Tony! -- Jens Axboe --
