From owner-freebsd-threads@FreeBSD.ORG Sat May 31 20:48:19 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3EFB37B401 for ; Sat, 31 May 2003 20:48:18 -0700 (PDT) Received: from pop015.verizon.net (pop015pub.verizon.net [206.46.170.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1892943F93 for ; Sat, 31 May 2003 20:48:18 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net ([138.88.45.55]) by pop015.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030601034817.OXXJ20810.pop015.verizon.net@kokeb.ambesa.net>; Sat, 31 May 2003 22:48:17 -0500 Date: Sat, 31 May 2003 23:48:15 -0400 From: Mike Makonnen To: Marcel Moolenaar In-Reply-To: <20030531072259.GA2408@athlon.pn.xcllnt.net> References: <20030531072259.GA2408@athlon.pn.xcllnt.net> X-Mailer: Sylpheed version 0.8.10 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at pop015.verizon.net from [138.88.45.55] at Sat, 31 May 2003 22:48:16 -0500 Message-Id: <20030601034817.OXXJ20810.pop015.verizon.net@kokeb.ambesa.net> cc: threads@freebsd.org Subject: Re: libthr: thr_create(2): no kernel stack? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2003 03:48:19 -0000 On Sat, 31 May 2003 00:22:59 -0700 Marcel Moolenaar wrote: > Gang, > > I'm porting libthr to ia64 and reached a point where I can actually > do initial testing. I immediately hit upon a snafu in thr_create(2). > The second bcopy (ie sys/kern/kern_thr.c:159) is panicing because > the new thread (td0) does not have a frame (ie td_frame == NULL). > Creating a frame is obviously the thing to do, but there's no kernel > stack created for the new thread AFAICT. Without kernel thread. > cpu_set_upcall() will also fail if we ever reach that point. > > Am I missing something here? I just took a look at this and it _did_ look funny, but it seems to work on i386 so I did a little more digging and it seems that the stack frame is allocated in the uma thread initialization routine thread_init(), which calls cpu_thread_setup(). This is currently undefined for ia64: ia64/ia64/vm_machdep.c: line 110 Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 mtm@FreeBSD.Org| FreeBSD - The Power To Serve