From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964976AbXCFNUv (ORCPT ); Tue, 6 Mar 2007 08:20:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030493AbXCFNUv (ORCPT ); Tue, 6 Mar 2007 08:20:51 -0500 Received: from mx2.mail.elte.hu ([157.181.151.9]:53696 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964976AbXCFNUu (ORCPT ); Tue, 6 Mar 2007 08:20:50 -0500 Date: Tue, 6 Mar 2007 14:20:04 +0100 From: Ingo Molnar To: Rusty Russell Cc: lkml - Kernel Mailing List , Zachary Amsden , Jeremy Fitzhardinge , Andrew Morton , Andi Kleen Subject: Re: [PATCH 1/8] Remove cpu_gdt_table: use boot_gdt_table until migration to per-cpu Message-ID: <20070306132004.GD9031@elte.hu> References: <1173184747.4644.23.camel@localhost.localdomain> <1173185592.4644.28.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1173185592.4644.28.camel@localhost.localdomain> User-Agent: Mutt/1.4.2.2i X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -2.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-2.0 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.1.7 -2.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org * Rusty Russell wrote: > +/* The boot Global Descriptor Table: after boot we allocate a per-cpu copy */ > .align L1_CACHE_BYTES > ENTRY(boot_gdt_table) > - .fill GDT_ENTRY_BOOT_CS,8,0 > - .quad 0x00cf9a000000ffff /* kernel 4GB code at 0x00000000 */ > - .quad 0x00cf92000000ffff /* kernel 4GB data at 0x00000000 */ > - > -/* > - * The Global Descriptor Table contains 28 quadwords, per-CPU. > - */ > - .align L1_CACHE_BYTES > -ENTRY(cpu_gdt_table) > .quad 0x0000000000000000 /* NULL descriptor */ > .quad 0x0000000000000000 /* 0x0b reserved */ > - .quad 0x0000000000000000 /* 0x13 reserved */ > - .quad 0x0000000000000000 /* 0x1b reserved */ > + .quad 0x00cf9a000000ffff /* boot: 4GB code at 0x00000000 */ > + .quad 0x00cf92000000ffff /* boot: 4GB data at 0x00000000 */ > .quad 0x0000000000000000 /* 0x20 unused */ > .quad 0x0000000000000000 /* 0x28 unused */ > .quad 0x0000000000000000 /* 0x33 TLS entry 1 */ actually, the reason for the small boot GDT was that some systems wouldnt even boot with a larger GDT. (there was some BIOS interaction, forgot what it was - iirc it was mach-visws and also some other older box) the 'simplification' you do here is actually how Linux worked before it was fixed for those systems. so i'd be quite nervous to touch this area of the GDT code. (I'd support a renaming though, gdt_table is indeed ugly.) Ingo