From wli@holomorphy.com Tue Aug 10 16:03:57 2004 Return-Path: X-Original-To: jbarnes@spamtin.engr.sgi.com Delivered-To: jbarnes@spamtin.engr.sgi.com Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by spamtin.engr.sgi.com (Postfix) with ESMTP id CE80124071E2 for ; Tue, 10 Aug 2004 16:06:28 -0700 (PDT) Received: from imr2.americas.sgi.com (imr2.americas.sgi.com [192.48.203.141]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i7AN6SY92165877 for ; Tue, 10 Aug 2004 16:06:28 -0700 (PDT) Received: from mx7.sgi.com (mx7.sgi.com [198.149.18.15]) by imr2.americas.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i7AN9jGe24551650 for ; Tue, 10 Aug 2004 16:09:46 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org [12.107.209.244]) by mx7.sgi.com (8.12.11/8.12.11/freebsd-nospam-3.3) with ESMTP id i7AN9Vew020582 for ; Tue, 10 Aug 2004 18:09:31 -0500 (CDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S267807AbUHJXEJ (ORCPT ); Tue, 10 Aug 2004 19:04:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S267808AbUHJXEJ (ORCPT ); Tue, 10 Aug 2004 19:04:09 -0400 Received: from holomorphy.com ([207.189.100.168]:8685 "EHLO holomorphy.com") by vger.kernel.org with ESMTP id S267807AbUHJXEC (ORCPT ); Tue, 10 Aug 2004 19:04:02 -0400 Received: from wli by holomorphy.com with local (Exim 3.36 #1 (Debian)) id 1Bufew-0002PD-00; Tue, 10 Aug 2004 16:03:58 -0700 Date: Tue, 10 Aug 2004 16:03:57 -0700 From: William Lee Irwin III To: Robert Picco , Jesse Barnes , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: 2.6.8-rc4-mm1 Message-ID: <20040810230357.GE11200@holomorphy.com> Mail-Followup-To: William Lee Irwin III , Robert Picco , Jesse Barnes , Andrew Morton , linux-kernel@vger.kernel.org References: <20040810002110.4fd8de07.akpm@osdl.org> <200408100937.47451.jbarnes@engr.sgi.com> <20040810212033.GY11200@holomorphy.com> <41194EA5.80706@hp.com> <20040810222840.GA11200@holomorphy.com> <20040810223006.GB11200@holomorphy.com> <20040810224308.GC11200@holomorphy.com> <20040810224532.GD11200@holomorphy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040810224532.GD11200@holomorphy.com> User-Agent: Mutt/1.5.6+20040722i Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on spamtin.engr.sgi.com X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=no version=2.63 X-UID: 47572 On Tue, Aug 10, 2004 at 03:43:08PM -0700, William Lee Irwin III wrote: >> This still doesn't eliminate the branch in ia64's copy_thread(). >> The best solution possible would be to redo the whole affair as an >> ia64-specific cleanup pass, and to find some initial setting of regs >> that works for all architectures (it seems memset(®s, 0, ...) doesn't). On Tue, Aug 10, 2004 at 03:45:32PM -0700, William Lee Irwin III wrote: > "whole affair" == NULL check in copy_thread(). Except this is a nop, so > I think we're just looking for something that survives copy_thread(). I have an even better fix: Index: mm1-2.6.8-rc4/arch/ia64/kernel/smpboot.c =================================================================== --- mm1-2.6.8-rc4.orig/arch/ia64/kernel/smpboot.c 2004-08-10 15:32:08.000000000 -0700 +++ mm1-2.6.8-rc4/arch/ia64/kernel/smpboot.c 2004-08-10 15:55:28.902437225 -0700 @@ -356,6 +356,11 @@ return cpu_idle(); } +struct pt_regs * __init idle_regs(struct pt_regs *regs) +{ + return NULL; +} + struct create_idle { struct task_struct *idle; struct completion done; Index: mm1-2.6.8-rc4/kernel/fork.c =================================================================== --- mm1-2.6.8-rc4.orig/kernel/fork.c 2004-08-10 15:32:08.000000000 -0700 +++ mm1-2.6.8-rc4/kernel/fork.c 2004-08-10 16:01:24.383878183 -0700 @@ -1190,13 +1190,18 @@ goto fork_out; } +struct pt_regs * __init __attribute__((weak)) idle_regs(struct pt_regs *regs) +{ + memset(regs, 0, sizeof(struct pt_regs)); + return regs; +} + task_t * __init fork_idle(int cpu) { task_t *task; struct pt_regs regs; - memset(®s, 0, sizeof(struct pt_regs)); - task = copy_process(CLONE_VM, 0, ®s, 0, NULL, NULL, 0); + task = copy_process(CLONE_VM, 0, idle_regs(®s), 0, NULL, NULL, 0); if (!task) return ERR_PTR(-ENOMEM); init_idle(task, 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/