Re: 2.6.8-rc3-mm2

From: William Lee Irwin III
Date: Tue Aug 10 2004 - 03:04:31 EST


On Mon, Aug 09, 2004 at 03:45:46PM -0700, William Lee Irwin III wrote:
>> Adding mdelay(1000) before and after the wakeup IPI didn't help. Must
>> be something else going on in printk().

On Mon, Aug 09, 2004 at 11:34:45PM -0700, William Lee Irwin III wrote:
> None of the printk()'s in do_boot_cpu() appear essential. The following
> also boots:

Okay, it's down to one printk() and other smaller changes now. The mb()
and __init removal are both unnecessary too.


-- wli

--- mm2-2.6.8-rc3/arch/ia64/kernel/smpboot.c.orig 2004-08-10 13:42:38.000000000 -0700
+++ mm2-2.6.8-rc3/arch/ia64/kernel/smpboot.c 2004-08-10 00:46:29.628376419 -0700
@@ -356,46 +356,16 @@
return cpu_idle();
}

-struct create_idle {
- struct task_struct *idle;
- struct completion done;
- int cpu;
-};
-
-void
-do_fork_idle(void *_c_idle)
-{
- struct create_idle *c_idle = _c_idle;
-
- c_idle->idle = fork_idle(c_idle->cpu);
- complete(&c_idle->done);
-}
-
static int __devinit
do_boot_cpu (int sapicid, int cpu)
{
int timeout;
- struct create_idle c_idle = {
- .cpu = cpu,
- .done = COMPLETION_INITIALIZER(c_idle.done),
- };
- DECLARE_WORK(work, do_fork_idle, &c_idle);
/*
* We can't use kernel_thread since we must avoid to reschedule the child.
*/
- if (!keventd_up() || current_is_keventd())
- work.func(work.data);
- else {
- schedule_work(&work);
- wait_for_completion(&c_idle.done);
- }
-
- if (IS_ERR(c_idle.idle))
- panic("failed fork for CPU %d", cpu);
- task_for_booting_cpu = c_idle.idle;
-
- Dprintk("Sending wakeup vector %lu to AP 0x%x/0x%x.\n", ap_wakeup_vector, cpu, sapicid);
-
+ task_for_booting_cpu = fork_idle(cpu);
+ if (IS_ERR(task_for_booting_cpu))
+ panic("failed fork for CPU %d", cpu);
platform_send_ipi(cpu, ap_wakeup_vector, IA64_IPI_DM_INT, 0);

/*
@@ -671,6 +641,7 @@
return 0;
}
/* Processor goes to start_secondary(), sets online flag */
+ printk("about to call do_boot_cpu(%d, %d)\n", sapicid, cpu);
ret = do_boot_cpu(sapicid, cpu);
if (ret < 0)
return ret;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/