ia64/xen-unstable

changeset 7272:f1abe953e401

Remove linux-2.4 sparse tree.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Oct 07 23:36:26 2005 +0100 (2005-10-07)
parents bf07490fab19
children 32c3658d7391
files Makefile README docs/misc/xen_config.html docs/src/user/installation.tex docs/src/user/introduction.tex
line diff
     1.1 --- a/Makefile	Fri Oct 07 23:22:35 2005 +0100
     1.2 +++ b/Makefile	Fri Oct 07 23:36:26 2005 +0100
     1.3 @@ -3,8 +3,7 @@
     1.4  #
     1.5  
     1.6  KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
     1.7 -# linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
     1.8 -# You may use wildcards in the above e.g. KERNELS=*2.4*
     1.9 +# You may use wildcards in the above e.g. KERNELS=*2.6*
    1.10  
    1.11  XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
    1.12  
    1.13 @@ -188,12 +187,5 @@ uninstall:
    1.14  	rm -rf $(D)/usr/share/man/man8/xen*
    1.15  
    1.16  # Legacy targets for compatibility
    1.17 -linux24:
    1.18 -	$(MAKE) 'KERNELS=linux-2.4*' kernels
    1.19 -
    1.20  linux26:
    1.21  	$(MAKE) 'KERNELS=linux-2.6*' kernels
    1.22 -
    1.23 -netbsd20:
    1.24 -	$(MAKE) netbsd-2.0-xenU-build
    1.25 -
     2.1 --- a/README	Fri Oct 07 23:22:35 2005 +0100
     2.2 +++ b/README	Fri Oct 07 23:36:26 2005 +0100
     2.3 @@ -22,7 +22,7 @@ Xen is freely-distributable Open Source 
     2.4  GNU GPL.
     2.5  
     2.6  The 2.0 release offers excellent performance, hardware support and
     2.7 -enterprise-grade features such as live migration. Linux 2.6, 2.4 and
     2.8 +enterprise-grade features such as live migration. Linux 2.6 and
     2.9  NetBSD 2.0 are already available for Xen, with more operating system
    2.10  ports on the way.
    2.11  
    2.12 @@ -97,8 +97,8 @@ 1. Download and untar the source tarball
    2.13     version for unstable.
    2.14  
    2.15  2. cd to xen-unstable (or whatever you sensibly rename it to).
    2.16 -   The Linux (2.4 and 2.6), netbsd and freebsd kernel source
    2.17 -   trees are in the $os-$version-xen-sparse directories.
    2.18 +   The Linux, netbsd and freebsd kernel source trees are in
    2.19 +   the $os-$version-xen-sparse directories.
    2.20  
    2.21  On Linux:
    2.22  
     3.1 --- a/buildconfigs/mk.linux-2.4-xenU	Fri Oct 07 23:22:35 2005 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,51 +0,0 @@
     3.4 -
     3.5 -OS           = linux
     3.6 -
     3.7 -LINUX_SERIES = 2.4
     3.8 -LINUX_VER    = 2.4.30
     3.9 -
    3.10 -EXTRAVERSION = xenU
    3.11 -
    3.12 -LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
    3.13 -
    3.14 -include buildconfigs/Rules.mk
    3.15 -
    3.16 -.PHONY: build clean delete
    3.17 -
    3.18 -# The real action starts here!
    3.19 -build: $(LINUX_DIR)/include/linux/autoconf.h
    3.20 -	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    3.21 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    3.22 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    3.23 -	fi
    3.24 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    3.25 -
    3.26 -$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    3.27 -	rm -rf $(LINUX_DIR)
    3.28 -	cp -al $(<D) $(LINUX_DIR)
    3.29 -	# Apply arch-xen patches
    3.30 -	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    3.31 -          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    3.32 -	# Re-use config from install dir if one exits else use default config
    3.33 -	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    3.34 -	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    3.35 -	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    3.36 -	  || cp $(LINUX_DIR)/arch/xen/defconfig-$(EXTRAVERSION) \
    3.37 -		$(LINUX_DIR)/.config
    3.38 -	# Patch kernel Makefile to set EXTRAVERSION
    3.39 -	( cd $(LINUX_DIR) ; \
    3.40 -	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    3.41 -	  rm -f Makefile ; mv Mk.tmp Makefile )
    3.42 -	make -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    3.43 -	make -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) dep
    3.44 -
    3.45 -config: CONFIGMODE = menuconfig
    3.46 -config: $(LINUX_DIR)/include/linux/autoconf.h
    3.47 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    3.48 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) dep
    3.49 -
    3.50 -clean::
    3.51 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    3.52 -
    3.53 -delete: 
    3.54 -	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
     4.1 --- a/docs/misc/xen_config.html	Fri Oct 07 23:22:35 2005 +0100
     4.2 +++ b/docs/misc/xen_config.html	Fri Oct 07 23:36:26 2005 +0100
     4.3 @@ -154,7 +154,7 @@ one vif with default MAC.
     4.4      (memory 64)
     4.5      (image
     4.6          (linux
     4.7 -            (kernel /boot/vmlinuz-2.4.26-xen)
     4.8 +            (kernel /boot/vmlinuz-2.6.12-xen)
     4.9              (ip ::::xendom1:eth0:dhcp)
    4.10              (root /dev/xda1)
    4.11              (args 'rw fastboot 4')
     5.1 --- a/docs/src/user/installation.tex	Fri Oct 07 23:22:35 2005 +0100
     5.2 +++ b/docs/src/user/installation.tex	Fri Oct 07 23:36:26 2005 +0100
     5.3 @@ -1,7 +1,7 @@
     5.4  \chapter{Installation}
     5.5  
     5.6  The Xen distribution includes three main components: Xen itself, ports
     5.7 -of Linux 2.4 and 2.6 and NetBSD to run on Xen, and the userspace
     5.8 +of Linux and NetBSD to run on Xen, and the userspace
     5.9  tools required to manage a Xen-based system.  This chapter describes
    5.10  how to install the Xen~2.0 distribution from source.  Alternatively,
    5.11  there may be pre-built packages available as part of your operating
    5.12 @@ -169,7 +169,7 @@ KERNELS ?= mk.linux-2.6-xen0 mk.linux-2.
    5.13  
    5.14  You can edit this line to include any set of operating system kernels
    5.15  which have configurations in the top-level \path{buildconfigs/}
    5.16 -directory, for example \path{mk.linux-2.4-xenU} to build a Linux 2.4
    5.17 +directory, for example \path{mk.linux-2.6-xenU} to build a Linux 2.6
    5.18  kernel containing only virtual device drivers.
    5.19  
    5.20  %% Inspect the Makefile if you want to see what goes on during a
    5.21 @@ -190,10 +190,6 @@ kernel containing only virtual device dr
    5.22  %%   mkbuildtree} script to add the Xen patches to the kernel.
    5.23  
    5.24  
    5.25 -%% The procedure is similar to build the Linux 2.4 port: \\
    5.26 -%% \verb!# LINUX_SRC=/path/to/linux2.4/source make linux24!
    5.27 -
    5.28 -
    5.29  %% \framebox{\parbox{5in}{
    5.30  %%     {\bf Distro specific:} \\
    5.31  %%     {\it Gentoo} --- if not using udev (most installations,
     6.1 --- a/docs/src/user/introduction.tex	Fri Oct 07 23:22:35 2005 +0100
     6.2 +++ b/docs/src/user/introduction.tex	Fri Oct 07 23:36:26 2005 +0100
     6.3 @@ -28,7 +28,7 @@ system kernels must explicitly support X
     6.4  space applications and libraries \emph{do not} require modification.
     6.5  
     6.6  Xen support is available for increasingly many operating systems:
     6.7 -right now, Linux 2.4, Linux 2.6 and NetBSD are available for Xen 2.0.
     6.8 +right now, Linux and NetBSD are available for Xen 2.0.
     6.9  A FreeBSD port is undergoing testing and will be incorporated into the
    6.10  release soon. Other OS ports, including Plan 9, are in progress.  We
    6.11  hope that that arch-xen patches will be incorporated into the
     7.1 --- a/linux-2.4-xen-sparse/Makefile	Fri Oct 07 23:22:35 2005 +0100
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,592 +0,0 @@
     7.4 -VERSION = 2
     7.5 -PATCHLEVEL = 4
     7.6 -SUBLEVEL = 30
     7.7 -EXTRAVERSION =
     7.8 -
     7.9 -KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
    7.10 -
    7.11 -# SUBARCH always tells us the underlying machine architecture.
    7.12 -# Unless overridden, by default ARCH is equivalent to SUBARCH.
    7.13 -# This will be overriden for Xen and UML builds.
    7.14 -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
    7.15 -ARCH ?= $(SUBARCH)
    7.16 -
    7.17 -## XXX The following hack can be discarded after users have adjusted to the
    7.18 -## architectural name change 'xeno' -> 'xen'.
    7.19 -ifeq ($(ARCH),xeno)
    7.20 -  ARCH := xen
    7.21 -endif
    7.22 -
    7.23 -KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
    7.24 -
    7.25 -CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
    7.26 -	  else if [ -x /bin/bash ]; then echo /bin/bash; \
    7.27 -	  else echo sh; fi ; fi)
    7.28 -TOPDIR	:= $(shell /bin/pwd)
    7.29 -
    7.30 -HPATH   	= $(TOPDIR)/include
    7.31 -FINDHPATH	= $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
    7.32 -
    7.33 -HOSTCC  	= gcc
    7.34 -HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
    7.35 -
    7.36 -CROSS_COMPILE 	=
    7.37 -
    7.38 -#
    7.39 -# Include the make variables (CC, etc...)
    7.40 -#
    7.41 -
    7.42 -AS		= $(CROSS_COMPILE)as
    7.43 -LD		= $(CROSS_COMPILE)ld
    7.44 -CC		= $(CROSS_COMPILE)gcc
    7.45 -CPP		= $(CC) -E
    7.46 -AR		= $(CROSS_COMPILE)ar
    7.47 -NM		= $(CROSS_COMPILE)nm
    7.48 -STRIP		= $(CROSS_COMPILE)strip
    7.49 -OBJCOPY		= $(CROSS_COMPILE)objcopy
    7.50 -OBJDUMP		= $(CROSS_COMPILE)objdump
    7.51 -MAKEFILES	= $(TOPDIR)/.config
    7.52 -GENKSYMS	= /sbin/genksyms
    7.53 -DEPMOD		= /sbin/depmod
    7.54 -MODFLAGS	= -DMODULE
    7.55 -CFLAGS_KERNEL	=
    7.56 -PERL		= perl
    7.57 -AWK		= awk
    7.58 -RPM 		:= $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
    7.59 -		    	else echo rpm; fi)
    7.60 -
    7.61 -export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
    7.62 -	CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
    7.63 -	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL AWK
    7.64 -
    7.65 -all:	do-it-all
    7.66 -
    7.67 -#
    7.68 -# Make "config" the default target if there is no configuration file or
    7.69 -# "depend" the target if there is no top-level dependency information.
    7.70 -#
    7.71 -
    7.72 -ifeq (.config,$(wildcard .config))
    7.73 -include .config
    7.74 -ifeq (.depend,$(wildcard .depend))
    7.75 -include .depend
    7.76 -do-it-all:	Version vmlinux
    7.77 -else
    7.78 -CONFIGURATION = depend
    7.79 -do-it-all:	depend
    7.80 -endif
    7.81 -else
    7.82 -CONFIGURATION = config
    7.83 -do-it-all:	config
    7.84 -endif
    7.85 -
    7.86 -#
    7.87 -# INSTALL_PATH specifies where to place the updated kernel and system map
    7.88 -# images.  Uncomment if you want to place them anywhere other than root.
    7.89 -#
    7.90 -
    7.91 -#export	INSTALL_PATH=/boot
    7.92 -
    7.93 -#
    7.94 -# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
    7.95 -# relocations required by build roots.  This is not defined in the
    7.96 -# makefile but the arguement can be passed to make if needed.
    7.97 -#
    7.98 -
    7.99 -MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
   7.100 -export MODLIB
   7.101 -
   7.102 -#
   7.103 -# standard CFLAGS
   7.104 -#
   7.105 -
   7.106 -CPPFLAGS := -D__KERNEL__ -I$(HPATH)
   7.107 -
   7.108 -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
   7.109 -	  -fno-strict-aliasing -fno-common
   7.110 -ifndef CONFIG_FRAME_POINTER
   7.111 -CFLAGS += -fomit-frame-pointer
   7.112 -endif
   7.113 -AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
   7.114 -
   7.115 -#
   7.116 -# ROOT_DEV specifies the default root-device when making the image.
   7.117 -# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
   7.118 -# the default of FLOPPY is used by 'build'.
   7.119 -# This is i386 specific.
   7.120 -#
   7.121 -
   7.122 -export ROOT_DEV = CURRENT
   7.123 -
   7.124 -#
   7.125 -# If you want to preset the SVGA mode, uncomment the next line and
   7.126 -# set SVGA_MODE to whatever number you want.
   7.127 -# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
   7.128 -# The number is the same as you would ordinarily press at bootup.
   7.129 -# This is i386 specific.
   7.130 -#
   7.131 -
   7.132 -export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
   7.133 -
   7.134 -#
   7.135 -# If you want the RAM disk device, define this to be the size in blocks.
   7.136 -# This is i386 specific.
   7.137 -#
   7.138 -
   7.139 -#export RAMDISK = -DRAMDISK=512
   7.140 -
   7.141 -CORE_FILES	=kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
   7.142 -NETWORKS	=net/network.o
   7.143 -
   7.144 -LIBS		=$(TOPDIR)/lib/lib.a
   7.145 -SUBDIRS		=kernel drivers mm fs net ipc lib crypto
   7.146 -
   7.147 -DRIVERS-n :=
   7.148 -DRIVERS-y :=
   7.149 -DRIVERS-m :=
   7.150 -DRIVERS-  :=
   7.151 -
   7.152 -DRIVERS-$(CONFIG_ACPI_BOOT) += drivers/acpi/acpi.o
   7.153 -DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o
   7.154 -DRIVERS-y += drivers/char/char.o \
   7.155 -	drivers/block/block.o \
   7.156 -	drivers/misc/misc.o \
   7.157 -	drivers/net/net.o
   7.158 -DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
   7.159 -DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o
   7.160 -DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o
   7.161 -DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
   7.162 -DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
   7.163 -DRIVERS-$(CONFIG_DEV_APPLETALK) += drivers/net/appletalk/appletalk.o
   7.164 -DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.o
   7.165 -DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.o
   7.166 -DRIVERS-$(CONFIG_ARCNET) += drivers/net/arcnet/arcnetdrv.o
   7.167 -DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
   7.168 -DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
   7.169 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
   7.170 -DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
   7.171 -DRIVERS-$(CONFIG_FUSION_BOOT) += drivers/message/fusion/fusion.o
   7.172 -DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
   7.173 -
   7.174 -ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
   7.175 -DRIVERS-y += drivers/cdrom/driver.o
   7.176 -endif
   7.177 -
   7.178 -DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o
   7.179 -DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o
   7.180 -DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
   7.181 -DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
   7.182 -DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o
   7.183 -DRIVERS-$(CONFIG_NET_WIRELESS) += drivers/net/wireless/wireless_net.o
   7.184 -DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o
   7.185 -DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
   7.186 -DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
   7.187 -DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
   7.188 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
   7.189 -DRIVERS-$(CONFIG_PPC32) += drivers/macintosh/macintosh.o
   7.190 -DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
   7.191 -DRIVERS-$(CONFIG_ISAPNP) += drivers/pnp/pnp.o
   7.192 -DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
   7.193 -DRIVERS-$(CONFIG_VT) += drivers/video/video.o
   7.194 -DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
   7.195 -DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
   7.196 -DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
   7.197 -DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
   7.198 -DRIVERS-$(CONFIG_USB_GADGET) += drivers/usb/gadget/built-in.o
   7.199 -DRIVERS-y +=drivers/media/media.o
   7.200 -DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
   7.201 -DRIVERS-$(CONFIG_HIL) += drivers/hil/hil.o
   7.202 -DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o
   7.203 -DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
   7.204 -DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
   7.205 -DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
   7.206 -DRIVERS-$(CONFIG_GSC) += drivers/gsc/gscbus.o
   7.207 -DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
   7.208 -DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o
   7.209 -DRIVERS-$(CONFIG_ISDN_BOOL) += drivers/isdn/vmlinux-obj.o
   7.210 -DRIVERS-$(CONFIG_CRYPTO) += crypto/crypto.o
   7.211 -
   7.212 -DRIVERS := $(DRIVERS-y)
   7.213 -
   7.214 -
   7.215 -# files removed with 'make clean'
   7.216 -CLEAN_FILES = \
   7.217 -	kernel/ksyms.lst include/linux/compile.h \
   7.218 -	vmlinux System.map \
   7.219 -	.tmp* \
   7.220 -	drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
   7.221 -	drivers/char/conmakehash \
   7.222 -	drivers/char/drm/*-mod.c \
   7.223 -	drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
   7.224 -	drivers/zorro/devlist.h drivers/zorro/gen-devlist \
   7.225 -	drivers/sound/bin2hex drivers/sound/hex2hex \
   7.226 -	drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
   7.227 -	drivers/scsi/aic7xxx/aicasm/aicasm \
   7.228 -	drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
   7.229 -	drivers/scsi/aic7xxx/aicasm/aicasm_gram.h \
   7.230 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.c \
   7.231 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.h \
   7.232 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.c \
   7.233 -	drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
   7.234 -	drivers/scsi/aic7xxx/aicasm/aicdb.h \
   7.235 -	drivers/scsi/aic7xxx/aicasm/y.tab.h \
   7.236 -	drivers/scsi/53c700_d.h \
   7.237 -	drivers/tc/lk201-map.c \
   7.238 -	net/khttpd/make_times_h \
   7.239 -	net/khttpd/times.h \
   7.240 -	submenu* \
   7.241 -	drivers/ieee1394/oui.c
   7.242 -# directories removed with 'make clean'
   7.243 -CLEAN_DIRS = \
   7.244 -	modules
   7.245 -
   7.246 -# files removed with 'make mrproper'
   7.247 -MRPROPER_FILES = \
   7.248 -	include/linux/autoconf.h include/linux/version.h \
   7.249 -	lib/crc32table.h lib/gen_crc32table \
   7.250 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
   7.251 -	drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
   7.252 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
   7.253 -	drivers/net/hamradio/soundmodem/gentbl \
   7.254 -	drivers/sound/*_boot.h drivers/sound/.*.boot \
   7.255 -	drivers/sound/msndinit.c \
   7.256 -	drivers/sound/msndperm.c \
   7.257 -	drivers/sound/pndsperm.c \
   7.258 -	drivers/sound/pndspini.c \
   7.259 -	drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
   7.260 -	.version .config* config.in config.old \
   7.261 -	scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
   7.262 -	scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
   7.263 -	.menuconfig.log \
   7.264 -	include/asm \
   7.265 -	.hdepend scripts/mkdep scripts/split-include scripts/docproc \
   7.266 -	$(TOPDIR)/include/linux/modversions.h \
   7.267 -	kernel.spec
   7.268 -
   7.269 -# directories removed with 'make mrproper'
   7.270 -MRPROPER_DIRS = \
   7.271 -	include/config \
   7.272 -	$(TOPDIR)/include/linux/modules
   7.273 -
   7.274 -
   7.275 -include arch/$(ARCH)/Makefile
   7.276 -
   7.277 -# Extra cflags for kbuild 2.4.  The default is to forbid includes by kernel code
   7.278 -# from user space headers.  Some UML code requires user space headers, in the
   7.279 -# UML Makefiles add 'kbuild_2_4_nostdinc :=' before include Rules.make.  No
   7.280 -# other kernel code should include user space headers, if you need
   7.281 -# 'kbuild_2_4_nostdinc :=' or -I/usr/include for kernel code and you are not UML
   7.282 -# then your code is broken!  KAO.
   7.283 -
   7.284 -kbuild_2_4_nostdinc	:= -nostdinc -iwithprefix include
   7.285 -export kbuild_2_4_nostdinc
   7.286 -
   7.287 -export	CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
   7.288 -
   7.289 -export	NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
   7.290 -
   7.291 -.S.s:
   7.292 -	$(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $<
   7.293 -.S.o:
   7.294 -	$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
   7.295 -
   7.296 -Version: dummy
   7.297 -	@rm -f include/linux/compile.h
   7.298 -
   7.299 -boot: vmlinux
   7.300 -	@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
   7.301 -
   7.302 -vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs
   7.303 -	$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \
   7.304 -		--start-group \
   7.305 -		$(CORE_FILES) \
   7.306 -		$(DRIVERS) \
   7.307 -		$(NETWORKS) \
   7.308 -		$(LIBS) \
   7.309 -		--end-group \
   7.310 -		-o vmlinux
   7.311 -	$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
   7.312 -
   7.313 -symlinks:
   7.314 -	rm -f include/asm
   7.315 -	( cd include ; ln -sf asm-$(ARCH) asm)
   7.316 -	@if [ ! -d include/linux/modules ]; then \
   7.317 -		mkdir include/linux/modules; \
   7.318 -	fi
   7.319 -
   7.320 -oldconfig: symlinks
   7.321 -	$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
   7.322 -
   7.323 -xconfig: symlinks
   7.324 -	$(MAKE) -C scripts kconfig.tk
   7.325 -	wish -f scripts/kconfig.tk
   7.326 -
   7.327 -menuconfig: include/linux/version.h symlinks
   7.328 -	$(MAKE) -C scripts/lxdialog all
   7.329 -	$(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
   7.330 -
   7.331 -config: symlinks
   7.332 -	$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
   7.333 -
   7.334 -include/config/MARKER: scripts/split-include include/linux/autoconf.h
   7.335 -	scripts/split-include include/linux/autoconf.h include/config
   7.336 -	@ touch include/config/MARKER
   7.337 -
   7.338 -linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
   7.339 -
   7.340 -$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
   7.341 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
   7.342 -
   7.343 -$(TOPDIR)/include/linux/version.h: include/linux/version.h
   7.344 -$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
   7.345 -
   7.346 -newversion:
   7.347 -	. scripts/mkversion > .tmpversion
   7.348 -	@mv -f .tmpversion .version
   7.349 -
   7.350 -uts_len		:= 64
   7.351 -uts_truncate	:= sed -e 's/\(.\{1,$(uts_len)\}\).*/\1/'
   7.352 -
   7.353 -include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
   7.354 -	@echo -n \#`cat .version` > .ver1
   7.355 -	@if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver1; fi
   7.356 -	@if [ -f .name ]; then  echo -n \-`cat .name` >> .ver1; fi
   7.357 -	@LANG=C echo ' '`date` >> .ver1
   7.358 -	@echo \#define UTS_VERSION \"`cat .ver1 | $(uts_truncate)`\" > .ver
   7.359 -	@LANG=C echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
   7.360 -	@echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
   7.361 -	@echo \#define LINUX_COMPILE_HOST \"`hostname | $(uts_truncate)`\" >> .ver
   7.362 -	@([ -x /bin/dnsdomainname ] && /bin/dnsdomainname > .ver1) || \
   7.363 -	 ([ -x /bin/domainname ] && /bin/domainname > .ver1) || \
   7.364 -	 echo > .ver1
   7.365 -	@echo \#define LINUX_COMPILE_DOMAIN \"`cat .ver1 | $(uts_truncate)`\" >> .ver
   7.366 -	@echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> .ver
   7.367 -	@mv -f .ver $@
   7.368 -	@rm -f .ver1
   7.369 -
   7.370 -include/linux/version.h: ./Makefile
   7.371 -	@expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
   7.372 -	  (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
   7.373 -	@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
   7.374 -	@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
   7.375 -	@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
   7.376 -	@mv -f .ver $@
   7.377 -
   7.378 -comma	:= ,
   7.379 -
   7.380 -init/version.o: init/version.c include/linux/compile.h include/config/MARKER
   7.381 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(SUBARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
   7.382 -
   7.383 -init/main.o: init/main.c include/config/MARKER
   7.384 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
   7.385 -
   7.386 -init/do_mounts.o: init/do_mounts.c include/config/MARKER
   7.387 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
   7.388 -
   7.389 -fs lib mm ipc kernel drivers net: dummy
   7.390 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
   7.391 -
   7.392 -TAGS: dummy
   7.393 -	{ find include/asm-${ARCH} -name '*.h' -print ; \
   7.394 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
   7.395 -	find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | grep -v '\.svn' | etags -
   7.396 -
   7.397 -# Exuberant ctags works better with -I
   7.398 -tags: dummy
   7.399 -	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
   7.400 -	ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
   7.401 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
   7.402 -	find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
   7.403 -
   7.404 -ifdef CONFIG_MODULES
   7.405 -ifdef CONFIG_MODVERSIONS
   7.406 -MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
   7.407 -endif
   7.408 -
   7.409 -.PHONY: modules
   7.410 -modules: $(patsubst %, _mod_%, $(SUBDIRS))
   7.411 -
   7.412 -.PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
   7.413 -$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
   7.414 -	$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
   7.415 -
   7.416 -.PHONY: modules_install
   7.417 -modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
   7.418 -
   7.419 -.PHONY: _modinst_
   7.420 -_modinst_:
   7.421 -	@rm -rf $(MODLIB)/kernel
   7.422 -	@rm -f $(MODLIB)/build
   7.423 -	@mkdir -p $(MODLIB)/kernel
   7.424 -	@ln -s $(TOPDIR) $(MODLIB)/build
   7.425 -
   7.426 -# If System.map exists, run depmod.  This deliberately does not have a
   7.427 -# dependency on System.map since that would run the dependency tree on
   7.428 -# vmlinux.  This depmod is only for convenience to give the initial
   7.429 -# boot a modules.dep even before / is mounted read-write.  However the
   7.430 -# boot script depmod is the master version.
   7.431 -ifeq "$(strip $(INSTALL_MOD_PATH))" ""
   7.432 -depmod_opts	:=
   7.433 -else
   7.434 -depmod_opts	:= -b $(INSTALL_MOD_PATH) -r
   7.435 -endif
   7.436 -.PHONY: _modinst_post
   7.437 -_modinst_post: _modinst_post_pcmcia
   7.438 -	if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
   7.439 -
   7.440 -# Backwards compatibilty symlinks for people still using old versions
   7.441 -# of pcmcia-cs with hard coded pathnames on insmod.  Remove
   7.442 -# _modinst_post_pcmcia for kernel 2.4.1.
   7.443 -.PHONY: _modinst_post_pcmcia
   7.444 -_modinst_post_pcmcia:
   7.445 -	cd $(MODLIB); \
   7.446 -	mkdir -p pcmcia; \
   7.447 -	find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
   7.448 -
   7.449 -.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
   7.450 -$(patsubst %, _modinst_%, $(SUBDIRS)) :
   7.451 -	$(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
   7.452 -
   7.453 -# modules disabled....
   7.454 -
   7.455 -else
   7.456 -modules modules_install: dummy
   7.457 -	@echo
   7.458 -	@echo "The present kernel configuration has modules disabled."
   7.459 -	@echo "Type 'make config' and enable loadable module support."
   7.460 -	@echo "Then build a kernel with module support enabled."
   7.461 -	@echo
   7.462 -	@exit 1
   7.463 -endif
   7.464 -
   7.465 -clean:	archclean
   7.466 -	find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
   7.467 -		| grep -v lxdialog/ | xargs rm -f
   7.468 -	rm -f $(CLEAN_FILES)
   7.469 -	rm -rf $(CLEAN_DIRS)
   7.470 -	$(MAKE) -C Documentation/DocBook clean
   7.471 -
   7.472 -mrproper: clean archmrproper
   7.473 -	find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
   7.474 -	rm -f $(MRPROPER_FILES)
   7.475 -	rm -rf $(MRPROPER_DIRS)
   7.476 -	$(MAKE) -C Documentation/DocBook mrproper
   7.477 -
   7.478 -distclean: mrproper
   7.479 -	rm -f core `find . \( -not -type d \) -and \
   7.480 -		\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
   7.481 -		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
   7.482 -		-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
   7.483 -
   7.484 -backup: mrproper
   7.485 -	cd .. && tar cf - linux/ | gzip -9 > backup.gz
   7.486 -	sync
   7.487 -
   7.488 -sgmldocs: 
   7.489 -	chmod 755 $(TOPDIR)/scripts/docgen
   7.490 -	chmod 755 $(TOPDIR)/scripts/gen-all-syms
   7.491 -	chmod 755 $(TOPDIR)/scripts/kernel-doc
   7.492 -	$(MAKE) -C $(TOPDIR)/Documentation/DocBook books
   7.493 -
   7.494 -psdocs: sgmldocs
   7.495 -	$(MAKE) -C Documentation/DocBook ps
   7.496 -
   7.497 -pdfdocs: sgmldocs
   7.498 -	$(MAKE) -C Documentation/DocBook pdf
   7.499 -
   7.500 -htmldocs: sgmldocs
   7.501 -	$(MAKE) -C Documentation/DocBook html
   7.502 -
   7.503 -mandocs:
   7.504 -	chmod 755 $(TOPDIR)/scripts/kernel-doc
   7.505 -	chmod 755 $(TOPDIR)/scripts/split-man
   7.506 -	$(MAKE) -C Documentation/DocBook man
   7.507 -
   7.508 -sums:
   7.509 -	find . -type f -print | sort | xargs sum > .SUMS
   7.510 -
   7.511 -dep-files: scripts/mkdep archdep include/linux/version.h
   7.512 -	rm -f .depend .hdepend
   7.513 -	$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
   7.514 -ifdef CONFIG_MODVERSIONS
   7.515 -	$(MAKE) update-modverfile
   7.516 -endif
   7.517 -	scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
   7.518 -	scripts/mkdep -- init/*.c > .depend
   7.519 -
   7.520 -ifdef CONFIG_MODVERSIONS
   7.521 -MODVERFILE := $(TOPDIR)/include/linux/modversions.h
   7.522 -else
   7.523 -MODVERFILE :=
   7.524 -endif
   7.525 -export	MODVERFILE
   7.526 -
   7.527 -depend dep: dep-files
   7.528 -
   7.529 -checkconfig:
   7.530 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
   7.531 -
   7.532 -checkhelp:
   7.533 -	find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
   7.534 -
   7.535 -checkincludes:
   7.536 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
   7.537 -
   7.538 -ifdef CONFIGURATION
   7.539 -..$(CONFIGURATION):
   7.540 -	@echo
   7.541 -	@echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
   7.542 -	@echo
   7.543 -	$(MAKE) $(CONFIGURATION)
   7.544 -	@echo
   7.545 -	@echo "Successful. Try re-making (ignore the error that follows)"
   7.546 -	@echo
   7.547 -	exit 1
   7.548 -
   7.549 -#dummy: ..$(CONFIGURATION)
   7.550 -dummy:
   7.551 -
   7.552 -else
   7.553 -
   7.554 -dummy:
   7.555 -
   7.556 -endif
   7.557 -
   7.558 -include Rules.make
   7.559 -
   7.560 -#
   7.561 -# This generates dependencies for the .h files.
   7.562 -#
   7.563 -
   7.564 -scripts/mkdep: scripts/mkdep.c
   7.565 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
   7.566 -
   7.567 -scripts/split-include: scripts/split-include.c
   7.568 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
   7.569 -
   7.570 -#
   7.571 -# RPM target
   7.572 -#
   7.573 -#	If you do a make spec before packing the tarball you can rpm -ta it
   7.574 -#
   7.575 -spec:
   7.576 -	. scripts/mkspec >kernel.spec
   7.577 -
   7.578 -#
   7.579 -#	Build a tar ball, generate an rpm from it and pack the result
   7.580 -#	There arw two bits of magic here
   7.581 -#	1) The use of /. to avoid tar packing just the symlink
   7.582 -#	2) Removing the .dep files as they have source paths in them that
   7.583 -#	   will become invalid
   7.584 -#
   7.585 -rpm:	clean spec
   7.586 -	find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
   7.587 -	set -e; \
   7.588 -	cd $(TOPDIR)/.. ; \
   7.589 -	ln -sf $(TOPDIR) $(KERNELPATH) ; \
   7.590 -	tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
   7.591 -	rm $(KERNELPATH) ; \
   7.592 -	cd $(TOPDIR) ; \
   7.593 -	. scripts/mkversion > .version ; \
   7.594 -	$(RPM) -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
   7.595 -	rm $(TOPDIR)/../$(KERNELPATH).tar.gz
     8.1 --- a/linux-2.4-xen-sparse/arch/xen/Makefile	Fri Oct 07 23:22:35 2005 +0100
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,137 +0,0 @@
     8.4 -#
     8.5 -# xen/Makefile
     8.6 -#
     8.7 -# This file is included by the global makefile so that you can add your own
     8.8 -# architecture-specific flags and dependencies. Remember to do have actions
     8.9 -# for "archclean" and "archdep" for cleaning up and making dependencies for
    8.10 -# this architecture
    8.11 -#
    8.12 -# This file is subject to the terms and conditions of the GNU General Public
    8.13 -# License.  See the file "COPYING" in the main directory of this archive
    8.14 -# for more details.
    8.15 -#
    8.16 -# Copyright (C) 1994 by Linus Torvalds
    8.17 -#
    8.18 -# 19990713  Artur Skawina <skawina@geocities.com>
    8.19 -#           Added '-march' and '-mpreferred-stack-boundary' support
    8.20 -#
    8.21 -
    8.22 -# If no .config file exists then use the appropriate defconfig-* file
    8.23 -ifneq (.config,$(wildcard .config))
    8.24 -DUMMYX:=$(shell cp $(TOPDIR)/arch/xen/defconfig$(EXTRAVERSION) $(TOPDIR)/.config)
    8.25 --include $(TOPDIR)/.config
    8.26 -endif
    8.27 -
    8.28 -LD=$(CROSS_COMPILE)ld -m elf_i386
    8.29 -OBJCOPY=$(CROSS_COMPILE)objcopy -R .note -R .comment -S
    8.30 -LDFLAGS=-e stext
    8.31 -LINKFLAGS =-T $(TOPDIR)/arch/xen/vmlinux.lds $(LDFLAGS)
    8.32 -
    8.33 -CFLAGS += -pipe
    8.34 -
    8.35 -check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
    8.36 -
    8.37 -# prevent gcc from keeping the stack 16 byte aligned
    8.38 -CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
    8.39 -
    8.40 -ifdef CONFIG_M686
    8.41 -CFLAGS += -march=i686
    8.42 -endif
    8.43 -
    8.44 -ifdef CONFIG_MPENTIUMIII
    8.45 -CFLAGS += -march=i686
    8.46 -endif
    8.47 -
    8.48 -ifdef CONFIG_MPENTIUM4
    8.49 -CFLAGS += -march=i686
    8.50 -endif
    8.51 -
    8.52 -ifdef CONFIG_MK7
    8.53 -CFLAGS += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
    8.54 -endif
    8.55 -
    8.56 -# Disable unit-at-a-time mode, it makes gcc use a lot more stack
    8.57 -# due to the lack of sharing of stacklots.
    8.58 -CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
    8.59 -
    8.60 -HEAD := arch/xen/kernel/head.o arch/xen/kernel/init_task.o
    8.61 -
    8.62 -SUBDIRS += arch/xen/kernel arch/xen/mm arch/xen/lib
    8.63 -SUBDIRS += arch/xen/drivers/console 
    8.64 -SUBDIRS += arch/xen/drivers/evtchn
    8.65 -SUBDIRS += arch/xen/drivers/blkif
    8.66 -SUBDIRS += arch/xen/drivers/netif
    8.67 -SUBDIRS += arch/xen/drivers/balloon
    8.68 -ifdef CONFIG_XEN_PRIVILEGED_GUEST
    8.69 -SUBDIRS += arch/xen/drivers/dom0 
    8.70 -endif
    8.71 -
    8.72 -CORE_FILES += arch/xen/kernel/kernel.o arch/xen/mm/mm.o
    8.73 -CORE_FILES += arch/xen/drivers/evtchn/drv.o
    8.74 -CORE_FILES += arch/xen/drivers/console/drv.o
    8.75 -DRIVERS += arch/xen/drivers/blkif/drv.o
    8.76 -DRIVERS += arch/xen/drivers/netif/drv.o
    8.77 -ifdef CONFIG_XEN_PRIVILEGED_GUEST
    8.78 -CORE_FILES += arch/xen/drivers/dom0/drv.o
    8.79 -endif
    8.80 -CORE_FILES += arch/xen/drivers/balloon/drv.o
    8.81 -LIBS := $(TOPDIR)/arch/xen/lib/lib.a $(LIBS) $(TOPDIR)/arch/xen/lib/lib.a
    8.82 -
    8.83 -arch/xen/kernel: dummy
    8.84 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/kernel
    8.85 -
    8.86 -arch/xen/mm: dummy
    8.87 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/mm
    8.88 -
    8.89 -arch/xen/drivers/console: dummy
    8.90 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/console
    8.91 -
    8.92 -arch/xen/drivers/network: dummy
    8.93 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/network
    8.94 -
    8.95 -arch/xen/drivers/block: dummy
    8.96 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/block
    8.97 -
    8.98 -arch/xen/drivers/dom0: dummy
    8.99 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/dom0
   8.100 -
   8.101 -arch/xen/drivers/balloon: dummy
   8.102 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/balloon
   8.103 -
   8.104 -MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
   8.105 -
   8.106 -vmlinux: arch/xen/vmlinux.lds
   8.107 -
   8.108 -FORCE: ;
   8.109 -
   8.110 -.PHONY: bzImage compressed clean archclean archmrproper archdep
   8.111 -
   8.112 -
   8.113 -bzImage: vmlinux
   8.114 -	@$(MAKEBOOT) bzImage
   8.115 -
   8.116 -INSTALL_NAME ?= $(KERNELRELEASE)
   8.117 -install: bzImage
   8.118 -	mkdir -p $(INSTALL_PATH)/boot
   8.119 -	ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
   8.120 -	rm -f $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
   8.121 -	install -m0644 arch/$(ARCH)/boot/bzImage $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
   8.122 -	install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(INSTALL_NAME)$(INSTALL_SUFFIX)
   8.123 -	install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
   8.124 -	install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(INSTALL_NAME)$(INSTALL_SUFFIX)
   8.125 -	ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
   8.126 -
   8.127 -%_config: arch/xen/defconfig-%
   8.128 -	rm -f .config arch/xen/defconfig
   8.129 -	cp -f arch/xen/defconfig-$(@:_config=) arch/xen/defconfig
   8.130 -	cp -f arch/xen/defconfig-$(@:_config=) .config
   8.131 -
   8.132 -
   8.133 -archclean:
   8.134 -	@$(MAKEBOOT) clean
   8.135 -
   8.136 -archmrproper:
   8.137 -	rm -f include/asm-xen/xen-public/arch
   8.138 -
   8.139 -archdep:
   8.140 -	@$(MAKEBOOT) dep
     9.1 --- a/linux-2.4-xen-sparse/arch/xen/boot/Makefile	Fri Oct 07 23:22:35 2005 +0100
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,13 +0,0 @@
     9.4 -#
     9.5 -# arch/xen/boot/Makefile
     9.6 -#
     9.7 -
     9.8 -bzImage: $(TOPDIR)/vmlinux
     9.9 -	$(OBJCOPY) $< Image
    9.10 -	gzip -f -9 < Image > $@
    9.11 -	rm -f Image
    9.12 -
    9.13 -dep:
    9.14 -
    9.15 -clean:
    9.16 -	rm -f bzImage Image
    10.1 --- a/linux-2.4-xen-sparse/arch/xen/config.in	Fri Oct 07 23:22:35 2005 +0100
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,327 +0,0 @@
    10.4 -#
    10.5 -# For a description of the syntax of this configuration file,
    10.6 -# see Documentation/kbuild/config-language.txt.
    10.7 -#
    10.8 -mainmenu_name "Linux Kernel Configuration"
    10.9 -
   10.10 -define_bool CONFIG_XEN y
   10.11 -
   10.12 -define_bool CONFIG_X86 y
   10.13 -define_bool CONFIG_ISA y
   10.14 -define_bool CONFIG_SBUS n
   10.15 -
   10.16 -define_bool CONFIG_UID16 y
   10.17 -
   10.18 -mainmenu_option next_comment
   10.19 -comment 'Xen'
   10.20 -bool 'Support for privileged operations (domain 0)' CONFIG_XEN_PRIVILEGED_GUEST
   10.21 -bool 'Device-driver domain (physical device access)' CONFIG_XEN_PHYSDEV_ACCESS
   10.22 -bool 'Scrub memory before freeing it to Xen' CONFIG_XEN_SCRUB_PAGES
   10.23 -bool 'Network-device frontend driver' CONFIG_XEN_NETDEV_FRONTEND
   10.24 -bool 'Block-device frontend driver' CONFIG_XEN_BLKDEV_FRONTEND
   10.25 -bool 'Block-device uses grant tables' CONFIG_XEN_BLKDEV_GRANT
   10.26 -endmenu
   10.27 -# The IBM S/390 patch needs this.
   10.28 -define_bool CONFIG_NO_IDLE_HZ y
   10.29 -
   10.30 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   10.31 -   define_bool CONFIG_FOREIGN_PAGES y
   10.32 -else
   10.33 -   define_bool CONFIG_FOREIGN_PAGES n
   10.34 -   define_bool CONFIG_NETDEVICES y
   10.35 -   define_bool CONFIG_VT n
   10.36 -fi
   10.37 -
   10.38 -mainmenu_option next_comment
   10.39 -comment 'Code maturity level options'
   10.40 -bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
   10.41 -endmenu
   10.42 -
   10.43 -mainmenu_option next_comment
   10.44 -comment 'Loadable module support'
   10.45 -bool 'Enable loadable module support' CONFIG_MODULES
   10.46 -if [ "$CONFIG_MODULES" = "y" ]; then
   10.47 -   bool '  Set version information on all module symbols' CONFIG_MODVERSIONS
   10.48 -   bool '  Kernel module loader' CONFIG_KMOD
   10.49 -fi
   10.50 -endmenu
   10.51 -
   10.52 -mainmenu_option next_comment
   10.53 -comment 'Processor type and features'
   10.54 -choice 'Processor family' \
   10.55 -	"Pentium-Pro/Celeron/Pentium-II		CONFIG_M686 \
   10.56 -	 Pentium-III/Celeron(Coppermine)	CONFIG_MPENTIUMIII \
   10.57 -	 Pentium-4				CONFIG_MPENTIUM4 \
   10.58 -	 Athlon/Duron/K7			CONFIG_MK7 \
   10.59 -	 Opteron/Athlon64/Hammer/K8             CONFIG_MK8 \
   10.60 -	 VIA-C3-2                               CONFIG_MVIAC3_2" Pentium-Pro
   10.61 -
   10.62 -   define_bool CONFIG_X86_WP_WORKS_OK y
   10.63 -   define_bool CONFIG_X86_INVLPG y
   10.64 -   define_bool CONFIG_X86_CMPXCHG y
   10.65 -   define_bool CONFIG_X86_XADD y
   10.66 -   define_bool CONFIG_X86_BSWAP y
   10.67 -   define_bool CONFIG_X86_POPAD_OK y
   10.68 -   define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
   10.69 -   define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
   10.70 -
   10.71 -   define_bool CONFIG_X86_GOOD_APIC y
   10.72 -   define_bool CONFIG_X86_PGE y
   10.73 -   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
   10.74 -   define_bool CONFIG_X86_TSC y
   10.75 -
   10.76 -if [ "$CONFIG_M686" = "y" ]; then
   10.77 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   10.78 -fi
   10.79 -if [ "$CONFIG_MPENTIUMIII" = "y" ]; then
   10.80 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   10.81 -fi
   10.82 -if [ "$CONFIG_MPENTIUM4" = "y" ]; then
   10.83 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 7
   10.84 -fi
   10.85 -if [ "$CONFIG_MK8" = "y" ]; then
   10.86 -   define_bool CONFIG_MK7 y
   10.87 -fi
   10.88 -if [ "$CONFIG_MK7" = "y" ]; then
   10.89 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 6
   10.90 -   define_bool CONFIG_X86_USE_3DNOW y
   10.91 -fi
   10.92 -if [ "$CONFIG_MVIAC3_2" = "y" ]; then
   10.93 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   10.94 -fi
   10.95 -
   10.96 -#if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
   10.97 -#   tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD
   10.98 -#fi
   10.99 -
  10.100 -choice 'High Memory Support' \
  10.101 -	"off    CONFIG_NOHIGHMEM \
  10.102 -	 4GB    CONFIG_HIGHMEM4G" off
  10.103 -#	 64GB   CONFIG_HIGHMEM64G" off
  10.104 -if [ "$CONFIG_HIGHMEM4G" = "y" ]; then
  10.105 -   define_bool CONFIG_HIGHMEM y
  10.106 -fi
  10.107 -if [ "$CONFIG_HIGHMEM64G" = "y" ]; then
  10.108 -   define_bool CONFIG_HIGHMEM y
  10.109 -   define_bool CONFIG_X86_PAE y
  10.110 -fi
  10.111 -
  10.112 -if [ "$CONFIG_HIGHMEM" = "y" ]; then
  10.113 -   bool 'HIGHMEM I/O support' CONFIG_HIGHIO
  10.114 -fi
  10.115 -
  10.116 -define_int CONFIG_FORCE_MAX_ZONEORDER 11
  10.117 -
  10.118 -#bool 'Symmetric multi-processing support' CONFIG_SMP
  10.119 -#if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then
  10.120 -#   define_bool CONFIG_HAVE_DEC_LOCK y
  10.121 -#fi
  10.122 -endmenu
  10.123 -
  10.124 -mainmenu_option next_comment
  10.125 -comment 'General setup'
  10.126 -
  10.127 -bool 'Networking support' CONFIG_NET
  10.128 -
  10.129 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  10.130 -   bool 'PCI support' CONFIG_PCI
  10.131 -   source drivers/pci/Config.in
  10.132 -
  10.133 -   bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
  10.134 -
  10.135 -   if [ "$CONFIG_HOTPLUG" = "y" ] ; then
  10.136 -      source drivers/pcmcia/Config.in
  10.137 -      source drivers/hotplug/Config.in
  10.138 -   else
  10.139 -      define_bool CONFIG_PCMCIA n
  10.140 -      define_bool CONFIG_HOTPLUG_PCI n
  10.141 -   fi
  10.142 -fi
  10.143 -
  10.144 -bool 'System V IPC' CONFIG_SYSVIPC
  10.145 -bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
  10.146 -bool 'Sysctl support' CONFIG_SYSCTL
  10.147 -if [ "$CONFIG_PROC_FS" = "y" ]; then
  10.148 -   choice 'Kernel core (/proc/kcore) format' \
  10.149 -	"ELF		CONFIG_KCORE_ELF	\
  10.150 -	 A.OUT		CONFIG_KCORE_AOUT" ELF
  10.151 -fi
  10.152 -tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
  10.153 -bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
  10.154 -tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
  10.155 -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
  10.156 -
  10.157 -endmenu
  10.158 -
  10.159 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  10.160 -   source drivers/mtd/Config.in
  10.161 -
  10.162 -   source drivers/parport/Config.in
  10.163 -
  10.164 -   source drivers/pnp/Config.in
  10.165 -
  10.166 -   source drivers/block/Config.in
  10.167 -
  10.168 -   source drivers/md/Config.in
  10.169 -fi
  10.170 -
  10.171 -if [ "$CONFIG_NET" = "y" ]; then
  10.172 -   source net/Config.in
  10.173 -fi
  10.174 -
  10.175 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  10.176 -   mainmenu_option next_comment
  10.177 -   comment 'ATA/IDE/MFM/RLL support'
  10.178 -
  10.179 -   tristate 'ATA/IDE/MFM/RLL support' CONFIG_IDE
  10.180 -
  10.181 -   if [ "$CONFIG_IDE" != "n" ]; then
  10.182 -      source drivers/ide/Config.in
  10.183 -   else
  10.184 -      define_bool CONFIG_BLK_DEV_HD n
  10.185 -   fi
  10.186 -   endmenu
  10.187 -fi
  10.188 -
  10.189 -mainmenu_option next_comment
  10.190 -comment 'SCSI support'
  10.191 -
  10.192 -tristate 'SCSI support' CONFIG_SCSI
  10.193 -
  10.194 -if [ "$CONFIG_SCSI" != "n" ]; then
  10.195 -   source drivers/scsi/Config.in
  10.196 -fi
  10.197 -endmenu
  10.198 -
  10.199 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  10.200 -   source drivers/message/fusion/Config.in
  10.201 -
  10.202 -   source drivers/ieee1394/Config.in
  10.203 -
  10.204 -   source drivers/message/i2o/Config.in
  10.205 -
  10.206 -   if [ "$CONFIG_NET" = "y" ]; then
  10.207 -      mainmenu_option next_comment
  10.208 -      comment 'Network device support'
  10.209 -
  10.210 -      bool 'Network device support' CONFIG_NETDEVICES
  10.211 -      if [ "$CONFIG_NETDEVICES" = "y" ]; then
  10.212 -         source drivers/net/Config.in
  10.213 -         if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
  10.214 -            source drivers/atm/Config.in
  10.215 -         fi
  10.216 -      fi
  10.217 -      endmenu
  10.218 -   fi
  10.219 -
  10.220 -   source net/ax25/Config.in
  10.221 -
  10.222 -   source net/irda/Config.in
  10.223 -
  10.224 -   mainmenu_option next_comment
  10.225 -   comment 'ISDN subsystem'
  10.226 -   if [ "$CONFIG_NET" != "n" ]; then
  10.227 -      tristate 'ISDN support' CONFIG_ISDN
  10.228 -      if [ "$CONFIG_ISDN" != "n" ]; then
  10.229 -         source drivers/isdn/Config.in
  10.230 -      fi
  10.231 -   fi
  10.232 -   endmenu
  10.233 -
  10.234 -   if [ "$CONFIG_ISA" = "y" ]; then
  10.235 -       mainmenu_option next_comment
  10.236 -       comment 'Old CD-ROM drivers (not SCSI, not IDE)'
  10.237 -   
  10.238 -       bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
  10.239 -       if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
  10.240 -          source drivers/cdrom/Config.in
  10.241 -       fi
  10.242 -       endmenu
  10.243 -   fi
  10.244 -
  10.245 -   #
  10.246 -   # input before char - char/joystick depends on it. As does USB.
  10.247 -   #
  10.248 -   source drivers/input/Config.in
  10.249 -else
  10.250 -   #
  10.251 -   # Block device driver configuration
  10.252 -   #
  10.253 -   mainmenu_option next_comment
  10.254 -   comment 'Block devices'
  10.255 -   tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
  10.256 -   dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
  10.257 -   tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
  10.258 -   if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
  10.259 -      int '  Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
  10.260 -   fi
  10.261 -   dep_bool '  Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
  10.262 -   bool 'Per partition statistics in /proc/partitions' CONFIG_BLK_STATS
  10.263 -   define_bool CONFIG_BLK_DEV_HD n
  10.264 -   endmenu
  10.265 -fi
  10.266 -
  10.267 -source drivers/char/Config.in
  10.268 -
  10.269 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  10.270 -   source drivers/media/Config.in
  10.271 -fi
  10.272 -
  10.273 -source fs/Config.in
  10.274 -
  10.275 -mainmenu_option next_comment
  10.276 -comment 'Console drivers'
  10.277 -
  10.278 -define_bool CONFIG_XEN_CONSOLE y
  10.279 -
  10.280 -if [ "$CONFIG_VT" = "y" ]; then
  10.281 -   bool 'VGA text console' CONFIG_VGA_CONSOLE
  10.282 -   bool 'Dummy console' CONFIG_DUMMY_CONSOLE 
  10.283 -   if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  10.284 -      bool 'Video mode selection support' CONFIG_VIDEO_SELECT
  10.285 -      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  10.286 -         tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
  10.287 -         source drivers/video/Config.in
  10.288 -      fi
  10.289 -   fi
  10.290 -fi
  10.291 -endmenu
  10.292 -
  10.293 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  10.294 -   mainmenu_option next_comment
  10.295 -   comment 'Sound'
  10.296 -
  10.297 -   tristate 'Sound card support' CONFIG_SOUND
  10.298 -   if [ "$CONFIG_SOUND" != "n" ]; then
  10.299 -      source drivers/sound/Config.in
  10.300 -   fi
  10.301 -   endmenu
  10.302 -fi
  10.303 -
  10.304 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  10.305 -   source drivers/usb/Config.in
  10.306 -   source net/bluetooth/Config.in
  10.307 -fi
  10.308 -
  10.309 -mainmenu_option next_comment
  10.310 -comment 'Kernel hacking'
  10.311 -
  10.312 -bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
  10.313 -if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
  10.314 -   bool '  Check for stack overflows' CONFIG_DEBUG_STACKOVERFLOW
  10.315 -   bool '  Debug high memory support' CONFIG_DEBUG_HIGHMEM
  10.316 -   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
  10.317 -   bool '  Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT
  10.318 -   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
  10.319 -   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
  10.320 -   bool '  Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE
  10.321 -   bool '  Load all symbols for debugging' CONFIG_KALLSYMS
  10.322 -   bool '  Compile the kernel with frame pointers' CONFIG_FRAME_POINTER
  10.323 -fi
  10.324 -
  10.325 -int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0
  10.326 -
  10.327 -endmenu
  10.328 -
  10.329 -source crypto/Config.in
  10.330 -source lib/Config.in
    11.1 --- a/linux-2.4-xen-sparse/arch/xen/defconfig-xen0	Fri Oct 07 23:22:35 2005 +0100
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,927 +0,0 @@
    11.4 -#
    11.5 -# Automatically generated by make menuconfig: don't edit
    11.6 -#
    11.7 -CONFIG_XEN=y
    11.8 -CONFIG_X86=y
    11.9 -CONFIG_ISA=y
   11.10 -# CONFIG_SBUS is not set
   11.11 -CONFIG_UID16=y
   11.12 -
   11.13 -#
   11.14 -# Xen
   11.15 -#
   11.16 -CONFIG_XEN_PRIVILEGED_GUEST=y
   11.17 -CONFIG_XEN_PHYSDEV_ACCESS=y
   11.18 -# CONFIG_XEN_USB_BACKEND is not set
   11.19 -CONFIG_XEN_SCRUB_PAGES=y
   11.20 -CONFIG_XEN_NETDEV_FRONTEND=y
   11.21 -CONFIG_XEN_BLKDEV_FRONTEND=y
   11.22 -CONFIG_XEN_BLKDEV_GRANT=y
   11.23 -# CONFIG_XEN_USB_FRONTEND is not set
   11.24 -CONFIG_NO_IDLE_HZ=y
   11.25 -CONFIG_FOREIGN_PAGES=y
   11.26 -
   11.27 -#
   11.28 -# Code maturity level options
   11.29 -#
   11.30 -CONFIG_EXPERIMENTAL=y
   11.31 -
   11.32 -#
   11.33 -# Loadable module support
   11.34 -#
   11.35 -CONFIG_MODULES=y
   11.36 -CONFIG_MODVERSIONS=y
   11.37 -CONFIG_KMOD=y
   11.38 -
   11.39 -#
   11.40 -# Processor type and features
   11.41 -#
   11.42 -CONFIG_M686=y
   11.43 -# CONFIG_MPENTIUMIII is not set
   11.44 -# CONFIG_MPENTIUM4 is not set
   11.45 -# CONFIG_MK7 is not set
   11.46 -# CONFIG_MK8 is not set
   11.47 -# CONFIG_MVIAC3_2 is not set
   11.48 -CONFIG_X86_WP_WORKS_OK=y
   11.49 -CONFIG_X86_INVLPG=y
   11.50 -CONFIG_X86_CMPXCHG=y
   11.51 -CONFIG_X86_XADD=y
   11.52 -CONFIG_X86_BSWAP=y
   11.53 -CONFIG_X86_POPAD_OK=y
   11.54 -# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
   11.55 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   11.56 -CONFIG_X86_GOOD_APIC=y
   11.57 -CONFIG_X86_PGE=y
   11.58 -CONFIG_X86_USE_PPRO_CHECKSUM=y
   11.59 -CONFIG_X86_TSC=y
   11.60 -CONFIG_X86_L1_CACHE_SHIFT=5
   11.61 -CONFIG_NOHIGHMEM=y
   11.62 -# CONFIG_HIGHMEM4G is not set
   11.63 -CONFIG_FORCE_MAX_ZONEORDER=11
   11.64 -
   11.65 -#
   11.66 -# General setup
   11.67 -#
   11.68 -CONFIG_NET=y
   11.69 -CONFIG_PCI=y
   11.70 -CONFIG_PCI_NAMES=y
   11.71 -CONFIG_HOTPLUG=y
   11.72 -
   11.73 -#
   11.74 -# PCMCIA/CardBus support
   11.75 -#
   11.76 -# CONFIG_PCMCIA is not set
   11.77 -
   11.78 -#
   11.79 -# PCI Hotplug Support
   11.80 -#
   11.81 -# CONFIG_HOTPLUG_PCI is not set
   11.82 -# CONFIG_HOTPLUG_PCI_COMPAQ is not set
   11.83 -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
   11.84 -# CONFIG_HOTPLUG_PCI_SHPC is not set
   11.85 -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
   11.86 -# CONFIG_HOTPLUG_PCI_PCIE is not set
   11.87 -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
   11.88 -CONFIG_SYSVIPC=y
   11.89 -# CONFIG_BSD_PROCESS_ACCT is not set
   11.90 -CONFIG_SYSCTL=y
   11.91 -CONFIG_KCORE_ELF=y
   11.92 -# CONFIG_KCORE_AOUT is not set
   11.93 -CONFIG_BINFMT_AOUT=y
   11.94 -CONFIG_BINFMT_ELF=y
   11.95 -# CONFIG_BINFMT_MISC is not set
   11.96 -# CONFIG_OOM_KILLER is not set
   11.97 -
   11.98 -#
   11.99 -# Memory Technology Devices (MTD)
  11.100 -#
  11.101 -# CONFIG_MTD is not set
  11.102 -
  11.103 -#
  11.104 -# Parallel port support
  11.105 -#
  11.106 -# CONFIG_PARPORT is not set
  11.107 -
  11.108 -#
  11.109 -# Plug and Play configuration
  11.110 -#
  11.111 -CONFIG_PNP=y
  11.112 -# CONFIG_ISAPNP is not set
  11.113 -
  11.114 -#
  11.115 -# Block devices
  11.116 -#
  11.117 -# CONFIG_BLK_DEV_FD is not set
  11.118 -# CONFIG_BLK_DEV_XD is not set
  11.119 -# CONFIG_PARIDE is not set
  11.120 -# CONFIG_BLK_CPQ_DA is not set
  11.121 -# CONFIG_BLK_CPQ_CISS_DA is not set
  11.122 -# CONFIG_CISS_SCSI_TAPE is not set
  11.123 -# CONFIG_CISS_MONITOR_THREAD is not set
  11.124 -# CONFIG_BLK_DEV_DAC960 is not set
  11.125 -# CONFIG_BLK_DEV_UMEM is not set
  11.126 -# CONFIG_BLK_DEV_SX8 is not set
  11.127 -CONFIG_BLK_DEV_LOOP=y
  11.128 -CONFIG_BLK_DEV_NBD=y
  11.129 -CONFIG_BLK_DEV_RAM=y
  11.130 -CONFIG_BLK_DEV_RAM_SIZE=4096
  11.131 -CONFIG_BLK_DEV_INITRD=y
  11.132 -# CONFIG_BLK_STATS is not set
  11.133 -
  11.134 -#
  11.135 -# Multi-device support (RAID and LVM)
  11.136 -#
  11.137 -CONFIG_MD=y
  11.138 -CONFIG_BLK_DEV_MD=y
  11.139 -CONFIG_MD_LINEAR=y
  11.140 -# CONFIG_MD_RAID0 is not set
  11.141 -CONFIG_MD_RAID1=y
  11.142 -# CONFIG_MD_RAID5 is not set
  11.143 -# CONFIG_MD_MULTIPATH is not set
  11.144 -CONFIG_BLK_DEV_LVM=y
  11.145 -
  11.146 -#
  11.147 -# Networking options
  11.148 -#
  11.149 -CONFIG_PACKET=y
  11.150 -CONFIG_PACKET_MMAP=y
  11.151 -# CONFIG_NETLINK_DEV is not set
  11.152 -CONFIG_NETFILTER=y
  11.153 -# CONFIG_NETFILTER_DEBUG is not set
  11.154 -CONFIG_FILTER=y
  11.155 -CONFIG_UNIX=y
  11.156 -CONFIG_INET=y
  11.157 -# CONFIG_IP_MULTICAST is not set
  11.158 -# CONFIG_IP_ADVANCED_ROUTER is not set
  11.159 -CONFIG_IP_PNP=y
  11.160 -CONFIG_IP_PNP_DHCP=y
  11.161 -# CONFIG_IP_PNP_BOOTP is not set
  11.162 -# CONFIG_IP_PNP_RARP is not set
  11.163 -# CONFIG_NET_IPIP is not set
  11.164 -# CONFIG_NET_IPGRE is not set
  11.165 -# CONFIG_ARPD is not set
  11.166 -# CONFIG_INET_ECN is not set
  11.167 -# CONFIG_SYN_COOKIES is not set
  11.168 -
  11.169 -#
  11.170 -#   IP: Netfilter Configuration
  11.171 -#
  11.172 -CONFIG_IP_NF_CONNTRACK=m
  11.173 -CONFIG_IP_NF_FTP=m
  11.174 -# CONFIG_IP_NF_AMANDA is not set
  11.175 -CONFIG_IP_NF_TFTP=m
  11.176 -CONFIG_IP_NF_IRC=m
  11.177 -# CONFIG_IP_NF_QUEUE is not set
  11.178 -CONFIG_IP_NF_IPTABLES=y
  11.179 -# CONFIG_IP_NF_MATCH_LIMIT is not set
  11.180 -# CONFIG_IP_NF_MATCH_MAC is not set
  11.181 -# CONFIG_IP_NF_MATCH_PKTTYPE is not set
  11.182 -# CONFIG_IP_NF_MATCH_MARK is not set
  11.183 -# CONFIG_IP_NF_MATCH_MULTIPORT is not set
  11.184 -# CONFIG_IP_NF_MATCH_TOS is not set
  11.185 -# CONFIG_IP_NF_MATCH_RECENT is not set
  11.186 -# CONFIG_IP_NF_MATCH_ECN is not set
  11.187 -# CONFIG_IP_NF_MATCH_DSCP is not set
  11.188 -# CONFIG_IP_NF_MATCH_AH_ESP is not set
  11.189 -# CONFIG_IP_NF_MATCH_LENGTH is not set
  11.190 -# CONFIG_IP_NF_MATCH_TTL is not set
  11.191 -# CONFIG_IP_NF_MATCH_TCPMSS is not set
  11.192 -# CONFIG_IP_NF_MATCH_HELPER is not set
  11.193 -CONFIG_IP_NF_MATCH_STATE=m
  11.194 -CONFIG_IP_NF_MATCH_CONNTRACK=m
  11.195 -# CONFIG_IP_NF_MATCH_UNCLEAN is not set
  11.196 -# CONFIG_IP_NF_MATCH_OWNER is not set
  11.197 -CONFIG_IP_NF_MATCH_PHYSDEV=y
  11.198 -CONFIG_IP_NF_FILTER=y
  11.199 -CONFIG_IP_NF_TARGET_REJECT=y
  11.200 -# CONFIG_IP_NF_TARGET_MIRROR is not set
  11.201 -CONFIG_IP_NF_NAT=m
  11.202 -CONFIG_IP_NF_NAT_NEEDED=y
  11.203 -CONFIG_IP_NF_TARGET_MASQUERADE=m
  11.204 -CONFIG_IP_NF_TARGET_REDIRECT=m
  11.205 -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
  11.206 -CONFIG_IP_NF_NAT_IRC=m
  11.207 -CONFIG_IP_NF_NAT_FTP=m
  11.208 -CONFIG_IP_NF_NAT_TFTP=m
  11.209 -# CONFIG_IP_NF_MANGLE is not set
  11.210 -CONFIG_IP_NF_TARGET_LOG=y
  11.211 -CONFIG_IP_NF_TARGET_ULOG=y
  11.212 -# CONFIG_IP_NF_TARGET_TCPMSS is not set
  11.213 -# CONFIG_IP_NF_ARPTABLES is not set
  11.214 -
  11.215 -#
  11.216 -#   IP: Virtual Server Configuration
  11.217 -#
  11.218 -# CONFIG_IP_VS is not set
  11.219 -# CONFIG_IPV6 is not set
  11.220 -# CONFIG_KHTTPD is not set
  11.221 -
  11.222 -#
  11.223 -#    SCTP Configuration (EXPERIMENTAL)
  11.224 -#
  11.225 -# CONFIG_IP_SCTP is not set
  11.226 -# CONFIG_ATM is not set
  11.227 -CONFIG_VLAN_8021Q=y
  11.228 -# CONFIG_IPX is not set
  11.229 -# CONFIG_ATALK is not set
  11.230 -# CONFIG_DECNET is not set
  11.231 -CONFIG_BRIDGE=y
  11.232 -CONFIG_BRIDGE_NF_EBTABLES=m
  11.233 -CONFIG_BRIDGE_EBT_T_FILTER=m
  11.234 -CONFIG_BRIDGE_EBT_T_NAT=m
  11.235 -CONFIG_BRIDGE_EBT_BROUTE=m
  11.236 -CONFIG_BRIDGE_EBT_LOG=m
  11.237 -CONFIG_BRIDGE_EBT_IPF=m
  11.238 -CONFIG_BRIDGE_EBT_ARPF=m
  11.239 -CONFIG_BRIDGE_EBT_AMONG=m
  11.240 -CONFIG_BRIDGE_EBT_LIMIT=m
  11.241 -CONFIG_BRIDGE_EBT_VLANF=m
  11.242 -CONFIG_BRIDGE_EBT_802_3=m
  11.243 -CONFIG_BRIDGE_EBT_PKTTYPE=m
  11.244 -CONFIG_BRIDGE_EBT_STP=m
  11.245 -CONFIG_BRIDGE_EBT_MARKF=m
  11.246 -CONFIG_BRIDGE_EBT_ARPREPLY=m
  11.247 -CONFIG_BRIDGE_EBT_SNAT=m
  11.248 -CONFIG_BRIDGE_EBT_DNAT=m
  11.249 -CONFIG_BRIDGE_EBT_REDIRECT=m
  11.250 -CONFIG_BRIDGE_EBT_MARK_T=m
  11.251 -# CONFIG_X25 is not set
  11.252 -# CONFIG_LAPB is not set
  11.253 -# CONFIG_LLC is not set
  11.254 -# CONFIG_NET_DIVERT is not set
  11.255 -# CONFIG_ECONET is not set
  11.256 -# CONFIG_WAN_ROUTER is not set
  11.257 -# CONFIG_NET_FASTROUTE is not set
  11.258 -# CONFIG_NET_HW_FLOWCONTROL is not set
  11.259 -
  11.260 -#
  11.261 -# QoS and/or fair queueing
  11.262 -#
  11.263 -# CONFIG_NET_SCHED is not set
  11.264 -
  11.265 -#
  11.266 -# Network testing
  11.267 -#
  11.268 -# CONFIG_NET_PKTGEN is not set
  11.269 -
  11.270 -#
  11.271 -# ATA/IDE/MFM/RLL support
  11.272 -#
  11.273 -CONFIG_IDE=y
  11.274 -
  11.275 -#
  11.276 -# IDE, ATA and ATAPI Block devices
  11.277 -#
  11.278 -CONFIG_BLK_DEV_IDE=y
  11.279 -# CONFIG_BLK_DEV_HD_IDE is not set
  11.280 -# CONFIG_BLK_DEV_HD is not set
  11.281 -# CONFIG_BLK_DEV_IDE_SATA is not set
  11.282 -CONFIG_BLK_DEV_IDEDISK=y
  11.283 -CONFIG_IDEDISK_MULTI_MODE=y
  11.284 -CONFIG_IDEDISK_STROKE=y
  11.285 -# CONFIG_BLK_DEV_IDECS is not set
  11.286 -# CONFIG_BLK_DEV_DELKIN is not set
  11.287 -CONFIG_BLK_DEV_IDECD=y
  11.288 -CONFIG_BLK_DEV_IDETAPE=y
  11.289 -CONFIG_BLK_DEV_IDEFLOPPY=y
  11.290 -CONFIG_BLK_DEV_IDESCSI=y
  11.291 -CONFIG_IDE_TASK_IOCTL=y
  11.292 -CONFIG_BLK_DEV_CMD640=y
  11.293 -CONFIG_BLK_DEV_CMD640_ENHANCED=y
  11.294 -# CONFIG_BLK_DEV_ISAPNP is not set
  11.295 -CONFIG_BLK_DEV_IDEPCI=y
  11.296 -CONFIG_BLK_DEV_GENERIC=y
  11.297 -CONFIG_IDEPCI_SHARE_IRQ=y
  11.298 -CONFIG_BLK_DEV_IDEDMA_PCI=y
  11.299 -CONFIG_BLK_DEV_OFFBOARD=y
  11.300 -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
  11.301 -CONFIG_IDEDMA_PCI_AUTO=y
  11.302 -# CONFIG_IDEDMA_ONLYDISK is not set
  11.303 -CONFIG_BLK_DEV_IDEDMA=y
  11.304 -# CONFIG_IDEDMA_PCI_WIP is not set
  11.305 -CONFIG_BLK_DEV_ADMA100=y
  11.306 -CONFIG_BLK_DEV_AEC62XX=y
  11.307 -CONFIG_BLK_DEV_ALI15X3=y
  11.308 -CONFIG_WDC_ALI15X3=y
  11.309 -CONFIG_BLK_DEV_AMD74XX=y
  11.310 -CONFIG_AMD74XX_OVERRIDE=y
  11.311 -# CONFIG_BLK_DEV_ATIIXP is not set
  11.312 -CONFIG_BLK_DEV_CMD64X=y
  11.313 -CONFIG_BLK_DEV_TRIFLEX=y
  11.314 -CONFIG_BLK_DEV_CY82C693=y
  11.315 -CONFIG_BLK_DEV_CS5530=y
  11.316 -CONFIG_BLK_DEV_HPT34X=y
  11.317 -# CONFIG_HPT34X_AUTODMA is not set
  11.318 -CONFIG_BLK_DEV_HPT366=y
  11.319 -CONFIG_BLK_DEV_PIIX=y
  11.320 -CONFIG_BLK_DEV_NS87415=y
  11.321 -# CONFIG_BLK_DEV_OPTI621 is not set
  11.322 -CONFIG_BLK_DEV_PDC202XX_OLD=y
  11.323 -CONFIG_PDC202XX_BURST=y
  11.324 -CONFIG_BLK_DEV_PDC202XX_NEW=y
  11.325 -CONFIG_PDC202XX_FORCE=y
  11.326 -CONFIG_BLK_DEV_RZ1000=y
  11.327 -CONFIG_BLK_DEV_SC1200=y
  11.328 -CONFIG_BLK_DEV_SVWKS=y
  11.329 -CONFIG_BLK_DEV_SIIMAGE=y
  11.330 -CONFIG_BLK_DEV_SIS5513=y
  11.331 -CONFIG_BLK_DEV_SLC90E66=y
  11.332 -CONFIG_BLK_DEV_TRM290=y
  11.333 -CONFIG_BLK_DEV_VIA82CXXX=y
  11.334 -CONFIG_IDE_CHIPSETS=y
  11.335 -# CONFIG_BLK_DEV_4DRIVES is not set
  11.336 -# CONFIG_BLK_DEV_ALI14XX is not set
  11.337 -# CONFIG_BLK_DEV_DTC2278 is not set
  11.338 -# CONFIG_BLK_DEV_HT6560B is not set
  11.339 -# CONFIG_BLK_DEV_PDC4030 is not set
  11.340 -# CONFIG_BLK_DEV_QD65XX is not set
  11.341 -# CONFIG_BLK_DEV_UMC8672 is not set
  11.342 -CONFIG_IDEDMA_AUTO=y
  11.343 -# CONFIG_IDEDMA_IVB is not set
  11.344 -# CONFIG_DMA_NONPCI is not set
  11.345 -CONFIG_BLK_DEV_PDC202XX=y
  11.346 -# CONFIG_BLK_DEV_ATARAID is not set
  11.347 -# CONFIG_BLK_DEV_ATARAID_PDC is not set
  11.348 -# CONFIG_BLK_DEV_ATARAID_HPT is not set
  11.349 -# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
  11.350 -# CONFIG_BLK_DEV_ATARAID_SII is not set
  11.351 -
  11.352 -#
  11.353 -# SCSI support
  11.354 -#
  11.355 -CONFIG_SCSI=y
  11.356 -CONFIG_BLK_DEV_SD=y
  11.357 -CONFIG_SD_EXTRA_DEVS=40
  11.358 -# CONFIG_CHR_DEV_ST is not set
  11.359 -# CONFIG_CHR_DEV_OSST is not set
  11.360 -# CONFIG_BLK_DEV_SR is not set
  11.361 -CONFIG_CHR_DEV_SG=y
  11.362 -# CONFIG_SCSI_DEBUG_QUEUES is not set
  11.363 -# CONFIG_SCSI_MULTI_LUN is not set
  11.364 -# CONFIG_SCSI_CONSTANTS is not set
  11.365 -# CONFIG_SCSI_LOGGING is not set
  11.366 -
  11.367 -#
  11.368 -# SCSI low-level drivers
  11.369 -#
  11.370 -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
  11.371 -# CONFIG_SCSI_7000FASST is not set
  11.372 -# CONFIG_SCSI_ACARD is not set
  11.373 -# CONFIG_SCSI_AHA152X is not set
  11.374 -# CONFIG_SCSI_AHA1542 is not set
  11.375 -# CONFIG_SCSI_AHA1740 is not set
  11.376 -CONFIG_SCSI_AACRAID=y
  11.377 -CONFIG_SCSI_AIC7XXX=y
  11.378 -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
  11.379 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000
  11.380 -# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
  11.381 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
  11.382 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
  11.383 -CONFIG_AIC7XXX_DEBUG_MASK=0
  11.384 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
  11.385 -CONFIG_SCSI_AIC79XX=y
  11.386 -CONFIG_AIC79XX_CMDS_PER_DEVICE=32
  11.387 -CONFIG_AIC79XX_RESET_DELAY_MS=15000
  11.388 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
  11.389 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
  11.390 -# CONFIG_AIC79XX_DEBUG_ENABLE is not set
  11.391 -CONFIG_AIC79XX_DEBUG_MASK=0
  11.392 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
  11.393 -# CONFIG_SCSI_DPT_I2O is not set
  11.394 -# CONFIG_SCSI_ADVANSYS is not set
  11.395 -# CONFIG_SCSI_IN2000 is not set
  11.396 -# CONFIG_SCSI_AM53C974 is not set
  11.397 -CONFIG_SCSI_MEGARAID=y
  11.398 -# CONFIG_SCSI_MEGARAID2 is not set
  11.399 -CONFIG_SCSI_SATA=y
  11.400 -# CONFIG_SCSI_SATA_AHCI is not set
  11.401 -# CONFIG_SCSI_SATA_SVW is not set
  11.402 -CONFIG_SCSI_ATA_PIIX=y
  11.403 -# CONFIG_SCSI_SATA_NV is not set
  11.404 -# CONFIG_SCSI_SATA_QSTOR is not set
  11.405 -CONFIG_SCSI_SATA_PROMISE=y
  11.406 -CONFIG_SCSI_SATA_SX4=y
  11.407 -CONFIG_SCSI_SATA_SIL=y
  11.408 -CONFIG_SCSI_SATA_SIS=y
  11.409 -# CONFIG_SCSI_SATA_ULI is not set
  11.410 -CONFIG_SCSI_SATA_VIA=y
  11.411 -CONFIG_SCSI_SATA_VITESSE=y
  11.412 -CONFIG_SCSI_BUSLOGIC=y
  11.413 -# CONFIG_SCSI_OMIT_FLASHPOINT is not set
  11.414 -# CONFIG_SCSI_CPQFCTS is not set
  11.415 -# CONFIG_SCSI_DMX3191D is not set
  11.416 -# CONFIG_SCSI_DTC3280 is not set
  11.417 -# CONFIG_SCSI_EATA is not set
  11.418 -# CONFIG_SCSI_EATA_DMA is not set
  11.419 -# CONFIG_SCSI_EATA_PIO is not set
  11.420 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
  11.421 -# CONFIG_SCSI_GDTH is not set
  11.422 -# CONFIG_SCSI_GENERIC_NCR5380 is not set
  11.423 -# CONFIG_SCSI_IPS is not set
  11.424 -# CONFIG_SCSI_INITIO is not set
  11.425 -# CONFIG_SCSI_INIA100 is not set
  11.426 -# CONFIG_SCSI_NCR53C406A is not set
  11.427 -# CONFIG_SCSI_NCR53C7xx is not set
  11.428 -CONFIG_SCSI_SYM53C8XX_2=y
  11.429 -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
  11.430 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
  11.431 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
  11.432 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
  11.433 -# CONFIG_SCSI_PAS16 is not set
  11.434 -# CONFIG_SCSI_PCI2000 is not set
  11.435 -# CONFIG_SCSI_PCI2220I is not set
  11.436 -# CONFIG_SCSI_PSI240I is not set
  11.437 -# CONFIG_SCSI_QLOGIC_FAS is not set
  11.438 -# CONFIG_SCSI_QLOGIC_ISP is not set
  11.439 -# CONFIG_SCSI_QLOGIC_FC is not set
  11.440 -# CONFIG_SCSI_QLOGIC_1280 is not set
  11.441 -# CONFIG_SCSI_SEAGATE is not set
  11.442 -# CONFIG_SCSI_SIM710 is not set
  11.443 -# CONFIG_SCSI_SYM53C416 is not set
  11.444 -# CONFIG_SCSI_DC390T is not set
  11.445 -# CONFIG_SCSI_T128 is not set
  11.446 -# CONFIG_SCSI_U14_34F is not set
  11.447 -# CONFIG_SCSI_ULTRASTOR is not set
  11.448 -# CONFIG_SCSI_NSP32 is not set
  11.449 -# CONFIG_SCSI_DEBUG is not set
  11.450 -
  11.451 -#
  11.452 -# Fusion MPT device support
  11.453 -#
  11.454 -# CONFIG_FUSION is not set
  11.455 -# CONFIG_FUSION_BOOT is not set
  11.456 -# CONFIG_FUSION_ISENSE is not set
  11.457 -# CONFIG_FUSION_CTL is not set
  11.458 -# CONFIG_FUSION_LAN is not set
  11.459 -
  11.460 -#
  11.461 -# IEEE 1394 (FireWire) support (EXPERIMENTAL)
  11.462 -#
  11.463 -# CONFIG_IEEE1394 is not set
  11.464 -
  11.465 -#
  11.466 -# I2O device support
  11.467 -#
  11.468 -# CONFIG_I2O is not set
  11.469 -# CONFIG_I2O_PCI is not set
  11.470 -# CONFIG_I2O_BLOCK is not set
  11.471 -# CONFIG_I2O_LAN is not set
  11.472 -# CONFIG_I2O_SCSI is not set
  11.473 -# CONFIG_I2O_PROC is not set
  11.474 -
  11.475 -#
  11.476 -# Network device support
  11.477 -#
  11.478 -CONFIG_NETDEVICES=y
  11.479 -
  11.480 -#
  11.481 -# ARCnet devices
  11.482 -#
  11.483 -# CONFIG_ARCNET is not set
  11.484 -# CONFIG_DUMMY is not set
  11.485 -# CONFIG_BONDING is not set
  11.486 -# CONFIG_EQUALIZER is not set
  11.487 -# CONFIG_TUN is not set
  11.488 -# CONFIG_ETHERTAP is not set
  11.489 -
  11.490 -#
  11.491 -# Ethernet (10 or 100Mbit)
  11.492 -#
  11.493 -CONFIG_NET_ETHERNET=y
  11.494 -# CONFIG_SUNLANCE is not set
  11.495 -# CONFIG_HAPPYMEAL is not set
  11.496 -# CONFIG_SUNBMAC is not set
  11.497 -# CONFIG_SUNQE is not set
  11.498 -# CONFIG_SUNGEM is not set
  11.499 -CONFIG_NET_VENDOR_3COM=y
  11.500 -# CONFIG_EL1 is not set
  11.501 -# CONFIG_EL2 is not set
  11.502 -# CONFIG_ELPLUS is not set
  11.503 -# CONFIG_EL16 is not set
  11.504 -# CONFIG_EL3 is not set
  11.505 -# CONFIG_3C515 is not set
  11.506 -# CONFIG_ELMC is not set
  11.507 -# CONFIG_ELMC_II is not set
  11.508 -CONFIG_VORTEX=y
  11.509 -# CONFIG_TYPHOON is not set
  11.510 -# CONFIG_LANCE is not set
  11.511 -# CONFIG_NET_VENDOR_SMC is not set
  11.512 -# CONFIG_NET_VENDOR_RACAL is not set
  11.513 -# CONFIG_AT1700 is not set
  11.514 -# CONFIG_DEPCA is not set
  11.515 -# CONFIG_HP100 is not set
  11.516 -# CONFIG_NET_ISA is not set
  11.517 -CONFIG_NET_PCI=y
  11.518 -CONFIG_PCNET32=y
  11.519 -# CONFIG_AMD8111_ETH is not set
  11.520 -# CONFIG_ADAPTEC_STARFIRE is not set
  11.521 -# CONFIG_AC3200 is not set
  11.522 -# CONFIG_APRICOT is not set
  11.523 -# CONFIG_B44 is not set
  11.524 -# CONFIG_CS89x0 is not set
  11.525 -# CONFIG_TULIP is not set
  11.526 -# CONFIG_DE4X5 is not set
  11.527 -# CONFIG_DGRS is not set
  11.528 -# CONFIG_DM9102 is not set
  11.529 -# CONFIG_EEPRO100 is not set
  11.530 -# CONFIG_EEPRO100_PIO is not set
  11.531 -CONFIG_E100=y
  11.532 -# CONFIG_LNE390 is not set
  11.533 -# CONFIG_FEALNX is not set
  11.534 -# CONFIG_NATSEMI is not set
  11.535 -CONFIG_NE2K_PCI=y
  11.536 -# CONFIG_FORCEDETH is not set
  11.537 -# CONFIG_NE3210 is not set
  11.538 -# CONFIG_ES3210 is not set
  11.539 -# CONFIG_8139CP is not set
  11.540 -# CONFIG_8139TOO is not set
  11.541 -# CONFIG_8139TOO_PIO is not set
  11.542 -# CONFIG_8139TOO_TUNE_TWISTER is not set
  11.543 -# CONFIG_8139TOO_8129 is not set
  11.544 -# CONFIG_8139_OLD_RX_RESET is not set
  11.545 -# CONFIG_SIS900 is not set
  11.546 -# CONFIG_EPIC100 is not set
  11.547 -# CONFIG_SUNDANCE is not set
  11.548 -# CONFIG_SUNDANCE_MMIO is not set
  11.549 -# CONFIG_TLAN is not set
  11.550 -# CONFIG_VIA_RHINE is not set
  11.551 -# CONFIG_VIA_RHINE_MMIO is not set
  11.552 -# CONFIG_WINBOND_840 is not set
  11.553 -# CONFIG_NET_POCKET is not set
  11.554 -
  11.555 -#
  11.556 -# Ethernet (1000 Mbit)
  11.557 -#
  11.558 -# CONFIG_ACENIC is not set
  11.559 -# CONFIG_DL2K is not set
  11.560 -CONFIG_E1000=y
  11.561 -# CONFIG_E1000_NAPI is not set
  11.562 -# CONFIG_MYRI_SBUS is not set
  11.563 -# CONFIG_NS83820 is not set
  11.564 -# CONFIG_HAMACHI is not set
  11.565 -# CONFIG_YELLOWFIN is not set
  11.566 -# CONFIG_R8169 is not set
  11.567 -# CONFIG_SK98LIN is not set
  11.568 -CONFIG_TIGON3=y
  11.569 -# CONFIG_FDDI is not set
  11.570 -# CONFIG_HIPPI is not set
  11.571 -# CONFIG_PLIP is not set
  11.572 -# CONFIG_PPP is not set
  11.573 -# CONFIG_SLIP is not set
  11.574 -
  11.575 -#
  11.576 -# Wireless LAN (non-hamradio)
  11.577 -#
  11.578 -# CONFIG_NET_RADIO is not set
  11.579 -
  11.580 -#
  11.581 -# Token Ring devices
  11.582 -#
  11.583 -# CONFIG_TR is not set
  11.584 -# CONFIG_NET_FC is not set
  11.585 -# CONFIG_RCPCI is not set
  11.586 -# CONFIG_SHAPER is not set
  11.587 -
  11.588 -#
  11.589 -# Wan interfaces
  11.590 -#
  11.591 -# CONFIG_WAN is not set
  11.592 -
  11.593 -#
  11.594 -# Amateur Radio support
  11.595 -#
  11.596 -# CONFIG_HAMRADIO is not set
  11.597 -
  11.598 -#
  11.599 -# IrDA (infrared) support
  11.600 -#
  11.601 -# CONFIG_IRDA is not set
  11.602 -
  11.603 -#
  11.604 -# ISDN subsystem
  11.605 -#
  11.606 -# CONFIG_ISDN is not set
  11.607 -
  11.608 -#
  11.609 -# Old CD-ROM drivers (not SCSI, not IDE)
  11.610 -#
  11.611 -# CONFIG_CD_NO_IDESCSI is not set
  11.612 -
  11.613 -#
  11.614 -# Input core support
  11.615 -#
  11.616 -# CONFIG_INPUT is not set
  11.617 -# CONFIG_INPUT_KEYBDEV is not set
  11.618 -# CONFIG_INPUT_MOUSEDEV is not set
  11.619 -# CONFIG_INPUT_JOYDEV is not set
  11.620 -# CONFIG_INPUT_EVDEV is not set
  11.621 -# CONFIG_INPUT_UINPUT is not set
  11.622 -
  11.623 -#
  11.624 -# Character devices
  11.625 -#
  11.626 -CONFIG_VT=y
  11.627 -CONFIG_VT_CONSOLE=y
  11.628 -# CONFIG_SERIAL is not set
  11.629 -# CONFIG_SERIAL_EXTENDED is not set
  11.630 -# CONFIG_SERIAL_NONSTANDARD is not set
  11.631 -CONFIG_UNIX98_PTYS=y
  11.632 -CONFIG_UNIX98_PTY_COUNT=256
  11.633 -
  11.634 -#
  11.635 -# I2C support
  11.636 -#
  11.637 -# CONFIG_I2C is not set
  11.638 -
  11.639 -#
  11.640 -# Mice
  11.641 -#
  11.642 -# CONFIG_BUSMOUSE is not set
  11.643 -CONFIG_MOUSE=y
  11.644 -CONFIG_PSMOUSE=y
  11.645 -# CONFIG_82C710_MOUSE is not set
  11.646 -# CONFIG_PC110_PAD is not set
  11.647 -# CONFIG_MK712_MOUSE is not set
  11.648 -
  11.649 -#
  11.650 -# Joysticks
  11.651 -#
  11.652 -# CONFIG_INPUT_GAMEPORT is not set
  11.653 -# CONFIG_QIC02_TAPE is not set
  11.654 -# CONFIG_IPMI_HANDLER is not set
  11.655 -# CONFIG_IPMI_PANIC_EVENT is not set
  11.656 -# CONFIG_IPMI_DEVICE_INTERFACE is not set
  11.657 -# CONFIG_IPMI_KCS is not set
  11.658 -# CONFIG_IPMI_WATCHDOG is not set
  11.659 -
  11.660 -#
  11.661 -# Watchdog Cards
  11.662 -#
  11.663 -# CONFIG_WATCHDOG is not set
  11.664 -# CONFIG_SCx200 is not set
  11.665 -# CONFIG_SCx200_GPIO is not set
  11.666 -# CONFIG_AMD_RNG is not set
  11.667 -# CONFIG_INTEL_RNG is not set
  11.668 -# CONFIG_HW_RANDOM is not set
  11.669 -# CONFIG_AMD_PM768 is not set
  11.670 -# CONFIG_NVRAM is not set
  11.671 -# CONFIG_RTC is not set
  11.672 -# CONFIG_DTLK is not set
  11.673 -# CONFIG_R3964 is not set
  11.674 -# CONFIG_APPLICOM is not set
  11.675 -# CONFIG_SONYPI is not set
  11.676 -
  11.677 -#
  11.678 -# Ftape, the floppy tape device driver
  11.679 -#
  11.680 -# CONFIG_FTAPE is not set
  11.681 -# CONFIG_AGP is not set
  11.682 -
  11.683 -#
  11.684 -# Direct Rendering Manager (XFree86 DRI support)
  11.685 -#
  11.686 -# CONFIG_DRM is not set
  11.687 -# CONFIG_MWAVE is not set
  11.688 -# CONFIG_OBMOUSE is not set
  11.689 -
  11.690 -#
  11.691 -# Multimedia devices
  11.692 -#
  11.693 -# CONFIG_VIDEO_DEV is not set
  11.694 -
  11.695 -#
  11.696 -# File systems
  11.697 -#
  11.698 -# CONFIG_QUOTA is not set
  11.699 -# CONFIG_QFMT_V2 is not set
  11.700 -CONFIG_AUTOFS_FS=y
  11.701 -CONFIG_AUTOFS4_FS=y
  11.702 -# CONFIG_REISERFS_FS is not set
  11.703 -# CONFIG_REISERFS_CHECK is not set
  11.704 -# CONFIG_REISERFS_PROC_INFO is not set
  11.705 -# CONFIG_ADFS_FS is not set
  11.706 -# CONFIG_ADFS_FS_RW is not set
  11.707 -# CONFIG_AFFS_FS is not set
  11.708 -# CONFIG_HFS_FS is not set
  11.709 -# CONFIG_HFSPLUS_FS is not set
  11.710 -# CONFIG_BEFS_FS is not set
  11.711 -# CONFIG_BEFS_DEBUG is not set
  11.712 -# CONFIG_BFS_FS is not set
  11.713 -CONFIG_EXT3_FS=y
  11.714 -CONFIG_JBD=y
  11.715 -# CONFIG_JBD_DEBUG is not set
  11.716 -CONFIG_FAT_FS=y
  11.717 -CONFIG_MSDOS_FS=y
  11.718 -CONFIG_UMSDOS_FS=y
  11.719 -CONFIG_VFAT_FS=y
  11.720 -# CONFIG_EFS_FS is not set
  11.721 -# CONFIG_JFFS_FS is not set
  11.722 -# CONFIG_JFFS2_FS is not set
  11.723 -# CONFIG_CRAMFS is not set
  11.724 -CONFIG_TMPFS=y
  11.725 -CONFIG_RAMFS=y
  11.726 -CONFIG_ISO9660_FS=y
  11.727 -CONFIG_JOLIET=y
  11.728 -CONFIG_ZISOFS=y
  11.729 -# CONFIG_JFS_FS is not set
  11.730 -# CONFIG_JFS_DEBUG is not set
  11.731 -# CONFIG_JFS_STATISTICS is not set
  11.732 -# CONFIG_MINIX_FS is not set
  11.733 -# CONFIG_VXFS_FS is not set
  11.734 -# CONFIG_NTFS_FS is not set
  11.735 -# CONFIG_NTFS_RW is not set
  11.736 -# CONFIG_HPFS_FS is not set
  11.737 -CONFIG_PROC_FS=y
  11.738 -# CONFIG_DEVFS_FS is not set
  11.739 -# CONFIG_DEVFS_MOUNT is not set
  11.740 -# CONFIG_DEVFS_DEBUG is not set
  11.741 -CONFIG_DEVPTS_FS=y
  11.742 -# CONFIG_QNX4FS_FS is not set
  11.743 -# CONFIG_QNX4FS_RW is not set
  11.744 -# CONFIG_ROMFS_FS is not set
  11.745 -CONFIG_EXT2_FS=y
  11.746 -# CONFIG_SYSV_FS is not set
  11.747 -# CONFIG_UDF_FS is not set
  11.748 -# CONFIG_UDF_RW is not set
  11.749 -# CONFIG_UFS_FS is not set
  11.750 -# CONFIG_UFS_FS_WRITE is not set
  11.751 -# CONFIG_XFS_FS is not set
  11.752 -# CONFIG_XFS_QUOTA is not set
  11.753 -# CONFIG_XFS_RT is not set
  11.754 -# CONFIG_XFS_TRACE is not set
  11.755 -# CONFIG_XFS_DEBUG is not set
  11.756 -
  11.757 -#
  11.758 -# Network File Systems
  11.759 -#
  11.760 -# CONFIG_CODA_FS is not set
  11.761 -# CONFIG_INTERMEZZO_FS is not set
  11.762 -CONFIG_NFS_FS=y
  11.763 -CONFIG_NFS_V3=y
  11.764 -# CONFIG_NFS_DIRECTIO is not set
  11.765 -CONFIG_ROOT_NFS=y
  11.766 -CONFIG_NFSD=y
  11.767 -CONFIG_NFSD_V3=y
  11.768 -# CONFIG_NFSD_TCP is not set
  11.769 -CONFIG_SUNRPC=y
  11.770 -CONFIG_LOCKD=y
  11.771 -CONFIG_LOCKD_V4=y
  11.772 -# CONFIG_SMB_FS is not set
  11.773 -# CONFIG_NCP_FS is not set
  11.774 -# CONFIG_NCPFS_PACKET_SIGNING is not set
  11.775 -# CONFIG_NCPFS_IOCTL_LOCKING is not set
  11.776 -# CONFIG_NCPFS_STRONG is not set
  11.777 -# CONFIG_NCPFS_NFS_NS is not set
  11.778 -# CONFIG_NCPFS_OS2_NS is not set
  11.779 -# CONFIG_NCPFS_SMALLDOS is not set
  11.780 -# CONFIG_NCPFS_NLS is not set
  11.781 -# CONFIG_NCPFS_EXTRAS is not set
  11.782 -CONFIG_ZISOFS_FS=y
  11.783 -
  11.784 -#
  11.785 -# Partition Types
  11.786 -#
  11.787 -CONFIG_PARTITION_ADVANCED=y
  11.788 -# CONFIG_ACORN_PARTITION is not set
  11.789 -# CONFIG_OSF_PARTITION is not set
  11.790 -# CONFIG_AMIGA_PARTITION is not set
  11.791 -# CONFIG_ATARI_PARTITION is not set
  11.792 -# CONFIG_MAC_PARTITION is not set
  11.793 -CONFIG_MSDOS_PARTITION=y
  11.794 -# CONFIG_BSD_DISKLABEL is not set
  11.795 -# CONFIG_MINIX_SUBPARTITION is not set
  11.796 -# CONFIG_SOLARIS_X86_PARTITION is not set
  11.797 -# CONFIG_UNIXWARE_DISKLABEL is not set
  11.798 -# CONFIG_LDM_PARTITION is not set
  11.799 -# CONFIG_SGI_PARTITION is not set
  11.800 -# CONFIG_ULTRIX_PARTITION is not set
  11.801 -# CONFIG_SUN_PARTITION is not set
  11.802 -# CONFIG_EFI_PARTITION is not set
  11.803 -# CONFIG_SMB_NLS is not set
  11.804 -CONFIG_NLS=y
  11.805 -
  11.806 -#
  11.807 -# Native Language Support
  11.808 -#
  11.809 -CONFIG_NLS_DEFAULT="iso8559-1"
  11.810 -# CONFIG_NLS_CODEPAGE_437 is not set
  11.811 -# CONFIG_NLS_CODEPAGE_737 is not set
  11.812 -# CONFIG_NLS_CODEPAGE_775 is not set
  11.813 -# CONFIG_NLS_CODEPAGE_850 is not set
  11.814 -# CONFIG_NLS_CODEPAGE_852 is not set
  11.815 -# CONFIG_NLS_CODEPAGE_855 is not set
  11.816 -# CONFIG_NLS_CODEPAGE_857 is not set
  11.817 -# CONFIG_NLS_CODEPAGE_860 is not set
  11.818 -# CONFIG_NLS_CODEPAGE_861 is not set
  11.819 -# CONFIG_NLS_CODEPAGE_862 is not set
  11.820 -# CONFIG_NLS_CODEPAGE_863 is not set
  11.821 -# CONFIG_NLS_CODEPAGE_864 is not set
  11.822 -# CONFIG_NLS_CODEPAGE_865 is not set
  11.823 -# CONFIG_NLS_CODEPAGE_866 is not set
  11.824 -# CONFIG_NLS_CODEPAGE_869 is not set
  11.825 -# CONFIG_NLS_CODEPAGE_936 is not set
  11.826 -# CONFIG_NLS_CODEPAGE_950 is not set
  11.827 -# CONFIG_NLS_CODEPAGE_932 is not set
  11.828 -# CONFIG_NLS_CODEPAGE_949 is not set
  11.829 -# CONFIG_NLS_CODEPAGE_874 is not set
  11.830 -# CONFIG_NLS_ISO8859_8 is not set
  11.831 -# CONFIG_NLS_CODEPAGE_1250 is not set
  11.832 -# CONFIG_NLS_CODEPAGE_1251 is not set
  11.833 -CONFIG_NLS_ISO8859_1=y
  11.834 -# CONFIG_NLS_ISO8859_2 is not set
  11.835 -# CONFIG_NLS_ISO8859_3 is not set
  11.836 -# CONFIG_NLS_ISO8859_4 is not set
  11.837 -# CONFIG_NLS_ISO8859_5 is not set
  11.838 -# CONFIG_NLS_ISO8859_6 is not set
  11.839 -# CONFIG_NLS_ISO8859_7 is not set
  11.840 -# CONFIG_NLS_ISO8859_9 is not set
  11.841 -# CONFIG_NLS_ISO8859_13 is not set
  11.842 -# CONFIG_NLS_ISO8859_14 is not set
  11.843 -# CONFIG_NLS_ISO8859_15 is not set
  11.844 -# CONFIG_NLS_KOI8_R is not set
  11.845 -# CONFIG_NLS_KOI8_U is not set
  11.846 -# CONFIG_NLS_UTF8 is not set
  11.847 -
  11.848 -#
  11.849 -# Console drivers
  11.850 -#
  11.851 -CONFIG_XEN_CONSOLE=y
  11.852 -CONFIG_VGA_CONSOLE=y
  11.853 -CONFIG_DUMMY_CONSOLE=y
  11.854 -# CONFIG_VIDEO_SELECT is not set
  11.855 -# CONFIG_MDA_CONSOLE is not set
  11.856 -
  11.857 -#
  11.858 -# Frame-buffer support
  11.859 -#
  11.860 -# CONFIG_FB is not set
  11.861 -
  11.862 -#
  11.863 -# Sound
  11.864 -#
  11.865 -# CONFIG_SOUND is not set
  11.866 -
  11.867 -#
  11.868 -# USB support
  11.869 -#
  11.870 -# CONFIG_USB is not set
  11.871 -
  11.872 -#
  11.873 -# Support for USB gadgets
  11.874 -#
  11.875 -# CONFIG_USB_GADGET is not set
  11.876 -
  11.877 -#
  11.878 -# Bluetooth support
  11.879 -#
  11.880 -# CONFIG_BLUEZ is not set
  11.881 -
  11.882 -#
  11.883 -# Kernel hacking
  11.884 -#
  11.885 -CONFIG_DEBUG_KERNEL=y
  11.886 -# CONFIG_DEBUG_STACKOVERFLOW is not set
  11.887 -# CONFIG_DEBUG_HIGHMEM is not set
  11.888 -# CONFIG_DEBUG_SLAB is not set
  11.889 -# CONFIG_DEBUG_IOVIRT is not set
  11.890 -# CONFIG_MAGIC_SYSRQ is not set
  11.891 -# CONFIG_DEBUG_SPINLOCK is not set
  11.892 -# CONFIG_DEBUG_BUGVERBOSE is not set
  11.893 -CONFIG_KALLSYMS=y
  11.894 -# CONFIG_FRAME_POINTER is not set
  11.895 -CONFIG_LOG_BUF_SHIFT=0
  11.896 -
  11.897 -#
  11.898 -# Cryptographic options
  11.899 -#
  11.900 -CONFIG_CRYPTO=y
  11.901 -CONFIG_CRYPTO_HMAC=y
  11.902 -CONFIG_CRYPTO_NULL=m
  11.903 -CONFIG_CRYPTO_MD4=m
  11.904 -CONFIG_CRYPTO_MD5=m
  11.905 -CONFIG_CRYPTO_SHA1=m
  11.906 -CONFIG_CRYPTO_SHA256=m
  11.907 -CONFIG_CRYPTO_SHA512=m
  11.908 -# CONFIG_CRYPTO_WP512 is not set
  11.909 -CONFIG_CRYPTO_DES=m
  11.910 -CONFIG_CRYPTO_BLOWFISH=m
  11.911 -CONFIG_CRYPTO_TWOFISH=m
  11.912 -CONFIG_CRYPTO_SERPENT=m
  11.913 -CONFIG_CRYPTO_AES=m
  11.914 -CONFIG_CRYPTO_CAST5=m
  11.915 -CONFIG_CRYPTO_CAST6=m
  11.916 -# CONFIG_CRYPTO_TEA is not set
  11.917 -# CONFIG_CRYPTO_KHAZAD is not set
  11.918 -# CONFIG_CRYPTO_ANUBIS is not set
  11.919 -CONFIG_CRYPTO_ARC4=m
  11.920 -CONFIG_CRYPTO_DEFLATE=m
  11.921 -# CONFIG_CRYPTO_MICHAEL_MIC is not set
  11.922 -# CONFIG_CRYPTO_TEST is not set
  11.923 -
  11.924 -#
  11.925 -# Library routines
  11.926 -#
  11.927 -# CONFIG_CRC32 is not set
  11.928 -CONFIG_ZLIB_INFLATE=y
  11.929 -CONFIG_ZLIB_DEFLATE=m
  11.930 -# CONFIG_FW_LOADER is not set
    12.1 --- a/linux-2.4-xen-sparse/arch/xen/defconfig-xenU	Fri Oct 07 23:22:35 2005 +0100
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,562 +0,0 @@
    12.4 -#
    12.5 -# Automatically generated make config: don't edit
    12.6 -#
    12.7 -CONFIG_XEN=y
    12.8 -CONFIG_X86=y
    12.9 -CONFIG_ISA=y
   12.10 -# CONFIG_SBUS is not set
   12.11 -CONFIG_UID16=y
   12.12 -
   12.13 -#
   12.14 -# Xen
   12.15 -#
   12.16 -# CONFIG_XEN_PRIVILEGED_GUEST is not set
   12.17 -# CONFIG_XEN_PHYSDEV_ACCESS is not set
   12.18 -CONFIG_XEN_SCRUB_PAGES=y
   12.19 -CONFIG_XEN_NETDEV_FRONTEND=y
   12.20 -CONFIG_XEN_BLKDEV_FRONTEND=y
   12.21 -CONFIG_XEN_BLKDEV_GRANT=y
   12.22 -# CONFIG_XEN_USB_FRONTEND is not set
   12.23 -CONFIG_NO_IDLE_HZ=y
   12.24 -# CONFIG_FOREIGN_PAGES is not set
   12.25 -CONFIG_NETDEVICES=y
   12.26 -# CONFIG_VT is not set
   12.27 -
   12.28 -#
   12.29 -# Code maturity level options
   12.30 -#
   12.31 -CONFIG_EXPERIMENTAL=y
   12.32 -
   12.33 -#
   12.34 -# Loadable module support
   12.35 -#
   12.36 -CONFIG_MODULES=y
   12.37 -CONFIG_MODVERSIONS=y
   12.38 -CONFIG_KMOD=y
   12.39 -
   12.40 -#
   12.41 -# Processor type and features
   12.42 -#
   12.43 -CONFIG_M686=y
   12.44 -# CONFIG_MPENTIUMIII is not set
   12.45 -# CONFIG_MPENTIUM4 is not set
   12.46 -# CONFIG_MK7 is not set
   12.47 -# CONFIG_MK8 is not set
   12.48 -# CONFIG_MVIAC3_2 is not set
   12.49 -CONFIG_X86_WP_WORKS_OK=y
   12.50 -CONFIG_X86_INVLPG=y
   12.51 -CONFIG_X86_CMPXCHG=y
   12.52 -CONFIG_X86_XADD=y
   12.53 -CONFIG_X86_BSWAP=y
   12.54 -CONFIG_X86_POPAD_OK=y
   12.55 -# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
   12.56 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   12.57 -CONFIG_X86_GOOD_APIC=y
   12.58 -CONFIG_X86_PGE=y
   12.59 -CONFIG_X86_USE_PPRO_CHECKSUM=y
   12.60 -CONFIG_X86_TSC=y
   12.61 -CONFIG_X86_L1_CACHE_SHIFT=5
   12.62 -CONFIG_NOHIGHMEM=y
   12.63 -# CONFIG_HIGHMEM4G is not set
   12.64 -CONFIG_FORCE_MAX_ZONEORDER=11
   12.65 -
   12.66 -#
   12.67 -# General setup
   12.68 -#
   12.69 -CONFIG_NET=y
   12.70 -CONFIG_SYSVIPC=y
   12.71 -# CONFIG_BSD_PROCESS_ACCT is not set
   12.72 -CONFIG_SYSCTL=y
   12.73 -CONFIG_KCORE_ELF=y
   12.74 -# CONFIG_KCORE_AOUT is not set
   12.75 -CONFIG_BINFMT_AOUT=y
   12.76 -CONFIG_BINFMT_ELF=y
   12.77 -# CONFIG_BINFMT_MISC is not set
   12.78 -# CONFIG_OOM_KILLER is not set
   12.79 -
   12.80 -#
   12.81 -# Networking options
   12.82 -#
   12.83 -CONFIG_PACKET=y
   12.84 -CONFIG_PACKET_MMAP=y
   12.85 -# CONFIG_NETLINK_DEV is not set
   12.86 -CONFIG_NETFILTER=y
   12.87 -# CONFIG_NETFILTER_DEBUG is not set
   12.88 -CONFIG_FILTER=y
   12.89 -CONFIG_UNIX=y
   12.90 -CONFIG_INET=y
   12.91 -# CONFIG_IP_MULTICAST is not set
   12.92 -# CONFIG_IP_ADVANCED_ROUTER is not set
   12.93 -CONFIG_IP_PNP=y
   12.94 -CONFIG_IP_PNP_DHCP=y
   12.95 -# CONFIG_IP_PNP_BOOTP is not set
   12.96 -# CONFIG_IP_PNP_RARP is not set
   12.97 -# CONFIG_NET_IPIP is not set
   12.98 -# CONFIG_NET_IPGRE is not set
   12.99 -# CONFIG_ARPD is not set
  12.100 -# CONFIG_INET_ECN is not set
  12.101 -# CONFIG_SYN_COOKIES is not set
  12.102 -
  12.103 -#
  12.104 -#   IP: Netfilter Configuration
  12.105 -#
  12.106 -CONFIG_IP_NF_CONNTRACK=y
  12.107 -CONFIG_IP_NF_FTP=y
  12.108 -# CONFIG_IP_NF_AMANDA is not set
  12.109 -CONFIG_IP_NF_TFTP=y
  12.110 -CONFIG_IP_NF_IRC=y
  12.111 -# CONFIG_IP_NF_QUEUE is not set
  12.112 -CONFIG_IP_NF_IPTABLES=y
  12.113 -# CONFIG_IP_NF_MATCH_LIMIT is not set
  12.114 -# CONFIG_IP_NF_MATCH_MAC is not set
  12.115 -# CONFIG_IP_NF_MATCH_PKTTYPE is not set
  12.116 -# CONFIG_IP_NF_MATCH_MARK is not set
  12.117 -# CONFIG_IP_NF_MATCH_MULTIPORT is not set
  12.118 -# CONFIG_IP_NF_MATCH_TOS is not set
  12.119 -# CONFIG_IP_NF_MATCH_RECENT is not set
  12.120 -# CONFIG_IP_NF_MATCH_ECN is not set
  12.121 -# CONFIG_IP_NF_MATCH_DSCP is not set
  12.122 -# CONFIG_IP_NF_MATCH_AH_ESP is not set
  12.123 -# CONFIG_IP_NF_MATCH_LENGTH is not set
  12.124 -# CONFIG_IP_NF_MATCH_TTL is not set
  12.125 -# CONFIG_IP_NF_MATCH_TCPMSS is not set
  12.126 -# CONFIG_IP_NF_MATCH_HELPER is not set
  12.127 -CONFIG_IP_NF_MATCH_STATE=y
  12.128 -CONFIG_IP_NF_MATCH_CONNTRACK=y
  12.129 -# CONFIG_IP_NF_MATCH_UNCLEAN is not set
  12.130 -# CONFIG_IP_NF_MATCH_OWNER is not set
  12.131 -CONFIG_IP_NF_FILTER=y
  12.132 -CONFIG_IP_NF_TARGET_REJECT=y
  12.133 -# CONFIG_IP_NF_TARGET_MIRROR is not set
  12.134 -CONFIG_IP_NF_NAT=y
  12.135 -CONFIG_IP_NF_NAT_NEEDED=y
  12.136 -CONFIG_IP_NF_TARGET_MASQUERADE=y
  12.137 -CONFIG_IP_NF_TARGET_REDIRECT=y
  12.138 -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
  12.139 -CONFIG_IP_NF_NAT_IRC=y
  12.140 -CONFIG_IP_NF_NAT_FTP=y
  12.141 -CONFIG_IP_NF_NAT_TFTP=y
  12.142 -# CONFIG_IP_NF_MANGLE is not set
  12.143 -CONFIG_IP_NF_TARGET_LOG=y
  12.144 -CONFIG_IP_NF_TARGET_ULOG=y
  12.145 -# CONFIG_IP_NF_TARGET_TCPMSS is not set
  12.146 -# CONFIG_IP_NF_ARPTABLES is not set
  12.147 -
  12.148 -#
  12.149 -#   IP: Virtual Server Configuration
  12.150 -#
  12.151 -# CONFIG_IP_VS is not set
  12.152 -# CONFIG_IPV6 is not set
  12.153 -# CONFIG_KHTTPD is not set
  12.154 -
  12.155 -#
  12.156 -#    SCTP Configuration (EXPERIMENTAL)
  12.157 -#
  12.158 -# CONFIG_IP_SCTP is not set
  12.159 -# CONFIG_ATM is not set
  12.160 -CONFIG_VLAN_8021Q=y
  12.161 -
  12.162 -#
  12.163 -#  
  12.164 -#
  12.165 -# CONFIG_IPX is not set
  12.166 -# CONFIG_ATALK is not set
  12.167 -# CONFIG_DECNET is not set
  12.168 -# CONFIG_BRIDGE is not set
  12.169 -# CONFIG_X25 is not set
  12.170 -# CONFIG_LAPB is not set
  12.171 -# CONFIG_LLC is not set
  12.172 -# CONFIG_NET_DIVERT is not set
  12.173 -# CONFIG_ECONET is not set
  12.174 -# CONFIG_WAN_ROUTER is not set
  12.175 -# CONFIG_NET_FASTROUTE is not set
  12.176 -# CONFIG_NET_HW_FLOWCONTROL is not set
  12.177 -
  12.178 -#
  12.179 -# QoS and/or fair queueing
  12.180 -#
  12.181 -# CONFIG_NET_SCHED is not set
  12.182 -
  12.183 -#
  12.184 -# Network testing
  12.185 -#
  12.186 -# CONFIG_NET_PKTGEN is not set
  12.187 -
  12.188 -#
  12.189 -# SCSI support
  12.190 -#
  12.191 -CONFIG_SCSI=y
  12.192 -
  12.193 -#
  12.194 -# SCSI support type (disk, tape, CD-ROM)
  12.195 -#
  12.196 -CONFIG_BLK_DEV_SD=y
  12.197 -CONFIG_SD_EXTRA_DEVS=40
  12.198 -# CONFIG_CHR_DEV_ST is not set
  12.199 -# CONFIG_CHR_DEV_OSST is not set
  12.200 -# CONFIG_BLK_DEV_SR is not set
  12.201 -CONFIG_CHR_DEV_SG=y
  12.202 -
  12.203 -#
  12.204 -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  12.205 -#
  12.206 -# CONFIG_SCSI_DEBUG_QUEUES is not set
  12.207 -# CONFIG_SCSI_MULTI_LUN is not set
  12.208 -# CONFIG_SCSI_CONSTANTS is not set
  12.209 -# CONFIG_SCSI_LOGGING is not set
  12.210 -
  12.211 -#
  12.212 -# SCSI low-level drivers
  12.213 -#
  12.214 -# CONFIG_SCSI_7000FASST is not set
  12.215 -# CONFIG_SCSI_ACARD is not set
  12.216 -# CONFIG_SCSI_AHA152X is not set
  12.217 -# CONFIG_SCSI_AHA1542 is not set
  12.218 -# CONFIG_SCSI_AHA1740 is not set
  12.219 -# CONFIG_SCSI_AACRAID is not set
  12.220 -# CONFIG_SCSI_AIC7XXX is not set
  12.221 -# CONFIG_SCSI_AIC79XX is not set
  12.222 -# CONFIG_SCSI_AIC7XXX_OLD is not set
  12.223 -# CONFIG_SCSI_DPT_I2O is not set
  12.224 -# CONFIG_SCSI_ADVANSYS is not set
  12.225 -# CONFIG_SCSI_IN2000 is not set
  12.226 -# CONFIG_SCSI_AM53C974 is not set
  12.227 -# CONFIG_SCSI_MEGARAID is not set
  12.228 -# CONFIG_SCSI_MEGARAID2 is not set
  12.229 -# CONFIG_SCSI_SATA is not set
  12.230 -# CONFIG_SCSI_SATA_AHCI is not set
  12.231 -# CONFIG_SCSI_SATA_SVW is not set
  12.232 -# CONFIG_SCSI_ATA_PIIX is not set
  12.233 -# CONFIG_SCSI_SATA_NV is not set
  12.234 -# CONFIG_SCSI_SATA_QSTOR is not set
  12.235 -# CONFIG_SCSI_SATA_PROMISE is not set
  12.236 -# CONFIG_SCSI_SATA_SX4 is not set
  12.237 -# CONFIG_SCSI_SATA_SIL is not set
  12.238 -# CONFIG_SCSI_SATA_SIS is not set
  12.239 -# CONFIG_SCSI_SATA_ULI is not set
  12.240 -# CONFIG_SCSI_SATA_VIA is not set
  12.241 -# CONFIG_SCSI_SATA_VITESSE is not set
  12.242 -# CONFIG_SCSI_BUSLOGIC is not set
  12.243 -# CONFIG_SCSI_DMX3191D is not set
  12.244 -# CONFIG_SCSI_DTC3280 is not set
  12.245 -# CONFIG_SCSI_EATA is not set
  12.246 -# CONFIG_SCSI_EATA_DMA is not set
  12.247 -# CONFIG_SCSI_EATA_PIO is not set
  12.248 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
  12.249 -# CONFIG_SCSI_GDTH is not set
  12.250 -# CONFIG_SCSI_GENERIC_NCR5380 is not set
  12.251 -# CONFIG_SCSI_IPS is not set
  12.252 -# CONFIG_SCSI_INITIO is not set
  12.253 -# CONFIG_SCSI_INIA100 is not set
  12.254 -# CONFIG_SCSI_PPA is not set
  12.255 -# CONFIG_SCSI_IMM is not set
  12.256 -# CONFIG_SCSI_NCR53C406A is not set
  12.257 -# CONFIG_SCSI_NCR53C7xx is not set
  12.258 -# CONFIG_SCSI_PAS16 is not set
  12.259 -# CONFIG_SCSI_PCI2000 is not set
  12.260 -# CONFIG_SCSI_PCI2220I is not set
  12.261 -# CONFIG_SCSI_PSI240I is not set
  12.262 -# CONFIG_SCSI_QLOGIC_FAS is not set
  12.263 -# CONFIG_SCSI_SEAGATE is not set
  12.264 -# CONFIG_SCSI_SIM710 is not set
  12.265 -# CONFIG_SCSI_SYM53C416 is not set
  12.266 -# CONFIG_SCSI_T128 is not set
  12.267 -# CONFIG_SCSI_U14_34F is not set
  12.268 -# CONFIG_SCSI_ULTRASTOR is not set
  12.269 -# CONFIG_SCSI_NSP32 is not set
  12.270 -# CONFIG_SCSI_DEBUG is not set
  12.271 -
  12.272 -#
  12.273 -# Block devices
  12.274 -#
  12.275 -CONFIG_BLK_DEV_LOOP=y
  12.276 -CONFIG_BLK_DEV_NBD=y
  12.277 -CONFIG_BLK_DEV_RAM=y
  12.278 -CONFIG_BLK_DEV_RAM_SIZE=4096
  12.279 -CONFIG_BLK_DEV_INITRD=y
  12.280 -# CONFIG_BLK_STATS is not set
  12.281 -# CONFIG_BLK_DEV_HD is not set
  12.282 -
  12.283 -#
  12.284 -# Character devices
  12.285 -#
  12.286 -# CONFIG_VT is not set
  12.287 -# CONFIG_SERIAL is not set
  12.288 -# CONFIG_SERIAL_EXTENDED is not set
  12.289 -# CONFIG_SERIAL_NONSTANDARD is not set
  12.290 -CONFIG_UNIX98_PTYS=y
  12.291 -CONFIG_UNIX98_PTY_COUNT=256
  12.292 -# CONFIG_PRINTER is not set
  12.293 -# CONFIG_PPDEV is not set
  12.294 -# CONFIG_TIPAR is not set
  12.295 -
  12.296 -#
  12.297 -# I2C support
  12.298 -#
  12.299 -# CONFIG_I2C is not set
  12.300 -
  12.301 -#
  12.302 -# Mice
  12.303 -#
  12.304 -# CONFIG_BUSMOUSE is not set
  12.305 -CONFIG_MOUSE=y
  12.306 -CONFIG_PSMOUSE=y
  12.307 -# CONFIG_82C710_MOUSE is not set
  12.308 -# CONFIG_PC110_PAD is not set
  12.309 -# CONFIG_MK712_MOUSE is not set
  12.310 -
  12.311 -#
  12.312 -# Joysticks
  12.313 -#
  12.314 -# CONFIG_INPUT_GAMEPORT is not set
  12.315 -# CONFIG_INPUT_NS558 is not set
  12.316 -# CONFIG_INPUT_LIGHTNING is not set
  12.317 -# CONFIG_INPUT_PCIGAME is not set
  12.318 -# CONFIG_INPUT_CS461X is not set
  12.319 -# CONFIG_INPUT_EMU10K1 is not set
  12.320 -# CONFIG_INPUT_SERIO is not set
  12.321 -# CONFIG_INPUT_SERPORT is not set
  12.322 -
  12.323 -#
  12.324 -# Joysticks
  12.325 -#
  12.326 -# CONFIG_INPUT_ANALOG is not set
  12.327 -# CONFIG_INPUT_A3D is not set
  12.328 -# CONFIG_INPUT_ADI is not set
  12.329 -# CONFIG_INPUT_COBRA is not set
  12.330 -# CONFIG_INPUT_GF2K is not set
  12.331 -# CONFIG_INPUT_GRIP is not set
  12.332 -# CONFIG_INPUT_INTERACT is not set
  12.333 -# CONFIG_INPUT_TMDC is not set
  12.334 -# CONFIG_INPUT_SIDEWINDER is not set
  12.335 -# CONFIG_INPUT_IFORCE_USB is not set
  12.336 -# CONFIG_INPUT_IFORCE_232 is not set
  12.337 -# CONFIG_INPUT_WARRIOR is not set
  12.338 -# CONFIG_INPUT_MAGELLAN is not set
  12.339 -# CONFIG_INPUT_SPACEORB is not set
  12.340 -# CONFIG_INPUT_SPACEBALL is not set
  12.341 -# CONFIG_INPUT_STINGER is not set
  12.342 -# CONFIG_INPUT_DB9 is not set
  12.343 -# CONFIG_INPUT_GAMECON is not set
  12.344 -# CONFIG_INPUT_TURBOGRAFX is not set
  12.345 -# CONFIG_QIC02_TAPE is not set
  12.346 -# CONFIG_IPMI_HANDLER is not set
  12.347 -# CONFIG_IPMI_PANIC_EVENT is not set
  12.348 -# CONFIG_IPMI_DEVICE_INTERFACE is not set
  12.349 -# CONFIG_IPMI_KCS is not set
  12.350 -# CONFIG_IPMI_WATCHDOG is not set
  12.351 -
  12.352 -#
  12.353 -# Watchdog Cards
  12.354 -#
  12.355 -# CONFIG_WATCHDOG is not set
  12.356 -# CONFIG_SCx200 is not set
  12.357 -# CONFIG_SCx200_GPIO is not set
  12.358 -# CONFIG_AMD_RNG is not set
  12.359 -# CONFIG_INTEL_RNG is not set
  12.360 -# CONFIG_HW_RANDOM is not set
  12.361 -# CONFIG_AMD_PM768 is not set
  12.362 -# CONFIG_NVRAM is not set
  12.363 -# CONFIG_RTC is not set
  12.364 -# CONFIG_DTLK is not set
  12.365 -# CONFIG_R3964 is not set
  12.366 -# CONFIG_APPLICOM is not set
  12.367 -# CONFIG_SONYPI is not set
  12.368 -
  12.369 -#
  12.370 -# Ftape, the floppy tape device driver
  12.371 -#
  12.372 -# CONFIG_FTAPE is not set
  12.373 -# CONFIG_AGP is not set
  12.374 -
  12.375 -#
  12.376 -# Direct Rendering Manager (XFree86 DRI support)
  12.377 -#
  12.378 -# CONFIG_DRM is not set
  12.379 -# CONFIG_MWAVE is not set
  12.380 -# CONFIG_OBMOUSE is not set
  12.381 -
  12.382 -#
  12.383 -# File systems
  12.384 -#
  12.385 -# CONFIG_QUOTA is not set
  12.386 -# CONFIG_QFMT_V2 is not set
  12.387 -CONFIG_AUTOFS_FS=y
  12.388 -CONFIG_AUTOFS4_FS=y
  12.389 -# CONFIG_REISERFS_FS is not set
  12.390 -# CONFIG_REISERFS_CHECK is not set
  12.391 -# CONFIG_REISERFS_PROC_INFO is not set
  12.392 -# CONFIG_ADFS_FS is not set
  12.393 -# CONFIG_ADFS_FS_RW is not set
  12.394 -# CONFIG_AFFS_FS is not set
  12.395 -# CONFIG_HFS_FS is not set
  12.396 -# CONFIG_HFSPLUS_FS is not set
  12.397 -# CONFIG_BEFS_FS is not set
  12.398 -# CONFIG_BEFS_DEBUG is not set
  12.399 -# CONFIG_BFS_FS is not set
  12.400 -CONFIG_EXT3_FS=y
  12.401 -CONFIG_JBD=y
  12.402 -# CONFIG_JBD_DEBUG is not set
  12.403 -CONFIG_FAT_FS=y
  12.404 -CONFIG_MSDOS_FS=y
  12.405 -CONFIG_UMSDOS_FS=y
  12.406 -CONFIG_VFAT_FS=y
  12.407 -# CONFIG_EFS_FS is not set
  12.408 -# CONFIG_JFFS_FS is not set
  12.409 -# CONFIG_JFFS2_FS is not set
  12.410 -# CONFIG_CRAMFS is not set
  12.411 -CONFIG_TMPFS=y
  12.412 -CONFIG_RAMFS=y
  12.413 -CONFIG_ISO9660_FS=y
  12.414 -CONFIG_JOLIET=y
  12.415 -CONFIG_ZISOFS=y
  12.416 -# CONFIG_JFS_FS is not set
  12.417 -# CONFIG_JFS_DEBUG is not set
  12.418 -# CONFIG_JFS_STATISTICS is not set
  12.419 -# CONFIG_MINIX_FS is not set
  12.420 -# CONFIG_VXFS_FS is not set
  12.421 -# CONFIG_NTFS_FS is not set
  12.422 -# CONFIG_NTFS_RW is not set
  12.423 -# CONFIG_HPFS_FS is not set
  12.424 -CONFIG_PROC_FS=y
  12.425 -# CONFIG_DEVFS_FS is not set
  12.426 -# CONFIG_DEVFS_MOUNT is not set
  12.427 -# CONFIG_DEVFS_DEBUG is not set
  12.428 -CONFIG_DEVPTS_FS=y
  12.429 -# CONFIG_QNX4FS_FS is not set
  12.430 -# CONFIG_QNX4FS_RW is not set
  12.431 -# CONFIG_ROMFS_FS is not set
  12.432 -CONFIG_EXT2_FS=y
  12.433 -# CONFIG_SYSV_FS is not set
  12.434 -# CONFIG_UDF_FS is not set
  12.435 -# CONFIG_UDF_RW is not set
  12.436 -# CONFIG_UFS_FS is not set
  12.437 -# CONFIG_UFS_FS_WRITE is not set
  12.438 -# CONFIG_XFS_FS is not set
  12.439 -# CONFIG_XFS_QUOTA is not set
  12.440 -# CONFIG_XFS_RT is not set
  12.441 -# CONFIG_XFS_TRACE is not set
  12.442 -# CONFIG_XFS_DEBUG is not set
  12.443 -
  12.444 -#
  12.445 -# Network File Systems
  12.446 -#
  12.447 -# CONFIG_CODA_FS is not set
  12.448 -# CONFIG_INTERMEZZO_FS is not set
  12.449 -CONFIG_NFS_FS=y
  12.450 -CONFIG_NFS_V3=y
  12.451 -# CONFIG_NFS_DIRECTIO is not set
  12.452 -CONFIG_ROOT_NFS=y
  12.453 -CONFIG_NFSD=y
  12.454 -CONFIG_NFSD_V3=y
  12.455 -# CONFIG_NFSD_TCP is not set
  12.456 -CONFIG_SUNRPC=y
  12.457 -CONFIG_LOCKD=y
  12.458 -CONFIG_LOCKD_V4=y
  12.459 -# CONFIG_SMB_FS is not set
  12.460 -# CONFIG_NCP_FS is not set
  12.461 -# CONFIG_NCPFS_PACKET_SIGNING is not set
  12.462 -# CONFIG_NCPFS_IOCTL_LOCKING is not set
  12.463 -# CONFIG_NCPFS_STRONG is not set
  12.464 -# CONFIG_NCPFS_NFS_NS is not set
  12.465 -# CONFIG_NCPFS_OS2_NS is not set
  12.466 -# CONFIG_NCPFS_SMALLDOS is not set
  12.467 -# CONFIG_NCPFS_NLS is not set
  12.468 -# CONFIG_NCPFS_EXTRAS is not set
  12.469 -CONFIG_ZISOFS_FS=y
  12.470 -
  12.471 -#
  12.472 -# Partition Types
  12.473 -#
  12.474 -CONFIG_PARTITION_ADVANCED=y
  12.475 -# CONFIG_ACORN_PARTITION is not set
  12.476 -# CONFIG_OSF_PARTITION is not set
  12.477 -# CONFIG_AMIGA_PARTITION is not set
  12.478 -# CONFIG_ATARI_PARTITION is not set
  12.479 -# CONFIG_MAC_PARTITION is not set
  12.480 -CONFIG_MSDOS_PARTITION=y
  12.481 -# CONFIG_BSD_DISKLABEL is not set
  12.482 -# CONFIG_MINIX_SUBPARTITION is not set
  12.483 -# CONFIG_SOLARIS_X86_PARTITION is not set
  12.484 -# CONFIG_UNIXWARE_DISKLABEL is not set
  12.485 -# CONFIG_LDM_PARTITION is not set
  12.486 -# CONFIG_SGI_PARTITION is not set
  12.487 -# CONFIG_ULTRIX_PARTITION is not set
  12.488 -# CONFIG_SUN_PARTITION is not set
  12.489 -# CONFIG_EFI_PARTITION is not set
  12.490 -# CONFIG_SMB_NLS is not set
  12.491 -CONFIG_NLS=y
  12.492 -
  12.493 -#
  12.494 -# Native Language Support
  12.495 -#
  12.496 -CONFIG_NLS_DEFAULT="iso8559-1"
  12.497 -# CONFIG_NLS_CODEPAGE_437 is not set
  12.498 -# CONFIG_NLS_CODEPAGE_737 is not set
  12.499 -# CONFIG_NLS_CODEPAGE_775 is not set
  12.500 -# CONFIG_NLS_CODEPAGE_850 is not set
  12.501 -# CONFIG_NLS_CODEPAGE_852 is not set
  12.502 -# CONFIG_NLS_CODEPAGE_855 is not set
  12.503 -# CONFIG_NLS_CODEPAGE_857 is not set
  12.504 -# CONFIG_NLS_CODEPAGE_860 is not set
  12.505 -# CONFIG_NLS_CODEPAGE_861 is not set
  12.506 -# CONFIG_NLS_CODEPAGE_862 is not set
  12.507 -# CONFIG_NLS_CODEPAGE_863 is not set
  12.508 -# CONFIG_NLS_CODEPAGE_864 is not set
  12.509 -# CONFIG_NLS_CODEPAGE_865 is not set
  12.510 -# CONFIG_NLS_CODEPAGE_866 is not set
  12.511 -# CONFIG_NLS_CODEPAGE_869 is not set
  12.512 -# CONFIG_NLS_CODEPAGE_936 is not set
  12.513 -# CONFIG_NLS_CODEPAGE_950 is not set
  12.514 -# CONFIG_NLS_CODEPAGE_932 is not set
  12.515 -# CONFIG_NLS_CODEPAGE_949 is not set
  12.516 -# CONFIG_NLS_CODEPAGE_874 is not set
  12.517 -# CONFIG_NLS_ISO8859_8 is not set
  12.518 -# CONFIG_NLS_CODEPAGE_1250 is not set
  12.519 -# CONFIG_NLS_CODEPAGE_1251 is not set
  12.520 -CONFIG_NLS_ISO8859_1=y
  12.521 -# CONFIG_NLS_ISO8859_2 is not set
  12.522 -# CONFIG_NLS_ISO8859_3 is not set
  12.523 -# CONFIG_NLS_ISO8859_4 is not set
  12.524 -# CONFIG_NLS_ISO8859_5 is not set
  12.525 -# CONFIG_NLS_ISO8859_6 is not set
  12.526 -# CONFIG_NLS_ISO8859_7 is not set
  12.527 -# CONFIG_NLS_ISO8859_9 is not set
  12.528 -# CONFIG_NLS_ISO8859_13 is not set
  12.529 -# CONFIG_NLS_ISO8859_14 is not set
  12.530 -# CONFIG_NLS_ISO8859_15 is not set
  12.531 -# CONFIG_NLS_KOI8_R is not set
  12.532 -# CONFIG_NLS_KOI8_U is not set
  12.533 -# CONFIG_NLS_UTF8 is not set
  12.534 -
  12.535 -#
  12.536 -# Console drivers
  12.537 -#
  12.538 -CONFIG_XEN_CONSOLE=y
  12.539 -
  12.540 -#
  12.541 -# Kernel hacking
  12.542 -#
  12.543 -CONFIG_DEBUG_KERNEL=y
  12.544 -# CONFIG_DEBUG_STACKOVERFLOW is not set
  12.545 -# CONFIG_DEBUG_HIGHMEM is not set
  12.546 -# CONFIG_DEBUG_SLAB is not set
  12.547 -# CONFIG_DEBUG_IOVIRT is not set
  12.548 -# CONFIG_MAGIC_SYSRQ is not set
  12.549 -# CONFIG_DEBUG_SPINLOCK is not set
  12.550 -# CONFIG_DEBUG_BUGVERBOSE is not set
  12.551 -CONFIG_KALLSYMS=y
  12.552 -# CONFIG_FRAME_POINTER is not set
  12.553 -CONFIG_LOG_BUF_SHIFT=0
  12.554 -
  12.555 -#
  12.556 -# Cryptographic options
  12.557 -#
  12.558 -# CONFIG_CRYPTO is not set
  12.559 -
  12.560 -#
  12.561 -# Library routines
  12.562 -#
  12.563 -# CONFIG_CRC32 is not set
  12.564 -CONFIG_ZLIB_INFLATE=y
  12.565 -# CONFIG_ZLIB_DEFLATE is not set
    13.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/balloon/Makefile	Fri Oct 07 23:22:35 2005 +0100
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,4 +0,0 @@
    13.4 -O_TARGET := drv.o
    13.5 -export-objs := balloon.o
    13.6 -obj-y := balloon.o
    13.7 -include $(TOPDIR)/Rules.make
    14.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/Makefile	Fri Oct 07 23:22:35 2005 +0100
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,10 +0,0 @@
    14.4 -
    14.5 -O_TARGET := drv.o
    14.6 -
    14.7 -subdir-$(CONFIG_XEN_BLKDEV_FRONTEND) += frontend
    14.8 -obj-$(CONFIG_XEN_BLKDEV_FRONTEND)    += frontend/drv.o
    14.9 -
   14.10 -subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
   14.11 -obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
   14.12 -
   14.13 -include $(TOPDIR)/Rules.make
    15.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/backend/Makefile	Fri Oct 07 23:22:35 2005 +0100
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,3 +0,0 @@
    15.4 -O_TARGET := drv.o
    15.5 -obj-y := main.o control.o interface.o vbd.o
    15.6 -include $(TOPDIR)/Rules.make
    16.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile	Fri Oct 07 23:22:35 2005 +0100
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,3 +0,0 @@
    16.4 -O_TARGET := drv.o
    16.5 -obj-y := blkfront.o vbd.o
    16.6 -include $(TOPDIR)/Rules.make
    17.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/frontend/common.h	Fri Oct 07 23:22:35 2005 +0100
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,93 +0,0 @@
    17.4 -/******************************************************************************
    17.5 - * arch/xen/drivers/blkif/frontend/common.h
    17.6 - * 
    17.7 - * Shared definitions between all levels of XenoLinux Virtual block devices.
    17.8 - */
    17.9 -
   17.10 -#ifndef __XEN_DRIVERS_COMMON_H__
   17.11 -#define __XEN_DRIVERS_COMMON_H__
   17.12 -
   17.13 -#include <linux/config.h>
   17.14 -#include <linux/module.h>
   17.15 -#include <linux/kernel.h>
   17.16 -#include <linux/sched.h>
   17.17 -#include <linux/slab.h>
   17.18 -#include <linux/string.h>
   17.19 -#include <linux/errno.h>
   17.20 -#include <linux/fs.h>
   17.21 -#include <linux/hdreg.h>
   17.22 -#include <linux/blkdev.h>
   17.23 -#include <linux/major.h>
   17.24 -#include <asm-xen/xen-public/xen.h>
   17.25 -#include <asm/io.h>
   17.26 -#include <asm/atomic.h>
   17.27 -#include <asm/uaccess.h>
   17.28 -#include <asm-xen/xen-public/io/blkif.h>
   17.29 -
   17.30 -#if 1
   17.31 -#define IPRINTK(fmt, args...) \
   17.32 -    printk(KERN_INFO "xen_blk: " fmt, ##args)
   17.33 -#else
   17.34 -#define IPRINTK(fmt, args...) ((void)0)
   17.35 -#endif
   17.36 -
   17.37 -#if 1
   17.38 -#define WPRINTK(fmt, args...) \
   17.39 -    printk(KERN_WARNING "xen_blk: " fmt, ##args)
   17.40 -#else
   17.41 -#define WPRINTK(fmt, args...) ((void)0)
   17.42 -#endif
   17.43 -
   17.44 -#if 0
   17.45 -#define DPRINTK(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   17.46 -#else
   17.47 -#define DPRINTK(_f, _a...) ((void)0)
   17.48 -#endif
   17.49 -
   17.50 -#if 0
   17.51 -#define DPRINTK_IOCTL(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   17.52 -#else
   17.53 -#define DPRINTK_IOCTL(_f, _a...) ((void)0)
   17.54 -#endif
   17.55 -
   17.56 -/* Private gendisk->flags[] values. */
   17.57 -#define GENHD_FL_XEN        2 /* Is unit a Xen block device?  */
   17.58 -#define GENHD_FL_VIRT_PARTNS 4 /* Are unit partitions virtual? */
   17.59 -
   17.60 -/*
   17.61 - * We have one of these per vbd, whether ide, scsi or 'other'.
   17.62 - * They hang in an array off the gendisk structure. We may end up putting
   17.63 - * all kinds of interesting stuff here :-)
   17.64 - */
   17.65 -typedef struct xl_disk {
   17.66 -    int usage;
   17.67 -} xl_disk_t;
   17.68 -
   17.69 -extern int blkif_open(struct inode *inode, struct file *filep);
   17.70 -extern int blkif_release(struct inode *inode, struct file *filep);
   17.71 -extern int blkif_ioctl(struct inode *inode, struct file *filep,
   17.72 -                                 unsigned command, unsigned long argument);
   17.73 -extern int blkif_check(kdev_t dev);
   17.74 -extern int blkif_revalidate(kdev_t dev);
   17.75 -extern void blkif_control_send(blkif_request_t *req, blkif_response_t *rsp);
   17.76 -extern void do_blkif_request (request_queue_t *rq); 
   17.77 -
   17.78 -extern void xlvbd_update_vbds(void);
   17.79 -
   17.80 -static inline xl_disk_t *xldev_to_xldisk(kdev_t xldev)
   17.81 -{
   17.82 -    struct gendisk *gd = get_gendisk(xldev);
   17.83 -    
   17.84 -    if ( gd == NULL ) 
   17.85 -        return NULL;
   17.86 -    
   17.87 -    return (xl_disk_t *)gd->real_devices + 
   17.88 -        (MINOR(xldev) >> gd->minor_shift);
   17.89 -}
   17.90 -
   17.91 -
   17.92 -/* Virtual block-device subsystem. */
   17.93 -extern int  xlvbd_init(void);
   17.94 -extern void xlvbd_cleanup(void); 
   17.95 -
   17.96 -#endif /* __XEN_DRIVERS_COMMON_H__ */
    18.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c	Fri Oct 07 23:22:35 2005 +0100
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,540 +0,0 @@
    18.4 -/******************************************************************************
    18.5 - * arch/xen/drivers/blkif/frontend/vbd.c
    18.6 - * 
    18.7 - * Xenolinux virtual block-device driver.
    18.8 - * 
    18.9 - * Copyright (c) 2003-2004, Keir Fraser & Steve Hand
   18.10 - * Modifications by Mark A. Williamson are (c) Intel Research Cambridge
   18.11 - */
   18.12 -
   18.13 -#include "common.h"
   18.14 -#include <linux/blk.h>
   18.15 -
   18.16 -/*
   18.17 - * For convenience we distinguish between ide, scsi and 'other' (i.e.
   18.18 - * potentially combinations of the two) in the naming scheme and in a few 
   18.19 - * other places (like default readahead, etc).
   18.20 - */
   18.21 -#define XLIDE_MAJOR_NAME  "hd"
   18.22 -#define XLSCSI_MAJOR_NAME "sd"
   18.23 -#define XLVBD_MAJOR_NAME "xvd"
   18.24 -
   18.25 -#define XLIDE_DEVS_PER_MAJOR   2
   18.26 -#define XLSCSI_DEVS_PER_MAJOR 16
   18.27 -#define XLVBD_DEVS_PER_MAJOR  16
   18.28 -
   18.29 -#define XLIDE_PARTN_SHIFT  6    /* amount to shift minor to get 'real' minor */
   18.30 -#define XLIDE_MAX_PART    (1 << XLIDE_PARTN_SHIFT)     /* minors per ide vbd */
   18.31 -
   18.32 -#define XLSCSI_PARTN_SHIFT 4    /* amount to shift minor to get 'real' minor */
   18.33 -#define XLSCSI_MAX_PART   (1 << XLSCSI_PARTN_SHIFT)   /* minors per scsi vbd */
   18.34 -
   18.35 -#define XLVBD_PARTN_SHIFT  4    /* amount to shift minor to get 'real' minor */
   18.36 -#define XLVBD_MAX_PART    (1 << XLVBD_PARTN_SHIFT) /* minors per 'other' vbd */
   18.37 -
   18.38 -/* The below are for the generic drivers/block/ll_rw_block.c code. */
   18.39 -static int xlide_blksize_size[256];
   18.40 -static int xlide_hardsect_size[256];
   18.41 -static int xlide_max_sectors[256];
   18.42 -static int xlscsi_blksize_size[256];
   18.43 -static int xlscsi_hardsect_size[256];
   18.44 -static int xlscsi_max_sectors[256];
   18.45 -static int xlvbd_blksize_size[256];
   18.46 -static int xlvbd_hardsect_size[256];
   18.47 -static int xlvbd_max_sectors[256];
   18.48 -
   18.49 -/* Information about our VBDs. */
   18.50 -#define MAX_VBDS 64
   18.51 -static int nr_vbds;
   18.52 -static vdisk_t *vbd_info;
   18.53 -
   18.54 -static struct block_device_operations xlvbd_block_fops = 
   18.55 -{
   18.56 -    open:               blkif_open,
   18.57 -    release:            blkif_release,
   18.58 -    ioctl:              blkif_ioctl,
   18.59 -    check_media_change: blkif_check,
   18.60 -    revalidate:         blkif_revalidate,
   18.61 -};
   18.62 -
   18.63 -static int xlvbd_get_vbd_info(vdisk_t *disk_info)
   18.64 -{
   18.65 -    vdisk_t         *buf = (vdisk_t *)__get_free_page(GFP_KERNEL);
   18.66 -    blkif_request_t  req;
   18.67 -    blkif_response_t rsp;
   18.68 -    int              nr;
   18.69 -
   18.70 -    memset(&req, 0, sizeof(req));
   18.71 -    req.operation   = BLKIF_OP_PROBE;
   18.72 -    req.nr_segments = 1;
   18.73 -#ifdef CONFIG_XEN_BLKDEV_GRANT
   18.74 -    blkif_control_probe_send(&req, &rsp,
   18.75 -                             (unsigned long)(virt_to_machine(buf)));
   18.76 -#else
   18.77 -    req.frame_and_sects[0] = virt_to_machine(buf) | 7;
   18.78 -
   18.79 -    blkif_control_send(&req, &rsp);
   18.80 -#endif
   18.81 -
   18.82 -    if ( rsp.status <= 0 )
   18.83 -    {
   18.84 -        printk(KERN_ALERT "Could not probe disks (%d)\n", rsp.status);
   18.85 -        return -1;
   18.86 -    }
   18.87 -
   18.88 -    if ( (nr = rsp.status) > MAX_VBDS )
   18.89 -         nr = MAX_VBDS;
   18.90 -    memcpy(disk_info, buf, nr * sizeof(vdisk_t));
   18.91 -
   18.92 -    return nr;
   18.93 -}
   18.94 -
   18.95 -/*
   18.96 - * xlvbd_init_device - initialise a VBD device
   18.97 - * @disk:              a vdisk_t describing the VBD
   18.98 - *
   18.99 - * Takes a vdisk_t * that describes a VBD the domain has access to.
  18.100 - * Performs appropriate initialisation and registration of the device.
  18.101 - *
  18.102 - * Care needs to be taken when making re-entrant calls to ensure that
  18.103 - * corruption does not occur.  Also, devices that are in use should not have
  18.104 - * their details updated.  This is the caller's responsibility.
  18.105 - */
  18.106 -static int xlvbd_init_device(vdisk_t *xd)
  18.107 -{
  18.108 -    int device = xd->device;
  18.109 -    int major  = MAJOR(device); 
  18.110 -    int minor  = MINOR(device);
  18.111 -    int is_ide = IDE_DISK_MAJOR(major);  /* is this an ide device? */
  18.112 -    int is_scsi= SCSI_BLK_MAJOR(major);  /* is this a scsi device? */
  18.113 -    char *major_name;
  18.114 -    struct gendisk *gd;
  18.115 -    struct block_device *bd;
  18.116 -    xl_disk_t *disk;
  18.117 -    int i, rc = 0, max_part, partno;
  18.118 -    unsigned long capacity;
  18.119 -
  18.120 -    unsigned char buf[64];
  18.121 -
  18.122 -    if ( (bd = bdget(device)) == NULL )
  18.123 -        return -1;
  18.124 -
  18.125 -    if ( ((disk = xldev_to_xldisk(device)) != NULL) && (disk->usage != 0) )
  18.126 -    {
  18.127 -        printk(KERN_ALERT "VBD update failed - in use [dev=%x]\n", device);
  18.128 -        rc = -1;
  18.129 -        goto out;
  18.130 -    }
  18.131 -
  18.132 -    if ( is_ide ) {
  18.133 -
  18.134 -	major_name = XLIDE_MAJOR_NAME; 
  18.135 -	max_part   = XLIDE_MAX_PART;
  18.136 -
  18.137 -    } else if ( is_scsi ) {
  18.138 -
  18.139 -	major_name = XLSCSI_MAJOR_NAME;
  18.140 -	max_part   = XLSCSI_MAX_PART;
  18.141 -
  18.142 -    } else { 
  18.143 -
  18.144 -        /* SMH: hmm - probably a CCISS driver or sim; assume CCISS for now */
  18.145 -	printk(KERN_ALERT "Assuming device %02x:%02x is CCISS/SCSI\n", 
  18.146 -	       major, minor);
  18.147 -	is_scsi    = 1; 
  18.148 -	major_name = "cciss"; 
  18.149 -	max_part   = XLSCSI_MAX_PART;
  18.150 -
  18.151 -    }
  18.152 -    
  18.153 -    partno = minor & (max_part - 1); 
  18.154 -    
  18.155 -    if ( (gd = get_gendisk(device)) == NULL )
  18.156 -    {
  18.157 -        rc = register_blkdev(major, major_name, &xlvbd_block_fops);
  18.158 -        if ( rc < 0 )
  18.159 -        {
  18.160 -            printk(KERN_ALERT "XL VBD: can't get major %d\n", major);
  18.161 -            goto out;
  18.162 -        }
  18.163 -
  18.164 -        if ( is_ide )
  18.165 -        { 
  18.166 -            blksize_size[major]  = xlide_blksize_size;
  18.167 -            hardsect_size[major] = xlide_hardsect_size;
  18.168 -            max_sectors[major]   = xlide_max_sectors;
  18.169 -            read_ahead[major]    = 8;
  18.170 -        } 
  18.171 -        else if ( is_scsi )
  18.172 -        { 
  18.173 -            blksize_size[major]  = xlscsi_blksize_size;
  18.174 -            hardsect_size[major] = xlscsi_hardsect_size;
  18.175 -            max_sectors[major]   = xlscsi_max_sectors;
  18.176 -            read_ahead[major]    = 8;
  18.177 -        }
  18.178 -        else
  18.179 -        { 
  18.180 -            blksize_size[major]  = xlvbd_blksize_size;
  18.181 -            hardsect_size[major] = xlvbd_hardsect_size;
  18.182 -            max_sectors[major]   = xlvbd_max_sectors;
  18.183 -            read_ahead[major]    = 8;
  18.184 -        }
  18.185 -
  18.186 -        blk_init_queue(BLK_DEFAULT_QUEUE(major), do_blkif_request);
  18.187 -
  18.188 -        /*
  18.189 -         * Turn off barking 'headactive' mode. We dequeue buffer heads as
  18.190 -         * soon as we pass them to the back-end driver.
  18.191 -         */
  18.192 -        blk_queue_headactive(BLK_DEFAULT_QUEUE(major), 0);
  18.193 -
  18.194 -        /* Construct an appropriate gendisk structure. */
  18.195 -        gd             = kmalloc(sizeof(struct gendisk), GFP_KERNEL);
  18.196 -        gd->major      = major;
  18.197 -        gd->major_name = major_name; 
  18.198 -    
  18.199 -        gd->max_p      = max_part; 
  18.200 -        if ( is_ide )
  18.201 -        { 
  18.202 -            gd->minor_shift  = XLIDE_PARTN_SHIFT; 
  18.203 -            gd->nr_real      = XLIDE_DEVS_PER_MAJOR; 
  18.204 -        } 
  18.205 -        else if ( is_scsi )
  18.206 -        { 
  18.207 -            gd->minor_shift  = XLSCSI_PARTN_SHIFT; 
  18.208 -            gd->nr_real      = XLSCSI_DEVS_PER_MAJOR; 
  18.209 -        }
  18.210 -        else
  18.211 -        { 
  18.212 -            gd->minor_shift  = XLVBD_PARTN_SHIFT; 
  18.213 -            gd->nr_real      = XLVBD_DEVS_PER_MAJOR; 
  18.214 -        }
  18.215 -
  18.216 -        /* 
  18.217 -        ** The sizes[] and part[] arrays hold the sizes and other 
  18.218 -        ** information about every partition with this 'major' (i.e. 
  18.219 -        ** every disk sharing the 8 bit prefix * max partns per disk) 
  18.220 -        */
  18.221 -        gd->sizes = kmalloc(max_part*gd->nr_real*sizeof(int), GFP_KERNEL);
  18.222 -        gd->part  = kmalloc(max_part*gd->nr_real*sizeof(struct hd_struct), 
  18.223 -                            GFP_KERNEL);
  18.224 -        memset(gd->sizes, 0, max_part * gd->nr_real * sizeof(int));
  18.225 -        memset(gd->part,  0, max_part * gd->nr_real 
  18.226 -               * sizeof(struct hd_struct));
  18.227 -
  18.228 -
  18.229 -        gd->real_devices = kmalloc(gd->nr_real * sizeof(xl_disk_t), 
  18.230 -                                   GFP_KERNEL);
  18.231 -        memset(gd->real_devices, 0, gd->nr_real * sizeof(xl_disk_t));
  18.232 -
  18.233 -        gd->next   = NULL;            
  18.234 -        gd->fops   = &xlvbd_block_fops;
  18.235 -
  18.236 -        gd->de_arr = kmalloc(gd->nr_real * sizeof(*gd->de_arr), 
  18.237 -                             GFP_KERNEL);
  18.238 -        gd->flags  = kmalloc(gd->nr_real * sizeof(*gd->flags), GFP_KERNEL);
  18.239 -    
  18.240 -        memset(gd->de_arr, 0, gd->nr_real * sizeof(*gd->de_arr));
  18.241 -        memset(gd->flags, 0, gd->nr_real *  sizeof(*gd->flags));
  18.242 -
  18.243 -        add_gendisk(gd);
  18.244 -
  18.245 -        blk_size[major] = gd->sizes;
  18.246 -    }
  18.247 -
  18.248 -    if ( xd->info & VDISK_READONLY )
  18.249 -        set_device_ro(device, 1);
  18.250 -
  18.251 -    gd->flags[minor >> gd->minor_shift] |= GENHD_FL_XEN;
  18.252 -
  18.253 -    /* NB. Linux 2.4 only handles 32-bit sector offsets and capacities. */
  18.254 -    capacity = (unsigned long)xd->capacity;
  18.255 -
  18.256 -    if ( partno != 0 )
  18.257 -    {
  18.258 -        /*
  18.259 -         * If this was previously set up as a real disc we will have set 
  18.260 -         * up partition-table information. Virtual partitions override 
  18.261 -         * 'real' partitions, and the two cannot coexist on a device.
  18.262 -         */
  18.263 -        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  18.264 -             (gd->sizes[minor & ~(max_part-1)] != 0) )
  18.265 -        {
  18.266 -            /*
  18.267 -             * Any non-zero sub-partition entries must be cleaned out before
  18.268 -             * installing 'virtual' partition entries. The two types cannot
  18.269 -             * coexist, and virtual partitions are favoured.
  18.270 -             */
  18.271 -            kdev_t dev = device & ~(max_part-1);
  18.272 -            for ( i = max_part - 1; i > 0; i-- )
  18.273 -            {
  18.274 -                invalidate_device(dev+i, 1);
  18.275 -                gd->part[MINOR(dev+i)].start_sect = 0;
  18.276 -                gd->part[MINOR(dev+i)].nr_sects   = 0;
  18.277 -                gd->sizes[MINOR(dev+i)]           = 0;
  18.278 -            }
  18.279 -            printk(KERN_ALERT
  18.280 -                   "Virtual partitions found for /dev/%s - ignoring any "
  18.281 -                   "real partition information we may have found.\n",
  18.282 -                   disk_name(gd, MINOR(device), buf));
  18.283 -        }
  18.284 -
  18.285 -        /* Need to skankily setup 'partition' information */
  18.286 -        gd->part[minor].start_sect = 0; 
  18.287 -        gd->part[minor].nr_sects   = capacity; 
  18.288 -        gd->sizes[minor]           = capacity >>(BLOCK_SIZE_BITS-9); 
  18.289 -
  18.290 -        gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  18.291 -    }
  18.292 -    else
  18.293 -    {
  18.294 -        gd->part[minor].nr_sects = capacity;
  18.295 -        gd->sizes[minor] = capacity>>(BLOCK_SIZE_BITS-9);
  18.296 -        
  18.297 -        /* Some final fix-ups depending on the device type */
  18.298 -        if ( xd->info & VDISK_REMOVABLE )
  18.299 -        { 
  18.300 -            gd->flags[minor >> gd->minor_shift] |= GENHD_FL_REMOVABLE; 
  18.301 -            printk(KERN_ALERT 
  18.302 -                   "Skipping partition check on %s /dev/%s\n", 
  18.303 -                   (xd->info & VDISK_CDROM) ? "cdrom" : "removable",
  18.304 -                   disk_name(gd, MINOR(device), buf)); 
  18.305 -        }
  18.306 -        else
  18.307 -        {
  18.308 -            /* Only check partitions on real discs (not virtual!). */
  18.309 -            if ( gd->flags[minor>>gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  18.310 -            {
  18.311 -                printk(KERN_ALERT
  18.312 -                       "Skipping partition check on virtual /dev/%s\n",
  18.313 -                       disk_name(gd, MINOR(device), buf));
  18.314 -                break;
  18.315 -            }
  18.316 -            register_disk(gd, device, gd->max_p, &xlvbd_block_fops, capacity);
  18.317 -        }
  18.318 -    }
  18.319 -
  18.320 - out:
  18.321 -    bdput(bd);    
  18.322 -    return rc;
  18.323 -}
  18.324 -
  18.325 -
  18.326 -/*
  18.327 - * xlvbd_remove_device - remove a device node if possible
  18.328 - * @device:       numeric device ID
  18.329 - *
  18.330 - * Updates the gendisk structure and invalidates devices.
  18.331 - *
  18.332 - * This is OK for now but in future, should perhaps consider where this should
  18.333 - * deallocate gendisks / unregister devices.
  18.334 - */
  18.335 -static int xlvbd_remove_device(int device)
  18.336 -{
  18.337 -    int i, rc = 0, minor = MINOR(device);
  18.338 -    struct gendisk *gd;
  18.339 -    struct block_device *bd;
  18.340 -    xl_disk_t *disk = NULL;
  18.341 -
  18.342 -    if ( (bd = bdget(device)) == NULL )
  18.343 -        return -1;
  18.344 -
  18.345 -    if ( ((gd = get_gendisk(device)) == NULL) ||
  18.346 -         ((disk = xldev_to_xldisk(device)) == NULL) )
  18.347 -        BUG();
  18.348 -
  18.349 -    if ( disk->usage != 0 )
  18.350 -    {
  18.351 -        printk(KERN_ALERT "VBD removal failed - in use [dev=%x]\n", device);
  18.352 -        rc = -1;
  18.353 -        goto out;
  18.354 -    }
  18.355 - 
  18.356 -    if ( (minor & (gd->max_p-1)) != 0 )
  18.357 -    {
  18.358 -        /* 1: The VBD is mapped to a partition rather than a whole unit. */
  18.359 -        invalidate_device(device, 1);
  18.360 -	gd->part[minor].start_sect = 0;
  18.361 -        gd->part[minor].nr_sects   = 0;
  18.362 -        gd->sizes[minor]           = 0;
  18.363 -
  18.364 -        /* Clear the consists-of-virtual-partitions flag if possible. */
  18.365 -        gd->flags[minor >> gd->minor_shift] &= ~GENHD_FL_VIRT_PARTNS;
  18.366 -        for ( i = 1; i < gd->max_p; i++ )
  18.367 -            if ( gd->sizes[(minor & ~(gd->max_p-1)) + i] != 0 )
  18.368 -                gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  18.369 -
  18.370 -        /*
  18.371 -         * If all virtual partitions are now gone, and a 'whole unit' VBD is
  18.372 -         * present, then we can try to grok the unit's real partition table.
  18.373 -         */
  18.374 -        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  18.375 -             (gd->sizes[minor & ~(gd->max_p-1)] != 0) &&
  18.376 -             !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_REMOVABLE) )
  18.377 -        {
  18.378 -            register_disk(gd,
  18.379 -                          device&~(gd->max_p-1), 
  18.380 -                          gd->max_p, 
  18.381 -                          &xlvbd_block_fops,
  18.382 -                          gd->part[minor&~(gd->max_p-1)].nr_sects);
  18.383 -        }
  18.384 -    }
  18.385 -    else
  18.386 -    {
  18.387 -        /*
  18.388 -         * 2: The VBD is mapped to an entire 'unit'. Clear all partitions.
  18.389 -         * NB. The partition entries are only cleared if there are no VBDs
  18.390 -         * mapped to individual partitions on this unit.
  18.391 -         */
  18.392 -        i = gd->max_p - 1; /* Default: clear subpartitions as well. */
  18.393 -        if ( gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  18.394 -            i = 0; /* 'Virtual' mode: only clear the 'whole unit' entry. */
  18.395 -        while ( i >= 0 )
  18.396 -        {
  18.397 -            invalidate_device(device+i, 1);
  18.398 -            gd->part[minor+i].start_sect = 0;
  18.399 -            gd->part[minor+i].nr_sects   = 0;
  18.400 -            gd->sizes[minor+i]           = 0;
  18.401 -            i--;
  18.402 -        }
  18.403 -    }
  18.404 -
  18.405 - out:
  18.406 -    bdput(bd);
  18.407 -    return rc;
  18.408 -}
  18.409 -
  18.410 -/*
  18.411 - * xlvbd_update_vbds - reprobes the VBD status and performs updates driver
  18.412 - * state. The VBDs need to be updated in this way when the domain is
  18.413 - * initialised and also each time we receive an XLBLK_UPDATE event.
  18.414 - */
  18.415 -void xlvbd_update_vbds(void)
  18.416 -{
  18.417 -    int i, j, k, old_nr, new_nr;
  18.418 -    vdisk_t *old_info, *new_info, *merged_info;
  18.419 -
  18.420 -    old_info = vbd_info;
  18.421 -    old_nr   = nr_vbds;
  18.422 -
  18.423 -    new_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  18.424 -    if (!new_info)
  18.425 -        return;
  18.426 -
  18.427 -    if ( unlikely(new_nr = xlvbd_get_vbd_info(new_info)) < 0 )
  18.428 -        goto out;
  18.429 -
  18.430 -    /*
  18.431 -     * Final list maximum size is old list + new list. This occurs only when
  18.432 -     * old list and new list do not overlap at all, and we cannot yet destroy
  18.433 -     * VBDs in the old list because the usage counts are busy.
  18.434 -     */
  18.435 -    merged_info = kmalloc((old_nr + new_nr) * sizeof(vdisk_t), GFP_KERNEL);
  18.436 -    if (!merged_info)
  18.437 -        goto out;
  18.438 -
  18.439 -    /* @i tracks old list; @j tracks new list; @k tracks merged list. */
  18.440 -    i = j = k = 0;
  18.441 -
  18.442 -    while ( (i < old_nr) && (j < new_nr) )
  18.443 -    {
  18.444 -        if ( old_info[i].device < new_info[j].device )
  18.445 -        {
  18.446 -            if ( xlvbd_remove_device(old_info[i].device) != 0 )
  18.447 -                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  18.448 -            i++;
  18.449 -        }
  18.450 -        else if ( old_info[i].device > new_info[j].device )
  18.451 -        {
  18.452 -            if ( xlvbd_init_device(&new_info[j]) == 0 )
  18.453 -                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  18.454 -            j++;
  18.455 -        }
  18.456 -        else
  18.457 -        {
  18.458 -            if ( ((old_info[i].capacity == new_info[j].capacity) &&
  18.459 -                  (old_info[i].info == new_info[j].info)) ||
  18.460 -                 (xlvbd_remove_device(old_info[i].device) != 0) )
  18.461 -                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  18.462 -            else if ( xlvbd_init_device(&new_info[j]) == 0 )
  18.463 -                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  18.464 -            i++; j++;
  18.465 -        }
  18.466 -    }
  18.467 -
  18.468 -    for ( ; i < old_nr; i++ )
  18.469 -    {
  18.470 -        if ( xlvbd_remove_device(old_info[i].device) != 0 )
  18.471 -            memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  18.472 -    }
  18.473 -
  18.474 -    for ( ; j < new_nr; j++ )
  18.475 -    {
  18.476 -        if ( xlvbd_init_device(&new_info[j]) == 0 )
  18.477 -            memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  18.478 -    }
  18.479 -
  18.480 -    vbd_info = merged_info;
  18.481 -    nr_vbds  = k;
  18.482 -
  18.483 -    kfree(old_info);
  18.484 -out:
  18.485 -    kfree(new_info);
  18.486 -}
  18.487 -
  18.488 -
  18.489 -/*
  18.490 - * Set up all the linux device goop for the virtual block devices (vbd's) that
  18.491 - * we know about. Note that although from the backend driver's p.o.v. VBDs are
  18.492 - * addressed simply an opaque 16-bit device number, the domain creation tools 
  18.493 - * conventionally allocate these numbers to correspond to those used by 'real' 
  18.494 - * linux -- this is just for convenience as it means e.g. that the same 
  18.495 - * /etc/fstab can be used when booting with or without Xen.
  18.496 - */
  18.497 -int xlvbd_init(void)
  18.498 -{
  18.499 -    int i;
  18.500 -    
  18.501 -    /*
  18.502 -     * If compiled as a module, we don't support unloading yet. We therefore 
  18.503 -     * permanently increment the reference count to disallow it.
  18.504 -     */
  18.505 -    SET_MODULE_OWNER(&xlvbd_block_fops);
  18.506 -    MOD_INC_USE_COUNT;
  18.507 -
  18.508 -    /* Initialize the global arrays. */
  18.509 -    for ( i = 0; i < 256; i++ ) 
  18.510 -    {
  18.511 -        xlide_blksize_size[i]  = 1024;
  18.512 -        xlide_hardsect_size[i] = 512;
  18.513 -        xlide_max_sectors[i]   = 512;
  18.514 -
  18.515 -        xlscsi_blksize_size[i]  = 1024;
  18.516 -        xlscsi_hardsect_size[i] = 512;
  18.517 -        xlscsi_max_sectors[i]   = 512;
  18.518 -
  18.519 -        xlvbd_blksize_size[i]  = 512;
  18.520 -        xlvbd_hardsect_size[i] = 512;
  18.521 -        xlvbd_max_sectors[i]   = 512;
  18.522 -    }
  18.523 -
  18.524 -    vbd_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  18.525 -    if (!vbd_info)
  18.526 -        return -ENOMEM;
  18.527 -
  18.528 -    nr_vbds  = xlvbd_get_vbd_info(vbd_info);
  18.529 -
  18.530 -    if ( nr_vbds < 0 )
  18.531 -    {
  18.532 -        kfree(vbd_info);
  18.533 -        vbd_info = NULL;
  18.534 -        nr_vbds  = 0;
  18.535 -    }
  18.536 -    else
  18.537 -    {
  18.538 -        for ( i = 0; i < nr_vbds; i++ )
  18.539 -            xlvbd_init_device(&vbd_info[i]);
  18.540 -    }
  18.541 -
  18.542 -    return 0;
  18.543 -}
    19.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/console/Makefile	Fri Oct 07 23:22:35 2005 +0100
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,3 +0,0 @@
    19.4 -O_TARGET := drv.o
    19.5 -obj-$(CONFIG_XEN_CONSOLE) := console.o
    19.6 -include $(TOPDIR)/Rules.make
    20.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/dom0/Makefile	Fri Oct 07 23:22:35 2005 +0100
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,3 +0,0 @@
    20.4 -O_TARGET := drv.o
    20.5 -obj-y := core.o
    20.6 -include $(TOPDIR)/Rules.make
    21.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/evtchn/Makefile	Fri Oct 07 23:22:35 2005 +0100
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,3 +0,0 @@
    21.4 -O_TARGET := drv.o
    21.5 -obj-y := evtchn.o
    21.6 -include $(TOPDIR)/Rules.make
    22.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/netif/Makefile	Fri Oct 07 23:22:35 2005 +0100
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,10 +0,0 @@
    22.4 -
    22.5 -O_TARGET := drv.o
    22.6 -
    22.7 -subdir-$(CONFIG_XEN_NETDEV_FRONTEND) += frontend
    22.8 -obj-$(CONFIG_XEN_NETDEV_FRONTEND)    += frontend/drv.o
    22.9 -
   22.10 -subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
   22.11 -obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
   22.12 -
   22.13 -include $(TOPDIR)/Rules.make
    23.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/netif/backend/Makefile	Fri Oct 07 23:22:35 2005 +0100
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,4 +0,0 @@
    23.4 -O_TARGET := drv.o
    23.5 -export-objs := interface.o
    23.6 -obj-y := main.o control.o interface.o
    23.7 -include $(TOPDIR)/Rules.make
    24.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/netif/frontend/Makefile	Fri Oct 07 23:22:35 2005 +0100
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,3 +0,0 @@
    24.4 -O_TARGET := drv.o
    24.5 -obj-y := main.o
    24.6 -include $(TOPDIR)/Rules.make
    25.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/Makefile	Fri Oct 07 23:22:35 2005 +0100
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,20 +0,0 @@
    25.4 -
    25.5 -.S.o:
    25.6 -	$(CC) $(AFLAGS) -traditional -c $< -o $*.o
    25.7 -
    25.8 -all: kernel.o head.o init_task.o
    25.9 -
   25.10 -O_TARGET := kernel.o
   25.11 -
   25.12 -export-objs     := i386_ksyms.o gnttab.o skbuff.o ctrl_if.o
   25.13 -
   25.14 -obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o  \
   25.15 -		ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o \
   25.16 -		i386_ksyms.o i387.o evtchn.o ctrl_if.o pci-dma.o \
   25.17 -		reboot.o fixup.o gnttab.o skbuff.o
   25.18 -
   25.19 -ifdef CONFIG_PCI
   25.20 -obj-y	+= pci-i386.o pci-pc.o
   25.21 -endif
   25.22 -
   25.23 -include $(TOPDIR)/Rules.make
    26.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/entry.S	Fri Oct 07 23:22:35 2005 +0100
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,779 +0,0 @@
    26.4 -/*
    26.5 - *  linux/arch/i386/entry.S
    26.6 - *
    26.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    26.8 - */
    26.9 -
   26.10 -/*
   26.11 - * entry.S contains the system-call and fault low-level handling routines.
   26.12 - * This also contains the timer-interrupt handler, as well as all interrupts
   26.13 - * and faults that can result in a task-switch.
   26.14 - *
   26.15 - * NOTE: This code handles signal-recognition, which happens every time
   26.16 - * after a timer-interrupt and after each system call.
   26.17 - *
   26.18 - * I changed all the .align's to 4 (16 byte alignment), as that's faster
   26.19 - * on a 486.
   26.20 - *
   26.21 - * Stack layout in 'ret_to_user':
   26.22 - * 	ptrace needs to have all regs on the stack.
   26.23 - *	if the order here is changed, it needs to be
   26.24 - *	updated in fork.c:copy_process, signal.c:do_signal,
   26.25 - *	ptrace.c and ptrace.h
   26.26 - *
   26.27 - *	 0(%esp) - %ebx
   26.28 - *	 4(%esp) - %ecx
   26.29 - *	 8(%esp) - %edx
   26.30 - *       C(%esp) - %esi
   26.31 - *	10(%esp) - %edi
   26.32 - *	14(%esp) - %ebp
   26.33 - *	18(%esp) - %eax
   26.34 - *	1C(%esp) - %ds
   26.35 - *	20(%esp) - %es
   26.36 - *	24(%esp) - orig_eax
   26.37 - *	28(%esp) - %eip
   26.38 - *	2C(%esp) - %cs
   26.39 - *	30(%esp) - %eflags
   26.40 - *	34(%esp) - %oldesp
   26.41 - *	38(%esp) - %oldss
   26.42 - *
   26.43 - * "current" is in register %ebx during any slow entries.
   26.44 - */
   26.45 -
   26.46 -#include <linux/config.h>
   26.47 -#include <linux/sys.h>
   26.48 -#include <linux/linkage.h>
   26.49 -#include <asm/segment.h>
   26.50 -#include <asm/smp.h>
   26.51 -
   26.52 -EBX		= 0x00
   26.53 -ECX		= 0x04
   26.54 -EDX		= 0x08
   26.55 -ESI		= 0x0C
   26.56 -EDI		= 0x10
   26.57 -EBP		= 0x14
   26.58 -EAX		= 0x18
   26.59 -DS		= 0x1C
   26.60 -ES		= 0x20
   26.61 -ORIG_EAX	= 0x24
   26.62 -EIP		= 0x28
   26.63 -CS		= 0x2C
   26.64 -EFLAGS		= 0x30
   26.65 -OLDESP		= 0x34
   26.66 -OLDSS		= 0x38
   26.67 -
   26.68 -CF_MASK		= 0x00000001
   26.69 -TF_MASK		= 0x00000100
   26.70 -IF_MASK		= 0x00000200
   26.71 -DF_MASK		= 0x00000400
   26.72 -NT_MASK		= 0x00004000
   26.73 -
   26.74 -/* Offsets into task_struct. */
   26.75 -state		=  0
   26.76 -flags		=  4
   26.77 -sigpending	=  8
   26.78 -addr_limit	= 12
   26.79 -exec_domain	= 16
   26.80 -need_resched	= 20
   26.81 -tsk_ptrace	= 24
   26.82 -processor	= 52
   26.83 -
   26.84 -/* Offsets into shared_info_t. */
   26.85 -#define evtchn_upcall_pending /* 0 */
   26.86 -#define evtchn_upcall_mask       1
   26.87 -
   26.88 -ENOSYS = 38
   26.89 -
   26.90 -
   26.91 -#define SAVE_ALL \
   26.92 -	cld; \
   26.93 -	pushl %es; \
   26.94 -	pushl %ds; \
   26.95 -	pushl %eax; \
   26.96 -	pushl %ebp; \
   26.97 -	pushl %edi; \
   26.98 -	pushl %esi; \
   26.99 -	pushl %edx; \
  26.100 -	pushl %ecx; \
  26.101 -	pushl %ebx; \
  26.102 -	movl $(__KERNEL_DS),%edx; \
  26.103 -	movl %edx,%ds; \
  26.104 -	movl %edx,%es;
  26.105 -
  26.106 -#define RESTORE_ALL	\
  26.107 -	popl %ebx;	\
  26.108 -	popl %ecx;	\
  26.109 -	popl %edx;	\
  26.110 -	popl %esi;	\
  26.111 -	popl %edi;	\
  26.112 -	popl %ebp;	\
  26.113 -	popl %eax;	\
  26.114 -1:	popl %ds;	\
  26.115 -2:	popl %es;	\
  26.116 -	addl $4,%esp;	\
  26.117 -3:	iret;		\
  26.118 -.section .fixup,"ax";	\
  26.119 -4:	movl $0,(%esp);	\
  26.120 -	jmp 1b;		\
  26.121 -5:	movl $0,(%esp);	\
  26.122 -	jmp 2b;		\
  26.123 -6:	pushl %ss;	\
  26.124 -	popl %ds;	\
  26.125 -	pushl %ss;	\
  26.126 -	popl %es;	\
  26.127 -	pushl $11;	\
  26.128 -	call do_exit;	\
  26.129 -.previous;		\
  26.130 -.section __ex_table,"a";\
  26.131 -	.align 4;	\
  26.132 -	.long 1b,4b;	\
  26.133 -	.long 2b,5b;	\
  26.134 -	.long 3b,6b;	\
  26.135 -.previous
  26.136 -
  26.137 -#define GET_CURRENT(reg) \
  26.138 -	movl $-8192, reg; \
  26.139 -	andl %esp, reg
  26.140 -
  26.141 -ENTRY(lcall7)
  26.142 -	pushfl			# We get a different stack layout with call
  26.143 -	pushl %eax		# gates, which has to be cleaned up later..
  26.144 -	SAVE_ALL
  26.145 -	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
  26.146 -	movl CS(%esp),%edx	# this is eip..
  26.147 -	movl EFLAGS(%esp),%ecx	# and this is cs..
  26.148 -	movl %eax,EFLAGS(%esp)	#
  26.149 -	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
  26.150 -	pushl %eax
  26.151 -	popfl
  26.152 -	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  26.153 -	movl %ecx,CS(%esp)	#
  26.154 -	movl %esp,%ebx
  26.155 -	pushl %ebx
  26.156 -	andl $-8192,%ebx	# GET_CURRENT
  26.157 -	movl exec_domain(%ebx),%edx	# Get the execution domain
  26.158 -	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
  26.159 -	pushl $0x7
  26.160 -	call *%edx
  26.161 -	addl $4, %esp
  26.162 -	popl %eax
  26.163 -	jmp ret_to_user
  26.164 -
  26.165 -ENTRY(lcall27)
  26.166 -	pushfl			# We get a different stack layout with call
  26.167 -	pushl %eax		# gates, which has to be cleaned up later..
  26.168 -	SAVE_ALL
  26.169 -	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
  26.170 -	movl CS(%esp),%edx	# this is eip..
  26.171 -	movl EFLAGS(%esp),%ecx	# and this is cs..
  26.172 -	movl %eax,EFLAGS(%esp)	#
  26.173 -	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
  26.174 -	pushl %eax
  26.175 -	popfl
  26.176 -	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  26.177 -	movl %ecx,CS(%esp)	#
  26.178 -	movl %esp,%ebx
  26.179 -	pushl %ebx
  26.180 -	andl $-8192,%ebx	# GET_CURRENT
  26.181 -	movl exec_domain(%ebx),%edx	# Get the execution domain
  26.182 -	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
  26.183 -	pushl $0x27
  26.184 -	call *%edx
  26.185 -	addl $4, %esp
  26.186 -	popl %eax
  26.187 -	jmp ret_to_user
  26.188 -
  26.189 -ENTRY(ret_from_fork)
  26.190 -	pushl %ebx
  26.191 -	call SYMBOL_NAME(schedule_tail)
  26.192 -	addl $4, %esp
  26.193 -	GET_CURRENT(%ebx)
  26.194 -	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  26.195 -	jne tracesys_exit
  26.196 -	jmp ret_to_user
  26.197 -
  26.198 -/*
  26.199 - * Return to user mode is not as complex as all this looks,
  26.200 - * but we want the default path for a system call return to
  26.201 - * go as quickly as possible which is why some of this is
  26.202 - * less clear than it otherwise should be.
  26.203 - */
  26.204 -ENTRY(system_call)
  26.205 -	pushl %eax			# save orig_eax
  26.206 -	SAVE_ALL
  26.207 -	GET_CURRENT(%ebx)
  26.208 -	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  26.209 -	jne tracesys
  26.210 -	cmpl $(NR_syscalls),%eax
  26.211 -	jae badsys
  26.212 -	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  26.213 -	movl %eax,EAX(%esp)		# save the return value
  26.214 -ret_to_user:
  26.215 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  26.216 -        movb $1,evtchn_upcall_mask(%esi) # make tests atomic
  26.217 -ret_to_user_nocli:
  26.218 -	cmpl $0,need_resched(%ebx)
  26.219 -	jne  reschedule
  26.220 -	cmpl $0,sigpending(%ebx)
  26.221 -	je   safesti                    # ensure need_resched updates are seen
  26.222 -/*signal_return:*/
  26.223 -	movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
  26.224 -	movl %esp,%eax
  26.225 -	xorl %edx,%edx
  26.226 -	call SYMBOL_NAME(do_signal)
  26.227 -	jmp  safesti
  26.228 -
  26.229 -	ALIGN
  26.230 -restore_all:
  26.231 -	RESTORE_ALL
  26.232 -
  26.233 -	ALIGN
  26.234 -tracesys:
  26.235 -	movl $-ENOSYS,EAX(%esp)
  26.236 -	call SYMBOL_NAME(syscall_trace)
  26.237 -	movl ORIG_EAX(%esp),%eax
  26.238 -	cmpl $(NR_syscalls),%eax
  26.239 -	jae tracesys_exit
  26.240 -	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  26.241 -	movl %eax,EAX(%esp)		# save the return value
  26.242 -tracesys_exit:
  26.243 -	call SYMBOL_NAME(syscall_trace)
  26.244 -	jmp ret_to_user
  26.245 -badsys:
  26.246 -	movl $-ENOSYS,EAX(%esp)
  26.247 -	jmp ret_to_user
  26.248 -
  26.249 -	ALIGN
  26.250 -ENTRY(ret_from_intr)
  26.251 -	GET_CURRENT(%ebx)
  26.252 -ret_from_exception:
  26.253 -	movb CS(%esp),%al
  26.254 -	testl $2,%eax
  26.255 -	jne ret_to_user
  26.256 -	jmp restore_all
  26.257 -
  26.258 -	ALIGN
  26.259 -reschedule:
  26.260 -        movb $0,evtchn_upcall_mask(%esi)  # reenable event callbacks
  26.261 -	call SYMBOL_NAME(schedule)        # test
  26.262 -	jmp  ret_to_user
  26.263 -
  26.264 -ENTRY(divide_error)
  26.265 -	pushl $0		# no error code
  26.266 -	pushl $ SYMBOL_NAME(do_divide_error)
  26.267 -	ALIGN
  26.268 -error_code:
  26.269 -	pushl %ds
  26.270 -	pushl %eax
  26.271 -	xorl %eax,%eax
  26.272 -	pushl %ebp
  26.273 -	pushl %edi
  26.274 -	pushl %esi
  26.275 -	pushl %edx
  26.276 -	decl %eax			# eax = -1
  26.277 -	pushl %ecx
  26.278 -	pushl %ebx
  26.279 -	GET_CURRENT(%ebx)
  26.280 -	cld
  26.281 -	movl %es,%ecx
  26.282 -	movl ORIG_EAX(%esp), %esi	# get the error code
  26.283 -	movl ES(%esp), %edi		# get the function address
  26.284 -	movl %eax, ORIG_EAX(%esp)
  26.285 -	movl %ecx, ES(%esp)
  26.286 -	movl %esp,%edx
  26.287 -	pushl %esi			# push the error code
  26.288 -	pushl %edx			# push the pt_regs pointer
  26.289 -	movl $(__KERNEL_DS),%edx
  26.290 -	movl %edx,%ds
  26.291 -	movl %edx,%es
  26.292 -	call *%edi
  26.293 -	addl $8,%esp
  26.294 -	jmp ret_from_exception
  26.295 -
  26.296 -# A note on the "critical region" in our callback handler.
  26.297 -# We want to avoid stacking callback handlers due to events occurring
  26.298 -# during handling of the last event. To do this, we keep events disabled
  26.299 -# until we've done all processing. HOWEVER, we must enable events before
  26.300 -# popping the stack frame (can't be done atomically) and so it would still
  26.301 -# be possible to get enough handler activations to overflow the stack.
  26.302 -# Although unlikely, bugs of that kind are hard to track down, so we'd
  26.303 -# like to avoid the possibility.
  26.304 -# So, on entry to the handler we detect whether we interrupted an
  26.305 -# existing activation in its critical region -- if so, we pop the current
  26.306 -# activation and restart the handler using the previous one.
  26.307 -ENTRY(hypervisor_callback)
  26.308 -        pushl %eax
  26.309 -        SAVE_ALL
  26.310 -        GET_CURRENT(%ebx)
  26.311 -        movl EIP(%esp),%eax
  26.312 -        cmpl $scrit,%eax
  26.313 -        jb   11f
  26.314 -        cmpl $ecrit,%eax
  26.315 -        jb   critical_region_fixup
  26.316 -11:     push %esp
  26.317 -        call evtchn_do_upcall
  26.318 -        add  $4,%esp
  26.319 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  26.320 -        movb CS(%esp),%cl
  26.321 -	test $2,%cl          # slow return to ring 2 or 3
  26.322 -	jne  ret_to_user_nocli
  26.323 -safesti:movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
  26.324 -scrit:  /**** START OF CRITICAL REGION ****/
  26.325 -        testb $0xFF,evtchn_upcall_pending(%esi)
  26.326 -        jnz  14f              # process more events if necessary...
  26.327 -        RESTORE_ALL
  26.328 -14:     movb $1,evtchn_upcall_mask(%esi)
  26.329 -        jmp  11b
  26.330 -ecrit:  /**** END OF CRITICAL REGION ****/
  26.331 -# [How we do the fixup]. We want to merge the current stack frame with the
  26.332 -# just-interrupted frame. How we do this depends on where in the critical
  26.333 -# region the interrupted handler was executing, and so how many saved
  26.334 -# registers are in each frame. We do this quickly using the lookup table
  26.335 -# 'critical_fixup_table'. For each byte offset in the critical region, it
  26.336 -# provides the number of bytes which have already been popped from the
  26.337 -# interrupted stack frame. 
  26.338 -critical_region_fixup:
  26.339 -        addl $critical_fixup_table-scrit,%eax
  26.340 -        movzbl (%eax),%eax    # %eax contains num bytes popped
  26.341 -        mov  %esp,%esi
  26.342 -        add  %eax,%esi        # %esi points at end of src region
  26.343 -        mov  %esp,%edi
  26.344 -        add  $0x34,%edi       # %edi points at end of dst region
  26.345 -        mov  %eax,%ecx
  26.346 -        shr  $2,%ecx          # convert words to bytes
  26.347 -        je   16f              # skip loop if nothing to copy
  26.348 -15:     subl $4,%esi          # pre-decrementing copy loop
  26.349 -        subl $4,%edi
  26.350 -        movl (%esi),%eax
  26.351 -        movl %eax,(%edi)
  26.352 -        loop 15b
  26.353 -16:     movl %edi,%esp        # final %edi is top of merged stack
  26.354 -        jmp  11b
  26.355 -        
  26.356 -critical_fixup_table:        
  26.357 -        .byte 0x00,0x00,0x00                  # testb $0xFF,(%esi)
  26.358 -        .byte 0x00,0x00                       # jnz  14f
  26.359 -        .byte 0x00                            # pop  %ebx
  26.360 -        .byte 0x04                            # pop  %ecx
  26.361 -        .byte 0x08                            # pop  %edx
  26.362 -        .byte 0x0c                            # pop  %esi
  26.363 -        .byte 0x10                            # pop  %edi
  26.364 -        .byte 0x14                            # pop  %ebp
  26.365 -        .byte 0x18                            # pop  %eax
  26.366 -        .byte 0x1c                            # pop  %ds
  26.367 -        .byte 0x20                            # pop  %es
  26.368 -        .byte 0x24,0x24,0x24                  # add  $4,%esp
  26.369 -        .byte 0x28                            # iret
  26.370 -        .byte 0x00,0x00,0x00,0x00             # movb $1,4(%esi)
  26.371 -        .byte 0x00,0x00                       # jmp  11b
  26.372 -
  26.373 -# Hypervisor uses this for application faults while it executes.
  26.374 -ENTRY(failsafe_callback)
  26.375 -1:      popl %ds
  26.376 -2:      popl %es
  26.377 -3:      popl %fs
  26.378 -4:      popl %gs
  26.379 -5:      iret
  26.380 -.section .fixup,"ax";	\
  26.381 -6:	movl $0,(%esp);	\
  26.382 -	jmp 1b;		\
  26.383 -7:	movl $0,(%esp);	\
  26.384 -	jmp 2b;		\
  26.385 -8:	movl $0,(%esp);	\
  26.386 -	jmp 3b;		\
  26.387 -9:	movl $0,(%esp);	\
  26.388 -	jmp 4b;		\
  26.389 -10:	pushl %ss;	\
  26.390 -	popl %ds;	\
  26.391 -	pushl %ss;	\
  26.392 -	popl %es;	\
  26.393 -	pushl $11;	\
  26.394 -	call do_exit;	\
  26.395 -.previous;		\
  26.396 -.section __ex_table,"a";\
  26.397 -	.align 4;	\
  26.398 -	.long 1b,6b;	\
  26.399 -	.long 2b,7b;	\
  26.400 -	.long 3b,8b;	\
  26.401 -	.long 4b,9b;	\
  26.402 -	.long 5b,10b;	\
  26.403 -.previous
  26.404 -        
  26.405 -ENTRY(coprocessor_error)
  26.406 -	pushl $0
  26.407 -	pushl $ SYMBOL_NAME(do_coprocessor_error)
  26.408 -	jmp error_code
  26.409 -
  26.410 -ENTRY(simd_coprocessor_error)
  26.411 -	pushl $0
  26.412 -	pushl $ SYMBOL_NAME(do_simd_coprocessor_error)
  26.413 -	jmp error_code
  26.414 -
  26.415 -ENTRY(device_not_available)
  26.416 -	pushl $-1		# mark this as an int
  26.417 -	SAVE_ALL
  26.418 -	GET_CURRENT(%ebx)
  26.419 -	call SYMBOL_NAME(math_state_restore)
  26.420 -	jmp ret_from_exception
  26.421 -
  26.422 -ENTRY(debug)
  26.423 -	pushl $0
  26.424 -	pushl $ SYMBOL_NAME(do_debug)
  26.425 -	jmp error_code
  26.426 -
  26.427 -ENTRY(int3)
  26.428 -	pushl $0
  26.429 -	pushl $ SYMBOL_NAME(do_int3)
  26.430 -	jmp error_code
  26.431 -
  26.432 -ENTRY(overflow)
  26.433 -	pushl $0
  26.434 -	pushl $ SYMBOL_NAME(do_overflow)
  26.435 -	jmp error_code
  26.436 -
  26.437 -ENTRY(bounds)
  26.438 -	pushl $0
  26.439 -	pushl $ SYMBOL_NAME(do_bounds)
  26.440 -	jmp error_code
  26.441 -
  26.442 -ENTRY(invalid_op)
  26.443 -	pushl $0
  26.444 -	pushl $ SYMBOL_NAME(do_invalid_op)
  26.445 -	jmp error_code
  26.446 -
  26.447 -ENTRY(coprocessor_segment_overrun)
  26.448 -	pushl $0
  26.449 -	pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
  26.450 -	jmp error_code
  26.451 -
  26.452 -ENTRY(double_fault)
  26.453 -	pushl $ SYMBOL_NAME(do_double_fault)
  26.454 -	jmp error_code
  26.455 -
  26.456 -ENTRY(invalid_TSS)
  26.457 -	pushl $ SYMBOL_NAME(do_invalid_TSS)
  26.458 -	jmp error_code
  26.459 -
  26.460 -ENTRY(segment_not_present)
  26.461 -	pushl $ SYMBOL_NAME(do_segment_not_present)
  26.462 -	jmp error_code
  26.463 -
  26.464 -ENTRY(stack_segment)
  26.465 -	pushl $ SYMBOL_NAME(do_stack_segment)
  26.466 -	jmp error_code
  26.467 -
  26.468 -ENTRY(general_protection)
  26.469 -	pushl $ SYMBOL_NAME(do_general_protection)
  26.470 -	jmp error_code
  26.471 -
  26.472 -ENTRY(alignment_check)
  26.473 -	pushl $ SYMBOL_NAME(do_alignment_check)
  26.474 -	jmp error_code
  26.475 -
  26.476 -# This handler is special, because it gets an extra value on its stack,
  26.477 -# which is the linear faulting address.
  26.478 -#define PAGE_FAULT_STUB(_name1, _name2)                                  \
  26.479 -ENTRY(_name1)                                                            \
  26.480 -	pushl %ds                                                      ; \
  26.481 -	pushl %eax                                                     ; \
  26.482 -	xorl %eax,%eax                                                 ; \
  26.483 -	pushl %ebp                                                     ; \
  26.484 -	pushl %edi                                                     ; \
  26.485 -	pushl %esi                                                     ; \
  26.486 -	pushl %edx                                                     ; \
  26.487 -	decl %eax                      /* eax = -1 */                  ; \
  26.488 -	pushl %ecx                                                     ; \
  26.489 -	pushl %ebx                                                     ; \
  26.490 -	GET_CURRENT(%ebx)                                              ; \
  26.491 -	cld                                                            ; \
  26.492 -	movl %es,%ecx                                                  ; \
  26.493 -	movl ORIG_EAX(%esp), %esi      /* get the error code */        ; \
  26.494 -	movl ES(%esp), %edi            /* get the faulting address */  ; \
  26.495 -	movl %eax, ORIG_EAX(%esp)                                      ; \
  26.496 -	movl %ecx, ES(%esp)                                            ; \
  26.497 -	movl %esp,%edx                                                 ; \
  26.498 -        pushl %edi                     /* push the faulting address */ ; \
  26.499 -	pushl %esi                     /* push the error code */       ; \
  26.500 -	pushl %edx                     /* push the pt_regs pointer */  ; \
  26.501 -	movl $(__KERNEL_DS),%edx                                       ; \
  26.502 -	movl %edx,%ds                                                  ; \
  26.503 -	movl %edx,%es                                                  ; \
  26.504 -	call SYMBOL_NAME(_name2)                                       ; \
  26.505 -	addl $12,%esp                                                  ; \
  26.506 -	jmp ret_from_exception                                         ;
  26.507 -PAGE_FAULT_STUB(page_fault, do_page_fault)
  26.508 -
  26.509 -ENTRY(machine_check)
  26.510 -	pushl $0
  26.511 -	pushl $ SYMBOL_NAME(do_machine_check)
  26.512 -	jmp error_code
  26.513 -
  26.514 -ENTRY(fixup_4gb_segment)
  26.515 -	pushl $ SYMBOL_NAME(do_fixup_4gb_segment)
  26.516 -	jmp error_code
  26.517 -
  26.518 -.data
  26.519 -ENTRY(sys_call_table)
  26.520 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 0  -  old "setup()" system call*/
  26.521 -	.long SYMBOL_NAME(sys_exit)
  26.522 -	.long SYMBOL_NAME(sys_fork)
  26.523 -	.long SYMBOL_NAME(sys_read)
  26.524 -	.long SYMBOL_NAME(sys_write)
  26.525 -	.long SYMBOL_NAME(sys_open)		/* 5 */
  26.526 -	.long SYMBOL_NAME(sys_close)
  26.527 -	.long SYMBOL_NAME(sys_waitpid)
  26.528 -	.long SYMBOL_NAME(sys_creat)
  26.529 -	.long SYMBOL_NAME(sys_link)
  26.530 -	.long SYMBOL_NAME(sys_unlink)		/* 10 */
  26.531 -	.long SYMBOL_NAME(sys_execve)
  26.532 -	.long SYMBOL_NAME(sys_chdir)
  26.533 -	.long SYMBOL_NAME(sys_time)
  26.534 -	.long SYMBOL_NAME(sys_mknod)
  26.535 -	.long SYMBOL_NAME(sys_chmod)		/* 15 */
  26.536 -	.long SYMBOL_NAME(sys_lchown16)
  26.537 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old break syscall holder */
  26.538 -	.long SYMBOL_NAME(sys_stat)
  26.539 -	.long SYMBOL_NAME(sys_lseek)
  26.540 -	.long SYMBOL_NAME(sys_getpid)		/* 20 */
  26.541 -	.long SYMBOL_NAME(sys_mount)
  26.542 -	.long SYMBOL_NAME(sys_oldumount)
  26.543 -	.long SYMBOL_NAME(sys_setuid16)
  26.544 -	.long SYMBOL_NAME(sys_getuid16)
  26.545 -	.long SYMBOL_NAME(sys_stime)		/* 25 */
  26.546 -	.long SYMBOL_NAME(sys_ptrace)
  26.547 -	.long SYMBOL_NAME(sys_alarm)
  26.548 -	.long SYMBOL_NAME(sys_fstat)
  26.549 -	.long SYMBOL_NAME(sys_pause)
  26.550 -	.long SYMBOL_NAME(sys_utime)		/* 30 */
  26.551 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old stty syscall holder */
  26.552 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old gtty syscall holder */
  26.553 -	.long SYMBOL_NAME(sys_access)
  26.554 -	.long SYMBOL_NAME(sys_nice)
  26.555 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 35 */		/* old ftime syscall holder */
  26.556 -	.long SYMBOL_NAME(sys_sync)
  26.557 -	.long SYMBOL_NAME(sys_kill)
  26.558 -	.long SYMBOL_NAME(sys_rename)
  26.559 -	.long SYMBOL_NAME(sys_mkdir)
  26.560 -	.long SYMBOL_NAME(sys_rmdir)		/* 40 */
  26.561 -	.long SYMBOL_NAME(sys_dup)
  26.562 -	.long SYMBOL_NAME(sys_pipe)
  26.563 -	.long SYMBOL_NAME(sys_times)
  26.564 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old prof syscall holder */
  26.565 -	.long SYMBOL_NAME(sys_brk)		/* 45 */
  26.566 -	.long SYMBOL_NAME(sys_setgid16)
  26.567 -	.long SYMBOL_NAME(sys_getgid16)
  26.568 -	.long SYMBOL_NAME(sys_signal)
  26.569 -	.long SYMBOL_NAME(sys_geteuid16)
  26.570 -	.long SYMBOL_NAME(sys_getegid16)	/* 50 */
  26.571 -	.long SYMBOL_NAME(sys_acct)
  26.572 -	.long SYMBOL_NAME(sys_umount)					/* recycled never used phys() */
  26.573 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old lock syscall holder */
  26.574 -	.long SYMBOL_NAME(sys_ioctl)
  26.575 -	.long SYMBOL_NAME(sys_fcntl)		/* 55 */
  26.576 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old mpx syscall holder */
  26.577 -	.long SYMBOL_NAME(sys_setpgid)
  26.578 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old ulimit syscall holder */
  26.579 -	.long SYMBOL_NAME(sys_olduname)
  26.580 -	.long SYMBOL_NAME(sys_umask)		/* 60 */
  26.581 -	.long SYMBOL_NAME(sys_chroot)
  26.582 -	.long SYMBOL_NAME(sys_ustat)
  26.583 -	.long SYMBOL_NAME(sys_dup2)
  26.584 -	.long SYMBOL_NAME(sys_getppid)
  26.585 -	.long SYMBOL_NAME(sys_getpgrp)		/* 65 */
  26.586 -	.long SYMBOL_NAME(sys_setsid)
  26.587 -	.long SYMBOL_NAME(sys_sigaction)
  26.588 -	.long SYMBOL_NAME(sys_sgetmask)
  26.589 -	.long SYMBOL_NAME(sys_ssetmask)
  26.590 -	.long SYMBOL_NAME(sys_setreuid16)	/* 70 */
  26.591 -	.long SYMBOL_NAME(sys_setregid16)
  26.592 -	.long SYMBOL_NAME(sys_sigsuspend)
  26.593 -	.long SYMBOL_NAME(sys_sigpending)
  26.594 -	.long SYMBOL_NAME(sys_sethostname)
  26.595 -	.long SYMBOL_NAME(sys_setrlimit)	/* 75 */
  26.596 -	.long SYMBOL_NAME(sys_old_getrlimit)
  26.597 -	.long SYMBOL_NAME(sys_getrusage)
  26.598 -	.long SYMBOL_NAME(sys_gettimeofday)
  26.599 -	.long SYMBOL_NAME(sys_settimeofday)
  26.600 -	.long SYMBOL_NAME(sys_getgroups16)	/* 80 */
  26.601 -	.long SYMBOL_NAME(sys_setgroups16)
  26.602 -	.long SYMBOL_NAME(old_select)
  26.603 -	.long SYMBOL_NAME(sys_symlink)
  26.604 -	.long SYMBOL_NAME(sys_lstat)
  26.605 -	.long SYMBOL_NAME(sys_readlink)		/* 85 */
  26.606 -	.long SYMBOL_NAME(sys_uselib)
  26.607 -	.long SYMBOL_NAME(sys_swapon)
  26.608 -	.long SYMBOL_NAME(sys_reboot)
  26.609 -	.long SYMBOL_NAME(old_readdir)
  26.610 -	.long SYMBOL_NAME(old_mmap)		/* 90 */
  26.611 -	.long SYMBOL_NAME(sys_munmap)
  26.612 -	.long SYMBOL_NAME(sys_truncate)
  26.613 -	.long SYMBOL_NAME(sys_ftruncate)
  26.614 -	.long SYMBOL_NAME(sys_fchmod)
  26.615 -	.long SYMBOL_NAME(sys_fchown16)		/* 95 */
  26.616 -	.long SYMBOL_NAME(sys_getpriority)
  26.617 -	.long SYMBOL_NAME(sys_setpriority)
  26.618 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old profil syscall holder */
  26.619 -	.long SYMBOL_NAME(sys_statfs)
  26.620 -	.long SYMBOL_NAME(sys_fstatfs)		/* 100 */
  26.621 -	.long SYMBOL_NAME(sys_ioperm)
  26.622 -	.long SYMBOL_NAME(sys_socketcall)
  26.623 -	.long SYMBOL_NAME(sys_syslog)
  26.624 -	.long SYMBOL_NAME(sys_setitimer)
  26.625 -	.long SYMBOL_NAME(sys_getitimer)	/* 105 */
  26.626 -	.long SYMBOL_NAME(sys_newstat)
  26.627 -	.long SYMBOL_NAME(sys_newlstat)
  26.628 -	.long SYMBOL_NAME(sys_newfstat)
  26.629 -	.long SYMBOL_NAME(sys_uname)
  26.630 -	.long SYMBOL_NAME(sys_iopl)		/* 110 */
  26.631 -	.long SYMBOL_NAME(sys_vhangup)
  26.632 -	.long SYMBOL_NAME(sys_ni_syscall)	/* old "idle" system call */
  26.633 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  26.634 -	.long SYMBOL_NAME(sys_wait4)
  26.635 -	.long SYMBOL_NAME(sys_swapoff)		/* 115 */
  26.636 -	.long SYMBOL_NAME(sys_sysinfo)
  26.637 -	.long SYMBOL_NAME(sys_ipc)
  26.638 -	.long SYMBOL_NAME(sys_fsync)
  26.639 -	.long SYMBOL_NAME(sys_sigreturn)
  26.640 -	.long SYMBOL_NAME(sys_clone)		/* 120 */
  26.641 -	.long SYMBOL_NAME(sys_setdomainname)
  26.642 -	.long SYMBOL_NAME(sys_newuname)
  26.643 -	.long SYMBOL_NAME(sys_modify_ldt)
  26.644 -	.long SYMBOL_NAME(sys_adjtimex)
  26.645 -	.long SYMBOL_NAME(sys_mprotect)		/* 125 */
  26.646 -	.long SYMBOL_NAME(sys_sigprocmask)
  26.647 -	.long SYMBOL_NAME(sys_create_module)
  26.648 -	.long SYMBOL_NAME(sys_init_module)
  26.649 -	.long SYMBOL_NAME(sys_delete_module)
  26.650 -	.long SYMBOL_NAME(sys_get_kernel_syms)	/* 130 */
  26.651 -	.long SYMBOL_NAME(sys_quotactl)
  26.652 -	.long SYMBOL_NAME(sys_getpgid)
  26.653 -	.long SYMBOL_NAME(sys_fchdir)
  26.654 -	.long SYMBOL_NAME(sys_bdflush)
  26.655 -	.long SYMBOL_NAME(sys_sysfs)		/* 135 */
  26.656 -	.long SYMBOL_NAME(sys_personality)
  26.657 -	.long SYMBOL_NAME(sys_ni_syscall)	/* for afs_syscall */
  26.658 -	.long SYMBOL_NAME(sys_setfsuid16)
  26.659 -	.long SYMBOL_NAME(sys_setfsgid16)
  26.660 -	.long SYMBOL_NAME(sys_llseek)		/* 140 */
  26.661 -	.long SYMBOL_NAME(sys_getdents)
  26.662 -	.long SYMBOL_NAME(sys_select)
  26.663 -	.long SYMBOL_NAME(sys_flock)
  26.664 -	.long SYMBOL_NAME(sys_msync)
  26.665 -	.long SYMBOL_NAME(sys_readv)		/* 145 */
  26.666 -	.long SYMBOL_NAME(sys_writev)
  26.667 -	.long SYMBOL_NAME(sys_getsid)
  26.668 -	.long SYMBOL_NAME(sys_fdatasync)
  26.669 -	.long SYMBOL_NAME(sys_sysctl)
  26.670 -	.long SYMBOL_NAME(sys_mlock)		/* 150 */
  26.671 -	.long SYMBOL_NAME(sys_munlock)
  26.672 -	.long SYMBOL_NAME(sys_mlockall)
  26.673 -	.long SYMBOL_NAME(sys_munlockall)
  26.674 -	.long SYMBOL_NAME(sys_sched_setparam)
  26.675 -	.long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
  26.676 -	.long SYMBOL_NAME(sys_sched_setscheduler)
  26.677 -	.long SYMBOL_NAME(sys_sched_getscheduler)
  26.678 -	.long SYMBOL_NAME(sys_sched_yield)
  26.679 -	.long SYMBOL_NAME(sys_sched_get_priority_max)
  26.680 -	.long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
  26.681 -	.long SYMBOL_NAME(sys_sched_rr_get_interval)
  26.682 -	.long SYMBOL_NAME(sys_nanosleep)
  26.683 -	.long SYMBOL_NAME(sys_mremap)
  26.684 -	.long SYMBOL_NAME(sys_setresuid16)
  26.685 -	.long SYMBOL_NAME(sys_getresuid16)	/* 165 */
  26.686 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  26.687 -	.long SYMBOL_NAME(sys_query_module)
  26.688 -	.long SYMBOL_NAME(sys_poll)
  26.689 -	.long SYMBOL_NAME(sys_nfsservctl)
  26.690 -	.long SYMBOL_NAME(sys_setresgid16)	/* 170 */
  26.691 -	.long SYMBOL_NAME(sys_getresgid16)
  26.692 -	.long SYMBOL_NAME(sys_prctl)
  26.693 -	.long SYMBOL_NAME(sys_rt_sigreturn)
  26.694 -	.long SYMBOL_NAME(sys_rt_sigaction)
  26.695 -	.long SYMBOL_NAME(sys_rt_sigprocmask)	/* 175 */
  26.696 -	.long SYMBOL_NAME(sys_rt_sigpending)
  26.697 -	.long SYMBOL_NAME(sys_rt_sigtimedwait)
  26.698 -	.long SYMBOL_NAME(sys_rt_sigqueueinfo)
  26.699 -	.long SYMBOL_NAME(sys_rt_sigsuspend)
  26.700 -	.long SYMBOL_NAME(sys_pread)		/* 180 */
  26.701 -	.long SYMBOL_NAME(sys_pwrite)
  26.702 -	.long SYMBOL_NAME(sys_chown16)
  26.703 -	.long SYMBOL_NAME(sys_getcwd)
  26.704 -	.long SYMBOL_NAME(sys_capget)
  26.705 -	.long SYMBOL_NAME(sys_capset)           /* 185 */
  26.706 -	.long SYMBOL_NAME(sys_sigaltstack)
  26.707 -	.long SYMBOL_NAME(sys_sendfile)
  26.708 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams1 */
  26.709 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams2 */
  26.710 -	.long SYMBOL_NAME(sys_vfork)            /* 190 */
  26.711 -	.long SYMBOL_NAME(sys_getrlimit)
  26.712 -	.long SYMBOL_NAME(sys_mmap2)
  26.713 -	.long SYMBOL_NAME(sys_truncate64)
  26.714 -	.long SYMBOL_NAME(sys_ftruncate64)
  26.715 -	.long SYMBOL_NAME(sys_stat64)		/* 195 */
  26.716 -	.long SYMBOL_NAME(sys_lstat64)
  26.717 -	.long SYMBOL_NAME(sys_fstat64)
  26.718 -	.long SYMBOL_NAME(sys_lchown)
  26.719 -	.long SYMBOL_NAME(sys_getuid)
  26.720 -	.long SYMBOL_NAME(sys_getgid)		/* 200 */
  26.721 -	.long SYMBOL_NAME(sys_geteuid)
  26.722 -	.long SYMBOL_NAME(sys_getegid)
  26.723 -	.long SYMBOL_NAME(sys_setreuid)
  26.724 -	.long SYMBOL_NAME(sys_setregid)
  26.725 -	.long SYMBOL_NAME(sys_getgroups)	/* 205 */
  26.726 -	.long SYMBOL_NAME(sys_setgroups)
  26.727 -	.long SYMBOL_NAME(sys_fchown)
  26.728 -	.long SYMBOL_NAME(sys_setresuid)
  26.729 -	.long SYMBOL_NAME(sys_getresuid)
  26.730 -	.long SYMBOL_NAME(sys_setresgid)	/* 210 */
  26.731 -	.long SYMBOL_NAME(sys_getresgid)
  26.732 -	.long SYMBOL_NAME(sys_chown)
  26.733 -	.long SYMBOL_NAME(sys_setuid)
  26.734 -	.long SYMBOL_NAME(sys_setgid)
  26.735 -	.long SYMBOL_NAME(sys_setfsuid)		/* 215 */
  26.736 -	.long SYMBOL_NAME(sys_setfsgid)
  26.737 -	.long SYMBOL_NAME(sys_pivot_root)
  26.738 -	.long SYMBOL_NAME(sys_mincore)
  26.739 -	.long SYMBOL_NAME(sys_madvise)
  26.740 -	.long SYMBOL_NAME(sys_getdents64)	/* 220 */
  26.741 -	.long SYMBOL_NAME(sys_fcntl64)
  26.742 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for TUX */
  26.743 -	.long SYMBOL_NAME(sys_ni_syscall)	/* Reserved for Security */
  26.744 -	.long SYMBOL_NAME(sys_gettid)
  26.745 -	.long SYMBOL_NAME(sys_readahead)	/* 225 */
  26.746 -	.long SYMBOL_NAME(sys_setxattr)
  26.747 -	.long SYMBOL_NAME(sys_lsetxattr)
  26.748 -	.long SYMBOL_NAME(sys_fsetxattr)
  26.749 -	.long SYMBOL_NAME(sys_getxattr)
  26.750 -	.long SYMBOL_NAME(sys_lgetxattr)	/* 230 */
  26.751 -	.long SYMBOL_NAME(sys_fgetxattr)
  26.752 -	.long SYMBOL_NAME(sys_listxattr)
  26.753 -	.long SYMBOL_NAME(sys_llistxattr)
  26.754 -	.long SYMBOL_NAME(sys_flistxattr)
  26.755 -	.long SYMBOL_NAME(sys_removexattr)	/* 235 */
  26.756 -	.long SYMBOL_NAME(sys_lremovexattr)
  26.757 -	.long SYMBOL_NAME(sys_fremovexattr)
  26.758 - 	.long SYMBOL_NAME(sys_tkill)
  26.759 -	.long SYMBOL_NAME(sys_sendfile64)
  26.760 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 240 reserved for futex */
  26.761 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_setaffinity */
  26.762 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_getaffinity */
  26.763 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_thread_area */
  26.764 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_get_thread_area */
  26.765 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 245 sys_io_setup */
  26.766 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_destroy */
  26.767 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_getevents */
  26.768 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_submit */
  26.769 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_cancel */
  26.770 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 250 sys_alloc_hugepages */
  26.771 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_free_hugepages */
  26.772 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_exit_group */
  26.773 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_lookup_dcookie */
  26.774 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_create */
  26.775 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_ctl 255 */
  26.776 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_wait */
  26.777 - 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_remap_file_pages */
  26.778 - 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_tid_address */
  26.779 -
  26.780 -	.rept NR_syscalls-(.-sys_call_table)/4
  26.781 -		.long SYMBOL_NAME(sys_ni_syscall)
  26.782 -	.endr
    27.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/head.S	Fri Oct 07 23:22:35 2005 +0100
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,41 +0,0 @@
    27.4 -
    27.5 -.section __xen_guest
    27.6 -    .ascii "GUEST_OS=linux,GUEST_VER=2.4,XEN_VER=3.0,VIRT_BASE=0xC0000000"
    27.7 -    .ascii ",LOADER=generic"
    27.8 -    .byte  0
    27.9 -
   27.10 -.text
   27.11 -#include <linux/config.h>
   27.12 -#include <linux/threads.h>
   27.13 -#include <linux/linkage.h>
   27.14 -#include <asm/segment.h>
   27.15 -#include <asm/page.h>
   27.16 -#include <asm/pgtable.h>
   27.17 -#include <asm/desc.h>
   27.18 -
   27.19 -ENTRY(stext)
   27.20 -ENTRY(_stext)
   27.21 -        cld
   27.22 -        lss stack_start,%esp
   27.23 -        /* Copy the necessary stuff from xen_start_info structure. */
   27.24 -        mov $SYMBOL_NAME(xen_start_info_union),%edi
   27.25 -        mov $128,%ecx
   27.26 -        rep movsl
   27.27 -        jmp SYMBOL_NAME(start_kernel)
   27.28 -
   27.29 -ENTRY(stack_start)
   27.30 -	.long SYMBOL_NAME(init_task_union)+8192, __KERNEL_DS
   27.31 -
   27.32 -.org 0x1000
   27.33 -ENTRY(empty_zero_page)
   27.34 -
   27.35 -.org 0x2000
   27.36 -ENTRY(default_ldt)
   27.37 -
   27.38 -.org 0x3000
   27.39 -ENTRY(cpu0_pte_quicklist)
   27.40 -
   27.41 -.org 0x3400
   27.42 -ENTRY(cpu0_pgd_quicklist)
   27.43 -        
   27.44 -.org 0x3800
    28.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/i386_ksyms.c	Fri Oct 07 23:22:35 2005 +0100
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,180 +0,0 @@
    28.4 -#include <linux/config.h>
    28.5 -#include <linux/module.h>
    28.6 -#include <linux/smp.h>
    28.7 -#include <linux/user.h>
    28.8 -#include <linux/elfcore.h>
    28.9 -#include <linux/mca.h>
   28.10 -#include <linux/sched.h>
   28.11 -#include <linux/in6.h>
   28.12 -#include <linux/interrupt.h>
   28.13 -#include <linux/smp_lock.h>
   28.14 -#include <linux/pm.h>
   28.15 -#include <linux/pci.h>
   28.16 -#include <linux/apm_bios.h>
   28.17 -#include <linux/kernel.h>
   28.18 -#include <linux/string.h>
   28.19 -#include <linux/tty.h>
   28.20 -
   28.21 -#include <asm/semaphore.h>
   28.22 -#include <asm/processor.h>
   28.23 -#include <asm/i387.h>
   28.24 -#include <asm/uaccess.h>
   28.25 -#include <asm/checksum.h>
   28.26 -#include <asm/io.h>
   28.27 -#include <asm/hardirq.h>
   28.28 -#include <asm/delay.h>
   28.29 -#include <asm/irq.h>
   28.30 -#include <asm/mmx.h>
   28.31 -#include <asm/desc.h>
   28.32 -#include <asm/pgtable.h>
   28.33 -#include <asm/pgalloc.h>
   28.34 -
   28.35 -extern void dump_thread(struct pt_regs *, struct user *);
   28.36 -extern spinlock_t rtc_lock;
   28.37 -
   28.38 -#if defined(CONFIG_APMXXX) || defined(CONFIG_APM_MODULEXXX)
   28.39 -extern void machine_real_restart(unsigned char *, int);
   28.40 -EXPORT_SYMBOL(machine_real_restart);
   28.41 -extern void default_idle(void);
   28.42 -EXPORT_SYMBOL(default_idle);
   28.43 -#endif
   28.44 -
   28.45 -#ifdef CONFIG_SMP
   28.46 -extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
   28.47 -extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
   28.48 -#endif
   28.49 -
   28.50 -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
   28.51 -extern struct drive_info_struct drive_info;
   28.52 -EXPORT_SYMBOL(drive_info);
   28.53 -#endif
   28.54 -
   28.55 -// XXX extern unsigned long get_cmos_time(void);
   28.56 -
   28.57 -/* platform dependent support */
   28.58 -EXPORT_SYMBOL(boot_cpu_data);
   28.59 -EXPORT_SYMBOL(dump_thread);
   28.60 -EXPORT_SYMBOL(dump_fpu);
   28.61 -EXPORT_SYMBOL(dump_extended_fpu);
   28.62 -EXPORT_SYMBOL(__ioremap);
   28.63 -EXPORT_SYMBOL(iounmap);
   28.64 -EXPORT_SYMBOL(enable_irq);
   28.65 -EXPORT_SYMBOL(disable_irq);
   28.66 -EXPORT_SYMBOL(disable_irq_nosync);
   28.67 -EXPORT_SYMBOL(probe_irq_mask);
   28.68 -EXPORT_SYMBOL(kernel_thread);
   28.69 -EXPORT_SYMBOL(pm_idle);
   28.70 -EXPORT_SYMBOL(pm_power_off);
   28.71 -EXPORT_SYMBOL(apm_info);
   28.72 -//EXPORT_SYMBOL(gdt);
   28.73 -EXPORT_SYMBOL(empty_zero_page);
   28.74 -EXPORT_SYMBOL(phys_to_machine_mapping);
   28.75 -
   28.76 -
   28.77 -#ifdef CONFIG_DEBUG_IOVIRT
   28.78 -EXPORT_SYMBOL(__io_virt_debug);
   28.79 -#endif
   28.80 -
   28.81 -EXPORT_SYMBOL_NOVERS(__down_failed);
   28.82 -EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
   28.83 -EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
   28.84 -EXPORT_SYMBOL_NOVERS(__up_wakeup);
   28.85 -/* Networking helper routines. */
   28.86 -EXPORT_SYMBOL(csum_partial_copy_generic);
   28.87 -/* Delay loops */
   28.88 -EXPORT_SYMBOL(__ndelay);
   28.89 -EXPORT_SYMBOL(__udelay);
   28.90 -EXPORT_SYMBOL(__delay);
   28.91 -EXPORT_SYMBOL(__const_udelay);
   28.92 -
   28.93 -EXPORT_SYMBOL_NOVERS(__get_user_1);
   28.94 -EXPORT_SYMBOL_NOVERS(__get_user_2);
   28.95 -EXPORT_SYMBOL_NOVERS(__get_user_4);
   28.96 -
   28.97 -EXPORT_SYMBOL(strtok);
   28.98 -EXPORT_SYMBOL(strpbrk);
   28.99 -EXPORT_SYMBOL(strstr);
  28.100 -
  28.101 -EXPORT_SYMBOL(strncpy_from_user);
  28.102 -EXPORT_SYMBOL(__strncpy_from_user);
  28.103 -EXPORT_SYMBOL(clear_user);
  28.104 -EXPORT_SYMBOL(__clear_user);
  28.105 -EXPORT_SYMBOL(__generic_copy_from_user);
  28.106 -EXPORT_SYMBOL(__generic_copy_to_user);
  28.107 -EXPORT_SYMBOL(strnlen_user);
  28.108 -
  28.109 -
  28.110 -EXPORT_SYMBOL(pci_alloc_consistent);
  28.111 -EXPORT_SYMBOL(pci_free_consistent);
  28.112 -
  28.113 -#ifdef CONFIG_PCI
  28.114 -EXPORT_SYMBOL(pcibios_penalize_isa_irq);
  28.115 -EXPORT_SYMBOL(pci_mem_start);
  28.116 -#endif
  28.117 -
  28.118 -
  28.119 -#ifdef CONFIG_X86_USE_3DNOW
  28.120 -EXPORT_SYMBOL(_mmx_memcpy);
  28.121 -EXPORT_SYMBOL(mmx_clear_page);
  28.122 -EXPORT_SYMBOL(mmx_copy_page);
  28.123 -#endif
  28.124 -
  28.125 -#ifdef CONFIG_SMP
  28.126 -EXPORT_SYMBOL(cpu_data);
  28.127 -EXPORT_SYMBOL(kernel_flag_cacheline);
  28.128 -EXPORT_SYMBOL(smp_num_cpus);
  28.129 -EXPORT_SYMBOL(cpu_online_map);
  28.130 -EXPORT_SYMBOL_NOVERS(__write_lock_failed);
  28.131 -EXPORT_SYMBOL_NOVERS(__read_lock_failed);
  28.132 -
  28.133 -/* Global SMP irq stuff */
  28.134 -EXPORT_SYMBOL(synchronize_irq);
  28.135 -EXPORT_SYMBOL(global_irq_holder);
  28.136 -EXPORT_SYMBOL(__global_cli);
  28.137 -EXPORT_SYMBOL(__global_sti);
  28.138 -EXPORT_SYMBOL(__global_save_flags);
  28.139 -EXPORT_SYMBOL(__global_restore_flags);
  28.140 -EXPORT_SYMBOL(smp_call_function);
  28.141 -
  28.142 -/* TLB flushing */
  28.143 -EXPORT_SYMBOL(flush_tlb_page);
  28.144 -
  28.145 -/* HT support */
  28.146 -EXPORT_SYMBOL(smp_num_siblings);
  28.147 -EXPORT_SYMBOL(cpu_sibling_map);
  28.148 -#endif
  28.149 -
  28.150 -#ifdef CONFIG_X86_IO_APIC
  28.151 -EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
  28.152 -#endif
  28.153 -
  28.154 -#ifdef CONFIG_VT
  28.155 -EXPORT_SYMBOL(screen_info);
  28.156 -#endif
  28.157 -
  28.158 -EXPORT_SYMBOL(get_wchan);
  28.159 -
  28.160 -EXPORT_SYMBOL(rtc_lock);
  28.161 -
  28.162 -#undef memcpy
  28.163 -#undef memset
  28.164 -extern void * memset(void *,int,__kernel_size_t);
  28.165 -extern void * memcpy(void *,const void *,__kernel_size_t);
  28.166 -EXPORT_SYMBOL_NOVERS(memcpy);
  28.167 -EXPORT_SYMBOL_NOVERS(memset);
  28.168 -
  28.169 -#ifdef CONFIG_HAVE_DEC_LOCK
  28.170 -EXPORT_SYMBOL(atomic_dec_and_lock);
  28.171 -#endif
  28.172 -
  28.173 -#ifdef CONFIG_MULTIQUAD
  28.174 -EXPORT_SYMBOL(xquad_portio);
  28.175 -#endif
  28.176 -
  28.177 -#include <asm/xen_proc.h>
  28.178 -EXPORT_SYMBOL(create_xen_proc_entry);
  28.179 -EXPORT_SYMBOL(remove_xen_proc_entry);
  28.180 -
  28.181 -EXPORT_SYMBOL(evtchn_do_upcall);
  28.182 -EXPORT_SYMBOL(force_evtchn_callback);
  28.183 -EXPORT_SYMBOL(HYPERVISOR_shared_info);
    29.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/irq.c	Fri Oct 07 23:22:35 2005 +0100
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,1242 +0,0 @@
    29.4 -/*
    29.5 - *	linux/arch/i386/kernel/irq.c
    29.6 - *
    29.7 - *	Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
    29.8 - *
    29.9 - * This file contains the code used by various IRQ handling routines:
   29.10 - * asking for different IRQ's should be done through these routines
   29.11 - * instead of just grabbing them. Thus setups with different IRQ numbers
   29.12 - * shouldn't result in any weird surprises, and installing new handlers
   29.13 - * should be easier.
   29.14 - */
   29.15 -
   29.16 -/*
   29.17 - * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
   29.18 - *
   29.19 - * IRQs are in fact implemented a bit like signal handlers for the kernel.
   29.20 - * Naturally it's not a 1:1 relation, but there are similarities.
   29.21 - */
   29.22 -
   29.23 -#include <linux/config.h>
   29.24 -#include <linux/ptrace.h>
   29.25 -#include <linux/errno.h>
   29.26 -#include <linux/signal.h>
   29.27 -#include <linux/sched.h>
   29.28 -#include <linux/ioport.h>
   29.29 -#include <linux/interrupt.h>
   29.30 -#include <linux/timex.h>
   29.31 -#include <linux/slab.h>
   29.32 -#include <linux/random.h>
   29.33 -#include <linux/smp_lock.h>
   29.34 -#include <linux/init.h>
   29.35 -#include <linux/kernel_stat.h>
   29.36 -#include <linux/irq.h>
   29.37 -#include <linux/proc_fs.h>
   29.38 -#include <linux/seq_file.h>
   29.39 -
   29.40 -#include <asm/atomic.h>
   29.41 -#include <asm/io.h>
   29.42 -#include <asm/smp.h>
   29.43 -#include <asm/system.h>
   29.44 -#include <asm/bitops.h>
   29.45 -#include <asm/uaccess.h>
   29.46 -#include <asm/pgalloc.h>
   29.47 -#include <asm/delay.h>
   29.48 -#include <asm/desc.h>
   29.49 -#include <asm/irq.h>
   29.50 -
   29.51 -
   29.52 -
   29.53 -/*
   29.54 - * Linux has a controller-independent x86 interrupt architecture.
   29.55 - * every controller has a 'controller-template', that is used
   29.56 - * by the main code to do the right thing. Each driver-visible
   29.57 - * interrupt source is transparently wired to the apropriate
   29.58 - * controller. Thus drivers need not be aware of the
   29.59 - * interrupt-controller.
   29.60 - *
   29.61 - * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC,
   29.62 - * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC.
   29.63 - * (IO-APICs assumed to be messaging to Pentium local-APICs)
   29.64 - *
   29.65 - * the code is designed to be easily extended with new/different
   29.66 - * interrupt controllers, without having to do assembly magic.
   29.67 - */
   29.68 -
   29.69 -/*
   29.70 - * Controller mappings for all interrupt sources:
   29.71 - */
   29.72 -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
   29.73 -	{ [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}};
   29.74 -
   29.75 -static void register_irq_proc (unsigned int irq);
   29.76 -
   29.77 -/*
   29.78 - * Special irq handlers.
   29.79 - */
   29.80 -
   29.81 -void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
   29.82 -
   29.83 -/*
   29.84 - * Generic no controller code
   29.85 - */
   29.86 -
   29.87 -static void enable_none(unsigned int irq) { }
   29.88 -static unsigned int startup_none(unsigned int irq) { return 0; }
   29.89 -static void disable_none(unsigned int irq) { }
   29.90 -static void ack_none(unsigned int irq)
   29.91 -{
   29.92 -/*
   29.93 - * 'what should we do if we get a hw irq event on an illegal vector'.
   29.94 - * each architecture has to answer this themselves, it doesnt deserve
   29.95 - * a generic callback i think.
   29.96 - */
   29.97 -#if CONFIG_X86
   29.98 -	printk("unexpected IRQ trap at vector %02x\n", irq);
   29.99 -#ifdef CONFIG_X86_LOCAL_APIC
  29.100 -	/*
  29.101 -	 * Currently unexpected vectors happen only on SMP and APIC.
  29.102 -	 * We _must_ ack these because every local APIC has only N
  29.103 -	 * irq slots per priority level, and a 'hanging, unacked' IRQ
  29.104 -	 * holds up an irq slot - in excessive cases (when multiple
  29.105 -	 * unexpected vectors occur) that might lock up the APIC
  29.106 -	 * completely.
  29.107 -	 */
  29.108 -	ack_APIC_irq();
  29.109 -#endif
  29.110 -#endif
  29.111 -}
  29.112 -
  29.113 -/* startup is the same as "enable", shutdown is same as "disable" */
  29.114 -#define shutdown_none	disable_none
  29.115 -#define end_none	enable_none
  29.116 -
  29.117 -struct hw_interrupt_type no_irq_type = {
  29.118 -	"none",
  29.119 -	startup_none,
  29.120 -	shutdown_none,
  29.121 -	enable_none,
  29.122 -	disable_none,
  29.123 -	ack_none,
  29.124 -	end_none
  29.125 -};
  29.126 -
  29.127 -atomic_t irq_err_count;
  29.128 -#ifdef CONFIG_X86_IO_APIC
  29.129 -#ifdef APIC_MISMATCH_DEBUG
  29.130 -atomic_t irq_mis_count;
  29.131 -#endif
  29.132 -#endif
  29.133 -
  29.134 -/*
  29.135 - * Generic, controller-independent functions:
  29.136 - */
  29.137 -
  29.138 -int show_interrupts(struct seq_file *p, void *v)
  29.139 -{
  29.140 -	int i, j;
  29.141 -	struct irqaction * action;
  29.142 -
  29.143 -	seq_printf(p, "           ");
  29.144 -	for (j=0; j<smp_num_cpus; j++)
  29.145 -		seq_printf(p, "CPU%d       ",j);
  29.146 -	seq_putc(p,'\n');
  29.147 -
  29.148 -	for (i = 0 ; i < NR_IRQS ; i++) {
  29.149 -		action = irq_desc[i].action;
  29.150 -		if (!action) 
  29.151 -			continue;
  29.152 -		seq_printf(p, "%3d: ",i);
  29.153 -#ifndef CONFIG_SMP
  29.154 -		seq_printf(p, "%10u ", kstat_irqs(i));
  29.155 -#else
  29.156 -		for (j = 0; j < smp_num_cpus; j++)
  29.157 -			seq_printf(p, "%10u ",
  29.158 -				kstat.irqs[cpu_logical_map(j)][i]);
  29.159 -#endif
  29.160 -		seq_printf(p, " %14s", irq_desc[i].handler->typename);
  29.161 -		seq_printf(p, "  %s", action->name);
  29.162 -
  29.163 -		for (action=action->next; action; action = action->next)
  29.164 -			seq_printf(p, ", %s", action->name);
  29.165 -		seq_putc(p,'\n');
  29.166 -	}
  29.167 -	seq_printf(p, "NMI: ");
  29.168 -	for (j = 0; j < smp_num_cpus; j++)
  29.169 -		seq_printf(p, "%10u ",
  29.170 -			nmi_count(cpu_logical_map(j)));
  29.171 -	seq_printf(p, "\n");
  29.172 -#if CONFIG_X86_LOCAL_APIC
  29.173 -	seq_printf(p, "LOC: ");
  29.174 -	for (j = 0; j < smp_num_cpus; j++)
  29.175 -		seq_printf(p, "%10u ",
  29.176 -			apic_timer_irqs[cpu_logical_map(j)]);
  29.177 -	seq_printf(p, "\n");
  29.178 -#endif
  29.179 -	seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
  29.180 -#ifdef CONFIG_X86_IO_APIC
  29.181 -#ifdef APIC_MISMATCH_DEBUG
  29.182 -	seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
  29.183 -#endif
  29.184 -#endif
  29.185 -
  29.186 -	return 0;
  29.187 -}
  29.188 -
  29.189 -
  29.190 -/*
  29.191 - * Global interrupt locks for SMP. Allow interrupts to come in on any
  29.192 - * CPU, yet make cli/sti act globally to protect critical regions..
  29.193 - */
  29.194 -
  29.195 -#ifdef CONFIG_SMP
  29.196 -unsigned char global_irq_holder = NO_PROC_ID;
  29.197 -unsigned volatile long global_irq_lock; /* pendantic: long for set_bit --RR */
  29.198 -
  29.199 -extern void show_stack(unsigned long* esp);
  29.200 -
  29.201 -static void show(char * str)
  29.202 -{
  29.203 -	int i;
  29.204 -	int cpu = smp_processor_id();
  29.205 -
  29.206 -	printk("\n%s, CPU %d:\n", str, cpu);
  29.207 -	printk("irq:  %d [",irqs_running());
  29.208 -	for(i=0;i < smp_num_cpus;i++)
  29.209 -		printk(" %d",local_irq_count(i));
  29.210 -	printk(" ]\nbh:   %d [",spin_is_locked(&global_bh_lock) ? 1 : 0);
  29.211 -	for(i=0;i < smp_num_cpus;i++)
  29.212 -		printk(" %d",local_bh_count(i));
  29.213 -
  29.214 -	printk(" ]\nStack dumps:");
  29.215 -	for(i = 0; i < smp_num_cpus; i++) {
  29.216 -		unsigned long esp;
  29.217 -		if (i == cpu)
  29.218 -			continue;
  29.219 -		printk("\nCPU %d:",i);
  29.220 -		esp = init_tss[i].esp0;
  29.221 -		if (!esp) {
  29.222 -			/* tss->esp0 is set to NULL in cpu_init(),
  29.223 -			 * it's initialized when the cpu returns to user
  29.224 -			 * space. -- manfreds
  29.225 -			 */
  29.226 -			printk(" <unknown> ");
  29.227 -			continue;
  29.228 -		}
  29.229 -		esp &= ~(THREAD_SIZE-1);
  29.230 -		esp += sizeof(struct task_struct);
  29.231 -		show_stack((void*)esp);
  29.232 - 	}
  29.233 -	printk("\nCPU %d:",cpu);
  29.234 -	show_stack(NULL);
  29.235 -	printk("\n");
  29.236 -}
  29.237 -	
  29.238 -#define MAXCOUNT 100000000
  29.239 -
  29.240 -/*
  29.241 - * I had a lockup scenario where a tight loop doing
  29.242 - * spin_unlock()/spin_lock() on CPU#1 was racing with
  29.243 - * spin_lock() on CPU#0. CPU#0 should have noticed spin_unlock(), but
  29.244 - * apparently the spin_unlock() information did not make it
  29.245 - * through to CPU#0 ... nasty, is this by design, do we have to limit
  29.246 - * 'memory update oscillation frequency' artificially like here?
  29.247 - *
  29.248 - * Such 'high frequency update' races can be avoided by careful design, but
  29.249 - * some of our major constructs like spinlocks use similar techniques,
  29.250 - * it would be nice to clarify this issue. Set this define to 0 if you
  29.251 - * want to check whether your system freezes.  I suspect the delay done
  29.252 - * by SYNC_OTHER_CORES() is in correlation with 'snooping latency', but
  29.253 - * i thought that such things are guaranteed by design, since we use
  29.254 - * the 'LOCK' prefix.
  29.255 - */
  29.256 -#define SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND 0
  29.257 -
  29.258 -#if SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND
  29.259 -# define SYNC_OTHER_CORES(x) udelay(x+1)
  29.260 -#else
  29.261 -/*
  29.262 - * We have to allow irqs to arrive between __sti and __cli
  29.263 - */
  29.264 -# define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop")
  29.265 -#endif
  29.266 -
  29.267 -static inline void wait_on_irq(int cpu)
  29.268 -{
  29.269 -	int count = MAXCOUNT;
  29.270 -
  29.271 -	for (;;) {
  29.272 -
  29.273 -		/*
  29.274 -		 * Wait until all interrupts are gone. Wait
  29.275 -		 * for bottom half handlers unless we're
  29.276 -		 * already executing in one..
  29.277 -		 */
  29.278 -		if (!irqs_running())
  29.279 -			if (local_bh_count(cpu) || !spin_is_locked(&global_bh_lock))
  29.280 -				break;
  29.281 -
  29.282 -		/* Duh, we have to loop. Release the lock to avoid deadlocks */
  29.283 -		clear_bit(0,&global_irq_lock);
  29.284 -
  29.285 -		for (;;) {
  29.286 -			if (!--count) {
  29.287 -				show("wait_on_irq");
  29.288 -				count = ~0;
  29.289 -			}
  29.290 -			__sti();
  29.291 -			SYNC_OTHER_CORES(cpu);
  29.292 -			__cli();
  29.293 -			if (irqs_running())
  29.294 -				continue;
  29.295 -			if (global_irq_lock)
  29.296 -				continue;
  29.297 -			if (!local_bh_count(cpu) && spin_is_locked(&global_bh_lock))
  29.298 -				continue;
  29.299 -			if (!test_and_set_bit(0,&global_irq_lock))
  29.300 -				break;
  29.301 -		}
  29.302 -	}
  29.303 -}
  29.304 -
  29.305 -/*
  29.306 - * This is called when we want to synchronize with
  29.307 - * interrupts. We may for example tell a device to
  29.308 - * stop sending interrupts: but to make sure there
  29.309 - * are no interrupts that are executing on another
  29.310 - * CPU we need to call this function.
  29.311 - */
  29.312 -void synchronize_irq(void)
  29.313 -{
  29.314 -	if (irqs_running()) {
  29.315 -		/* Stupid approach */
  29.316 -		cli();
  29.317 -		sti();
  29.318 -	}
  29.319 -}
  29.320 -
  29.321 -static inline void get_irqlock(int cpu)
  29.322 -{
  29.323 -	if (test_and_set_bit(0,&global_irq_lock)) {
  29.324 -		/* do we already hold the lock? */
  29.325 -		if ((unsigned char) cpu == global_irq_holder)
  29.326 -			return;
  29.327 -		/* Uhhuh.. Somebody else got it. Wait.. */
  29.328 -		do {
  29.329 -			do {
  29.330 -				rep_nop();
  29.331 -			} while (test_bit(0,&global_irq_lock));
  29.332 -		} while (test_and_set_bit(0,&global_irq_lock));		
  29.333 -	}
  29.334 -	/* 
  29.335 -	 * We also to make sure that nobody else is running
  29.336 -	 * in an interrupt context. 
  29.337 -	 */
  29.338 -	wait_on_irq(cpu);
  29.339 -
  29.340 -	/*
  29.341 -	 * Ok, finally..
  29.342 -	 */
  29.343 -	global_irq_holder = cpu;
  29.344 -}
  29.345 -
  29.346 -/*
  29.347 - * A global "cli()" while in an interrupt context
  29.348 - * turns into just a local cli(). Interrupts
  29.349 - * should use spinlocks for the (very unlikely)
  29.350 - * case that they ever want to protect against
  29.351 - * each other.
  29.352 - *
  29.353 - * If we already have local interrupts disabled,
  29.354 - * this will not turn a local disable into a
  29.355 - * global one (problems with spinlocks: this makes
  29.356 - * save_flags+cli+sti usable inside a spinlock).
  29.357 - */
  29.358 -void __global_cli(void)
  29.359 -{
  29.360 -	unsigned int flags;
  29.361 -
  29.362 -	__save_flags(flags);
  29.363 -	if (!flags) {
  29.364 -		int cpu = smp_processor_id();
  29.365 -		__cli();
  29.366 -		if (!local_irq_count(cpu))
  29.367 -			get_irqlock(cpu);
  29.368 -	}
  29.369 -}
  29.370 -
  29.371 -void __global_sti(void)
  29.372 -{
  29.373 -	int cpu = smp_processor_id();
  29.374 -
  29.375 -	if (!local_irq_count(cpu))
  29.376 -		release_irqlock(cpu);
  29.377 -	__sti();
  29.378 -}
  29.379 -
  29.380 -/*
  29.381 - * SMP flags value to restore to:
  29.382 - * 0 - global cli
  29.383 - * 1 - global sti
  29.384 - * 2 - local cli
  29.385 - * 3 - local sti
  29.386 - */
  29.387 -unsigned long __global_save_flags(void)
  29.388 -{
  29.389 -	int retval;
  29.390 -	int local_enabled;
  29.391 -	unsigned long flags;
  29.392 -	int cpu = smp_processor_id();
  29.393 -
  29.394 -	__save_flags(flags);
  29.395 -	local_enabled = !flags;
  29.396 -	/* default to local */
  29.397 -	retval = 2 + local_enabled;
  29.398 -
  29.399 -	/* check for global flags if we're not in an interrupt */
  29.400 -	if (!local_irq_count(cpu)) {
  29.401 -		if (local_enabled)
  29.402 -			retval = 1;
  29.403 -		if (global_irq_holder == cpu)
  29.404 -			retval = 0;
  29.405 -	}
  29.406 -	return retval;
  29.407 -}
  29.408 -
  29.409 -void __global_restore_flags(unsigned long flags)
  29.410 -{
  29.411 -	switch (flags) {
  29.412 -	case 0:
  29.413 -		__global_cli();
  29.414 -		break;
  29.415 -	case 1:
  29.416 -		__global_sti();
  29.417 -		break;
  29.418 -	case 2:
  29.419 -		__cli();
  29.420 -		break;
  29.421 -	case 3:
  29.422 -		__sti();
  29.423 -		break;
  29.424 -	default:
  29.425 -		printk("global_restore_flags: %08lx (%08lx)\n",
  29.426 -			flags, (&flags)[-1]);
  29.427 -	}
  29.428 -}
  29.429 -
  29.430 -#endif
  29.431 -
  29.432 -/*
  29.433 - * This should really return information about whether
  29.434 - * we should do bottom half handling etc. Right now we
  29.435 - * end up _always_ checking the bottom half, which is a
  29.436 - * waste of time and is not what some drivers would
  29.437 - * prefer.
  29.438 - */
  29.439 -int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
  29.440 -{
  29.441 -	int status;
  29.442 -	int cpu = smp_processor_id();
  29.443 -
  29.444 -	irq_enter(cpu, irq);
  29.445 -
  29.446 -	status = 1;	/* Force the "do bottom halves" bit */
  29.447 -
  29.448 -	if (!(action->flags & SA_INTERRUPT))
  29.449 -		__sti();
  29.450 -
  29.451 -	do {
  29.452 -		status |= action->flags;
  29.453 -		action->handler(irq, action->dev_id, regs);
  29.454 -		action = action->next;
  29.455 -	} while (action);
  29.456 -	if (status & SA_SAMPLE_RANDOM)
  29.457 -		add_interrupt_randomness(irq);
  29.458 -	__cli();
  29.459 -
  29.460 -	irq_exit(cpu, irq);
  29.461 -
  29.462 -	return status;
  29.463 -}
  29.464 -
  29.465 -/*
  29.466 - * Generic enable/disable code: this just calls
  29.467 - * down into the PIC-specific version for the actual
  29.468 - * hardware disable after having gotten the irq
  29.469 - * controller lock. 
  29.470 - */
  29.471 - 
  29.472 -/**
  29.473 - *	disable_irq_nosync - disable an irq without waiting
  29.474 - *	@irq: Interrupt to disable
  29.475 - *
  29.476 - *	Disable the selected interrupt line.  Disables and Enables are
  29.477 - *	nested.
  29.478 - *	Unlike disable_irq(), this function does not ensure existing
  29.479 - *	instances of the IRQ handler have completed before returning.
  29.480 - *
  29.481 - *	This function may be called from IRQ context.
  29.482 - */
  29.483 - 
  29.484 -inline void disable_irq_nosync(unsigned int irq)
  29.485 -{
  29.486 -	irq_desc_t *desc = irq_desc + irq;
  29.487 -	unsigned long flags;
  29.488 -
  29.489 -	spin_lock_irqsave(&desc->lock, flags);
  29.490 -	if (!desc->depth++) {
  29.491 -		desc->status |= IRQ_DISABLED;
  29.492 -		desc->handler->disable(irq);
  29.493 -	}
  29.494 -	spin_unlock_irqrestore(&desc->lock, flags);
  29.495 -}
  29.496 -
  29.497 -/**
  29.498 - *	disable_irq - disable an irq and wait for completion
  29.499 - *	@irq: Interrupt to disable
  29.500 - *
  29.501 - *	Disable the selected interrupt line.  Enables and Disables are
  29.502 - *	nested.
  29.503 - *	This function waits for any pending IRQ handlers for this interrupt
  29.504 - *	to complete before returning. If you use this function while
  29.505 - *	holding a resource the IRQ handler may need you will deadlock.
  29.506 - *
  29.507 - *	This function may be called - with care - from IRQ context.
  29.508 - */
  29.509 - 
  29.510 -void disable_irq(unsigned int irq)
  29.511 -{
  29.512 -	disable_irq_nosync(irq);
  29.513 -
  29.514 -	if (!local_irq_count(smp_processor_id())) {
  29.515 -		do {
  29.516 -			barrier();
  29.517 -			cpu_relax();
  29.518 -		} while (irq_desc[irq].status & IRQ_INPROGRESS);
  29.519 -	}
  29.520 -}
  29.521 -
  29.522 -/**
  29.523 - *	enable_irq - enable handling of an irq
  29.524 - *	@irq: Interrupt to enable
  29.525 - *
  29.526 - *	Undoes the effect of one call to disable_irq().  If this
  29.527 - *	matches the last disable, processing of interrupts on this
  29.528 - *	IRQ line is re-enabled.
  29.529 - *
  29.530 - *	This function may be called from IRQ context.
  29.531 - */
  29.532 - 
  29.533 -void enable_irq(unsigned int irq)
  29.534 -{
  29.535 -	irq_desc_t *desc = irq_desc + irq;
  29.536 -	unsigned long flags;
  29.537 -
  29.538 -	spin_lock_irqsave(&desc->lock, flags);
  29.539 -	switch (desc->depth) {
  29.540 -	case 1: {
  29.541 -		unsigned int status = desc->status & ~IRQ_DISABLED;
  29.542 -		desc->status = status;
  29.543 -		if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
  29.544 -			desc->status = status | IRQ_REPLAY;
  29.545 -			hw_resend_irq(desc->handler,irq);
  29.546 -		}
  29.547 -		desc->handler->enable(irq);
  29.548 -		/* fall-through */
  29.549 -	}
  29.550 -	default:
  29.551 -		desc->depth--;
  29.552 -		break;
  29.553 -	case 0:
  29.554 -		printk("enable_irq(%u) unbalanced from %p\n", irq,
  29.555 -		       __builtin_return_address(0));
  29.556 -	}
  29.557 -	spin_unlock_irqrestore(&desc->lock, flags);
  29.558 -}
  29.559 -
  29.560 -/*
  29.561 - * do_IRQ handles all normal device IRQ's (the special
  29.562 - * SMP cross-CPU interrupts have their own specific
  29.563 - * handlers).
  29.564 - */
  29.565 -asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
  29.566 -{	
  29.567 -	/* 
  29.568 -	 * We ack quickly, we don't want the irq controller
  29.569 -	 * thinking we're snobs just because some other CPU has
  29.570 -	 * disabled global interrupts (we have already done the
  29.571 -	 * INT_ACK cycles, it's too late to try to pretend to the
  29.572 -	 * controller that we aren't taking the interrupt).
  29.573 -	 *
  29.574 -	 * 0 return value means that this irq is already being
  29.575 -	 * handled by some other CPU. (or is disabled)
  29.576 -	 */
  29.577 -	int irq = regs->orig_eax & 0xff; /* high bits used in ret_from_ code */
  29.578 -	int cpu = smp_processor_id();
  29.579 -	irq_desc_t *desc = irq_desc + irq;
  29.580 -	struct irqaction * action;
  29.581 -	unsigned int status;
  29.582 -#ifdef CONFIG_DEBUG_STACKOVERFLOW
  29.583 -	long esp;
  29.584 -
  29.585 -	/* Debugging check for stack overflow: is there less than 1KB free? */
  29.586 -	__asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : "0" (8191));
  29.587 -	if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
  29.588 -		extern void show_stack(unsigned long *);
  29.589 -
  29.590 -		printk("do_IRQ: stack overflow: %ld\n",
  29.591 -			esp - sizeof(struct task_struct));
  29.592 -		__asm__ __volatile__("movl %%esp,%0" : "=r" (esp));
  29.593 -		show_stack((void *)esp);
  29.594 -	}
  29.595 -#endif
  29.596 -
  29.597 -	kstat.irqs[cpu][irq]++;
  29.598 -	spin_lock(&desc->lock);
  29.599 -	desc->handler->ack(irq);
  29.600 -	/*
  29.601 -	   REPLAY is when Linux resends an IRQ that was dropped earlier
  29.602 -	   WAITING is used by probe to mark irqs that are being tested
  29.603 -	   */
  29.604 -	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
  29.605 -	status |= IRQ_PENDING; /* we _want_ to handle it */
  29.606 -
  29.607 -	/*
  29.608 -	 * If the IRQ is disabled for whatever reason, we cannot
  29.609 -	 * use the action we have.
  29.610 -	 */
  29.611 -	action = NULL;
  29.612 -	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
  29.613 -		action = desc->action;
  29.614 -		status &= ~IRQ_PENDING; /* we commit to handling */
  29.615 -		status |= IRQ_INPROGRESS; /* we are handling it */
  29.616 -	}
  29.617 -	desc->status = status;
  29.618 -
  29.619 -	/*
  29.620 -	 * If there is no IRQ handler or it was disabled, exit early.
  29.621 -	   Since we set PENDING, if another processor is handling
  29.622 -	   a different instance of this same irq, the other processor
  29.623 -	   will take care of it.
  29.624 -	 */
  29.625 -	if (!action)
  29.626 -		goto out;
  29.627 -
  29.628 -	/*
  29.629 -	 * Edge triggered interrupts need to remember
  29.630 -	 * pending events.
  29.631 -	 * This applies to any hw interrupts that allow a second
  29.632 -	 * instance of the same irq to arrive while we are in do_IRQ
  29.633 -	 * or in the handler. But the code here only handles the _second_
  29.634 -	 * instance of the irq, not the third or fourth. So it is mostly
  29.635 -	 * useful for irq hardware that does not mask cleanly in an
  29.636 -	 * SMP environment.
  29.637 -	 */
  29.638 -	for (;;) {
  29.639 -		spin_unlock(&desc->lock);
  29.640 -		handle_IRQ_event(irq, regs, action);
  29.641 -		spin_lock(&desc->lock);
  29.642 -		
  29.643 -		if (!(desc->status & IRQ_PENDING))
  29.644 -			break;
  29.645 -		desc->status &= ~IRQ_PENDING;
  29.646 -	}
  29.647 -	desc->status &= ~IRQ_INPROGRESS;
  29.648 -out:
  29.649 -	/*
  29.650 -	 * The ->end() handler has to deal with interrupts which got
  29.651 -	 * disabled while the handler was running.
  29.652 -	 */
  29.653 -	desc->handler->end(irq);
  29.654 -	spin_unlock(&desc->lock);
  29.655 -
  29.656 -	if (softirq_pending(cpu))
  29.657 -		do_softirq();
  29.658 -	return 1;
  29.659 -}
  29.660 -
  29.661 -/**
  29.662 - *	request_irq - allocate an interrupt line
  29.663 - *	@irq: Interrupt line to allocate
  29.664 - *	@handler: Function to be called when the IRQ occurs
  29.665 - *	@irqflags: Interrupt type flags
  29.666 - *	@devname: An ascii name for the claiming device
  29.667 - *	@dev_id: A cookie passed back to the handler function
  29.668 - *
  29.669 - *	This call allocates interrupt resources and enables the
  29.670 - *	interrupt line and IRQ handling. From the point this
  29.671 - *	call is made your handler function may be invoked. Since
  29.672 - *	your handler function must clear any interrupt the board 
  29.673 - *	raises, you must take care both to initialise your hardware
  29.674 - *	and to set up the interrupt handler in the right order.
  29.675 - *
  29.676 - *	Dev_id must be globally unique. Normally the address of the
  29.677 - *	device data structure is used as the cookie. Since the handler
  29.678 - *	receives this value it makes sense to use it.
  29.679 - *
  29.680 - *	If your interrupt is shared you must pass a non NULL dev_id
  29.681 - *	as this is required when freeing the interrupt.
  29.682 - *
  29.683 - *	Flags:
  29.684 - *
  29.685 - *	SA_SHIRQ		Interrupt is shared
  29.686 - *
  29.687 - *	SA_INTERRUPT		Disable local interrupts while processing
  29.688 - *
  29.689 - *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
  29.690 - *
  29.691 - */
  29.692 - 
  29.693 -int request_irq(unsigned int irq, 
  29.694 -		void (*handler)(int, void *, struct pt_regs *),
  29.695 -		unsigned long irqflags, 
  29.696 -		const char * devname,
  29.697 -		void *dev_id)
  29.698 -{
  29.699 -	int retval;
  29.700 -	struct irqaction * action;
  29.701 -
  29.702 -#if 1
  29.703 -	/*
  29.704 -	 * Sanity-check: shared interrupts should REALLY pass in
  29.705 -	 * a real dev-ID, otherwise we'll have trouble later trying
  29.706 -	 * to figure out which interrupt is which (messes up the
  29.707 -	 * interrupt freeing logic etc).
  29.708 -	 */
  29.709 -	if (irqflags & SA_SHIRQ) {
  29.710 -		if (!dev_id)
  29.711 -			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
  29.712 -	}
  29.713 -#endif
  29.714 -
  29.715 -	if (irq >= NR_IRQS)
  29.716 -		return -EINVAL;
  29.717 -	if (!handler)
  29.718 -		return -EINVAL;
  29.719 -
  29.720 -	action = (struct irqaction *)
  29.721 -			kmalloc(sizeof(struct irqaction), GFP_KERNEL);
  29.722 -	if (!action)
  29.723 -		return -ENOMEM;
  29.724 -
  29.725 -	action->handler = handler;
  29.726 -	action->flags = irqflags;
  29.727 -	action->mask = 0;
  29.728 -	action->name = devname;
  29.729 -	action->next = NULL;
  29.730 -	action->dev_id = dev_id;
  29.731 -
  29.732 -	retval = setup_irq(irq, action);
  29.733 -	if (retval)
  29.734 -		kfree(action);
  29.735 -	return retval;
  29.736 -}
  29.737 -
  29.738 -/*
  29.739 - * Internal function to unregister an irqaction - typically used to
  29.740 - * deallocate special interrupts that are part of the architecture.
  29.741 - */
  29.742 -int teardown_irq(unsigned int irq, struct irqaction * old)
  29.743 -{
  29.744 -	irq_desc_t *desc;
  29.745 -	struct irqaction **p;
  29.746 -	unsigned long flags;
  29.747 -
  29.748 -	if (irq >= NR_IRQS)
  29.749 -		return -ENOENT;
  29.750 -
  29.751 -	desc = irq_desc + irq;
  29.752 -	spin_lock_irqsave(&desc->lock,flags);
  29.753 -	p = &desc->action;
  29.754 -	for (;;) {
  29.755 -		struct irqaction * action = *p;
  29.756 -		if (action) {
  29.757 -			struct irqaction **pp = p;
  29.758 -			p = &action->next;
  29.759 -			if (action != old)
  29.760 -				continue;
  29.761 -
  29.762 -			/* Found it - now remove it from the list of entries */
  29.763 -			*pp = action->next;
  29.764 -			if (!desc->action) {
  29.765 -				desc->status |= IRQ_DISABLED;
  29.766 -				desc->handler->shutdown(irq);
  29.767 -			}
  29.768 -			spin_unlock_irqrestore(&desc->lock,flags);
  29.769 -
  29.770 -#ifdef CONFIG_SMP
  29.771 -			/* Wait to make sure it's not being used on another CPU */
  29.772 -			while (desc->status & IRQ_INPROGRESS) {
  29.773 -				barrier();
  29.774 -				cpu_relax();
  29.775 -			}
  29.776 -#endif
  29.777 -			return 0;
  29.778 -		}
  29.779 -		printk("Trying to free free IRQ%d\n",irq);
  29.780 -		spin_unlock_irqrestore(&desc->lock,flags);
  29.781 -		return -ENOENT;
  29.782 -	}
  29.783 -}
  29.784 -
  29.785 -/**
  29.786 - *	free_irq - free an interrupt
  29.787 - *	@irq: Interrupt line to free
  29.788 - *	@dev_id: Device identity to free
  29.789 - *
  29.790 - *	Remove an interrupt handler. The handler is removed and if the
  29.791 - *	interrupt line is no longer in use by any driver it is disabled.
  29.792 - *	On a shared IRQ the caller must ensure the interrupt is disabled
  29.793 - *	on the card it drives before calling this function. The function
  29.794 - *	does not return until any executing interrupts for this IRQ
  29.795 - *	have completed.
  29.796 - *
  29.797 - *	This function may be called from interrupt context. 
  29.798 - *
  29.799 - *	Bugs: Attempting to free an irq in a handler for the same irq hangs
  29.800 - *	      the machine.
  29.801 - */
  29.802 - 
  29.803 -void free_irq(unsigned int irq, void *dev_id)
  29.804 -{
  29.805 -	irq_desc_t *desc;
  29.806 -	struct irqaction *action;
  29.807 -	unsigned long flags;
  29.808 -
  29.809 -	if (irq >= NR_IRQS)
  29.810 -		return;
  29.811 -
  29.812 -	desc = irq_desc + irq;
  29.813 -	spin_lock_irqsave(&desc->lock,flags);
  29.814 -	for (action = desc->action; action != NULL; action = action->next) {
  29.815 -		if (action->dev_id != dev_id)
  29.816 -			continue;
  29.817 -
  29.818 -		spin_unlock_irqrestore(&desc->lock,flags);
  29.819 -
  29.820 -		if (teardown_irq(irq, action) == 0)
  29.821 -			kfree(action);
  29.822 -		return;
  29.823 -	}
  29.824 -	printk("Trying to free free IRQ%d\n",irq);
  29.825 -	spin_unlock_irqrestore(&desc->lock,flags);
  29.826 -	return;
  29.827 -}
  29.828 -
  29.829 -/*
  29.830 - * IRQ autodetection code..
  29.831 - *
  29.832 - * This depends on the fact that any interrupt that
  29.833 - * comes in on to an unassigned handler will get stuck
  29.834 - * with "IRQ_WAITING" cleared and the interrupt
  29.835 - * disabled.
  29.836 - */
  29.837 -
  29.838 -static DECLARE_MUTEX(probe_sem);
  29.839 -
  29.840 -/**
  29.841 - *	probe_irq_on	- begin an interrupt autodetect
  29.842 - *
  29.843 - *	Commence probing for an interrupt. The interrupts are scanned
  29.844 - *	and a mask of potential interrupt lines is returned.
  29.845 - *
  29.846 - */
  29.847 - 
  29.848 -unsigned long probe_irq_on(void)
  29.849 -{
  29.850 -	unsigned int i;
  29.851 -	irq_desc_t *desc;
  29.852 -	unsigned long val;
  29.853 -	unsigned long delay;
  29.854 -
  29.855 -	down(&probe_sem);
  29.856 -	/* 
  29.857 -	 * something may have generated an irq long ago and we want to
  29.858 -	 * flush such a longstanding irq before considering it as spurious. 
  29.859 -	 */
  29.860 -	for (i = NR_PIRQS-1; i > 0; i--)  {
  29.861 -		desc = irq_desc + i;
  29.862 -
  29.863 -		spin_lock_irq(&desc->lock);
  29.864 -		if (!irq_desc[i].action) 
  29.865 -			irq_desc[i].handler->startup(i);
  29.866 -		spin_unlock_irq(&desc->lock);
  29.867 -	}
  29.868 -
  29.869 -	/* Wait for longstanding interrupts to trigger. */
  29.870 -	for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
  29.871 -		/* about 20ms delay */ synchronize_irq();
  29.872 -
  29.873 -	/*
  29.874 -	 * enable any unassigned irqs
  29.875 -	 * (we must startup again here because if a longstanding irq
  29.876 -	 * happened in the previous stage, it may have masked itself)
  29.877 -	 */
  29.878 -	for (i = NR_PIRQS-1; i > 0; i--) {
  29.879 -		desc = irq_desc + i;
  29.880 -
  29.881 -		spin_lock_irq(&desc->lock);
  29.882 -		if (!desc->action) {
  29.883 -			desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
  29.884 -			if (desc->handler->startup(i))
  29.885 -				desc->status |= IRQ_PENDING;
  29.886 -		}
  29.887 -		spin_unlock_irq(&desc->lock);
  29.888 -	}
  29.889 -
  29.890 -	/*
  29.891 -	 * Wait for spurious interrupts to trigger
  29.892 -	 */
  29.893 -	for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
  29.894 -		/* about 100ms delay */ synchronize_irq();
  29.895 -
  29.896 -	/*
  29.897 -	 * Now filter out any obviously spurious interrupts
  29.898 -	 */
  29.899 -	val = 0;
  29.900 -	for (i = 0; i < NR_PIRQS; i++) {
  29.901 -		irq_desc_t *desc = irq_desc + i;
  29.902 -		unsigned int status;
  29.903 -
  29.904 -		spin_lock_irq(&desc->lock);
  29.905 -		status = desc->status;
  29.906 -
  29.907 -		if (status & IRQ_AUTODETECT) {
  29.908 -			/* It triggered already - consider it spurious. */
  29.909 -			if (!(status & IRQ_WAITING)) {
  29.910 -				desc->status = status & ~IRQ_AUTODETECT;
  29.911 -				desc->handler->shutdown(i);
  29.912 -			} else
  29.913 -				if (i < 32)
  29.914 -					val |= 1 << i;
  29.915 -		}
  29.916 -		spin_unlock_irq(&desc->lock);
  29.917 -	}
  29.918 -
  29.919 -	return val;
  29.920 -}
  29.921 -
  29.922 -/*
  29.923 - * Return a mask of triggered interrupts (this
  29.924 - * can handle only legacy ISA interrupts).
  29.925 - */
  29.926 - 
  29.927 -/**
  29.928 - *	probe_irq_mask - scan a bitmap of interrupt lines
  29.929 - *	@val:	mask of interrupts to consider
  29.930 - *
  29.931 - *	Scan the ISA bus interrupt lines and return a bitmap of
  29.932 - *	active interrupts. The interrupt probe logic state is then
  29.933 - *	returned to its previous value.
  29.934 - *
  29.935 - *	Note: we need to scan all the irq's even though we will
  29.936 - *	only return ISA irq numbers - just so that we reset them
  29.937 - *	all to a known state.
  29.938 - */
  29.939 -unsigned int probe_irq_mask(unsigned long val)
  29.940 -{
  29.941 -	int i;
  29.942 -	unsigned int mask;
  29.943 -
  29.944 -	mask = 0;
  29.945 -	for (i = 0; i < NR_PIRQS; i++) {
  29.946 -		irq_desc_t *desc = irq_desc + i;
  29.947 -		unsigned int status;
  29.948 -
  29.949 -		spin_lock_irq(&desc->lock);
  29.950 -		status = desc->status;
  29.951 -
  29.952 -		if (status & IRQ_AUTODETECT) {
  29.953 -			if (i < 16 && !(status & IRQ_WAITING))
  29.954 -				mask |= 1 << i;
  29.955 -
  29.956 -			desc->status = status & ~IRQ_AUTODETECT;
  29.957 -			desc->handler->shutdown(i);
  29.958 -		}
  29.959 -		spin_unlock_irq(&desc->lock);
  29.960 -	}
  29.961 -	up(&probe_sem);
  29.962 -
  29.963 -	return mask & val;
  29.964 -}
  29.965 -
  29.966 -/*
  29.967 - * Return the one interrupt that triggered (this can
  29.968 - * handle any interrupt source).
  29.969 - */
  29.970 -
  29.971 -/**
  29.972 - *	probe_irq_off	- end an interrupt autodetect
  29.973 - *	@val: mask of potential interrupts (unused)
  29.974 - *
  29.975 - *	Scans the unused interrupt lines and returns the line which
  29.976 - *	appears to have triggered the interrupt. If no interrupt was
  29.977 - *	found then zero is returned. If more than one interrupt is
  29.978 - *	found then minus the first candidate is returned to indicate
  29.979 - *	their is doubt.
  29.980 - *
  29.981 - *	The interrupt probe logic state is returned to its previous
  29.982 - *	value.
  29.983 - *
  29.984 - *	BUGS: When used in a module (which arguably shouldnt happen)
  29.985 - *	nothing prevents two IRQ probe callers from overlapping. The
  29.986 - *	results of this are non-optimal.
  29.987 - */
  29.988 - 
  29.989 -int probe_irq_off(unsigned long val)
  29.990 -{
  29.991 -	int i, irq_found, nr_irqs;
  29.992 -
  29.993 -	nr_irqs = 0;
  29.994 -	irq_found = 0;
  29.995 -	for (i = 0; i < NR_PIRQS; i++) {
  29.996 -		irq_desc_t *desc = irq_desc + i;
  29.997 -		unsigned int status;
  29.998 -
  29.999 -		spin_lock_irq(&desc->lock);
 29.1000 -		status = desc->status;
 29.1001 -
 29.1002 -		if (status & IRQ_AUTODETECT) {
 29.1003 -			if (!(status & IRQ_WAITING)) {
 29.1004 -				if (!nr_irqs)
 29.1005 -					irq_found = i;
 29.1006 -				nr_irqs++;
 29.1007 -			}
 29.1008 -			desc->status = status & ~IRQ_AUTODETECT;
 29.1009 -			desc->handler->shutdown(i);
 29.1010 -		}
 29.1011 -		spin_unlock_irq(&desc->lock);
 29.1012 -	}
 29.1013 -	up(&probe_sem);
 29.1014 -
 29.1015 -	if (nr_irqs > 1)
 29.1016 -		irq_found = -irq_found;
 29.1017 -	return irq_found;
 29.1018 -}
 29.1019 -
 29.1020 -/* this was setup_x86_irq but it seems pretty generic */
 29.1021 -int setup_irq(unsigned int irq, struct irqaction * new)
 29.1022 -{
 29.1023 -	int shared = 0;
 29.1024 -	unsigned long flags;
 29.1025 -	struct irqaction *old, **p;
 29.1026 -	irq_desc_t *desc = irq_desc + irq;
 29.1027 -
 29.1028 -	/*
 29.1029 -	 * Some drivers like serial.c use request_irq() heavily,
 29.1030 -	 * so we have to be careful not to interfere with a
 29.1031 -	 * running system.
 29.1032 -	 */
 29.1033 -	if (new->flags & SA_SAMPLE_RANDOM) {
 29.1034 -		/*
 29.1035 -		 * This function might sleep, we want to call it first,
 29.1036 -		 * outside of the atomic block.
 29.1037 -		 * Yes, this might clear the entropy pool if the wrong
 29.1038 -		 * driver is attempted to be loaded, without actually
 29.1039 -		 * installing a new handler, but is this really a problem,
 29.1040 -		 * only the sysadmin is able to do this.
 29.1041 -		 */
 29.1042 -		rand_initialize_irq(irq);
 29.1043 -	}
 29.1044 -
 29.1045 -	/*
 29.1046 -	 * The following block of code has to be executed atomically
 29.1047 -	 */
 29.1048 -	spin_lock_irqsave(&desc->lock,flags);
 29.1049 -	p = &desc->action;
 29.1050 -	if ((old = *p) != NULL) {
 29.1051 -		/* Can't share interrupts unless both agree to */
 29.1052 -		if (!(old->flags & new->flags & SA_SHIRQ)) {
 29.1053 -			spin_unlock_irqrestore(&desc->lock,flags);
 29.1054 -			return -EBUSY;
 29.1055 -		}
 29.1056 -
 29.1057 -		/* add new interrupt at end of irq queue */
 29.1058 -		do {
 29.1059 -			p = &old->next;
 29.1060 -			old = *p;
 29.1061 -		} while (old);
 29.1062 -		shared = 1;
 29.1063 -	}
 29.1064 -
 29.1065 -	*p = new;
 29.1066 -
 29.1067 -	if (!shared) {
 29.1068 -		desc->depth = 0;
 29.1069 -		desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
 29.1070 -		desc->handler->startup(irq);
 29.1071 -	}
 29.1072 -	spin_unlock_irqrestore(&desc->lock,flags);
 29.1073 -
 29.1074 -	register_irq_proc(irq);
 29.1075 -	return 0;
 29.1076 -}
 29.1077 -
 29.1078 -static struct proc_dir_entry * root_irq_dir;
 29.1079 -static struct proc_dir_entry * irq_dir [NR_IRQS];
 29.1080 -
 29.1081 -#define HEX_DIGITS 8
 29.1082 -
 29.1083 -static unsigned int parse_hex_value (const char *buffer,
 29.1084 -		unsigned long count, unsigned long *ret)
 29.1085 -{
 29.1086 -	unsigned char hexnum [HEX_DIGITS];
 29.1087 -	unsigned long value;
 29.1088 -	int i;
 29.1089 -
 29.1090 -	if (!count)
 29.1091 -		return -EINVAL;
 29.1092 -	if (count > HEX_DIGITS)
 29.1093 -		count = HEX_DIGITS;
 29.1094 -	if (copy_from_user(hexnum, buffer, count))
 29.1095 -		return -EFAULT;
 29.1096 -
 29.1097 -	/*
 29.1098 -	 * Parse the first 8 characters as a hex string, any non-hex char
 29.1099 -	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
 29.1100 -	 */
 29.1101 -	value = 0;
 29.1102 -
 29.1103 -	for (i = 0; i < count; i++) {
 29.1104 -		unsigned int c = hexnum[i];
 29.1105 -
 29.1106 -		switch (c) {
 29.1107 -			case '0' ... '9': c -= '0'; break;
 29.1108 -			case 'a' ... 'f': c -= 'a'-10; break;
 29.1109 -			case 'A' ... 'F': c -= 'A'-10; break;
 29.1110 -		default:
 29.1111 -			goto out;
 29.1112 -		}
 29.1113 -		value = (value << 4) | c;
 29.1114 -	}
 29.1115 -out:
 29.1116 -	*ret = value;
 29.1117 -	return 0;
 29.1118 -}
 29.1119 -
 29.1120 -#if CONFIG_SMP
 29.1121 -
 29.1122 -static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
 29.1123 -
 29.1124 -static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
 29.1125 -static int irq_affinity_read_proc (char *page, char **start, off_t off,
 29.1126 -			int count, int *eof, void *data)
 29.1127 -{
 29.1128 -	if (count < HEX_DIGITS+1)
 29.1129 -		return -EINVAL;
 29.1130 -	return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
 29.1131 -}
 29.1132 -
 29.1133 -static int irq_affinity_write_proc (struct file *file, const char *buffer,
 29.1134 -					unsigned long count, void *data)
 29.1135 -{
 29.1136 -	int irq = (long) data, full_count = count, err;
 29.1137 -	unsigned long new_value;
 29.1138 -
 29.1139 -	if (!irq_desc[irq].handler->set_affinity)
 29.1140 -		return -EIO;
 29.1141 -
 29.1142 -	err = parse_hex_value(buffer, count, &new_value);
 29.1143 -
 29.1144 -	/*
 29.1145 -	 * Do not allow disabling IRQs completely - it's a too easy
 29.1146 -	 * way to make the system unusable accidentally :-) At least
 29.1147 -	 * one online CPU still has to be targeted.
 29.1148 -	 */
 29.1149 -	if (!(new_value & cpu_online_map))
 29.1150 -		return -EINVAL;
 29.1151 -
 29.1152 -	irq_affinity[irq] = new_value;
 29.1153 -	irq_desc[irq].handler->set_affinity(irq, new_value);
 29.1154 -
 29.1155 -	return full_count;
 29.1156 -}
 29.1157 -
 29.1158 -#endif
 29.1159 -
 29.1160 -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
 29.1161 -			int count, int *eof, void *data)
 29.1162 -{
 29.1163 -	unsigned long *mask = (unsigned long *) data;
 29.1164 -	if (count < HEX_DIGITS+1)
 29.1165 -		return -EINVAL;
 29.1166 -	return sprintf (page, "%08lx\n", *mask);
 29.1167 -}
 29.1168 -
 29.1169 -static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
 29.1170 -					unsigned long count, void *data)
 29.1171 -{
 29.1172 -	unsigned long *mask = (unsigned long *) data, full_count = count, err;
 29.1173 -	unsigned long new_value;
 29.1174 -
 29.1175 -	err = parse_hex_value(buffer, count, &new_value);
 29.1176 -	if (err)
 29.1177 -		return err;
 29.1178 -
 29.1179 -	*mask = new_value;
 29.1180 -	return full_count;
 29.1181 -}
 29.1182 -
 29.1183 -#define MAX_NAMELEN 10
 29.1184 -
 29.1185 -static void register_irq_proc (unsigned int irq)
 29.1186 -{
 29.1187 -	char name [MAX_NAMELEN];
 29.1188 -
 29.1189 -	if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) ||
 29.1190 -			irq_dir[irq])
 29.1191 -		return;
 29.1192 -
 29.1193 -	memset(name, 0, MAX_NAMELEN);
 29.1194 -	sprintf(name, "%d", irq);
 29.1195 -
 29.1196 -	/* create /proc/irq/1234 */
 29.1197 -	irq_dir[irq] = proc_mkdir(name, root_irq_dir);
 29.1198 -
 29.1199 -#if CONFIG_SMP
 29.1200 -	{
 29.1201 -		struct proc_dir_entry *entry;
 29.1202 -
 29.1203 -		/* create /proc/irq/1234/smp_affinity */
 29.1204 -		entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
 29.1205 -
 29.1206 -		if (entry) {
 29.1207 -			entry->nlink = 1;
 29.1208 -			entry->data = (void *)(long)irq;
 29.1209 -			entry->read_proc = irq_affinity_read_proc;
 29.1210 -			entry->write_proc = irq_affinity_write_proc;
 29.1211 -		}
 29.1212 -
 29.1213 -		smp_affinity_entry[irq] = entry;
 29.1214 -	}
 29.1215 -#endif
 29.1216 -}
 29.1217 -
 29.1218 -unsigned long prof_cpu_mask = -1;
 29.1219 -
 29.1220 -void init_irq_proc (void)
 29.1221 -{
 29.1222 -	struct proc_dir_entry *entry;
 29.1223 -	int i;
 29.1224 -
 29.1225 -	/* create /proc/irq */
 29.1226 -	root_irq_dir = proc_mkdir("irq", 0);
 29.1227 -
 29.1228 -	/* create /proc/irq/prof_cpu_mask */
 29.1229 -	entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
 29.1230 -
 29.1231 -	if (!entry)
 29.1232 -	    return;
 29.1233 -
 29.1234 -	entry->nlink = 1;
 29.1235 -	entry->data = (void *)&prof_cpu_mask;
 29.1236 -	entry->read_proc = prof_cpu_mask_read_proc;
 29.1237 -	entry->write_proc = prof_cpu_mask_write_proc;
 29.1238 -
 29.1239 -	/*
 29.1240 -	 * Create entries for all existing IRQs.
 29.1241 -	 */
 29.1242 -	for (i = 0; i < NR_IRQS; i++)
 29.1243 -		register_irq_proc(i);
 29.1244 -}
 29.1245 -
    30.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/ldt.c	Fri Oct 07 23:22:35 2005 +0100
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,272 +0,0 @@
    30.4 -/*
    30.5 - * linux/kernel/ldt.c
    30.6 - *
    30.7 - * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
    30.8 - * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
    30.9 - */
   30.10 -
   30.11 -#include <linux/errno.h>
   30.12 -#include <linux/sched.h>
   30.13 -#include <linux/string.h>
   30.14 -#include <linux/mm.h>
   30.15 -#include <linux/smp.h>
   30.16 -#include <linux/smp_lock.h>
   30.17 -#include <linux/vmalloc.h>
   30.18 -#include <linux/slab.h>
   30.19 -
   30.20 -#include <asm/mmu_context.h>
   30.21 -#include <asm/uaccess.h>
   30.22 -#include <asm/system.h>
   30.23 -#include <asm/ldt.h>
   30.24 -#include <asm/desc.h>
   30.25 -
   30.26 -#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
   30.27 -static void flush_ldt(void *mm)
   30.28 -{
   30.29 -	if (current->active_mm)
   30.30 -		load_LDT(&current->active_mm->context);
   30.31 -}
   30.32 -#endif
   30.33 -
   30.34 -static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
   30.35 -{
   30.36 -	void *oldldt;
   30.37 -	void *newldt;
   30.38 -	int oldsize;
   30.39 -
   30.40 -	if (mincount <= pc->size)
   30.41 -		return 0;
   30.42 -	oldsize = pc->size;
   30.43 -	mincount = (mincount+511)&(~511);
   30.44 -	if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
   30.45 -		newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
   30.46 -	else
   30.47 -		newldt = kmalloc(mincount*LDT_ENTRY_SIZE, GFP_KERNEL);
   30.48 -
   30.49 -	if (!newldt)
   30.50 -		return -ENOMEM;
   30.51 -
   30.52 -	if (oldsize)
   30.53 -		memcpy(newldt, pc->ldt, oldsize*LDT_ENTRY_SIZE);
   30.54 -
   30.55 -	oldldt = pc->ldt;
   30.56 -	memset(newldt+oldsize*LDT_ENTRY_SIZE, 0, (mincount-oldsize)*LDT_ENTRY_SIZE);
   30.57 -	wmb();
   30.58 -	pc->ldt = newldt;
   30.59 -	pc->size = mincount;
   30.60 -	if (reload) {
   30.61 -		make_pages_readonly(
   30.62 -			pc->ldt,
   30.63 -			(pc->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
   30.64 -		load_LDT(pc);
   30.65 -#ifdef CONFIG_SMP
   30.66 -		if (current->mm->cpu_vm_mask != (1<<smp_processor_id()))
   30.67 -			smp_call_function(flush_ldt, 0, 1, 1);
   30.68 -#endif
   30.69 -	}
   30.70 -	wmb();
   30.71 -	if (oldsize) {
   30.72 -		make_pages_writable(
   30.73 -			oldldt, (oldsize*LDT_ENTRY_SIZE)/PAGE_SIZE);
   30.74 -		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
   30.75 -			vfree(oldldt);
   30.76 -		else
   30.77 -			kfree(oldldt);
   30.78 -	}
   30.79 -	return 0;
   30.80 -}
   30.81 -
   30.82 -static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
   30.83 -{
   30.84 -	int err = alloc_ldt(new, old->size, 0);
   30.85 -	if (err < 0) {
   30.86 -		printk(KERN_WARNING "ldt allocation failed\n");
   30.87 -		new->size = 0;
   30.88 -		return err;
   30.89 -	}
   30.90 -	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
   30.91 -	make_pages_readonly(new->ldt, (new->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
   30.92 -	return 0;
   30.93 -}
   30.94 -
   30.95 -/*
   30.96 - * we do not have to muck with descriptors here, that is
   30.97 - * done in switch_mm() as needed.
   30.98 - */
   30.99 -int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
  30.100 -{
  30.101 -	struct mm_struct * old_mm;
  30.102 -	int retval = 0;
  30.103 -
  30.104 -	init_MUTEX(&mm->context.sem);
  30.105 -	mm->context.size = 0;
  30.106 -	old_mm = current->mm;
  30.107 -	if (old_mm && old_mm->context.size > 0) {
  30.108 -		down(&old_mm->context.sem);
  30.109 -		retval = copy_ldt(&mm->context, &old_mm->context);
  30.110 -		up(&old_mm->context.sem);
  30.111 -	}
  30.112 -	return retval;
  30.113 -}
  30.114 -
  30.115 -/*
  30.116 - * No need to lock the MM as we are the last user
  30.117 - * Do not touch the ldt register, we are already
  30.118 - * in the next thread.
  30.119 - */
  30.120 -void destroy_context(struct mm_struct *mm)
  30.121 -{
  30.122 -	if (mm->context.size) {
  30.123 -		make_pages_writable(
  30.124 -			mm->context.ldt, 
  30.125 -			(mm->context.size*LDT_ENTRY_SIZE)/PAGE_SIZE);
  30.126 -		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
  30.127 -			vfree(mm->context.ldt);
  30.128 -		else
  30.129 -			kfree(mm->context.ldt);
  30.130 -		mm->context.size = 0;
  30.131 -	}
  30.132 -}
  30.133 -
  30.134 -static int read_ldt(void * ptr, unsigned long bytecount)
  30.135 -{
  30.136 -	int err;
  30.137 -	unsigned long size;
  30.138 -	struct mm_struct * mm = current->mm;
  30.139 -
  30.140 -	if (!mm->context.size)
  30.141 -		return 0;
  30.142 -	if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES)
  30.143 -		bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES;
  30.144 -
  30.145 -	down(&mm->context.sem);
  30.146 -	size = mm->context.size*LDT_ENTRY_SIZE;
  30.147 -	if (size > bytecount)
  30.148 -		size = bytecount;
  30.149 -
  30.150 -	err = 0;
  30.151 -	if (copy_to_user(ptr, mm->context.ldt, size))
  30.152 -		err = -EFAULT;
  30.153 -	up(&mm->context.sem);
  30.154 -	if (err < 0)
  30.155 -		return err;
  30.156 -	if (size != bytecount) {
  30.157 -		/* zero-fill the rest */
  30.158 -		clear_user(ptr+size, bytecount-size);
  30.159 -	}
  30.160 -	return bytecount;
  30.161 -}
  30.162 -
  30.163 -static int read_default_ldt(void * ptr, unsigned long bytecount)
  30.164 -{
  30.165 -	int err;
  30.166 -	unsigned long size;
  30.167 -	void *address;
  30.168 -
  30.169 -	err = 0;
  30.170 -	address = &default_ldt[0];
  30.171 -	size = 5*sizeof(struct desc_struct);
  30.172 -	if (size > bytecount)
  30.173 -		size = bytecount;
  30.174 -
  30.175 -	err = size;
  30.176 -	if (copy_to_user(ptr, address, size))
  30.177 -		err = -EFAULT;
  30.178 -
  30.179 -	return err;
  30.180 -}
  30.181 -
  30.182 -static int write_ldt(void * ptr, unsigned long bytecount, int oldmode)
  30.183 -{
  30.184 -	struct mm_struct * mm = current->mm;
  30.185 -	__u32 entry_1, entry_2, *lp;
  30.186 -	unsigned long mach_lp;
  30.187 -	int error;
  30.188 -	struct modify_ldt_ldt_s ldt_info;
  30.189 -
  30.190 -	error = -EINVAL;
  30.191 -	if (bytecount != sizeof(ldt_info))
  30.192 -		goto out;
  30.193 -	error = -EFAULT; 	
  30.194 -	if (copy_from_user(&ldt_info, ptr, sizeof(ldt_info)))
  30.195 -		goto out;
  30.196 -
  30.197 -	error = -EINVAL;
  30.198 -	if (ldt_info.entry_number >= LDT_ENTRIES)
  30.199 -		goto out;
  30.200 -	if (ldt_info.contents == 3) {
  30.201 -		if (oldmode)
  30.202 -			goto out;
  30.203 -		if (ldt_info.seg_not_present == 0)
  30.204 -			goto out;
  30.205 -	}
  30.206 -
  30.207 -	down(&mm->context.sem);
  30.208 -	if (ldt_info.entry_number >= mm->context.size) {
  30.209 -		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
  30.210 -		if (error < 0)
  30.211 -			goto out_unlock;
  30.212 -	}
  30.213 -
  30.214 -	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
  30.215 -	mach_lp = arbitrary_virt_to_machine(lp);
  30.216 -
  30.217 -   	/* Allow LDTs to be cleared by the user. */
  30.218 -   	if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
  30.219 -		if (oldmode ||
  30.220 -		    (ldt_info.contents == 0		&&
  30.221 -		     ldt_info.read_exec_only == 1	&&
  30.222 -		     ldt_info.seg_32bit == 0		&&
  30.223 -		     ldt_info.limit_in_pages == 0	&&
  30.224 -		     ldt_info.seg_not_present == 1	&&
  30.225 -		     ldt_info.useable == 0 )) {
  30.226 -			entry_1 = 0;
  30.227 -			entry_2 = 0;
  30.228 -			goto install;
  30.229 -		}
  30.230 -	}
  30.231 -
  30.232 -	entry_1 = ((ldt_info.base_addr & 0x0000ffff) << 16) |
  30.233 -		  (ldt_info.limit & 0x0ffff);
  30.234 -	entry_2 = (ldt_info.base_addr & 0xff000000) |
  30.235 -		  ((ldt_info.base_addr & 0x00ff0000) >> 16) |
  30.236 -		  (ldt_info.limit & 0xf0000) |
  30.237 -		  ((ldt_info.read_exec_only ^ 1) << 9) |
  30.238 -		  (ldt_info.contents << 10) |
  30.239 -		  ((ldt_info.seg_not_present ^ 1) << 15) |
  30.240 -		  (ldt_info.seg_32bit << 22) |
  30.241 -		  (ldt_info.limit_in_pages << 23) |
  30.242 -		  0x7000;
  30.243 -	if (!oldmode)
  30.244 -		entry_2 |= (ldt_info.useable << 20);
  30.245 -
  30.246 -	/* Install the new entry ...  */
  30.247 -install:
  30.248 -	error = HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
  30.249 -
  30.250 -out_unlock:
  30.251 -	up(&mm->context.sem);
  30.252 -out:
  30.253 -	return error;
  30.254 -}
  30.255 -
  30.256 -asmlinkage int sys_modify_ldt(int func, void *ptr, unsigned long bytecount)
  30.257 -{
  30.258 -	int ret = -ENOSYS;
  30.259 -
  30.260 -	switch (func) {
  30.261 -	case 0:
  30.262 -		ret = read_ldt(ptr, bytecount);
  30.263 -		break;
  30.264 -	case 1:
  30.265 -		ret = write_ldt(ptr, bytecount, 1);
  30.266 -		break;
  30.267 -	case 2:
  30.268 -		ret = read_default_ldt(ptr, bytecount);
  30.269 -		break;
  30.270 -	case 0x11:
  30.271 -		ret = write_ldt(ptr, bytecount, 0);
  30.272 -		break;
  30.273 -	}
  30.274 -	return ret;
  30.275 -}
    31.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/pci-pc.c	Fri Oct 07 23:22:35 2005 +0100
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,260 +0,0 @@
    31.4 -/*
    31.5 - *	Low-Level PCI Support for PC
    31.6 - *
    31.7 - *	(c) 1999--2000 Martin Mares <mj@ucw.cz>
    31.8 - *
    31.9 - * Adjusted to use Xen's interface by Rolf Neugebauer, Intel Research Cambridge
   31.10 - * Further modifications by Keir Fraser, University of Cambridge
   31.11 - */
   31.12 -
   31.13 -#include <linux/config.h>
   31.14 -#include <linux/types.h>
   31.15 -#include <linux/kernel.h>
   31.16 -#include <linux/sched.h>
   31.17 -#include <linux/pci.h>
   31.18 -#include <linux/init.h>
   31.19 -#include <linux/ioport.h>
   31.20 -
   31.21 -#include <asm/segment.h>
   31.22 -#include <asm/io.h>
   31.23 -
   31.24 -#include <asm-xen/xen-public/xen.h>
   31.25 -#include <asm-xen/xen-public/physdev.h>
   31.26 -
   31.27 -#include "pci-i386.h"
   31.28 -
   31.29 -/*
   31.30 - * NB. The following interface functions are not included here:
   31.31 - *  1. void eisa_set_level_irq(unsigned int irq)
   31.32 - *  2. irq_routing_table * __devinit pcibios_get_irq_routing_table(void)
   31.33 - *  3. int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
   31.34 - * All are used by the ACPI driver. This should be ported to Xen if it is
   31.35 - * ever required -- Xen is the ultimate source for IRQ-routing knowledge.
   31.36 - */
   31.37 -
   31.38 -struct pci_ops *pci_root_ops = NULL;
   31.39 -
   31.40 -int (*pci_config_read)(int seg, int bus, int dev, int fn, 
   31.41 -                       int reg, int len, u32 *value) = NULL;
   31.42 -int (*pci_config_write)(int seg, int bus, int dev, int fn,
   31.43 -                        int reg, int len, u32 value) = NULL;
   31.44 -
   31.45 -unsigned int pci_probe = PCI_PROBE_BIOS;
   31.46 -
   31.47 -struct pci_fixup pcibios_fixups[] = { { 0 } };
   31.48 -
   31.49 -static int pci_confx_read(int seg, int bus, int dev, int fn, int reg, 
   31.50 -                          int len, u32 *value)
   31.51 -{
   31.52 -    int ret;
   31.53 -    physdev_op_t op;
   31.54 -
   31.55 -    if (bus > 255 || dev > 31 || fn > 7 || reg > 255)
   31.56 -        return -EINVAL;
   31.57 -
   31.58 -    op.cmd = PHYSDEVOP_PCI_CFGREG_READ;
   31.59 -    op.u.pci_cfgreg_read.bus  = bus;
   31.60 -    op.u.pci_cfgreg_read.dev  = dev;
   31.61 -    op.u.pci_cfgreg_read.func = fn;
   31.62 -    op.u.pci_cfgreg_read.reg  = reg;
   31.63 -    op.u.pci_cfgreg_read.len  = len;
   31.64 -
   31.65 -    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
   31.66 -        return ret;
   31.67 -
   31.68 -    *value = op.u.pci_cfgreg_read.value;
   31.69 -
   31.70 -    return 0;
   31.71 -}
   31.72 -
   31.73 -static int pci_confx_write(int seg, int bus, int dev, int fn, int reg, 
   31.74 -                           int len, u32 value)
   31.75 -{
   31.76 -    int ret;
   31.77 -    physdev_op_t op;
   31.78 -
   31.79 -    if ((bus > 255 || dev > 31 || fn > 7 || reg > 255)) 
   31.80 -        return -EINVAL;
   31.81 -
   31.82 -    op.cmd = PHYSDEVOP_PCI_CFGREG_WRITE;
   31.83 -    op.u.pci_cfgreg_write.bus   = bus;
   31.84 -    op.u.pci_cfgreg_write.dev   = dev;
   31.85 -    op.u.pci_cfgreg_write.func  = fn;
   31.86 -    op.u.pci_cfgreg_write.reg   = reg;
   31.87 -    op.u.pci_cfgreg_write.len   = len;
   31.88 -    op.u.pci_cfgreg_write.value = value;
   31.89 -
   31.90 -    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
   31.91 -        return ret;
   31.92 -    return 0;
   31.93 -}
   31.94 -
   31.95 -
   31.96 -static int pci_confx_read_config_byte(struct pci_dev *dev, 
   31.97 -                                      int where, u8 *value)
   31.98 -{
   31.99 -    int result; 
  31.100 -    u32 data;
  31.101 -
  31.102 -    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  31.103 -                            PCI_FUNC(dev->devfn), where, 1, &data);
  31.104 -
  31.105 -    *value = (u8)data;
  31.106 -
  31.107 -    return result;
  31.108 -}
  31.109 -
  31.110 -static int pci_confx_read_config_word(struct pci_dev *dev, 
  31.111 -                                      int where, u16 *value)
  31.112 -{
  31.113 -    int result; 
  31.114 -    u32 data;
  31.115 -
  31.116 -    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  31.117 -                            PCI_FUNC(dev->devfn), where, 2, &data);
  31.118 -
  31.119 -    *value = (u16)data;
  31.120 -
  31.121 -    return result;
  31.122 -}
  31.123 -
  31.124 -static int pci_confx_read_config_dword(struct pci_dev *dev, 
  31.125 -                                       int where, u32 *value)
  31.126 -{
  31.127 -    return pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  31.128 -                          PCI_FUNC(dev->devfn), where, 4, value);
  31.129 -}
  31.130 -
  31.131 -static int pci_confx_write_config_byte(struct pci_dev *dev, 
  31.132 -                                       int where, u8 value)
  31.133 -{
  31.134 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  31.135 -                           PCI_FUNC(dev->devfn), where, 1, value);
  31.136 -}
  31.137 -
  31.138 -static int pci_confx_write_config_word(struct pci_dev *dev, 
  31.139 -                                       int where, u16 value)
  31.140 -{
  31.141 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  31.142 -                           PCI_FUNC(dev->devfn), where, 2, value);
  31.143 -}
  31.144 -
  31.145 -static int pci_confx_write_config_dword(struct pci_dev *dev, 
  31.146 -                                        int where, u32 value)
  31.147 -{
  31.148 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  31.149 -                           PCI_FUNC(dev->devfn), where, 4, value);
  31.150 -}
  31.151 -
  31.152 -static struct pci_ops pci_conf_xen = {
  31.153 -    pci_confx_read_config_byte,
  31.154 -    pci_confx_read_config_word,
  31.155 -    pci_confx_read_config_dword,
  31.156 -    pci_confx_write_config_byte,
  31.157 -    pci_confx_write_config_word,
  31.158 -    pci_confx_write_config_dword
  31.159 -};
  31.160 -
  31.161 -void pcibios_penalize_isa_irq(int irq)
  31.162 -{ 
  31.163 -    /* nothing */
  31.164 -}
  31.165 -
  31.166 -void __devinit pcibios_fixup_bus(struct pci_bus *b)
  31.167 -{
  31.168 -    pci_read_bridge_bases(b);
  31.169 -}
  31.170 -
  31.171 -struct pci_bus * __devinit pcibios_scan_root(int busnum)
  31.172 -{
  31.173 -    struct list_head *list;
  31.174 -    struct pci_bus *bus;
  31.175 -
  31.176 -    list_for_each ( list, &pci_root_buses )
  31.177 -    {
  31.178 -        bus = pci_bus_b(list);
  31.179 -        if ( bus->number == busnum )
  31.180 -            return bus;
  31.181 -    }
  31.182 -
  31.183 -    printk("PCI: Probing PCI hardware (bus %02x)\n", busnum);
  31.184 -    return pci_scan_bus(busnum, pci_root_ops, NULL);
  31.185 -}
  31.186 -
  31.187 -void __init pcibios_init(void)
  31.188 -{
  31.189 -    int bus;
  31.190 -    physdev_op_t op;
  31.191 -
  31.192 -    if ( !pci_probe )
  31.193 -        return;
  31.194 -
  31.195 -    pci_root_ops     = &pci_conf_xen;
  31.196 -    pci_config_read  = pci_confx_read;
  31.197 -    pci_config_write = pci_confx_write;
  31.198 -
  31.199 -    pcibios_set_cacheline_size();
  31.200 -
  31.201 -    op.cmd = PHYSDEVOP_PCI_PROBE_ROOT_BUSES;
  31.202 -    if ( HYPERVISOR_physdev_op(&op) != 0 )
  31.203 -    {
  31.204 -        printk(KERN_WARNING "PCI: System does not support PCI\n");
  31.205 -        return;
  31.206 -    }
  31.207 -
  31.208 -    printk(KERN_INFO "PCI: Probing PCI hardware\n");
  31.209 -    for ( bus = 0; bus < 256; bus++ )
  31.210 -        if ( test_bit(bus, &op.u.pci_probe_root_buses.busmask[0]) )
  31.211 -            (void)pcibios_scan_root(bus);
  31.212 -
  31.213 -    pcibios_resource_survey();
  31.214 -}
  31.215 -
  31.216 -char * __devinit pcibios_setup(char *str)
  31.217 -{
  31.218 -    if ( !strcmp(str, "off") )
  31.219 -        pci_probe = 0;
  31.220 -    return NULL;
  31.221 -}
  31.222 -
  31.223 -unsigned int pcibios_assign_all_busses(void)
  31.224 -{
  31.225 -    return 0;
  31.226 -}
  31.227 -
  31.228 -int pcibios_enable_device(struct pci_dev *dev, int mask)
  31.229 -{
  31.230 -    int err;
  31.231 -    u8  pin;
  31.232 -    physdev_op_t op;
  31.233 -
  31.234 -    /* Inform Xen that we are going to use this device. */
  31.235 -    op.cmd = PHYSDEVOP_PCI_INITIALISE_DEVICE;
  31.236 -    op.u.pci_initialise_device.bus  = dev->bus->number;
  31.237 -    op.u.pci_initialise_device.dev  = PCI_SLOT(dev->devfn);
  31.238 -    op.u.pci_initialise_device.func = PCI_FUNC(dev->devfn);
  31.239 -    if ( (err = HYPERVISOR_physdev_op(&op)) != 0 )
  31.240 -        return err;
  31.241 -
  31.242 -    /* Now we can bind to the very final IRQ line. */
  31.243 -    pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &pin);
  31.244 -    dev->irq = pin;
  31.245 -
  31.246 -    /* Turn on device I/O and memory access as necessary. */
  31.247 -    if ( (err = pcibios_enable_resources(dev, mask)) < 0 )
  31.248 -        return err;
  31.249 -
  31.250 -    /* Sanity-check that an interrupt-producing device is routed to an IRQ. */
  31.251 -    pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
  31.252 -    if ( pin != 0 )
  31.253 -    {
  31.254 -        if ( dev->irq != 0 )
  31.255 -            printk(KERN_INFO "PCI: Obtained IRQ %d for device %s\n",
  31.256 -                   dev->irq, dev->slot_name);
  31.257 -        else
  31.258 -            printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of "
  31.259 -                   "device %s.\n", 'A' + pin - 1, dev->slot_name);
  31.260 -    }
  31.261 -
  31.262 -    return 0;
  31.263 -}
    32.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/process.c	Fri Oct 07 23:22:35 2005 +0100
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,448 +0,0 @@
    32.4 -/*
    32.5 - *  linux/arch/i386/kernel/process.c
    32.6 - *
    32.7 - *  Copyright (C) 1995  Linus Torvalds
    32.8 - *
    32.9 - *  Pentium III FXSR, SSE support
   32.10 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   32.11 - */
   32.12 -
   32.13 -/*
   32.14 - * This file handles the architecture-dependent parts of process handling..
   32.15 - */
   32.16 -
   32.17 -#define __KERNEL_SYSCALLS__
   32.18 -#include <stdarg.h>
   32.19 -
   32.20 -#include <linux/errno.h>
   32.21 -#include <linux/sched.h>
   32.22 -#include <linux/kernel.h>
   32.23 -#include <linux/mm.h>
   32.24 -#include <linux/smp.h>
   32.25 -#include <linux/smp_lock.h>
   32.26 -#include <linux/stddef.h>
   32.27 -#include <linux/unistd.h>
   32.28 -#include <linux/ptrace.h>
   32.29 -#include <linux/slab.h>
   32.30 -#include <linux/vmalloc.h>
   32.31 -#include <linux/user.h>
   32.32 -#include <linux/a.out.h>
   32.33 -#include <linux/interrupt.h>
   32.34 -#include <linux/config.h>
   32.35 -#include <linux/delay.h>
   32.36 -#include <linux/reboot.h>
   32.37 -#include <linux/init.h>
   32.38 -#include <linux/mc146818rtc.h>
   32.39 -
   32.40 -#include <asm/uaccess.h>
   32.41 -#include <asm/pgtable.h>
   32.42 -#include <asm/system.h>
   32.43 -#include <asm/io.h>
   32.44 -#include <asm/ldt.h>
   32.45 -#include <asm/processor.h>
   32.46 -#include <asm/i387.h>
   32.47 -#include <asm/desc.h>
   32.48 -#include <asm/mmu_context.h>
   32.49 -#include <asm-xen/xen-public/physdev.h>
   32.50 -
   32.51 -#include <linux/irq.h>
   32.52 -
   32.53 -asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
   32.54 -
   32.55 -int hlt_counter;
   32.56 -
   32.57 -/*
   32.58 - * Powermanagement idle function, if any..
   32.59 - */
   32.60 -void (*pm_idle)(void);
   32.61 -
   32.62 -/*
   32.63 - * Power off function, if any
   32.64 - */
   32.65 -void (*pm_power_off)(void);
   32.66 -
   32.67 -void disable_hlt(void)
   32.68 -{
   32.69 -    hlt_counter++;
   32.70 -}
   32.71 -
   32.72 -void enable_hlt(void)
   32.73 -{
   32.74 -    hlt_counter--;
   32.75 -}
   32.76 -
   32.77 -/*
   32.78 - * The idle thread. There's no useful work to be
   32.79 - * done, so just try to conserve power and have a
   32.80 - * low exit latency (ie sit in a loop waiting for
   32.81 - * somebody to say that they'd like to reschedule)
   32.82 - */
   32.83 -void cpu_idle (void)
   32.84 -{
   32.85 -    extern int set_timeout_timer(void);
   32.86 -
   32.87 -    /* Endless idle loop with no priority at all. */
   32.88 -    init_idle();
   32.89 -    current->nice = 20;
   32.90 -    current->counter = -100;
   32.91 -
   32.92 -    for ( ; ; )
   32.93 -    {
   32.94 -        while ( !current->need_resched )
   32.95 -        {
   32.96 -            __cli();
   32.97 -            if ( current->need_resched )
   32.98 -            {
   32.99 -                /* The race-free check for events failed. */
  32.100 -                __sti();
  32.101 -                break;
  32.102 -            }
  32.103 -            else if ( set_timeout_timer() == 0 )
  32.104 -            {
  32.105 -                /* NB. Blocking reenable events in a race-free manner. */
  32.106 -                HYPERVISOR_block();
  32.107 -            }
  32.108 -            else
  32.109 -            {
  32.110 -                /* No race here: yielding will get us the CPU again anyway. */
  32.111 -                __sti();
  32.112 -                HYPERVISOR_yield();
  32.113 -            }
  32.114 -        }
  32.115 -        schedule();
  32.116 -        check_pgt_cache();
  32.117 -    }
  32.118 -}
  32.119 -
  32.120 -extern void show_trace(unsigned long* esp);
  32.121 -
  32.122 -void show_regs(struct pt_regs * regs)
  32.123 -{
  32.124 -    printk("\n");
  32.125 -    printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
  32.126 -    printk("EIP: %04x:[<%08lx>] CPU: %d",0xffff & regs->xcs,regs->eip, smp_processor_id());
  32.127 -    if (regs->xcs & 2)
  32.128 -        printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
  32.129 -    printk(" EFLAGS: %08lx    %s\n",regs->eflags, print_tainted());
  32.130 -    printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
  32.131 -           regs->eax,regs->ebx,regs->ecx,regs->edx);
  32.132 -    printk("ESI: %08lx EDI: %08lx EBP: %08lx",
  32.133 -           regs->esi, regs->edi, regs->ebp);
  32.134 -    printk(" DS: %04x ES: %04x\n",
  32.135 -           0xffff & regs->xds,0xffff & regs->xes);
  32.136 -
  32.137 -    show_trace(&regs->esp);
  32.138 -}
  32.139 -
  32.140 -
  32.141 -/*
  32.142 - * Create a kernel thread
  32.143 - */
  32.144 -int arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
  32.145 -{
  32.146 -    long retval, d0;
  32.147 -
  32.148 -    __asm__ __volatile__(
  32.149 -        "movl %%esp,%%esi\n\t"
  32.150 -        "int $0x80\n\t"		/* Linux/i386 system call */
  32.151 -        "cmpl %%esp,%%esi\n\t"	/* child or parent? */
  32.152 -        "je 1f\n\t"		/* parent - jump */
  32.153 -        /* Load the argument into eax, and push it.  That way, it does
  32.154 -         * not matter whether the called function is compiled with
  32.155 -         * -mregparm or not.  */
  32.156 -        "movl %4,%%eax\n\t"
  32.157 -        "pushl %%eax\n\t"		
  32.158 -        "call *%5\n\t"		/* call fn */
  32.159 -        "movl %3,%0\n\t"	/* exit */
  32.160 -        "int $0x80\n"
  32.161 -        "1:\t"
  32.162 -        :"=&a" (retval), "=&S" (d0)
  32.163 -        :"0" (__NR_clone), "i" (__NR_exit),
  32.164 -        "r" (arg), "r" (fn),
  32.165 -        "b" (flags | CLONE_VM)
  32.166 -        : "memory");
  32.167 -
  32.168 -    return retval;
  32.169 -}
  32.170 -
  32.171 -/*
  32.172 - * Free current thread data structures etc..
  32.173 - */
  32.174 -void exit_thread(void)
  32.175 -{
  32.176 -    /* nothing to do ... */
  32.177 -}
  32.178 -
  32.179 -void flush_thread(void)
  32.180 -{
  32.181 -    struct task_struct *tsk = current;
  32.182 -
  32.183 -    memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
  32.184 -
  32.185 -    /*
  32.186 -     * Forget coprocessor state..
  32.187 -     */
  32.188 -    clear_fpu(tsk);
  32.189 -    tsk->used_math = 0;
  32.190 -}
  32.191 -
  32.192 -void release_thread(struct task_struct *dead_task)
  32.193 -{
  32.194 -    if (dead_task->mm) {
  32.195 -        // temporary debugging check
  32.196 -        if (dead_task->mm->context.size) {
  32.197 -            printk("WARNING: dead process %8s still has LDT? <%p/%08x>\n",
  32.198 -                   dead_task->comm, 
  32.199 -		   dead_task->mm->context.ldt,
  32.200 -		   dead_task->mm->context.size);
  32.201 -            BUG();
  32.202 -        }
  32.203 -    }
  32.204 -    //release_x86_irqs(dead_task);
  32.205 -}
  32.206 -
  32.207 -
  32.208 -/*
  32.209 - * Save a segment.
  32.210 - */
  32.211 -#define savesegment(seg,value) \
  32.212 -	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
  32.213 -
  32.214 -int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
  32.215 -                unsigned long unused,
  32.216 -                struct task_struct * p, struct pt_regs * regs)
  32.217 -{
  32.218 -    struct pt_regs * childregs;
  32.219 -
  32.220 -    childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p)) - 1;
  32.221 -    struct_cpy(childregs, regs);
  32.222 -    childregs->eax = 0;
  32.223 -    childregs->esp = esp;
  32.224 -
  32.225 -    p->thread.esp = (unsigned long) childregs;
  32.226 -    p->thread.esp0 = (unsigned long) (childregs+1);
  32.227 -
  32.228 -    p->thread.eip = (unsigned long) ret_from_fork;
  32.229 -
  32.230 -    savesegment(fs,p->thread.fs);
  32.231 -    savesegment(gs,p->thread.gs);
  32.232 -
  32.233 -    unlazy_fpu(current);
  32.234 -    struct_cpy(&p->thread.i387, &current->thread.i387);
  32.235 -
  32.236 -    p->thread.io_pl = current->thread.io_pl;
  32.237 -
  32.238 -    return 0;
  32.239 -}
  32.240 -
  32.241 -/*
  32.242 - * fill in the user structure for a core dump..
  32.243 - */
  32.244 -void dump_thread(struct pt_regs * regs, struct user * dump)
  32.245 -{
  32.246 -    int i;
  32.247 -
  32.248 -/* changed the size calculations - should hopefully work better. lbt */
  32.249 -    dump->magic = CMAGIC;
  32.250 -    dump->start_code = 0;
  32.251 -    dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
  32.252 -    dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
  32.253 -    dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
  32.254 -    dump->u_dsize -= dump->u_tsize;
  32.255 -    dump->u_ssize = 0;
  32.256 -    for (i = 0; i < 8; i++)
  32.257 -        dump->u_debugreg[i] = current->thread.debugreg[i];  
  32.258 -
  32.259 -    if (dump->start_stack < TASK_SIZE)
  32.260 -        dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
  32.261 -
  32.262 -    dump->regs.ebx = regs->ebx;
  32.263 -    dump->regs.ecx = regs->ecx;
  32.264 -    dump->regs.edx = regs->edx;
  32.265 -    dump->regs.esi = regs->esi;
  32.266 -    dump->regs.edi = regs->edi;
  32.267 -    dump->regs.ebp = regs->ebp;
  32.268 -    dump->regs.eax = regs->eax;
  32.269 -    dump->regs.ds = regs->xds;
  32.270 -    dump->regs.es = regs->xes;
  32.271 -    savesegment(fs,dump->regs.fs);
  32.272 -    savesegment(gs,dump->regs.gs);
  32.273 -    dump->regs.orig_eax = regs->orig_eax;
  32.274 -    dump->regs.eip = regs->eip;
  32.275 -    dump->regs.cs = regs->xcs;
  32.276 -    dump->regs.eflags = regs->eflags;
  32.277 -    dump->regs.esp = regs->esp;
  32.278 -    dump->regs.ss = regs->xss;
  32.279 -
  32.280 -    dump->u_fpvalid = dump_fpu (regs, &dump->i387);
  32.281 -}
  32.282 -
  32.283 -/*
  32.284 - *	switch_to(x,yn) should switch tasks from x to y.
  32.285 - *
  32.286 - * We fsave/fwait so that an exception goes off at the right time
  32.287 - * (as a call from the fsave or fwait in effect) rather than to
  32.288 - * the wrong process. Lazy FP saving no longer makes any sense
  32.289 - * with modern CPU's, and this simplifies a lot of things (SMP
  32.290 - * and UP become the same).
  32.291 - *
  32.292 - * NOTE! We used to use the x86 hardware context switching. The
  32.293 - * reason for not using it any more becomes apparent when you
  32.294 - * try to recover gracefully from saved state that is no longer
  32.295 - * valid (stale segment register values in particular). With the
  32.296 - * hardware task-switch, there is no way to fix up bad state in
  32.297 - * a reasonable manner.
  32.298 - *
  32.299 - * The fact that Intel documents the hardware task-switching to
  32.300 - * be slow is a fairly red herring - this code is not noticeably
  32.301 - * faster. However, there _is_ some room for improvement here,
  32.302 - * so the performance issues may eventually be a valid point.
  32.303 - * More important, however, is the fact that this allows us much
  32.304 - * more flexibility.
  32.305 - */
  32.306 -void fastcall __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
  32.307 -{
  32.308 -    struct thread_struct *next = &next_p->thread;
  32.309 -    physdev_op_t op;
  32.310 -    multicall_entry_t _mcl[8], *mcl = _mcl;
  32.311 -
  32.312 -    /*
  32.313 -     * This is basically 'unlazy_fpu', except that we queue a multicall to 
  32.314 -     * indicate FPU task switch, rather than synchronously trapping to Xen.
  32.315 -     */
  32.316 -    if ( prev_p->flags & PF_USEDFPU )
  32.317 -    {
  32.318 -	if ( cpu_has_fxsr )
  32.319 -            asm volatile( "fxsave %0 ; fnclex"
  32.320 -                          : "=m" (prev_p->thread.i387.fxsave) );
  32.321 -	else
  32.322 -            asm volatile( "fnsave %0 ; fwait"
  32.323 -                          : "=m" (prev_p->thread.i387.fsave) );
  32.324 -	prev_p->flags &= ~PF_USEDFPU;
  32.325 -        mcl->op      = __HYPERVISOR_fpu_taskswitch;
  32.326 -        mcl->args[0] = 1;
  32.327 -        mcl++;
  32.328 -    }
  32.329 -
  32.330 -    mcl->op      = __HYPERVISOR_stack_switch;
  32.331 -    mcl->args[0] = __KERNEL_DS;
  32.332 -    mcl->args[1] = next->esp0;
  32.333 -    mcl++;
  32.334 -
  32.335 -    if ( prev_p->thread.io_pl != next->io_pl ) 
  32.336 -    {
  32.337 -        op.cmd             = PHYSDEVOP_SET_IOPL;
  32.338 -	op.u.set_iopl.iopl = next->io_pl;
  32.339 -        mcl->op      = __HYPERVISOR_physdev_op;
  32.340 -        mcl->args[0] = (unsigned long)&op;
  32.341 -        mcl++;
  32.342 -    }
  32.343 -
  32.344 -    (void)HYPERVISOR_multicall(_mcl, mcl - _mcl);
  32.345 -
  32.346 -    /*
  32.347 -     * Restore %fs and %gs.
  32.348 -     */
  32.349 -    loadsegment(fs, next->fs);
  32.350 -    loadsegment(gs, next->gs);
  32.351 -
  32.352 -    /*
  32.353 -     * Now maybe reload the debug registers
  32.354 -     */
  32.355 -    if ( next->debugreg[7] != 0 )
  32.356 -    {
  32.357 -        HYPERVISOR_set_debugreg(0, next->debugreg[0]);
  32.358 -        HYPERVISOR_set_debugreg(1, next->debugreg[1]);
  32.359 -        HYPERVISOR_set_debugreg(2, next->debugreg[2]);
  32.360 -        HYPERVISOR_set_debugreg(3, next->debugreg[3]);
  32.361 -        /* no 4 and 5 */
  32.362 -        HYPERVISOR_set_debugreg(6, next->debugreg[6]);
  32.363 -        HYPERVISOR_set_debugreg(7, next->debugreg[7]);
  32.364 -    }
  32.365 -}
  32.366 -
  32.367 -asmlinkage int sys_fork(struct pt_regs regs)
  32.368 -{
  32.369 -    return do_fork(SIGCHLD, regs.esp, &regs, 0);
  32.370 -}
  32.371 -
  32.372 -asmlinkage int sys_clone(struct pt_regs regs)
  32.373 -{
  32.374 -    unsigned long clone_flags;
  32.375 -    unsigned long newsp;
  32.376 -
  32.377 -    clone_flags = regs.ebx;
  32.378 -    newsp = regs.ecx;
  32.379 -    if (!newsp)
  32.380 -        newsp = regs.esp;
  32.381 -    return do_fork(clone_flags, newsp, &regs, 0);
  32.382 -}
  32.383 -
  32.384 -/*
  32.385 - * This is trivial, and on the face of it looks like it
  32.386 - * could equally well be done in user mode.
  32.387 - *
  32.388 - * Not so, for quite unobvious reasons - register pressure.
  32.389 - * In user mode vfork() cannot have a stack frame, and if
  32.390 - * done by calling the "clone()" system call directly, you
  32.391 - * do not have enough call-clobbered registers to hold all
  32.392 - * the information you need.
  32.393 - */
  32.394 -asmlinkage int sys_vfork(struct pt_regs regs)
  32.395 -{
  32.396 -    return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0);
  32.397 -}
  32.398 -
  32.399 -/*
  32.400 - * sys_execve() executes a new program.
  32.401 - */
  32.402 -asmlinkage int sys_execve(struct pt_regs regs)
  32.403 -{
  32.404 -    int error;
  32.405 -    char * filename;
  32.406 -
  32.407 -    filename = getname((char *) regs.ebx);
  32.408 -    error = PTR_ERR(filename);
  32.409 -    if (IS_ERR(filename))
  32.410 -        goto out;
  32.411 -    error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, &regs);
  32.412 -    if (error == 0)
  32.413 -        current->ptrace &= ~PT_DTRACE;
  32.414 -    putname(filename);
  32.415 - out:
  32.416 -    return error;
  32.417 -}
  32.418 -
  32.419 -/*
  32.420 - * These bracket the sleeping functions..
  32.421 - */
  32.422 -extern void scheduling_functions_start_here(void);
  32.423 -extern void scheduling_functions_end_here(void);
  32.424 -#define first_sched	((unsigned long) scheduling_functions_start_here)
  32.425 -#define last_sched	((unsigned long) scheduling_functions_end_here)
  32.426 -
  32.427 -unsigned long get_wchan(struct task_struct *p)
  32.428 -{
  32.429 -    unsigned long ebp, esp, eip;
  32.430 -    unsigned long stack_page;
  32.431 -    int count = 0;
  32.432 -    if (!p || p == current || p->state == TASK_RUNNING)
  32.433 -        return 0;
  32.434 -    stack_page = (unsigned long)p;
  32.435 -    esp = p->thread.esp;
  32.436 -    if (!stack_page || esp < stack_page || esp > 8188+stack_page)
  32.437 -        return 0;
  32.438 -    /* include/asm-i386/system.h:switch_to() pushes ebp last. */
  32.439 -    ebp = *(unsigned long *) esp;
  32.440 -    do {
  32.441 -        if (ebp < stack_page || ebp > 8184+stack_page)
  32.442 -            return 0;
  32.443 -        eip = *(unsigned long *) (ebp+4);
  32.444 -        if (eip < first_sched || eip >= last_sched)
  32.445 -            return eip;
  32.446 -        ebp = *(unsigned long *) ebp;
  32.447 -    } while (count++ < 16);
  32.448 -    return 0;
  32.449 -}
  32.450 -#undef last_sched
  32.451 -#undef first_sched
    33.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/setup.c	Fri Oct 07 23:22:35 2005 +0100
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,1213 +0,0 @@
    33.4 -/*
    33.5 - *  linux/arch/i386/kernel/setup.c
    33.6 - *
    33.7 - *  Copyright (C) 1995  Linus Torvalds
    33.8 - */
    33.9 -
   33.10 -/*
   33.11 - * This file handles the architecture-dependent parts of initialization
   33.12 - */
   33.13 -
   33.14 -#define __KERNEL_SYSCALLS__
   33.15 -static int errno;
   33.16 -#include <linux/errno.h>
   33.17 -#include <linux/sched.h>
   33.18 -#include <linux/kernel.h>
   33.19 -#include <linux/mm.h>
   33.20 -#include <linux/stddef.h>
   33.21 -#include <linux/unistd.h>
   33.22 -#include <linux/ptrace.h>
   33.23 -#include <linux/slab.h>
   33.24 -#include <linux/user.h>
   33.25 -#include <linux/a.out.h>
   33.26 -#include <linux/tty.h>
   33.27 -#include <linux/ioport.h>
   33.28 -#include <linux/delay.h>
   33.29 -#include <linux/config.h>
   33.30 -#include <linux/init.h>
   33.31 -#include <linux/apm_bios.h>
   33.32 -#ifdef CONFIG_BLK_DEV_RAM
   33.33 -#include <linux/blk.h>
   33.34 -#endif
   33.35 -#include <linux/highmem.h>
   33.36 -#include <linux/bootmem.h>
   33.37 -#include <linux/seq_file.h>
   33.38 -#include <linux/reboot.h>
   33.39 -#include <asm/processor.h>
   33.40 -#include <linux/console.h>
   33.41 -#include <linux/module.h>
   33.42 -#include <asm/mtrr.h>
   33.43 -#include <asm/uaccess.h>
   33.44 -#include <asm/system.h>
   33.45 -#include <asm/io.h>
   33.46 -#include <asm/smp.h>
   33.47 -#include <asm/msr.h>
   33.48 -#include <asm/desc.h>
   33.49 -#include <asm/dma.h>
   33.50 -#include <asm/mpspec.h>
   33.51 -#include <asm/mmu_context.h>
   33.52 -#include <asm/ctrl_if.h>
   33.53 -#include <asm/hypervisor.h>
   33.54 -#include <asm-xen/xen-public/physdev.h>
   33.55 -#include <linux/netdevice.h>
   33.56 -#include <linux/rtnetlink.h>
   33.57 -#include <linux/tqueue.h>
   33.58 -#include <net/pkt_sched.h> /* dev_(de)activate */
   33.59 -
   33.60 -/*
   33.61 - * Point at the empty zero page to start with. We map the real shared_info
   33.62 - * page as soon as fixmap is up and running.
   33.63 - */
   33.64 -shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
   33.65 -
   33.66 -unsigned int *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
   33.67 -
   33.68 -/*
   33.69 - * Machine setup..
   33.70 - */
   33.71 -
   33.72 -char ignore_irq13;		/* set if exception 16 works */
   33.73 -struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
   33.74 -
   33.75 -unsigned long mmu_cr4_features;
   33.76 -
   33.77 -unsigned char * vgacon_mmap;
   33.78 -
   33.79 -/*
   33.80 - * Bus types ..
   33.81 - */
   33.82 -#ifdef CONFIG_EISA
   33.83 -int EISA_bus;
   33.84 -#endif
   33.85 -int MCA_bus;
   33.86 -
   33.87 -/* for MCA, but anyone else can use it if they want */
   33.88 -unsigned int machine_id;
   33.89 -unsigned int machine_submodel_id;
   33.90 -unsigned int BIOS_revision;
   33.91 -unsigned int mca_pentium_flag;
   33.92 -
   33.93 -/* For PCI or other memory-mapped resources */
   33.94 -unsigned long pci_mem_start = 0x10000000;
   33.95 -
   33.96 -/*
   33.97 - * Setup options
   33.98 - */
   33.99 -struct drive_info_struct { char dummy[32]; } drive_info;
  33.100 -struct screen_info screen_info;
  33.101 -struct apm_info apm_info;
  33.102 -struct sys_desc_table_struct {
  33.103 -    unsigned short length;
  33.104 -    unsigned char table[0];
  33.105 -};
  33.106 -
  33.107 -unsigned char aux_device_present;
  33.108 -
  33.109 -extern int root_mountflags;
  33.110 -extern char _text, _etext, _edata, _end;
  33.111 -
  33.112 -extern int blk_nohighio;
  33.113 -
  33.114 -int enable_acpi_smp_table;
  33.115 -
  33.116 -/* Raw start-of-day parameters from the hypervisor. */
  33.117 -union xen_start_info_union xen_start_info_union;
  33.118 -
  33.119 -#define COMMAND_LINE_SIZE MAX_GUEST_CMDLINE
  33.120 -static char command_line[COMMAND_LINE_SIZE];
  33.121 -char saved_command_line[COMMAND_LINE_SIZE];
  33.122 -
  33.123 -/* parse_mem_cmdline()
  33.124 - * returns the value of the mem= boot param converted to pages or 0
  33.125 - */ 
  33.126 -static int __init parse_mem_cmdline (char ** cmdline_p)
  33.127 -{
  33.128 -    char c = ' ', *to = command_line, *from = saved_command_line;
  33.129 -    int len = 0;
  33.130 -    unsigned long long bytes;
  33.131 -    int mem_param = 0;
  33.132 -
  33.133 -    /* Save unparsed command line copy for /proc/cmdline */
  33.134 -    memcpy(saved_command_line, xen_start_info.cmd_line, COMMAND_LINE_SIZE);
  33.135 -    saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
  33.136 -
  33.137 -    for (;;) {
  33.138 -        /*
  33.139 -         * "mem=nopentium" disables the 4MB page tables.
  33.140 -         * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
  33.141 -         * to <mem>, overriding the bios size.
  33.142 -         * "mem=XXX[KkmM]@XXX[KkmM]" defines a memory region from
  33.143 -         * <start> to <start>+<mem>, overriding the bios size.
  33.144 -         */
  33.145 -        if (c == ' ' && !memcmp(from, "mem=", 4)) {
  33.146 -            if (to != command_line)
  33.147 -                to--;
  33.148 -            if (!memcmp(from+4, "nopentium", 9)) {
  33.149 -                from += 9+4;
  33.150 -            } else if (!memcmp(from+4, "exactmap", 8)) {
  33.151 -                from += 8+4;
  33.152 -            } else {
  33.153 -                bytes = memparse(from+4, &from);
  33.154 -                mem_param = bytes>>PAGE_SHIFT;
  33.155 -		if (*from == '@')
  33.156 -                    (void)memparse(from+1, &from);
  33.157 -            }
  33.158 -        }
  33.159 -
  33.160 -        c = *(from++);
  33.161 -        if (!c)
  33.162 -            break;
  33.163 -        if (COMMAND_LINE_SIZE <= ++len)
  33.164 -            break;
  33.165 -        *(to++) = c;
  33.166 -    }
  33.167 -    *to = '\0';
  33.168 -    *cmdline_p = command_line;
  33.169 -
  33.170 -    return mem_param;
  33.171 -}
  33.172 -
  33.173 -/*
  33.174 - * Every exception-fixup table is sorted (i.e., kernel main table, and every
  33.175 - * module table. Some elements may be out of order if they reference text.init,
  33.176 - * for example. 
  33.177 - */
  33.178 -static void sort_exception_table(struct exception_table_entry *start,
  33.179 -                                 struct exception_table_entry *end)
  33.180 -{
  33.181 -    struct exception_table_entry *p, *q, tmp;
  33.182 -
  33.183 -    for ( p = start; p < end; p++ )
  33.184 -    {
  33.185 -        for ( q = p-1; q > start; q-- )
  33.186 -            if ( p->insn > q->insn )
  33.187 -                break;
  33.188 -        if ( ++q != p )
  33.189 -        {
  33.190 -            tmp = *p;
  33.191 -            memmove(q+1, q, (p-q)*sizeof(*p));
  33.192 -            *q = tmp;
  33.193 -        }
  33.194 -    }
  33.195 -}
  33.196 -
  33.197 -int xen_module_init(struct module *mod)
  33.198 -{
  33.199 -    sort_exception_table(mod->ex_table_start, mod->ex_table_end);
  33.200 -    return 0;
  33.201 -}
  33.202 -
  33.203 -void __init setup_arch(char **cmdline_p)
  33.204 -{
  33.205 -    int i,j;
  33.206 -    unsigned long bootmap_size, start_pfn, lmax_low_pfn;
  33.207 -    int mem_param;  /* user specified memory size in pages */
  33.208 -    int boot_pfn;   /* low pages available for bootmem */
  33.209 -    physdev_op_t op;
  33.210 -
  33.211 -    extern void hypervisor_callback(void);
  33.212 -    extern void failsafe_callback(void);
  33.213 -
  33.214 -    extern unsigned long cpu0_pte_quicklist[];
  33.215 -    extern unsigned long cpu0_pgd_quicklist[];
  33.216 -
  33.217 -    extern const struct exception_table_entry __start___ex_table[];
  33.218 -    extern const struct exception_table_entry __stop___ex_table[];
  33.219 -
  33.220 -    extern char _stext;
  33.221 -
  33.222 -    /* Force a quick death if the kernel panics. */
  33.223 -    extern int panic_timeout;
  33.224 -    if ( panic_timeout == 0 )
  33.225 -        panic_timeout = 1;
  33.226 -
  33.227 -    /* Ensure that the kernel exception-fixup table is sorted. */
  33.228 -    sort_exception_table(__start___ex_table, __stop___ex_table);
  33.229 -
  33.230 -#ifndef CONFIG_HIGHIO
  33.231 -    blk_nohighio = 1;
  33.232 -#endif
  33.233 -
  33.234 -    HYPERVISOR_vm_assist(
  33.235 -        VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
  33.236 -    HYPERVISOR_vm_assist(
  33.237 -        VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
  33.238 -        
  33.239 -    HYPERVISOR_set_callbacks(
  33.240 -        __KERNEL_CS, (unsigned long)hypervisor_callback,
  33.241 -        __KERNEL_CS, (unsigned long)failsafe_callback);
  33.242 -
  33.243 -    boot_cpu_data.pgd_quick = cpu0_pgd_quicklist;
  33.244 -    boot_cpu_data.pte_quick = cpu0_pte_quicklist;
  33.245 -
  33.246 -    /* This must be initialized to UNNAMED_MAJOR for ipconfig to work
  33.247 -       properly.  Setting ROOT_DEV to default to /dev/ram0 breaks initrd. */
  33.248 -    ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
  33.249 -    memset(&drive_info, 0, sizeof(drive_info));
  33.250 -    memset(&screen_info, 0, sizeof(screen_info));
  33.251 -    
  33.252 -    /* This is drawn from a dump from vgacon:startup in standard Linux. */
  33.253 -    screen_info.orig_video_mode = 3; 
  33.254 -    screen_info.orig_video_isVGA = 1;
  33.255 -    screen_info.orig_video_lines = 25;
  33.256 -    screen_info.orig_video_cols = 80;
  33.257 -    screen_info.orig_video_ega_bx = 3;
  33.258 -    screen_info.orig_video_points = 16;
  33.259 -
  33.260 -    memset(&apm_info.bios, 0, sizeof(apm_info.bios));
  33.261 -    aux_device_present = 0; 
  33.262 -#ifdef CONFIG_BLK_DEV_RAM
  33.263 -    rd_image_start = 0;
  33.264 -    rd_prompt = 0;
  33.265 -    rd_doload = 0;
  33.266 -#endif
  33.267 -
  33.268 -    root_mountflags &= ~MS_RDONLY;
  33.269 -    init_mm.start_code = (unsigned long) &_text;
  33.270 -    init_mm.end_code = (unsigned long) &_etext;
  33.271 -    init_mm.end_data = (unsigned long) &_edata;
  33.272 -    init_mm.brk = (unsigned long) &_end;
  33.273 -
  33.274 -    /* The mem= kernel command line param overrides the detected amount
  33.275 -     * of memory.   For xenolinux, if this override is larger than detected
  33.276 -     * memory, then boot using only detected memory and make provisions to
  33.277 -     * use all of the override value.   The hypervisor can give this
  33.278 -     * domain more memory later on and it will be added to the free
  33.279 -     * lists at that time.   See claim_new_pages() in
  33.280 -     * arch/xen/drivers/balloon/balloon.c
  33.281 -     */
  33.282 -    mem_param = parse_mem_cmdline(cmdline_p);
  33.283 -    if (mem_param < xen_start_info.nr_pages)
  33.284 -        mem_param = xen_start_info.nr_pages;
  33.285 -
  33.286 -#define PFN_UP(x)	(((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
  33.287 -#define PFN_DOWN(x)	((x) >> PAGE_SHIFT)
  33.288 -#define PFN_PHYS(x)	((x) << PAGE_SHIFT)
  33.289 -
  33.290 -/*
  33.291 - * 128MB for vmalloc(), iomap(), kmap(), and fixaddr mappings.
  33.292 - */
  33.293 -#define VMALLOC_RESERVE	(unsigned long)(128 << 20)
  33.294 -#define MAXMEM		(unsigned long)(HYPERVISOR_VIRT_START-PAGE_OFFSET-VMALLOC_RESERVE)
  33.295 -#define MAXMEM_PFN	PFN_DOWN(MAXMEM)
  33.296 -#define MAX_NONPAE_PFN	(1 << 20)
  33.297 -
  33.298 -    /*
  33.299 -     * Determine low and high memory ranges:
  33.300 -     */
  33.301 -    lmax_low_pfn = max_pfn = mem_param;
  33.302 -    if (lmax_low_pfn > MAXMEM_PFN) {
  33.303 -        lmax_low_pfn = MAXMEM_PFN;
  33.304 -#ifndef CONFIG_HIGHMEM
  33.305 -        /* Maximum memory usable is what is directly addressable */
  33.306 -        printk(KERN_WARNING "Warning only %ldMB will be used.\n",
  33.307 -               MAXMEM>>20);
  33.308 -        if (max_pfn > MAX_NONPAE_PFN)
  33.309 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  33.310 -        else
  33.311 -            printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
  33.312 -        max_pfn = lmax_low_pfn;
  33.313 -#else /* !CONFIG_HIGHMEM */
  33.314 -#ifndef CONFIG_X86_PAE
  33.315 -        if (max_pfn > MAX_NONPAE_PFN) {
  33.316 -            max_pfn = MAX_NONPAE_PFN;
  33.317 -            printk(KERN_WARNING "Warning only 4GB will be used.\n");
  33.318 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  33.319 -        }
  33.320 -#endif /* !CONFIG_X86_PAE */
  33.321 -#endif /* !CONFIG_HIGHMEM */
  33.322 -    }
  33.323 -
  33.324 -#ifdef CONFIG_HIGHMEM
  33.325 -    highstart_pfn = highend_pfn = max_pfn;
  33.326 -    if (max_pfn > MAXMEM_PFN) {
  33.327 -        highstart_pfn = MAXMEM_PFN;
  33.328 -        printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
  33.329 -               pages_to_mb(highend_pfn - highstart_pfn));
  33.330 -    }
  33.331 -#endif
  33.332 -
  33.333 -    phys_to_machine_mapping = (unsigned int *)xen_start_info.mfn_list;
  33.334 -    cur_pgd = init_mm.pgd = (pgd_t *)xen_start_info.pt_base;
  33.335 -
  33.336 -    start_pfn = (__pa(xen_start_info.pt_base) >> PAGE_SHIFT) + 
  33.337 -        xen_start_info.nr_pt_frames;
  33.338 -
  33.339 -    /*
  33.340 -     * Initialize the boot-time allocator, and free up all RAM. Then reserve 
  33.341 -     * space for OS image, initrd, phys->machine table, bootstrap page table,
  33.342 -     * and the bootmem bitmap. 
  33.343 -     * NB. There is definitely enough room for the bootmem bitmap in the
  33.344 -     * bootstrap page table. We are guaranteed to get >=512kB unused 'padding'
  33.345 -     * for our own use after all bootstrap elements 
  33.346 -     * (see asm-xen/xen-public/xen.h).
  33.347 -     */
  33.348 -    boot_pfn = min((int)xen_start_info.nr_pages,lmax_low_pfn);
  33.349 -    bootmap_size = init_bootmem(start_pfn,boot_pfn);
  33.350 -    free_bootmem(0, PFN_PHYS(boot_pfn));
  33.351 -    reserve_bootmem(__pa(&_stext), 
  33.352 -                    PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1 - 
  33.353 -                    __pa(&_stext));
  33.354 -
  33.355 -    /* init_bootmem() set the global max_low_pfn to boot_pfn.  Now max_low_pfn 
  33.356 -     * can be set to the override value.
  33.357 -     */
  33.358 -    max_low_pfn = lmax_low_pfn;
  33.359 -
  33.360 -#ifdef CONFIG_BLK_DEV_INITRD
  33.361 -    if ( xen_start_info.mod_start != 0 )
  33.362 -    {
  33.363 -        if ( (__pa(xen_start_info.mod_start) + xen_start_info.mod_len) <= 
  33.364 -             (max_low_pfn << PAGE_SHIFT) )
  33.365 -        {
  33.366 -            initrd_start = xen_start_info.mod_start;
  33.367 -            initrd_end   = initrd_start + xen_start_info.mod_len;
  33.368 -            initrd_below_start_ok = 1;
  33.369 -        }
  33.370 -        else
  33.371 -        {
  33.372 -            printk(KERN_ERR "initrd extends beyond end of memory "
  33.373 -                   "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
  33.374 -                   __pa(xen_start_info.mod_start) + xen_start_info.mod_len,
  33.375 -                   max_low_pfn << PAGE_SHIFT);
  33.376 -            initrd_start = 0;
  33.377 -        }
  33.378 -    }
  33.379 -#endif
  33.380 -
  33.381 -    paging_init();
  33.382 -
  33.383 -    /* Make sure we have a correctly sized P->M table. */
  33.384 -    if ( max_pfn != xen_start_info.nr_pages )
  33.385 -    {
  33.386 -        phys_to_machine_mapping = alloc_bootmem_low_pages(
  33.387 -            max_pfn * sizeof(unsigned long));
  33.388 -        if ( max_pfn > xen_start_info.nr_pages )
  33.389 -        {
  33.390 -            memset(phys_to_machine_mapping, ~0,
  33.391 -                   max_pfn * sizeof(unsigned long));
  33.392 -            memcpy(phys_to_machine_mapping,
  33.393 -                   (unsigned long *)xen_start_info.mfn_list,
  33.394 -                   xen_start_info.nr_pages * sizeof(unsigned long));
  33.395 -        }
  33.396 -        else
  33.397 -        {
  33.398 -            memcpy(phys_to_machine_mapping,
  33.399 -                   (unsigned long *)xen_start_info.mfn_list,
  33.400 -                   max_pfn * sizeof(unsigned long));
  33.401 -            if (HYPERVISOR_dom_mem_op(
  33.402 -                MEMOP_decrease_reservation,
  33.403 -                (unsigned long *)xen_start_info.mfn_list + max_pfn,
  33.404 -                xen_start_info.nr_pages - max_pfn, 0) !=
  33.405 -                (xen_start_info.nr_pages - max_pfn))
  33.406 -                BUG();
  33.407 -        }
  33.408 -        free_bootmem(__pa(xen_start_info.mfn_list), 
  33.409 -                     PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
  33.410 -                                     sizeof(unsigned long))));
  33.411 -    }
  33.412 -
  33.413 -    pfn_to_mfn_frame_list = alloc_bootmem_low_pages(PAGE_SIZE);
  33.414 -    for ( i=0, j=0; i < max_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ )
  33.415 -    {	
  33.416 -        pfn_to_mfn_frame_list[j] = 
  33.417 -            virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
  33.418 -    }
  33.419 -    HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
  33.420 -	virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
  33.421 -
  33.422 -    op.cmd             = PHYSDEVOP_SET_IOPL;
  33.423 -    op.u.set_iopl.iopl = current->thread.io_pl = 1;
  33.424 -    HYPERVISOR_physdev_op(&op);
  33.425 -
  33.426 -    if (xen_start_info.flags & SIF_INITDOMAIN )
  33.427 -    {
  33.428 -        if( !(xen_start_info.flags & SIF_PRIVILEGED) )
  33.429 -            panic("Xen granted us console access but not privileged status");
  33.430 -
  33.431 -#if defined(CONFIG_VT)
  33.432 -#if defined(CONFIG_VGA_CONSOLE)
  33.433 -        conswitchp = &vga_con;
  33.434 -#elif defined(CONFIG_DUMMY_CONSOLE)
  33.435 -        conswitchp = &dummy_con;
  33.436 -#endif
  33.437 -#endif
  33.438 -    }
  33.439 -}
  33.440 -
  33.441 -static int cachesize_override __initdata = -1;
  33.442 -static int __init cachesize_setup(char *str)
  33.443 -{
  33.444 -    get_option (&str, &cachesize_override);
  33.445 -    return 1;
  33.446 -}
  33.447 -__setup("cachesize=", cachesize_setup);
  33.448 -
  33.449 -static int __init highio_setup(char *str)
  33.450 -{
  33.451 -    printk("i386: disabling HIGHMEM block I/O\n");
  33.452 -    blk_nohighio = 1;
  33.453 -    return 1;
  33.454 -}
  33.455 -__setup("nohighio", highio_setup);
  33.456 -
  33.457 -static int __init get_model_name(struct cpuinfo_x86 *c)
  33.458 -{
  33.459 -    unsigned int *v;
  33.460 -    char *p, *q;
  33.461 -
  33.462 -    if (cpuid_eax(0x80000000) < 0x80000004)
  33.463 -        return 0;
  33.464 -
  33.465 -    v = (unsigned int *) c->x86_model_id;
  33.466 -    cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
  33.467 -    cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
  33.468 -    cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
  33.469 -    c->x86_model_id[48] = 0;
  33.470 -
  33.471 -    /* Intel chips right-justify this string for some dumb reason;
  33.472 -       undo that brain damage */
  33.473 -    p = q = &c->x86_model_id[0];
  33.474 -    while ( *p == ' ' )
  33.475 -        p++;
  33.476 -    if ( p != q ) {
  33.477 -        while ( *p )
  33.478 -            *q++ = *p++;
  33.479 -        while ( q <= &c->x86_model_id[48] )
  33.480 -            *q++ = '\0';	/* Zero-pad the rest */
  33.481 -    }
  33.482 -
  33.483 -    return 1;
  33.484 -}
  33.485 -
  33.486 -
  33.487 -static void __init display_cacheinfo(struct cpuinfo_x86 *c)
  33.488 -{
  33.489 -    unsigned int n, dummy, ecx, edx, l2size;
  33.490 -
  33.491 -    n = cpuid_eax(0x80000000);
  33.492 -
  33.493 -    if (n >= 0x80000005) {
  33.494 -        cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
  33.495 -        printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n",
  33.496 -               edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
  33.497 -        c->x86_cache_size=(ecx>>24)+(edx>>24);	
  33.498 -    }
  33.499 -
  33.500 -    if (n < 0x80000006)	/* Some chips just has a large L1. */
  33.501 -        return;
  33.502 -
  33.503 -    ecx = cpuid_ecx(0x80000006);
  33.504 -    l2size = ecx >> 16;
  33.505 -
  33.506 -    /* AMD errata T13 (order #21922) */
  33.507 -    if ((c->x86_vendor == X86_VENDOR_AMD) && (c->x86 == 6)) {
  33.508 -        if (c->x86_model == 3 && c->x86_mask == 0)	/* Duron Rev A0 */
  33.509 -            l2size = 64;
  33.510 -        if (c->x86_model == 4 &&
  33.511 -            (c->x86_mask==0 || c->x86_mask==1))	/* Tbird rev A1/A2 */
  33.512 -            l2size = 256;
  33.513 -    }
  33.514 -
  33.515 -    /* Intel PIII Tualatin. This comes in two flavours.
  33.516 -     * One has 256kb of cache, the other 512. We have no way
  33.517 -     * to determine which, so we use a boottime override
  33.518 -     * for the 512kb model, and assume 256 otherwise.
  33.519 -     */
  33.520 -    if ((c->x86_vendor == X86_VENDOR_INTEL) && (c->x86 == 6) &&
  33.521 -        (c->x86_model == 11) && (l2size == 0))
  33.522 -        l2size = 256;
  33.523 -
  33.524 -    if (c->x86_vendor == X86_VENDOR_CENTAUR) {
  33.525 -	/* VIA C3 CPUs (670-68F) need further shifting. */
  33.526 -	if ((c->x86 == 6) &&
  33.527 -	    ((c->x86_model == 7) || (c->x86_model == 8))) {
  33.528 -		l2size >>= 8;
  33.529 -	}
  33.530 -
  33.531 -	/* VIA also screwed up Nehemiah stepping 1, and made
  33.532 -	   it return '65KB' instead of '64KB'
  33.533 -	   - Note, it seems this may only be in engineering samples. */
  33.534 -	if ((c->x86==6) && (c->x86_model==9) &&
  33.535 -	    (c->x86_mask==1) && (l2size==65))
  33.536 -		l2size -= 1;
  33.537 -    }
  33.538 -
  33.539 -    /* Allow user to override all this if necessary. */
  33.540 -    if (cachesize_override != -1)
  33.541 -        l2size = cachesize_override;
  33.542 -
  33.543 -    if ( l2size == 0 )
  33.544 -        return;		/* Again, no L2 cache is possible */
  33.545 -
  33.546 -    c->x86_cache_size = l2size;
  33.547 -
  33.548 -    printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n",
  33.549 -           l2size, ecx & 0xFF);
  33.550 -}
  33.551 -
  33.552 -static void __init init_c3(struct cpuinfo_x86 *c)
  33.553 -{
  33.554 -    /* Test for Centaur Extended Feature Flags presence */
  33.555 -    if (cpuid_eax(0xC0000000) >= 0xC0000001) {
  33.556 -        /* store Centaur Extended Feature Flags as
  33.557 -         * word 5 of the CPU capability bit array
  33.558 -         */
  33.559 -        c->x86_capability[5] = cpuid_edx(0xC0000001);
  33.560 -    }
  33.561 -   
  33.562 -    switch (c->x86_model) {
  33.563 -    case 9:	/* Nehemiah */
  33.564 -    default:
  33.565 -        get_model_name(c);
  33.566 -        display_cacheinfo(c);
  33.567 -        break;
  33.568 -    }
  33.569 -}
  33.570 -
  33.571 -static void __init init_centaur(struct cpuinfo_x86 *c)
  33.572 -{
  33.573 -    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  33.574 -       3DNow is IDd by bit 31 in extended CPUID (1*3231) anyway */
  33.575 -    clear_bit(0*32+31, &c->x86_capability);
  33.576 -  
  33.577 -    switch (c->x86) {
  33.578 -    case 6:
  33.579 -        init_c3(c);
  33.580 -        break;
  33.581 -    default:
  33.582 -        panic("Unsupported Centaur CPU (%i)\n", c->x86);
  33.583 -    }
  33.584 -}
  33.585 -
  33.586 -static int __init init_amd(struct cpuinfo_x86 *c)
  33.587 -{
  33.588 -    int r;
  33.589 -
  33.590 -    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  33.591 -       3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
  33.592 -    clear_bit(0*32+31, &c->x86_capability);
  33.593 -	
  33.594 -    r = get_model_name(c);
  33.595 -
  33.596 -    switch(c->x86)
  33.597 -    {
  33.598 -    case 5: /* We don't like AMD K6 */
  33.599 -        panic("Unsupported AMD processor\n");
  33.600 -    case 6:	/* An Athlon/Duron. We can trust the BIOS probably */
  33.601 -        break;
  33.602 -    }
  33.603 -
  33.604 -    display_cacheinfo(c);
  33.605 -    return r;
  33.606 -}
  33.607 -
  33.608 -
  33.609 -static void __init init_intel(struct cpuinfo_x86 *c)
  33.610 -{
  33.611 -    char *p = NULL;
  33.612 -    unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */
  33.613 -
  33.614 -    if (c->cpuid_level > 1) {
  33.615 -        /* supports eax=2  call */
  33.616 -        int i, j, n;
  33.617 -        int regs[4];
  33.618 -        unsigned char *dp = (unsigned char *)regs;
  33.619 -
  33.620 -        /* Number of times to iterate */
  33.621 -        n = cpuid_eax(2) & 0xFF;
  33.622 -
  33.623 -        for ( i = 0 ; i < n ; i++ ) {
  33.624 -            cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
  33.625 -			
  33.626 -            /* If bit 31 is set, this is an unknown format */
  33.627 -            for ( j = 0 ; j < 3 ; j++ ) {
  33.628 -                if ( regs[j] < 0 ) regs[j] = 0;
  33.629 -            }
  33.630 -
  33.631 -            /* Byte 0 is level count, not a descriptor */
  33.632 -            for ( j = 1 ; j < 16 ; j++ ) {
  33.633 -                unsigned char des = dp[j];
  33.634 -                unsigned char dl, dh;
  33.635 -                unsigned int cs;
  33.636 -
  33.637 -                dh = des >> 4;
  33.638 -                dl = des & 0x0F;
  33.639 -
  33.640 -				/* Black magic... */
  33.641 -
  33.642 -                switch ( dh )
  33.643 -                {
  33.644 -                case 0:
  33.645 -                    switch ( dl ) {
  33.646 -                    case 6:
  33.647 -                        /* L1 I cache */
  33.648 -                        l1i += 8;
  33.649 -                        break;
  33.650 -                    case 8:
  33.651 -                        /* L1 I cache */
  33.652 -                        l1i += 16;
  33.653 -                        break;
  33.654 -                    case 10:
  33.655 -                        /* L1 D cache */
  33.656 -                        l1d += 8;
  33.657 -                        break;
  33.658 -                    case 12:
  33.659 -                        /* L1 D cache */
  33.660 -                        l1d += 16;
  33.661 -                        break;
  33.662 -                    default:;
  33.663 -                        /* TLB, or unknown */
  33.664 -                    }
  33.665 -                    break;
  33.666 -                case 2:
  33.667 -                    if ( dl ) {
  33.668 -                        /* L3 cache */
  33.669 -                        cs = (dl-1) << 9;
  33.670 -                        l3 += cs;
  33.671 -                    }
  33.672 -                    break;
  33.673 -                case 4:
  33.674 -                    if ( c->x86 > 6 && dl ) {
  33.675 -                        /* P4 family */
  33.676 -                        /* L3 cache */
  33.677 -                        cs = 128 << (dl-1);
  33.678 -                        l3 += cs;
  33.679 -                        break;
  33.680 -                    }
  33.681 -                    /* else same as 8 - fall through */
  33.682 -                case 8:
  33.683 -                    if ( dl ) {
  33.684 -                        /* L2 cache */
  33.685 -                        cs = 128 << (dl-1);
  33.686 -                        l2 += cs;
  33.687 -                    }
  33.688 -                    break;
  33.689 -                case 6:
  33.690 -                    if (dl > 5) {
  33.691 -                        /* L1 D cache */
  33.692 -                        cs = 8<<(dl-6);
  33.693 -                        l1d += cs;
  33.694 -                    }
  33.695 -                    break;
  33.696 -                case 7:
  33.697 -                    if ( dl >= 8 ) 
  33.698 -                    {
  33.699 -                        /* L2 cache */
  33.700 -                        cs = 64<<(dl-8);
  33.701 -                        l2 += cs;
  33.702 -                    } else {
  33.703 -                        /* L0 I cache, count as L1 */
  33.704 -                        cs = dl ? (16 << (dl-1)) : 12;
  33.705 -                        l1i += cs;
  33.706 -                    }
  33.707 -                    break;
  33.708 -                default:
  33.709 -                    /* TLB, or something else we don't know about */
  33.710 -                    break;
  33.711 -                }
  33.712 -            }
  33.713 -        }
  33.714 -        if ( l1i || l1d )
  33.715 -            printk(KERN_INFO "CPU: L1 I cache: %dK, L1 D cache: %dK\n",
  33.716 -                   l1i, l1d);
  33.717 -        if ( l2 )
  33.718 -            printk(KERN_INFO "CPU: L2 cache: %dK\n", l2);
  33.719 -        if ( l3 )
  33.720 -            printk(KERN_INFO "CPU: L3 cache: %dK\n", l3);
  33.721 -
  33.722 -        /*
  33.723 -         * This assumes the L3 cache is shared; it typically lives in
  33.724 -         * the northbridge.  The L1 caches are included by the L2
  33.725 -         * cache, and so should not be included for the purpose of
  33.726 -         * SMP switching weights.
  33.727 -         */
  33.728 -        c->x86_cache_size = l2 ? l2 : (l1i+l1d);
  33.729 -    }
  33.730 -
  33.731 -    /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it */
  33.732 -    if ( c->x86 == 6 && c->x86_model < 3 && c->x86_mask < 3 )
  33.733 -        clear_bit(X86_FEATURE_SEP, &c->x86_capability);
  33.734 -	
  33.735 -    /* Names for the Pentium II/Celeron processors 
  33.736 -       detectable only by also checking the cache size.
  33.737 -       Dixon is NOT a Celeron. */
  33.738 -    if (c->x86 == 6) {
  33.739 -        switch (c->x86_model) {
  33.740 -        case 5:
  33.741 -            if (l2 == 0)
  33.742 -                p = "Celeron (Covington)";
  33.743 -            if (l2 == 256)
  33.744 -                p = "Mobile Pentium II (Dixon)";
  33.745 -            break;
  33.746 -			
  33.747 -        case 6:
  33.748 -            if (l2 == 128)
  33.749 -                p = "Celeron (Mendocino)";
  33.750 -            break;
  33.751 -			
  33.752 -        case 8:
  33.753 -            if (l2 == 128)
  33.754 -                p = "Celeron (Coppermine)";
  33.755 -            break;
  33.756 -        }
  33.757 -    }
  33.758 -
  33.759 -    if ( p )
  33.760 -        strcpy(c->x86_model_id, p);
  33.761 -}
  33.762 -
  33.763 -void __init get_cpu_vendor(struct cpuinfo_x86 *c)
  33.764 -{
  33.765 -    char *v = c->x86_vendor_id;
  33.766 -
  33.767 -    if (!strcmp(v, "GenuineIntel"))
  33.768 -        c->x86_vendor = X86_VENDOR_INTEL;
  33.769 -    else if (!strcmp(v, "AuthenticAMD"))
  33.770 -        c->x86_vendor = X86_VENDOR_AMD;
  33.771 -    else if (!strcmp(v, "CentaurHauls"))
  33.772 -        c->x86_vendor = X86_VENDOR_CENTAUR;
  33.773 -    else
  33.774 -        c->x86_vendor = X86_VENDOR_UNKNOWN;
  33.775 -}
  33.776 -
  33.777 -struct cpu_model_info {
  33.778 -    int vendor;
  33.779 -    int family;
  33.780 -    char *model_names[16];
  33.781 -};
  33.782 -
  33.783 -/* Naming convention should be: <Name> [(<Codename>)] */
  33.784 -/* This table only is used unless init_<vendor>() below doesn't set it; */
  33.785 -/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
  33.786 -static struct cpu_model_info cpu_models[] __initdata = {
  33.787 -    { X86_VENDOR_INTEL,	6,
  33.788 -      { "Pentium Pro A-step", "Pentium Pro", NULL, "Pentium II (Klamath)", 
  33.789 -        NULL, "Pentium II (Deschutes)", "Mobile Pentium II",
  33.790 -        "Pentium III (Katmai)", "Pentium III (Coppermine)", NULL,
  33.791 -        "Pentium III (Cascades)", NULL, NULL, NULL, NULL }},
  33.792 -    { X86_VENDOR_AMD,	6, /* Is this this really necessary?? */
  33.793 -      { "Athlon", "Athlon",
  33.794 -        "Athlon", NULL, "Athlon", NULL,
  33.795 -        NULL, NULL, NULL,
  33.796 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL }}
  33.797 -};
  33.798 -
  33.799 -/* Look up CPU names by table lookup. */
  33.800 -static char __init *table_lookup_model(struct cpuinfo_x86 *c)
  33.801 -{
  33.802 -    struct cpu_model_info *info = cpu_models;
  33.803 -    int i;
  33.804 -
  33.805 -    if ( c->x86_model >= 16 )
  33.806 -        return NULL;	/* Range check */
  33.807 -
  33.808 -    for ( i = 0 ; i < sizeof(cpu_models)/sizeof(struct cpu_model_info) ; i++ ) {
  33.809 -        if ( info->vendor == c->x86_vendor &&
  33.810 -             info->family == c->x86 ) {
  33.811 -            return info->model_names[c->x86_model];
  33.812 -        }
  33.813 -        info++;
  33.814 -    }
  33.815 -    return NULL;		/* Not found */
  33.816 -}
  33.817 -
  33.818 -
  33.819 -
  33.820 -/* Standard macro to see if a specific flag is changeable */
  33.821 -static inline int flag_is_changeable_p(u32 flag)
  33.822 -{
  33.823 -    u32 f1, f2;
  33.824 -
  33.825 -    asm("pushfl\n\t"
  33.826 -        "pushfl\n\t"
  33.827 -        "popl %0\n\t"
  33.828 -        "movl %0,%1\n\t"
  33.829 -        "xorl %2,%0\n\t"
  33.830 -        "pushl %0\n\t"
  33.831 -        "popfl\n\t"
  33.832 -        "pushfl\n\t"
  33.833 -        "popl %0\n\t"
  33.834 -        "popfl\n\t"
  33.835 -        : "=&r" (f1), "=&r" (f2)
  33.836 -        : "ir" (flag));
  33.837 -
  33.838 -    return ((f1^f2) & flag) != 0;
  33.839 -}
  33.840 -
  33.841 -
  33.842 -/* Probe for the CPUID instruction */
  33.843 -static int __init have_cpuid_p(void)
  33.844 -{
  33.845 -    return flag_is_changeable_p(X86_EFLAGS_ID);
  33.846 -}
  33.847 -
  33.848 -
  33.849 -
  33.850 -#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
  33.851 -unsigned char eddnr;
  33.852 -struct edd_info edd[EDDMAXNR];
  33.853 -unsigned int edd_disk80_sig;
  33.854 -/**
  33.855 - * copy_edd() - Copy the BIOS EDD information
  33.856 - *              from empty_zero_page into a safe place.
  33.857 - *
  33.858 - */
  33.859 -static inline void copy_edd(void)
  33.860 -{
  33.861 -     eddnr = EDD_NR;
  33.862 -     memcpy(edd, EDD_BUF, sizeof(edd));
  33.863 -     edd_disk80_sig = DISK80_SIGNATURE_BUFFER;
  33.864 -}
  33.865 -#else
  33.866 -static inline void copy_edd(void) {}
  33.867 -#endif
  33.868 -
  33.869 -/*
  33.870 - * This does the hard work of actually picking apart the CPU stuff...
  33.871 - */
  33.872 -void __init identify_cpu(struct cpuinfo_x86 *c)
  33.873 -{
  33.874 -    int junk, i;
  33.875 -    u32 xlvl, tfms;
  33.876 -
  33.877 -    c->loops_per_jiffy = loops_per_jiffy;
  33.878 -    c->x86_cache_size = -1;
  33.879 -    c->x86_vendor = X86_VENDOR_UNKNOWN;
  33.880 -    c->cpuid_level = -1;	/* CPUID not detected */
  33.881 -    c->x86_model = c->x86_mask = 0;	/* So far unknown... */
  33.882 -    c->x86_vendor_id[0] = '\0'; /* Unset */
  33.883 -    c->x86_model_id[0] = '\0';  /* Unset */
  33.884 -    memset(&c->x86_capability, 0, sizeof c->x86_capability);
  33.885 -    c->hard_math = 1;
  33.886 -
  33.887 -    if ( !have_cpuid_p() ) {
  33.888 -        panic("Processor must support CPUID\n");
  33.889 -    } else {
  33.890 -        /* CPU does have CPUID */
  33.891 -
  33.892 -        /* Get vendor name */
  33.893 -        cpuid(0x00000000, &c->cpuid_level,
  33.894 -              (int *)&c->x86_vendor_id[0],
  33.895 -              (int *)&c->x86_vendor_id[8],
  33.896 -              (int *)&c->x86_vendor_id[4]);
  33.897 -		
  33.898 -        get_cpu_vendor(c);
  33.899 -        /* Initialize the standard set of capabilities */
  33.900 -        /* Note that the vendor-specific code below might override */
  33.901 -
  33.902 -        /* Intel-defined flags: level 0x00000001 */
  33.903 -        if ( c->cpuid_level >= 0x00000001 ) {
  33.904 -                        u32 capability, excap;
  33.905 -                        cpuid(0x00000001, &tfms, &junk, &excap, &capability);
  33.906 -                        c->x86_capability[0] = capability;
  33.907 -                        c->x86_capability[4] = excap;
  33.908 -                        c->x86 = (tfms >> 8) & 15;
  33.909 -                        c->x86_model = (tfms >> 4) & 15;
  33.910 -                        if (c->x86 == 0xf) {
  33.911 -                                c->x86 += (tfms >> 20) & 0xff;
  33.912 -                                c->x86_model += ((tfms >> 16) & 0xF) << 4;
  33.913 -                        }
  33.914 -                        c->x86_mask = tfms & 15;
  33.915 -        } else {
  33.916 -            /* Have CPUID level 0 only - unheard of */
  33.917 -            c->x86 = 4;
  33.918 -        }
  33.919 -
  33.920 -        /* AMD-defined flags: level 0x80000001 */
  33.921 -        xlvl = cpuid_eax(0x80000000);
  33.922 -        if ( (xlvl & 0xffff0000) == 0x80000000 ) {
  33.923 -            if ( xlvl >= 0x80000001 )
  33.924 -                c->x86_capability[1] = cpuid_edx(0x80000001);
  33.925 -            if ( xlvl >= 0x80000004 )
  33.926 -                get_model_name(c); /* Default name */
  33.927 -        }
  33.928 -
  33.929 -        /* Transmeta-defined flags: level 0x80860001 */
  33.930 -        xlvl = cpuid_eax(0x80860000);
  33.931 -        if ( (xlvl & 0xffff0000) == 0x80860000 ) {
  33.932 -            if (  xlvl >= 0x80860001 )
  33.933 -                c->x86_capability[2] = cpuid_edx(0x80860001);
  33.934 -        }
  33.935 -    }
  33.936 -
  33.937 -    printk(KERN_DEBUG "CPU: Before vendor init, caps: %08x %08x %08x, vendor = %d\n",
  33.938 -           c->x86_capability[0],
  33.939 -           c->x86_capability[1],
  33.940 -           c->x86_capability[2],
  33.941 -           c->x86_vendor);
  33.942 -
  33.943 -    /*
  33.944 -     * Vendor-specific initialization.  In this section we
  33.945 -     * canonicalize the feature flags, meaning if there are
  33.946 -     * features a certain CPU supports which CPUID doesn't
  33.947 -     * tell us, CPUID claiming incorrect flags, or other bugs,
  33.948 -     * we handle them here.
  33.949 -     *
  33.950 -     * At the end of this section, c->x86_capability better
  33.951 -     * indicate the features this CPU genuinely supports!
  33.952 -     */
  33.953 -    switch ( c->x86_vendor ) {
  33.954 -    case X86_VENDOR_AMD:
  33.955 -        init_amd(c);
  33.956 -        break;
  33.957 -
  33.958 -    case X86_VENDOR_INTEL:
  33.959 -        init_intel(c);
  33.960 -        break;
  33.961 -
  33.962 -    case X86_VENDOR_CENTAUR:
  33.963 -        init_centaur(c);
  33.964 -        break;
  33.965 -        
  33.966 -    default:
  33.967 -        printk("Unsupported CPU vendor (%d) -- please report!\n",
  33.968 -               c->x86_vendor);
  33.969 -    }
  33.970 -	
  33.971 -    printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n",
  33.972 -           c->x86_capability[0],
  33.973 -           c->x86_capability[1],
  33.974 -           c->x86_capability[2],
  33.975 -           c->x86_capability[3]);
  33.976 -
  33.977 -
  33.978 -    /* If the model name is still unset, do table lookup. */
  33.979 -    if ( !c->x86_model_id[0] ) {
  33.980 -        char *p;
  33.981 -        p = table_lookup_model(c);
  33.982 -        if ( p )
  33.983 -            strcpy(c->x86_model_id, p);
  33.984 -        else
  33.985 -            /* Last resort... */
  33.986 -            sprintf(c->x86_model_id, "%02x/%02x",
  33.987 -                    c->x86_vendor, c->x86_model);
  33.988 -    }
  33.989 -
  33.990 -    /* Now the feature flags better reflect actual CPU features! */
  33.991 -
  33.992 -    printk(KERN_DEBUG "CPU:     After generic, caps: %08x %08x %08x %08x\n",
  33.993 -           c->x86_capability[0],
  33.994 -           c->x86_capability[1],
  33.995 -           c->x86_capability[2],
  33.996 -           c->x86_capability[3]);
  33.997 -
  33.998 -    /*
  33.999 -     * On SMP, boot_cpu_data holds the common feature set between
 33.1000 -     * all CPUs; so make sure that we indicate which features are
 33.1001 -     * common between the CPUs.  The first time this routine gets
 33.1002 -     * executed, c == &boot_cpu_data.
 33.1003 -     */
 33.1004 -    if ( c != &boot_cpu_data ) {
 33.1005 -        /* AND the already accumulated flags with these */
 33.1006 -        for ( i = 0 ; i < NCAPINTS ; i++ )
 33.1007 -            boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
 33.1008 -    }
 33.1009 -
 33.1010 -    printk(KERN_DEBUG "CPU:             Common caps: %08x %08x %08x %08x\n",
 33.1011 -           boot_cpu_data.x86_capability[0],
 33.1012 -           boot_cpu_data.x86_capability[1],
 33.1013 -           boot_cpu_data.x86_capability[2],
 33.1014 -           boot_cpu_data.x86_capability[3]);
 33.1015 -}
 33.1016 -
 33.1017 -
 33.1018 -/* These need to match <asm/processor.h> */
 33.1019 -static char *cpu_vendor_names[] __initdata = {
 33.1020 -    "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" };
 33.1021 -
 33.1022 -
 33.1023 -void __init print_cpu_info(struct cpuinfo_x86 *c)
 33.1024 -{
 33.1025 -    char *vendor = NULL;
 33.1026 -
 33.1027 -    if (c->x86_vendor < sizeof(cpu_vendor_names)/sizeof(char *))
 33.1028 -        vendor = cpu_vendor_names[c->x86_vendor];
 33.1029 -    else if (c->cpuid_level >= 0)
 33.1030 -        vendor = c->x86_vendor_id;
 33.1031 -
 33.1032 -    if (vendor && strncmp(c->x86_model_id, vendor, strlen(vendor)))
 33.1033 -        printk("%s ", vendor);
 33.1034 -
 33.1035 -    if (!c->x86_model_id[0])
 33.1036 -        printk("%d86", c->x86);
 33.1037 -    else
 33.1038 -        printk("%s", c->x86_model_id);
 33.1039 -
 33.1040 -    if (c->x86_mask || c->cpuid_level >= 0) 
 33.1041 -        printk(" stepping %02x\n", c->x86_mask);
 33.1042 -    else
 33.1043 -        printk("\n");
 33.1044 -}
 33.1045 -
 33.1046 -/*
 33.1047 - *	Get CPU information for use by the procfs.
 33.1048 - */
 33.1049 -static int show_cpuinfo(struct seq_file *m, void *v)
 33.1050 -{
 33.1051 -    /* 
 33.1052 -     * These flag bits must match the definitions in <asm/cpufeature.h>.
 33.1053 -     * NULL means this bit is undefined or reserved; either way it doesn't
 33.1054 -     * have meaning as far as Linux is concerned.  Note that it's important
 33.1055 -     * to realize there is a difference between this table and CPUID -- if
 33.1056 -     * applications want to get the raw CPUID data, they should access
 33.1057 -     * /dev/cpu/<cpu_nr>/cpuid instead.
 33.1058 -	 */
 33.1059 -    static char *x86_cap_flags[] = {
 33.1060 -        /* Intel-defined */
 33.1061 -        "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
 33.1062 -        "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
 33.1063 -        "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx",
 33.1064 -        "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe",
 33.1065 -
 33.1066 -        /* AMD-defined */
 33.1067 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1068 -        NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
 33.1069 -        NULL, NULL, NULL, "mp", NULL, NULL, "mmxext", NULL,
 33.1070 -        NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
 33.1071 -
 33.1072 -        /* Transmeta-defined */
 33.1073 -        "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
 33.1074 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1075 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1076 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1077 -
 33.1078 -        /* Other (Linux-defined) */
 33.1079 -        "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", 
 33.1080 -	NULL, NULL, NULL, NULL,
 33.1081 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1082 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1083 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1084 -
 33.1085 -        /* Intel-defined (#2) */
 33.1086 -        "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2",
 33.1087 -        "est", NULL, "cid", NULL, NULL, NULL, NULL, NULL,
 33.1088 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1089 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1090 -
 33.1091 -        /* VIA/Cyrix/Centaur-defined */
 33.1092 -        NULL, NULL, "xstore", NULL, NULL, NULL, NULL, NULL,
 33.1093 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1094 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1095 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 33.1096 -
 33.1097 -    };
 33.1098 -    struct cpuinfo_x86 *c = v;
 33.1099 -    int i, n = c - cpu_data;
 33.1100 -    int fpu_exception;
 33.1101 -
 33.1102 -#ifdef CONFIG_SMP
 33.1103 -    if (!(cpu_online_map & (1<<n)))
 33.1104 -        return 0;
 33.1105 -#endif
 33.1106 -    seq_printf(m, "processor\t: %d\n"
 33.1107 -               "vendor_id\t: %s\n"
 33.1108 -               "cpu family\t: %d\n"
 33.1109 -               "model\t\t: %d\n"
 33.1110 -               "model name\t: %s\n",
 33.1111 -               n,
 33.1112 -               c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
 33.1113 -               c->x86,
 33.1114 -               c->x86_model,
 33.1115 -               c->x86_model_id[0] ? c->x86_model_id : "unknown");
 33.1116 -
 33.1117 -    if (c->x86_mask || c->cpuid_level >= 0)
 33.1118 -        seq_printf(m, "stepping\t: %d\n", c->x86_mask);
 33.1119 -    else
 33.1120 -        seq_printf(m, "stepping\t: unknown\n");
 33.1121 -
 33.1122 -    if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) {
 33.1123 -        seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
 33.1124 -                   cpu_khz / 1000, (cpu_khz % 1000));
 33.1125 -    }
 33.1126 -
 33.1127 -    /* Cache size */
 33.1128 -    if (c->x86_cache_size >= 0)
 33.1129 -        seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
 33.1130 -	
 33.1131 -	/* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
 33.1132 -    fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu);
 33.1133 -    seq_printf(m, "fdiv_bug\t: %s\n"
 33.1134 -               "hlt_bug\t\t: %s\n"
 33.1135 -               "f00f_bug\t: %s\n"
 33.1136 -               "coma_bug\t: %s\n"
 33.1137 -               "fpu\t\t: %s\n"
 33.1138 -               "fpu_exception\t: %s\n"
 33.1139 -               "cpuid level\t: %d\n"
 33.1140 -               "wp\t\t: %s\n"
 33.1141 -               "flags\t\t:",
 33.1142 -               c->fdiv_bug ? "yes" : "no",
 33.1143 -               c->hlt_works_ok ? "no" : "yes",
 33.1144 -               c->f00f_bug ? "yes" : "no",
 33.1145 -               c->coma_bug ? "yes" : "no",
 33.1146 -               c->hard_math ? "yes" : "no",
 33.1147 -               fpu_exception ? "yes" : "no",
 33.1148 -               c->cpuid_level,
 33.1149 -               c->wp_works_ok ? "yes" : "no");
 33.1150 -
 33.1151 -    for ( i = 0 ; i < 32*NCAPINTS ; i++ )
 33.1152 -        if ( test_bit(i, &c->x86_capability) &&
 33.1153 -             x86_cap_flags[i] != NULL )
 33.1154 -            seq_printf(m, " %s", x86_cap_flags[i]);
 33.1155 -
 33.1156 -    seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
 33.1157 -               c->loops_per_jiffy/(500000/HZ),
 33.1158 -               (c->loops_per_jiffy/(5000/HZ)) % 100);
 33.1159 -    return 0;
 33.1160 -}
 33.1161 -
 33.1162 -static void *c_start(struct seq_file *m, loff_t *pos)
 33.1163 -{
 33.1164 -    return *pos < NR_CPUS ? cpu_data + *pos : NULL;
 33.1165 -}
 33.1166 -static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 33.1167 -{
 33.1168 -    ++*pos;
 33.1169 -    return c_start(m, pos);
 33.1170 -}
 33.1171 -static void c_stop(struct seq_file *m, void *v)
 33.1172 -{
 33.1173 -}
 33.1174 -struct seq_operations cpuinfo_op = {
 33.1175 -    start:	c_start,
 33.1176 -    next:	c_next,
 33.1177 -    stop:	c_stop,
 33.1178 -    show:	show_cpuinfo,
 33.1179 -};
 33.1180 -
 33.1181 -unsigned long cpu_initialized __initdata = 0;
 33.1182 -
 33.1183 -/*
 33.1184 - * cpu_init() initializes state that is per-CPU. Some data is already
 33.1185 - * initialized (naturally) in the bootstrap process, such as the GDT
 33.1186 - * and IDT. We reload them nevertheless, this function acts as a
 33.1187 - * 'CPU state barrier', nothing should get across.
 33.1188 - */
 33.1189 -void __init cpu_init (void)
 33.1190 -{
 33.1191 -    int nr = smp_processor_id();
 33.1192 -
 33.1193 -    if (test_and_set_bit(nr, &cpu_initialized)) {
 33.1194 -        printk(KERN_WARNING "CPU#%d already initialized!\n", nr);
 33.1195 -        for (;;) __sti();
 33.1196 -    }
 33.1197 -    printk(KERN_INFO "Initializing CPU#%d\n", nr);
 33.1198 -
 33.1199 -    /*
 33.1200 -     * set up and load the per-CPU TSS and LDT
 33.1201 -     */
 33.1202 -    atomic_inc(&init_mm.mm_count);
 33.1203 -    current->active_mm = &init_mm;
 33.1204 -    if(current->mm)
 33.1205 -        BUG();
 33.1206 -    enter_lazy_tlb(&init_mm, current, nr);
 33.1207 -
 33.1208 -    HYPERVISOR_stack_switch(__KERNEL_DS, current->thread.esp0);
 33.1209 -
 33.1210 -    load_LDT(&init_mm.context);
 33.1211 -
 33.1212 -    /* Force FPU initialization. */
 33.1213 -    current->flags &= ~PF_USEDFPU;
 33.1214 -    current->used_math = 0;
 33.1215 -    stts();
 33.1216 -}
    34.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/signal.c	Fri Oct 07 23:22:35 2005 +0100
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,717 +0,0 @@
    34.4 -/*
    34.5 - *  linux/arch/i386/kernel/signal.c
    34.6 - *
    34.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    34.8 - *
    34.9 - *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
   34.10 - *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
   34.11 - */
   34.12 -
   34.13 -#include <linux/sched.h>
   34.14 -#include <linux/mm.h>
   34.15 -#include <linux/smp.h>
   34.16 -#include <linux/smp_lock.h>
   34.17 -#include <linux/kernel.h>
   34.18 -#include <linux/signal.h>
   34.19 -#include <linux/errno.h>
   34.20 -#include <linux/wait.h>
   34.21 -#include <linux/ptrace.h>
   34.22 -#include <linux/unistd.h>
   34.23 -#include <linux/stddef.h>
   34.24 -#include <linux/tty.h>
   34.25 -#include <linux/personality.h>
   34.26 -#include <asm/ucontext.h>
   34.27 -#include <asm/uaccess.h>
   34.28 -#include <asm/i387.h>
   34.29 -
   34.30 -#define DEBUG_SIG 0
   34.31 -
   34.32 -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
   34.33 -
   34.34 -int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
   34.35 -
   34.36 -int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
   34.37 -{
   34.38 -	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
   34.39 -		return -EFAULT;
   34.40 -	if (from->si_code < 0)
   34.41 -		return __copy_to_user(to, from, sizeof(siginfo_t));
   34.42 -	else {
   34.43 -		int err;
   34.44 -
   34.45 -		/* If you change siginfo_t structure, please be sure
   34.46 -		   this code is fixed accordingly.
   34.47 -		   It should never copy any pad contained in the structure
   34.48 -		   to avoid security leaks, but must copy the generic
   34.49 -		   3 ints plus the relevant union member.  */
   34.50 -		err = __put_user(from->si_signo, &to->si_signo);
   34.51 -		err |= __put_user(from->si_errno, &to->si_errno);
   34.52 -		err |= __put_user((short)from->si_code, &to->si_code);
   34.53 -		/* First 32bits of unions are always present.  */
   34.54 -		err |= __put_user(from->si_pid, &to->si_pid);
   34.55 -		switch (from->si_code >> 16) {
   34.56 -		case __SI_FAULT >> 16:
   34.57 -			break;
   34.58 -		case __SI_CHLD >> 16:
   34.59 -			err |= __put_user(from->si_utime, &to->si_utime);
   34.60 -			err |= __put_user(from->si_stime, &to->si_stime);
   34.61 -			err |= __put_user(from->si_status, &to->si_status);
   34.62 -		default:
   34.63 -			err |= __put_user(from->si_uid, &to->si_uid);
   34.64 -			break;
   34.65 -		/* case __SI_RT: This is not generated by the kernel as of now.  */
   34.66 -		}
   34.67 -		return err;
   34.68 -	}
   34.69 -}
   34.70 -
   34.71 -/*
   34.72 - * Atomically swap in the new signal mask, and wait for a signal.
   34.73 - */
   34.74 -asmlinkage int
   34.75 -sys_sigsuspend(int history0, int history1, old_sigset_t mask)
   34.76 -{
   34.77 -	struct pt_regs * regs = (struct pt_regs *) &history0;
   34.78 -	sigset_t saveset;
   34.79 -
   34.80 -	mask &= _BLOCKABLE;
   34.81 -	spin_lock_irq(&current->sigmask_lock);
   34.82 -	saveset = current->blocked;
   34.83 -	siginitset(&current->blocked, mask);
   34.84 -	recalc_sigpending(current);
   34.85 -	spin_unlock_irq(&current->sigmask_lock);
   34.86 -
   34.87 -	regs->eax = -EINTR;
   34.88 -	while (1) {
   34.89 -		current->state = TASK_INTERRUPTIBLE;
   34.90 -		schedule();
   34.91 -		if (do_signal(regs, &saveset))
   34.92 -			return -EINTR;
   34.93 -	}
   34.94 -}
   34.95 -
   34.96 -asmlinkage int
   34.97 -sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
   34.98 -{
   34.99 -	struct pt_regs * regs = (struct pt_regs *) &unewset;
  34.100 -	sigset_t saveset, newset;
  34.101 -
  34.102 -	/* XXX: Don't preclude handling different sized sigset_t's.  */
  34.103 -	if (sigsetsize != sizeof(sigset_t))
  34.104 -		return -EINVAL;
  34.105 -
  34.106 -	if (copy_from_user(&newset, unewset, sizeof(newset)))
  34.107 -		return -EFAULT;
  34.108 -	sigdelsetmask(&newset, ~_BLOCKABLE);
  34.109 -
  34.110 -	spin_lock_irq(&current->sigmask_lock);
  34.111 -	saveset = current->blocked;
  34.112 -	current->blocked = newset;
  34.113 -	recalc_sigpending(current);
  34.114 -	spin_unlock_irq(&current->sigmask_lock);
  34.115 -
  34.116 -	regs->eax = -EINTR;
  34.117 -	while (1) {
  34.118 -		current->state = TASK_INTERRUPTIBLE;
  34.119 -		schedule();
  34.120 -		if (do_signal(regs, &saveset))
  34.121 -			return -EINTR;
  34.122 -	}
  34.123 -}
  34.124 -
  34.125 -asmlinkage int 
  34.126 -sys_sigaction(int sig, const struct old_sigaction *act,
  34.127 -	      struct old_sigaction *oact)
  34.128 -{
  34.129 -	struct k_sigaction new_ka, old_ka;
  34.130 -	int ret;
  34.131 -
  34.132 -	if (act) {
  34.133 -		old_sigset_t mask;
  34.134 -		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
  34.135 -		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
  34.136 -		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
  34.137 -			return -EFAULT;
  34.138 -		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
  34.139 -		__get_user(mask, &act->sa_mask);
  34.140 -		siginitset(&new_ka.sa.sa_mask, mask);
  34.141 -	}
  34.142 -
  34.143 -	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
  34.144 -
  34.145 -	if (!ret && oact) {
  34.146 -		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
  34.147 -		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
  34.148 -		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
  34.149 -			return -EFAULT;
  34.150 -		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
  34.151 -		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
  34.152 -	}
  34.153 -
  34.154 -	return ret;
  34.155 -}
  34.156 -
  34.157 -asmlinkage int
  34.158 -sys_sigaltstack(const stack_t *uss, stack_t *uoss)
  34.159 -{
  34.160 -	struct pt_regs *regs = (struct pt_regs *) &uss;
  34.161 -	return do_sigaltstack(uss, uoss, regs->esp);
  34.162 -}
  34.163 -
  34.164 -
  34.165 -/*
  34.166 - * Do a signal return; undo the signal stack.
  34.167 - */
  34.168 -
  34.169 -struct sigframe
  34.170 -{
  34.171 -	char *pretcode;
  34.172 -	int sig;
  34.173 -	struct sigcontext sc;
  34.174 -	struct _fpstate fpstate;
  34.175 -	unsigned long extramask[_NSIG_WORDS-1];
  34.176 -	char retcode[8];
  34.177 -};
  34.178 -
  34.179 -struct rt_sigframe
  34.180 -{
  34.181 -	char *pretcode;
  34.182 -	int sig;
  34.183 -	struct siginfo *pinfo;
  34.184 -	void *puc;
  34.185 -	struct siginfo info;
  34.186 -	struct ucontext uc;
  34.187 -	struct _fpstate fpstate;
  34.188 -	char retcode[8];
  34.189 -};
  34.190 -
  34.191 -static int
  34.192 -restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
  34.193 -{
  34.194 -	unsigned int err = 0;
  34.195 -
  34.196 -#define COPY(x)		err |= __get_user(regs->x, &sc->x)
  34.197 -
  34.198 -#define COPY_SEG(seg)							\
  34.199 -	{ unsigned short tmp;						\
  34.200 -	  err |= __get_user(tmp, &sc->seg);				\
  34.201 -	  regs->x##seg = tmp; }
  34.202 -
  34.203 -#define COPY_SEG_STRICT(seg)						\
  34.204 -	{ unsigned short tmp;						\
  34.205 -	  err |= __get_user(tmp, &sc->seg);				\
  34.206 -	  regs->x##seg = tmp|3; }
  34.207 -
  34.208 -#define GET_SEG(seg)							\
  34.209 -	{ unsigned short tmp;						\
  34.210 -	  err |= __get_user(tmp, &sc->seg);				\
  34.211 -	  loadsegment(seg,tmp); }
  34.212 -
  34.213 -	GET_SEG(gs);
  34.214 -	GET_SEG(fs);
  34.215 -	COPY_SEG(es);
  34.216 -	COPY_SEG(ds);
  34.217 -	COPY(edi);
  34.218 -	COPY(esi);
  34.219 -	COPY(ebp);
  34.220 -	COPY(esp);
  34.221 -	COPY(ebx);
  34.222 -	COPY(edx);
  34.223 -	COPY(ecx);
  34.224 -	COPY(eip);
  34.225 -	COPY_SEG_STRICT(cs);
  34.226 -	COPY_SEG_STRICT(ss);
  34.227 -	
  34.228 -	{
  34.229 -		unsigned int tmpflags;
  34.230 -		err |= __get_user(tmpflags, &sc->eflags);
  34.231 -		regs->eflags = (regs->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);
  34.232 -		regs->orig_eax = -1;		/* disable syscall checks */
  34.233 -	}
  34.234 -
  34.235 -	{
  34.236 -		struct _fpstate * buf;
  34.237 -		err |= __get_user(buf, &sc->fpstate);
  34.238 -		if (buf) {
  34.239 -			if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
  34.240 -				goto badframe;
  34.241 -			err |= restore_i387(buf);
  34.242 -		}
  34.243 -	}
  34.244 -
  34.245 -	err |= __get_user(*peax, &sc->eax);
  34.246 -	return err;
  34.247 -
  34.248 -badframe:
  34.249 -	return 1;
  34.250 -}
  34.251 -
  34.252 -asmlinkage int sys_sigreturn(unsigned long __unused)
  34.253 -{
  34.254 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  34.255 -	struct sigframe *frame = (struct sigframe *)(regs->esp - 8);
  34.256 -	sigset_t set;
  34.257 -	int eax;
  34.258 -
  34.259 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  34.260 -		goto badframe;
  34.261 -	if (__get_user(set.sig[0], &frame->sc.oldmask)
  34.262 -	    || (_NSIG_WORDS > 1
  34.263 -		&& __copy_from_user(&set.sig[1], &frame->extramask,
  34.264 -				    sizeof(frame->extramask))))
  34.265 -		goto badframe;
  34.266 -
  34.267 -	sigdelsetmask(&set, ~_BLOCKABLE);
  34.268 -	spin_lock_irq(&current->sigmask_lock);
  34.269 -	current->blocked = set;
  34.270 -	recalc_sigpending(current);
  34.271 -	spin_unlock_irq(&current->sigmask_lock);
  34.272 -	
  34.273 -	if (restore_sigcontext(regs, &frame->sc, &eax))
  34.274 -		goto badframe;
  34.275 -	return eax;
  34.276 -
  34.277 -badframe:
  34.278 -	force_sig(SIGSEGV, current);
  34.279 -	return 0;
  34.280 -}	
  34.281 -
  34.282 -asmlinkage int sys_rt_sigreturn(unsigned long __unused)
  34.283 -{
  34.284 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  34.285 -	struct rt_sigframe *frame = (struct rt_sigframe *)(regs->esp - 4);
  34.286 -	sigset_t set;
  34.287 -	stack_t st;
  34.288 -	int eax;
  34.289 -
  34.290 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  34.291 -		goto badframe;
  34.292 -	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
  34.293 -		goto badframe;
  34.294 -
  34.295 -	sigdelsetmask(&set, ~_BLOCKABLE);
  34.296 -	spin_lock_irq(&current->sigmask_lock);
  34.297 -	current->blocked = set;
  34.298 -	recalc_sigpending(current);
  34.299 -	spin_unlock_irq(&current->sigmask_lock);
  34.300 -	
  34.301 -	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax))
  34.302 -		goto badframe;
  34.303 -
  34.304 -	if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
  34.305 -		goto badframe;
  34.306 -	/* It is more difficult to avoid calling this function than to
  34.307 -	   call it and ignore errors.  */
  34.308 -	do_sigaltstack(&st, NULL, regs->esp);
  34.309 -
  34.310 -	return eax;
  34.311 -
  34.312 -badframe:
  34.313 -	force_sig(SIGSEGV, current);
  34.314 -	return 0;
  34.315 -}	
  34.316 -
  34.317 -/*
  34.318 - * Set up a signal frame.
  34.319 - */
  34.320 -
  34.321 -static int
  34.322 -setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
  34.323 -		 struct pt_regs *regs, unsigned long mask)
  34.324 -{
  34.325 -	int tmp, err = 0;
  34.326 -
  34.327 -	tmp = 0;
  34.328 -	__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
  34.329 -	err |= __put_user(tmp, (unsigned int *)&sc->gs);
  34.330 -	__asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp));
  34.331 -	err |= __put_user(tmp, (unsigned int *)&sc->fs);
  34.332 -
  34.333 -	err |= __put_user(regs->xes, (unsigned int *)&sc->es);
  34.334 -	err |= __put_user(regs->xds, (unsigned int *)&sc->ds);
  34.335 -	err |= __put_user(regs->edi, &sc->edi);
  34.336 -	err |= __put_user(regs->esi, &sc->esi);
  34.337 -	err |= __put_user(regs->ebp, &sc->ebp);
  34.338 -	err |= __put_user(regs->esp, &sc->esp);
  34.339 -	err |= __put_user(regs->ebx, &sc->ebx);
  34.340 -	err |= __put_user(regs->edx, &sc->edx);
  34.341 -	err |= __put_user(regs->ecx, &sc->ecx);
  34.342 -	err |= __put_user(regs->eax, &sc->eax);
  34.343 -	err |= __put_user(current->thread.trap_no, &sc->trapno);
  34.344 -	err |= __put_user(current->thread.error_code, &sc->err);
  34.345 -	err |= __put_user(regs->eip, &sc->eip);
  34.346 -	err |= __put_user(regs->xcs, (unsigned int *)&sc->cs);
  34.347 -	err |= __put_user(regs->eflags, &sc->eflags);
  34.348 -	err |= __put_user(regs->esp, &sc->esp_at_signal);
  34.349 -	err |= __put_user(regs->xss, (unsigned int *)&sc->ss);
  34.350 -
  34.351 -	tmp = save_i387(fpstate);
  34.352 -	if (tmp < 0)
  34.353 -	  err = 1;
  34.354 -	else
  34.355 -	  err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate);
  34.356 -
  34.357 -	/* non-iBCS2 extensions.. */
  34.358 -	err |= __put_user(mask, &sc->oldmask);
  34.359 -	err |= __put_user(current->thread.cr2, &sc->cr2);
  34.360 -
  34.361 -	return err;
  34.362 -}
  34.363 -
  34.364 -/*
  34.365 - * Determine which stack to use..
  34.366 - */
  34.367 -static inline void *
  34.368 -get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
  34.369 -{
  34.370 -	unsigned long esp;
  34.371 -
  34.372 -	/* Default to using normal stack */
  34.373 -	esp = regs->esp;
  34.374 -
  34.375 -	/* This is the X/Open sanctioned signal stack switching.  */
  34.376 -	if (ka->sa.sa_flags & SA_ONSTACK) {
  34.377 -		if (sas_ss_flags(esp) == 0)
  34.378 -			esp = current->sas_ss_sp + current->sas_ss_size;
  34.379 -	}
  34.380 -
  34.381 -	/* This is the legacy signal stack switching. */
  34.382 -	else if ((regs->xss & 0xffff) != __USER_DS &&
  34.383 -		 !(ka->sa.sa_flags & SA_RESTORER) &&
  34.384 -		 ka->sa.sa_restorer) {
  34.385 -		esp = (unsigned long) ka->sa.sa_restorer;
  34.386 -	}
  34.387 -
  34.388 -	return (void *)((esp - frame_size) & -8ul);
  34.389 -}
  34.390 -
  34.391 -static void setup_frame(int sig, struct k_sigaction *ka,
  34.392 -			sigset_t *set, struct pt_regs * regs)
  34.393 -{
  34.394 -	struct sigframe *frame;
  34.395 -	int err = 0;
  34.396 -
  34.397 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  34.398 -
  34.399 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  34.400 -		goto give_sigsegv;
  34.401 -
  34.402 -	err |= __put_user((current->exec_domain
  34.403 -		           && current->exec_domain->signal_invmap
  34.404 -		           && sig < 32
  34.405 -		           ? current->exec_domain->signal_invmap[sig]
  34.406 -		           : sig),
  34.407 -		          &frame->sig);
  34.408 -	if (err)
  34.409 -		goto give_sigsegv;
  34.410 -
  34.411 -	err |= setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
  34.412 -	if (err)
  34.413 -		goto give_sigsegv;
  34.414 -
  34.415 -	if (_NSIG_WORDS > 1) {
  34.416 -		err |= __copy_to_user(frame->extramask, &set->sig[1],
  34.417 -				      sizeof(frame->extramask));
  34.418 -	}
  34.419 -	if (err)
  34.420 -		goto give_sigsegv;
  34.421 -
  34.422 -	/* Set up to return from userspace.  If provided, use a stub
  34.423 -	   already in userspace.  */
  34.424 -	if (ka->sa.sa_flags & SA_RESTORER) {
  34.425 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  34.426 -	} else {
  34.427 -		err |= __put_user(frame->retcode, &frame->pretcode);
  34.428 -		/* This is popl %eax ; movl $,%eax ; int $0x80 */
  34.429 -		err |= __put_user(0xb858, (short *)(frame->retcode+0));
  34.430 -		err |= __put_user(__NR_sigreturn, (int *)(frame->retcode+2));
  34.431 -		err |= __put_user(0x80cd, (short *)(frame->retcode+6));
  34.432 -	}
  34.433 -
  34.434 -	if (err)
  34.435 -		goto give_sigsegv;
  34.436 -
  34.437 -	/* Set up registers for signal handler */
  34.438 -	regs->esp = (unsigned long) frame;
  34.439 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  34.440 -
  34.441 -	set_fs(USER_DS);
  34.442 -	regs->xds = __USER_DS;
  34.443 -	regs->xes = __USER_DS;
  34.444 -	regs->xss = __USER_DS;
  34.445 -	regs->xcs = __USER_CS;
  34.446 -	regs->eflags &= ~TF_MASK;
  34.447 -
  34.448 -#if DEBUG_SIG
  34.449 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  34.450 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  34.451 -#endif
  34.452 -
  34.453 -	return;
  34.454 -
  34.455 -give_sigsegv:
  34.456 -	if (sig == SIGSEGV)
  34.457 -		ka->sa.sa_handler = SIG_DFL;
  34.458 -	force_sig(SIGSEGV, current);
  34.459 -}
  34.460 -
  34.461 -static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
  34.462 -			   sigset_t *set, struct pt_regs * regs)
  34.463 -{
  34.464 -	struct rt_sigframe *frame;
  34.465 -	int err = 0;
  34.466 -
  34.467 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  34.468 -
  34.469 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  34.470 -		goto give_sigsegv;
  34.471 -
  34.472 -	err |= __put_user((current->exec_domain
  34.473 -		    	   && current->exec_domain->signal_invmap
  34.474 -		    	   && sig < 32
  34.475 -		    	   ? current->exec_domain->signal_invmap[sig]
  34.476 -			   : sig),
  34.477 -			  &frame->sig);
  34.478 -	err |= __put_user(&frame->info, &frame->pinfo);
  34.479 -	err |= __put_user(&frame->uc, &frame->puc);
  34.480 -	err |= copy_siginfo_to_user(&frame->info, info);
  34.481 -	if (err)
  34.482 -		goto give_sigsegv;
  34.483 -
  34.484 -	/* Create the ucontext.  */
  34.485 -	err |= __put_user(0, &frame->uc.uc_flags);
  34.486 -	err |= __put_user(0, &frame->uc.uc_link);
  34.487 -	err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
  34.488 -	err |= __put_user(sas_ss_flags(regs->esp),
  34.489 -			  &frame->uc.uc_stack.ss_flags);
  34.490 -	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
  34.491 -	err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->fpstate,
  34.492 -			        regs, set->sig[0]);
  34.493 -	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
  34.494 -	if (err)
  34.495 -		goto give_sigsegv;
  34.496 -
  34.497 -	/* Set up to return from userspace.  If provided, use a stub
  34.498 -	   already in userspace.  */
  34.499 -	if (ka->sa.sa_flags & SA_RESTORER) {
  34.500 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  34.501 -	} else {
  34.502 -		err |= __put_user(frame->retcode, &frame->pretcode);
  34.503 -		/* This is movl $,%eax ; int $0x80 */
  34.504 -		err |= __put_user(0xb8, (char *)(frame->retcode+0));
  34.505 -		err |= __put_user(__NR_rt_sigreturn, (int *)(frame->retcode+1));
  34.506 -		err |= __put_user(0x80cd, (short *)(frame->retcode+5));
  34.507 -	}
  34.508 -
  34.509 -	if (err)
  34.510 -		goto give_sigsegv;
  34.511 -
  34.512 -	/* Set up registers for signal handler */
  34.513 -	regs->esp = (unsigned long) frame;
  34.514 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  34.515 -
  34.516 -	set_fs(USER_DS);
  34.517 -	regs->xds = __USER_DS;
  34.518 -	regs->xes = __USER_DS;
  34.519 -	regs->xss = __USER_DS;
  34.520 -	regs->xcs = __USER_CS;
  34.521 -	regs->eflags &= ~TF_MASK;
  34.522 -
  34.523 -#if DEBUG_SIG
  34.524 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  34.525 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  34.526 -#endif
  34.527 -
  34.528 -	return;
  34.529 -
  34.530 -give_sigsegv:
  34.531 -	if (sig == SIGSEGV)
  34.532 -		ka->sa.sa_handler = SIG_DFL;
  34.533 -	force_sig(SIGSEGV, current);
  34.534 -}
  34.535 -
  34.536 -/*
  34.537 - * OK, we're invoking a handler
  34.538 - */	
  34.539 -
  34.540 -static void
  34.541 -handle_signal(unsigned long sig, struct k_sigaction *ka,
  34.542 -	      siginfo_t *info, sigset_t *oldset, struct pt_regs * regs)
  34.543 -{
  34.544 -	/* Are we from a system call? */
  34.545 -	if (regs->orig_eax >= 0) {
  34.546 -		/* If so, check system call restarting.. */
  34.547 -		switch (regs->eax) {
  34.548 -			case -ERESTARTNOHAND:
  34.549 -				regs->eax = -EINTR;
  34.550 -				break;
  34.551 -
  34.552 -			case -ERESTARTSYS:
  34.553 -				if (!(ka->sa.sa_flags & SA_RESTART)) {
  34.554 -					regs->eax = -EINTR;
  34.555 -					break;
  34.556 -				}
  34.557 -			/* fallthrough */
  34.558 -			case -ERESTARTNOINTR:
  34.559 -				regs->eax = regs->orig_eax;
  34.560 -				regs->eip -= 2;
  34.561 -		}
  34.562 -	}
  34.563 -
  34.564 -	/* Set up the stack frame */
  34.565 -	if (ka->sa.sa_flags & SA_SIGINFO)
  34.566 -		setup_rt_frame(sig, ka, info, oldset, regs);
  34.567 -	else
  34.568 -		setup_frame(sig, ka, oldset, regs);
  34.569 -
  34.570 -	if (ka->sa.sa_flags & SA_ONESHOT)
  34.571 -		ka->sa.sa_handler = SIG_DFL;
  34.572 -
  34.573 -	if (!(ka->sa.sa_flags & SA_NODEFER)) {
  34.574 -		spin_lock_irq(&current->sigmask_lock);
  34.575 -		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
  34.576 -		sigaddset(&current->blocked,sig);
  34.577 -		recalc_sigpending(current);
  34.578 -		spin_unlock_irq(&current->sigmask_lock);
  34.579 -	}
  34.580 -}
  34.581 -
  34.582 -/*
  34.583 - * Note that 'init' is a special process: it doesn't get signals it doesn't
  34.584 - * want to handle. Thus you cannot kill init even with a SIGKILL even by
  34.585 - * mistake.
  34.586 - */
  34.587 -int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset)
  34.588 -{
  34.589 -	siginfo_t info;
  34.590 -	struct k_sigaction *ka;
  34.591 -
  34.592 -	/*
  34.593 -	 * We want the common case to go fast, which
  34.594 -	 * is why we may in certain cases get here from
  34.595 -	 * kernel mode. Just return without doing anything
  34.596 -	 * if so.
  34.597 -	 */
  34.598 -	if ((regs->xcs & 2) != 2)
  34.599 -		return 1;
  34.600 -
  34.601 -	if (!oldset)
  34.602 -		oldset = &current->blocked;
  34.603 -
  34.604 -	for (;;) {
  34.605 -		unsigned long signr;
  34.606 -
  34.607 -		spin_lock_irq(&current->sigmask_lock);
  34.608 -		signr = dequeue_signal(&current->blocked, &info);
  34.609 -		spin_unlock_irq(&current->sigmask_lock);
  34.610 -
  34.611 -		if (!signr)
  34.612 -			break;
  34.613 -
  34.614 -		if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
  34.615 -			/* Let the debugger run.  */
  34.616 -			current->exit_code = signr;
  34.617 -			current->state = TASK_STOPPED;
  34.618 -			notify_parent(current, SIGCHLD);
  34.619 -			schedule();
  34.620 -
  34.621 -			/* We're back.  Did the debugger cancel the sig?  */
  34.622 -			if (!(signr = current->exit_code))
  34.623 -				continue;
  34.624 -			current->exit_code = 0;
  34.625 -
  34.626 -			/* The debugger continued.  Ignore SIGSTOP.  */
  34.627 -			if (signr == SIGSTOP)
  34.628 -				continue;
  34.629 -
  34.630 -			/* Update the siginfo structure.  Is this good?  */
  34.631 -			if (signr != info.si_signo) {
  34.632 -				info.si_signo = signr;
  34.633 -				info.si_errno = 0;
  34.634 -				info.si_code = SI_USER;
  34.635 -				info.si_pid = current->p_pptr->pid;
  34.636 -				info.si_uid = current->p_pptr->uid;
  34.637 -			}
  34.638 -
  34.639 -			/* If the (new) signal is now blocked, requeue it.  */
  34.640 -			if (sigismember(&current->blocked, signr)) {
  34.641 -				send_sig_info(signr, &info, current);
  34.642 -				continue;
  34.643 -			}
  34.644 -		}
  34.645 -
  34.646 -		ka = &current->sig->action[signr-1];
  34.647 -		if (ka->sa.sa_handler == SIG_IGN) {
  34.648 -			if (signr != SIGCHLD)
  34.649 -				continue;
  34.650 -			/* Check for SIGCHLD: it's special.  */
  34.651 -			while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0)
  34.652 -				/* nothing */;
  34.653 -			continue;
  34.654 -		}
  34.655 -
  34.656 -		if (ka->sa.sa_handler == SIG_DFL) {
  34.657 -			int exit_code = signr;
  34.658 -
  34.659 -			/* Init gets no signals it doesn't want.  */
  34.660 -			if (current->pid == 1)
  34.661 -				continue;
  34.662 -
  34.663 -			switch (signr) {
  34.664 -			case SIGCONT: case SIGCHLD: case SIGWINCH: case SIGURG:
  34.665 -				continue;
  34.666 -
  34.667 -			case SIGTSTP: case SIGTTIN: case SIGTTOU:
  34.668 -				if (is_orphaned_pgrp(current->pgrp))
  34.669 -					continue;
  34.670 -				/* FALLTHRU */
  34.671 -
  34.672 -			case SIGSTOP: {
  34.673 -				struct signal_struct *sig;
  34.674 -				current->state = TASK_STOPPED;
  34.675 -				current->exit_code = signr;
  34.676 -				sig = current->p_pptr->sig;
  34.677 -				if (sig && !(sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP))
  34.678 -					notify_parent(current, SIGCHLD);
  34.679 -				schedule();
  34.680 -				continue;
  34.681 -			}
  34.682 -
  34.683 -			case SIGQUIT: case SIGILL: case SIGTRAP:
  34.684 -			case SIGABRT: case SIGFPE: case SIGSEGV:
  34.685 -			case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
  34.686 -				if (do_coredump(signr, regs))
  34.687 -					exit_code |= 0x80;
  34.688 -				/* FALLTHRU */
  34.689 -
  34.690 -			default:
  34.691 -				sig_exit(signr, exit_code, &info);
  34.692 -				/* NOTREACHED */
  34.693 -			}
  34.694 -		}
  34.695 -
  34.696 -		/* Reenable any watchpoints before delivering the
  34.697 -		 * signal to user space. The processor register will
  34.698 -		 * have been cleared if the watchpoint triggered
  34.699 -		 * inside the kernel.
  34.700 -		 */
  34.701 -                if ( current->thread.debugreg[7] != 0 )
  34.702 -                    HYPERVISOR_set_debugreg(7, current->thread.debugreg[7]);
  34.703 -
  34.704 -		/* Whee!  Actually deliver the signal.  */
  34.705 -		handle_signal(signr, ka, &info, oldset, regs);
  34.706 -		return 1;
  34.707 -	}
  34.708 -
  34.709 -	/* Did we come from a system call? */
  34.710 -	if (regs->orig_eax >= 0) {
  34.711 -		/* Restart the system call - no handlers present */
  34.712 -		if (regs->eax == -ERESTARTNOHAND ||
  34.713 -		    regs->eax == -ERESTARTSYS ||
  34.714 -		    regs->eax == -ERESTARTNOINTR) {
  34.715 -			regs->eax = regs->orig_eax;
  34.716 -			regs->eip -= 2;
  34.717 -		}
  34.718 -	}
  34.719 -	return 0;
  34.720 -}
    35.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/time.c	Fri Oct 07 23:22:35 2005 +0100
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,741 +0,0 @@
    35.4 -/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
    35.5 - ****************************************************************************
    35.6 - * (C) 2002-2003 - Rolf Neugebauer - Intel Research Cambridge
    35.7 - * (C) 2002-2003 - Keir Fraser - University of Cambridge
    35.8 - ****************************************************************************
    35.9 - *
   35.10 - *        File: arch/xen/kernel/time.c
   35.11 - *      Author: Rolf Neugebauer and Keir Fraser
   35.12 - * 
   35.13 - * Description: Interface with Xen to get correct notion of time
   35.14 - */
   35.15 -
   35.16 -/*
   35.17 - *  linux/arch/i386/kernel/time.c
   35.18 - *
   35.19 - *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
   35.20 - *
   35.21 - * This file contains the PC-specific time handling details:
   35.22 - * reading the RTC at bootup, etc..
   35.23 - * 1994-07-02    Alan Modra
   35.24 - * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
   35.25 - * 1995-03-26    Markus Kuhn
   35.26 - *      fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
   35.27 - *      precision CMOS clock update
   35.28 - * 1996-05-03    Ingo Molnar
   35.29 - *      fixed time warps in do_[slow|fast]_gettimeoffset()
   35.30 - * 1997-09-10 Updated NTP code according to technical memorandum Jan '96
   35.31 - *  "A Kernel Model for Precision Timekeeping" by Dave Mills
   35.32 - * 1998-09-05    (Various)
   35.33 - * More robust do_fast_gettimeoffset() algorithm implemented
   35.34 - * (works with APM, Cyrix 6x86MX and Centaur C6),
   35.35 - * monotonic gettimeofday() with fast_get_timeoffset(),
   35.36 - * drift-proof precision TSC calibration on boot
   35.37 - * (C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
   35.38 - * Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
   35.39 - * ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
   35.40 - * 1998-12-16    Andrea Arcangeli
   35.41 - * Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
   35.42 - * because was not accounting lost_ticks.
   35.43 - * 1998-12-24 Copyright (C) 1998  Andrea Arcangeli
   35.44 - * Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
   35.45 - * serialize accesses to xtime/lost_ticks).
   35.46 - */
   35.47 -
   35.48 -#include <asm/smp.h>
   35.49 -#include <asm/irq.h>
   35.50 -#include <asm/msr.h>
   35.51 -#include <asm/delay.h>
   35.52 -#include <asm/mpspec.h>
   35.53 -#include <asm/uaccess.h>
   35.54 -#include <asm/processor.h>
   35.55 -
   35.56 -#include <asm/div64.h>
   35.57 -#include <asm/hypervisor.h>
   35.58 -#include <asm-xen/xen-public/dom0_ops.h>
   35.59 -
   35.60 -#include <linux/mc146818rtc.h>
   35.61 -#include <linux/kernel.h>
   35.62 -#include <linux/interrupt.h>
   35.63 -#include <linux/time.h>
   35.64 -#include <linux/init.h>
   35.65 -#include <linux/smp.h>
   35.66 -#include <linux/irq.h>
   35.67 -#include <linux/sysctl.h>
   35.68 -#include <linux/sysrq.h>
   35.69 -
   35.70 -spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
   35.71 -extern rwlock_t xtime_lock;
   35.72 -extern unsigned long wall_jiffies;
   35.73 -
   35.74 -unsigned long cpu_khz; /* get this from Xen, used elsewhere */
   35.75 -
   35.76 -static unsigned int rdtsc_bitshift;
   35.77 -static u32 st_scale_f; /* convert ticks -> usecs */
   35.78 -static u32 st_scale_i; /* convert ticks -> usecs */
   35.79 -
   35.80 -/* These are peridically updated in shared_info, and then copied here. */
   35.81 -static u32 shadow_tsc_stamp;
   35.82 -static u64 shadow_system_time;
   35.83 -static u32 shadow_time_version;
   35.84 -static struct timeval shadow_tv;
   35.85 -
   35.86 -/*
   35.87 - * We use this to ensure that gettimeofday() is monotonically increasing. We
   35.88 - * only break this guarantee if the wall clock jumps backwards "a long way".
   35.89 - */
   35.90 -static struct timeval last_seen_tv = {0,0};
   35.91 -
   35.92 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
   35.93 -/* Periodically propagate synchronised time base to the RTC and to Xen. */
   35.94 -static long last_update_to_rtc, last_update_to_xen;
   35.95 -#endif
   35.96 -
   35.97 -/* Periodically take synchronised time base from Xen, if we need it. */
   35.98 -static long last_update_from_xen;   /* UTC seconds when last read Xen clock. */
   35.99 -
  35.100 -/* Keep track of last time we did processing/updating of jiffies and xtime. */
  35.101 -static u64 processed_system_time;   /* System time (ns) at last processing. */
  35.102 -
  35.103 -#define NS_PER_TICK (1000000000ULL/HZ)
  35.104 -
  35.105 -#ifndef NSEC_PER_SEC
  35.106 -#define NSEC_PER_SEC (1000000000L)
  35.107 -#endif
  35.108 -
  35.109 -#define HANDLE_USEC_UNDERFLOW(_tv)         \
  35.110 -    do {                                   \
  35.111 -        while ( (_tv).tv_usec < 0 )        \
  35.112 -        {                                  \
  35.113 -            (_tv).tv_usec += 1000000;      \
  35.114 -            (_tv).tv_sec--;                \
  35.115 -        }                                  \
  35.116 -    } while ( 0 )
  35.117 -#define HANDLE_USEC_OVERFLOW(_tv)          \
  35.118 -    do {                                   \
  35.119 -        while ( (_tv).tv_usec >= 1000000 ) \
  35.120 -        {                                  \
  35.121 -            (_tv).tv_usec -= 1000000;      \
  35.122 -            (_tv).tv_sec++;                \
  35.123 -        }                                  \
  35.124 -    } while ( 0 )
  35.125 -static inline void __normalize_time(time_t *sec, s64 *nsec)
  35.126 -{
  35.127 -	while (*nsec >= NSEC_PER_SEC) {
  35.128 -		(*nsec) -= NSEC_PER_SEC;
  35.129 -		(*sec)++;
  35.130 -	}
  35.131 -	while (*nsec < 0) {
  35.132 -		(*nsec) += NSEC_PER_SEC;
  35.133 -		(*sec)--;
  35.134 -	}
  35.135 -}
  35.136 -
  35.137 -/* Dynamically-mapped IRQs. */
  35.138 -static int time_irq, debug_irq;
  35.139 -
  35.140 -/* Does this guest OS track Xen time, or set its wall clock independently? */
  35.141 -static int independent_wallclock = 0;
  35.142 -static int __init __independent_wallclock(char *str)
  35.143 -{
  35.144 -    independent_wallclock = 1;
  35.145 -    return 1;
  35.146 -}
  35.147 -__setup("independent_wallclock", __independent_wallclock);
  35.148 -#define INDEPENDENT_WALLCLOCK() \
  35.149 -    (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
  35.150 -
  35.151 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  35.152 -/*
  35.153 - * In order to set the CMOS clock precisely, set_rtc_mmss has to be
  35.154 - * called 500 ms after the second nowtime has started, because when
  35.155 - * nowtime is written into the registers of the CMOS clock, it will
  35.156 - * jump to the next second precisely 500 ms later. Check the Motorola
  35.157 - * MC146818A or Dallas DS12887 data sheet for details.
  35.158 - *
  35.159 - * BUG: This routine does not handle hour overflow properly; it just
  35.160 - *      sets the minutes. Usually you'll only notice that after reboot!
  35.161 - */
  35.162 -static int set_rtc_mmss(unsigned long nowtime)
  35.163 -{
  35.164 -    int retval = 0;
  35.165 -    int real_seconds, real_minutes, cmos_minutes;
  35.166 -    unsigned char save_control, save_freq_select;
  35.167 -
  35.168 -    /* gets recalled with irq locally disabled */
  35.169 -    spin_lock(&rtc_lock);
  35.170 -    save_control = CMOS_READ(RTC_CONTROL);
  35.171 -    CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
  35.172 -
  35.173 -    save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
  35.174 -    CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
  35.175 -
  35.176 -    cmos_minutes = CMOS_READ(RTC_MINUTES);
  35.177 -    if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
  35.178 -        BCD_TO_BIN(cmos_minutes);
  35.179 -
  35.180 -    /*
  35.181 -     * since we're only adjusting minutes and seconds, don't interfere with
  35.182 -     * hour overflow. This avoids messing with unknown time zones but requires
  35.183 -     * your RTC not to be off by more than 15 minutes
  35.184 -     */
  35.185 -    real_seconds = nowtime % 60;
  35.186 -    real_minutes = nowtime / 60;
  35.187 -    if ( ((abs(real_minutes - cmos_minutes) + 15)/30) & 1 )
  35.188 -        real_minutes += 30;  /* correct for half hour time zone */
  35.189 -    real_minutes %= 60;
  35.190 -
  35.191 -    if ( abs(real_minutes - cmos_minutes) < 30 )
  35.192 -    {
  35.193 -        if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
  35.194 -        {
  35.195 -            BIN_TO_BCD(real_seconds);
  35.196 -            BIN_TO_BCD(real_minutes);
  35.197 -        }
  35.198 -        CMOS_WRITE(real_seconds,RTC_SECONDS);
  35.199 -        CMOS_WRITE(real_minutes,RTC_MINUTES);
  35.200 -    }
  35.201 -    else 
  35.202 -    {
  35.203 -        printk(KERN_WARNING
  35.204 -               "set_rtc_mmss: can't update from %d to %d\n",
  35.205 -               cmos_minutes, real_minutes);
  35.206 -        retval = -1;
  35.207 -    }
  35.208 -
  35.209 -    /* The following flags have to be released exactly in this order,
  35.210 -     * otherwise the DS12887 (popular MC146818A clone with integrated
  35.211 -     * battery and quartz) will not reset the oscillator and will not
  35.212 -     * update precisely 500 ms later. You won't find this mentioned in
  35.213 -     * the Dallas Semiconductor data sheets, but who believes data
  35.214 -     * sheets anyway ...                           -- Markus Kuhn
  35.215 -     */
  35.216 -    CMOS_WRITE(save_control, RTC_CONTROL);
  35.217 -    CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
  35.218 -    spin_unlock(&rtc_lock);
  35.219 -
  35.220 -    return retval;
  35.221 -}
  35.222 -#endif
  35.223 -
  35.224 -
  35.225 -/*
  35.226 - * Reads a consistent set of time-base values from Xen, into a shadow data
  35.227 - * area. Must be called with the xtime_lock held for writing.
  35.228 - */
  35.229 -static void __get_time_values_from_xen(void)
  35.230 -{
  35.231 -	shared_info_t           *s = HYPERVISOR_shared_info;
  35.232 -	struct vcpu_time_info   *src;
  35.233 -	struct shadow_time_info *dst;
  35.234 -
  35.235 -	src = &s->vcpu_time[smp_processor_id()];
  35.236 -	dst = &per_cpu(shadow_time, smp_processor_id());
  35.237 -
  35.238 -	do {
  35.239 -		dst->version = src->time_version2;
  35.240 -		rmb();
  35.241 -		dst->tsc_timestamp     = src->tsc_timestamp;
  35.242 -		dst->system_timestamp  = src->system_time;
  35.243 -		dst->tsc_to_nsec_mul   = src->tsc_to_system_mul;
  35.244 -		dst->tsc_shift         = src->tsc_shift;
  35.245 -		rmb();
  35.246 -	}
  35.247 -	while (dst->version != src->time_version1);
  35.248 -
  35.249 -	dst->tsc_to_usec_mul = dst->tsc_to_nsec_mul / 1000;
  35.250 -
  35.251 -	if ((shadow_tv.tv_sec != s->wc_sec) ||
  35.252 -	    (shadow_tv.tv_usec != s->wc_usec))
  35.253 -		update_wallclock();
  35.254 -}
  35.255 -
  35.256 -
  35.257 -/*
  35.258 - * Returns the system time elapsed, in ns, since the current shadow_timestamp
  35.259 - * was calculated. Must be called with the xtime_lock held for reading.
  35.260 - */
  35.261 -static inline unsigned long __get_time_delta_usecs(void)
  35.262 -{
  35.263 -    s32      delta_tsc;
  35.264 -    u32      low;
  35.265 -    u64      delta, tsc;
  35.266 -
  35.267 -    rdtscll(tsc);
  35.268 -    low = (u32)(tsc >> rdtsc_bitshift);
  35.269 -    delta_tsc = (s32)(low - shadow_tsc_stamp);
  35.270 -    if ( unlikely(delta_tsc < 0) ) delta_tsc = 0;
  35.271 -    delta = ((u64)delta_tsc * st_scale_f);
  35.272 -    delta >>= 32;
  35.273 -    delta += ((u64)delta_tsc * st_scale_i);
  35.274 -
  35.275 -    return (unsigned long)delta;
  35.276 -}
  35.277 -
  35.278 -static inline int time_values_up_to_date()
  35.279 -{
  35.280 -	struct vcpu_time_info   *src;
  35.281 -	struct shadow_time_info *dst;
  35.282 -
  35.283 -	src = &HYPERVISOR_shared_info->vcpu_time[smp_processor_id()];
  35.284 -	dst = &per_cpu(shadow_time, smp_processor_id());
  35.285 -
  35.286 -	return (dst->version == src->time_version2);
  35.287 -}
  35.288 -
  35.289 -
  35.290 -/*
  35.291 - * Returns the current time-of-day in UTC timeval format.
  35.292 - */
  35.293 -void do_gettimeofday(struct timeval *tv)
  35.294 -{
  35.295 -    unsigned long flags, lost;
  35.296 -    struct timeval _tv;
  35.297 -    s64 nsec;
  35.298 -
  35.299 - again:
  35.300 -    read_lock_irqsave(&xtime_lock, flags);
  35.301 -
  35.302 -    _tv.tv_usec = __get_time_delta_usecs();
  35.303 -    if ( (lost = (jiffies - wall_jiffies)) != 0 )
  35.304 -        _tv.tv_usec += lost * (1000000 / HZ);
  35.305 -    _tv.tv_sec   = xtime.tv_sec;
  35.306 -    _tv.tv_usec += xtime.tv_usec;
  35.307 -
  35.308 -    nsec = shadow_system_time - processed_system_time;
  35.309 -    __normalize_time(&_tv.tv_sec, &nsec);
  35.310 -    _tv.tv_usec += (long)nsec / 1000L;
  35.311 -
  35.312 -    if ( unlikely(!time_values_up_to_date()) )
  35.313 -    {
  35.314 -        /*
  35.315 -         * We may have blocked for a long time, rendering our calculations
  35.316 -         * invalid (e.g. the time delta may have overflowed). Detect that
  35.317 -         * and recalculate with fresh values.
  35.318 -         */
  35.319 -        read_unlock_irqrestore(&xtime_lock, flags);
  35.320 -        write_lock_irqsave(&xtime_lock, flags);
  35.321 -        __get_time_values_from_xen();
  35.322 -        write_unlock_irqrestore(&xtime_lock, flags);
  35.323 -        goto again;
  35.324 -    }
  35.325 -
  35.326 -    HANDLE_USEC_OVERFLOW(_tv);
  35.327 -
  35.328 -    /* Ensure that time-of-day is monotonically increasing. */
  35.329 -    if ( (_tv.tv_sec < last_seen_tv.tv_sec) ||
  35.330 -         ((_tv.tv_sec == last_seen_tv.tv_sec) &&
  35.331 -          (_tv.tv_usec < last_seen_tv.tv_usec)) )
  35.332 -        _tv = last_seen_tv;
  35.333 -    last_seen_tv = _tv;
  35.334 -
  35.335 -    read_unlock_irqrestore(&xtime_lock, flags);
  35.336 -
  35.337 -    *tv = _tv;
  35.338 -}
  35.339 -
  35.340 -
  35.341 -/*
  35.342 - * Sets the current time-of-day based on passed-in UTC timeval parameter.
  35.343 - */
  35.344 -void do_settimeofday(struct timeval *tv)
  35.345 -{
  35.346 -    struct timeval newtv;
  35.347 -    s64            nsec;
  35.348 -    suseconds_t    usec;
  35.349 -    
  35.350 -    if ( !INDEPENDENT_WALLCLOCK() )
  35.351 -        return;
  35.352 -    
  35.353 -    write_lock_irq(&xtime_lock);
  35.354 -    
  35.355 -    /*
  35.356 -     * Ensure we don't get blocked for a long time so that our time delta
  35.357 -     * overflows. If that were to happen then our shadow time values would
  35.358 -     * be stale, so we can retry with fresh ones.
  35.359 -     */
  35.360 - again:
  35.361 -    usec = tv->tv_usec - __get_time_delta_usecs();
  35.362 -
  35.363 -    nsec = shadow_system_time - processed_system_time;
  35.364 -    __normalize_time(&tv->tv_sec, &nsec);
  35.365 -    usec -= (long)nsec / 1000L;
  35.366 -
  35.367 -    if ( unlikely(!TIME_VALUES_UP_TO_DATE) )
  35.368 -    {
  35.369 -        __get_time_values_from_xen();
  35.370 -        goto again;
  35.371 -    }
  35.372 -    tv->tv_usec = usec;
  35.373 -    
  35.374 -    HANDLE_USEC_UNDERFLOW(*tv);
  35.375 -    
  35.376 -    newtv = *tv;
  35.377 -    
  35.378 -    tv->tv_usec -= (jiffies - wall_jiffies) * (1000000 / HZ);
  35.379 -    HANDLE_USEC_UNDERFLOW(*tv);
  35.380 -
  35.381 -    xtime = *tv;
  35.382 -    time_adjust = 0;  /* stop active adjtime() */
  35.383 -    time_status |= STA_UNSYNC;
  35.384 -    time_maxerror = NTP_PHASE_LIMIT;
  35.385 -    time_esterror = NTP_PHASE_LIMIT;
  35.386 -
  35.387 -    /* Reset all our running time counts. They make no sense now. */
  35.388 -    last_seen_tv.tv_sec = 0;
  35.389 -    last_update_from_xen = 0;
  35.390 -
  35.391 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  35.392 -    if ( xen_start_info.flags & SIF_INITDOMAIN )
  35.393 -    {
  35.394 -        dom0_op_t op;
  35.395 -        last_update_to_rtc = last_update_to_xen = 0;
  35.396 -        op.cmd = DOM0_SETTIME;
  35.397 -        op.u.settime.secs        = newtv.tv_sec;
  35.398 -        op.u.settime.usecs       = newtv.tv_usec;
  35.399 -        op.u.settime.system_time = shadow_system_time;
  35.400 -        write_unlock_irq(&xtime_lock);
  35.401 -        HYPERVISOR_dom0_op(&op);
  35.402 -    }
  35.403 -    else
  35.404 -#endif
  35.405 -    {
  35.406 -        write_unlock_irq(&xtime_lock);
  35.407 -    }
  35.408 -}
  35.409 -
  35.410 -
  35.411 -asmlinkage long sys_stime(int *tptr)
  35.412 -{
  35.413 -    int value;
  35.414 -    struct timeval tv;
  35.415 -
  35.416 -    if ( !capable(CAP_SYS_TIME) )
  35.417 -        return -EPERM;
  35.418 -
  35.419 -    if ( get_user(value, tptr) )
  35.420 -        return -EFAULT;
  35.421 -
  35.422 -    tv.tv_sec  = value;
  35.423 -    tv.tv_usec = 0;
  35.424 -
  35.425 -    do_settimeofday(&tv);
  35.426 -
  35.427 -    return 0;
  35.428 -}
  35.429 -
  35.430 -
  35.431 -/* Convert jiffies to system time. Call with xtime_lock held for reading. */
  35.432 -static inline u64 __jiffies_to_st(unsigned long j) 
  35.433 -{
  35.434 -    return processed_system_time + ((j - jiffies) * NS_PER_TICK);
  35.435 -}
  35.436 -
  35.437 -
  35.438 -static inline void do_timer_interrupt(int irq, void *dev_id,
  35.439 -                                      struct pt_regs *regs)
  35.440 -{
  35.441 -    s64 delta;
  35.442 -    unsigned long ticks = 0;
  35.443 -    long sec_diff;
  35.444 -
  35.445 -    do {
  35.446 -        __get_time_values_from_xen();
  35.447 -        
  35.448 -        delta = (s64)(shadow_system_time + 
  35.449 -                      ((s64)__get_time_delta_usecs() * 1000LL) -
  35.450 -                      processed_system_time);
  35.451 -    }
  35.452 -    while ( !TIME_VALUES_UP_TO_DATE );
  35.453 -
  35.454 -    if ( unlikely(delta < 0) )
  35.455 -    {
  35.456 -        printk("Timer ISR: Time went backwards: %lld\n", delta);
  35.457 -        return;
  35.458 -    }
  35.459 -
  35.460 -    /* Process elapsed jiffies since last call. */
  35.461 -    while ( delta >= NS_PER_TICK )
  35.462 -    {
  35.463 -        ticks++;
  35.464 -        delta -= NS_PER_TICK;
  35.465 -        processed_system_time += NS_PER_TICK;
  35.466 -    }
  35.467 -
  35.468 -    if ( ticks != 0 )
  35.469 -    {
  35.470 -        do_timer_ticks(ticks);
  35.471 -
  35.472 -        if ( user_mode(regs) )
  35.473 -            update_process_times_us(ticks, 0);
  35.474 -        else
  35.475 -            update_process_times_us(0, ticks);
  35.476 -    }
  35.477 -
  35.478 -    /*
  35.479 -     * Take synchronised time from Xen once a minute if we're not
  35.480 -     * synchronised ourselves, and we haven't chosen to keep an independent
  35.481 -     * time base.
  35.482 -     */
  35.483 -    if ( !INDEPENDENT_WALLCLOCK() &&
  35.484 -         ((time_status & STA_UNSYNC) != 0) &&
  35.485 -         (xtime.tv_sec > (last_update_from_xen + 60)) )
  35.486 -    {
  35.487 -        /* Adjust shadow timeval for jiffies that haven't updated xtime yet. */
  35.488 -        shadow_tv.tv_usec -= (jiffies - wall_jiffies) * (1000000/HZ);
  35.489 -        HANDLE_USEC_UNDERFLOW(shadow_tv);
  35.490 -
  35.491 -        /*
  35.492 -         * Reset our running time counts if they are invalidated by a warp
  35.493 -         * backwards of more than 500ms.
  35.494 -         */
  35.495 -        sec_diff = xtime.tv_sec - shadow_tv.tv_sec;
  35.496 -        if ( unlikely(abs(sec_diff) > 1) ||
  35.497 -             unlikely(((sec_diff * 1000000) + 
  35.498 -                       xtime.tv_usec - shadow_tv.tv_usec) > 500000) )
  35.499 -        {
  35.500 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  35.501 -            last_update_to_rtc = last_update_to_xen = 0;
  35.502 -#endif
  35.503 -            last_seen_tv.tv_sec = 0;
  35.504 -        }
  35.505 -
  35.506 -        /* Update our unsynchronised xtime appropriately. */
  35.507 -        xtime = shadow_tv;
  35.508 -
  35.509 -        last_update_from_xen = xtime.tv_sec;
  35.510 -    }
  35.511 -
  35.512 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  35.513 -    if ( (xen_start_info.flags & SIF_INITDOMAIN) &&
  35.514 -         ((time_status & STA_UNSYNC) == 0) )
  35.515 -    {
  35.516 -        /* Send synchronised time to Xen approximately every minute. */
  35.517 -        if ( xtime.tv_sec > (last_update_to_xen + 60) )
  35.518 -        {
  35.519 -            dom0_op_t op;
  35.520 -            struct timeval tv = xtime;
  35.521 -
  35.522 -            tv.tv_usec += (jiffies - wall_jiffies) * (1000000/HZ);
  35.523 -            HANDLE_USEC_OVERFLOW(tv);
  35.524 -
  35.525 -            op.cmd = DOM0_SETTIME;
  35.526 -            op.u.settime.secs        = tv.tv_sec;
  35.527 -            op.u.settime.usecs       = tv.tv_usec;
  35.528 -            op.u.settime.system_time = shadow_system_time;
  35.529 -            HYPERVISOR_dom0_op(&op);
  35.530 -
  35.531 -            last_update_to_xen = xtime.tv_sec;
  35.532 -        }
  35.533 -
  35.534 -        /*
  35.535 -         * If we have an externally synchronized Linux clock, then update CMOS
  35.536 -         * clock accordingly every ~11 minutes. Set_rtc_mmss() has to be called
  35.537 -         * as close as possible to 500 ms before the new second starts.
  35.538 -         */
  35.539 -        if ( (xtime.tv_sec > (last_update_to_rtc + 660)) &&
  35.540 -             (xtime.tv_usec >= (500000 - ((unsigned) tick) / 2)) &&
  35.541 -             (xtime.tv_usec <= (500000 + ((unsigned) tick) / 2)) )
  35.542 -        {
  35.543 -            if ( set_rtc_mmss(xtime.tv_sec) == 0 )
  35.544 -                last_update_to_rtc = xtime.tv_sec;
  35.545 -            else
  35.546 -                last_update_to_rtc = xtime.tv_sec - 600;
  35.547 -        }
  35.548 -    }
  35.549 -#endif
  35.550 -}
  35.551 -
  35.552 -
  35.553 -static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  35.554 -{
  35.555 -    write_lock(&xtime_lock);
  35.556 -    do_timer_interrupt(irq, NULL, regs);
  35.557 -    write_unlock(&xtime_lock);
  35.558 -}
  35.559 -
  35.560 -static struct irqaction irq_timer = {
  35.561 -    timer_interrupt, 
  35.562 -    SA_INTERRUPT, 
  35.563 -    0, 
  35.564 -    "timer", 
  35.565 -    NULL, 
  35.566 -    NULL
  35.567 -};
  35.568 -
  35.569 -
  35.570 -/*
  35.571 - * This function works out when the the next timer function has to be
  35.572 - * executed (by looking at the timer list) and sets the Xen one-shot
  35.573 - * domain timer to the appropriate value. This is typically called in
  35.574 - * cpu_idle() before the domain blocks.
  35.575 - * 
  35.576 - * The function returns a non-0 value on error conditions.
  35.577 - * 
  35.578 - * It must be called with interrupts disabled.
  35.579 - */
  35.580 -extern spinlock_t timerlist_lock;
  35.581 -int set_timeout_timer(void)
  35.582 -{
  35.583 -    struct timer_list *timer;
  35.584 -    u64 alarm = 0;
  35.585 -    int ret = 0;
  35.586 -
  35.587 -    spin_lock(&timerlist_lock);
  35.588 -
  35.589 -    /*
  35.590 -     * This is safe against long blocking (since calculations are not based on 
  35.591 -     * TSC deltas). It is also safe against warped system time since
  35.592 -     * suspend-resume is cooperative and we would first get locked out. It is 
  35.593 -     * safe against normal updates of jiffies since interrupts are off.
  35.594 -     */
  35.595 -    if ( (timer = next_timer_event()) != NULL )
  35.596 -        alarm = __jiffies_to_st(timer->expires);
  35.597 -
  35.598 -    /* Tasks on the timer task queue expect to be executed on the next tick. */
  35.599 -    if ( TQ_ACTIVE(tq_timer) )
  35.600 -        alarm = __jiffies_to_st(jiffies + 1);
  35.601 -
  35.602 -    /* Failure is pretty bad, but we'd best soldier on. */
  35.603 -    if ( HYPERVISOR_set_timer_op(alarm) != 0 )
  35.604 -        ret = -1;
  35.605 -    
  35.606 -    spin_unlock(&timerlist_lock);
  35.607 -
  35.608 -    return ret;
  35.609 -}
  35.610 -
  35.611 -
  35.612 -/* Time debugging. */
  35.613 -static void dbg_time_int(int irq, void *dev_id, struct pt_regs *ptregs)
  35.614 -{
  35.615 -    unsigned long flags, j;
  35.616 -    u64 s_now, j_st;
  35.617 -    struct timeval s_tv, tv;
  35.618 -
  35.619 -    struct timer_list *timer;
  35.620 -    u64 t_st;
  35.621 -
  35.622 -    read_lock_irqsave(&xtime_lock, flags);
  35.623 -    s_tv.tv_sec  = shadow_tv.tv_sec;
  35.624 -    s_tv.tv_usec = shadow_tv.tv_usec;
  35.625 -    s_now        = shadow_system_time;
  35.626 -    read_unlock_irqrestore(&xtime_lock, flags);
  35.627 -
  35.628 -    do_gettimeofday(&tv);
  35.629 -
  35.630 -    j = jiffies;
  35.631 -    j_st = __jiffies_to_st(j);
  35.632 -
  35.633 -    timer = next_timer_event();
  35.634 -    t_st = __jiffies_to_st(timer->expires);
  35.635 -
  35.636 -    printk(KERN_ALERT "time: shadow_st=0x%X:%08X\n",
  35.637 -           (u32)(s_now>>32), (u32)s_now);
  35.638 -    printk(KERN_ALERT "time: wct=%lds %ldus shadow_wct=%lds %ldus\n",
  35.639 -           tv.tv_sec, tv.tv_usec, s_tv.tv_sec, s_tv.tv_usec);
  35.640 -    printk(KERN_ALERT "time: jiffies=%lu(0x%X:%08X) timeout=%lu(0x%X:%08X)\n",
  35.641 -           jiffies,(u32)(j_st>>32), (u32)j_st,
  35.642 -           timer->expires,(u32)(t_st>>32), (u32)t_st);
  35.643 -    printk(KERN_ALERT "time: processed_system_time=0x%X:%08X\n",
  35.644 -           (u32)(processed_system_time>>32), (u32)processed_system_time);
  35.645 -
  35.646 -#ifdef CONFIG_MAGIC_SYSRQ
  35.647 -    handle_sysrq('t',NULL,NULL,NULL);
  35.648 -#endif
  35.649 -}
  35.650 -
  35.651 -static struct irqaction dbg_time = {
  35.652 -    dbg_time_int, 
  35.653 -    SA_SHIRQ, 
  35.654 -    0, 
  35.655 -    "timer_dbg", 
  35.656 -    &dbg_time_int,
  35.657 -    NULL
  35.658 -};
  35.659 -
  35.660 -void __init time_init(void)
  35.661 -{
  35.662 -    unsigned long long alarm;
  35.663 -    u64 __cpu_khz, __cpu_ghz, cpu_freq, scale, scale2;
  35.664 -    unsigned int cpu_ghz;
  35.665 -
  35.666 -    __cpu_khz = __cpu_ghz = cpu_freq = HYPERVISOR_shared_info->cpu_freq;
  35.667 -    do_div(__cpu_khz, 1000UL);
  35.668 -    cpu_khz = (u32)__cpu_khz;
  35.669 -    do_div(__cpu_ghz, 1000000000UL);
  35.670 -    cpu_ghz = (unsigned int)__cpu_ghz;
  35.671 -
  35.672 -    printk("Xen reported: %lu.%03lu MHz processor.\n", 
  35.673 -           cpu_khz / 1000, cpu_khz % 1000);
  35.674 -
  35.675 -    xtime.tv_sec = HYPERVISOR_shared_info->wc_sec;
  35.676 -    xtime.tv_usec = HYPERVISOR_shared_info->wc_usec;
  35.677 -    processed_system_time = shadow_system_time;
  35.678 -
  35.679 -    for ( rdtsc_bitshift = 0; cpu_ghz != 0; rdtsc_bitshift++, cpu_ghz >>= 1 )
  35.680 -        continue;
  35.681 -
  35.682 -    scale = 1000000LL << (32 + rdtsc_bitshift);
  35.683 -    do_div(scale, (u32)cpu_freq);
  35.684 -
  35.685 -    if ( (cpu_freq >> 32) != 0 )
  35.686 -    {
  35.687 -        scale2 = 1000000LL << rdtsc_bitshift;
  35.688 -        do_div(scale2, (u32)(cpu_freq>>32));
  35.689 -        scale += scale2;
  35.690 -    }
  35.691 -
  35.692 -    st_scale_f = scale & 0xffffffff;
  35.693 -    st_scale_i = scale >> 32;
  35.694 -
  35.695 -    __get_time_values_from_xen();
  35.696 -    processed_system_time = shadow_system_time;
  35.697 -
  35.698 -    time_irq  = bind_virq_to_irq(VIRQ_TIMER);
  35.699 -    debug_irq = bind_virq_to_irq(VIRQ_DEBUG);
  35.700 -
  35.701 -    (void)setup_irq(time_irq, &irq_timer);
  35.702 -    (void)setup_irq(debug_irq, &dbg_time);
  35.703 -
  35.704 -    rdtscll(alarm);
  35.705 -}
  35.706 -
  35.707 -void time_suspend(void)
  35.708 -{
  35.709 -}
  35.710 -
  35.711 -void time_resume(void)
  35.712 -{
  35.713 -    unsigned long flags;
  35.714 -    write_lock_irqsave(&xtime_lock, flags);
  35.715 -    /* Get timebases for new environment. */ 
  35.716 -    __get_time_values_from_xen();
  35.717 -    /* Reset our own concept of passage of system time. */
  35.718 -    processed_system_time = shadow_system_time;
  35.719 -    /* Accept a warp in UTC (wall-clock) time. */
  35.720 -    last_seen_tv.tv_sec = 0;
  35.721 -    /* Make sure we resync UTC time with Xen on next timer interrupt. */
  35.722 -    last_update_from_xen = 0;
  35.723 -    write_unlock_irqrestore(&xtime_lock, flags);
  35.724 -}
  35.725 -
  35.726 -/*
  35.727 - * /proc/sys/xen: This really belongs in another file. It can stay here for
  35.728 - * now however.
  35.729 - */
  35.730 -static ctl_table xen_subtable[] = {
  35.731 -    {1, "independent_wallclock", &independent_wallclock,
  35.732 -     sizeof(independent_wallclock), 0644, NULL, proc_dointvec},
  35.733 -    {0}
  35.734 -};
  35.735 -static ctl_table xen_table[] = {
  35.736 -    {123, "xen", NULL, 0, 0555, xen_subtable},
  35.737 -    {0}
  35.738 -};
  35.739 -static int __init xen_sysctl_init(void)
  35.740 -{
  35.741 -    (void)register_sysctl_table(xen_table, 0);
  35.742 -    return 0;
  35.743 -}
  35.744 -__initcall(xen_sysctl_init);
    36.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/traps.c	Fri Oct 07 23:22:35 2005 +0100
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,619 +0,0 @@
    36.4 -/*
    36.5 - *  linux/arch/i386/traps.c
    36.6 - *
    36.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    36.8 - *
    36.9 - *  Pentium III FXSR, SSE support
   36.10 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   36.11 - */
   36.12 -
   36.13 -/*
   36.14 - * 'Traps.c' handles hardware traps and faults after we have saved some
   36.15 - * state in 'asm.s'.
   36.16 - */
   36.17 -#include <linux/config.h>
   36.18 -#include <linux/sched.h>
   36.19 -#include <linux/kernel.h>
   36.20 -#include <linux/string.h>
   36.21 -#include <linux/errno.h>
   36.22 -#include <linux/ptrace.h>
   36.23 -#include <linux/timer.h>
   36.24 -#include <linux/mm.h>
   36.25 -#include <linux/init.h>
   36.26 -#include <linux/delay.h>
   36.27 -#include <linux/spinlock.h>
   36.28 -#include <linux/interrupt.h>
   36.29 -#include <linux/highmem.h>
   36.30 -
   36.31 -#include <asm/system.h>
   36.32 -#include <asm/uaccess.h>
   36.33 -#include <asm/io.h>
   36.34 -#include <asm/atomic.h>
   36.35 -#include <asm/debugreg.h>
   36.36 -#include <asm/desc.h>
   36.37 -#include <asm/i387.h>
   36.38 -
   36.39 -#include <asm/smp.h>
   36.40 -#include <asm/pgalloc.h>
   36.41 -
   36.42 -#include <asm/hypervisor.h>
   36.43 -
   36.44 -#include <linux/irq.h>
   36.45 -#include <linux/module.h>
   36.46 -
   36.47 -asmlinkage int system_call(void);
   36.48 -asmlinkage void lcall7(void);
   36.49 -asmlinkage void lcall27(void);
   36.50 -
   36.51 -asmlinkage void divide_error(void);
   36.52 -asmlinkage void debug(void);
   36.53 -asmlinkage void int3(void);
   36.54 -asmlinkage void overflow(void);
   36.55 -asmlinkage void bounds(void);
   36.56 -asmlinkage void invalid_op(void);
   36.57 -asmlinkage void device_not_available(void);
   36.58 -asmlinkage void double_fault(void);
   36.59 -asmlinkage void coprocessor_segment_overrun(void);
   36.60 -asmlinkage void invalid_TSS(void);
   36.61 -asmlinkage void segment_not_present(void);
   36.62 -asmlinkage void stack_segment(void);
   36.63 -asmlinkage void general_protection(void);
   36.64 -asmlinkage void page_fault(void);
   36.65 -asmlinkage void coprocessor_error(void);
   36.66 -asmlinkage void simd_coprocessor_error(void);
   36.67 -asmlinkage void alignment_check(void);
   36.68 -asmlinkage void fixup_4gb_segment(void);
   36.69 -asmlinkage void machine_check(void);
   36.70 -
   36.71 -int kstack_depth_to_print = 24;
   36.72 -
   36.73 -
   36.74 -/*
   36.75 - * If the address is either in the .text section of the
   36.76 - * kernel, or in the vmalloc'ed module regions, it *may* 
   36.77 - * be the address of a calling routine
   36.78 - */
   36.79 -
   36.80 -#ifdef CONFIG_MODULES
   36.81 -
   36.82 -extern struct module *module_list;
   36.83 -extern struct module kernel_module;
   36.84 -
   36.85 -static inline int kernel_text_address(unsigned long addr)
   36.86 -{
   36.87 -	int retval = 0;
   36.88 -	struct module *mod;
   36.89 -
   36.90 -	if (addr >= (unsigned long) &_stext &&
   36.91 -	    addr <= (unsigned long) &_etext)
   36.92 -		return 1;
   36.93 -
   36.94 -	for (mod = module_list; mod != &kernel_module; mod = mod->next) {
   36.95 -		/* mod_bound tests for addr being inside the vmalloc'ed
   36.96 -		 * module area. Of course it'd be better to test only
   36.97 -		 * for the .text subset... */
   36.98 -		if (mod_bound(addr, 0, mod)) {
   36.99 -			retval = 1;
  36.100 -			break;
  36.101 -		}
  36.102 -	}
  36.103 -
  36.104 -	return retval;
  36.105 -}
  36.106 -
  36.107 -#else
  36.108 -
  36.109 -static inline int kernel_text_address(unsigned long addr)
  36.110 -{
  36.111 -	return (addr >= (unsigned long) &_stext &&
  36.112 -		addr <= (unsigned long) &_etext);
  36.113 -}
  36.114 -
  36.115 -#endif
  36.116 -
  36.117 -void show_trace(unsigned long * stack)
  36.118 -{
  36.119 -	int i;
  36.120 -	unsigned long addr;
  36.121 -
  36.122 -	if (!stack)
  36.123 -		stack = (unsigned long*)&stack;
  36.124 -
  36.125 -	printk("Call Trace: ");
  36.126 -	i = 1;
  36.127 -	while (((long) stack & (THREAD_SIZE-1)) != 0) {
  36.128 -		addr = *stack++;
  36.129 -		if (kernel_text_address(addr)) {
  36.130 -			if (i && ((i % 6) == 0))
  36.131 -				printk("\n   ");
  36.132 -			printk("[<%08lx>] ", addr);
  36.133 -			i++;
  36.134 -		}
  36.135 -	}
  36.136 -	printk("\n");
  36.137 -}
  36.138 -
  36.139 -void show_trace_task(struct task_struct *tsk)
  36.140 -{
  36.141 -	unsigned long esp = tsk->thread.esp;
  36.142 -
  36.143 -	/* User space on another CPU? */
  36.144 -	if ((esp ^ (unsigned long)tsk) & (PAGE_MASK<<1))
  36.145 -		return;
  36.146 -	show_trace((unsigned long *)esp);
  36.147 -}
  36.148 -
  36.149 -void show_stack(unsigned long * esp)
  36.150 -{
  36.151 -	unsigned long *stack;
  36.152 -	int i;
  36.153 -
  36.154 -	// debugging aid: "show_stack(NULL);" prints the
  36.155 -	// back trace for this cpu.
  36.156 -
  36.157 -	if(esp==NULL)
  36.158 -		esp=(unsigned long*)&esp;
  36.159 -
  36.160 -	stack = esp;
  36.161 -	for(i=0; i < kstack_depth_to_print; i++) {
  36.162 -		if (((long) stack & (THREAD_SIZE-1)) == 0)
  36.163 -			break;
  36.164 -		if (i && ((i % 8) == 0))
  36.165 -			printk("\n       ");
  36.166 -		printk("%08lx ", *stack++);
  36.167 -	}
  36.168 -	printk("\n");
  36.169 -	show_trace(esp);
  36.170 -}
  36.171 -
  36.172 -void show_registers(struct pt_regs *regs)
  36.173 -{
  36.174 -	int in_kernel = 1;
  36.175 -	unsigned long esp;
  36.176 -	unsigned short ss;
  36.177 -
  36.178 -	esp = (unsigned long) (&regs->esp);
  36.179 -	ss = __KERNEL_DS;
  36.180 -	if (regs->xcs & 2) {
  36.181 -		in_kernel = 0;
  36.182 -		esp = regs->esp;
  36.183 -		ss = regs->xss & 0xffff;
  36.184 -	}
  36.185 -	printk(KERN_ALERT "CPU:    %d\n", smp_processor_id() );
  36.186 -	printk(KERN_ALERT "EIP:    %04x:[<%08lx>]    %s\n",
  36.187 -	       0xffff & regs->xcs, regs->eip, print_tainted());
  36.188 -	printk(KERN_ALERT "EFLAGS: %08lx\n",regs->eflags);
  36.189 -	printk(KERN_ALERT "eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
  36.190 -		regs->eax, regs->ebx, regs->ecx, regs->edx);
  36.191 -	printk(KERN_ALERT "esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
  36.192 -		regs->esi, regs->edi, regs->ebp, esp);
  36.193 -	printk(KERN_ALERT "ds: %04x   es: %04x   ss: %04x\n",
  36.194 -		regs->xds & 0xffff, regs->xes & 0xffff, ss);
  36.195 -	printk(KERN_ALERT "Process %s (pid: %d, stackpage=%08lx)",
  36.196 -		current->comm, current->pid, 4096+(unsigned long)current);
  36.197 -	/*
  36.198 -	 * When in-kernel, we also print out the stack and code at the
  36.199 -	 * time of the fault..
  36.200 -	 */
  36.201 -	if (in_kernel) {
  36.202 -
  36.203 -		printk(KERN_ALERT "\nStack: ");
  36.204 -		show_stack((unsigned long*)esp);
  36.205 -
  36.206 -#if 0
  36.207 -                {
  36.208 -                        int i;
  36.209 -			printk(KERN_ALERT "\nCode: ");
  36.210 -			if(regs->eip < PAGE_OFFSET)
  36.211 -			        goto bad;
  36.212 -
  36.213 -			for(i=0;i<20;i++)
  36.214 -			{
  36.215 -			        unsigned char c;
  36.216 -			        if(__get_user(c, &((unsigned char*)regs->eip)[i])) {
  36.217 -bad:
  36.218 -				        printk(KERN_ALERT " Bad EIP value.");
  36.219 -					break;
  36.220 -				}
  36.221 -				printk("%02x ", c);
  36.222 -			}
  36.223 -		}
  36.224 -#endif
  36.225 -	}
  36.226 -	printk(KERN_ALERT "\n");
  36.227 -}	
  36.228 -
  36.229 -spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
  36.230 -
  36.231 -void die(const char * str, struct pt_regs * regs, long err)
  36.232 -{
  36.233 -	console_verbose();
  36.234 -	spin_lock_irq(&die_lock);
  36.235 -	bust_spinlocks(1);
  36.236 -	printk("%s: %04lx\n", str, err & 0xffff);
  36.237 -	show_registers(regs);
  36.238 -	bust_spinlocks(0);
  36.239 -	spin_unlock_irq(&die_lock);
  36.240 -	do_exit(SIGSEGV);
  36.241 -}
  36.242 -
  36.243 -static inline void die_if_kernel(const char * str, struct pt_regs * regs, long err)
  36.244 -{
  36.245 -	if (!(2 & regs->xcs))
  36.246 -		die(str, regs, err);
  36.247 -}
  36.248 -
  36.249 -
  36.250 -static void inline do_trap(int trapnr, int signr, char *str,
  36.251 -			   struct pt_regs * regs, long error_code,
  36.252 -                           siginfo_t *info)
  36.253 -{
  36.254 -	if (!(regs->xcs & 2))
  36.255 -		goto kernel_trap;
  36.256 -
  36.257 -	/*trap_signal:*/ {
  36.258 -		struct task_struct *tsk = current;
  36.259 -		tsk->thread.error_code = error_code;
  36.260 -		tsk->thread.trap_no = trapnr;
  36.261 -		if (info)
  36.262 -			force_sig_info(signr, info, tsk);
  36.263 -		else
  36.264 -			force_sig(signr, tsk);
  36.265 -		return;
  36.266 -	}
  36.267 -
  36.268 -	kernel_trap: {
  36.269 -		unsigned long fixup = search_exception_table(regs->eip);
  36.270 -		if (fixup)
  36.271 -			regs->eip = fixup;
  36.272 -		else	
  36.273 -			die(str, regs, error_code);
  36.274 -		return;
  36.275 -	}
  36.276 -}
  36.277 -
  36.278 -#define DO_ERROR(trapnr, signr, str, name) \
  36.279 -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
  36.280 -{ \
  36.281 -	do_trap(trapnr, signr, str, regs, error_code, NULL); \
  36.282 -}
  36.283 -
  36.284 -#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \
  36.285 -asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
  36.286 -{ \
  36.287 -	siginfo_t info; \
  36.288 -	info.si_signo = signr; \
  36.289 -	info.si_errno = 0; \
  36.290 -	info.si_code = sicode; \
  36.291 -	info.si_addr = (void *)siaddr; \
  36.292 -	do_trap(trapnr, signr, str, regs, error_code, &info); \
  36.293 -}
  36.294 -
  36.295 -DO_ERROR_INFO( 0, SIGFPE,  "divide error", divide_error, FPE_INTDIV, regs->eip)
  36.296 -DO_ERROR( 3, SIGTRAP, "int3", int3)
  36.297 -DO_ERROR( 4, SIGSEGV, "overflow", overflow)
  36.298 -DO_ERROR( 5, SIGSEGV, "bounds", bounds)
  36.299 -DO_ERROR_INFO( 6, SIGILL,  "invalid operand", invalid_op, ILL_ILLOPN, regs->eip)
  36.300 -DO_ERROR( 7, SIGSEGV, "device not available", device_not_available)
  36.301 -DO_ERROR( 8, SIGSEGV, "double fault", double_fault)
  36.302 -DO_ERROR( 9, SIGFPE,  "coprocessor segment overrun", coprocessor_segment_overrun)
  36.303 -DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
  36.304 -DO_ERROR(11, SIGBUS,  "segment not present", segment_not_present)
  36.305 -DO_ERROR(12, SIGBUS,  "stack segment", stack_segment)
  36.306 -DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
  36.307 -DO_ERROR(18, SIGBUS, "machine check", machine_check)
  36.308 -
  36.309 -asmlinkage void do_general_protection(struct pt_regs * regs, long error_code)
  36.310 -{
  36.311 -	/*
  36.312 -	 * If we trapped on an LDT access then ensure that the default_ldt is
  36.313 -	 * loaded, if nothing else. We load default_ldt lazily because LDT
  36.314 -	 * switching costs time and many applications don't need it.
  36.315 -	 */
  36.316 -	if ( unlikely((error_code & 6) == 4) )
  36.317 -	{
  36.318 -		unsigned long ldt;
  36.319 -		__asm__ __volatile__ ( "sldt %0" : "=r" (ldt) );
  36.320 -		if ( ldt == 0 )
  36.321 -		{
  36.322 -                    xen_set_ldt((unsigned long)&default_ldt[0], 5);
  36.323 -		    return;
  36.324 -		}
  36.325 -	}
  36.326 -
  36.327 -	if (!(regs->xcs & 2))
  36.328 -		goto gp_in_kernel;
  36.329 -
  36.330 -	current->thread.error_code = error_code;
  36.331 -	current->thread.trap_no = 13;
  36.332 -	force_sig(SIGSEGV, current);
  36.333 -	return;
  36.334 -
  36.335 -gp_in_kernel:
  36.336 -	{
  36.337 -		unsigned long fixup;
  36.338 -		fixup = search_exception_table(regs->eip);
  36.339 -		if (fixup) {
  36.340 -			regs->eip = fixup;
  36.341 -			return;
  36.342 -		}
  36.343 -		die("general protection fault", regs, error_code);
  36.344 -	}
  36.345 -}
  36.346 -
  36.347 -
  36.348 -asmlinkage void do_debug(struct pt_regs * regs, long error_code)
  36.349 -{
  36.350 -    unsigned int condition;
  36.351 -    struct task_struct *tsk = current;
  36.352 -    siginfo_t info;
  36.353 -
  36.354 -    condition = HYPERVISOR_get_debugreg(6);
  36.355 -
  36.356 -    /* Mask out spurious debug traps due to lazy DR7 setting */
  36.357 -    if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3)) {
  36.358 -        if (!tsk->thread.debugreg[7])
  36.359 -            goto clear_dr7;
  36.360 -    }
  36.361 -
  36.362 -    /* Save debug status register where ptrace can see it */
  36.363 -    tsk->thread.debugreg[6] = condition;
  36.364 -
  36.365 -    /* Mask out spurious TF errors due to lazy TF clearing */
  36.366 -    if (condition & DR_STEP) {
  36.367 -        /*
  36.368 -         * The TF error should be masked out only if the current
  36.369 -         * process is not traced and if the TRAP flag has been set
  36.370 -         * previously by a tracing process (condition detected by
  36.371 -         * the PT_DTRACE flag); remember that the i386 TRAP flag
  36.372 -         * can be modified by the process itself in user mode,
  36.373 -         * allowing programs to debug themselves without the ptrace()
  36.374 -         * interface.
  36.375 -         */
  36.376 -        if ((tsk->ptrace & (PT_DTRACE|PT_PTRACED)) == PT_DTRACE)
  36.377 -            goto clear_TF;
  36.378 -    }
  36.379 -
  36.380 -    /* Ok, finally something we can handle */
  36.381 -    tsk->thread.trap_no = 1;
  36.382 -    tsk->thread.error_code = error_code;
  36.383 -    info.si_signo = SIGTRAP;
  36.384 -    info.si_errno = 0;
  36.385 -    info.si_code = TRAP_BRKPT;
  36.386 -        
  36.387 -    /* If this is a kernel mode trap, save the user PC on entry to 
  36.388 -     * the kernel, that's what the debugger can make sense of.
  36.389 -     */
  36.390 -    info.si_addr = ((regs->xcs & 2) == 0) ? (void *)tsk->thread.eip : 
  36.391 -                                            (void *)regs->eip;
  36.392 -    force_sig_info(SIGTRAP, &info, tsk);
  36.393 -
  36.394 -    /* Disable additional traps. They'll be re-enabled when
  36.395 -     * the signal is delivered.
  36.396 -     */
  36.397 - clear_dr7:
  36.398 -    HYPERVISOR_set_debugreg(7, 0);
  36.399 -    return;
  36.400 -
  36.401 - clear_TF:
  36.402 -    regs->eflags &= ~TF_MASK;
  36.403 -    return;
  36.404 -}
  36.405 -
  36.406 -
  36.407 -/*
  36.408 - * Note that we play around with the 'TS' bit in an attempt to get
  36.409 - * the correct behaviour even in the presence of the asynchronous
  36.410 - * IRQ13 behaviour
  36.411 - */
  36.412 -void math_error(void *eip)
  36.413 -{
  36.414 -	struct task_struct * task;
  36.415 -	siginfo_t info;
  36.416 -	unsigned short cwd, swd;
  36.417 -
  36.418 -	/*
  36.419 -	 * Save the info for the exception handler and clear the error.
  36.420 -	 */
  36.421 -	task = current;
  36.422 -	save_init_fpu(task);
  36.423 -	task->thread.trap_no = 16;
  36.424 -	task->thread.error_code = 0;
  36.425 -	info.si_signo = SIGFPE;
  36.426 -	info.si_errno = 0;
  36.427 -	info.si_code = __SI_FAULT;
  36.428 -	info.si_addr = eip;
  36.429 -	/*
  36.430 -	 * (~cwd & swd) will mask out exceptions that are not set to unmasked
  36.431 -	 * status.  0x3f is the exception bits in these regs, 0x200 is the
  36.432 -	 * C1 reg you need in case of a stack fault, 0x040 is the stack
  36.433 -	 * fault bit.  We should only be taking one exception at a time,
  36.434 -	 * so if this combination doesn't produce any single exception,
  36.435 -	 * then we have a bad program that isn't syncronizing its FPU usage
  36.436 -	 * and it will suffer the consequences since we won't be able to
  36.437 -	 * fully reproduce the context of the exception
  36.438 -	 */
  36.439 -	cwd = get_fpu_cwd(task);
  36.440 -	swd = get_fpu_swd(task);
  36.441 -	switch (((~cwd) & swd & 0x3f) | (swd & 0x240)) {
  36.442 -		case 0x000:
  36.443 -		default:
  36.444 -			break;
  36.445 -		case 0x001: /* Invalid Op */
  36.446 -		case 0x041: /* Stack Fault */
  36.447 -		case 0x241: /* Stack Fault | Direction */
  36.448 -			info.si_code = FPE_FLTINV;
  36.449 -			break;
  36.450 -		case 0x002: /* Denormalize */
  36.451 -		case 0x010: /* Underflow */
  36.452 -			info.si_code = FPE_FLTUND;
  36.453 -			break;
  36.454 -		case 0x004: /* Zero Divide */
  36.455 -			info.si_code = FPE_FLTDIV;
  36.456 -			break;
  36.457 -		case 0x008: /* Overflow */
  36.458 -			info.si_code = FPE_FLTOVF;
  36.459 -			break;
  36.460 -		case 0x020: /* Precision */
  36.461 -			info.si_code = FPE_FLTRES;
  36.462 -			break;
  36.463 -	}
  36.464 -	force_sig_info(SIGFPE, &info, task);
  36.465 -}
  36.466 -
  36.467 -asmlinkage void do_coprocessor_error(struct pt_regs * regs, long error_code)
  36.468 -{
  36.469 -	ignore_irq13 = 1;
  36.470 -	math_error((void *)regs->eip);
  36.471 -}
  36.472 -
  36.473 -void simd_math_error(void *eip)
  36.474 -{
  36.475 -	struct task_struct * task;
  36.476 -	siginfo_t info;
  36.477 -	unsigned short mxcsr;
  36.478 -
  36.479 -	/*
  36.480 -	 * Save the info for the exception handler and clear the error.
  36.481 -	 */
  36.482 -	task = current;
  36.483 -	save_init_fpu(task);
  36.484 -	task->thread.trap_no = 19;
  36.485 -	task->thread.error_code = 0;
  36.486 -	info.si_signo = SIGFPE;
  36.487 -	info.si_errno = 0;
  36.488 -	info.si_code = __SI_FAULT;
  36.489 -	info.si_addr = eip;
  36.490 -	/*
  36.491 -	 * The SIMD FPU exceptions are handled a little differently, as there
  36.492 -	 * is only a single status/control register.  Thus, to determine which
  36.493 -	 * unmasked exception was caught we must mask the exception mask bits
  36.494 -	 * at 0x1f80, and then use these to mask the exception bits at 0x3f.
  36.495 -	 */
  36.496 -	mxcsr = get_fpu_mxcsr(task);
  36.497 -	switch (~((mxcsr & 0x1f80) >> 7) & (mxcsr & 0x3f)) {
  36.498 -		case 0x000:
  36.499 -		default:
  36.500 -			break;
  36.501 -		case 0x001: /* Invalid Op */
  36.502 -			info.si_code = FPE_FLTINV;
  36.503 -			break;
  36.504 -		case 0x002: /* Denormalize */
  36.505 -		case 0x010: /* Underflow */
  36.506 -			info.si_code = FPE_FLTUND;
  36.507 -			break;
  36.508 -		case 0x004: /* Zero Divide */
  36.509 -			info.si_code = FPE_FLTDIV;
  36.510 -			break;
  36.511 -		case 0x008: /* Overflow */
  36.512 -			info.si_code = FPE_FLTOVF;