From owner-freebsd-smp Mon Oct 23 15:41:25 2000 Delivered-To: freebsd-smp@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id C0B0D37B479 for ; Mon, 23 Oct 2000 15:41:19 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id JAA09629; Tue, 24 Oct 2000 09:40:56 +1100 Date: Tue, 24 Oct 2000 09:41:20 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Matthew Jacob Cc: Poul-Henning Kamp , freebsd-smp@FreeBSD.ORG Subject: Re: cvs commit: src/sys/sys mutex.h In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 23 Oct 2000, Matthew Jacob wrote: > Strictly speaking, not an inline- but instead a per-platform locore.s > function- on sun4u it's: > > > retl > mov THREAD_REG, %o0 > > On i86 it's: > > movl %gs:CPU_THREAD, %eax > ret > > > This approach solves the KLD issue. But we have to get everyone to agree that > even UP kernels have to pay the cost of even trivial function reference > instead of linktime binding. I wouldn't agree. Just #define machine-dependent access macros in all cases. In particular, don't require MI code to know that per-cpu globals are sometimes normal globals and sometimes macros. Only the i386 UP case made the mistake of not #defining curproc, at least until recently. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message