From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932108AbWFLTPx (ORCPT ); Mon, 12 Jun 2006 15:15:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932107AbWFLTPw (ORCPT ); Mon, 12 Jun 2006 15:15:52 -0400 Received: from omx1-ext.sgi.com ([192.48.179.11]:28829 "EHLO omx1.americas.sgi.com") by vger.kernel.org with ESMTP id S932108AbWFLTPv (ORCPT ); Mon, 12 Jun 2006 15:15:51 -0400 Date: Mon, 12 Jun 2006 12:15:33 -0700 (PDT) From: Christoph Lameter To: Andi Kleen cc: Ingo Molnar , Michal Piotrowski , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: broken local_t on i386 In-Reply-To: <200606122011.52841.ak@suse.de> Message-ID: References: <20060609214024.2f7dd72c.akpm@osdl.org> <200606121955.47803.ak@suse.de> <200606122011.52841.ak@suse.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Jun 2006, Andi Kleen wrote: > > I thought you had some funky segment registers on i386 and x86_64. Cant > > they be switched on context switch? If an inc/dec could work relative to > > those then you would not need a virtual mapping. > > The segment register needs an offset. So you need the linker to generate > the offset from the base of the per cpu segment somehow. At compile time the > address is not known so it cannot be done then. Define something like a big struct and use offsetof? So the compiler is not able to generate an offset to the beginning of a data segment?