Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 7 Nov 2001 10:32:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 7 Nov 2001 10:32:28 -0500 Received: from t2.redhat.com ([199.183.24.243]:51184 "HELO executor.cambridge.redhat.com") by vger.kernel.org with SMTP id ; Wed, 7 Nov 2001 10:32:15 -0500 To: Alan Cox Cc: Linux Torvalds , bcrl@redhat.com, linux-kernel@vger.kernel.org Subject: Re: Using %cr2 to reference "current" In-Reply-To: Message from Alan Cox of "Wed, 07 Nov 2001 14:54:00 GMT." User-Agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/20.7 (i386-redhat-linux-gnu) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Date: Wed, 07 Nov 2001 15:32:07 +0000 Message-ID: <1820.1005147127@warthog.cambridge.redhat.com> From: David Howells Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Instead of using %cr2, how about giving each CPU it's own GDT (the GDT doesn't need to contain many entries). Have one segment number point to a CPU specific data area that contains things like the current task pointer for that CPU, the CPU number, etc, etc. This same segment number will be used on all CPU's, but will be multiplexed via the per-CPU GDTs instead. Then you can load up a segment register with this segment on entry to the kernel, and then make CPU data accesses relative to that. David - 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/