ia64/xen-unstable

changeset 340:082bd5f74c47

bitkeeper revision 1.155 (3e7cafd3WKkYla8OeUUnMW-GzGI9QQ)

mkbuildtree:
Remove some more unnecessary files from xenolinux sparse tree.
.del-pgtable-3level.h~b77b54f265f8b550:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-3level.h
.del-i387.c~b4f78cbb1f82161e:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i387.c
author kaf24@scramble.cl.cam.ac.uk
date Sat Mar 22 18:47:47 2003 +0000 (2003-03-22)
parents edd0a15b4e05
children 05ad6558003c
files .rootkeys xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i387.c xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-3level.h xenolinux-2.4.21-pre4-sparse/mkbuildtree
line diff
     1.1 --- a/.rootkeys	Fri Mar 21 11:01:27 2003 +0000
     1.2 +++ b/.rootkeys	Sat Mar 22 18:47:47 2003 +0000
     1.3 @@ -498,7 +498,6 @@ 3e5a4e65_hqfuxtGG8IUy6wRM86Ecg xenolinux
     1.4  3e5a4e65Hy_1iUvMTPsNqGNXd9uFpg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/head.S
     1.5  3e5a4e65ibVQmwlOn0j3sVH_j_6hAg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c
     1.6  3e5a4e65RMGcuA-HCn3-wNx3fFQwdg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i386_ksyms.c
     1.7 -3e5a4e65JfSHwduNJO6j-upYnjoWLA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i387.c
     1.8  3e5a4e65MEvZhlr070sK5JsfAQlv7Q xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ioport.c
     1.9  3e5a4e653U6cELGv528IxOLHvCq8iA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/irq.c
    1.10  3e5a4e65muT6SU3ck47IP87Q7Ti5hA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ldt.c
    1.11 @@ -534,7 +533,6 @@ 3e7270deQqtGPSnFxcW4AvJZuTUWfg xenolinux
    1.12  3e5a4e67mnQfh-R8KcQCaVo2Oho6yg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/page.h
    1.13  3e5a4e67uTYU5oEnIDjxuaez8njjqg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgalloc.h
    1.14  3e5a4e67X7JyupgdYkgDX19Huj2sAw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-2level.h
    1.15 -3e5a4e67w3ckNdrTEgqiSiYYAYMwOQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-3level.h
    1.16  3e5a4e67gr4NLGtQ5CvSLimMYZlkOA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable.h
    1.17  3e5a4e676uK4xErTBDH6XJREn9LSyg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/processor.h
    1.18  3e5a4e67AJPjW-zL7p-xWuA6IVeH1g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ptrace.h
     2.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i387.c	Fri Mar 21 11:01:27 2003 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,542 +0,0 @@
     2.4 -/*
     2.5 - *  linux/arch/i386/kernel/i387.c
     2.6 - *
     2.7 - *  Copyright (C) 1994 Linus Torvalds
     2.8 - *
     2.9 - *  Pentium III FXSR, SSE support
    2.10 - *  General FPU state handling cleanups
    2.11 - *	Gareth Hughes <gareth@valinux.com>, May 2000
    2.12 - */
    2.13 -
    2.14 -#include <linux/config.h>
    2.15 -#include <linux/sched.h>
    2.16 -#include <linux/init.h>
    2.17 -#include <asm/processor.h>
    2.18 -#include <asm/i387.h>
    2.19 -#include <asm/math_emu.h>
    2.20 -#include <asm/sigcontext.h>
    2.21 -#include <asm/user.h>
    2.22 -#include <asm/ptrace.h>
    2.23 -#include <asm/uaccess.h>
    2.24 -
    2.25 -#define HAVE_HWFP 1
    2.26 -
    2.27 -static union i387_union empty_fpu_state;
    2.28 -
    2.29 -void __init boot_init_fpu(void)
    2.30 -{
    2.31 -	memset(&empty_fpu_state, 0, sizeof(union i387_union));
    2.32 -
    2.33 -	if (!cpu_has_fxsr) {
    2.34 -		empty_fpu_state.fsave.cwd = 0xffff037f;
    2.35 -		empty_fpu_state.fsave.swd = 0xffff0000;
    2.36 -		empty_fpu_state.fsave.twd = 0xffffffff;
    2.37 -		empty_fpu_state.fsave.fos = 0xffff0000;
    2.38 -	} else {
    2.39 -		empty_fpu_state.fxsave.cwd = 0x37f;
    2.40 -		if (cpu_has_xmm)
    2.41 -			empty_fpu_state.fxsave.mxcsr = 0x1f80;
    2.42 -	}
    2.43 -}
    2.44 -
    2.45 -void load_empty_fpu(struct task_struct * tsk)
    2.46 -{
    2.47 -	memcpy(&tsk->thread.i387, &empty_fpu_state, sizeof(union i387_union));
    2.48 -}
    2.49 -
    2.50 -/*
    2.51 - * The _current_ task is using the FPU for the first time
    2.52 - * so initialize it and set the mxcsr to its default
    2.53 - * value at reset if we support XMM instructions and then
    2.54 - * remeber the current task has used the FPU.
    2.55 - */
    2.56 -void init_fpu(void)
    2.57 -{
    2.58 -	if (cpu_has_fxsr)
    2.59 -		asm volatile("fxrstor %0" : : "m" (empty_fpu_state.fxsave));
    2.60 -	else
    2.61 -		__asm__("fninit");
    2.62 -	current->used_math = 1;
    2.63 -}
    2.64 -
    2.65 -/*
    2.66 - * FPU lazy state save handling.
    2.67 - */
    2.68 -
    2.69 -static inline void __save_init_fpu( struct task_struct *tsk )
    2.70 -{
    2.71 -	if ( cpu_has_fxsr ) {
    2.72 -		asm volatile( "fxsave %0 ; fnclex"
    2.73 -			      : "=m" (tsk->thread.i387.fxsave) );
    2.74 -	} else {
    2.75 -		asm volatile( "fnsave %0 ; fwait"
    2.76 -			      : "=m" (tsk->thread.i387.fsave) );
    2.77 -	}
    2.78 -	tsk->flags &= ~PF_USEDFPU;
    2.79 -}
    2.80 -
    2.81 -void save_init_fpu( struct task_struct *tsk )
    2.82 -{
    2.83 -	__save_init_fpu(tsk);
    2.84 -	stts();
    2.85 -}
    2.86 -
    2.87 -void kernel_fpu_begin(void)
    2.88 -{
    2.89 -	struct task_struct *tsk = current;
    2.90 -
    2.91 -	if (tsk->flags & PF_USEDFPU) {
    2.92 -		__save_init_fpu(tsk);
    2.93 -		return;
    2.94 -	}
    2.95 -	clts();
    2.96 -}
    2.97 -
    2.98 -void restore_fpu( struct task_struct *tsk )
    2.99 -{
   2.100 -	if ( cpu_has_fxsr ) {
   2.101 -		asm volatile( "fxrstor %0"
   2.102 -			      : : "m" (tsk->thread.i387.fxsave) );
   2.103 -	} else {
   2.104 -		asm volatile( "frstor %0"
   2.105 -			      : : "m" (tsk->thread.i387.fsave) );
   2.106 -	}
   2.107 -}
   2.108 -
   2.109 -/*
   2.110 - * FPU tag word conversions.
   2.111 - */
   2.112 -
   2.113 -static inline unsigned short twd_i387_to_fxsr( unsigned short twd )
   2.114 -{
   2.115 -	unsigned int tmp; /* to avoid 16 bit prefixes in the code */
   2.116 - 
   2.117 -	/* Transform each pair of bits into 01 (valid) or 00 (empty) */
   2.118 -        tmp = ~twd;
   2.119 -        tmp = (tmp | (tmp>>1)) & 0x5555; /* 0V0V0V0V0V0V0V0V */
   2.120 -        /* and move the valid bits to the lower byte. */
   2.121 -        tmp = (tmp | (tmp >> 1)) & 0x3333; /* 00VV00VV00VV00VV */
   2.122 -        tmp = (tmp | (tmp >> 2)) & 0x0f0f; /* 0000VVVV0000VVVV */
   2.123 -        tmp = (tmp | (tmp >> 4)) & 0x00ff; /* 00000000VVVVVVVV */
   2.124 -        return tmp;
   2.125 -}
   2.126 -
   2.127 -static inline unsigned long twd_fxsr_to_i387( struct i387_fxsave_struct *fxsave )
   2.128 -{
   2.129 -	struct _fpxreg *st = NULL;
   2.130 -	unsigned long twd = (unsigned long) fxsave->twd;
   2.131 -	unsigned long tag;
   2.132 -	unsigned long ret = 0xffff0000;
   2.133 -	int i;
   2.134 -
   2.135 -#define FPREG_ADDR(f, n)	((char *)&(f)->st_space + (n) * 16);
   2.136 -
   2.137 -	for ( i = 0 ; i < 8 ; i++ ) {
   2.138 -		if ( twd & 0x1 ) {
   2.139 -			st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
   2.140 -
   2.141 -			switch ( st->exponent & 0x7fff ) {
   2.142 -			case 0x7fff:
   2.143 -				tag = 2;		/* Special */
   2.144 -				break;
   2.145 -			case 0x0000:
   2.146 -				if ( !st->significand[0] &&
   2.147 -				     !st->significand[1] &&
   2.148 -				     !st->significand[2] &&
   2.149 -				     !st->significand[3] ) {
   2.150 -					tag = 1;	/* Zero */
   2.151 -				} else {
   2.152 -					tag = 2;	/* Special */
   2.153 -				}
   2.154 -				break;
   2.155 -			default:
   2.156 -				if ( st->significand[3] & 0x8000 ) {
   2.157 -					tag = 0;	/* Valid */
   2.158 -				} else {
   2.159 -					tag = 2;	/* Special */
   2.160 -				}
   2.161 -				break;
   2.162 -			}
   2.163 -		} else {
   2.164 -			tag = 3;			/* Empty */
   2.165 -		}
   2.166 -		ret |= (tag << (2 * i));
   2.167 -		twd = twd >> 1;
   2.168 -	}
   2.169 -	return ret;
   2.170 -}
   2.171 -
   2.172 -/*
   2.173 - * FPU state interaction.
   2.174 - */
   2.175 -
   2.176 -unsigned short get_fpu_cwd( struct task_struct *tsk )
   2.177 -{
   2.178 -	if ( cpu_has_fxsr ) {
   2.179 -		return tsk->thread.i387.fxsave.cwd;
   2.180 -	} else {
   2.181 -		return (unsigned short)tsk->thread.i387.fsave.cwd;
   2.182 -	}
   2.183 -}
   2.184 -
   2.185 -unsigned short get_fpu_swd( struct task_struct *tsk )
   2.186 -{
   2.187 -	if ( cpu_has_fxsr ) {
   2.188 -		return tsk->thread.i387.fxsave.swd;
   2.189 -	} else {
   2.190 -		return (unsigned short)tsk->thread.i387.fsave.swd;
   2.191 -	}
   2.192 -}
   2.193 -
   2.194 -unsigned short get_fpu_twd( struct task_struct *tsk )
   2.195 -{
   2.196 -	if ( cpu_has_fxsr ) {
   2.197 -		return tsk->thread.i387.fxsave.twd;
   2.198 -	} else {
   2.199 -		return (unsigned short)tsk->thread.i387.fsave.twd;
   2.200 -	}
   2.201 -}
   2.202 -
   2.203 -unsigned short get_fpu_mxcsr( struct task_struct *tsk )
   2.204 -{
   2.205 -	if ( cpu_has_xmm ) {
   2.206 -		return tsk->thread.i387.fxsave.mxcsr;
   2.207 -	} else {
   2.208 -		return 0x1f80;
   2.209 -	}
   2.210 -}
   2.211 -
   2.212 -void set_fpu_cwd( struct task_struct *tsk, unsigned short cwd )
   2.213 -{
   2.214 -	if ( cpu_has_fxsr ) {
   2.215 -		tsk->thread.i387.fxsave.cwd = cwd;
   2.216 -	} else {
   2.217 -		tsk->thread.i387.fsave.cwd = ((long)cwd | 0xffff0000);
   2.218 -	}
   2.219 -}
   2.220 -
   2.221 -void set_fpu_swd( struct task_struct *tsk, unsigned short swd )
   2.222 -{
   2.223 -	if ( cpu_has_fxsr ) {
   2.224 -		tsk->thread.i387.fxsave.swd = swd;
   2.225 -	} else {
   2.226 -		tsk->thread.i387.fsave.swd = ((long)swd | 0xffff0000);
   2.227 -	}
   2.228 -}
   2.229 -
   2.230 -void set_fpu_twd( struct task_struct *tsk, unsigned short twd )
   2.231 -{
   2.232 -	if ( cpu_has_fxsr ) {
   2.233 -		tsk->thread.i387.fxsave.twd = twd_i387_to_fxsr(twd);
   2.234 -	} else {
   2.235 -		tsk->thread.i387.fsave.twd = ((long)twd | 0xffff0000);
   2.236 -	}
   2.237 -}
   2.238 -
   2.239 -void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr )
   2.240 -{
   2.241 -	if ( cpu_has_xmm ) {
   2.242 -		tsk->thread.i387.fxsave.mxcsr = (mxcsr & 0xffbf);
   2.243 -	}
   2.244 -}
   2.245 -
   2.246 -/*
   2.247 - * FXSR floating point environment conversions.
   2.248 - */
   2.249 -
   2.250 -static inline int convert_fxsr_to_user( struct _fpstate *buf,
   2.251 -					struct i387_fxsave_struct *fxsave )
   2.252 -{
   2.253 -	unsigned long env[7];
   2.254 -	struct _fpreg *to;
   2.255 -	struct _fpxreg *from;
   2.256 -	int i;
   2.257 -
   2.258 -	env[0] = (unsigned long)fxsave->cwd | 0xffff0000;
   2.259 -	env[1] = (unsigned long)fxsave->swd | 0xffff0000;
   2.260 -	env[2] = twd_fxsr_to_i387(fxsave);
   2.261 -	env[3] = fxsave->fip;
   2.262 -	env[4] = fxsave->fcs | ((unsigned long)fxsave->fop << 16);
   2.263 -	env[5] = fxsave->foo;
   2.264 -	env[6] = fxsave->fos;
   2.265 -
   2.266 -	if ( __copy_to_user( buf, env, 7 * sizeof(unsigned long) ) )
   2.267 -		return 1;
   2.268 -
   2.269 -	to = &buf->_st[0];
   2.270 -	from = (struct _fpxreg *) &fxsave->st_space[0];
   2.271 -	for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
   2.272 -		if ( __copy_to_user( to, from, sizeof(*to) ) )
   2.273 -			return 1;
   2.274 -	}
   2.275 -	return 0;
   2.276 -}
   2.277 -
   2.278 -static inline int convert_fxsr_from_user( struct i387_fxsave_struct *fxsave,
   2.279 -					  struct _fpstate *buf )
   2.280 -{
   2.281 -	unsigned long env[7];
   2.282 -	struct _fpxreg *to;
   2.283 -	struct _fpreg *from;
   2.284 -	int i;
   2.285 -
   2.286 -	if ( __copy_from_user( env, buf, 7 * sizeof(long) ) )
   2.287 -		return 1;
   2.288 -
   2.289 -	fxsave->cwd = (unsigned short)(env[0] & 0xffff);
   2.290 -	fxsave->swd = (unsigned short)(env[1] & 0xffff);
   2.291 -	fxsave->twd = twd_i387_to_fxsr((unsigned short)(env[2] & 0xffff));
   2.292 -	fxsave->fip = env[3];
   2.293 -	fxsave->fop = (unsigned short)((env[4] & 0xffff0000) >> 16);
   2.294 -	fxsave->fcs = (env[4] & 0xffff);
   2.295 -	fxsave->foo = env[5];
   2.296 -	fxsave->fos = env[6];
   2.297 -
   2.298 -	to = (struct _fpxreg *) &fxsave->st_space[0];
   2.299 -	from = &buf->_st[0];
   2.300 -	for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
   2.301 -		if ( __copy_from_user( to, from, sizeof(*from) ) )
   2.302 -			return 1;
   2.303 -	}
   2.304 -	return 0;
   2.305 -}
   2.306 -
   2.307 -/*
   2.308 - * Signal frame handlers.
   2.309 - */
   2.310 -
   2.311 -static inline int save_i387_fsave( struct _fpstate *buf )
   2.312 -{
   2.313 -	struct task_struct *tsk = current;
   2.314 -
   2.315 -	unlazy_fpu( tsk );
   2.316 -	tsk->thread.i387.fsave.status = tsk->thread.i387.fsave.swd;
   2.317 -	if ( __copy_to_user( buf, &tsk->thread.i387.fsave,
   2.318 -			     sizeof(struct i387_fsave_struct) ) )
   2.319 -		return -1;
   2.320 -	return 1;
   2.321 -}
   2.322 -
   2.323 -static inline int save_i387_fxsave( struct _fpstate *buf )
   2.324 -{
   2.325 -	struct task_struct *tsk = current;
   2.326 -	int err = 0;
   2.327 -
   2.328 -	unlazy_fpu( tsk );
   2.329 -
   2.330 -	if ( convert_fxsr_to_user( buf, &tsk->thread.i387.fxsave ) )
   2.331 -		return -1;
   2.332 -
   2.333 -	err |= __put_user( tsk->thread.i387.fxsave.swd, &buf->status );
   2.334 -	err |= __put_user( X86_FXSR_MAGIC, &buf->magic );
   2.335 -	if ( err )
   2.336 -		return -1;
   2.337 -
   2.338 -	if ( __copy_to_user( &buf->_fxsr_env[0], &tsk->thread.i387.fxsave,
   2.339 -			     sizeof(struct i387_fxsave_struct) ) )
   2.340 -		return -1;
   2.341 -	return 1;
   2.342 -}
   2.343 -
   2.344 -int save_i387( struct _fpstate *buf )
   2.345 -{
   2.346 -	if ( !current->used_math )
   2.347 -		return 0;
   2.348 -
   2.349 -	/* This will cause a "finit" to be triggered by the next
   2.350 -	 * attempted FPU operation by the 'current' process.
   2.351 -	 */
   2.352 -	current->used_math = 0;
   2.353 -
   2.354 -	if ( HAVE_HWFP ) {
   2.355 -		if ( cpu_has_fxsr ) {
   2.356 -			return save_i387_fxsave( buf );
   2.357 -		} else {
   2.358 -			return save_i387_fsave( buf );
   2.359 -		}
   2.360 -	} else {
   2.361 -		return save_i387_soft( &current->thread.i387.soft, buf );
   2.362 -	}
   2.363 -}
   2.364 -
   2.365 -static inline int restore_i387_fsave( struct _fpstate *buf )
   2.366 -{
   2.367 -	struct task_struct *tsk = current;
   2.368 -	clear_fpu( tsk );
   2.369 -	return __copy_from_user( &tsk->thread.i387.fsave, buf,
   2.370 -				 sizeof(struct i387_fsave_struct) );
   2.371 -}
   2.372 -
   2.373 -static inline int restore_i387_fxsave( struct _fpstate *buf )
   2.374 -{
   2.375 -	struct task_struct *tsk = current;
   2.376 -	clear_fpu( tsk );
   2.377 -	if ( __copy_from_user( &tsk->thread.i387.fxsave, &buf->_fxsr_env[0],
   2.378 -			       sizeof(struct i387_fxsave_struct) ) )
   2.379 -		return 1;
   2.380 -	/* mxcsr bit 6 and 31-16 must be zero for security reasons */
   2.381 -	tsk->thread.i387.fxsave.mxcsr &= 0xffbf;
   2.382 -	return convert_fxsr_from_user( &tsk->thread.i387.fxsave, buf );
   2.383 -}
   2.384 -
   2.385 -int restore_i387( struct _fpstate *buf )
   2.386 -{
   2.387 -	int err;
   2.388 -
   2.389 -	if ( HAVE_HWFP ) {
   2.390 -		if ( cpu_has_fxsr ) {
   2.391 -			err =  restore_i387_fxsave( buf );
   2.392 -		} else {
   2.393 -			err = restore_i387_fsave( buf );
   2.394 -		}
   2.395 -	} else {
   2.396 -		err = restore_i387_soft( &current->thread.i387.soft, buf );
   2.397 -	}
   2.398 -	current->used_math = 1;
   2.399 -	return err;
   2.400 -}
   2.401 -
   2.402 -/*
   2.403 - * ptrace request handlers.
   2.404 - */
   2.405 -
   2.406 -static inline int get_fpregs_fsave( struct user_i387_struct *buf,
   2.407 -				    struct task_struct *tsk )
   2.408 -{
   2.409 -	return __copy_to_user( buf, &tsk->thread.i387.fsave,
   2.410 -			       sizeof(struct user_i387_struct) );
   2.411 -}
   2.412 -
   2.413 -static inline int get_fpregs_fxsave( struct user_i387_struct *buf,
   2.414 -				     struct task_struct *tsk )
   2.415 -{
   2.416 -	return convert_fxsr_to_user( (struct _fpstate *)buf,
   2.417 -				     &tsk->thread.i387.fxsave );
   2.418 -}
   2.419 -
   2.420 -int get_fpregs( struct user_i387_struct *buf, struct task_struct *tsk )
   2.421 -{
   2.422 -	if ( HAVE_HWFP ) {
   2.423 -		if ( cpu_has_fxsr ) {
   2.424 -			return get_fpregs_fxsave( buf, tsk );
   2.425 -		} else {
   2.426 -			return get_fpregs_fsave( buf, tsk );
   2.427 -		}
   2.428 -	} else {
   2.429 -		return save_i387_soft( &tsk->thread.i387.soft,
   2.430 -				       (struct _fpstate *)buf );
   2.431 -	}
   2.432 -}
   2.433 -
   2.434 -static inline int set_fpregs_fsave( struct task_struct *tsk,
   2.435 -				    struct user_i387_struct *buf )
   2.436 -{
   2.437 -	return __copy_from_user( &tsk->thread.i387.fsave, buf,
   2.438 -				 sizeof(struct user_i387_struct) );
   2.439 -}
   2.440 -
   2.441 -static inline int set_fpregs_fxsave( struct task_struct *tsk,
   2.442 -				     struct user_i387_struct *buf )
   2.443 -{
   2.444 -	return convert_fxsr_from_user( &tsk->thread.i387.fxsave,
   2.445 -				       (struct _fpstate *)buf );
   2.446 -}
   2.447 -
   2.448 -int set_fpregs( struct task_struct *tsk, struct user_i387_struct *buf )
   2.449 -{
   2.450 -	if ( HAVE_HWFP ) {
   2.451 -		if ( cpu_has_fxsr ) {
   2.452 -			return set_fpregs_fxsave( tsk, buf );
   2.453 -		} else {
   2.454 -			return set_fpregs_fsave( tsk, buf );
   2.455 -		}
   2.456 -	} else {
   2.457 -		return restore_i387_soft( &tsk->thread.i387.soft,
   2.458 -					  (struct _fpstate *)buf );
   2.459 -	}
   2.460 -}
   2.461 -
   2.462 -int get_fpxregs( struct user_fxsr_struct *buf, struct task_struct *tsk )
   2.463 -{
   2.464 -	if ( cpu_has_fxsr ) {
   2.465 -		if (__copy_to_user( (void *)buf, &tsk->thread.i387.fxsave,
   2.466 -				    sizeof(struct user_fxsr_struct) ))
   2.467 -			return -EFAULT;
   2.468 -		return 0;
   2.469 -	} else {
   2.470 -		return -EIO;
   2.471 -	}
   2.472 -}
   2.473 -
   2.474 -int set_fpxregs( struct task_struct *tsk, struct user_fxsr_struct *buf )
   2.475 -{
   2.476 -	if ( cpu_has_fxsr ) {
   2.477 -		__copy_from_user( &tsk->thread.i387.fxsave, (void *)buf,
   2.478 -				  sizeof(struct user_fxsr_struct) );
   2.479 -		/* mxcsr bit 6 and 31-16 must be zero for security reasons */
   2.480 -		tsk->thread.i387.fxsave.mxcsr &= 0xffbf;
   2.481 -		return 0;
   2.482 -	} else {
   2.483 -		return -EIO;
   2.484 -	}
   2.485 -}
   2.486 -
   2.487 -/*
   2.488 - * FPU state for core dumps.
   2.489 - */
   2.490 -
   2.491 -static inline void copy_fpu_fsave( struct task_struct *tsk,
   2.492 -				   struct user_i387_struct *fpu )
   2.493 -{
   2.494 -	memcpy( fpu, &tsk->thread.i387.fsave,
   2.495 -		sizeof(struct user_i387_struct) );
   2.496 -}
   2.497 -
   2.498 -static inline void copy_fpu_fxsave( struct task_struct *tsk,
   2.499 -				   struct user_i387_struct *fpu )
   2.500 -{
   2.501 -	unsigned short *to;
   2.502 -	unsigned short *from;
   2.503 -	int i;
   2.504 -
   2.505 -	memcpy( fpu, &tsk->thread.i387.fxsave, 7 * sizeof(long) );
   2.506 -
   2.507 -	to = (unsigned short *)&fpu->st_space[0];
   2.508 -	from = (unsigned short *)&tsk->thread.i387.fxsave.st_space[0];
   2.509 -	for ( i = 0 ; i < 8 ; i++, to += 5, from += 8 ) {
   2.510 -		memcpy( to, from, 5 * sizeof(unsigned short) );
   2.511 -	}
   2.512 -}
   2.513 -
   2.514 -int dump_fpu( struct pt_regs *regs, struct user_i387_struct *fpu )
   2.515 -{
   2.516 -	int fpvalid;
   2.517 -	struct task_struct *tsk = current;
   2.518 -
   2.519 -	fpvalid = tsk->used_math;
   2.520 -	if ( fpvalid ) {
   2.521 -		unlazy_fpu( tsk );
   2.522 -		if ( cpu_has_fxsr ) {
   2.523 -			copy_fpu_fxsave( tsk, fpu );
   2.524 -		} else {
   2.525 -			copy_fpu_fsave( tsk, fpu );
   2.526 -		}
   2.527 -	}
   2.528 -
   2.529 -	return fpvalid;
   2.530 -}
   2.531 -
   2.532 -int dump_extended_fpu( struct pt_regs *regs, struct user_fxsr_struct *fpu )
   2.533 -{
   2.534 -	int fpvalid;
   2.535 -	struct task_struct *tsk = current;
   2.536 -
   2.537 -	fpvalid = tsk->used_math && cpu_has_fxsr;
   2.538 -	if ( fpvalid ) {
   2.539 -		unlazy_fpu( tsk );
   2.540 -		memcpy( fpu, &tsk->thread.i387.fxsave,
   2.541 -			sizeof(struct user_fxsr_struct) );
   2.542 -	}
   2.543 -
   2.544 -	return fpvalid;
   2.545 -}
     3.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-3level.h	Fri Mar 21 11:01:27 2003 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,106 +0,0 @@
     3.4 -#ifndef _I386_PGTABLE_3LEVEL_H
     3.5 -#define _I386_PGTABLE_3LEVEL_H
     3.6 -
     3.7 -#error "PAE unsupported"
     3.8 -
     3.9 -/*
    3.10 - * Intel Physical Address Extension (PAE) Mode - three-level page
    3.11 - * tables on PPro+ CPUs.
    3.12 - *
    3.13 - * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
    3.14 - */
    3.15 -
    3.16 -/*
    3.17 - * PGDIR_SHIFT determines what a top-level page table entry can map
    3.18 - */
    3.19 -#define PGDIR_SHIFT	30
    3.20 -#define PTRS_PER_PGD	4
    3.21 -
    3.22 -/*
    3.23 - * PMD_SHIFT determines the size of the area a middle-level
    3.24 - * page table can map
    3.25 - */
    3.26 -#define PMD_SHIFT	21
    3.27 -#define PTRS_PER_PMD	512
    3.28 -
    3.29 -/*
    3.30 - * entries per page directory level
    3.31 - */
    3.32 -#define PTRS_PER_PTE	512
    3.33 -
    3.34 -#define pte_ERROR(e) \
    3.35 -	printk("%s:%d: bad pte %p(%08lx%08lx).\n", __FILE__, __LINE__, &(e), (e).pte_high, (e).pte_low)
    3.36 -#define pmd_ERROR(e) \
    3.37 -	printk("%s:%d: bad pmd %p(%016Lx).\n", __FILE__, __LINE__, &(e), pmd_val(e))
    3.38 -#define pgd_ERROR(e) \
    3.39 -	printk("%s:%d: bad pgd %p(%016Lx).\n", __FILE__, __LINE__, &(e), pgd_val(e))
    3.40 -
    3.41 -static inline int pgd_none(pgd_t pgd)		{ return 0; }
    3.42 -static inline int pgd_bad(pgd_t pgd)		{ return 0; }
    3.43 -static inline int pgd_present(pgd_t pgd)	{ return 1; }
    3.44 -
    3.45 -/* Rules for using set_pte: the pte being assigned *must* be
    3.46 - * either not present or in a state where the hardware will
    3.47 - * not attempt to update the pte.  In places where this is
    3.48 - * not possible, use pte_get_and_clear to obtain the old pte
    3.49 - * value and then use set_pte to update it.  -ben
    3.50 - */
    3.51 -static inline void set_pte(pte_t *ptep, pte_t pte)
    3.52 -{
    3.53 -	ptep->pte_high = pte.pte_high;
    3.54 -	smp_wmb();
    3.55 -	ptep->pte_low = pte.pte_low;
    3.56 -}
    3.57 -#define set_pmd(pmdptr,pmdval) \
    3.58 -		set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval))
    3.59 -#define set_pgd(pgdptr,pgdval) \
    3.60 -		set_64bit((unsigned long long *)(pgdptr),pgd_val(pgdval))
    3.61 -#define set_pte_atomic(pteptr,pteval) \
    3.62 -		set_64bit((unsigned long long *)(pteptr),pte_val(pteval))
    3.63 -
    3.64 -
    3.65 -/*
    3.66 - * Pentium-II erratum A13: in PAE mode we explicitly have to flush
    3.67 - * the TLB via cr3 if the top-level pgd is changed...
    3.68 - * We do not let the generic code free and clear pgd entries due to
    3.69 - * this erratum.
    3.70 - */
    3.71 -static inline void pgd_clear (pgd_t * pgd) { }
    3.72 -
    3.73 -#define pgd_page(pgd) \
    3.74 -((unsigned long) __va(pgd_val(pgd) & PAGE_MASK))
    3.75 -
    3.76 -/* Find an entry in the second-level page table.. */
    3.77 -#define pmd_offset(dir, address) ((pmd_t *) pgd_page(*(dir)) + \
    3.78 -			__pmd_offset(address))
    3.79 -
    3.80 -static inline pte_t ptep_get_and_clear(pte_t *ptep)
    3.81 -{
    3.82 -	pte_t res;
    3.83 -
    3.84 -	/* xchg acts as a barrier before the setting of the high bits */
    3.85 -	res.pte_low = xchg(&ptep->pte_low, 0);
    3.86 -	res.pte_high = ptep->pte_high;
    3.87 -	ptep->pte_high = 0;
    3.88 -
    3.89 -	return res;
    3.90 -}
    3.91 -
    3.92 -static inline int pte_same(pte_t a, pte_t b)
    3.93 -{
    3.94 -	return a.pte_low == b.pte_low && a.pte_high == b.pte_high;
    3.95 -}
    3.96 -
    3.97 -#define pte_page(x)	(mem_map+(((x).pte_low >> PAGE_SHIFT) | ((x).pte_high << (32 - PAGE_SHIFT))))
    3.98 -#define pte_none(x)	(!(x).pte_low && !(x).pte_high)
    3.99 -
   3.100 -static inline pte_t __mk_pte(unsigned long page_nr, pgprot_t pgprot)
   3.101 -{
   3.102 -	pte_t pte;
   3.103 -
   3.104 -	pte.pte_high = page_nr >> (32 - PAGE_SHIFT);
   3.105 -	pte.pte_low = (page_nr << PAGE_SHIFT) | pgprot_val(pgprot);
   3.106 -	return pte;
   3.107 -}
   3.108 -
   3.109 -#endif /* _I386_PGTABLE_3LEVEL_H */
     4.1 --- a/xenolinux-2.4.21-pre4-sparse/mkbuildtree	Fri Mar 21 11:01:27 2003 +0000
     4.2 +++ b/xenolinux-2.4.21-pre4-sparse/mkbuildtree	Sat Mar 22 18:47:47 2003 +0000
     4.3 @@ -74,6 +74,7 @@ ln -sf ../asm-i386/mtrr.h
     4.4  ln -sf ../asm-i386/namei.h 
     4.5  ln -sf ../asm-i386/param.h 
     4.6  ln -sf ../asm-i386/parport.h 
     4.7 +ln -sf ../asm-i386/pgtable-3level.h 
     4.8  ln -sf ../asm-i386/poll.h 
     4.9  ln -sf ../asm-i386/posix_types.h 
    4.10  ln -sf ../asm-i386/resource.h 
    4.11 @@ -112,6 +113,7 @@ ln -sf ../asm-i386/vga.h
    4.12  ln -sf ../asm-i386/xor.h 
    4.13  
    4.14  cd ../../arch/xeno/kernel
    4.15 +ln -sf ../../i386/kernel/i387.c
    4.16  ln -sf ../../i386/kernel/init_task.c
    4.17  ln -sf ../../i386/kernel/ptrace.c
    4.18  ln -sf ../../i386/kernel/semaphore.c