From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 6 Nov 2001 22:42:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 6 Nov 2001 22:42:38 -0500 Received: from rj.sgi.com ([204.94.215.100]:15750 "EHLO rj.sgi.com") by vger.kernel.org with ESMTP id ; Tue, 6 Nov 2001 22:42:25 -0500 X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 From: Keith Owens To: Andi Kleen Cc: linux-kernel@vger.kernel.org Subject: Re: current as segment register was Re: Using %cr2 to reference "current" In-Reply-To: Your message of "06 Nov 2001 20:02:09 BST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 07 Nov 2001 14:42:16 +1100 Message-ID: <26808.1005104536@kao2.melbourne.sgi.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 06 Nov 2001 20:02:09 +0100, Andi Kleen wrote: >One nasty thing is that lea doesn't work on segment registers. It needs >an quite ugly inline assembly mess similar to get/put_user to implement >read/write/add_pda functions for the fundamental types. To implement >that properly without hardcoded offsets it is also needed to have an >offset.c like many other ports that puts structure offsets at compile >time into an include file. Already done in kbuild 2.5, it creates arch/i386/asm-offsets.h. Currently containing this list, which can easily be expanded. #ifndef __ASM_OFFSETS_H__ #define __ASM_OFFSETS_H__ /* * DO NOT MODIFY * * This file was generated by arch/i386/Makefile.in. * */ state = 0 /* 0x0 offsetof(struct task_struct, state) */ flags = 4 /* 0x4 offsetof(struct task_struct, flags) */ sigpending = 8 /* 0x8 offsetof(struct task_struct, sigpending) */ addr_limit = 12 /* 0xc offsetof(struct task_struct, addr_limit) */ exec_domain = 16 /* 0x10 offsetof(struct task_struct, exec_domain) */ need_resched = 20 /* 0x14 offsetof(struct task_struct, need_resched) */ tsk_ptrace = 24 /* 0x18 offsetof(struct task_struct, ptrace) */ processor = 52 /* 0x34 offsetof(struct task_struct, processor) */ ENOSYS = 38 /* 0x26 ENOSYS */ #endif