From owner-cvs-src@FreeBSD.ORG Wed Jul 30 12:34:26 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36A7437B401 for ; Wed, 30 Jul 2003 12:34:26 -0700 (PDT) Received: from mail.speakeasy.net (mail7.speakeasy.net [216.254.0.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id A83FD43FA3 for ; Wed, 30 Jul 2003 12:34:24 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 1925 invoked from network); 30 Jul 2003 19:34:24 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 30 Jul 2003 19:34:24 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h6UJYMGI068447; Wed, 30 Jul 2003 15:34:22 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030724232117.GA1913@dhcp01.pn.xcllnt.net> Date: Wed, 30 Jul 2003 15:34:42 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libthr/arch/alpha/alpha _curthread.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2003 19:34:26 -0000 On 24-Jul-2003 Marcel Moolenaar wrote: > On Thu, Jul 24, 2003 at 05:00:13PM -0400, John Baldwin wrote: >> >> There is a chicken and egg problem. We use the unique value to >> initialize the per-cpu pointer on kernel entry. We only have one >> such beast, and in the kernel we cache it in a register that userland >> gets to clobber (and frequently does). If you can think of a better >> way to store the per-cpu pointer such that kernel entry can load it >> into the register go for it. > > I see where the confusion is: > >> pcpup = (struct pcpu *) alpha_pal_rdval(); > ^^^^^^^^^^^^^^^^^^^^^^ > > This is not the per-CPU unique value. I had to add alpha_pal_rdunique() > in order to access it. In numbers: > > PAL_rdval = PAL_OSF1_rdval = 0x0032 > PAL_rdunique = 0x009e > > PAL_rdval is a privileged operation PAL_rdunique isn't. Ah, ok. Confusion on my part then, sorry. Didn't have my Brown Book handy. :-P > There is no fundamental problem (although my alpha does reboot > when I run a 1:1-threaded application, so there is a problem :-) Heh. Thanks for working on the Alpha thread stuff. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/