From owner-cvs-all@FreeBSD.ORG Thu Jul 24 16:21:20 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67C9137B401; Thu, 24 Jul 2003 16:21:20 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43CB743F85; Thu, 24 Jul 2003 16:21:19 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h6ONLIwO029605; Thu, 24 Jul 2003 16:21:18 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h6ONLHAq001937; Thu, 24 Jul 2003 16:21:17 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h6ONLHY5001936; Thu, 24 Jul 2003 16:21:17 -0700 (PDT) (envelope-from marcel) Date: Thu, 24 Jul 2003 16:21:17 -0700 From: Marcel Moolenaar To: John Baldwin Message-ID: <20030724232117.GA1913@dhcp01.pn.xcllnt.net> References: <20030724191943.GA1028@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i 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-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2003 23:21:20 -0000 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. There is no fundamental problem (although my alpha does reboot when I run a 1:1-threaded application, so there is a problem :-) -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net