Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751050AbWIWINk (ORCPT ); Sat, 23 Sep 2006 04:13:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751120AbWIWINk (ORCPT ); Sat, 23 Sep 2006 04:13:40 -0400 Received: from colin.muc.de ([193.149.48.1]:37392 "EHLO mail.muc.de") by vger.kernel.org with ESMTP id S1751050AbWIWINj (ORCPT ); Sat, 23 Sep 2006 04:13:39 -0400 Date: 23 Sep 2006 10:13:37 +0200 Date: Sat, 23 Sep 2006 10:13:37 +0200 From: Andi Kleen To: Jeremy Fitzhardinge Cc: Rusty Russell , lkml - Kernel Mailing List , virtualization Subject: Re: [PATCH 5/7] Use %gs for per-cpu sections in kernel Message-ID: <20060923081337.GA10534@muc.de> References: <1158925861.26261.3.camel@localhost.localdomain> <1158925997.26261.6.camel@localhost.localdomain> <1158926106.26261.8.camel@localhost.localdomain> <1158926215.26261.11.camel@localhost.localdomain> <1158926308.26261.14.camel@localhost.localdomain> <1158926386.26261.17.camel@localhost.localdomain> <4514663E.5050707@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4514663E.5050707@goop.org> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 32 > >+ > >+ /* Set up GDT entry for 16bit stack */ > >+ stk16_off = (u32)&per_cpu(cpu_16bit_stack, cpu); > >+ gdt = per_cpu(cpu_gdt_table, cpu); > >+ *(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |= > >+ ((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | > >+ ((((__u64)stk16_off) << 32) & 0xff00000000000000ULL) | > >+ (CPU_16BIT_STACK_SIZE - 1); > > > > This should use pack_descriptor(). I'd never got around to changing it, > but it really should. I fixed it now in the original patch > >+ /* Complete percpu area setup early, before calling printk(), > >+ since it may end up using it indirectly. */ > >+ setup_percpu_for_this_cpu(cpu); > >+ > > > > I managed to get all this done in head.S before going into C code; is > that not still possible? Or is there a later patch to do this. Why write in assembler what you can write in C? -Andi - 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/