lkml.org 
[lkml]   [2004]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: 2.6.7-mm6

    * David S. Miller <davem@redhat.com> wrote:

    > On Tue, 6 Jul 2004 16:36:18 -0700
    > William Lee Irwin III <wli@holomorphy.com> wrote:
    >
    > > I have it isolated down to the sched-clean-init-idle.patch and
    > > sched-clean-fork.patch. sched-clean-init-idle.patch fails to build without
    > > the second of those two applied, so I didn't do any work to narrow it down
    > > further.
    >
    > One thing to note is that we don't currently call the
    > wake_up_forked_process() thing in our SMP idle bootup
    > dispatcher in arch/sparc64/kernel/smp.c

    the patch below should solve this. Is it safe on sparc to do a
    fork_by_hand() like this?

    Ingo

    --- linux/arch/sparc64/kernel/smp.c.orig
    +++ linux/arch/sparc64/kernel/smp.c
    @@ -293,6 +293,16 @@ extern unsigned long sparc64_cpu_startup
    */
    static struct thread_info *cpu_new_thread = NULL;

    +static struct task_struct * __init fork_by_hand(void)
    +{
    + struct pt_regs regs;
    + /*
    + * don't care about the regs settings since
    + * we'll never reschedule the forked task.
    + */
    + return copy_process(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
    +}
    +
    static int __devinit smp_boot_one_cpu(unsigned int cpu)
    {
    unsigned long entry =
    @@ -302,9 +312,7 @@ static int __devinit smp_boot_one_cpu(un
    struct task_struct *p;
    int timeout, ret, cpu_node;

    - kernel_thread(NULL, NULL, CLONE_IDLETASK);
    -
    - p = prev_task(&init_task);
    + p = fork_by_hand();

    init_idle(p, cpu);

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:04    [W:0.024 / U:2.508 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site