ia64/xen-unstable

changeset 7278:4e0c94871be2

Merge
author djm@kirby.fc.hp.com
date Sat Oct 08 14:28:24 2005 -0600 (2005-10-08)
parents 0ba10f7fef51 2144de6eabcc
children 0ffa4369cbb3
files .hgignore Makefile buildconfigs/Rules.mk docs/src/user/installation.tex linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6-xen-sparse/arch/xen/kernel/reboot.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c linux-2.6-xen-sparse/drivers/xen/blkback/interface.c linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/blktap/interface.c linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c linux-2.6-xen-sparse/drivers/xen/netback/interface.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6-xen-sparse/drivers/xen/tpmback/interface.c linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c linux-2.6-xen-sparse/include/asm-xen/evtchn.h linux-2.6-xen-sparse/include/asm-xen/xenbus.h tools/check/check_hotplug tools/console/daemon/io.c tools/examples/Makefile tools/examples/xmexample.vmx tools/firmware/vmxassist/Makefile tools/ioemu/target-i386-dm/helper2.c tools/ioemu/vl.c tools/python/xen/lowlevel/xc/xc.c tools/python/xen/lowlevel/xs/xs.c tools/python/xen/web/http.py tools/python/xen/xend/XendCheckpoint.py tools/python/xen/xend/XendClient.py tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/image.py tools/python/xen/xend/server/DevController.py tools/python/xen/xend/server/SrvDaemon.py tools/python/xen/xend/server/SrvDomain.py tools/python/xen/xend/server/SrvDomainDir.py tools/python/xen/xm/main.py tools/xenstore/Makefile tools/xenstore/speedtest.c tools/xenstore/testsuite/12readonly.test tools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_domain.c tools/xenstore/xs.c tools/xenstore/xs.h tools/xenstore/xs_lib.h tools/xenstore/xs_random.c tools/xenstore/xs_test.c xen/arch/x86/mm.c xen/arch/x86/vmx_platform.c xen/arch/x86/vmx_vmcs.c xen/include/asm-x86/mm.h xen/include/asm-x86/vmx_platform.h
line diff
     1.1 --- a/.hgignore	Sat Oct 08 11:37:45 2005 -0600
     1.2 +++ b/.hgignore	Sat Oct 08 14:28:24 2005 -0600
     1.3 @@ -155,7 +155,7 @@
     1.4  ^tools/xenstore/xenstore-read$
     1.5  ^tools/xenstore/xenstore-rm$
     1.6  ^tools/xenstore/xenstore-write$
     1.7 -^tools/xenstore/xs_dom0_test$
     1.8 +^tools/xenstore/xs_crashme$
     1.9  ^tools/xenstore/xs_random$
    1.10  ^tools/xenstore/xs_stress$
    1.11  ^tools/xenstore/xs_tdb_dump$
     2.1 --- a/Config.mk	Sat Oct 08 11:37:45 2005 -0600
     2.2 +++ b/Config.mk	Sat Oct 08 14:28:24 2005 -0600
     2.3 @@ -20,6 +20,13 @@ STRIP      = $(CROSS_COMPILE)strip
     2.4  OBJCOPY    = $(CROSS_COMPILE)objcopy
     2.5  OBJDUMP    = $(CROSS_COMPILE)objdump
     2.6  
     2.7 +DISTDIR     ?= $(XEN_ROOT)/dist
     2.8 +
     2.9 +INSTALL      = install
    2.10 +INSTALL_DIR  = $(INSTALL) -d -m0755
    2.11 +INSTALL_DATA = $(INSTALL) -m0644
    2.12 +INSTALL_PROG = $(INSTALL) -m0755
    2.13 +
    2.14  ifeq ($(XEN_TARGET_ARCH),x86_64)
    2.15  LIBDIR = lib64
    2.16  else
    2.17 @@ -49,3 +56,5 @@ ACM_USE_SECURITY_POLICY ?= ACM_NULL_POLI
    2.18  XENSTAT_XENTOP ?= y
    2.19  
    2.20  VTPM_TOOLS ?= n
    2.21 +
    2.22 +-include $(XEN_ROOT)/.config
     3.1 --- a/Makefile	Sat Oct 08 11:37:45 2005 -0600
     3.2 +++ b/Makefile	Sat Oct 08 14:28:24 2005 -0600
     3.3 @@ -2,23 +2,11 @@
     3.4  # Grand Unified Makefile for Xen.
     3.5  #
     3.6  
     3.7 -# Default is to install to local 'dist' directory.
     3.8 -DISTDIR ?= $(CURDIR)/dist
     3.9 -DESTDIR ?= $(DISTDIR)/install
    3.10 -
    3.11 -INSTALL		:= install
    3.12 -INSTALL_DIR	:= $(INSTALL) -d -m0755
    3.13 -INSTALL_DATA	:= $(INSTALL) -m0644
    3.14 -INSTALL_PROG	:= $(INSTALL) -m0755
    3.15 -
    3.16  KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
    3.17 -# linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
    3.18 -# You may use wildcards in the above e.g. KERNELS=*2.4*
    3.19 +# You may use wildcards in the above e.g. KERNELS=*2.6*
    3.20  
    3.21  XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
    3.22  
    3.23 -export DESTDIR
    3.24 -
    3.25  # Export target architecture overrides to Xen and Linux sub-trees.
    3.26  ifneq ($(XEN_TARGET_ARCH),)
    3.27  SUBARCH := $(subst x86_32,i386,$(XEN_TARGET_ARCH))
    3.28 @@ -28,6 +16,7 @@ endif
    3.29  # Default target must appear before any include lines
    3.30  all: dist
    3.31  
    3.32 +XEN_ROOT=$(CURDIR)
    3.33  include Config.mk
    3.34  include buildconfigs/Rules.mk
    3.35  
    3.36 @@ -46,24 +35,40 @@ build: kernels
    3.37  	$(MAKE) -C tools build
    3.38  	$(MAKE) -C docs build
    3.39  
    3.40 +# The test target is for unit tests that can run without an installation.  Of
    3.41 +# course, many tests require a machine running Xen itself, and these are
    3.42 +# handled elsewhere.
    3.43 +test:
    3.44 +	$(MAKE) -C tools/python test
    3.45 +
    3.46  # build and install everything into local dist directory
    3.47 -dist: xen kernels tools docs
    3.48 +dist: DESTDIR=$(DISTDIR)/install
    3.49 +dist: dist-xen dist-kernels dist-tools dist-docs
    3.50  	$(INSTALL_DIR) $(DISTDIR)/check
    3.51  	$(INSTALL_DATA) ./COPYING $(DISTDIR)
    3.52  	$(INSTALL_DATA) ./README $(DISTDIR)
    3.53  	$(INSTALL_PROG) ./install.sh $(DISTDIR)
    3.54  	$(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
    3.55 +dist-%: DESTDIR=$(DISTDIR)/install
    3.56 +dist-%: install-%
    3.57 +	@: # do nothing
    3.58  
    3.59 -xen:
    3.60 +# Legacy dist targets
    3.61 +xen: dist-xen
    3.62 +tools: dist-tools
    3.63 +kernels: dist-kernels
    3.64 +docs: dist-docs
    3.65 +
    3.66 +install-xen:
    3.67  	$(MAKE) -C xen install
    3.68  
    3.69 -tools:
    3.70 +install-tools:
    3.71  	$(MAKE) -C tools install
    3.72  
    3.73 -kernels:
    3.74 +install-kernels:
    3.75  	for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
    3.76  
    3.77 -docs:
    3.78 +install-docs:
    3.79  	sh ./docs/check_pkgs && $(MAKE) -C docs install || true
    3.80  
    3.81  dev-docs:
    3.82 @@ -119,10 +124,6 @@ install-iptables:
    3.83  	tar -jxf iptables-1.2.11.tar.bz2
    3.84  	$(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
    3.85  
    3.86 -install-%: DESTDIR=
    3.87 -install-%: %
    3.88 -	@: # do nothing
    3.89 -
    3.90  help:
    3.91  	@echo 'Installation targets:'
    3.92  	@echo '  install          - build and install everything'
    3.93 @@ -161,7 +162,6 @@ help:
    3.94  	@echo '                     with extreme care!)'
    3.95  
    3.96  # Use this target with extreme care!
    3.97 -uninstall: DESTDIR=
    3.98  uninstall: D=$(DESTDIR)
    3.99  uninstall:
   3.100  	[ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
   3.101 @@ -187,12 +187,5 @@ uninstall:
   3.102  	rm -rf $(D)/usr/share/man/man8/xen*
   3.103  
   3.104  # Legacy targets for compatibility
   3.105 -linux24:
   3.106 -	$(MAKE) 'KERNELS=linux-2.4*' kernels
   3.107 -
   3.108  linux26:
   3.109  	$(MAKE) 'KERNELS=linux-2.6*' kernels
   3.110 -
   3.111 -netbsd20:
   3.112 -	$(MAKE) netbsd-2.0-xenU-build
   3.113 -
     4.1 --- a/README	Sat Oct 08 11:37:45 2005 -0600
     4.2 +++ b/README	Sat Oct 08 14:28:24 2005 -0600
     4.3 @@ -22,7 +22,7 @@ Xen is freely-distributable Open Source 
     4.4  GNU GPL.
     4.5  
     4.6  The 2.0 release offers excellent performance, hardware support and
     4.7 -enterprise-grade features such as live migration. Linux 2.6, 2.4 and
     4.8 +enterprise-grade features such as live migration. Linux 2.6 and
     4.9  NetBSD 2.0 are already available for Xen, with more operating system
    4.10  ports on the way.
    4.11  
    4.12 @@ -97,8 +97,8 @@ 1. Download and untar the source tarball
    4.13     version for unstable.
    4.14  
    4.15  2. cd to xen-unstable (or whatever you sensibly rename it to).
    4.16 -   The Linux (2.4 and 2.6), netbsd and freebsd kernel source
    4.17 -   trees are in the $os-$version-xen-sparse directories.
    4.18 +   The Linux, netbsd and freebsd kernel source trees are in
    4.19 +   the $os-$version-xen-sparse directories.
    4.20  
    4.21  On Linux:
    4.22  
     5.1 --- a/buildconfigs/Rules.mk	Sat Oct 08 11:37:45 2005 -0600
     5.2 +++ b/buildconfigs/Rules.mk	Sat Oct 08 14:28:24 2005 -0600
     5.3 @@ -1,10 +1,7 @@
     5.4  
     5.5  include Config.mk
     5.6  
     5.7 -# We expect these two to already be set if people 
     5.8 -# are using the top-level Makefile
     5.9 -DISTDIR	?= $(CURDIR)/dist
    5.10 -DESTDIR	?= $(DISTDIR)/install
    5.11 +export DESTDIR
    5.12  
    5.13  ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
    5.14  ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
     6.1 --- a/buildconfigs/mk.linux-2.4-xenU	Sat Oct 08 11:37:45 2005 -0600
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,51 +0,0 @@
     6.4 -
     6.5 -OS           = linux
     6.6 -
     6.7 -LINUX_SERIES = 2.4
     6.8 -LINUX_VER    = 2.4.30
     6.9 -
    6.10 -EXTRAVERSION = xenU
    6.11 -
    6.12 -LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
    6.13 -
    6.14 -include buildconfigs/Rules.mk
    6.15 -
    6.16 -.PHONY: build clean delete
    6.17 -
    6.18 -# The real action starts here!
    6.19 -build: $(LINUX_DIR)/include/linux/autoconf.h
    6.20 -	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    6.21 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    6.22 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    6.23 -	fi
    6.24 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    6.25 -
    6.26 -$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    6.27 -	rm -rf $(LINUX_DIR)
    6.28 -	cp -al $(<D) $(LINUX_DIR)
    6.29 -	# Apply arch-xen patches
    6.30 -	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    6.31 -          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    6.32 -	# Re-use config from install dir if one exits else use default config
    6.33 -	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    6.34 -	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    6.35 -	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    6.36 -	  || cp $(LINUX_DIR)/arch/xen/defconfig-$(EXTRAVERSION) \
    6.37 -		$(LINUX_DIR)/.config
    6.38 -	# Patch kernel Makefile to set EXTRAVERSION
    6.39 -	( cd $(LINUX_DIR) ; \
    6.40 -	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    6.41 -	  rm -f Makefile ; mv Mk.tmp Makefile )
    6.42 -	make -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    6.43 -	make -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) dep
    6.44 -
    6.45 -config: CONFIGMODE = menuconfig
    6.46 -config: $(LINUX_DIR)/include/linux/autoconf.h
    6.47 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    6.48 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) dep
    6.49 -
    6.50 -clean::
    6.51 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    6.52 -
    6.53 -delete: 
    6.54 -	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
     7.1 --- a/buildconfigs/mk.linux-2.6-xen	Sat Oct 08 11:37:45 2005 -0600
     7.2 +++ b/buildconfigs/mk.linux-2.6-xen	Sat Oct 08 14:28:24 2005 -0600
     7.3 @@ -4,7 +4,7 @@ OS           = linux
     7.4  LINUX_SERIES = 2.6
     7.5  LINUX_VER    = 2.6.12
     7.6  
     7.7 -EXTRAVERSION = xen
     7.8 +EXTRAVERSION ?= xen
     7.9  
    7.10  LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
    7.11  
     8.1 --- a/buildconfigs/mk.linux-2.6-xen0	Sat Oct 08 11:37:45 2005 -0600
     8.2 +++ b/buildconfigs/mk.linux-2.6-xen0	Sat Oct 08 14:28:24 2005 -0600
     8.3 @@ -1,51 +1,2 @@
     8.4 -
     8.5 -OS           = linux
     8.6 -
     8.7 -LINUX_SERIES = 2.6
     8.8 -LINUX_VER    = 2.6.12
     8.9 -
    8.10  EXTRAVERSION = xen0
    8.11 -
    8.12 -LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
    8.13 -
    8.14 -include buildconfigs/Rules.mk
    8.15 -
    8.16 -.PHONY: build clean delete
    8.17 -
    8.18 -# The real action starts here!
    8.19 -build: $(LINUX_DIR)/include/linux/autoconf.h
    8.20 -	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    8.21 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    8.22 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    8.23 -	fi
    8.24 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    8.25 -
    8.26 -$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    8.27 -	rm -rf $(LINUX_DIR)
    8.28 -	cp -al $(<D) $(LINUX_DIR)
    8.29 -	# Apply arch-xen patches
    8.30 -	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    8.31 -          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    8.32 -	# Re-use config from install dir if one exits else use default config
    8.33 -	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    8.34 -	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    8.35 -	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    8.36 -	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
    8.37 -		$(LINUX_DIR)/.config
    8.38 -	# See if we need to munge config to enable PAE
    8.39 -	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
    8.40 -	# Patch kernel Makefile to set EXTRAVERSION
    8.41 -	( cd $(LINUX_DIR) ; \
    8.42 -	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    8.43 -	  rm -f Makefile ; mv Mk.tmp Makefile )
    8.44 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    8.45 -
    8.46 -config: CONFIGMODE = menuconfig
    8.47 -config: $(LINUX_DIR)/include/linux/autoconf.h
    8.48 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    8.49 -
    8.50 -clean::
    8.51 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    8.52 -
    8.53 -delete: 
    8.54 -	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
    8.55 +include buildconfigs/mk.linux-2.6-xen
     9.1 --- a/buildconfigs/mk.linux-2.6-xenU	Sat Oct 08 11:37:45 2005 -0600
     9.2 +++ b/buildconfigs/mk.linux-2.6-xenU	Sat Oct 08 14:28:24 2005 -0600
     9.3 @@ -1,51 +1,2 @@
     9.4 -
     9.5 -OS           = linux
     9.6 -
     9.7 -LINUX_SERIES = 2.6
     9.8 -LINUX_VER    = 2.6.12
     9.9 -
    9.10  EXTRAVERSION = xenU
    9.11 -
    9.12 -LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
    9.13 -
    9.14 -include buildconfigs/Rules.mk
    9.15 -
    9.16 -.PHONY: build clean delete
    9.17 -
    9.18 -# The real action starts here!
    9.19 -build: $(LINUX_DIR)/include/linux/autoconf.h
    9.20 -	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    9.21 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
    9.22 -	    $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    9.23 -	fi
    9.24 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
    9.25 -
    9.26 -$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
    9.27 -	rm -rf $(LINUX_DIR)
    9.28 -	cp -al $(<D) $(LINUX_DIR)
    9.29 -	# Apply arch-xen patches
    9.30 -	( cd linux-$(LINUX_SERIES)-xen-sparse ; \
    9.31 -          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
    9.32 -	# Re-use config from install dir if one exits else use default config
    9.33 -	CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
    9.34 -	[ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
    9.35 -	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
    9.36 -	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
    9.37 -		$(LINUX_DIR)/.config
    9.38 -	# See if we need to munge config to enable PAE
    9.39 -	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
    9.40 -	# Patch kernel Makefile to set EXTRAVERSION
    9.41 -	( cd $(LINUX_DIR) ; \
    9.42 -	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    9.43 -	  rm -f Makefile ; mv Mk.tmp Makefile )
    9.44 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
    9.45 -
    9.46 -config: CONFIGMODE = menuconfig
    9.47 -config: $(LINUX_DIR)/include/linux/autoconf.h
    9.48 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
    9.49 -
    9.50 -clean::
    9.51 -	$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
    9.52 -
    9.53 -delete: 
    9.54 -	rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
    9.55 +include buildconfigs/mk.linux-2.6-xen
    10.1 --- a/docs/misc/xen_config.html	Sat Oct 08 11:37:45 2005 -0600
    10.2 +++ b/docs/misc/xen_config.html	Sat Oct 08 14:28:24 2005 -0600
    10.3 @@ -154,7 +154,7 @@ one vif with default MAC.
    10.4      (memory 64)
    10.5      (image
    10.6          (linux
    10.7 -            (kernel /boot/vmlinuz-2.4.26-xen)
    10.8 +            (kernel /boot/vmlinuz-2.6.12-xen)
    10.9              (ip ::::xendom1:eth0:dhcp)
   10.10              (root /dev/xda1)
   10.11              (args 'rw fastboot 4')
    11.1 --- a/docs/src/user/installation.tex	Sat Oct 08 11:37:45 2005 -0600
    11.2 +++ b/docs/src/user/installation.tex	Sat Oct 08 14:28:24 2005 -0600
    11.3 @@ -1,7 +1,7 @@
    11.4  \chapter{Installation}
    11.5  
    11.6  The Xen distribution includes three main components: Xen itself, ports
    11.7 -of Linux 2.4 and 2.6 and NetBSD to run on Xen, and the userspace
    11.8 +of Linux and NetBSD to run on Xen, and the userspace
    11.9  tools required to manage a Xen-based system.  This chapter describes
   11.10  how to install the Xen~2.0 distribution from source.  Alternatively,
   11.11  there may be pre-built packages available as part of your operating
   11.12 @@ -169,7 +169,7 @@ KERNELS ?= mk.linux-2.6-xen0 mk.linux-2.
   11.13  
   11.14  You can edit this line to include any set of operating system kernels
   11.15  which have configurations in the top-level \path{buildconfigs/}
   11.16 -directory, for example \path{mk.linux-2.4-xenU} to build a Linux 2.4
   11.17 +directory, for example \path{mk.linux-2.6-xenU} to build a Linux 2.6
   11.18  kernel containing only virtual device drivers.
   11.19  
   11.20  %% Inspect the Makefile if you want to see what goes on during a
   11.21 @@ -190,10 +190,6 @@ kernel containing only virtual device dr
   11.22  %%   mkbuildtree} script to add the Xen patches to the kernel.
   11.23  
   11.24  
   11.25 -%% The procedure is similar to build the Linux 2.4 port: \\
   11.26 -%% \verb!# LINUX_SRC=/path/to/linux2.4/source make linux24!
   11.27 -
   11.28 -
   11.29  %% \framebox{\parbox{5in}{
   11.30  %%     {\bf Distro specific:} \\
   11.31  %%     {\it Gentoo} --- if not using udev (most installations,
    12.1 --- a/docs/src/user/introduction.tex	Sat Oct 08 11:37:45 2005 -0600
    12.2 +++ b/docs/src/user/introduction.tex	Sat Oct 08 14:28:24 2005 -0600
    12.3 @@ -28,7 +28,7 @@ system kernels must explicitly support X
    12.4  space applications and libraries \emph{do not} require modification.
    12.5  
    12.6  Xen support is available for increasingly many operating systems:
    12.7 -right now, Linux 2.4, Linux 2.6 and NetBSD are available for Xen 2.0.
    12.8 +right now, Linux and NetBSD are available for Xen 2.0.
    12.9  A FreeBSD port is undergoing testing and will be incorporated into the
   12.10  release soon. Other OS ports, including Plan 9, are in progress.  We
   12.11  hope that that arch-xen patches will be incorporated into the
    13.1 --- a/install.sh	Sat Oct 08 11:37:45 2005 -0600
    13.2 +++ b/install.sh	Sat Oct 08 14:28:24 2005 -0600
    13.3 @@ -23,10 +23,16 @@ if ! [ -d $dst ]; then
    13.4  fi
    13.5  
    13.6  echo "Installing Xen from '$src' to '$dst'..."
    13.7 -(cd $src; tar -cf - --exclude etc/init.d * ) | tar -C $dst -xf -
    13.8 +(cd $src; tar -cf - --exclude etc/init.d --exclude etc/hotplug --exclude etc/udev * ) | tar -C $dst -xf -
    13.9  cp -fdRL $src/etc/init.d/* $dst/etc/init.d/
   13.10  echo "All done."
   13.11  
   13.12 +if [ -x /sbin/udev ] && [ ! -z `udev -V` ] && [ `/sbin/udev -V` -ge 059 ]; then
   13.13 +  cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
   13.14 +else
   13.15 +  cp -f $src/etc/hotplug/*.agent $dst/etc/hotplug/
   13.16 +fi
   13.17 +
   13.18  echo "Checking to see whether prerequisite tools are installed..."
   13.19  cd $src/../check
   13.20  ./chk install
    14.1 --- a/linux-2.4-xen-sparse/Makefile	Sat Oct 08 11:37:45 2005 -0600
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,592 +0,0 @@
    14.4 -VERSION = 2
    14.5 -PATCHLEVEL = 4
    14.6 -SUBLEVEL = 30
    14.7 -EXTRAVERSION =
    14.8 -
    14.9 -KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
   14.10 -
   14.11 -# SUBARCH always tells us the underlying machine architecture.
   14.12 -# Unless overridden, by default ARCH is equivalent to SUBARCH.
   14.13 -# This will be overriden for Xen and UML builds.
   14.14 -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
   14.15 -ARCH ?= $(SUBARCH)
   14.16 -
   14.17 -## XXX The following hack can be discarded after users have adjusted to the
   14.18 -## architectural name change 'xeno' -> 'xen'.
   14.19 -ifeq ($(ARCH),xeno)
   14.20 -  ARCH := xen
   14.21 -endif
   14.22 -
   14.23 -KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
   14.24 -
   14.25 -CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
   14.26 -	  else if [ -x /bin/bash ]; then echo /bin/bash; \
   14.27 -	  else echo sh; fi ; fi)
   14.28 -TOPDIR	:= $(shell /bin/pwd)
   14.29 -
   14.30 -HPATH   	= $(TOPDIR)/include
   14.31 -FINDHPATH	= $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
   14.32 -
   14.33 -HOSTCC  	= gcc
   14.34 -HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
   14.35 -
   14.36 -CROSS_COMPILE 	=
   14.37 -
   14.38 -#
   14.39 -# Include the make variables (CC, etc...)
   14.40 -#
   14.41 -
   14.42 -AS		= $(CROSS_COMPILE)as
   14.43 -LD		= $(CROSS_COMPILE)ld
   14.44 -CC		= $(CROSS_COMPILE)gcc
   14.45 -CPP		= $(CC) -E
   14.46 -AR		= $(CROSS_COMPILE)ar
   14.47 -NM		= $(CROSS_COMPILE)nm
   14.48 -STRIP		= $(CROSS_COMPILE)strip
   14.49 -OBJCOPY		= $(CROSS_COMPILE)objcopy
   14.50 -OBJDUMP		= $(CROSS_COMPILE)objdump
   14.51 -MAKEFILES	= $(TOPDIR)/.config
   14.52 -GENKSYMS	= /sbin/genksyms
   14.53 -DEPMOD		= /sbin/depmod
   14.54 -MODFLAGS	= -DMODULE
   14.55 -CFLAGS_KERNEL	=
   14.56 -PERL		= perl
   14.57 -AWK		= awk
   14.58 -RPM 		:= $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
   14.59 -		    	else echo rpm; fi)
   14.60 -
   14.61 -export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
   14.62 -	CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
   14.63 -	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL AWK
   14.64 -
   14.65 -all:	do-it-all
   14.66 -
   14.67 -#
   14.68 -# Make "config" the default target if there is no configuration file or
   14.69 -# "depend" the target if there is no top-level dependency information.
   14.70 -#
   14.71 -
   14.72 -ifeq (.config,$(wildcard .config))
   14.73 -include .config
   14.74 -ifeq (.depend,$(wildcard .depend))
   14.75 -include .depend
   14.76 -do-it-all:	Version vmlinux
   14.77 -else
   14.78 -CONFIGURATION = depend
   14.79 -do-it-all:	depend
   14.80 -endif
   14.81 -else
   14.82 -CONFIGURATION = config
   14.83 -do-it-all:	config
   14.84 -endif
   14.85 -
   14.86 -#
   14.87 -# INSTALL_PATH specifies where to place the updated kernel and system map
   14.88 -# images.  Uncomment if you want to place them anywhere other than root.
   14.89 -#
   14.90 -
   14.91 -#export	INSTALL_PATH=/boot
   14.92 -
   14.93 -#
   14.94 -# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
   14.95 -# relocations required by build roots.  This is not defined in the
   14.96 -# makefile but the arguement can be passed to make if needed.
   14.97 -#
   14.98 -
   14.99 -MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
  14.100 -export MODLIB
  14.101 -
  14.102 -#
  14.103 -# standard CFLAGS
  14.104 -#
  14.105 -
  14.106 -CPPFLAGS := -D__KERNEL__ -I$(HPATH)
  14.107 -
  14.108 -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
  14.109 -	  -fno-strict-aliasing -fno-common
  14.110 -ifndef CONFIG_FRAME_POINTER
  14.111 -CFLAGS += -fomit-frame-pointer
  14.112 -endif
  14.113 -AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
  14.114 -
  14.115 -#
  14.116 -# ROOT_DEV specifies the default root-device when making the image.
  14.117 -# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
  14.118 -# the default of FLOPPY is used by 'build'.
  14.119 -# This is i386 specific.
  14.120 -#
  14.121 -
  14.122 -export ROOT_DEV = CURRENT
  14.123 -
  14.124 -#
  14.125 -# If you want to preset the SVGA mode, uncomment the next line and
  14.126 -# set SVGA_MODE to whatever number you want.
  14.127 -# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
  14.128 -# The number is the same as you would ordinarily press at bootup.
  14.129 -# This is i386 specific.
  14.130 -#
  14.131 -
  14.132 -export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
  14.133 -
  14.134 -#
  14.135 -# If you want the RAM disk device, define this to be the size in blocks.
  14.136 -# This is i386 specific.
  14.137 -#
  14.138 -
  14.139 -#export RAMDISK = -DRAMDISK=512
  14.140 -
  14.141 -CORE_FILES	=kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
  14.142 -NETWORKS	=net/network.o
  14.143 -
  14.144 -LIBS		=$(TOPDIR)/lib/lib.a
  14.145 -SUBDIRS		=kernel drivers mm fs net ipc lib crypto
  14.146 -
  14.147 -DRIVERS-n :=
  14.148 -DRIVERS-y :=
  14.149 -DRIVERS-m :=
  14.150 -DRIVERS-  :=
  14.151 -
  14.152 -DRIVERS-$(CONFIG_ACPI_BOOT) += drivers/acpi/acpi.o
  14.153 -DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o
  14.154 -DRIVERS-y += drivers/char/char.o \
  14.155 -	drivers/block/block.o \
  14.156 -	drivers/misc/misc.o \
  14.157 -	drivers/net/net.o
  14.158 -DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
  14.159 -DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o
  14.160 -DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o
  14.161 -DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
  14.162 -DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
  14.163 -DRIVERS-$(CONFIG_DEV_APPLETALK) += drivers/net/appletalk/appletalk.o
  14.164 -DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.o
  14.165 -DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.o
  14.166 -DRIVERS-$(CONFIG_ARCNET) += drivers/net/arcnet/arcnetdrv.o
  14.167 -DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
  14.168 -DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
  14.169 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
  14.170 -DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
  14.171 -DRIVERS-$(CONFIG_FUSION_BOOT) += drivers/message/fusion/fusion.o
  14.172 -DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
  14.173 -
  14.174 -ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
  14.175 -DRIVERS-y += drivers/cdrom/driver.o
  14.176 -endif
  14.177 -
  14.178 -DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o
  14.179 -DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o
  14.180 -DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
  14.181 -DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
  14.182 -DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o
  14.183 -DRIVERS-$(CONFIG_NET_WIRELESS) += drivers/net/wireless/wireless_net.o
  14.184 -DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o
  14.185 -DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
  14.186 -DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
  14.187 -DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
  14.188 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
  14.189 -DRIVERS-$(CONFIG_PPC32) += drivers/macintosh/macintosh.o
  14.190 -DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
  14.191 -DRIVERS-$(CONFIG_ISAPNP) += drivers/pnp/pnp.o
  14.192 -DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
  14.193 -DRIVERS-$(CONFIG_VT) += drivers/video/video.o
  14.194 -DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
  14.195 -DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
  14.196 -DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
  14.197 -DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
  14.198 -DRIVERS-$(CONFIG_USB_GADGET) += drivers/usb/gadget/built-in.o
  14.199 -DRIVERS-y +=drivers/media/media.o
  14.200 -DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
  14.201 -DRIVERS-$(CONFIG_HIL) += drivers/hil/hil.o
  14.202 -DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o
  14.203 -DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
  14.204 -DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
  14.205 -DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
  14.206 -DRIVERS-$(CONFIG_GSC) += drivers/gsc/gscbus.o
  14.207 -DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
  14.208 -DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o
  14.209 -DRIVERS-$(CONFIG_ISDN_BOOL) += drivers/isdn/vmlinux-obj.o
  14.210 -DRIVERS-$(CONFIG_CRYPTO) += crypto/crypto.o
  14.211 -
  14.212 -DRIVERS := $(DRIVERS-y)
  14.213 -
  14.214 -
  14.215 -# files removed with 'make clean'
  14.216 -CLEAN_FILES = \
  14.217 -	kernel/ksyms.lst include/linux/compile.h \
  14.218 -	vmlinux System.map \
  14.219 -	.tmp* \
  14.220 -	drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
  14.221 -	drivers/char/conmakehash \
  14.222 -	drivers/char/drm/*-mod.c \
  14.223 -	drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
  14.224 -	drivers/zorro/devlist.h drivers/zorro/gen-devlist \
  14.225 -	drivers/sound/bin2hex drivers/sound/hex2hex \
  14.226 -	drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
  14.227 -	drivers/scsi/aic7xxx/aicasm/aicasm \
  14.228 -	drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
  14.229 -	drivers/scsi/aic7xxx/aicasm/aicasm_gram.h \
  14.230 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.c \
  14.231 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.h \
  14.232 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.c \
  14.233 -	drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
  14.234 -	drivers/scsi/aic7xxx/aicasm/aicdb.h \
  14.235 -	drivers/scsi/aic7xxx/aicasm/y.tab.h \
  14.236 -	drivers/scsi/53c700_d.h \
  14.237 -	drivers/tc/lk201-map.c \
  14.238 -	net/khttpd/make_times_h \
  14.239 -	net/khttpd/times.h \
  14.240 -	submenu* \
  14.241 -	drivers/ieee1394/oui.c
  14.242 -# directories removed with 'make clean'
  14.243 -CLEAN_DIRS = \
  14.244 -	modules
  14.245 -
  14.246 -# files removed with 'make mrproper'
  14.247 -MRPROPER_FILES = \
  14.248 -	include/linux/autoconf.h include/linux/version.h \
  14.249 -	lib/crc32table.h lib/gen_crc32table \
  14.250 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
  14.251 -	drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
  14.252 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
  14.253 -	drivers/net/hamradio/soundmodem/gentbl \
  14.254 -	drivers/sound/*_boot.h drivers/sound/.*.boot \
  14.255 -	drivers/sound/msndinit.c \
  14.256 -	drivers/sound/msndperm.c \
  14.257 -	drivers/sound/pndsperm.c \
  14.258 -	drivers/sound/pndspini.c \
  14.259 -	drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
  14.260 -	.version .config* config.in config.old \
  14.261 -	scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
  14.262 -	scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
  14.263 -	.menuconfig.log \
  14.264 -	include/asm \
  14.265 -	.hdepend scripts/mkdep scripts/split-include scripts/docproc \
  14.266 -	$(TOPDIR)/include/linux/modversions.h \
  14.267 -	kernel.spec
  14.268 -
  14.269 -# directories removed with 'make mrproper'
  14.270 -MRPROPER_DIRS = \
  14.271 -	include/config \
  14.272 -	$(TOPDIR)/include/linux/modules
  14.273 -
  14.274 -
  14.275 -include arch/$(ARCH)/Makefile
  14.276 -
  14.277 -# Extra cflags for kbuild 2.4.  The default is to forbid includes by kernel code
  14.278 -# from user space headers.  Some UML code requires user space headers, in the
  14.279 -# UML Makefiles add 'kbuild_2_4_nostdinc :=' before include Rules.make.  No
  14.280 -# other kernel code should include user space headers, if you need
  14.281 -# 'kbuild_2_4_nostdinc :=' or -I/usr/include for kernel code and you are not UML
  14.282 -# then your code is broken!  KAO.
  14.283 -
  14.284 -kbuild_2_4_nostdinc	:= -nostdinc -iwithprefix include
  14.285 -export kbuild_2_4_nostdinc
  14.286 -
  14.287 -export	CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
  14.288 -
  14.289 -export	NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
  14.290 -
  14.291 -.S.s:
  14.292 -	$(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $<
  14.293 -.S.o:
  14.294 -	$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
  14.295 -
  14.296 -Version: dummy
  14.297 -	@rm -f include/linux/compile.h
  14.298 -
  14.299 -boot: vmlinux
  14.300 -	@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
  14.301 -
  14.302 -vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs
  14.303 -	$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \
  14.304 -		--start-group \
  14.305 -		$(CORE_FILES) \
  14.306 -		$(DRIVERS) \
  14.307 -		$(NETWORKS) \
  14.308 -		$(LIBS) \
  14.309 -		--end-group \
  14.310 -		-o vmlinux
  14.311 -	$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
  14.312 -
  14.313 -symlinks:
  14.314 -	rm -f include/asm
  14.315 -	( cd include ; ln -sf asm-$(ARCH) asm)
  14.316 -	@if [ ! -d include/linux/modules ]; then \
  14.317 -		mkdir include/linux/modules; \
  14.318 -	fi
  14.319 -
  14.320 -oldconfig: symlinks
  14.321 -	$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
  14.322 -
  14.323 -xconfig: symlinks
  14.324 -	$(MAKE) -C scripts kconfig.tk
  14.325 -	wish -f scripts/kconfig.tk
  14.326 -
  14.327 -menuconfig: include/linux/version.h symlinks
  14.328 -	$(MAKE) -C scripts/lxdialog all
  14.329 -	$(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
  14.330 -
  14.331 -config: symlinks
  14.332 -	$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
  14.333 -
  14.334 -include/config/MARKER: scripts/split-include include/linux/autoconf.h
  14.335 -	scripts/split-include include/linux/autoconf.h include/config
  14.336 -	@ touch include/config/MARKER
  14.337 -
  14.338 -linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
  14.339 -
  14.340 -$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
  14.341 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
  14.342 -
  14.343 -$(TOPDIR)/include/linux/version.h: include/linux/version.h
  14.344 -$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
  14.345 -
  14.346 -newversion:
  14.347 -	. scripts/mkversion > .tmpversion
  14.348 -	@mv -f .tmpversion .version
  14.349 -
  14.350 -uts_len		:= 64
  14.351 -uts_truncate	:= sed -e 's/\(.\{1,$(uts_len)\}\).*/\1/'
  14.352 -
  14.353 -include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
  14.354 -	@echo -n \#`cat .version` > .ver1
  14.355 -	@if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver1; fi
  14.356 -	@if [ -f .name ]; then  echo -n \-`cat .name` >> .ver1; fi
  14.357 -	@LANG=C echo ' '`date` >> .ver1
  14.358 -	@echo \#define UTS_VERSION \"`cat .ver1 | $(uts_truncate)`\" > .ver
  14.359 -	@LANG=C echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
  14.360 -	@echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
  14.361 -	@echo \#define LINUX_COMPILE_HOST \"`hostname | $(uts_truncate)`\" >> .ver
  14.362 -	@([ -x /bin/dnsdomainname ] && /bin/dnsdomainname > .ver1) || \
  14.363 -	 ([ -x /bin/domainname ] && /bin/domainname > .ver1) || \
  14.364 -	 echo > .ver1
  14.365 -	@echo \#define LINUX_COMPILE_DOMAIN \"`cat .ver1 | $(uts_truncate)`\" >> .ver
  14.366 -	@echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> .ver
  14.367 -	@mv -f .ver $@
  14.368 -	@rm -f .ver1
  14.369 -
  14.370 -include/linux/version.h: ./Makefile
  14.371 -	@expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
  14.372 -	  (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
  14.373 -	@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
  14.374 -	@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
  14.375 -	@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
  14.376 -	@mv -f .ver $@
  14.377 -
  14.378 -comma	:= ,
  14.379 -
  14.380 -init/version.o: init/version.c include/linux/compile.h include/config/MARKER
  14.381 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(SUBARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
  14.382 -
  14.383 -init/main.o: init/main.c include/config/MARKER
  14.384 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
  14.385 -
  14.386 -init/do_mounts.o: init/do_mounts.c include/config/MARKER
  14.387 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
  14.388 -
  14.389 -fs lib mm ipc kernel drivers net: dummy
  14.390 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
  14.391 -
  14.392 -TAGS: dummy
  14.393 -	{ find include/asm-${ARCH} -name '*.h' -print ; \
  14.394 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
  14.395 -	find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | grep -v '\.svn' | etags -
  14.396 -
  14.397 -# Exuberant ctags works better with -I
  14.398 -tags: dummy
  14.399 -	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
  14.400 -	ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
  14.401 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
  14.402 -	find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
  14.403 -
  14.404 -ifdef CONFIG_MODULES
  14.405 -ifdef CONFIG_MODVERSIONS
  14.406 -MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
  14.407 -endif
  14.408 -
  14.409 -.PHONY: modules
  14.410 -modules: $(patsubst %, _mod_%, $(SUBDIRS))
  14.411 -
  14.412 -.PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
  14.413 -$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
  14.414 -	$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
  14.415 -
  14.416 -.PHONY: modules_install
  14.417 -modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
  14.418 -
  14.419 -.PHONY: _modinst_
  14.420 -_modinst_:
  14.421 -	@rm -rf $(MODLIB)/kernel
  14.422 -	@rm -f $(MODLIB)/build
  14.423 -	@mkdir -p $(MODLIB)/kernel
  14.424 -	@ln -s $(TOPDIR) $(MODLIB)/build
  14.425 -
  14.426 -# If System.map exists, run depmod.  This deliberately does not have a
  14.427 -# dependency on System.map since that would run the dependency tree on
  14.428 -# vmlinux.  This depmod is only for convenience to give the initial
  14.429 -# boot a modules.dep even before / is mounted read-write.  However the
  14.430 -# boot script depmod is the master version.
  14.431 -ifeq "$(strip $(INSTALL_MOD_PATH))" ""
  14.432 -depmod_opts	:=
  14.433 -else
  14.434 -depmod_opts	:= -b $(INSTALL_MOD_PATH) -r
  14.435 -endif
  14.436 -.PHONY: _modinst_post
  14.437 -_modinst_post: _modinst_post_pcmcia
  14.438 -	if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
  14.439 -
  14.440 -# Backwards compatibilty symlinks for people still using old versions
  14.441 -# of pcmcia-cs with hard coded pathnames on insmod.  Remove
  14.442 -# _modinst_post_pcmcia for kernel 2.4.1.
  14.443 -.PHONY: _modinst_post_pcmcia
  14.444 -_modinst_post_pcmcia:
  14.445 -	cd $(MODLIB); \
  14.446 -	mkdir -p pcmcia; \
  14.447 -	find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
  14.448 -
  14.449 -.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
  14.450 -$(patsubst %, _modinst_%, $(SUBDIRS)) :
  14.451 -	$(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
  14.452 -
  14.453 -# modules disabled....
  14.454 -
  14.455 -else
  14.456 -modules modules_install: dummy
  14.457 -	@echo
  14.458 -	@echo "The present kernel configuration has modules disabled."
  14.459 -	@echo "Type 'make config' and enable loadable module support."
  14.460 -	@echo "Then build a kernel with module support enabled."
  14.461 -	@echo
  14.462 -	@exit 1
  14.463 -endif
  14.464 -
  14.465 -clean:	archclean
  14.466 -	find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
  14.467 -		| grep -v lxdialog/ | xargs rm -f
  14.468 -	rm -f $(CLEAN_FILES)
  14.469 -	rm -rf $(CLEAN_DIRS)
  14.470 -	$(MAKE) -C Documentation/DocBook clean
  14.471 -
  14.472 -mrproper: clean archmrproper
  14.473 -	find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
  14.474 -	rm -f $(MRPROPER_FILES)
  14.475 -	rm -rf $(MRPROPER_DIRS)
  14.476 -	$(MAKE) -C Documentation/DocBook mrproper
  14.477 -
  14.478 -distclean: mrproper
  14.479 -	rm -f core `find . \( -not -type d \) -and \
  14.480 -		\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
  14.481 -		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
  14.482 -		-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
  14.483 -
  14.484 -backup: mrproper
  14.485 -	cd .. && tar cf - linux/ | gzip -9 > backup.gz
  14.486 -	sync
  14.487 -
  14.488 -sgmldocs: 
  14.489 -	chmod 755 $(TOPDIR)/scripts/docgen
  14.490 -	chmod 755 $(TOPDIR)/scripts/gen-all-syms
  14.491 -	chmod 755 $(TOPDIR)/scripts/kernel-doc
  14.492 -	$(MAKE) -C $(TOPDIR)/Documentation/DocBook books
  14.493 -
  14.494 -psdocs: sgmldocs
  14.495 -	$(MAKE) -C Documentation/DocBook ps
  14.496 -
  14.497 -pdfdocs: sgmldocs
  14.498 -	$(MAKE) -C Documentation/DocBook pdf
  14.499 -
  14.500 -htmldocs: sgmldocs
  14.501 -	$(MAKE) -C Documentation/DocBook html
  14.502 -
  14.503 -mandocs:
  14.504 -	chmod 755 $(TOPDIR)/scripts/kernel-doc
  14.505 -	chmod 755 $(TOPDIR)/scripts/split-man
  14.506 -	$(MAKE) -C Documentation/DocBook man
  14.507 -
  14.508 -sums:
  14.509 -	find . -type f -print | sort | xargs sum > .SUMS
  14.510 -
  14.511 -dep-files: scripts/mkdep archdep include/linux/version.h
  14.512 -	rm -f .depend .hdepend
  14.513 -	$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
  14.514 -ifdef CONFIG_MODVERSIONS
  14.515 -	$(MAKE) update-modverfile
  14.516 -endif
  14.517 -	scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
  14.518 -	scripts/mkdep -- init/*.c > .depend
  14.519 -
  14.520 -ifdef CONFIG_MODVERSIONS
  14.521 -MODVERFILE := $(TOPDIR)/include/linux/modversions.h
  14.522 -else
  14.523 -MODVERFILE :=
  14.524 -endif
  14.525 -export	MODVERFILE
  14.526 -
  14.527 -depend dep: dep-files
  14.528 -
  14.529 -checkconfig:
  14.530 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
  14.531 -
  14.532 -checkhelp:
  14.533 -	find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
  14.534 -
  14.535 -checkincludes:
  14.536 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
  14.537 -
  14.538 -ifdef CONFIGURATION
  14.539 -..$(CONFIGURATION):
  14.540 -	@echo
  14.541 -	@echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
  14.542 -	@echo
  14.543 -	$(MAKE) $(CONFIGURATION)
  14.544 -	@echo
  14.545 -	@echo "Successful. Try re-making (ignore the error that follows)"
  14.546 -	@echo
  14.547 -	exit 1
  14.548 -
  14.549 -#dummy: ..$(CONFIGURATION)
  14.550 -dummy:
  14.551 -
  14.552 -else
  14.553 -
  14.554 -dummy:
  14.555 -
  14.556 -endif
  14.557 -
  14.558 -include Rules.make
  14.559 -
  14.560 -#
  14.561 -# This generates dependencies for the .h files.
  14.562 -#
  14.563 -
  14.564 -scripts/mkdep: scripts/mkdep.c
  14.565 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
  14.566 -
  14.567 -scripts/split-include: scripts/split-include.c
  14.568 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
  14.569 -
  14.570 -#
  14.571 -# RPM target
  14.572 -#
  14.573 -#	If you do a make spec before packing the tarball you can rpm -ta it
  14.574 -#
  14.575 -spec:
  14.576 -	. scripts/mkspec >kernel.spec
  14.577 -
  14.578 -#
  14.579 -#	Build a tar ball, generate an rpm from it and pack the result
  14.580 -#	There arw two bits of magic here
  14.581 -#	1) The use of /. to avoid tar packing just the symlink
  14.582 -#	2) Removing the .dep files as they have source paths in them that
  14.583 -#	   will become invalid
  14.584 -#
  14.585 -rpm:	clean spec
  14.586 -	find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
  14.587 -	set -e; \
  14.588 -	cd $(TOPDIR)/.. ; \
  14.589 -	ln -sf $(TOPDIR) $(KERNELPATH) ; \
  14.590 -	tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
  14.591 -	rm $(KERNELPATH) ; \
  14.592 -	cd $(TOPDIR) ; \
  14.593 -	. scripts/mkversion > .version ; \
  14.594 -	$(RPM) -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
  14.595 -	rm $(TOPDIR)/../$(KERNELPATH).tar.gz
    15.1 --- a/linux-2.4-xen-sparse/arch/xen/Makefile	Sat Oct 08 11:37:45 2005 -0600
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,137 +0,0 @@
    15.4 -#
    15.5 -# xen/Makefile
    15.6 -#
    15.7 -# This file is included by the global makefile so that you can add your own
    15.8 -# architecture-specific flags and dependencies. Remember to do have actions
    15.9 -# for "archclean" and "archdep" for cleaning up and making dependencies for
   15.10 -# this architecture
   15.11 -#
   15.12 -# This file is subject to the terms and conditions of the GNU General Public
   15.13 -# License.  See the file "COPYING" in the main directory of this archive
   15.14 -# for more details.
   15.15 -#
   15.16 -# Copyright (C) 1994 by Linus Torvalds
   15.17 -#
   15.18 -# 19990713  Artur Skawina <skawina@geocities.com>
   15.19 -#           Added '-march' and '-mpreferred-stack-boundary' support
   15.20 -#
   15.21 -
   15.22 -# If no .config file exists then use the appropriate defconfig-* file
   15.23 -ifneq (.config,$(wildcard .config))
   15.24 -DUMMYX:=$(shell cp $(TOPDIR)/arch/xen/defconfig$(EXTRAVERSION) $(TOPDIR)/.config)
   15.25 --include $(TOPDIR)/.config
   15.26 -endif
   15.27 -
   15.28 -LD=$(CROSS_COMPILE)ld -m elf_i386
   15.29 -OBJCOPY=$(CROSS_COMPILE)objcopy -R .note -R .comment -S
   15.30 -LDFLAGS=-e stext
   15.31 -LINKFLAGS =-T $(TOPDIR)/arch/xen/vmlinux.lds $(LDFLAGS)
   15.32 -
   15.33 -CFLAGS += -pipe
   15.34 -
   15.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)
   15.36 -
   15.37 -# prevent gcc from keeping the stack 16 byte aligned
   15.38 -CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
   15.39 -
   15.40 -ifdef CONFIG_M686
   15.41 -CFLAGS += -march=i686
   15.42 -endif
   15.43 -
   15.44 -ifdef CONFIG_MPENTIUMIII
   15.45 -CFLAGS += -march=i686
   15.46 -endif
   15.47 -
   15.48 -ifdef CONFIG_MPENTIUM4
   15.49 -CFLAGS += -march=i686
   15.50 -endif
   15.51 -
   15.52 -ifdef CONFIG_MK7
   15.53 -CFLAGS += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
   15.54 -endif
   15.55 -
   15.56 -# Disable unit-at-a-time mode, it makes gcc use a lot more stack
   15.57 -# due to the lack of sharing of stacklots.
   15.58 -CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
   15.59 -
   15.60 -HEAD := arch/xen/kernel/head.o arch/xen/kernel/init_task.o
   15.61 -
   15.62 -SUBDIRS += arch/xen/kernel arch/xen/mm arch/xen/lib
   15.63 -SUBDIRS += arch/xen/drivers/console 
   15.64 -SUBDIRS += arch/xen/drivers/evtchn
   15.65 -SUBDIRS += arch/xen/drivers/blkif
   15.66 -SUBDIRS += arch/xen/drivers/netif
   15.67 -SUBDIRS += arch/xen/drivers/balloon
   15.68 -ifdef CONFIG_XEN_PRIVILEGED_GUEST
   15.69 -SUBDIRS += arch/xen/drivers/dom0 
   15.70 -endif
   15.71 -
   15.72 -CORE_FILES += arch/xen/kernel/kernel.o arch/xen/mm/mm.o
   15.73 -CORE_FILES += arch/xen/drivers/evtchn/drv.o
   15.74 -CORE_FILES += arch/xen/drivers/console/drv.o
   15.75 -DRIVERS += arch/xen/drivers/blkif/drv.o
   15.76 -DRIVERS += arch/xen/drivers/netif/drv.o
   15.77 -ifdef CONFIG_XEN_PRIVILEGED_GUEST
   15.78 -CORE_FILES += arch/xen/drivers/dom0/drv.o
   15.79 -endif
   15.80 -CORE_FILES += arch/xen/drivers/balloon/drv.o
   15.81 -LIBS := $(TOPDIR)/arch/xen/lib/lib.a $(LIBS) $(TOPDIR)/arch/xen/lib/lib.a
   15.82 -
   15.83 -arch/xen/kernel: dummy
   15.84 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/kernel
   15.85 -
   15.86 -arch/xen/mm: dummy
   15.87 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/mm
   15.88 -
   15.89 -arch/xen/drivers/console: dummy
   15.90 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/console
   15.91 -
   15.92 -arch/xen/drivers/network: dummy
   15.93 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/network
   15.94 -
   15.95 -arch/xen/drivers/block: dummy
   15.96 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/block
   15.97 -
   15.98 -arch/xen/drivers/dom0: dummy
   15.99 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/dom0
  15.100 -
  15.101 -arch/xen/drivers/balloon: dummy
  15.102 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/balloon
  15.103 -
  15.104 -MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
  15.105 -
  15.106 -vmlinux: arch/xen/vmlinux.lds
  15.107 -
  15.108 -FORCE: ;
  15.109 -
  15.110 -.PHONY: bzImage compressed clean archclean archmrproper archdep
  15.111 -
  15.112 -
  15.113 -bzImage: vmlinux
  15.114 -	@$(MAKEBOOT) bzImage
  15.115 -
  15.116 -INSTALL_NAME ?= $(KERNELRELEASE)
  15.117 -install: bzImage
  15.118 -	mkdir -p $(INSTALL_PATH)/boot
  15.119 -	ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
  15.120 -	rm -f $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  15.121 -	install -m0644 arch/$(ARCH)/boot/bzImage $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  15.122 -	install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  15.123 -	install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  15.124 -	install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  15.125 -	ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
  15.126 -
  15.127 -%_config: arch/xen/defconfig-%
  15.128 -	rm -f .config arch/xen/defconfig
  15.129 -	cp -f arch/xen/defconfig-$(@:_config=) arch/xen/defconfig
  15.130 -	cp -f arch/xen/defconfig-$(@:_config=) .config
  15.131 -
  15.132 -
  15.133 -archclean:
  15.134 -	@$(MAKEBOOT) clean
  15.135 -
  15.136 -archmrproper:
  15.137 -	rm -f include/asm-xen/xen-public/arch
  15.138 -
  15.139 -archdep:
  15.140 -	@$(MAKEBOOT) dep
    16.1 --- a/linux-2.4-xen-sparse/arch/xen/boot/Makefile	Sat Oct 08 11:37:45 2005 -0600
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,13 +0,0 @@
    16.4 -#
    16.5 -# arch/xen/boot/Makefile
    16.6 -#
    16.7 -
    16.8 -bzImage: $(TOPDIR)/vmlinux
    16.9 -	$(OBJCOPY) $< Image
   16.10 -	gzip -f -9 < Image > $@
   16.11 -	rm -f Image
   16.12 -
   16.13 -dep:
   16.14 -
   16.15 -clean:
   16.16 -	rm -f bzImage Image
    17.1 --- a/linux-2.4-xen-sparse/arch/xen/config.in	Sat Oct 08 11:37:45 2005 -0600
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,327 +0,0 @@
    17.4 -#
    17.5 -# For a description of the syntax of this configuration file,
    17.6 -# see Documentation/kbuild/config-language.txt.
    17.7 -#
    17.8 -mainmenu_name "Linux Kernel Configuration"
    17.9 -
   17.10 -define_bool CONFIG_XEN y
   17.11 -
   17.12 -define_bool CONFIG_X86 y
   17.13 -define_bool CONFIG_ISA y
   17.14 -define_bool CONFIG_SBUS n
   17.15 -
   17.16 -define_bool CONFIG_UID16 y
   17.17 -
   17.18 -mainmenu_option next_comment
   17.19 -comment 'Xen'
   17.20 -bool 'Support for privileged operations (domain 0)' CONFIG_XEN_PRIVILEGED_GUEST
   17.21 -bool 'Device-driver domain (physical device access)' CONFIG_XEN_PHYSDEV_ACCESS
   17.22 -bool 'Scrub memory before freeing it to Xen' CONFIG_XEN_SCRUB_PAGES
   17.23 -bool 'Network-device frontend driver' CONFIG_XEN_NETDEV_FRONTEND
   17.24 -bool 'Block-device frontend driver' CONFIG_XEN_BLKDEV_FRONTEND
   17.25 -bool 'Block-device uses grant tables' CONFIG_XEN_BLKDEV_GRANT
   17.26 -endmenu
   17.27 -# The IBM S/390 patch needs this.
   17.28 -define_bool CONFIG_NO_IDLE_HZ y
   17.29 -
   17.30 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   17.31 -   define_bool CONFIG_FOREIGN_PAGES y
   17.32 -else
   17.33 -   define_bool CONFIG_FOREIGN_PAGES n
   17.34 -   define_bool CONFIG_NETDEVICES y
   17.35 -   define_bool CONFIG_VT n
   17.36 -fi
   17.37 -
   17.38 -mainmenu_option next_comment
   17.39 -comment 'Code maturity level options'
   17.40 -bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
   17.41 -endmenu
   17.42 -
   17.43 -mainmenu_option next_comment
   17.44 -comment 'Loadable module support'
   17.45 -bool 'Enable loadable module support' CONFIG_MODULES
   17.46 -if [ "$CONFIG_MODULES" = "y" ]; then
   17.47 -   bool '  Set version information on all module symbols' CONFIG_MODVERSIONS
   17.48 -   bool '  Kernel module loader' CONFIG_KMOD
   17.49 -fi
   17.50 -endmenu
   17.51 -
   17.52 -mainmenu_option next_comment
   17.53 -comment 'Processor type and features'
   17.54 -choice 'Processor family' \
   17.55 -	"Pentium-Pro/Celeron/Pentium-II		CONFIG_M686 \
   17.56 -	 Pentium-III/Celeron(Coppermine)	CONFIG_MPENTIUMIII \
   17.57 -	 Pentium-4				CONFIG_MPENTIUM4 \
   17.58 -	 Athlon/Duron/K7			CONFIG_MK7 \
   17.59 -	 Opteron/Athlon64/Hammer/K8             CONFIG_MK8 \
   17.60 -	 VIA-C3-2                               CONFIG_MVIAC3_2" Pentium-Pro
   17.61 -
   17.62 -   define_bool CONFIG_X86_WP_WORKS_OK y
   17.63 -   define_bool CONFIG_X86_INVLPG y
   17.64 -   define_bool CONFIG_X86_CMPXCHG y
   17.65 -   define_bool CONFIG_X86_XADD y
   17.66 -   define_bool CONFIG_X86_BSWAP y
   17.67 -   define_bool CONFIG_X86_POPAD_OK y
   17.68 -   define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
   17.69 -   define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
   17.70 -
   17.71 -   define_bool CONFIG_X86_GOOD_APIC y
   17.72 -   define_bool CONFIG_X86_PGE y
   17.73 -   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
   17.74 -   define_bool CONFIG_X86_TSC y
   17.75 -
   17.76 -if [ "$CONFIG_M686" = "y" ]; then
   17.77 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   17.78 -fi
   17.79 -if [ "$CONFIG_MPENTIUMIII" = "y" ]; then
   17.80 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   17.81 -fi
   17.82 -if [ "$CONFIG_MPENTIUM4" = "y" ]; then
   17.83 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 7
   17.84 -fi
   17.85 -if [ "$CONFIG_MK8" = "y" ]; then
   17.86 -   define_bool CONFIG_MK7 y
   17.87 -fi
   17.88 -if [ "$CONFIG_MK7" = "y" ]; then
   17.89 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 6
   17.90 -   define_bool CONFIG_X86_USE_3DNOW y
   17.91 -fi
   17.92 -if [ "$CONFIG_MVIAC3_2" = "y" ]; then
   17.93 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   17.94 -fi
   17.95 -
   17.96 -#if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
   17.97 -#   tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD
   17.98 -#fi
   17.99 -
  17.100 -choice 'High Memory Support' \
  17.101 -	"off    CONFIG_NOHIGHMEM \
  17.102 -	 4GB    CONFIG_HIGHMEM4G" off
  17.103 -#	 64GB   CONFIG_HIGHMEM64G" off
  17.104 -if [ "$CONFIG_HIGHMEM4G" = "y" ]; then
  17.105 -   define_bool CONFIG_HIGHMEM y
  17.106 -fi
  17.107 -if [ "$CONFIG_HIGHMEM64G" = "y" ]; then
  17.108 -   define_bool CONFIG_HIGHMEM y
  17.109 -   define_bool CONFIG_X86_PAE y
  17.110 -fi
  17.111 -
  17.112 -if [ "$CONFIG_HIGHMEM" = "y" ]; then
  17.113 -   bool 'HIGHMEM I/O support' CONFIG_HIGHIO
  17.114 -fi
  17.115 -
  17.116 -define_int CONFIG_FORCE_MAX_ZONEORDER 11
  17.117 -
  17.118 -#bool 'Symmetric multi-processing support' CONFIG_SMP
  17.119 -#if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then
  17.120 -#   define_bool CONFIG_HAVE_DEC_LOCK y
  17.121 -#fi
  17.122 -endmenu
  17.123 -
  17.124 -mainmenu_option next_comment
  17.125 -comment 'General setup'
  17.126 -
  17.127 -bool 'Networking support' CONFIG_NET
  17.128 -
  17.129 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  17.130 -   bool 'PCI support' CONFIG_PCI
  17.131 -   source drivers/pci/Config.in
  17.132 -
  17.133 -   bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
  17.134 -
  17.135 -   if [ "$CONFIG_HOTPLUG" = "y" ] ; then
  17.136 -      source drivers/pcmcia/Config.in
  17.137 -      source drivers/hotplug/Config.in
  17.138 -   else
  17.139 -      define_bool CONFIG_PCMCIA n
  17.140 -      define_bool CONFIG_HOTPLUG_PCI n
  17.141 -   fi
  17.142 -fi
  17.143 -
  17.144 -bool 'System V IPC' CONFIG_SYSVIPC
  17.145 -bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
  17.146 -bool 'Sysctl support' CONFIG_SYSCTL
  17.147 -if [ "$CONFIG_PROC_FS" = "y" ]; then
  17.148 -   choice 'Kernel core (/proc/kcore) format' \
  17.149 -	"ELF		CONFIG_KCORE_ELF	\
  17.150 -	 A.OUT		CONFIG_KCORE_AOUT" ELF
  17.151 -fi
  17.152 -tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
  17.153 -bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
  17.154 -tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
  17.155 -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
  17.156 -
  17.157 -endmenu
  17.158 -
  17.159 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  17.160 -   source drivers/mtd/Config.in
  17.161 -
  17.162 -   source drivers/parport/Config.in
  17.163 -
  17.164 -   source drivers/pnp/Config.in
  17.165 -
  17.166 -   source drivers/block/Config.in
  17.167 -
  17.168 -   source drivers/md/Config.in
  17.169 -fi
  17.170 -
  17.171 -if [ "$CONFIG_NET" = "y" ]; then
  17.172 -   source net/Config.in
  17.173 -fi
  17.174 -
  17.175 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  17.176 -   mainmenu_option next_comment
  17.177 -   comment 'ATA/IDE/MFM/RLL support'
  17.178 -
  17.179 -   tristate 'ATA/IDE/MFM/RLL support' CONFIG_IDE
  17.180 -
  17.181 -   if [ "$CONFIG_IDE" != "n" ]; then
  17.182 -      source drivers/ide/Config.in
  17.183 -   else
  17.184 -      define_bool CONFIG_BLK_DEV_HD n
  17.185 -   fi
  17.186 -   endmenu
  17.187 -fi
  17.188 -
  17.189 -mainmenu_option next_comment
  17.190 -comment 'SCSI support'
  17.191 -
  17.192 -tristate 'SCSI support' CONFIG_SCSI
  17.193 -
  17.194 -if [ "$CONFIG_SCSI" != "n" ]; then
  17.195 -   source drivers/scsi/Config.in
  17.196 -fi
  17.197 -endmenu
  17.198 -
  17.199 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  17.200 -   source drivers/message/fusion/Config.in
  17.201 -
  17.202 -   source drivers/ieee1394/Config.in
  17.203 -
  17.204 -   source drivers/message/i2o/Config.in
  17.205 -
  17.206 -   if [ "$CONFIG_NET" = "y" ]; then
  17.207 -      mainmenu_option next_comment
  17.208 -      comment 'Network device support'
  17.209 -
  17.210 -      bool 'Network device support' CONFIG_NETDEVICES
  17.211 -      if [ "$CONFIG_NETDEVICES" = "y" ]; then
  17.212 -         source drivers/net/Config.in
  17.213 -         if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
  17.214 -            source drivers/atm/Config.in
  17.215 -         fi
  17.216 -      fi
  17.217 -      endmenu
  17.218 -   fi
  17.219 -
  17.220 -   source net/ax25/Config.in
  17.221 -
  17.222 -   source net/irda/Config.in
  17.223 -
  17.224 -   mainmenu_option next_comment
  17.225 -   comment 'ISDN subsystem'
  17.226 -   if [ "$CONFIG_NET" != "n" ]; then
  17.227 -      tristate 'ISDN support' CONFIG_ISDN
  17.228 -      if [ "$CONFIG_ISDN" != "n" ]; then
  17.229 -         source drivers/isdn/Config.in
  17.230 -      fi
  17.231 -   fi
  17.232 -   endmenu
  17.233 -
  17.234 -   if [ "$CONFIG_ISA" = "y" ]; then
  17.235 -       mainmenu_option next_comment
  17.236 -       comment 'Old CD-ROM drivers (not SCSI, not IDE)'
  17.237 -   
  17.238 -       bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
  17.239 -       if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
  17.240 -          source drivers/cdrom/Config.in
  17.241 -       fi
  17.242 -       endmenu
  17.243 -   fi
  17.244 -
  17.245 -   #
  17.246 -   # input before char - char/joystick depends on it. As does USB.
  17.247 -   #
  17.248 -   source drivers/input/Config.in
  17.249 -else
  17.250 -   #
  17.251 -   # Block device driver configuration
  17.252 -   #
  17.253 -   mainmenu_option next_comment
  17.254 -   comment 'Block devices'
  17.255 -   tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
  17.256 -   dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
  17.257 -   tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
  17.258 -   if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
  17.259 -      int '  Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
  17.260 -   fi
  17.261 -   dep_bool '  Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
  17.262 -   bool 'Per partition statistics in /proc/partitions' CONFIG_BLK_STATS
  17.263 -   define_bool CONFIG_BLK_DEV_HD n
  17.264 -   endmenu
  17.265 -fi
  17.266 -
  17.267 -source drivers/char/Config.in
  17.268 -
  17.269 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  17.270 -   source drivers/media/Config.in
  17.271 -fi
  17.272 -
  17.273 -source fs/Config.in
  17.274 -
  17.275 -mainmenu_option next_comment
  17.276 -comment 'Console drivers'
  17.277 -
  17.278 -define_bool CONFIG_XEN_CONSOLE y
  17.279 -
  17.280 -if [ "$CONFIG_VT" = "y" ]; then
  17.281 -   bool 'VGA text console' CONFIG_VGA_CONSOLE
  17.282 -   bool 'Dummy console' CONFIG_DUMMY_CONSOLE 
  17.283 -   if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  17.284 -      bool 'Video mode selection support' CONFIG_VIDEO_SELECT
  17.285 -      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  17.286 -         tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
  17.287 -         source drivers/video/Config.in
  17.288 -      fi
  17.289 -   fi
  17.290 -fi
  17.291 -endmenu
  17.292 -
  17.293 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  17.294 -   mainmenu_option next_comment
  17.295 -   comment 'Sound'
  17.296 -
  17.297 -   tristate 'Sound card support' CONFIG_SOUND
  17.298 -   if [ "$CONFIG_SOUND" != "n" ]; then
  17.299 -      source drivers/sound/Config.in
  17.300 -   fi
  17.301 -   endmenu
  17.302 -fi
  17.303 -
  17.304 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  17.305 -   source drivers/usb/Config.in
  17.306 -   source net/bluetooth/Config.in
  17.307 -fi
  17.308 -
  17.309 -mainmenu_option next_comment
  17.310 -comment 'Kernel hacking'
  17.311 -
  17.312 -bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
  17.313 -if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
  17.314 -   bool '  Check for stack overflows' CONFIG_DEBUG_STACKOVERFLOW
  17.315 -   bool '  Debug high memory support' CONFIG_DEBUG_HIGHMEM
  17.316 -   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
  17.317 -   bool '  Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT
  17.318 -   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
  17.319 -   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
  17.320 -   bool '  Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE
  17.321 -   bool '  Load all symbols for debugging' CONFIG_KALLSYMS
  17.322 -   bool '  Compile the kernel with frame pointers' CONFIG_FRAME_POINTER
  17.323 -fi
  17.324 -
  17.325 -int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0
  17.326 -
  17.327 -endmenu
  17.328 -
  17.329 -source crypto/Config.in
  17.330 -source lib/Config.in
    18.1 --- a/linux-2.4-xen-sparse/arch/xen/defconfig-xen0	Sat Oct 08 11:37:45 2005 -0600
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,927 +0,0 @@
    18.4 -#
    18.5 -# Automatically generated by make menuconfig: don't edit
    18.6 -#
    18.7 -CONFIG_XEN=y
    18.8 -CONFIG_X86=y
    18.9 -CONFIG_ISA=y
   18.10 -# CONFIG_SBUS is not set
   18.11 -CONFIG_UID16=y
   18.12 -
   18.13 -#
   18.14 -# Xen
   18.15 -#
   18.16 -CONFIG_XEN_PRIVILEGED_GUEST=y
   18.17 -CONFIG_XEN_PHYSDEV_ACCESS=y
   18.18 -# CONFIG_XEN_USB_BACKEND is not set
   18.19 -CONFIG_XEN_SCRUB_PAGES=y
   18.20 -CONFIG_XEN_NETDEV_FRONTEND=y
   18.21 -CONFIG_XEN_BLKDEV_FRONTEND=y
   18.22 -CONFIG_XEN_BLKDEV_GRANT=y
   18.23 -# CONFIG_XEN_USB_FRONTEND is not set
   18.24 -CONFIG_NO_IDLE_HZ=y
   18.25 -CONFIG_FOREIGN_PAGES=y
   18.26 -
   18.27 -#
   18.28 -# Code maturity level options
   18.29 -#
   18.30 -CONFIG_EXPERIMENTAL=y
   18.31 -
   18.32 -#
   18.33 -# Loadable module support
   18.34 -#
   18.35 -CONFIG_MODULES=y
   18.36 -CONFIG_MODVERSIONS=y
   18.37 -CONFIG_KMOD=y
   18.38 -
   18.39 -#
   18.40 -# Processor type and features
   18.41 -#
   18.42 -CONFIG_M686=y
   18.43 -# CONFIG_MPENTIUMIII is not set
   18.44 -# CONFIG_MPENTIUM4 is not set
   18.45 -# CONFIG_MK7 is not set
   18.46 -# CONFIG_MK8 is not set
   18.47 -# CONFIG_MVIAC3_2 is not set
   18.48 -CONFIG_X86_WP_WORKS_OK=y
   18.49 -CONFIG_X86_INVLPG=y
   18.50 -CONFIG_X86_CMPXCHG=y
   18.51 -CONFIG_X86_XADD=y
   18.52 -CONFIG_X86_BSWAP=y
   18.53 -CONFIG_X86_POPAD_OK=y
   18.54 -# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
   18.55 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   18.56 -CONFIG_X86_GOOD_APIC=y
   18.57 -CONFIG_X86_PGE=y
   18.58 -CONFIG_X86_USE_PPRO_CHECKSUM=y
   18.59 -CONFIG_X86_TSC=y
   18.60 -CONFIG_X86_L1_CACHE_SHIFT=5
   18.61 -CONFIG_NOHIGHMEM=y
   18.62 -# CONFIG_HIGHMEM4G is not set
   18.63 -CONFIG_FORCE_MAX_ZONEORDER=11
   18.64 -
   18.65 -#
   18.66 -# General setup
   18.67 -#
   18.68 -CONFIG_NET=y
   18.69 -CONFIG_PCI=y
   18.70 -CONFIG_PCI_NAMES=y
   18.71 -CONFIG_HOTPLUG=y
   18.72 -
   18.73 -#
   18.74 -# PCMCIA/CardBus support
   18.75 -#
   18.76 -# CONFIG_PCMCIA is not set
   18.77 -
   18.78 -#
   18.79 -# PCI Hotplug Support
   18.80 -#
   18.81 -# CONFIG_HOTPLUG_PCI is not set
   18.82 -# CONFIG_HOTPLUG_PCI_COMPAQ is not set
   18.83 -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
   18.84 -# CONFIG_HOTPLUG_PCI_SHPC is not set
   18.85 -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
   18.86 -# CONFIG_HOTPLUG_PCI_PCIE is not set
   18.87 -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
   18.88 -CONFIG_SYSVIPC=y
   18.89 -# CONFIG_BSD_PROCESS_ACCT is not set
   18.90 -CONFIG_SYSCTL=y
   18.91 -CONFIG_KCORE_ELF=y
   18.92 -# CONFIG_KCORE_AOUT is not set
   18.93 -CONFIG_BINFMT_AOUT=y
   18.94 -CONFIG_BINFMT_ELF=y
   18.95 -# CONFIG_BINFMT_MISC is not set
   18.96 -# CONFIG_OOM_KILLER is not set
   18.97 -
   18.98 -#
   18.99 -# Memory Technology Devices (MTD)
  18.100 -#
  18.101 -# CONFIG_MTD is not set
  18.102 -
  18.103 -#
  18.104 -# Parallel port support
  18.105 -#
  18.106 -# CONFIG_PARPORT is not set
  18.107 -
  18.108 -#
  18.109 -# Plug and Play configuration
  18.110 -#
  18.111 -CONFIG_PNP=y
  18.112 -# CONFIG_ISAPNP is not set
  18.113 -
  18.114 -#
  18.115 -# Block devices
  18.116 -#
  18.117 -# CONFIG_BLK_DEV_FD is not set
  18.118 -# CONFIG_BLK_DEV_XD is not set
  18.119 -# CONFIG_PARIDE is not set
  18.120 -# CONFIG_BLK_CPQ_DA is not set
  18.121 -# CONFIG_BLK_CPQ_CISS_DA is not set
  18.122 -# CONFIG_CISS_SCSI_TAPE is not set
  18.123 -# CONFIG_CISS_MONITOR_THREAD is not set
  18.124 -# CONFIG_BLK_DEV_DAC960 is not set
  18.125 -# CONFIG_BLK_DEV_UMEM is not set
  18.126 -# CONFIG_BLK_DEV_SX8 is not set
  18.127 -CONFIG_BLK_DEV_LOOP=y
  18.128 -CONFIG_BLK_DEV_NBD=y
  18.129 -CONFIG_BLK_DEV_RAM=y
  18.130 -CONFIG_BLK_DEV_RAM_SIZE=4096
  18.131 -CONFIG_BLK_DEV_INITRD=y
  18.132 -# CONFIG_BLK_STATS is not set
  18.133 -
  18.134 -#
  18.135 -# Multi-device support (RAID and LVM)
  18.136 -#
  18.137 -CONFIG_MD=y
  18.138 -CONFIG_BLK_DEV_MD=y
  18.139 -CONFIG_MD_LINEAR=y
  18.140 -# CONFIG_MD_RAID0 is not set
  18.141 -CONFIG_MD_RAID1=y
  18.142 -# CONFIG_MD_RAID5 is not set
  18.143 -# CONFIG_MD_MULTIPATH is not set
  18.144 -CONFIG_BLK_DEV_LVM=y
  18.145 -
  18.146 -#
  18.147 -# Networking options
  18.148 -#
  18.149 -CONFIG_PACKET=y
  18.150 -CONFIG_PACKET_MMAP=y
  18.151 -# CONFIG_NETLINK_DEV is not set
  18.152 -CONFIG_NETFILTER=y
  18.153 -# CONFIG_NETFILTER_DEBUG is not set
  18.154 -CONFIG_FILTER=y
  18.155 -CONFIG_UNIX=y
  18.156 -CONFIG_INET=y
  18.157 -# CONFIG_IP_MULTICAST is not set
  18.158 -# CONFIG_IP_ADVANCED_ROUTER is not set
  18.159 -CONFIG_IP_PNP=y
  18.160 -CONFIG_IP_PNP_DHCP=y
  18.161 -# CONFIG_IP_PNP_BOOTP is not set
  18.162 -# CONFIG_IP_PNP_RARP is not set
  18.163 -# CONFIG_NET_IPIP is not set
  18.164 -# CONFIG_NET_IPGRE is not set
  18.165 -# CONFIG_ARPD is not set
  18.166 -# CONFIG_INET_ECN is not set
  18.167 -# CONFIG_SYN_COOKIES is not set
  18.168 -
  18.169 -#
  18.170 -#   IP: Netfilter Configuration
  18.171 -#
  18.172 -CONFIG_IP_NF_CONNTRACK=m
  18.173 -CONFIG_IP_NF_FTP=m
  18.174 -# CONFIG_IP_NF_AMANDA is not set
  18.175 -CONFIG_IP_NF_TFTP=m
  18.176 -CONFIG_IP_NF_IRC=m
  18.177 -# CONFIG_IP_NF_QUEUE is not set
  18.178 -CONFIG_IP_NF_IPTABLES=y
  18.179 -# CONFIG_IP_NF_MATCH_LIMIT is not set
  18.180 -# CONFIG_IP_NF_MATCH_MAC is not set
  18.181 -# CONFIG_IP_NF_MATCH_PKTTYPE is not set
  18.182 -# CONFIG_IP_NF_MATCH_MARK is not set
  18.183 -# CONFIG_IP_NF_MATCH_MULTIPORT is not set
  18.184 -# CONFIG_IP_NF_MATCH_TOS is not set
  18.185 -# CONFIG_IP_NF_MATCH_RECENT is not set
  18.186 -# CONFIG_IP_NF_MATCH_ECN is not set
  18.187 -# CONFIG_IP_NF_MATCH_DSCP is not set
  18.188 -# CONFIG_IP_NF_MATCH_AH_ESP is not set
  18.189 -# CONFIG_IP_NF_MATCH_LENGTH is not set
  18.190 -# CONFIG_IP_NF_MATCH_TTL is not set
  18.191 -# CONFIG_IP_NF_MATCH_TCPMSS is not set
  18.192 -# CONFIG_IP_NF_MATCH_HELPER is not set
  18.193 -CONFIG_IP_NF_MATCH_STATE=m
  18.194 -CONFIG_IP_NF_MATCH_CONNTRACK=m
  18.195 -# CONFIG_IP_NF_MATCH_UNCLEAN is not set
  18.196 -# CONFIG_IP_NF_MATCH_OWNER is not set
  18.197 -CONFIG_IP_NF_MATCH_PHYSDEV=y
  18.198 -CONFIG_IP_NF_FILTER=y
  18.199 -CONFIG_IP_NF_TARGET_REJECT=y
  18.200 -# CONFIG_IP_NF_TARGET_MIRROR is not set
  18.201 -CONFIG_IP_NF_NAT=m
  18.202 -CONFIG_IP_NF_NAT_NEEDED=y
  18.203 -CONFIG_IP_NF_TARGET_MASQUERADE=m
  18.204 -CONFIG_IP_NF_TARGET_REDIRECT=m
  18.205 -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
  18.206 -CONFIG_IP_NF_NAT_IRC=m
  18.207 -CONFIG_IP_NF_NAT_FTP=m
  18.208 -CONFIG_IP_NF_NAT_TFTP=m
  18.209 -# CONFIG_IP_NF_MANGLE is not set
  18.210 -CONFIG_IP_NF_TARGET_LOG=y
  18.211 -CONFIG_IP_NF_TARGET_ULOG=y
  18.212 -# CONFIG_IP_NF_TARGET_TCPMSS is not set
  18.213 -# CONFIG_IP_NF_ARPTABLES is not set
  18.214 -
  18.215 -#
  18.216 -#   IP: Virtual Server Configuration
  18.217 -#
  18.218 -# CONFIG_IP_VS is not set
  18.219 -# CONFIG_IPV6 is not set
  18.220 -# CONFIG_KHTTPD is not set
  18.221 -
  18.222 -#
  18.223 -#    SCTP Configuration (EXPERIMENTAL)
  18.224 -#
  18.225 -# CONFIG_IP_SCTP is not set
  18.226 -# CONFIG_ATM is not set
  18.227 -CONFIG_VLAN_8021Q=y
  18.228 -# CONFIG_IPX is not set
  18.229 -# CONFIG_ATALK is not set
  18.230 -# CONFIG_DECNET is not set
  18.231 -CONFIG_BRIDGE=y
  18.232 -CONFIG_BRIDGE_NF_EBTABLES=m
  18.233 -CONFIG_BRIDGE_EBT_T_FILTER=m
  18.234 -CONFIG_BRIDGE_EBT_T_NAT=m
  18.235 -CONFIG_BRIDGE_EBT_BROUTE=m
  18.236 -CONFIG_BRIDGE_EBT_LOG=m
  18.237 -CONFIG_BRIDGE_EBT_IPF=m
  18.238 -CONFIG_BRIDGE_EBT_ARPF=m
  18.239 -CONFIG_BRIDGE_EBT_AMONG=m
  18.240 -CONFIG_BRIDGE_EBT_LIMIT=m
  18.241 -CONFIG_BRIDGE_EBT_VLANF=m
  18.242 -CONFIG_BRIDGE_EBT_802_3=m
  18.243 -CONFIG_BRIDGE_EBT_PKTTYPE=m
  18.244 -CONFIG_BRIDGE_EBT_STP=m
  18.245 -CONFIG_BRIDGE_EBT_MARKF=m
  18.246 -CONFIG_BRIDGE_EBT_ARPREPLY=m
  18.247 -CONFIG_BRIDGE_EBT_SNAT=m
  18.248 -CONFIG_BRIDGE_EBT_DNAT=m
  18.249 -CONFIG_BRIDGE_EBT_REDIRECT=m
  18.250 -CONFIG_BRIDGE_EBT_MARK_T=m
  18.251 -# CONFIG_X25 is not set
  18.252 -# CONFIG_LAPB is not set
  18.253 -# CONFIG_LLC is not set
  18.254 -# CONFIG_NET_DIVERT is not set
  18.255 -# CONFIG_ECONET is not set
  18.256 -# CONFIG_WAN_ROUTER is not set
  18.257 -# CONFIG_NET_FASTROUTE is not set
  18.258 -# CONFIG_NET_HW_FLOWCONTROL is not set
  18.259 -
  18.260 -#
  18.261 -# QoS and/or fair queueing
  18.262 -#
  18.263 -# CONFIG_NET_SCHED is not set
  18.264 -
  18.265 -#
  18.266 -# Network testing
  18.267 -#
  18.268 -# CONFIG_NET_PKTGEN is not set
  18.269 -
  18.270 -#
  18.271 -# ATA/IDE/MFM/RLL support
  18.272 -#
  18.273 -CONFIG_IDE=y
  18.274 -
  18.275 -#
  18.276 -# IDE, ATA and ATAPI Block devices
  18.277 -#
  18.278 -CONFIG_BLK_DEV_IDE=y
  18.279 -# CONFIG_BLK_DEV_HD_IDE is not set
  18.280 -# CONFIG_BLK_DEV_HD is not set
  18.281 -# CONFIG_BLK_DEV_IDE_SATA is not set
  18.282 -CONFIG_BLK_DEV_IDEDISK=y
  18.283 -CONFIG_IDEDISK_MULTI_MODE=y
  18.284 -CONFIG_IDEDISK_STROKE=y
  18.285 -# CONFIG_BLK_DEV_IDECS is not set
  18.286 -# CONFIG_BLK_DEV_DELKIN is not set
  18.287 -CONFIG_BLK_DEV_IDECD=y
  18.288 -CONFIG_BLK_DEV_IDETAPE=y
  18.289 -CONFIG_BLK_DEV_IDEFLOPPY=y
  18.290 -CONFIG_BLK_DEV_IDESCSI=y
  18.291 -CONFIG_IDE_TASK_IOCTL=y
  18.292 -CONFIG_BLK_DEV_CMD640=y
  18.293 -CONFIG_BLK_DEV_CMD640_ENHANCED=y
  18.294 -# CONFIG_BLK_DEV_ISAPNP is not set
  18.295 -CONFIG_BLK_DEV_IDEPCI=y
  18.296 -CONFIG_BLK_DEV_GENERIC=y
  18.297 -CONFIG_IDEPCI_SHARE_IRQ=y
  18.298 -CONFIG_BLK_DEV_IDEDMA_PCI=y
  18.299 -CONFIG_BLK_DEV_OFFBOARD=y
  18.300 -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
  18.301 -CONFIG_IDEDMA_PCI_AUTO=y
  18.302 -# CONFIG_IDEDMA_ONLYDISK is not set
  18.303 -CONFIG_BLK_DEV_IDEDMA=y
  18.304 -# CONFIG_IDEDMA_PCI_WIP is not set
  18.305 -CONFIG_BLK_DEV_ADMA100=y
  18.306 -CONFIG_BLK_DEV_AEC62XX=y
  18.307 -CONFIG_BLK_DEV_ALI15X3=y
  18.308 -CONFIG_WDC_ALI15X3=y
  18.309 -CONFIG_BLK_DEV_AMD74XX=y
  18.310 -CONFIG_AMD74XX_OVERRIDE=y
  18.311 -# CONFIG_BLK_DEV_ATIIXP is not set
  18.312 -CONFIG_BLK_DEV_CMD64X=y
  18.313 -CONFIG_BLK_DEV_TRIFLEX=y
  18.314 -CONFIG_BLK_DEV_CY82C693=y
  18.315 -CONFIG_BLK_DEV_CS5530=y
  18.316 -CONFIG_BLK_DEV_HPT34X=y
  18.317 -# CONFIG_HPT34X_AUTODMA is not set
  18.318 -CONFIG_BLK_DEV_HPT366=y
  18.319 -CONFIG_BLK_DEV_PIIX=y
  18.320 -CONFIG_BLK_DEV_NS87415=y
  18.321 -# CONFIG_BLK_DEV_OPTI621 is not set
  18.322 -CONFIG_BLK_DEV_PDC202XX_OLD=y
  18.323 -CONFIG_PDC202XX_BURST=y
  18.324 -CONFIG_BLK_DEV_PDC202XX_NEW=y
  18.325 -CONFIG_PDC202XX_FORCE=y
  18.326 -CONFIG_BLK_DEV_RZ1000=y
  18.327 -CONFIG_BLK_DEV_SC1200=y
  18.328 -CONFIG_BLK_DEV_SVWKS=y
  18.329 -CONFIG_BLK_DEV_SIIMAGE=y
  18.330 -CONFIG_BLK_DEV_SIS5513=y
  18.331 -CONFIG_BLK_DEV_SLC90E66=y
  18.332 -CONFIG_BLK_DEV_TRM290=y
  18.333 -CONFIG_BLK_DEV_VIA82CXXX=y
  18.334 -CONFIG_IDE_CHIPSETS=y
  18.335 -# CONFIG_BLK_DEV_4DRIVES is not set
  18.336 -# CONFIG_BLK_DEV_ALI14XX is not set
  18.337 -# CONFIG_BLK_DEV_DTC2278 is not set
  18.338 -# CONFIG_BLK_DEV_HT6560B is not set
  18.339 -# CONFIG_BLK_DEV_PDC4030 is not set
  18.340 -# CONFIG_BLK_DEV_QD65XX is not set
  18.341 -# CONFIG_BLK_DEV_UMC8672 is not set
  18.342 -CONFIG_IDEDMA_AUTO=y
  18.343 -# CONFIG_IDEDMA_IVB is not set
  18.344 -# CONFIG_DMA_NONPCI is not set
  18.345 -CONFIG_BLK_DEV_PDC202XX=y
  18.346 -# CONFIG_BLK_DEV_ATARAID is not set
  18.347 -# CONFIG_BLK_DEV_ATARAID_PDC is not set
  18.348 -# CONFIG_BLK_DEV_ATARAID_HPT is not set
  18.349 -# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
  18.350 -# CONFIG_BLK_DEV_ATARAID_SII is not set
  18.351 -
  18.352 -#
  18.353 -# SCSI support
  18.354 -#
  18.355 -CONFIG_SCSI=y
  18.356 -CONFIG_BLK_DEV_SD=y
  18.357 -CONFIG_SD_EXTRA_DEVS=40
  18.358 -# CONFIG_CHR_DEV_ST is not set
  18.359 -# CONFIG_CHR_DEV_OSST is not set
  18.360 -# CONFIG_BLK_DEV_SR is not set
  18.361 -CONFIG_CHR_DEV_SG=y
  18.362 -# CONFIG_SCSI_DEBUG_QUEUES is not set
  18.363 -# CONFIG_SCSI_MULTI_LUN is not set
  18.364 -# CONFIG_SCSI_CONSTANTS is not set
  18.365 -# CONFIG_SCSI_LOGGING is not set
  18.366 -
  18.367 -#
  18.368 -# SCSI low-level drivers
  18.369 -#
  18.370 -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
  18.371 -# CONFIG_SCSI_7000FASST is not set
  18.372 -# CONFIG_SCSI_ACARD is not set
  18.373 -# CONFIG_SCSI_AHA152X is not set
  18.374 -# CONFIG_SCSI_AHA1542 is not set
  18.375 -# CONFIG_SCSI_AHA1740 is not set
  18.376 -CONFIG_SCSI_AACRAID=y
  18.377 -CONFIG_SCSI_AIC7XXX=y
  18.378 -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
  18.379 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000
  18.380 -# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
  18.381 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
  18.382 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
  18.383 -CONFIG_AIC7XXX_DEBUG_MASK=0
  18.384 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
  18.385 -CONFIG_SCSI_AIC79XX=y
  18.386 -CONFIG_AIC79XX_CMDS_PER_DEVICE=32
  18.387 -CONFIG_AIC79XX_RESET_DELAY_MS=15000
  18.388 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
  18.389 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
  18.390 -# CONFIG_AIC79XX_DEBUG_ENABLE is not set
  18.391 -CONFIG_AIC79XX_DEBUG_MASK=0
  18.392 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
  18.393 -# CONFIG_SCSI_DPT_I2O is not set
  18.394 -# CONFIG_SCSI_ADVANSYS is not set
  18.395 -# CONFIG_SCSI_IN2000 is not set
  18.396 -# CONFIG_SCSI_AM53C974 is not set
  18.397 -CONFIG_SCSI_MEGARAID=y
  18.398 -# CONFIG_SCSI_MEGARAID2 is not set
  18.399 -CONFIG_SCSI_SATA=y
  18.400 -# CONFIG_SCSI_SATA_AHCI is not set
  18.401 -# CONFIG_SCSI_SATA_SVW is not set
  18.402 -CONFIG_SCSI_ATA_PIIX=y
  18.403 -# CONFIG_SCSI_SATA_NV is not set
  18.404 -# CONFIG_SCSI_SATA_QSTOR is not set
  18.405 -CONFIG_SCSI_SATA_PROMISE=y
  18.406 -CONFIG_SCSI_SATA_SX4=y
  18.407 -CONFIG_SCSI_SATA_SIL=y
  18.408 -CONFIG_SCSI_SATA_SIS=y
  18.409 -# CONFIG_SCSI_SATA_ULI is not set
  18.410 -CONFIG_SCSI_SATA_VIA=y
  18.411 -CONFIG_SCSI_SATA_VITESSE=y
  18.412 -CONFIG_SCSI_BUSLOGIC=y
  18.413 -# CONFIG_SCSI_OMIT_FLASHPOINT is not set
  18.414 -# CONFIG_SCSI_CPQFCTS is not set
  18.415 -# CONFIG_SCSI_DMX3191D is not set
  18.416 -# CONFIG_SCSI_DTC3280 is not set
  18.417 -# CONFIG_SCSI_EATA is not set
  18.418 -# CONFIG_SCSI_EATA_DMA is not set
  18.419 -# CONFIG_SCSI_EATA_PIO is not set
  18.420 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
  18.421 -# CONFIG_SCSI_GDTH is not set
  18.422 -# CONFIG_SCSI_GENERIC_NCR5380 is not set
  18.423 -# CONFIG_SCSI_IPS is not set
  18.424 -# CONFIG_SCSI_INITIO is not set
  18.425 -# CONFIG_SCSI_INIA100 is not set
  18.426 -# CONFIG_SCSI_NCR53C406A is not set
  18.427 -# CONFIG_SCSI_NCR53C7xx is not set
  18.428 -CONFIG_SCSI_SYM53C8XX_2=y
  18.429 -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
  18.430 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
  18.431 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
  18.432 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
  18.433 -# CONFIG_SCSI_PAS16 is not set
  18.434 -# CONFIG_SCSI_PCI2000 is not set
  18.435 -# CONFIG_SCSI_PCI2220I is not set
  18.436 -# CONFIG_SCSI_PSI240I is not set
  18.437 -# CONFIG_SCSI_QLOGIC_FAS is not set
  18.438 -# CONFIG_SCSI_QLOGIC_ISP is not set
  18.439 -# CONFIG_SCSI_QLOGIC_FC is not set
  18.440 -# CONFIG_SCSI_QLOGIC_1280 is not set
  18.441 -# CONFIG_SCSI_SEAGATE is not set
  18.442 -# CONFIG_SCSI_SIM710 is not set
  18.443 -# CONFIG_SCSI_SYM53C416 is not set
  18.444 -# CONFIG_SCSI_DC390T is not set
  18.445 -# CONFIG_SCSI_T128 is not set
  18.446 -# CONFIG_SCSI_U14_34F is not set
  18.447 -# CONFIG_SCSI_ULTRASTOR is not set
  18.448 -# CONFIG_SCSI_NSP32 is not set
  18.449 -# CONFIG_SCSI_DEBUG is not set
  18.450 -
  18.451 -#
  18.452 -# Fusion MPT device support
  18.453 -#
  18.454 -# CONFIG_FUSION is not set
  18.455 -# CONFIG_FUSION_BOOT is not set
  18.456 -# CONFIG_FUSION_ISENSE is not set
  18.457 -# CONFIG_FUSION_CTL is not set
  18.458 -# CONFIG_FUSION_LAN is not set
  18.459 -
  18.460 -#
  18.461 -# IEEE 1394 (FireWire) support (EXPERIMENTAL)
  18.462 -#
  18.463 -# CONFIG_IEEE1394 is not set
  18.464 -
  18.465 -#
  18.466 -# I2O device support
  18.467 -#
  18.468 -# CONFIG_I2O is not set
  18.469 -# CONFIG_I2O_PCI is not set
  18.470 -# CONFIG_I2O_BLOCK is not set
  18.471 -# CONFIG_I2O_LAN is not set
  18.472 -# CONFIG_I2O_SCSI is not set
  18.473 -# CONFIG_I2O_PROC is not set
  18.474 -
  18.475 -#
  18.476 -# Network device support
  18.477 -#
  18.478 -CONFIG_NETDEVICES=y
  18.479 -
  18.480 -#
  18.481 -# ARCnet devices
  18.482 -#
  18.483 -# CONFIG_ARCNET is not set
  18.484 -# CONFIG_DUMMY is not set
  18.485 -# CONFIG_BONDING is not set
  18.486 -# CONFIG_EQUALIZER is not set
  18.487 -# CONFIG_TUN is not set
  18.488 -# CONFIG_ETHERTAP is not set
  18.489 -
  18.490 -#
  18.491 -# Ethernet (10 or 100Mbit)
  18.492 -#
  18.493 -CONFIG_NET_ETHERNET=y
  18.494 -# CONFIG_SUNLANCE is not set
  18.495 -# CONFIG_HAPPYMEAL is not set
  18.496 -# CONFIG_SUNBMAC is not set
  18.497 -# CONFIG_SUNQE is not set
  18.498 -# CONFIG_SUNGEM is not set
  18.499 -CONFIG_NET_VENDOR_3COM=y
  18.500 -# CONFIG_EL1 is not set
  18.501 -# CONFIG_EL2 is not set
  18.502 -# CONFIG_ELPLUS is not set
  18.503 -# CONFIG_EL16 is not set
  18.504 -# CONFIG_EL3 is not set
  18.505 -# CONFIG_3C515 is not set
  18.506 -# CONFIG_ELMC is not set
  18.507 -# CONFIG_ELMC_II is not set
  18.508 -CONFIG_VORTEX=y
  18.509 -# CONFIG_TYPHOON is not set
  18.510 -# CONFIG_LANCE is not set
  18.511 -# CONFIG_NET_VENDOR_SMC is not set
  18.512 -# CONFIG_NET_VENDOR_RACAL is not set
  18.513 -# CONFIG_AT1700 is not set
  18.514 -# CONFIG_DEPCA is not set
  18.515 -# CONFIG_HP100 is not set
  18.516 -# CONFIG_NET_ISA is not set
  18.517 -CONFIG_NET_PCI=y
  18.518 -CONFIG_PCNET32=y
  18.519 -# CONFIG_AMD8111_ETH is not set
  18.520 -# CONFIG_ADAPTEC_STARFIRE is not set
  18.521 -# CONFIG_AC3200 is not set
  18.522 -# CONFIG_APRICOT is not set
  18.523 -# CONFIG_B44 is not set
  18.524 -# CONFIG_CS89x0 is not set
  18.525 -# CONFIG_TULIP is not set
  18.526 -# CONFIG_DE4X5 is not set
  18.527 -# CONFIG_DGRS is not set
  18.528 -# CONFIG_DM9102 is not set
  18.529 -# CONFIG_EEPRO100 is not set
  18.530 -# CONFIG_EEPRO100_PIO is not set
  18.531 -CONFIG_E100=y
  18.532 -# CONFIG_LNE390 is not set
  18.533 -# CONFIG_FEALNX is not set
  18.534 -# CONFIG_NATSEMI is not set
  18.535 -CONFIG_NE2K_PCI=y
  18.536 -# CONFIG_FORCEDETH is not set
  18.537 -# CONFIG_NE3210 is not set
  18.538 -# CONFIG_ES3210 is not set
  18.539 -# CONFIG_8139CP is not set
  18.540 -# CONFIG_8139TOO is not set
  18.541 -# CONFIG_8139TOO_PIO is not set
  18.542 -# CONFIG_8139TOO_TUNE_TWISTER is not set
  18.543 -# CONFIG_8139TOO_8129 is not set
  18.544 -# CONFIG_8139_OLD_RX_RESET is not set
  18.545 -# CONFIG_SIS900 is not set
  18.546 -# CONFIG_EPIC100 is not set
  18.547 -# CONFIG_SUNDANCE is not set
  18.548 -# CONFIG_SUNDANCE_MMIO is not set
  18.549 -# CONFIG_TLAN is not set
  18.550 -# CONFIG_VIA_RHINE is not set
  18.551 -# CONFIG_VIA_RHINE_MMIO is not set
  18.552 -# CONFIG_WINBOND_840 is not set
  18.553 -# CONFIG_NET_POCKET is not set
  18.554 -
  18.555 -#
  18.556 -# Ethernet (1000 Mbit)
  18.557 -#
  18.558 -# CONFIG_ACENIC is not set
  18.559 -# CONFIG_DL2K is not set
  18.560 -CONFIG_E1000=y
  18.561 -# CONFIG_E1000_NAPI is not set
  18.562 -# CONFIG_MYRI_SBUS is not set
  18.563 -# CONFIG_NS83820 is not set
  18.564 -# CONFIG_HAMACHI is not set
  18.565 -# CONFIG_YELLOWFIN is not set
  18.566 -# CONFIG_R8169 is not set
  18.567 -# CONFIG_SK98LIN is not set
  18.568 -CONFIG_TIGON3=y
  18.569 -# CONFIG_FDDI is not set
  18.570 -# CONFIG_HIPPI is not set
  18.571 -# CONFIG_PLIP is not set
  18.572 -# CONFIG_PPP is not set
  18.573 -# CONFIG_SLIP is not set
  18.574 -
  18.575 -#
  18.576 -# Wireless LAN (non-hamradio)
  18.577 -#
  18.578 -# CONFIG_NET_RADIO is not set
  18.579 -
  18.580 -#
  18.581 -# Token Ring devices
  18.582 -#
  18.583 -# CONFIG_TR is not set
  18.584 -# CONFIG_NET_FC is not set
  18.585 -# CONFIG_RCPCI is not set
  18.586 -# CONFIG_SHAPER is not set
  18.587 -
  18.588 -#
  18.589 -# Wan interfaces
  18.590 -#
  18.591 -# CONFIG_WAN is not set
  18.592 -
  18.593 -#
  18.594 -# Amateur Radio support
  18.595 -#
  18.596 -# CONFIG_HAMRADIO is not set
  18.597 -
  18.598 -#
  18.599 -# IrDA (infrared) support
  18.600 -#
  18.601 -# CONFIG_IRDA is not set
  18.602 -
  18.603 -#
  18.604 -# ISDN subsystem
  18.605 -#
  18.606 -# CONFIG_ISDN is not set
  18.607 -
  18.608 -#
  18.609 -# Old CD-ROM drivers (not SCSI, not IDE)
  18.610 -#
  18.611 -# CONFIG_CD_NO_IDESCSI is not set
  18.612 -
  18.613 -#
  18.614 -# Input core support
  18.615 -#
  18.616 -# CONFIG_INPUT is not set
  18.617 -# CONFIG_INPUT_KEYBDEV is not set
  18.618 -# CONFIG_INPUT_MOUSEDEV is not set
  18.619 -# CONFIG_INPUT_JOYDEV is not set
  18.620 -# CONFIG_INPUT_EVDEV is not set
  18.621 -# CONFIG_INPUT_UINPUT is not set
  18.622 -
  18.623 -#
  18.624 -# Character devices
  18.625 -#
  18.626 -CONFIG_VT=y
  18.627 -CONFIG_VT_CONSOLE=y
  18.628 -# CONFIG_SERIAL is not set
  18.629 -# CONFIG_SERIAL_EXTENDED is not set
  18.630 -# CONFIG_SERIAL_NONSTANDARD is not set
  18.631 -CONFIG_UNIX98_PTYS=y
  18.632 -CONFIG_UNIX98_PTY_COUNT=256
  18.633 -
  18.634 -#
  18.635 -# I2C support
  18.636 -#
  18.637 -# CONFIG_I2C is not set
  18.638 -
  18.639 -#
  18.640 -# Mice
  18.641 -#
  18.642 -# CONFIG_BUSMOUSE is not set
  18.643 -CONFIG_MOUSE=y
  18.644 -CONFIG_PSMOUSE=y
  18.645 -# CONFIG_82C710_MOUSE is not set
  18.646 -# CONFIG_PC110_PAD is not set
  18.647 -# CONFIG_MK712_MOUSE is not set
  18.648 -
  18.649 -#
  18.650 -# Joysticks
  18.651 -#
  18.652 -# CONFIG_INPUT_GAMEPORT is not set
  18.653 -# CONFIG_QIC02_TAPE is not set
  18.654 -# CONFIG_IPMI_HANDLER is not set
  18.655 -# CONFIG_IPMI_PANIC_EVENT is not set
  18.656 -# CONFIG_IPMI_DEVICE_INTERFACE is not set
  18.657 -# CONFIG_IPMI_KCS is not set
  18.658 -# CONFIG_IPMI_WATCHDOG is not set
  18.659 -
  18.660 -#
  18.661 -# Watchdog Cards
  18.662 -#
  18.663 -# CONFIG_WATCHDOG is not set
  18.664 -# CONFIG_SCx200 is not set
  18.665 -# CONFIG_SCx200_GPIO is not set
  18.666 -# CONFIG_AMD_RNG is not set
  18.667 -# CONFIG_INTEL_RNG is not set
  18.668 -# CONFIG_HW_RANDOM is not set
  18.669 -# CONFIG_AMD_PM768 is not set
  18.670 -# CONFIG_NVRAM is not set
  18.671 -# CONFIG_RTC is not set
  18.672 -# CONFIG_DTLK is not set
  18.673 -# CONFIG_R3964 is not set
  18.674 -# CONFIG_APPLICOM is not set
  18.675 -# CONFIG_SONYPI is not set
  18.676 -
  18.677 -#
  18.678 -# Ftape, the floppy tape device driver
  18.679 -#
  18.680 -# CONFIG_FTAPE is not set
  18.681 -# CONFIG_AGP is not set
  18.682 -
  18.683 -#
  18.684 -# Direct Rendering Manager (XFree86 DRI support)
  18.685 -#
  18.686 -# CONFIG_DRM is not set
  18.687 -# CONFIG_MWAVE is not set
  18.688 -# CONFIG_OBMOUSE is not set
  18.689 -
  18.690 -#
  18.691 -# Multimedia devices
  18.692 -#
  18.693 -# CONFIG_VIDEO_DEV is not set
  18.694 -
  18.695 -#
  18.696 -# File systems
  18.697 -#
  18.698 -# CONFIG_QUOTA is not set
  18.699 -# CONFIG_QFMT_V2 is not set
  18.700 -CONFIG_AUTOFS_FS=y
  18.701 -CONFIG_AUTOFS4_FS=y
  18.702 -# CONFIG_REISERFS_FS is not set
  18.703 -# CONFIG_REISERFS_CHECK is not set
  18.704 -# CONFIG_REISERFS_PROC_INFO is not set
  18.705 -# CONFIG_ADFS_FS is not set
  18.706 -# CONFIG_ADFS_FS_RW is not set
  18.707 -# CONFIG_AFFS_FS is not set
  18.708 -# CONFIG_HFS_FS is not set
  18.709 -# CONFIG_HFSPLUS_FS is not set
  18.710 -# CONFIG_BEFS_FS is not set
  18.711 -# CONFIG_BEFS_DEBUG is not set
  18.712 -# CONFIG_BFS_FS is not set
  18.713 -CONFIG_EXT3_FS=y
  18.714 -CONFIG_JBD=y
  18.715 -# CONFIG_JBD_DEBUG is not set
  18.716 -CONFIG_FAT_FS=y
  18.717 -CONFIG_MSDOS_FS=y
  18.718 -CONFIG_UMSDOS_FS=y
  18.719 -CONFIG_VFAT_FS=y
  18.720 -# CONFIG_EFS_FS is not set
  18.721 -# CONFIG_JFFS_FS is not set
  18.722 -# CONFIG_JFFS2_FS is not set
  18.723 -# CONFIG_CRAMFS is not set
  18.724 -CONFIG_TMPFS=y
  18.725 -CONFIG_RAMFS=y
  18.726 -CONFIG_ISO9660_FS=y
  18.727 -CONFIG_JOLIET=y
  18.728 -CONFIG_ZISOFS=y
  18.729 -# CONFIG_JFS_FS is not set
  18.730 -# CONFIG_JFS_DEBUG is not set
  18.731 -# CONFIG_JFS_STATISTICS is not set
  18.732 -# CONFIG_MINIX_FS is not set
  18.733 -# CONFIG_VXFS_FS is not set
  18.734 -# CONFIG_NTFS_FS is not set
  18.735 -# CONFIG_NTFS_RW is not set
  18.736 -# CONFIG_HPFS_FS is not set
  18.737 -CONFIG_PROC_FS=y
  18.738 -# CONFIG_DEVFS_FS is not set
  18.739 -# CONFIG_DEVFS_MOUNT is not set
  18.740 -# CONFIG_DEVFS_DEBUG is not set
  18.741 -CONFIG_DEVPTS_FS=y
  18.742 -# CONFIG_QNX4FS_FS is not set
  18.743 -# CONFIG_QNX4FS_RW is not set
  18.744 -# CONFIG_ROMFS_FS is not set
  18.745 -CONFIG_EXT2_FS=y
  18.746 -# CONFIG_SYSV_FS is not set
  18.747 -# CONFIG_UDF_FS is not set
  18.748 -# CONFIG_UDF_RW is not set
  18.749 -# CONFIG_UFS_FS is not set
  18.750 -# CONFIG_UFS_FS_WRITE is not set
  18.751 -# CONFIG_XFS_FS is not set
  18.752 -# CONFIG_XFS_QUOTA is not set
  18.753 -# CONFIG_XFS_RT is not set
  18.754 -# CONFIG_XFS_TRACE is not set
  18.755 -# CONFIG_XFS_DEBUG is not set
  18.756 -
  18.757 -#
  18.758 -# Network File Systems
  18.759 -#
  18.760 -# CONFIG_CODA_FS is not set
  18.761 -# CONFIG_INTERMEZZO_FS is not set
  18.762 -CONFIG_NFS_FS=y
  18.763 -CONFIG_NFS_V3=y
  18.764 -# CONFIG_NFS_DIRECTIO is not set
  18.765 -CONFIG_ROOT_NFS=y
  18.766 -CONFIG_NFSD=y
  18.767 -CONFIG_NFSD_V3=y
  18.768 -# CONFIG_NFSD_TCP is not set
  18.769 -CONFIG_SUNRPC=y
  18.770 -CONFIG_LOCKD=y
  18.771 -CONFIG_LOCKD_V4=y
  18.772 -# CONFIG_SMB_FS is not set
  18.773 -# CONFIG_NCP_FS is not set
  18.774 -# CONFIG_NCPFS_PACKET_SIGNING is not set
  18.775 -# CONFIG_NCPFS_IOCTL_LOCKING is not set
  18.776 -# CONFIG_NCPFS_STRONG is not set
  18.777 -# CONFIG_NCPFS_NFS_NS is not set
  18.778 -# CONFIG_NCPFS_OS2_NS is not set
  18.779 -# CONFIG_NCPFS_SMALLDOS is not set
  18.780 -# CONFIG_NCPFS_NLS is not set
  18.781 -# CONFIG_NCPFS_EXTRAS is not set
  18.782 -CONFIG_ZISOFS_FS=y
  18.783 -
  18.784 -#
  18.785 -# Partition Types
  18.786 -#
  18.787 -CONFIG_PARTITION_ADVANCED=y
  18.788 -# CONFIG_ACORN_PARTITION is not set
  18.789 -# CONFIG_OSF_PARTITION is not set
  18.790 -# CONFIG_AMIGA_PARTITION is not set
  18.791 -# CONFIG_ATARI_PARTITION is not set
  18.792 -# CONFIG_MAC_PARTITION is not set
  18.793 -CONFIG_MSDOS_PARTITION=y
  18.794 -# CONFIG_BSD_DISKLABEL is not set
  18.795 -# CONFIG_MINIX_SUBPARTITION is not set
  18.796 -# CONFIG_SOLARIS_X86_PARTITION is not set
  18.797 -# CONFIG_UNIXWARE_DISKLABEL is not set
  18.798 -# CONFIG_LDM_PARTITION is not set
  18.799 -# CONFIG_SGI_PARTITION is not set
  18.800 -# CONFIG_ULTRIX_PARTITION is not set
  18.801 -# CONFIG_SUN_PARTITION is not set
  18.802 -# CONFIG_EFI_PARTITION is not set
  18.803 -# CONFIG_SMB_NLS is not set
  18.804 -CONFIG_NLS=y
  18.805 -
  18.806 -#
  18.807 -# Native Language Support
  18.808 -#
  18.809 -CONFIG_NLS_DEFAULT="iso8559-1"
  18.810 -# CONFIG_NLS_CODEPAGE_437 is not set
  18.811 -# CONFIG_NLS_CODEPAGE_737 is not set
  18.812 -# CONFIG_NLS_CODEPAGE_775 is not set
  18.813 -# CONFIG_NLS_CODEPAGE_850 is not set
  18.814 -# CONFIG_NLS_CODEPAGE_852 is not set
  18.815 -# CONFIG_NLS_CODEPAGE_855 is not set
  18.816 -# CONFIG_NLS_CODEPAGE_857 is not set
  18.817 -# CONFIG_NLS_CODEPAGE_860 is not set
  18.818 -# CONFIG_NLS_CODEPAGE_861 is not set
  18.819 -# CONFIG_NLS_CODEPAGE_862 is not set
  18.820 -# CONFIG_NLS_CODEPAGE_863 is not set
  18.821 -# CONFIG_NLS_CODEPAGE_864 is not set
  18.822 -# CONFIG_NLS_CODEPAGE_865 is not set
  18.823 -# CONFIG_NLS_CODEPAGE_866 is not set
  18.824 -# CONFIG_NLS_CODEPAGE_869 is not set
  18.825 -# CONFIG_NLS_CODEPAGE_936 is not set
  18.826 -# CONFIG_NLS_CODEPAGE_950 is not set
  18.827 -# CONFIG_NLS_CODEPAGE_932 is not set
  18.828 -# CONFIG_NLS_CODEPAGE_949 is not set
  18.829 -# CONFIG_NLS_CODEPAGE_874 is not set
  18.830 -# CONFIG_NLS_ISO8859_8 is not set
  18.831 -# CONFIG_NLS_CODEPAGE_1250 is not set
  18.832 -# CONFIG_NLS_CODEPAGE_1251 is not set
  18.833 -CONFIG_NLS_ISO8859_1=y
  18.834 -# CONFIG_NLS_ISO8859_2 is not set
  18.835 -# CONFIG_NLS_ISO8859_3 is not set
  18.836 -# CONFIG_NLS_ISO8859_4 is not set
  18.837 -# CONFIG_NLS_ISO8859_5 is not set
  18.838 -# CONFIG_NLS_ISO8859_6 is not set
  18.839 -# CONFIG_NLS_ISO8859_7 is not set
  18.840 -# CONFIG_NLS_ISO8859_9 is not set
  18.841 -# CONFIG_NLS_ISO8859_13 is not set
  18.842 -# CONFIG_NLS_ISO8859_14 is not set
  18.843 -# CONFIG_NLS_ISO8859_15 is not set
  18.844 -# CONFIG_NLS_KOI8_R is not set
  18.845 -# CONFIG_NLS_KOI8_U is not set
  18.846 -# CONFIG_NLS_UTF8 is not set
  18.847 -
  18.848 -#
  18.849 -# Console drivers
  18.850 -#
  18.851 -CONFIG_XEN_CONSOLE=y
  18.852 -CONFIG_VGA_CONSOLE=y
  18.853 -CONFIG_DUMMY_CONSOLE=y
  18.854 -# CONFIG_VIDEO_SELECT is not set
  18.855 -# CONFIG_MDA_CONSOLE is not set
  18.856 -
  18.857 -#
  18.858 -# Frame-buffer support
  18.859 -#
  18.860 -# CONFIG_FB is not set
  18.861 -
  18.862 -#
  18.863 -# Sound
  18.864 -#
  18.865 -# CONFIG_SOUND is not set
  18.866 -
  18.867 -#
  18.868 -# USB support
  18.869 -#
  18.870 -# CONFIG_USB is not set
  18.871 -
  18.872 -#
  18.873 -# Support for USB gadgets
  18.874 -#
  18.875 -# CONFIG_USB_GADGET is not set
  18.876 -
  18.877 -#
  18.878 -# Bluetooth support
  18.879 -#
  18.880 -# CONFIG_BLUEZ is not set
  18.881 -
  18.882 -#
  18.883 -# Kernel hacking
  18.884 -#
  18.885 -CONFIG_DEBUG_KERNEL=y
  18.886 -# CONFIG_DEBUG_STACKOVERFLOW is not set
  18.887 -# CONFIG_DEBUG_HIGHMEM is not set
  18.888 -# CONFIG_DEBUG_SLAB is not set
  18.889 -# CONFIG_DEBUG_IOVIRT is not set
  18.890 -# CONFIG_MAGIC_SYSRQ is not set
  18.891 -# CONFIG_DEBUG_SPINLOCK is not set
  18.892 -# CONFIG_DEBUG_BUGVERBOSE is not set
  18.893 -CONFIG_KALLSYMS=y
  18.894 -# CONFIG_FRAME_POINTER is not set
  18.895 -CONFIG_LOG_BUF_SHIFT=0
  18.896 -
  18.897 -#
  18.898 -# Cryptographic options
  18.899 -#
  18.900 -CONFIG_CRYPTO=y
  18.901 -CONFIG_CRYPTO_HMAC=y
  18.902 -CONFIG_CRYPTO_NULL=m
  18.903 -CONFIG_CRYPTO_MD4=m
  18.904 -CONFIG_CRYPTO_MD5=m
  18.905 -CONFIG_CRYPTO_SHA1=m
  18.906 -CONFIG_CRYPTO_SHA256=m
  18.907 -CONFIG_CRYPTO_SHA512=m
  18.908 -# CONFIG_CRYPTO_WP512 is not set
  18.909 -CONFIG_CRYPTO_DES=m
  18.910 -CONFIG_CRYPTO_BLOWFISH=m
  18.911 -CONFIG_CRYPTO_TWOFISH=m
  18.912 -CONFIG_CRYPTO_SERPENT=m
  18.913 -CONFIG_CRYPTO_AES=m
  18.914 -CONFIG_CRYPTO_CAST5=m
  18.915 -CONFIG_CRYPTO_CAST6=m
  18.916 -# CONFIG_CRYPTO_TEA is not set
  18.917 -# CONFIG_CRYPTO_KHAZAD is not set
  18.918 -# CONFIG_CRYPTO_ANUBIS is not set
  18.919 -CONFIG_CRYPTO_ARC4=m
  18.920 -CONFIG_CRYPTO_DEFLATE=m
  18.921 -# CONFIG_CRYPTO_MICHAEL_MIC is not set
  18.922 -# CONFIG_CRYPTO_TEST is not set
  18.923 -
  18.924 -#
  18.925 -# Library routines
  18.926 -#
  18.927 -# CONFIG_CRC32 is not set
  18.928 -CONFIG_ZLIB_INFLATE=y
  18.929 -CONFIG_ZLIB_DEFLATE=m
  18.930 -# CONFIG_FW_LOADER is not set
    19.1 --- a/linux-2.4-xen-sparse/arch/xen/defconfig-xenU	Sat Oct 08 11:37:45 2005 -0600
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,562 +0,0 @@
    19.4 -#
    19.5 -# Automatically generated make config: don't edit
    19.6 -#
    19.7 -CONFIG_XEN=y
    19.8 -CONFIG_X86=y
    19.9 -CONFIG_ISA=y
   19.10 -# CONFIG_SBUS is not set
   19.11 -CONFIG_UID16=y
   19.12 -
   19.13 -#
   19.14 -# Xen
   19.15 -#
   19.16 -# CONFIG_XEN_PRIVILEGED_GUEST is not set
   19.17 -# CONFIG_XEN_PHYSDEV_ACCESS is not set
   19.18 -CONFIG_XEN_SCRUB_PAGES=y
   19.19 -CONFIG_XEN_NETDEV_FRONTEND=y
   19.20 -CONFIG_XEN_BLKDEV_FRONTEND=y
   19.21 -CONFIG_XEN_BLKDEV_GRANT=y
   19.22 -# CONFIG_XEN_USB_FRONTEND is not set
   19.23 -CONFIG_NO_IDLE_HZ=y
   19.24 -# CONFIG_FOREIGN_PAGES is not set
   19.25 -CONFIG_NETDEVICES=y
   19.26 -# CONFIG_VT is not set
   19.27 -
   19.28 -#
   19.29 -# Code maturity level options
   19.30 -#
   19.31 -CONFIG_EXPERIMENTAL=y
   19.32 -
   19.33 -#
   19.34 -# Loadable module support
   19.35 -#
   19.36 -CONFIG_MODULES=y
   19.37 -CONFIG_MODVERSIONS=y
   19.38 -CONFIG_KMOD=y
   19.39 -
   19.40 -#
   19.41 -# Processor type and features
   19.42 -#
   19.43 -CONFIG_M686=y
   19.44 -# CONFIG_MPENTIUMIII is not set
   19.45 -# CONFIG_MPENTIUM4 is not set
   19.46 -# CONFIG_MK7 is not set
   19.47 -# CONFIG_MK8 is not set
   19.48 -# CONFIG_MVIAC3_2 is not set
   19.49 -CONFIG_X86_WP_WORKS_OK=y
   19.50 -CONFIG_X86_INVLPG=y
   19.51 -CONFIG_X86_CMPXCHG=y
   19.52 -CONFIG_X86_XADD=y
   19.53 -CONFIG_X86_BSWAP=y
   19.54 -CONFIG_X86_POPAD_OK=y
   19.55 -# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
   19.56 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   19.57 -CONFIG_X86_GOOD_APIC=y
   19.58 -CONFIG_X86_PGE=y
   19.59 -CONFIG_X86_USE_PPRO_CHECKSUM=y
   19.60 -CONFIG_X86_TSC=y
   19.61 -CONFIG_X86_L1_CACHE_SHIFT=5
   19.62 -CONFIG_NOHIGHMEM=y
   19.63 -# CONFIG_HIGHMEM4G is not set
   19.64 -CONFIG_FORCE_MAX_ZONEORDER=11
   19.65 -
   19.66 -#
   19.67 -# General setup
   19.68 -#
   19.69 -CONFIG_NET=y
   19.70 -CONFIG_SYSVIPC=y
   19.71 -# CONFIG_BSD_PROCESS_ACCT is not set
   19.72 -CONFIG_SYSCTL=y
   19.73 -CONFIG_KCORE_ELF=y
   19.74 -# CONFIG_KCORE_AOUT is not set
   19.75 -CONFIG_BINFMT_AOUT=y
   19.76 -CONFIG_BINFMT_ELF=y
   19.77 -# CONFIG_BINFMT_MISC is not set
   19.78 -# CONFIG_OOM_KILLER is not set
   19.79 -
   19.80 -#
   19.81 -# Networking options
   19.82 -#
   19.83 -CONFIG_PACKET=y
   19.84 -CONFIG_PACKET_MMAP=y
   19.85 -# CONFIG_NETLINK_DEV is not set
   19.86 -CONFIG_NETFILTER=y
   19.87 -# CONFIG_NETFILTER_DEBUG is not set
   19.88 -CONFIG_FILTER=y
   19.89 -CONFIG_UNIX=y
   19.90 -CONFIG_INET=y
   19.91 -# CONFIG_IP_MULTICAST is not set
   19.92 -# CONFIG_IP_ADVANCED_ROUTER is not set
   19.93 -CONFIG_IP_PNP=y
   19.94 -CONFIG_IP_PNP_DHCP=y
   19.95 -# CONFIG_IP_PNP_BOOTP is not set
   19.96 -# CONFIG_IP_PNP_RARP is not set
   19.97 -# CONFIG_NET_IPIP is not set
   19.98 -# CONFIG_NET_IPGRE is not set
   19.99 -# CONFIG_ARPD is not set
  19.100 -# CONFIG_INET_ECN is not set
  19.101 -# CONFIG_SYN_COOKIES is not set
  19.102 -
  19.103 -#
  19.104 -#   IP: Netfilter Configuration
  19.105 -#
  19.106 -CONFIG_IP_NF_CONNTRACK=y
  19.107 -CONFIG_IP_NF_FTP=y
  19.108 -# CONFIG_IP_NF_AMANDA is not set
  19.109 -CONFIG_IP_NF_TFTP=y
  19.110 -CONFIG_IP_NF_IRC=y
  19.111 -# CONFIG_IP_NF_QUEUE is not set
  19.112 -CONFIG_IP_NF_IPTABLES=y
  19.113 -# CONFIG_IP_NF_MATCH_LIMIT is not set
  19.114 -# CONFIG_IP_NF_MATCH_MAC is not set
  19.115 -# CONFIG_IP_NF_MATCH_PKTTYPE is not set
  19.116 -# CONFIG_IP_NF_MATCH_MARK is not set
  19.117 -# CONFIG_IP_NF_MATCH_MULTIPORT is not set
  19.118 -# CONFIG_IP_NF_MATCH_TOS is not set
  19.119 -# CONFIG_IP_NF_MATCH_RECENT is not set
  19.120 -# CONFIG_IP_NF_MATCH_ECN is not set
  19.121 -# CONFIG_IP_NF_MATCH_DSCP is not set
  19.122 -# CONFIG_IP_NF_MATCH_AH_ESP is not set
  19.123 -# CONFIG_IP_NF_MATCH_LENGTH is not set
  19.124 -# CONFIG_IP_NF_MATCH_TTL is not set
  19.125 -# CONFIG_IP_NF_MATCH_TCPMSS is not set
  19.126 -# CONFIG_IP_NF_MATCH_HELPER is not set
  19.127 -CONFIG_IP_NF_MATCH_STATE=y
  19.128 -CONFIG_IP_NF_MATCH_CONNTRACK=y
  19.129 -# CONFIG_IP_NF_MATCH_UNCLEAN is not set
  19.130 -# CONFIG_IP_NF_MATCH_OWNER is not set
  19.131 -CONFIG_IP_NF_FILTER=y
  19.132 -CONFIG_IP_NF_TARGET_REJECT=y
  19.133 -# CONFIG_IP_NF_TARGET_MIRROR is not set
  19.134 -CONFIG_IP_NF_NAT=y
  19.135 -CONFIG_IP_NF_NAT_NEEDED=y
  19.136 -CONFIG_IP_NF_TARGET_MASQUERADE=y
  19.137 -CONFIG_IP_NF_TARGET_REDIRECT=y
  19.138 -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
  19.139 -CONFIG_IP_NF_NAT_IRC=y
  19.140 -CONFIG_IP_NF_NAT_FTP=y
  19.141 -CONFIG_IP_NF_NAT_TFTP=y
  19.142 -# CONFIG_IP_NF_MANGLE is not set
  19.143 -CONFIG_IP_NF_TARGET_LOG=y
  19.144 -CONFIG_IP_NF_TARGET_ULOG=y
  19.145 -# CONFIG_IP_NF_TARGET_TCPMSS is not set
  19.146 -# CONFIG_IP_NF_ARPTABLES is not set
  19.147 -
  19.148 -#
  19.149 -#   IP: Virtual Server Configuration
  19.150 -#
  19.151 -# CONFIG_IP_VS is not set
  19.152 -# CONFIG_IPV6 is not set
  19.153 -# CONFIG_KHTTPD is not set
  19.154 -
  19.155 -#
  19.156 -#    SCTP Configuration (EXPERIMENTAL)
  19.157 -#
  19.158 -# CONFIG_IP_SCTP is not set
  19.159 -# CONFIG_ATM is not set
  19.160 -CONFIG_VLAN_8021Q=y
  19.161 -
  19.162 -#
  19.163 -#  
  19.164 -#
  19.165 -# CONFIG_IPX is not set
  19.166 -# CONFIG_ATALK is not set
  19.167 -# CONFIG_DECNET is not set
  19.168 -# CONFIG_BRIDGE is not set
  19.169 -# CONFIG_X25 is not set
  19.170 -# CONFIG_LAPB is not set
  19.171 -# CONFIG_LLC is not set
  19.172 -# CONFIG_NET_DIVERT is not set
  19.173 -# CONFIG_ECONET is not set
  19.174 -# CONFIG_WAN_ROUTER is not set
  19.175 -# CONFIG_NET_FASTROUTE is not set
  19.176 -# CONFIG_NET_HW_FLOWCONTROL is not set
  19.177 -
  19.178 -#
  19.179 -# QoS and/or fair queueing
  19.180 -#
  19.181 -# CONFIG_NET_SCHED is not set
  19.182 -
  19.183 -#
  19.184 -# Network testing
  19.185 -#
  19.186 -# CONFIG_NET_PKTGEN is not set
  19.187 -
  19.188 -#
  19.189 -# SCSI support
  19.190 -#
  19.191 -CONFIG_SCSI=y
  19.192 -
  19.193 -#
  19.194 -# SCSI support type (disk, tape, CD-ROM)
  19.195 -#
  19.196 -CONFIG_BLK_DEV_SD=y
  19.197 -CONFIG_SD_EXTRA_DEVS=40
  19.198 -# CONFIG_CHR_DEV_ST is not set
  19.199 -# CONFIG_CHR_DEV_OSST is not set
  19.200 -# CONFIG_BLK_DEV_SR is not set
  19.201 -CONFIG_CHR_DEV_SG=y
  19.202 -
  19.203 -#
  19.204 -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  19.205 -#
  19.206 -# CONFIG_SCSI_DEBUG_QUEUES is not set
  19.207 -# CONFIG_SCSI_MULTI_LUN is not set
  19.208 -# CONFIG_SCSI_CONSTANTS is not set
  19.209 -# CONFIG_SCSI_LOGGING is not set
  19.210 -
  19.211 -#
  19.212 -# SCSI low-level drivers
  19.213 -#
  19.214 -# CONFIG_SCSI_7000FASST is not set
  19.215 -# CONFIG_SCSI_ACARD is not set
  19.216 -# CONFIG_SCSI_AHA152X is not set
  19.217 -# CONFIG_SCSI_AHA1542 is not set
  19.218 -# CONFIG_SCSI_AHA1740 is not set
  19.219 -# CONFIG_SCSI_AACRAID is not set
  19.220 -# CONFIG_SCSI_AIC7XXX is not set
  19.221 -# CONFIG_SCSI_AIC79XX is not set
  19.222 -# CONFIG_SCSI_AIC7XXX_OLD is not set
  19.223 -# CONFIG_SCSI_DPT_I2O is not set
  19.224 -# CONFIG_SCSI_ADVANSYS is not set
  19.225 -# CONFIG_SCSI_IN2000 is not set
  19.226 -# CONFIG_SCSI_AM53C974 is not set
  19.227 -# CONFIG_SCSI_MEGARAID is not set
  19.228 -# CONFIG_SCSI_MEGARAID2 is not set
  19.229 -# CONFIG_SCSI_SATA is not set
  19.230 -# CONFIG_SCSI_SATA_AHCI is not set
  19.231 -# CONFIG_SCSI_SATA_SVW is not set
  19.232 -# CONFIG_SCSI_ATA_PIIX is not set
  19.233 -# CONFIG_SCSI_SATA_NV is not set
  19.234 -# CONFIG_SCSI_SATA_QSTOR is not set
  19.235 -# CONFIG_SCSI_SATA_PROMISE is not set
  19.236 -# CONFIG_SCSI_SATA_SX4 is not set
  19.237 -# CONFIG_SCSI_SATA_SIL is not set
  19.238 -# CONFIG_SCSI_SATA_SIS is not set
  19.239 -# CONFIG_SCSI_SATA_ULI is not set
  19.240 -# CONFIG_SCSI_SATA_VIA is not set
  19.241 -# CONFIG_SCSI_SATA_VITESSE is not set
  19.242 -# CONFIG_SCSI_BUSLOGIC is not set
  19.243 -# CONFIG_SCSI_DMX3191D is not set
  19.244 -# CONFIG_SCSI_DTC3280 is not set
  19.245 -# CONFIG_SCSI_EATA is not set
  19.246 -# CONFIG_SCSI_EATA_DMA is not set
  19.247 -# CONFIG_SCSI_EATA_PIO is not set
  19.248 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
  19.249 -# CONFIG_SCSI_GDTH is not set
  19.250 -# CONFIG_SCSI_GENERIC_NCR5380 is not set
  19.251 -# CONFIG_SCSI_IPS is not set
  19.252 -# CONFIG_SCSI_INITIO is not set
  19.253 -# CONFIG_SCSI_INIA100 is not set
  19.254 -# CONFIG_SCSI_PPA is not set
  19.255 -# CONFIG_SCSI_IMM is not set
  19.256 -# CONFIG_SCSI_NCR53C406A is not set
  19.257 -# CONFIG_SCSI_NCR53C7xx is not set
  19.258 -# CONFIG_SCSI_PAS16 is not set
  19.259 -# CONFIG_SCSI_PCI2000 is not set
  19.260 -# CONFIG_SCSI_PCI2220I is not set
  19.261 -# CONFIG_SCSI_PSI240I is not set
  19.262 -# CONFIG_SCSI_QLOGIC_FAS is not set
  19.263 -# CONFIG_SCSI_SEAGATE is not set
  19.264 -# CONFIG_SCSI_SIM710 is not set
  19.265 -# CONFIG_SCSI_SYM53C416 is not set
  19.266 -# CONFIG_SCSI_T128 is not set
  19.267 -# CONFIG_SCSI_U14_34F is not set
  19.268 -# CONFIG_SCSI_ULTRASTOR is not set
  19.269 -# CONFIG_SCSI_NSP32 is not set
  19.270 -# CONFIG_SCSI_DEBUG is not set
  19.271 -
  19.272 -#
  19.273 -# Block devices
  19.274 -#
  19.275 -CONFIG_BLK_DEV_LOOP=y
  19.276 -CONFIG_BLK_DEV_NBD=y
  19.277 -CONFIG_BLK_DEV_RAM=y
  19.278 -CONFIG_BLK_DEV_RAM_SIZE=4096
  19.279 -CONFIG_BLK_DEV_INITRD=y
  19.280 -# CONFIG_BLK_STATS is not set
  19.281 -# CONFIG_BLK_DEV_HD is not set
  19.282 -
  19.283 -#
  19.284 -# Character devices
  19.285 -#
  19.286 -# CONFIG_VT is not set
  19.287 -# CONFIG_SERIAL is not set
  19.288 -# CONFIG_SERIAL_EXTENDED is not set
  19.289 -# CONFIG_SERIAL_NONSTANDARD is not set
  19.290 -CONFIG_UNIX98_PTYS=y
  19.291 -CONFIG_UNIX98_PTY_COUNT=256
  19.292 -# CONFIG_PRINTER is not set
  19.293 -# CONFIG_PPDEV is not set
  19.294 -# CONFIG_TIPAR is not set
  19.295 -
  19.296 -#
  19.297 -# I2C support
  19.298 -#
  19.299 -# CONFIG_I2C is not set
  19.300 -
  19.301 -#
  19.302 -# Mice
  19.303 -#
  19.304 -# CONFIG_BUSMOUSE is not set
  19.305 -CONFIG_MOUSE=y
  19.306 -CONFIG_PSMOUSE=y
  19.307 -# CONFIG_82C710_MOUSE is not set
  19.308 -# CONFIG_PC110_PAD is not set
  19.309 -# CONFIG_MK712_MOUSE is not set
  19.310 -
  19.311 -#
  19.312 -# Joysticks
  19.313 -#
  19.314 -# CONFIG_INPUT_GAMEPORT is not set
  19.315 -# CONFIG_INPUT_NS558 is not set
  19.316 -# CONFIG_INPUT_LIGHTNING is not set
  19.317 -# CONFIG_INPUT_PCIGAME is not set
  19.318 -# CONFIG_INPUT_CS461X is not set
  19.319 -# CONFIG_INPUT_EMU10K1 is not set
  19.320 -# CONFIG_INPUT_SERIO is not set
  19.321 -# CONFIG_INPUT_SERPORT is not set
  19.322 -
  19.323 -#
  19.324 -# Joysticks
  19.325 -#
  19.326 -# CONFIG_INPUT_ANALOG is not set
  19.327 -# CONFIG_INPUT_A3D is not set
  19.328 -# CONFIG_INPUT_ADI is not set
  19.329 -# CONFIG_INPUT_COBRA is not set
  19.330 -# CONFIG_INPUT_GF2K is not set
  19.331 -# CONFIG_INPUT_GRIP is not set
  19.332 -# CONFIG_INPUT_INTERACT is not set
  19.333 -# CONFIG_INPUT_TMDC is not set
  19.334 -# CONFIG_INPUT_SIDEWINDER is not set
  19.335 -# CONFIG_INPUT_IFORCE_USB is not set
  19.336 -# CONFIG_INPUT_IFORCE_232 is not set
  19.337 -# CONFIG_INPUT_WARRIOR is not set
  19.338 -# CONFIG_INPUT_MAGELLAN is not set
  19.339 -# CONFIG_INPUT_SPACEORB is not set
  19.340 -# CONFIG_INPUT_SPACEBALL is not set
  19.341 -# CONFIG_INPUT_STINGER is not set
  19.342 -# CONFIG_INPUT_DB9 is not set
  19.343 -# CONFIG_INPUT_GAMECON is not set
  19.344 -# CONFIG_INPUT_TURBOGRAFX is not set
  19.345 -# CONFIG_QIC02_TAPE is not set
  19.346 -# CONFIG_IPMI_HANDLER is not set
  19.347 -# CONFIG_IPMI_PANIC_EVENT is not set
  19.348 -# CONFIG_IPMI_DEVICE_INTERFACE is not set
  19.349 -# CONFIG_IPMI_KCS is not set
  19.350 -# CONFIG_IPMI_WATCHDOG is not set
  19.351 -
  19.352 -#
  19.353 -# Watchdog Cards
  19.354 -#
  19.355 -# CONFIG_WATCHDOG is not set
  19.356 -# CONFIG_SCx200 is not set
  19.357 -# CONFIG_SCx200_GPIO is not set
  19.358 -# CONFIG_AMD_RNG is not set
  19.359 -# CONFIG_INTEL_RNG is not set
  19.360 -# CONFIG_HW_RANDOM is not set
  19.361 -# CONFIG_AMD_PM768 is not set
  19.362 -# CONFIG_NVRAM is not set
  19.363 -# CONFIG_RTC is not set
  19.364 -# CONFIG_DTLK is not set
  19.365 -# CONFIG_R3964 is not set
  19.366 -# CONFIG_APPLICOM is not set
  19.367 -# CONFIG_SONYPI is not set
  19.368 -
  19.369 -#
  19.370 -# Ftape, the floppy tape device driver
  19.371 -#
  19.372 -# CONFIG_FTAPE is not set
  19.373 -# CONFIG_AGP is not set
  19.374 -
  19.375 -#
  19.376 -# Direct Rendering Manager (XFree86 DRI support)
  19.377 -#
  19.378 -# CONFIG_DRM is not set
  19.379 -# CONFIG_MWAVE is not set
  19.380 -# CONFIG_OBMOUSE is not set
  19.381 -
  19.382 -#
  19.383 -# File systems
  19.384 -#
  19.385 -# CONFIG_QUOTA is not set
  19.386 -# CONFIG_QFMT_V2 is not set
  19.387 -CONFIG_AUTOFS_FS=y
  19.388 -CONFIG_AUTOFS4_FS=y
  19.389 -# CONFIG_REISERFS_FS is not set
  19.390 -# CONFIG_REISERFS_CHECK is not set
  19.391 -# CONFIG_REISERFS_PROC_INFO is not set
  19.392 -# CONFIG_ADFS_FS is not set
  19.393 -# CONFIG_ADFS_FS_RW is not set
  19.394 -# CONFIG_AFFS_FS is not set
  19.395 -# CONFIG_HFS_FS is not set
  19.396 -# CONFIG_HFSPLUS_FS is not set
  19.397 -# CONFIG_BEFS_FS is not set
  19.398 -# CONFIG_BEFS_DEBUG is not set
  19.399 -# CONFIG_BFS_FS is not set
  19.400 -CONFIG_EXT3_FS=y
  19.401 -CONFIG_JBD=y
  19.402 -# CONFIG_JBD_DEBUG is not set
  19.403 -CONFIG_FAT_FS=y
  19.404 -CONFIG_MSDOS_FS=y
  19.405 -CONFIG_UMSDOS_FS=y
  19.406 -CONFIG_VFAT_FS=y
  19.407 -# CONFIG_EFS_FS is not set
  19.408 -# CONFIG_JFFS_FS is not set
  19.409 -# CONFIG_JFFS2_FS is not set
  19.410 -# CONFIG_CRAMFS is not set
  19.411 -CONFIG_TMPFS=y
  19.412 -CONFIG_RAMFS=y
  19.413 -CONFIG_ISO9660_FS=y
  19.414 -CONFIG_JOLIET=y
  19.415 -CONFIG_ZISOFS=y
  19.416 -# CONFIG_JFS_FS is not set
  19.417 -# CONFIG_JFS_DEBUG is not set
  19.418 -# CONFIG_JFS_STATISTICS is not set
  19.419 -# CONFIG_MINIX_FS is not set
  19.420 -# CONFIG_VXFS_FS is not set
  19.421 -# CONFIG_NTFS_FS is not set
  19.422 -# CONFIG_NTFS_RW is not set
  19.423 -# CONFIG_HPFS_FS is not set
  19.424 -CONFIG_PROC_FS=y
  19.425 -# CONFIG_DEVFS_FS is not set
  19.426 -# CONFIG_DEVFS_MOUNT is not set
  19.427 -# CONFIG_DEVFS_DEBUG is not set
  19.428 -CONFIG_DEVPTS_FS=y
  19.429 -# CONFIG_QNX4FS_FS is not set
  19.430 -# CONFIG_QNX4FS_RW is not set
  19.431 -# CONFIG_ROMFS_FS is not set
  19.432 -CONFIG_EXT2_FS=y
  19.433 -# CONFIG_SYSV_FS is not set
  19.434 -# CONFIG_UDF_FS is not set
  19.435 -# CONFIG_UDF_RW is not set
  19.436 -# CONFIG_UFS_FS is not set
  19.437 -# CONFIG_UFS_FS_WRITE is not set
  19.438 -# CONFIG_XFS_FS is not set
  19.439 -# CONFIG_XFS_QUOTA is not set
  19.440 -# CONFIG_XFS_RT is not set
  19.441 -# CONFIG_XFS_TRACE is not set
  19.442 -# CONFIG_XFS_DEBUG is not set
  19.443 -
  19.444 -#
  19.445 -# Network File Systems
  19.446 -#
  19.447 -# CONFIG_CODA_FS is not set
  19.448 -# CONFIG_INTERMEZZO_FS is not set
  19.449 -CONFIG_NFS_FS=y
  19.450 -CONFIG_NFS_V3=y
  19.451 -# CONFIG_NFS_DIRECTIO is not set
  19.452 -CONFIG_ROOT_NFS=y
  19.453 -CONFIG_NFSD=y
  19.454 -CONFIG_NFSD_V3=y
  19.455 -# CONFIG_NFSD_TCP is not set
  19.456 -CONFIG_SUNRPC=y
  19.457 -CONFIG_LOCKD=y
  19.458 -CONFIG_LOCKD_V4=y
  19.459 -# CONFIG_SMB_FS is not set
  19.460 -# CONFIG_NCP_FS is not set
  19.461 -# CONFIG_NCPFS_PACKET_SIGNING is not set
  19.462 -# CONFIG_NCPFS_IOCTL_LOCKING is not set
  19.463 -# CONFIG_NCPFS_STRONG is not set
  19.464 -# CONFIG_NCPFS_NFS_NS is not set
  19.465 -# CONFIG_NCPFS_OS2_NS is not set
  19.466 -# CONFIG_NCPFS_SMALLDOS is not set
  19.467 -# CONFIG_NCPFS_NLS is not set
  19.468 -# CONFIG_NCPFS_EXTRAS is not set
  19.469 -CONFIG_ZISOFS_FS=y
  19.470 -
  19.471 -#
  19.472 -# Partition Types
  19.473 -#
  19.474 -CONFIG_PARTITION_ADVANCED=y
  19.475 -# CONFIG_ACORN_PARTITION is not set
  19.476 -# CONFIG_OSF_PARTITION is not set
  19.477 -# CONFIG_AMIGA_PARTITION is not set
  19.478 -# CONFIG_ATARI_PARTITION is not set
  19.479 -# CONFIG_MAC_PARTITION is not set
  19.480 -CONFIG_MSDOS_PARTITION=y
  19.481 -# CONFIG_BSD_DISKLABEL is not set
  19.482 -# CONFIG_MINIX_SUBPARTITION is not set
  19.483 -# CONFIG_SOLARIS_X86_PARTITION is not set
  19.484 -# CONFIG_UNIXWARE_DISKLABEL is not set
  19.485 -# CONFIG_LDM_PARTITION is not set
  19.486 -# CONFIG_SGI_PARTITION is not set
  19.487 -# CONFIG_ULTRIX_PARTITION is not set
  19.488 -# CONFIG_SUN_PARTITION is not set
  19.489 -# CONFIG_EFI_PARTITION is not set
  19.490 -# CONFIG_SMB_NLS is not set
  19.491 -CONFIG_NLS=y
  19.492 -
  19.493 -#
  19.494 -# Native Language Support
  19.495 -#
  19.496 -CONFIG_NLS_DEFAULT="iso8559-1"
  19.497 -# CONFIG_NLS_CODEPAGE_437 is not set
  19.498 -# CONFIG_NLS_CODEPAGE_737 is not set
  19.499 -# CONFIG_NLS_CODEPAGE_775 is not set
  19.500 -# CONFIG_NLS_CODEPAGE_850 is not set
  19.501 -# CONFIG_NLS_CODEPAGE_852 is not set
  19.502 -# CONFIG_NLS_CODEPAGE_855 is not set
  19.503 -# CONFIG_NLS_CODEPAGE_857 is not set
  19.504 -# CONFIG_NLS_CODEPAGE_860 is not set
  19.505 -# CONFIG_NLS_CODEPAGE_861 is not set
  19.506 -# CONFIG_NLS_CODEPAGE_862 is not set
  19.507 -# CONFIG_NLS_CODEPAGE_863 is not set
  19.508 -# CONFIG_NLS_CODEPAGE_864 is not set
  19.509 -# CONFIG_NLS_CODEPAGE_865 is not set
  19.510 -# CONFIG_NLS_CODEPAGE_866 is not set
  19.511 -# CONFIG_NLS_CODEPAGE_869 is not set
  19.512 -# CONFIG_NLS_CODEPAGE_936 is not set
  19.513 -# CONFIG_NLS_CODEPAGE_950 is not set
  19.514 -# CONFIG_NLS_CODEPAGE_932 is not set
  19.515 -# CONFIG_NLS_CODEPAGE_949 is not set
  19.516 -# CONFIG_NLS_CODEPAGE_874 is not set
  19.517 -# CONFIG_NLS_ISO8859_8 is not set
  19.518 -# CONFIG_NLS_CODEPAGE_1250 is not set
  19.519 -# CONFIG_NLS_CODEPAGE_1251 is not set
  19.520 -CONFIG_NLS_ISO8859_1=y
  19.521 -# CONFIG_NLS_ISO8859_2 is not set
  19.522 -# CONFIG_NLS_ISO8859_3 is not set
  19.523 -# CONFIG_NLS_ISO8859_4 is not set
  19.524 -# CONFIG_NLS_ISO8859_5 is not set
  19.525 -# CONFIG_NLS_ISO8859_6 is not set
  19.526 -# CONFIG_NLS_ISO8859_7 is not set
  19.527 -# CONFIG_NLS_ISO8859_9 is not set
  19.528 -# CONFIG_NLS_ISO8859_13 is not set
  19.529 -# CONFIG_NLS_ISO8859_14 is not set
  19.530 -# CONFIG_NLS_ISO8859_15 is not set
  19.531 -# CONFIG_NLS_KOI8_R is not set
  19.532 -# CONFIG_NLS_KOI8_U is not set
  19.533 -# CONFIG_NLS_UTF8 is not set
  19.534 -
  19.535 -#
  19.536 -# Console drivers
  19.537 -#
  19.538 -CONFIG_XEN_CONSOLE=y
  19.539 -
  19.540 -#
  19.541 -# Kernel hacking
  19.542 -#
  19.543 -CONFIG_DEBUG_KERNEL=y
  19.544 -# CONFIG_DEBUG_STACKOVERFLOW is not set
  19.545 -# CONFIG_DEBUG_HIGHMEM is not set
  19.546 -# CONFIG_DEBUG_SLAB is not set
  19.547 -# CONFIG_DEBUG_IOVIRT is not set
  19.548 -# CONFIG_MAGIC_SYSRQ is not set
  19.549 -# CONFIG_DEBUG_SPINLOCK is not set
  19.550 -# CONFIG_DEBUG_BUGVERBOSE is not set
  19.551 -CONFIG_KALLSYMS=y
  19.552 -# CONFIG_FRAME_POINTER is not set
  19.553 -CONFIG_LOG_BUF_SHIFT=0
  19.554 -
  19.555 -#
  19.556 -# Cryptographic options
  19.557 -#
  19.558 -# CONFIG_CRYPTO is not set
  19.559 -
  19.560 -#
  19.561 -# Library routines
  19.562 -#
  19.563 -# CONFIG_CRC32 is not set
  19.564 -CONFIG_ZLIB_INFLATE=y
  19.565 -# CONFIG_ZLIB_DEFLATE is not set
    20.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/balloon/Makefile	Sat Oct 08 11:37:45 2005 -0600
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,4 +0,0 @@
    20.4 -O_TARGET := drv.o
    20.5 -export-objs := balloon.o
    20.6 -obj-y := balloon.o
    20.7 -include $(TOPDIR)/Rules.make
    21.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/Makefile	Sat Oct 08 11:37:45 2005 -0600
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,10 +0,0 @@
    21.4 -
    21.5 -O_TARGET := drv.o
    21.6 -
    21.7 -subdir-$(CONFIG_XEN_BLKDEV_FRONTEND) += frontend
    21.8 -obj-$(CONFIG_XEN_BLKDEV_FRONTEND)    += frontend/drv.o
    21.9 -
   21.10 -subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
   21.11 -obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
   21.12 -
   21.13 -include $(TOPDIR)/Rules.make
    22.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/backend/Makefile	Sat Oct 08 11:37:45 2005 -0600
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,3 +0,0 @@
    22.4 -O_TARGET := drv.o
    22.5 -obj-y := main.o control.o interface.o vbd.o
    22.6 -include $(TOPDIR)/Rules.make
    23.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile	Sat Oct 08 11:37:45 2005 -0600
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,3 +0,0 @@
    23.4 -O_TARGET := drv.o
    23.5 -obj-y := blkfront.o vbd.o
    23.6 -include $(TOPDIR)/Rules.make
    24.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/frontend/common.h	Sat Oct 08 11:37:45 2005 -0600
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,93 +0,0 @@
    24.4 -/******************************************************************************
    24.5 - * arch/xen/drivers/blkif/frontend/common.h
    24.6 - * 
    24.7 - * Shared definitions between all levels of XenoLinux Virtual block devices.
    24.8 - */
    24.9 -
   24.10 -#ifndef __XEN_DRIVERS_COMMON_H__
   24.11 -#define __XEN_DRIVERS_COMMON_H__
   24.12 -
   24.13 -#include <linux/config.h>
   24.14 -#include <linux/module.h>
   24.15 -#include <linux/kernel.h>
   24.16 -#include <linux/sched.h>
   24.17 -#include <linux/slab.h>
   24.18 -#include <linux/string.h>
   24.19 -#include <linux/errno.h>
   24.20 -#include <linux/fs.h>
   24.21 -#include <linux/hdreg.h>
   24.22 -#include <linux/blkdev.h>
   24.23 -#include <linux/major.h>
   24.24 -#include <asm-xen/xen-public/xen.h>
   24.25 -#include <asm/io.h>
   24.26 -#include <asm/atomic.h>
   24.27 -#include <asm/uaccess.h>
   24.28 -#include <asm-xen/xen-public/io/blkif.h>
   24.29 -
   24.30 -#if 1
   24.31 -#define IPRINTK(fmt, args...) \
   24.32 -    printk(KERN_INFO "xen_blk: " fmt, ##args)
   24.33 -#else
   24.34 -#define IPRINTK(fmt, args...) ((void)0)
   24.35 -#endif
   24.36 -
   24.37 -#if 1
   24.38 -#define WPRINTK(fmt, args...) \
   24.39 -    printk(KERN_WARNING "xen_blk: " fmt, ##args)
   24.40 -#else
   24.41 -#define WPRINTK(fmt, args...) ((void)0)
   24.42 -#endif
   24.43 -
   24.44 -#if 0
   24.45 -#define DPRINTK(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   24.46 -#else
   24.47 -#define DPRINTK(_f, _a...) ((void)0)
   24.48 -#endif
   24.49 -
   24.50 -#if 0
   24.51 -#define DPRINTK_IOCTL(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   24.52 -#else
   24.53 -#define DPRINTK_IOCTL(_f, _a...) ((void)0)
   24.54 -#endif
   24.55 -
   24.56 -/* Private gendisk->flags[] values. */
   24.57 -#define GENHD_FL_XEN        2 /* Is unit a Xen block device?  */
   24.58 -#define GENHD_FL_VIRT_PARTNS 4 /* Are unit partitions virtual? */
   24.59 -
   24.60 -/*
   24.61 - * We have one of these per vbd, whether ide, scsi or 'other'.
   24.62 - * They hang in an array off the gendisk structure. We may end up putting
   24.63 - * all kinds of interesting stuff here :-)
   24.64 - */
   24.65 -typedef struct xl_disk {
   24.66 -    int usage;
   24.67 -} xl_disk_t;
   24.68 -
   24.69 -extern int blkif_open(struct inode *inode, struct file *filep);
   24.70 -extern int blkif_release(struct inode *inode, struct file *filep);
   24.71 -extern int blkif_ioctl(struct inode *inode, struct file *filep,
   24.72 -                                 unsigned command, unsigned long argument);
   24.73 -extern int blkif_check(kdev_t dev);
   24.74 -extern int blkif_revalidate(kdev_t dev);
   24.75 -extern void blkif_control_send(blkif_request_t *req, blkif_response_t *rsp);
   24.76 -extern void do_blkif_request (request_queue_t *rq); 
   24.77 -
   24.78 -extern void xlvbd_update_vbds(void);
   24.79 -
   24.80 -static inline xl_disk_t *xldev_to_xldisk(kdev_t xldev)
   24.81 -{
   24.82 -    struct gendisk *gd = get_gendisk(xldev);
   24.83 -    
   24.84 -    if ( gd == NULL ) 
   24.85 -        return NULL;
   24.86 -    
   24.87 -    return (xl_disk_t *)gd->real_devices + 
   24.88 -        (MINOR(xldev) >> gd->minor_shift);
   24.89 -}
   24.90 -
   24.91 -
   24.92 -/* Virtual block-device subsystem. */
   24.93 -extern int  xlvbd_init(void);
   24.94 -extern void xlvbd_cleanup(void); 
   24.95 -
   24.96 -#endif /* __XEN_DRIVERS_COMMON_H__ */
    25.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c	Sat Oct 08 11:37:45 2005 -0600
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,540 +0,0 @@
    25.4 -/******************************************************************************
    25.5 - * arch/xen/drivers/blkif/frontend/vbd.c
    25.6 - * 
    25.7 - * Xenolinux virtual block-device driver.
    25.8 - * 
    25.9 - * Copyright (c) 2003-2004, Keir Fraser & Steve Hand
   25.10 - * Modifications by Mark A. Williamson are (c) Intel Research Cambridge
   25.11 - */
   25.12 -
   25.13 -#include "common.h"
   25.14 -#include <linux/blk.h>
   25.15 -
   25.16 -/*
   25.17 - * For convenience we distinguish between ide, scsi and 'other' (i.e.
   25.18 - * potentially combinations of the two) in the naming scheme and in a few 
   25.19 - * other places (like default readahead, etc).
   25.20 - */
   25.21 -#define XLIDE_MAJOR_NAME  "hd"
   25.22 -#define XLSCSI_MAJOR_NAME "sd"
   25.23 -#define XLVBD_MAJOR_NAME "xvd"
   25.24 -
   25.25 -#define XLIDE_DEVS_PER_MAJOR   2
   25.26 -#define XLSCSI_DEVS_PER_MAJOR 16
   25.27 -#define XLVBD_DEVS_PER_MAJOR  16
   25.28 -
   25.29 -#define XLIDE_PARTN_SHIFT  6    /* amount to shift minor to get 'real' minor */
   25.30 -#define XLIDE_MAX_PART    (1 << XLIDE_PARTN_SHIFT)     /* minors per ide vbd */
   25.31 -
   25.32 -#define XLSCSI_PARTN_SHIFT 4    /* amount to shift minor to get 'real' minor */
   25.33 -#define XLSCSI_MAX_PART   (1 << XLSCSI_PARTN_SHIFT)   /* minors per scsi vbd */
   25.34 -
   25.35 -#define XLVBD_PARTN_SHIFT  4    /* amount to shift minor to get 'real' minor */
   25.36 -#define XLVBD_MAX_PART    (1 << XLVBD_PARTN_SHIFT) /* minors per 'other' vbd */
   25.37 -
   25.38 -/* The below are for the generic drivers/block/ll_rw_block.c code. */
   25.39 -static int xlide_blksize_size[256];
   25.40 -static int xlide_hardsect_size[256];
   25.41 -static int xlide_max_sectors[256];
   25.42 -static int xlscsi_blksize_size[256];
   25.43 -static int xlscsi_hardsect_size[256];
   25.44 -static int xlscsi_max_sectors[256];
   25.45 -static int xlvbd_blksize_size[256];
   25.46 -static int xlvbd_hardsect_size[256];
   25.47 -static int xlvbd_max_sectors[256];
   25.48 -
   25.49 -/* Information about our VBDs. */
   25.50 -#define MAX_VBDS 64
   25.51 -static int nr_vbds;
   25.52 -static vdisk_t *vbd_info;
   25.53 -
   25.54 -static struct block_device_operations xlvbd_block_fops = 
   25.55 -{
   25.56 -    open:               blkif_open,
   25.57 -    release:            blkif_release,
   25.58 -    ioctl:              blkif_ioctl,
   25.59 -    check_media_change: blkif_check,
   25.60 -    revalidate:         blkif_revalidate,
   25.61 -};
   25.62 -
   25.63 -static int xlvbd_get_vbd_info(vdisk_t *disk_info)
   25.64 -{
   25.65 -    vdisk_t         *buf = (vdisk_t *)__get_free_page(GFP_KERNEL);
   25.66 -    blkif_request_t  req;
   25.67 -    blkif_response_t rsp;
   25.68 -    int              nr;
   25.69 -
   25.70 -    memset(&req, 0, sizeof(req));
   25.71 -    req.operation   = BLKIF_OP_PROBE;
   25.72 -    req.nr_segments = 1;
   25.73 -#ifdef CONFIG_XEN_BLKDEV_GRANT
   25.74 -    blkif_control_probe_send(&req, &rsp,
   25.75 -                             (unsigned long)(virt_to_machine(buf)));
   25.76 -#else
   25.77 -    req.frame_and_sects[0] = virt_to_machine(buf) | 7;
   25.78 -
   25.79 -    blkif_control_send(&req, &rsp);
   25.80 -#endif
   25.81 -
   25.82 -    if ( rsp.status <= 0 )
   25.83 -    {
   25.84 -        printk(KERN_ALERT "Could not probe disks (%d)\n", rsp.status);
   25.85 -        return -1;
   25.86 -    }
   25.87 -
   25.88 -    if ( (nr = rsp.status) > MAX_VBDS )
   25.89 -         nr = MAX_VBDS;
   25.90 -    memcpy(disk_info, buf, nr * sizeof(vdisk_t));
   25.91 -
   25.92 -    return nr;
   25.93 -}
   25.94 -
   25.95 -/*
   25.96 - * xlvbd_init_device - initialise a VBD device
   25.97 - * @disk:              a vdisk_t describing the VBD
   25.98 - *
   25.99 - * Takes a vdisk_t * that describes a VBD the domain has access to.
  25.100 - * Performs appropriate initialisation and registration of the device.
  25.101 - *
  25.102 - * Care needs to be taken when making re-entrant calls to ensure that
  25.103 - * corruption does not occur.  Also, devices that are in use should not have
  25.104 - * their details updated.  This is the caller's responsibility.
  25.105 - */
  25.106 -static int xlvbd_init_device(vdisk_t *xd)
  25.107 -{
  25.108 -    int device = xd->device;
  25.109 -    int major  = MAJOR(device); 
  25.110 -    int minor  = MINOR(device);
  25.111 -    int is_ide = IDE_DISK_MAJOR(major);  /* is this an ide device? */
  25.112 -    int is_scsi= SCSI_BLK_MAJOR(major);  /* is this a scsi device? */
  25.113 -    char *major_name;
  25.114 -    struct gendisk *gd;
  25.115 -    struct block_device *bd;
  25.116 -    xl_disk_t *disk;
  25.117 -    int i, rc = 0, max_part, partno;
  25.118 -    unsigned long capacity;
  25.119 -
  25.120 -    unsigned char buf[64];
  25.121 -
  25.122 -    if ( (bd = bdget(device)) == NULL )
  25.123 -        return -1;
  25.124 -
  25.125 -    if ( ((disk = xldev_to_xldisk(device)) != NULL) && (disk->usage != 0) )
  25.126 -    {
  25.127 -        printk(KERN_ALERT "VBD update failed - in use [dev=%x]\n", device);
  25.128 -        rc = -1;
  25.129 -        goto out;
  25.130 -    }
  25.131 -
  25.132 -    if ( is_ide ) {
  25.133 -
  25.134 -	major_name = XLIDE_MAJOR_NAME; 
  25.135 -	max_part   = XLIDE_MAX_PART;
  25.136 -
  25.137 -    } else if ( is_scsi ) {
  25.138 -
  25.139 -	major_name = XLSCSI_MAJOR_NAME;
  25.140 -	max_part   = XLSCSI_MAX_PART;
  25.141 -
  25.142 -    } else { 
  25.143 -
  25.144 -        /* SMH: hmm - probably a CCISS driver or sim; assume CCISS for now */
  25.145 -	printk(KERN_ALERT "Assuming device %02x:%02x is CCISS/SCSI\n", 
  25.146 -	       major, minor);
  25.147 -	is_scsi    = 1; 
  25.148 -	major_name = "cciss"; 
  25.149 -	max_part   = XLSCSI_MAX_PART;
  25.150 -
  25.151 -    }
  25.152 -    
  25.153 -    partno = minor & (max_part - 1); 
  25.154 -    
  25.155 -    if ( (gd = get_gendisk(device)) == NULL )
  25.156 -    {
  25.157 -        rc = register_blkdev(major, major_name, &xlvbd_block_fops);
  25.158 -        if ( rc < 0 )
  25.159 -        {
  25.160 -            printk(KERN_ALERT "XL VBD: can't get major %d\n", major);
  25.161 -            goto out;
  25.162 -        }
  25.163 -
  25.164 -        if ( is_ide )
  25.165 -        { 
  25.166 -            blksize_size[major]  = xlide_blksize_size;
  25.167 -            hardsect_size[major] = xlide_hardsect_size;
  25.168 -            max_sectors[major]   = xlide_max_sectors;
  25.169 -            read_ahead[major]    = 8;
  25.170 -        } 
  25.171 -        else if ( is_scsi )
  25.172 -        { 
  25.173 -            blksize_size[major]  = xlscsi_blksize_size;
  25.174 -            hardsect_size[major] = xlscsi_hardsect_size;
  25.175 -            max_sectors[major]   = xlscsi_max_sectors;
  25.176 -            read_ahead[major]    = 8;
  25.177 -        }
  25.178 -        else
  25.179 -        { 
  25.180 -            blksize_size[major]  = xlvbd_blksize_size;
  25.181 -            hardsect_size[major] = xlvbd_hardsect_size;
  25.182 -            max_sectors[major]   = xlvbd_max_sectors;
  25.183 -            read_ahead[major]    = 8;
  25.184 -        }
  25.185 -
  25.186 -        blk_init_queue(BLK_DEFAULT_QUEUE(major), do_blkif_request);
  25.187 -
  25.188 -        /*
  25.189 -         * Turn off barking 'headactive' mode. We dequeue buffer heads as
  25.190 -         * soon as we pass them to the back-end driver.
  25.191 -         */
  25.192 -        blk_queue_headactive(BLK_DEFAULT_QUEUE(major), 0);
  25.193 -
  25.194 -        /* Construct an appropriate gendisk structure. */
  25.195 -        gd             = kmalloc(sizeof(struct gendisk), GFP_KERNEL);
  25.196 -        gd->major      = major;
  25.197 -        gd->major_name = major_name; 
  25.198 -    
  25.199 -        gd->max_p      = max_part; 
  25.200 -        if ( is_ide )
  25.201 -        { 
  25.202 -            gd->minor_shift  = XLIDE_PARTN_SHIFT; 
  25.203 -            gd->nr_real      = XLIDE_DEVS_PER_MAJOR; 
  25.204 -        } 
  25.205 -        else if ( is_scsi )
  25.206 -        { 
  25.207 -            gd->minor_shift  = XLSCSI_PARTN_SHIFT; 
  25.208 -            gd->nr_real      = XLSCSI_DEVS_PER_MAJOR; 
  25.209 -        }
  25.210 -        else
  25.211 -        { 
  25.212 -            gd->minor_shift  = XLVBD_PARTN_SHIFT; 
  25.213 -            gd->nr_real      = XLVBD_DEVS_PER_MAJOR; 
  25.214 -        }
  25.215 -
  25.216 -        /* 
  25.217 -        ** The sizes[] and part[] arrays hold the sizes and other 
  25.218 -        ** information about every partition with this 'major' (i.e. 
  25.219 -        ** every disk sharing the 8 bit prefix * max partns per disk) 
  25.220 -        */
  25.221 -        gd->sizes = kmalloc(max_part*gd->nr_real*sizeof(int), GFP_KERNEL);
  25.222 -        gd->part  = kmalloc(max_part*gd->nr_real*sizeof(struct hd_struct), 
  25.223 -                            GFP_KERNEL);
  25.224 -        memset(gd->sizes, 0, max_part * gd->nr_real * sizeof(int));
  25.225 -        memset(gd->part,  0, max_part * gd->nr_real 
  25.226 -               * sizeof(struct hd_struct));
  25.227 -
  25.228 -
  25.229 -        gd->real_devices = kmalloc(gd->nr_real * sizeof(xl_disk_t), 
  25.230 -                                   GFP_KERNEL);
  25.231 -        memset(gd->real_devices, 0, gd->nr_real * sizeof(xl_disk_t));
  25.232 -
  25.233 -        gd->next   = NULL;            
  25.234 -        gd->fops   = &xlvbd_block_fops;
  25.235 -
  25.236 -        gd->de_arr = kmalloc(gd->nr_real * sizeof(*gd->de_arr), 
  25.237 -                             GFP_KERNEL);
  25.238 -        gd->flags  = kmalloc(gd->nr_real * sizeof(*gd->flags), GFP_KERNEL);
  25.239 -    
  25.240 -        memset(gd->de_arr, 0, gd->nr_real * sizeof(*gd->de_arr));
  25.241 -        memset(gd->flags, 0, gd->nr_real *  sizeof(*gd->flags));
  25.242 -
  25.243 -        add_gendisk(gd);
  25.244 -
  25.245 -        blk_size[major] = gd->sizes;
  25.246 -    }
  25.247 -
  25.248 -    if ( xd->info & VDISK_READONLY )
  25.249 -        set_device_ro(device, 1);
  25.250 -
  25.251 -    gd->flags[minor >> gd->minor_shift] |= GENHD_FL_XEN;
  25.252 -
  25.253 -    /* NB. Linux 2.4 only handles 32-bit sector offsets and capacities. */
  25.254 -    capacity = (unsigned long)xd->capacity;
  25.255 -
  25.256 -    if ( partno != 0 )
  25.257 -    {
  25.258 -        /*
  25.259 -         * If this was previously set up as a real disc we will have set 
  25.260 -         * up partition-table information. Virtual partitions override 
  25.261 -         * 'real' partitions, and the two cannot coexist on a device.
  25.262 -         */
  25.263 -        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  25.264 -             (gd->sizes[minor & ~(max_part-1)] != 0) )
  25.265 -        {
  25.266 -            /*
  25.267 -             * Any non-zero sub-partition entries must be cleaned out before
  25.268 -             * installing 'virtual' partition entries. The two types cannot
  25.269 -             * coexist, and virtual partitions are favoured.
  25.270 -             */
  25.271 -            kdev_t dev = device & ~(max_part-1);
  25.272 -            for ( i = max_part - 1; i > 0; i-- )
  25.273 -            {
  25.274 -                invalidate_device(dev+i, 1);
  25.275 -                gd->part[MINOR(dev+i)].start_sect = 0;
  25.276 -                gd->part[MINOR(dev+i)].nr_sects   = 0;
  25.277 -                gd->sizes[MINOR(dev+i)]           = 0;
  25.278 -            }
  25.279 -            printk(KERN_ALERT
  25.280 -                   "Virtual partitions found for /dev/%s - ignoring any "
  25.281 -                   "real partition information we may have found.\n",
  25.282 -                   disk_name(gd, MINOR(device), buf));
  25.283 -        }
  25.284 -
  25.285 -        /* Need to skankily setup 'partition' information */
  25.286 -        gd->part[minor].start_sect = 0; 
  25.287 -        gd->part[minor].nr_sects   = capacity; 
  25.288 -        gd->sizes[minor]           = capacity >>(BLOCK_SIZE_BITS-9); 
  25.289 -
  25.290 -        gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  25.291 -    }
  25.292 -    else
  25.293 -    {
  25.294 -        gd->part[minor].nr_sects = capacity;
  25.295 -        gd->sizes[minor] = capacity>>(BLOCK_SIZE_BITS-9);
  25.296 -        
  25.297 -        /* Some final fix-ups depending on the device type */
  25.298 -        if ( xd->info & VDISK_REMOVABLE )
  25.299 -        { 
  25.300 -            gd->flags[minor >> gd->minor_shift] |= GENHD_FL_REMOVABLE; 
  25.301 -            printk(KERN_ALERT 
  25.302 -                   "Skipping partition check on %s /dev/%s\n", 
  25.303 -                   (xd->info & VDISK_CDROM) ? "cdrom" : "removable",
  25.304 -                   disk_name(gd, MINOR(device), buf)); 
  25.305 -        }
  25.306 -        else
  25.307 -        {
  25.308 -            /* Only check partitions on real discs (not virtual!). */
  25.309 -            if ( gd->flags[minor>>gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  25.310 -            {
  25.311 -                printk(KERN_ALERT
  25.312 -                       "Skipping partition check on virtual /dev/%s\n",
  25.313 -                       disk_name(gd, MINOR(device), buf));
  25.314 -                break;
  25.315 -            }
  25.316 -            register_disk(gd, device, gd->max_p, &xlvbd_block_fops, capacity);
  25.317 -        }
  25.318 -    }
  25.319 -
  25.320 - out:
  25.321 -    bdput(bd);    
  25.322 -    return rc;
  25.323 -}
  25.324 -
  25.325 -
  25.326 -/*
  25.327 - * xlvbd_remove_device - remove a device node if possible
  25.328 - * @device:       numeric device ID
  25.329 - *
  25.330 - * Updates the gendisk structure and invalidates devices.
  25.331 - *
  25.332 - * This is OK for now but in future, should perhaps consider where this should
  25.333 - * deallocate gendisks / unregister devices.
  25.334 - */
  25.335 -static int xlvbd_remove_device(int device)
  25.336 -{
  25.337 -    int i, rc = 0, minor = MINOR(device);
  25.338 -    struct gendisk *gd;
  25.339 -    struct block_device *bd;
  25.340 -    xl_disk_t *disk = NULL;
  25.341 -
  25.342 -    if ( (bd = bdget(device)) == NULL )
  25.343 -        return -1;
  25.344 -
  25.345 -    if ( ((gd = get_gendisk(device)) == NULL) ||
  25.346 -         ((disk = xldev_to_xldisk(device)) == NULL) )
  25.347 -        BUG();
  25.348 -
  25.349 -    if ( disk->usage != 0 )
  25.350 -    {
  25.351 -        printk(KERN_ALERT "VBD removal failed - in use [dev=%x]\n", device);
  25.352 -        rc = -1;
  25.353 -        goto out;
  25.354 -    }
  25.355 - 
  25.356 -    if ( (minor & (gd->max_p-1)) != 0 )
  25.357 -    {
  25.358 -        /* 1: The VBD is mapped to a partition rather than a whole unit. */
  25.359 -        invalidate_device(device, 1);
  25.360 -	gd->part[minor].start_sect = 0;
  25.361 -        gd->part[minor].nr_sects   = 0;
  25.362 -        gd->sizes[minor]           = 0;
  25.363 -
  25.364 -        /* Clear the consists-of-virtual-partitions flag if possible. */
  25.365 -        gd->flags[minor >> gd->minor_shift] &= ~GENHD_FL_VIRT_PARTNS;
  25.366 -        for ( i = 1; i < gd->max_p; i++ )
  25.367 -            if ( gd->sizes[(minor & ~(gd->max_p-1)) + i] != 0 )
  25.368 -                gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  25.369 -
  25.370 -        /*
  25.371 -         * If all virtual partitions are now gone, and a 'whole unit' VBD is
  25.372 -         * present, then we can try to grok the unit's real partition table.
  25.373 -         */
  25.374 -        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  25.375 -             (gd->sizes[minor & ~(gd->max_p-1)] != 0) &&
  25.376 -             !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_REMOVABLE) )
  25.377 -        {
  25.378 -            register_disk(gd,
  25.379 -                          device&~(gd->max_p-1), 
  25.380 -                          gd->max_p, 
  25.381 -                          &xlvbd_block_fops,
  25.382 -                          gd->part[minor&~(gd->max_p-1)].nr_sects);
  25.383 -        }
  25.384 -    }
  25.385 -    else
  25.386 -    {
  25.387 -        /*
  25.388 -         * 2: The VBD is mapped to an entire 'unit'. Clear all partitions.
  25.389 -         * NB. The partition entries are only cleared if there are no VBDs
  25.390 -         * mapped to individual partitions on this unit.
  25.391 -         */
  25.392 -        i = gd->max_p - 1; /* Default: clear subpartitions as well. */
  25.393 -        if ( gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  25.394 -            i = 0; /* 'Virtual' mode: only clear the 'whole unit' entry. */
  25.395 -        while ( i >= 0 )
  25.396 -        {
  25.397 -            invalidate_device(device+i, 1);
  25.398 -            gd->part[minor+i].start_sect = 0;
  25.399 -            gd->part[minor+i].nr_sects   = 0;
  25.400 -            gd->sizes[minor+i]           = 0;
  25.401 -            i--;
  25.402 -        }
  25.403 -    }
  25.404 -
  25.405 - out:
  25.406 -    bdput(bd);
  25.407 -    return rc;
  25.408 -}
  25.409 -
  25.410 -/*
  25.411 - * xlvbd_update_vbds - reprobes the VBD status and performs updates driver
  25.412 - * state. The VBDs need to be updated in this way when the domain is
  25.413 - * initialised and also each time we receive an XLBLK_UPDATE event.
  25.414 - */
  25.415 -void xlvbd_update_vbds(void)
  25.416 -{
  25.417 -    int i, j, k, old_nr, new_nr;
  25.418 -    vdisk_t *old_info, *new_info, *merged_info;
  25.419 -
  25.420 -    old_info = vbd_info;
  25.421 -    old_nr   = nr_vbds;
  25.422 -
  25.423 -    new_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  25.424 -    if (!new_info)
  25.425 -        return;
  25.426 -
  25.427 -    if ( unlikely(new_nr = xlvbd_get_vbd_info(new_info)) < 0 )
  25.428 -        goto out;
  25.429 -
  25.430 -    /*
  25.431 -     * Final list maximum size is old list + new list. This occurs only when
  25.432 -     * old list and new list do not overlap at all, and we cannot yet destroy
  25.433 -     * VBDs in the old list because the usage counts are busy.
  25.434 -     */
  25.435 -    merged_info = kmalloc((old_nr + new_nr) * sizeof(vdisk_t), GFP_KERNEL);
  25.436 -    if (!merged_info)
  25.437 -        goto out;
  25.438 -
  25.439 -    /* @i tracks old list; @j tracks new list; @k tracks merged list. */
  25.440 -    i = j = k = 0;
  25.441 -
  25.442 -    while ( (i < old_nr) && (j < new_nr) )
  25.443 -    {
  25.444 -        if ( old_info[i].device < new_info[j].device )
  25.445 -        {
  25.446 -            if ( xlvbd_remove_device(old_info[i].device) != 0 )
  25.447 -                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  25.448 -            i++;
  25.449 -        }
  25.450 -        else if ( old_info[i].device > new_info[j].device )
  25.451 -        {
  25.452 -            if ( xlvbd_init_device(&new_info[j]) == 0 )
  25.453 -                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  25.454 -            j++;
  25.455 -        }
  25.456 -        else
  25.457 -        {
  25.458 -            if ( ((old_info[i].capacity == new_info[j].capacity) &&
  25.459 -                  (old_info[i].info == new_info[j].info)) ||
  25.460 -                 (xlvbd_remove_device(old_info[i].device) != 0) )
  25.461 -                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  25.462 -            else if ( xlvbd_init_device(&new_info[j]) == 0 )
  25.463 -                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  25.464 -            i++; j++;
  25.465 -        }
  25.466 -    }
  25.467 -
  25.468 -    for ( ; i < old_nr; i++ )
  25.469 -    {
  25.470 -        if ( xlvbd_remove_device(old_info[i].device) != 0 )
  25.471 -            memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  25.472 -    }
  25.473 -
  25.474 -    for ( ; j < new_nr; j++ )
  25.475 -    {
  25.476 -        if ( xlvbd_init_device(&new_info[j]) == 0 )
  25.477 -            memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  25.478 -    }
  25.479 -
  25.480 -    vbd_info = merged_info;
  25.481 -    nr_vbds  = k;
  25.482 -
  25.483 -    kfree(old_info);
  25.484 -out:
  25.485 -    kfree(new_info);
  25.486 -}
  25.487 -
  25.488 -
  25.489 -/*
  25.490 - * Set up all the linux device goop for the virtual block devices (vbd's) that
  25.491 - * we know about. Note that although from the backend driver's p.o.v. VBDs are
  25.492 - * addressed simply an opaque 16-bit device number, the domain creation tools 
  25.493 - * conventionally allocate these numbers to correspond to those used by 'real' 
  25.494 - * linux -- this is just for convenience as it means e.g. that the same 
  25.495 - * /etc/fstab can be used when booting with or without Xen.
  25.496 - */
  25.497 -int xlvbd_init(void)
  25.498 -{
  25.499 -    int i;
  25.500 -    
  25.501 -    /*
  25.502 -     * If compiled as a module, we don't support unloading yet. We therefore 
  25.503 -     * permanently increment the reference count to disallow it.
  25.504 -     */
  25.505 -    SET_MODULE_OWNER(&xlvbd_block_fops);
  25.506 -    MOD_INC_USE_COUNT;
  25.507 -
  25.508 -    /* Initialize the global arrays. */
  25.509 -    for ( i = 0; i < 256; i++ ) 
  25.510 -    {
  25.511 -        xlide_blksize_size[i]  = 1024;
  25.512 -        xlide_hardsect_size[i] = 512;
  25.513 -        xlide_max_sectors[i]   = 512;
  25.514 -
  25.515 -        xlscsi_blksize_size[i]  = 1024;
  25.516 -        xlscsi_hardsect_size[i] = 512;
  25.517 -        xlscsi_max_sectors[i]   = 512;
  25.518 -
  25.519 -        xlvbd_blksize_size[i]  = 512;
  25.520 -        xlvbd_hardsect_size[i] = 512;
  25.521 -        xlvbd_max_sectors[i]   = 512;
  25.522 -    }
  25.523 -
  25.524 -    vbd_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  25.525 -    if (!vbd_info)
  25.526 -        return -ENOMEM;
  25.527 -
  25.528 -    nr_vbds  = xlvbd_get_vbd_info(vbd_info);
  25.529 -
  25.530 -    if ( nr_vbds < 0 )
  25.531 -    {
  25.532 -        kfree(vbd_info);
  25.533 -        vbd_info = NULL;
  25.534 -        nr_vbds  = 0;
  25.535 -    }
  25.536 -    else
  25.537 -    {
  25.538 -        for ( i = 0; i < nr_vbds; i++ )
  25.539 -            xlvbd_init_device(&vbd_info[i]);
  25.540 -    }
  25.541 -
  25.542 -    return 0;
  25.543 -}
    26.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/console/Makefile	Sat Oct 08 11:37:45 2005 -0600
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,3 +0,0 @@
    26.4 -O_TARGET := drv.o
    26.5 -obj-$(CONFIG_XEN_CONSOLE) := console.o
    26.6 -include $(TOPDIR)/Rules.make
    27.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/dom0/Makefile	Sat Oct 08 11:37:45 2005 -0600
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,3 +0,0 @@
    27.4 -O_TARGET := drv.o
    27.5 -obj-y := core.o
    27.6 -include $(TOPDIR)/Rules.make
    28.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/evtchn/Makefile	Sat Oct 08 11:37:45 2005 -0600
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,3 +0,0 @@
    28.4 -O_TARGET := drv.o
    28.5 -obj-y := evtchn.o
    28.6 -include $(TOPDIR)/Rules.make
    29.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/netif/Makefile	Sat Oct 08 11:37:45 2005 -0600
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,10 +0,0 @@
    29.4 -
    29.5 -O_TARGET := drv.o
    29.6 -
    29.7 -subdir-$(CONFIG_XEN_NETDEV_FRONTEND) += frontend
    29.8 -obj-$(CONFIG_XEN_NETDEV_FRONTEND)    += frontend/drv.o
    29.9 -
   29.10 -subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
   29.11 -obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
   29.12 -
   29.13 -include $(TOPDIR)/Rules.make
    30.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/netif/backend/Makefile	Sat Oct 08 11:37:45 2005 -0600
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,4 +0,0 @@
    30.4 -O_TARGET := drv.o
    30.5 -export-objs := interface.o
    30.6 -obj-y := main.o control.o interface.o
    30.7 -include $(TOPDIR)/Rules.make
    31.1 --- a/linux-2.4-xen-sparse/arch/xen/drivers/netif/frontend/Makefile	Sat Oct 08 11:37:45 2005 -0600
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,3 +0,0 @@
    31.4 -O_TARGET := drv.o
    31.5 -obj-y := main.o
    31.6 -include $(TOPDIR)/Rules.make
    32.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/Makefile	Sat Oct 08 11:37:45 2005 -0600
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,20 +0,0 @@
    32.4 -
    32.5 -.S.o:
    32.6 -	$(CC) $(AFLAGS) -traditional -c $< -o $*.o
    32.7 -
    32.8 -all: kernel.o head.o init_task.o
    32.9 -
   32.10 -O_TARGET := kernel.o
   32.11 -
   32.12 -export-objs     := i386_ksyms.o gnttab.o skbuff.o ctrl_if.o
   32.13 -
   32.14 -obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o  \
   32.15 -		ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o \
   32.16 -		i386_ksyms.o i387.o evtchn.o ctrl_if.o pci-dma.o \
   32.17 -		reboot.o fixup.o gnttab.o skbuff.o
   32.18 -
   32.19 -ifdef CONFIG_PCI
   32.20 -obj-y	+= pci-i386.o pci-pc.o
   32.21 -endif
   32.22 -
   32.23 -include $(TOPDIR)/Rules.make
    33.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/entry.S	Sat Oct 08 11:37:45 2005 -0600
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,779 +0,0 @@
    33.4 -/*
    33.5 - *  linux/arch/i386/entry.S
    33.6 - *
    33.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    33.8 - */
    33.9 -
   33.10 -/*
   33.11 - * entry.S contains the system-call and fault low-level handling routines.
   33.12 - * This also contains the timer-interrupt handler, as well as all interrupts
   33.13 - * and faults that can result in a task-switch.
   33.14 - *
   33.15 - * NOTE: This code handles signal-recognition, which happens every time
   33.16 - * after a timer-interrupt and after each system call.
   33.17 - *
   33.18 - * I changed all the .align's to 4 (16 byte alignment), as that's faster
   33.19 - * on a 486.
   33.20 - *
   33.21 - * Stack layout in 'ret_to_user':
   33.22 - * 	ptrace needs to have all regs on the stack.
   33.23 - *	if the order here is changed, it needs to be
   33.24 - *	updated in fork.c:copy_process, signal.c:do_signal,
   33.25 - *	ptrace.c and ptrace.h
   33.26 - *
   33.27 - *	 0(%esp) - %ebx
   33.28 - *	 4(%esp) - %ecx
   33.29 - *	 8(%esp) - %edx
   33.30 - *       C(%esp) - %esi
   33.31 - *	10(%esp) - %edi
   33.32 - *	14(%esp) - %ebp
   33.33 - *	18(%esp) - %eax
   33.34 - *	1C(%esp) - %ds
   33.35 - *	20(%esp) - %es
   33.36 - *	24(%esp) - orig_eax
   33.37 - *	28(%esp) - %eip
   33.38 - *	2C(%esp) - %cs
   33.39 - *	30(%esp) - %eflags
   33.40 - *	34(%esp) - %oldesp
   33.41 - *	38(%esp) - %oldss
   33.42 - *
   33.43 - * "current" is in register %ebx during any slow entries.
   33.44 - */
   33.45 -
   33.46 -#include <linux/config.h>
   33.47 -#include <linux/sys.h>
   33.48 -#include <linux/linkage.h>
   33.49 -#include <asm/segment.h>
   33.50 -#include <asm/smp.h>
   33.51 -
   33.52 -EBX		= 0x00
   33.53 -ECX		= 0x04
   33.54 -EDX		= 0x08
   33.55 -ESI		= 0x0C
   33.56 -EDI		= 0x10
   33.57 -EBP		= 0x14
   33.58 -EAX		= 0x18
   33.59 -DS		= 0x1C
   33.60 -ES		= 0x20
   33.61 -ORIG_EAX	= 0x24
   33.62 -EIP		= 0x28
   33.63 -CS		= 0x2C
   33.64 -EFLAGS		= 0x30
   33.65 -OLDESP		= 0x34
   33.66 -OLDSS		= 0x38
   33.67 -
   33.68 -CF_MASK		= 0x00000001
   33.69 -TF_MASK		= 0x00000100
   33.70 -IF_MASK		= 0x00000200
   33.71 -DF_MASK		= 0x00000400
   33.72 -NT_MASK		= 0x00004000
   33.73 -
   33.74 -/* Offsets into task_struct. */
   33.75 -state		=  0
   33.76 -flags		=  4
   33.77 -sigpending	=  8
   33.78 -addr_limit	= 12
   33.79 -exec_domain	= 16
   33.80 -need_resched	= 20
   33.81 -tsk_ptrace	= 24
   33.82 -processor	= 52
   33.83 -
   33.84 -/* Offsets into shared_info_t. */
   33.85 -#define evtchn_upcall_pending /* 0 */
   33.86 -#define evtchn_upcall_mask       1
   33.87 -
   33.88 -ENOSYS = 38
   33.89 -
   33.90 -
   33.91 -#define SAVE_ALL \
   33.92 -	cld; \
   33.93 -	pushl %es; \
   33.94 -	pushl %ds; \
   33.95 -	pushl %eax; \
   33.96 -	pushl %ebp; \
   33.97 -	pushl %edi; \
   33.98 -	pushl %esi; \
   33.99 -	pushl %edx; \
  33.100 -	pushl %ecx; \
  33.101 -	pushl %ebx; \
  33.102 -	movl $(__KERNEL_DS),%edx; \
  33.103 -	movl %edx,%ds; \
  33.104 -	movl %edx,%es;
  33.105 -
  33.106 -#define RESTORE_ALL	\
  33.107 -	popl %ebx;	\
  33.108 -	popl %ecx;	\
  33.109 -	popl %edx;	\
  33.110 -	popl %esi;	\
  33.111 -	popl %edi;	\
  33.112 -	popl %ebp;	\
  33.113 -	popl %eax;	\
  33.114 -1:	popl %ds;	\
  33.115 -2:	popl %es;	\
  33.116 -	addl $4,%esp;	\
  33.117 -3:	iret;		\
  33.118 -.section .fixup,"ax";	\
  33.119 -4:	movl $0,(%esp);	\
  33.120 -	jmp 1b;		\
  33.121 -5:	movl $0,(%esp);	\
  33.122 -	jmp 2b;		\
  33.123 -6:	pushl %ss;	\
  33.124 -	popl %ds;	\
  33.125 -	pushl %ss;	\
  33.126 -	popl %es;	\
  33.127 -	pushl $11;	\
  33.128 -	call do_exit;	\
  33.129 -.previous;		\
  33.130 -.section __ex_table,"a";\
  33.131 -	.align 4;	\
  33.132 -	.long 1b,4b;	\
  33.133 -	.long 2b,5b;	\
  33.134 -	.long 3b,6b;	\
  33.135 -.previous
  33.136 -
  33.137 -#define GET_CURRENT(reg) \
  33.138 -	movl $-8192, reg; \
  33.139 -	andl %esp, reg
  33.140 -
  33.141 -ENTRY(lcall7)
  33.142 -	pushfl			# We get a different stack layout with call
  33.143 -	pushl %eax		# gates, which has to be cleaned up later..
  33.144 -	SAVE_ALL
  33.145 -	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
  33.146 -	movl CS(%esp),%edx	# this is eip..
  33.147 -	movl EFLAGS(%esp),%ecx	# and this is cs..
  33.148 -	movl %eax,EFLAGS(%esp)	#
  33.149 -	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
  33.150 -	pushl %eax
  33.151 -	popfl
  33.152 -	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  33.153 -	movl %ecx,CS(%esp)	#
  33.154 -	movl %esp,%ebx
  33.155 -	pushl %ebx
  33.156 -	andl $-8192,%ebx	# GET_CURRENT
  33.157 -	movl exec_domain(%ebx),%edx	# Get the execution domain
  33.158 -	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
  33.159 -	pushl $0x7
  33.160 -	call *%edx
  33.161 -	addl $4, %esp
  33.162 -	popl %eax
  33.163 -	jmp ret_to_user
  33.164 -
  33.165 -ENTRY(lcall27)
  33.166 -	pushfl			# We get a different stack layout with call
  33.167 -	pushl %eax		# gates, which has to be cleaned up later..
  33.168 -	SAVE_ALL
  33.169 -	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
  33.170 -	movl CS(%esp),%edx	# this is eip..
  33.171 -	movl EFLAGS(%esp),%ecx	# and this is cs..
  33.172 -	movl %eax,EFLAGS(%esp)	#
  33.173 -	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
  33.174 -	pushl %eax
  33.175 -	popfl
  33.176 -	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  33.177 -	movl %ecx,CS(%esp)	#
  33.178 -	movl %esp,%ebx
  33.179 -	pushl %ebx
  33.180 -	andl $-8192,%ebx	# GET_CURRENT
  33.181 -	movl exec_domain(%ebx),%edx	# Get the execution domain
  33.182 -	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
  33.183 -	pushl $0x27
  33.184 -	call *%edx
  33.185 -	addl $4, %esp
  33.186 -	popl %eax
  33.187 -	jmp ret_to_user
  33.188 -
  33.189 -ENTRY(ret_from_fork)
  33.190 -	pushl %ebx
  33.191 -	call SYMBOL_NAME(schedule_tail)
  33.192 -	addl $4, %esp
  33.193 -	GET_CURRENT(%ebx)
  33.194 -	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  33.195 -	jne tracesys_exit
  33.196 -	jmp ret_to_user
  33.197 -
  33.198 -/*
  33.199 - * Return to user mode is not as complex as all this looks,
  33.200 - * but we want the default path for a system call return to
  33.201 - * go as quickly as possible which is why some of this is
  33.202 - * less clear than it otherwise should be.
  33.203 - */
  33.204 -ENTRY(system_call)
  33.205 -	pushl %eax			# save orig_eax
  33.206 -	SAVE_ALL
  33.207 -	GET_CURRENT(%ebx)
  33.208 -	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  33.209 -	jne tracesys
  33.210 -	cmpl $(NR_syscalls),%eax
  33.211 -	jae badsys
  33.212 -	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  33.213 -	movl %eax,EAX(%esp)		# save the return value
  33.214 -ret_to_user:
  33.215 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  33.216 -        movb $1,evtchn_upcall_mask(%esi) # make tests atomic
  33.217 -ret_to_user_nocli:
  33.218 -	cmpl $0,need_resched(%ebx)
  33.219 -	jne  reschedule
  33.220 -	cmpl $0,sigpending(%ebx)
  33.221 -	je   safesti                    # ensure need_resched updates are seen
  33.222 -/*signal_return:*/
  33.223 -	movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
  33.224 -	movl %esp,%eax
  33.225 -	xorl %edx,%edx
  33.226 -	call SYMBOL_NAME(do_signal)
  33.227 -	jmp  safesti
  33.228 -
  33.229 -	ALIGN
  33.230 -restore_all:
  33.231 -	RESTORE_ALL
  33.232 -
  33.233 -	ALIGN
  33.234 -tracesys:
  33.235 -	movl $-ENOSYS,EAX(%esp)
  33.236 -	call SYMBOL_NAME(syscall_trace)
  33.237 -	movl ORIG_EAX(%esp),%eax
  33.238 -	cmpl $(NR_syscalls),%eax
  33.239 -	jae tracesys_exit
  33.240 -	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  33.241 -	movl %eax,EAX(%esp)		# save the return value
  33.242 -tracesys_exit:
  33.243 -	call SYMBOL_NAME(syscall_trace)
  33.244 -	jmp ret_to_user
  33.245 -badsys:
  33.246 -	movl $-ENOSYS,EAX(%esp)
  33.247 -	jmp ret_to_user
  33.248 -
  33.249 -	ALIGN
  33.250 -ENTRY(ret_from_intr)
  33.251 -	GET_CURRENT(%ebx)
  33.252 -ret_from_exception:
  33.253 -	movb CS(%esp),%al
  33.254 -	testl $2,%eax
  33.255 -	jne ret_to_user
  33.256 -	jmp restore_all
  33.257 -
  33.258 -	ALIGN
  33.259 -reschedule:
  33.260 -        movb $0,evtchn_upcall_mask(%esi)  # reenable event callbacks
  33.261 -	call SYMBOL_NAME(schedule)        # test
  33.262 -	jmp  ret_to_user
  33.263 -
  33.264 -ENTRY(divide_error)
  33.265 -	pushl $0		# no error code
  33.266 -	pushl $ SYMBOL_NAME(do_divide_error)
  33.267 -	ALIGN
  33.268 -error_code:
  33.269 -	pushl %ds
  33.270 -	pushl %eax
  33.271 -	xorl %eax,%eax
  33.272 -	pushl %ebp
  33.273 -	pushl %edi
  33.274 -	pushl %esi
  33.275 -	pushl %edx
  33.276 -	decl %eax			# eax = -1
  33.277 -	pushl %ecx
  33.278 -	pushl %ebx
  33.279 -	GET_CURRENT(%ebx)
  33.280 -	cld
  33.281 -	movl %es,%ecx
  33.282 -	movl ORIG_EAX(%esp), %esi	# get the error code
  33.283 -	movl ES(%esp), %edi		# get the function address
  33.284 -	movl %eax, ORIG_EAX(%esp)
  33.285 -	movl %ecx, ES(%esp)
  33.286 -	movl %esp,%edx
  33.287 -	pushl %esi			# push the error code
  33.288 -	pushl %edx			# push the pt_regs pointer
  33.289 -	movl $(__KERNEL_DS),%edx
  33.290 -	movl %edx,%ds
  33.291 -	movl %edx,%es
  33.292 -	call *%edi
  33.293 -	addl $8,%esp
  33.294 -	jmp ret_from_exception
  33.295 -
  33.296 -# A note on the "critical region" in our callback handler.
  33.297 -# We want to avoid stacking callback handlers due to events occurring
  33.298 -# during handling of the last event. To do this, we keep events disabled
  33.299 -# until we've done all processing. HOWEVER, we must enable events before
  33.300 -# popping the stack frame (can't be done atomically) and so it would still
  33.301 -# be possible to get enough handler activations to overflow the stack.
  33.302 -# Although unlikely, bugs of that kind are hard to track down, so we'd
  33.303 -# like to avoid the possibility.
  33.304 -# So, on entry to the handler we detect whether we interrupted an
  33.305 -# existing activation in its critical region -- if so, we pop the current
  33.306 -# activation and restart the handler using the previous one.
  33.307 -ENTRY(hypervisor_callback)
  33.308 -        pushl %eax
  33.309 -        SAVE_ALL
  33.310 -        GET_CURRENT(%ebx)
  33.311 -        movl EIP(%esp),%eax
  33.312 -        cmpl $scrit,%eax
  33.313 -        jb   11f
  33.314 -        cmpl $ecrit,%eax
  33.315 -        jb   critical_region_fixup
  33.316 -11:     push %esp
  33.317 -        call evtchn_do_upcall
  33.318 -        add  $4,%esp
  33.319 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  33.320 -        movb CS(%esp),%cl
  33.321 -	test $2,%cl          # slow return to ring 2 or 3
  33.322 -	jne  ret_to_user_nocli
  33.323 -safesti:movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
  33.324 -scrit:  /**** START OF CRITICAL REGION ****/
  33.325 -        testb $0xFF,evtchn_upcall_pending(%esi)
  33.326 -        jnz  14f              # process more events if necessary...
  33.327 -        RESTORE_ALL
  33.328 -14:     movb $1,evtchn_upcall_mask(%esi)
  33.329 -        jmp  11b
  33.330 -ecrit:  /**** END OF CRITICAL REGION ****/
  33.331 -# [How we do the fixup]. We want to merge the current stack frame with the
  33.332 -# just-interrupted frame. How we do this depends on where in the critical
  33.333 -# region the interrupted handler was executing, and so how many saved
  33.334 -# registers are in each frame. We do this quickly using the lookup table
  33.335 -# 'critical_fixup_table'. For each byte offset in the critical region, it
  33.336 -# provides the number of bytes which have already been popped from the
  33.337 -# interrupted stack frame. 
  33.338 -critical_region_fixup:
  33.339 -        addl $critical_fixup_table-scrit,%eax
  33.340 -        movzbl (%eax),%eax    # %eax contains num bytes popped
  33.341 -        mov  %esp,%esi
  33.342 -        add  %eax,%esi        # %esi points at end of src region
  33.343 -        mov  %esp,%edi
  33.344 -        add  $0x34,%edi       # %edi points at end of dst region
  33.345 -        mov  %eax,%ecx
  33.346 -        shr  $2,%ecx          # convert words to bytes
  33.347 -        je   16f              # skip loop if nothing to copy
  33.348 -15:     subl $4,%esi          # pre-decrementing copy loop
  33.349 -        subl $4,%edi
  33.350 -        movl (%esi),%eax
  33.351 -        movl %eax,(%edi)
  33.352 -        loop 15b
  33.353 -16:     movl %edi,%esp        # final %edi is top of merged stack
  33.354 -        jmp  11b
  33.355 -        
  33.356 -critical_fixup_table:        
  33.357 -        .byte 0x00,0x00,0x00                  # testb $0xFF,(%esi)
  33.358 -        .byte 0x00,0x00                       # jnz  14f
  33.359 -        .byte 0x00                            # pop  %ebx
  33.360 -        .byte 0x04                            # pop  %ecx
  33.361 -        .byte 0x08                            # pop  %edx
  33.362 -        .byte 0x0c                            # pop  %esi
  33.363 -        .byte 0x10                            # pop  %edi
  33.364 -        .byte 0x14                            # pop  %ebp
  33.365 -        .byte 0x18                            # pop  %eax
  33.366 -        .byte 0x1c                            # pop  %ds
  33.367 -        .byte 0x20                            # pop  %es
  33.368 -        .byte 0x24,0x24,0x24                  # add  $4,%esp
  33.369 -        .byte 0x28                            # iret
  33.370 -        .byte 0x00,0x00,0x00,0x00             # movb $1,4(%esi)
  33.371 -        .byte 0x00,0x00                       # jmp  11b
  33.372 -
  33.373 -# Hypervisor uses this for application faults while it executes.
  33.374 -ENTRY(failsafe_callback)
  33.375 -1:      popl %ds
  33.376 -2:      popl %es
  33.377 -3:      popl %fs
  33.378 -4:      popl %gs
  33.379 -5:      iret
  33.380 -.section .fixup,"ax";	\
  33.381 -6:	movl $0,(%esp);	\
  33.382 -	jmp 1b;		\
  33.383 -7:	movl $0,(%esp);	\
  33.384 -	jmp 2b;		\
  33.385 -8:	movl $0,(%esp);	\
  33.386 -	jmp 3b;		\
  33.387 -9:	movl $0,(%esp);	\
  33.388 -	jmp 4b;		\
  33.389 -10:	pushl %ss;	\
  33.390 -	popl %ds;	\
  33.391 -	pushl %ss;	\
  33.392 -	popl %es;	\
  33.393 -	pushl $11;	\
  33.394 -	call do_exit;	\
  33.395 -.previous;		\
  33.396 -.section __ex_table,"a";\
  33.397 -	.align 4;	\
  33.398 -	.long 1b,6b;	\
  33.399 -	.long 2b,7b;	\
  33.400 -	.long 3b,8b;	\
  33.401 -	.long 4b,9b;	\
  33.402 -	.long 5b,10b;	\
  33.403 -.previous
  33.404 -        
  33.405 -ENTRY(coprocessor_error)
  33.406 -	pushl $0
  33.407 -	pushl $ SYMBOL_NAME(do_coprocessor_error)
  33.408 -	jmp error_code
  33.409 -
  33.410 -ENTRY(simd_coprocessor_error)
  33.411 -	pushl $0
  33.412 -	pushl $ SYMBOL_NAME(do_simd_coprocessor_error)
  33.413 -	jmp error_code
  33.414 -
  33.415 -ENTRY(device_not_available)
  33.416 -	pushl $-1		# mark this as an int
  33.417 -	SAVE_ALL
  33.418 -	GET_CURRENT(%ebx)
  33.419 -	call SYMBOL_NAME(math_state_restore)
  33.420 -	jmp ret_from_exception
  33.421 -
  33.422 -ENTRY(debug)
  33.423 -	pushl $0
  33.424 -	pushl $ SYMBOL_NAME(do_debug)
  33.425 -	jmp error_code
  33.426 -
  33.427 -ENTRY(int3)
  33.428 -	pushl $0
  33.429 -	pushl $ SYMBOL_NAME(do_int3)
  33.430 -	jmp error_code
  33.431 -
  33.432 -ENTRY(overflow)
  33.433 -	pushl $0
  33.434 -	pushl $ SYMBOL_NAME(do_overflow)
  33.435 -	jmp error_code
  33.436 -
  33.437 -ENTRY(bounds)
  33.438 -	pushl $0
  33.439 -	pushl $ SYMBOL_NAME(do_bounds)
  33.440 -	jmp error_code
  33.441 -
  33.442 -ENTRY(invalid_op)
  33.443 -	pushl $0
  33.444 -	pushl $ SYMBOL_NAME(do_invalid_op)
  33.445 -	jmp error_code
  33.446 -
  33.447 -ENTRY(coprocessor_segment_overrun)
  33.448 -	pushl $0
  33.449 -	pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
  33.450 -	jmp error_code
  33.451 -
  33.452 -ENTRY(double_fault)
  33.453 -	pushl $ SYMBOL_NAME(do_double_fault)
  33.454 -	jmp error_code
  33.455 -
  33.456 -ENTRY(invalid_TSS)
  33.457 -	pushl $ SYMBOL_NAME(do_invalid_TSS)
  33.458 -	jmp error_code
  33.459 -
  33.460 -ENTRY(segment_not_present)
  33.461 -	pushl $ SYMBOL_NAME(do_segment_not_present)
  33.462 -	jmp error_code
  33.463 -
  33.464 -ENTRY(stack_segment)
  33.465 -	pushl $ SYMBOL_NAME(do_stack_segment)
  33.466 -	jmp error_code
  33.467 -
  33.468 -ENTRY(general_protection)
  33.469 -	pushl $ SYMBOL_NAME(do_general_protection)
  33.470 -	jmp error_code
  33.471 -
  33.472 -ENTRY(alignment_check)
  33.473 -	pushl $ SYMBOL_NAME(do_alignment_check)
  33.474 -	jmp error_code
  33.475 -
  33.476 -# This handler is special, because it gets an extra value on its stack,
  33.477 -# which is the linear faulting address.
  33.478 -#define PAGE_FAULT_STUB(_name1, _name2)                                  \
  33.479 -ENTRY(_name1)                                                            \
  33.480 -	pushl %ds                                                      ; \
  33.481 -	pushl %eax                                                     ; \
  33.482 -	xorl %eax,%eax                                                 ; \
  33.483 -	pushl %ebp                                                     ; \
  33.484 -	pushl %edi                                                     ; \
  33.485 -	pushl %esi                                                     ; \
  33.486 -	pushl %edx                                                     ; \
  33.487 -	decl %eax                      /* eax = -1 */                  ; \
  33.488 -	pushl %ecx                                                     ; \
  33.489 -	pushl %ebx                                                     ; \
  33.490 -	GET_CURRENT(%ebx)                                              ; \
  33.491 -	cld                                                            ; \
  33.492 -	movl %es,%ecx                                                  ; \
  33.493 -	movl ORIG_EAX(%esp), %esi      /* get the error code */        ; \
  33.494 -	movl ES(%esp), %edi            /* get the faulting address */  ; \
  33.495 -	movl %eax, ORIG_EAX(%esp)                                      ; \
  33.496 -	movl %ecx, ES(%esp)                                            ; \
  33.497 -	movl %esp,%edx                                                 ; \
  33.498 -        pushl %edi                     /* push the faulting address */ ; \
  33.499 -	pushl %esi                     /* push the error code */       ; \
  33.500 -	pushl %edx                     /* push the pt_regs pointer */  ; \
  33.501 -	movl $(__KERNEL_DS),%edx                                       ; \
  33.502 -	movl %edx,%ds                                                  ; \
  33.503 -	movl %edx,%es                                                  ; \
  33.504 -	call SYMBOL_NAME(_name2)                                       ; \
  33.505 -	addl $12,%esp                                                  ; \
  33.506 -	jmp ret_from_exception                                         ;
  33.507 -PAGE_FAULT_STUB(page_fault, do_page_fault)
  33.508 -
  33.509 -ENTRY(machine_check)
  33.510 -	pushl $0
  33.511 -	pushl $ SYMBOL_NAME(do_machine_check)
  33.512 -	jmp error_code
  33.513 -
  33.514 -ENTRY(fixup_4gb_segment)
  33.515 -	pushl $ SYMBOL_NAME(do_fixup_4gb_segment)
  33.516 -	jmp error_code
  33.517 -
  33.518 -.data
  33.519 -ENTRY(sys_call_table)
  33.520 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 0  -  old "setup()" system call*/
  33.521 -	.long SYMBOL_NAME(sys_exit)
  33.522 -	.long SYMBOL_NAME(sys_fork)
  33.523 -	.long SYMBOL_NAME(sys_read)
  33.524 -	.long SYMBOL_NAME(sys_write)
  33.525 -	.long SYMBOL_NAME(sys_open)		/* 5 */
  33.526 -	.long SYMBOL_NAME(sys_close)
  33.527 -	.long SYMBOL_NAME(sys_waitpid)
  33.528 -	.long SYMBOL_NAME(sys_creat)
  33.529 -	.long SYMBOL_NAME(sys_link)
  33.530 -	.long SYMBOL_NAME(sys_unlink)		/* 10 */
  33.531 -	.long SYMBOL_NAME(sys_execve)
  33.532 -	.long SYMBOL_NAME(sys_chdir)
  33.533 -	.long SYMBOL_NAME(sys_time)
  33.534 -	.long SYMBOL_NAME(sys_mknod)
  33.535 -	.long SYMBOL_NAME(sys_chmod)		/* 15 */
  33.536 -	.long SYMBOL_NAME(sys_lchown16)
  33.537 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old break syscall holder */
  33.538 -	.long SYMBOL_NAME(sys_stat)
  33.539 -	.long SYMBOL_NAME(sys_lseek)
  33.540 -	.long SYMBOL_NAME(sys_getpid)		/* 20 */
  33.541 -	.long SYMBOL_NAME(sys_mount)
  33.542 -	.long SYMBOL_NAME(sys_oldumount)
  33.543 -	.long SYMBOL_NAME(sys_setuid16)
  33.544 -	.long SYMBOL_NAME(sys_getuid16)
  33.545 -	.long SYMBOL_NAME(sys_stime)		/* 25 */
  33.546 -	.long SYMBOL_NAME(sys_ptrace)
  33.547 -	.long SYMBOL_NAME(sys_alarm)
  33.548 -	.long SYMBOL_NAME(sys_fstat)
  33.549 -	.long SYMBOL_NAME(sys_pause)
  33.550 -	.long SYMBOL_NAME(sys_utime)		/* 30 */
  33.551 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old stty syscall holder */
  33.552 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old gtty syscall holder */
  33.553 -	.long SYMBOL_NAME(sys_access)
  33.554 -	.long SYMBOL_NAME(sys_nice)
  33.555 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 35 */		/* old ftime syscall holder */
  33.556 -	.long SYMBOL_NAME(sys_sync)
  33.557 -	.long SYMBOL_NAME(sys_kill)
  33.558 -	.long SYMBOL_NAME(sys_rename)
  33.559 -	.long SYMBOL_NAME(sys_mkdir)
  33.560 -	.long SYMBOL_NAME(sys_rmdir)		/* 40 */
  33.561 -	.long SYMBOL_NAME(sys_dup)
  33.562 -	.long SYMBOL_NAME(sys_pipe)
  33.563 -	.long SYMBOL_NAME(sys_times)
  33.564 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old prof syscall holder */
  33.565 -	.long SYMBOL_NAME(sys_brk)		/* 45 */
  33.566 -	.long SYMBOL_NAME(sys_setgid16)
  33.567 -	.long SYMBOL_NAME(sys_getgid16)
  33.568 -	.long SYMBOL_NAME(sys_signal)
  33.569 -	.long SYMBOL_NAME(sys_geteuid16)
  33.570 -	.long SYMBOL_NAME(sys_getegid16)	/* 50 */
  33.571 -	.long SYMBOL_NAME(sys_acct)
  33.572 -	.long SYMBOL_NAME(sys_umount)					/* recycled never used phys() */
  33.573 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old lock syscall holder */
  33.574 -	.long SYMBOL_NAME(sys_ioctl)
  33.575 -	.long SYMBOL_NAME(sys_fcntl)		/* 55 */
  33.576 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old mpx syscall holder */
  33.577 -	.long SYMBOL_NAME(sys_setpgid)
  33.578 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old ulimit syscall holder */
  33.579 -	.long SYMBOL_NAME(sys_olduname)
  33.580 -	.long SYMBOL_NAME(sys_umask)		/* 60 */
  33.581 -	.long SYMBOL_NAME(sys_chroot)
  33.582 -	.long SYMBOL_NAME(sys_ustat)
  33.583 -	.long SYMBOL_NAME(sys_dup2)
  33.584 -	.long SYMBOL_NAME(sys_getppid)
  33.585 -	.long SYMBOL_NAME(sys_getpgrp)		/* 65 */
  33.586 -	.long SYMBOL_NAME(sys_setsid)
  33.587 -	.long SYMBOL_NAME(sys_sigaction)
  33.588 -	.long SYMBOL_NAME(sys_sgetmask)
  33.589 -	.long SYMBOL_NAME(sys_ssetmask)
  33.590 -	.long SYMBOL_NAME(sys_setreuid16)	/* 70 */
  33.591 -	.long SYMBOL_NAME(sys_setregid16)
  33.592 -	.long SYMBOL_NAME(sys_sigsuspend)
  33.593 -	.long SYMBOL_NAME(sys_sigpending)
  33.594 -	.long SYMBOL_NAME(sys_sethostname)
  33.595 -	.long SYMBOL_NAME(sys_setrlimit)	/* 75 */
  33.596 -	.long SYMBOL_NAME(sys_old_getrlimit)
  33.597 -	.long SYMBOL_NAME(sys_getrusage)
  33.598 -	.long SYMBOL_NAME(sys_gettimeofday)
  33.599 -	.long SYMBOL_NAME(sys_settimeofday)
  33.600 -	.long SYMBOL_NAME(sys_getgroups16)	/* 80 */
  33.601 -	.long SYMBOL_NAME(sys_setgroups16)
  33.602 -	.long SYMBOL_NAME(old_select)
  33.603 -	.long SYMBOL_NAME(sys_symlink)
  33.604 -	.long SYMBOL_NAME(sys_lstat)
  33.605 -	.long SYMBOL_NAME(sys_readlink)		/* 85 */
  33.606 -	.long SYMBOL_NAME(sys_uselib)
  33.607 -	.long SYMBOL_NAME(sys_swapon)
  33.608 -	.long SYMBOL_NAME(sys_reboot)
  33.609 -	.long SYMBOL_NAME(old_readdir)
  33.610 -	.long SYMBOL_NAME(old_mmap)		/* 90 */
  33.611 -	.long SYMBOL_NAME(sys_munmap)
  33.612 -	.long SYMBOL_NAME(sys_truncate)
  33.613 -	.long SYMBOL_NAME(sys_ftruncate)
  33.614 -	.long SYMBOL_NAME(sys_fchmod)
  33.615 -	.long SYMBOL_NAME(sys_fchown16)		/* 95 */
  33.616 -	.long SYMBOL_NAME(sys_getpriority)
  33.617 -	.long SYMBOL_NAME(sys_setpriority)
  33.618 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old profil syscall holder */
  33.619 -	.long SYMBOL_NAME(sys_statfs)
  33.620 -	.long SYMBOL_NAME(sys_fstatfs)		/* 100 */
  33.621 -	.long SYMBOL_NAME(sys_ioperm)
  33.622 -	.long SYMBOL_NAME(sys_socketcall)
  33.623 -	.long SYMBOL_NAME(sys_syslog)
  33.624 -	.long SYMBOL_NAME(sys_setitimer)
  33.625 -	.long SYMBOL_NAME(sys_getitimer)	/* 105 */
  33.626 -	.long SYMBOL_NAME(sys_newstat)
  33.627 -	.long SYMBOL_NAME(sys_newlstat)
  33.628 -	.long SYMBOL_NAME(sys_newfstat)
  33.629 -	.long SYMBOL_NAME(sys_uname)
  33.630 -	.long SYMBOL_NAME(sys_iopl)		/* 110 */
  33.631 -	.long SYMBOL_NAME(sys_vhangup)
  33.632 -	.long SYMBOL_NAME(sys_ni_syscall)	/* old "idle" system call */
  33.633 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  33.634 -	.long SYMBOL_NAME(sys_wait4)
  33.635 -	.long SYMBOL_NAME(sys_swapoff)		/* 115 */
  33.636 -	.long SYMBOL_NAME(sys_sysinfo)
  33.637 -	.long SYMBOL_NAME(sys_ipc)
  33.638 -	.long SYMBOL_NAME(sys_fsync)
  33.639 -	.long SYMBOL_NAME(sys_sigreturn)
  33.640 -	.long SYMBOL_NAME(sys_clone)		/* 120 */
  33.641 -	.long SYMBOL_NAME(sys_setdomainname)
  33.642 -	.long SYMBOL_NAME(sys_newuname)
  33.643 -	.long SYMBOL_NAME(sys_modify_ldt)
  33.644 -	.long SYMBOL_NAME(sys_adjtimex)
  33.645 -	.long SYMBOL_NAME(sys_mprotect)		/* 125 */
  33.646 -	.long SYMBOL_NAME(sys_sigprocmask)
  33.647 -	.long SYMBOL_NAME(sys_create_module)
  33.648 -	.long SYMBOL_NAME(sys_init_module)
  33.649 -	.long SYMBOL_NAME(sys_delete_module)
  33.650 -	.long SYMBOL_NAME(sys_get_kernel_syms)	/* 130 */
  33.651 -	.long SYMBOL_NAME(sys_quotactl)
  33.652 -	.long SYMBOL_NAME(sys_getpgid)
  33.653 -	.long SYMBOL_NAME(sys_fchdir)
  33.654 -	.long SYMBOL_NAME(sys_bdflush)
  33.655 -	.long SYMBOL_NAME(sys_sysfs)		/* 135 */
  33.656 -	.long SYMBOL_NAME(sys_personality)
  33.657 -	.long SYMBOL_NAME(sys_ni_syscall)	/* for afs_syscall */
  33.658 -	.long SYMBOL_NAME(sys_setfsuid16)
  33.659 -	.long SYMBOL_NAME(sys_setfsgid16)
  33.660 -	.long SYMBOL_NAME(sys_llseek)		/* 140 */
  33.661 -	.long SYMBOL_NAME(sys_getdents)
  33.662 -	.long SYMBOL_NAME(sys_select)
  33.663 -	.long SYMBOL_NAME(sys_flock)
  33.664 -	.long SYMBOL_NAME(sys_msync)
  33.665 -	.long SYMBOL_NAME(sys_readv)		/* 145 */
  33.666 -	.long SYMBOL_NAME(sys_writev)
  33.667 -	.long SYMBOL_NAME(sys_getsid)
  33.668 -	.long SYMBOL_NAME(sys_fdatasync)
  33.669 -	.long SYMBOL_NAME(sys_sysctl)
  33.670 -	.long SYMBOL_NAME(sys_mlock)		/* 150 */
  33.671 -	.long SYMBOL_NAME(sys_munlock)
  33.672 -	.long SYMBOL_NAME(sys_mlockall)
  33.673 -	.long SYMBOL_NAME(sys_munlockall)
  33.674 -	.long SYMBOL_NAME(sys_sched_setparam)
  33.675 -	.long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
  33.676 -	.long SYMBOL_NAME(sys_sched_setscheduler)
  33.677 -	.long SYMBOL_NAME(sys_sched_getscheduler)
  33.678 -	.long SYMBOL_NAME(sys_sched_yield)
  33.679 -	.long SYMBOL_NAME(sys_sched_get_priority_max)
  33.680 -	.long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
  33.681 -	.long SYMBOL_NAME(sys_sched_rr_get_interval)
  33.682 -	.long SYMBOL_NAME(sys_nanosleep)
  33.683 -	.long SYMBOL_NAME(sys_mremap)
  33.684 -	.long SYMBOL_NAME(sys_setresuid16)
  33.685 -	.long SYMBOL_NAME(sys_getresuid16)	/* 165 */
  33.686 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  33.687 -	.long SYMBOL_NAME(sys_query_module)
  33.688 -	.long SYMBOL_NAME(sys_poll)
  33.689 -	.long SYMBOL_NAME(sys_nfsservctl)
  33.690 -	.long SYMBOL_NAME(sys_setresgid16)	/* 170 */
  33.691 -	.long SYMBOL_NAME(sys_getresgid16)
  33.692 -	.long SYMBOL_NAME(sys_prctl)
  33.693 -	.long SYMBOL_NAME(sys_rt_sigreturn)
  33.694 -	.long SYMBOL_NAME(sys_rt_sigaction)
  33.695 -	.long SYMBOL_NAME(sys_rt_sigprocmask)	/* 175 */
  33.696 -	.long SYMBOL_NAME(sys_rt_sigpending)
  33.697 -	.long SYMBOL_NAME(sys_rt_sigtimedwait)
  33.698 -	.long SYMBOL_NAME(sys_rt_sigqueueinfo)
  33.699 -	.long SYMBOL_NAME(sys_rt_sigsuspend)
  33.700 -	.long SYMBOL_NAME(sys_pread)		/* 180 */
  33.701 -	.long SYMBOL_NAME(sys_pwrite)
  33.702 -	.long SYMBOL_NAME(sys_chown16)
  33.703 -	.long SYMBOL_NAME(sys_getcwd)
  33.704 -	.long SYMBOL_NAME(sys_capget)
  33.705 -	.long SYMBOL_NAME(sys_capset)           /* 185 */
  33.706 -	.long SYMBOL_NAME(sys_sigaltstack)
  33.707 -	.long SYMBOL_NAME(sys_sendfile)
  33.708 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams1 */
  33.709 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams2 */
  33.710 -	.long SYMBOL_NAME(sys_vfork)            /* 190 */
  33.711 -	.long SYMBOL_NAME(sys_getrlimit)
  33.712 -	.long SYMBOL_NAME(sys_mmap2)
  33.713 -	.long SYMBOL_NAME(sys_truncate64)
  33.714 -	.long SYMBOL_NAME(sys_ftruncate64)
  33.715 -	.long SYMBOL_NAME(sys_stat64)		/* 195 */
  33.716 -	.long SYMBOL_NAME(sys_lstat64)
  33.717 -	.long SYMBOL_NAME(sys_fstat64)
  33.718 -	.long SYMBOL_NAME(sys_lchown)
  33.719 -	.long SYMBOL_NAME(sys_getuid)
  33.720 -	.long SYMBOL_NAME(sys_getgid)		/* 200 */
  33.721 -	.long SYMBOL_NAME(sys_geteuid)
  33.722 -	.long SYMBOL_NAME(sys_getegid)
  33.723 -	.long SYMBOL_NAME(sys_setreuid)
  33.724 -	.long SYMBOL_NAME(sys_setregid)
  33.725 -	.long SYMBOL_NAME(sys_getgroups)	/* 205 */
  33.726 -	.long SYMBOL_NAME(sys_setgroups)
  33.727 -	.long SYMBOL_NAME(sys_fchown)
  33.728 -	.long SYMBOL_NAME(sys_setresuid)
  33.729 -	.long SYMBOL_NAME(sys_getresuid)
  33.730 -	.long SYMBOL_NAME(sys_setresgid)	/* 210 */
  33.731 -	.long SYMBOL_NAME(sys_getresgid)
  33.732 -	.long SYMBOL_NAME(sys_chown)
  33.733 -	.long SYMBOL_NAME(sys_setuid)
  33.734 -	.long SYMBOL_NAME(sys_setgid)
  33.735 -	.long SYMBOL_NAME(sys_setfsuid)		/* 215 */
  33.736 -	.long SYMBOL_NAME(sys_setfsgid)
  33.737 -	.long SYMBOL_NAME(sys_pivot_root)
  33.738 -	.long SYMBOL_NAME(sys_mincore)
  33.739 -	.long SYMBOL_NAME(sys_madvise)
  33.740 -	.long SYMBOL_NAME(sys_getdents64)	/* 220 */
  33.741 -	.long SYMBOL_NAME(sys_fcntl64)
  33.742 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for TUX */
  33.743 -	.long SYMBOL_NAME(sys_ni_syscall)	/* Reserved for Security */
  33.744 -	.long SYMBOL_NAME(sys_gettid)
  33.745 -	.long SYMBOL_NAME(sys_readahead)	/* 225 */
  33.746 -	.long SYMBOL_NAME(sys_setxattr)
  33.747 -	.long SYMBOL_NAME(sys_lsetxattr)
  33.748 -	.long SYMBOL_NAME(sys_fsetxattr)
  33.749 -	.long SYMBOL_NAME(sys_getxattr)
  33.750 -	.long SYMBOL_NAME(sys_lgetxattr)	/* 230 */
  33.751 -	.long SYMBOL_NAME(sys_fgetxattr)
  33.752 -	.long SYMBOL_NAME(sys_listxattr)
  33.753 -	.long SYMBOL_NAME(sys_llistxattr)
  33.754 -	.long SYMBOL_NAME(sys_flistxattr)
  33.755 -	.long SYMBOL_NAME(sys_removexattr)	/* 235 */
  33.756 -	.long SYMBOL_NAME(sys_lremovexattr)
  33.757 -	.long SYMBOL_NAME(sys_fremovexattr)
  33.758 - 	.long SYMBOL_NAME(sys_tkill)
  33.759 -	.long SYMBOL_NAME(sys_sendfile64)
  33.760 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 240 reserved for futex */
  33.761 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_setaffinity */
  33.762 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_getaffinity */
  33.763 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_thread_area */
  33.764 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_get_thread_area */
  33.765 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 245 sys_io_setup */
  33.766 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_destroy */
  33.767 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_getevents */
  33.768 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_submit */
  33.769 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_cancel */
  33.770 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 250 sys_alloc_hugepages */
  33.771 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_free_hugepages */
  33.772 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_exit_group */
  33.773 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_lookup_dcookie */
  33.774 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_create */
  33.775 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_ctl 255 */
  33.776 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_wait */
  33.777 - 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_remap_file_pages */
  33.778 - 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_tid_address */
  33.779 -
  33.780 -	.rept NR_syscalls-(.-sys_call_table)/4
  33.781 -		.long SYMBOL_NAME(sys_ni_syscall)
  33.782 -	.endr
    34.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/head.S	Sat Oct 08 11:37:45 2005 -0600
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,41 +0,0 @@
    34.4 -
    34.5 -.section __xen_guest
    34.6 -    .ascii "GUEST_OS=linux,GUEST_VER=2.4,XEN_VER=3.0,VIRT_BASE=0xC0000000"
    34.7 -    .ascii ",LOADER=generic"
    34.8 -    .byte  0
    34.9 -
   34.10 -.text
   34.11 -#include <linux/config.h>
   34.12 -#include <linux/threads.h>
   34.13 -#include <linux/linkage.h>
   34.14 -#include <asm/segment.h>
   34.15 -#include <asm/page.h>
   34.16 -#include <asm/pgtable.h>
   34.17 -#include <asm/desc.h>
   34.18 -
   34.19 -ENTRY(stext)
   34.20 -ENTRY(_stext)
   34.21 -        cld
   34.22 -        lss stack_start,%esp
   34.23 -        /* Copy the necessary stuff from xen_start_info structure. */
   34.24 -        mov $SYMBOL_NAME(xen_start_info_union),%edi
   34.25 -        mov $128,%ecx
   34.26 -        rep movsl
   34.27 -        jmp SYMBOL_NAME(start_kernel)
   34.28 -
   34.29 -ENTRY(stack_start)
   34.30 -	.long SYMBOL_NAME(init_task_union)+8192, __KERNEL_DS
   34.31 -
   34.32 -.org 0x1000
   34.33 -ENTRY(empty_zero_page)
   34.34 -
   34.35 -.org 0x2000
   34.36 -ENTRY(default_ldt)
   34.37 -
   34.38 -.org 0x3000
   34.39 -ENTRY(cpu0_pte_quicklist)
   34.40 -
   34.41 -.org 0x3400
   34.42 -ENTRY(cpu0_pgd_quicklist)
   34.43 -        
   34.44 -.org 0x3800
    35.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/i386_ksyms.c	Sat Oct 08 11:37:45 2005 -0600
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,180 +0,0 @@
    35.4 -#include <linux/config.h>
    35.5 -#include <linux/module.h>
    35.6 -#include <linux/smp.h>
    35.7 -#include <linux/user.h>
    35.8 -#include <linux/elfcore.h>
    35.9 -#include <linux/mca.h>
   35.10 -#include <linux/sched.h>
   35.11 -#include <linux/in6.h>
   35.12 -#include <linux/interrupt.h>
   35.13 -#include <linux/smp_lock.h>
   35.14 -#include <linux/pm.h>
   35.15 -#include <linux/pci.h>
   35.16 -#include <linux/apm_bios.h>
   35.17 -#include <linux/kernel.h>
   35.18 -#include <linux/string.h>
   35.19 -#include <linux/tty.h>
   35.20 -
   35.21 -#include <asm/semaphore.h>
   35.22 -#include <asm/processor.h>
   35.23 -#include <asm/i387.h>
   35.24 -#include <asm/uaccess.h>
   35.25 -#include <asm/checksum.h>
   35.26 -#include <asm/io.h>
   35.27 -#include <asm/hardirq.h>
   35.28 -#include <asm/delay.h>
   35.29 -#include <asm/irq.h>
   35.30 -#include <asm/mmx.h>
   35.31 -#include <asm/desc.h>
   35.32 -#include <asm/pgtable.h>
   35.33 -#include <asm/pgalloc.h>
   35.34 -
   35.35 -extern void dump_thread(struct pt_regs *, struct user *);
   35.36 -extern spinlock_t rtc_lock;
   35.37 -
   35.38 -#if defined(CONFIG_APMXXX) || defined(CONFIG_APM_MODULEXXX)
   35.39 -extern void machine_real_restart(unsigned char *, int);
   35.40 -EXPORT_SYMBOL(machine_real_restart);
   35.41 -extern void default_idle(void);
   35.42 -EXPORT_SYMBOL(default_idle);
   35.43 -#endif
   35.44 -
   35.45 -#ifdef CONFIG_SMP
   35.46 -extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
   35.47 -extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
   35.48 -#endif
   35.49 -
   35.50 -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
   35.51 -extern struct drive_info_struct drive_info;
   35.52 -EXPORT_SYMBOL(drive_info);
   35.53 -#endif
   35.54 -
   35.55 -// XXX extern unsigned long get_cmos_time(void);
   35.56 -
   35.57 -/* platform dependent support */
   35.58 -EXPORT_SYMBOL(boot_cpu_data);
   35.59 -EXPORT_SYMBOL(dump_thread);
   35.60 -EXPORT_SYMBOL(dump_fpu);
   35.61 -EXPORT_SYMBOL(dump_extended_fpu);
   35.62 -EXPORT_SYMBOL(__ioremap);
   35.63 -EXPORT_SYMBOL(iounmap);
   35.64 -EXPORT_SYMBOL(enable_irq);
   35.65 -EXPORT_SYMBOL(disable_irq);
   35.66 -EXPORT_SYMBOL(disable_irq_nosync);
   35.67 -EXPORT_SYMBOL(probe_irq_mask);
   35.68 -EXPORT_SYMBOL(kernel_thread);
   35.69 -EXPORT_SYMBOL(pm_idle);
   35.70 -EXPORT_SYMBOL(pm_power_off);
   35.71 -EXPORT_SYMBOL(apm_info);
   35.72 -//EXPORT_SYMBOL(gdt);
   35.73 -EXPORT_SYMBOL(empty_zero_page);
   35.74 -EXPORT_SYMBOL(phys_to_machine_mapping);
   35.75 -
   35.76 -
   35.77 -#ifdef CONFIG_DEBUG_IOVIRT
   35.78 -EXPORT_SYMBOL(__io_virt_debug);
   35.79 -#endif
   35.80 -
   35.81 -EXPORT_SYMBOL_NOVERS(__down_failed);
   35.82 -EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
   35.83 -EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
   35.84 -EXPORT_SYMBOL_NOVERS(__up_wakeup);
   35.85 -/* Networking helper routines. */
   35.86 -EXPORT_SYMBOL(csum_partial_copy_generic);
   35.87 -/* Delay loops */
   35.88 -EXPORT_SYMBOL(__ndelay);
   35.89 -EXPORT_SYMBOL(__udelay);
   35.90 -EXPORT_SYMBOL(__delay);
   35.91 -EXPORT_SYMBOL(__const_udelay);
   35.92 -
   35.93 -EXPORT_SYMBOL_NOVERS(__get_user_1);
   35.94 -EXPORT_SYMBOL_NOVERS(__get_user_2);
   35.95 -EXPORT_SYMBOL_NOVERS(__get_user_4);
   35.96 -
   35.97 -EXPORT_SYMBOL(strtok);
   35.98 -EXPORT_SYMBOL(strpbrk);
   35.99 -EXPORT_SYMBOL(strstr);
  35.100 -
  35.101 -EXPORT_SYMBOL(strncpy_from_user);
  35.102 -EXPORT_SYMBOL(__strncpy_from_user);
  35.103 -EXPORT_SYMBOL(clear_user);
  35.104 -EXPORT_SYMBOL(__clear_user);
  35.105 -EXPORT_SYMBOL(__generic_copy_from_user);
  35.106 -EXPORT_SYMBOL(__generic_copy_to_user);
  35.107 -EXPORT_SYMBOL(strnlen_user);
  35.108 -
  35.109 -
  35.110 -EXPORT_SYMBOL(pci_alloc_consistent);
  35.111 -EXPORT_SYMBOL(pci_free_consistent);
  35.112 -
  35.113 -#ifdef CONFIG_PCI
  35.114 -EXPORT_SYMBOL(pcibios_penalize_isa_irq);
  35.115 -EXPORT_SYMBOL(pci_mem_start);
  35.116 -#endif
  35.117 -
  35.118 -
  35.119 -#ifdef CONFIG_X86_USE_3DNOW
  35.120 -EXPORT_SYMBOL(_mmx_memcpy);
  35.121 -EXPORT_SYMBOL(mmx_clear_page);
  35.122 -EXPORT_SYMBOL(mmx_copy_page);
  35.123 -#endif
  35.124 -
  35.125 -#ifdef CONFIG_SMP
  35.126 -EXPORT_SYMBOL(cpu_data);
  35.127 -EXPORT_SYMBOL(kernel_flag_cacheline);
  35.128 -EXPORT_SYMBOL(smp_num_cpus);
  35.129 -EXPORT_SYMBOL(cpu_online_map);
  35.130 -EXPORT_SYMBOL_NOVERS(__write_lock_failed);
  35.131 -EXPORT_SYMBOL_NOVERS(__read_lock_failed);
  35.132 -
  35.133 -/* Global SMP irq stuff */
  35.134 -EXPORT_SYMBOL(synchronize_irq);
  35.135 -EXPORT_SYMBOL(global_irq_holder);
  35.136 -EXPORT_SYMBOL(__global_cli);
  35.137 -EXPORT_SYMBOL(__global_sti);
  35.138 -EXPORT_SYMBOL(__global_save_flags);
  35.139 -EXPORT_SYMBOL(__global_restore_flags);
  35.140 -EXPORT_SYMBOL(smp_call_function);
  35.141 -
  35.142 -/* TLB flushing */
  35.143 -EXPORT_SYMBOL(flush_tlb_page);
  35.144 -
  35.145 -/* HT support */
  35.146 -EXPORT_SYMBOL(smp_num_siblings);
  35.147 -EXPORT_SYMBOL(cpu_sibling_map);
  35.148 -#endif
  35.149 -
  35.150 -#ifdef CONFIG_X86_IO_APIC
  35.151 -EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
  35.152 -#endif
  35.153 -
  35.154 -#ifdef CONFIG_VT
  35.155 -EXPORT_SYMBOL(screen_info);
  35.156 -#endif
  35.157 -
  35.158 -EXPORT_SYMBOL(get_wchan);
  35.159 -
  35.160 -EXPORT_SYMBOL(rtc_lock);
  35.161 -
  35.162 -#undef memcpy
  35.163 -#undef memset
  35.164 -extern void * memset(void *,int,__kernel_size_t);
  35.165 -extern void * memcpy(void *,const void *,__kernel_size_t);
  35.166 -EXPORT_SYMBOL_NOVERS(memcpy);
  35.167 -EXPORT_SYMBOL_NOVERS(memset);
  35.168 -
  35.169 -#ifdef CONFIG_HAVE_DEC_LOCK
  35.170 -EXPORT_SYMBOL(atomic_dec_and_lock);
  35.171 -#endif
  35.172 -
  35.173 -#ifdef CONFIG_MULTIQUAD
  35.174 -EXPORT_SYMBOL(xquad_portio);
  35.175 -#endif
  35.176 -
  35.177 -#include <asm/xen_proc.h>
  35.178 -EXPORT_SYMBOL(create_xen_proc_entry);
  35.179 -EXPORT_SYMBOL(remove_xen_proc_entry);
  35.180 -
  35.181 -EXPORT_SYMBOL(evtchn_do_upcall);
  35.182 -EXPORT_SYMBOL(force_evtchn_callback);
  35.183 -EXPORT_SYMBOL(HYPERVISOR_shared_info);
    36.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/irq.c	Sat Oct 08 11:37:45 2005 -0600
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,1242 +0,0 @@
    36.4 -/*
    36.5 - *	linux/arch/i386/kernel/irq.c
    36.6 - *
    36.7 - *	Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
    36.8 - *
    36.9 - * This file contains the code used by various IRQ handling routines:
   36.10 - * asking for different IRQ's should be done through these routines
   36.11 - * instead of just grabbing them. Thus setups with different IRQ numbers
   36.12 - * shouldn't result in any weird surprises, and installing new handlers
   36.13 - * should be easier.
   36.14 - */
   36.15 -
   36.16 -/*
   36.17 - * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
   36.18 - *
   36.19 - * IRQs are in fact implemented a bit like signal handlers for the kernel.
   36.20 - * Naturally it's not a 1:1 relation, but there are similarities.
   36.21 - */
   36.22 -
   36.23 -#include <linux/config.h>
   36.24 -#include <linux/ptrace.h>
   36.25 -#include <linux/errno.h>
   36.26 -#include <linux/signal.h>
   36.27 -#include <linux/sched.h>
   36.28 -#include <linux/ioport.h>
   36.29 -#include <linux/interrupt.h>
   36.30 -#include <linux/timex.h>
   36.31 -#include <linux/slab.h>
   36.32 -#include <linux/random.h>
   36.33 -#include <linux/smp_lock.h>
   36.34 -#include <linux/init.h>
   36.35 -#include <linux/kernel_stat.h>
   36.36 -#include <linux/irq.h>
   36.37 -#include <linux/proc_fs.h>
   36.38 -#include <linux/seq_file.h>
   36.39 -
   36.40 -#include <asm/atomic.h>
   36.41 -#include <asm/io.h>
   36.42 -#include <asm/smp.h>
   36.43 -#include <asm/system.h>
   36.44 -#include <asm/bitops.h>
   36.45 -#include <asm/uaccess.h>
   36.46 -#include <asm/pgalloc.h>
   36.47 -#include <asm/delay.h>
   36.48 -#include <asm/desc.h>
   36.49 -#include <asm/irq.h>
   36.50 -
   36.51 -
   36.52 -
   36.53 -/*
   36.54 - * Linux has a controller-independent x86 interrupt architecture.
   36.55 - * every controller has a 'controller-template', that is used
   36.56 - * by the main code to do the right thing. Each driver-visible
   36.57 - * interrupt source is transparently wired to the apropriate
   36.58 - * controller. Thus drivers need not be aware of the
   36.59 - * interrupt-controller.
   36.60 - *
   36.61 - * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC,
   36.62 - * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC.
   36.63 - * (IO-APICs assumed to be messaging to Pentium local-APICs)
   36.64 - *
   36.65 - * the code is designed to be easily extended with new/different
   36.66 - * interrupt controllers, without having to do assembly magic.
   36.67 - */
   36.68 -
   36.69 -/*
   36.70 - * Controller mappings for all interrupt sources:
   36.71 - */
   36.72 -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
   36.73 -	{ [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}};
   36.74 -
   36.75 -static void register_irq_proc (unsigned int irq);
   36.76 -
   36.77 -/*
   36.78 - * Special irq handlers.
   36.79 - */
   36.80 -
   36.81 -void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
   36.82 -
   36.83 -/*
   36.84 - * Generic no controller code
   36.85 - */
   36.86 -
   36.87 -static void enable_none(unsigned int irq) { }
   36.88 -static unsigned int startup_none(unsigned int irq) { return 0; }
   36.89 -static void disable_none(unsigned int irq) { }
   36.90 -static void ack_none(unsigned int irq)
   36.91 -{
   36.92 -/*
   36.93 - * 'what should we do if we get a hw irq event on an illegal vector'.
   36.94 - * each architecture has to answer this themselves, it doesnt deserve
   36.95 - * a generic callback i think.
   36.96 - */
   36.97 -#if CONFIG_X86
   36.98 -	printk("unexpected IRQ trap at vector %02x\n", irq);
   36.99 -#ifdef CONFIG_X86_LOCAL_APIC
  36.100 -	/*
  36.101 -	 * Currently unexpected vectors happen only on SMP and APIC.
  36.102 -	 * We _must_ ack these because every local APIC has only N
  36.103 -	 * irq slots per priority level, and a 'hanging, unacked' IRQ
  36.104 -	 * holds up an irq slot - in excessive cases (when multiple
  36.105 -	 * unexpected vectors occur) that might lock up the APIC
  36.106 -	 * completely.
  36.107 -	 */
  36.108 -	ack_APIC_irq();
  36.109 -#endif
  36.110 -#endif
  36.111 -}
  36.112 -
  36.113 -/* startup is the same as "enable", shutdown is same as "disable" */
  36.114 -#define shutdown_none	disable_none
  36.115 -#define end_none	enable_none
  36.116 -
  36.117 -struct hw_interrupt_type no_irq_type = {
  36.118 -	"none",
  36.119 -	startup_none,
  36.120 -	shutdown_none,
  36.121 -	enable_none,
  36.122 -	disable_none,
  36.123 -	ack_none,
  36.124 -	end_none
  36.125 -};
  36.126 -
  36.127 -atomic_t irq_err_count;
  36.128 -#ifdef CONFIG_X86_IO_APIC
  36.129 -#ifdef APIC_MISMATCH_DEBUG
  36.130 -atomic_t irq_mis_count;
  36.131 -#endif
  36.132 -#endif
  36.133 -
  36.134 -/*
  36.135 - * Generic, controller-independent functions:
  36.136 - */
  36.137 -
  36.138 -int show_interrupts(struct seq_file *p, void *v)
  36.139 -{
  36.140 -	int i, j;
  36.141 -	struct irqaction * action;
  36.142 -
  36.143 -	seq_printf(p, "           ");
  36.144 -	for (j=0; j<smp_num_cpus; j++)
  36.145 -		seq_printf(p, "CPU%d       ",j);
  36.146 -	seq_putc(p,'\n');
  36.147 -
  36.148 -	for (i = 0 ; i < NR_IRQS ; i++) {
  36.149 -		action = irq_desc[i].action;
  36.150 -		if (!action) 
  36.151 -			continue;
  36.152 -		seq_printf(p, "%3d: ",i);
  36.153 -#ifndef CONFIG_SMP
  36.154 -		seq_printf(p, "%10u ", kstat_irqs(i));
  36.155 -#else
  36.156 -		for (j = 0; j < smp_num_cpus; j++)
  36.157 -			seq_printf(p, "%10u ",
  36.158 -				kstat.irqs[cpu_logical_map(j)][i]);
  36.159 -#endif
  36.160 -		seq_printf(p, " %14s", irq_desc[i].handler->typename);
  36.161 -		seq_printf(p, "  %s", action->name);
  36.162 -
  36.163 -		for (action=action->next; action; action = action->next)
  36.164 -			seq_printf(p, ", %s", action->name);
  36.165 -		seq_putc(p,'\n');
  36.166 -	}
  36.167 -	seq_printf(p, "NMI: ");
  36.168 -	for (j = 0; j < smp_num_cpus; j++)
  36.169 -		seq_printf(p, "%10u ",
  36.170 -			nmi_count(cpu_logical_map(j)));
  36.171 -	seq_printf(p, "\n");
  36.172 -#if CONFIG_X86_LOCAL_APIC
  36.173 -	seq_printf(p, "LOC: ");
  36.174 -	for (j = 0; j < smp_num_cpus; j++)
  36.175 -		seq_printf(p, "%10u ",
  36.176 -			apic_timer_irqs[cpu_logical_map(j)]);
  36.177 -	seq_printf(p, "\n");
  36.178 -#endif
  36.179 -	seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
  36.180 -#ifdef CONFIG_X86_IO_APIC
  36.181 -#ifdef APIC_MISMATCH_DEBUG
  36.182 -	seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
  36.183 -#endif
  36.184 -#endif
  36.185 -
  36.186 -	return 0;
  36.187 -}
  36.188 -
  36.189 -
  36.190 -/*
  36.191 - * Global interrupt locks for SMP. Allow interrupts to come in on any
  36.192 - * CPU, yet make cli/sti act globally to protect critical regions..
  36.193 - */
  36.194 -
  36.195 -#ifdef CONFIG_SMP
  36.196 -unsigned char global_irq_holder = NO_PROC_ID;
  36.197 -unsigned volatile long global_irq_lock; /* pendantic: long for set_bit --RR */
  36.198 -
  36.199 -extern void show_stack(unsigned long* esp);
  36.200 -
  36.201 -static void show(char * str)
  36.202 -{
  36.203 -	int i;
  36.204 -	int cpu = smp_processor_id();
  36.205 -
  36.206 -	printk("\n%s, CPU %d:\n", str, cpu);
  36.207 -	printk("irq:  %d [",irqs_running());
  36.208 -	for(i=0;i < smp_num_cpus;i++)
  36.209 -		printk(" %d",local_irq_count(i));
  36.210 -	printk(" ]\nbh:   %d [",spin_is_locked(&global_bh_lock) ? 1 : 0);
  36.211 -	for(i=0;i < smp_num_cpus;i++)
  36.212 -		printk(" %d",local_bh_count(i));
  36.213 -
  36.214 -	printk(" ]\nStack dumps:");
  36.215 -	for(i = 0; i < smp_num_cpus; i++) {
  36.216 -		unsigned long esp;
  36.217 -		if (i == cpu)
  36.218 -			continue;
  36.219 -		printk("\nCPU %d:",i);
  36.220 -		esp = init_tss[i].esp0;
  36.221 -		if (!esp) {
  36.222 -			/* tss->esp0 is set to NULL in cpu_init(),
  36.223 -			 * it's initialized when the cpu returns to user
  36.224 -			 * space. -- manfreds
  36.225 -			 */
  36.226 -			printk(" <unknown> ");
  36.227 -			continue;
  36.228 -		}
  36.229 -		esp &= ~(THREAD_SIZE-1);
  36.230 -		esp += sizeof(struct task_struct);
  36.231 -		show_stack((void*)esp);
  36.232 - 	}
  36.233 -	printk("\nCPU %d:",cpu);
  36.234 -	show_stack(NULL);
  36.235 -	printk("\n");
  36.236 -}
  36.237 -	
  36.238 -#define MAXCOUNT 100000000
  36.239 -
  36.240 -/*
  36.241 - * I had a lockup scenario where a tight loop doing
  36.242 - * spin_unlock()/spin_lock() on CPU#1 was racing with
  36.243 - * spin_lock() on CPU#0. CPU#0 should have noticed spin_unlock(), but
  36.244 - * apparently the spin_unlock() information did not make it
  36.245 - * through to CPU#0 ... nasty, is this by design, do we have to limit
  36.246 - * 'memory update oscillation frequency' artificially like here?
  36.247 - *
  36.248 - * Such 'high frequency update' races can be avoided by careful design, but
  36.249 - * some of our major constructs like spinlocks use similar techniques,
  36.250 - * it would be nice to clarify this issue. Set this define to 0 if you
  36.251 - * want to check whether your system freezes.  I suspect the delay done
  36.252 - * by SYNC_OTHER_CORES() is in correlation with 'snooping latency', but
  36.253 - * i thought that such things are guaranteed by design, since we use
  36.254 - * the 'LOCK' prefix.
  36.255 - */
  36.256 -#define SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND 0
  36.257 -
  36.258 -#if SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND
  36.259 -# define SYNC_OTHER_CORES(x) udelay(x+1)
  36.260 -#else
  36.261 -/*
  36.262 - * We have to allow irqs to arrive between __sti and __cli
  36.263 - */
  36.264 -# define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop")
  36.265 -#endif
  36.266 -
  36.267 -static inline void wait_on_irq(int cpu)
  36.268 -{
  36.269 -	int count = MAXCOUNT;
  36.270 -
  36.271 -	for (;;) {
  36.272 -
  36.273 -		/*
  36.274 -		 * Wait until all interrupts are gone. Wait
  36.275 -		 * for bottom half handlers unless we're
  36.276 -		 * already executing in one..
  36.277 -		 */
  36.278 -		if (!irqs_running())
  36.279 -			if (local_bh_count(cpu) || !spin_is_locked(&global_bh_lock))
  36.280 -				break;
  36.281 -
  36.282 -		/* Duh, we have to loop. Release the lock to avoid deadlocks */
  36.283 -		clear_bit(0,&global_irq_lock);
  36.284 -
  36.285 -		for (;;) {
  36.286 -			if (!--count) {
  36.287 -				show("wait_on_irq");
  36.288 -				count = ~0;
  36.289 -			}
  36.290 -			__sti();
  36.291 -			SYNC_OTHER_CORES(cpu);
  36.292 -			__cli();
  36.293 -			if (irqs_running())
  36.294 -				continue;
  36.295 -			if (global_irq_lock)
  36.296 -				continue;
  36.297 -			if (!local_bh_count(cpu) && spin_is_locked(&global_bh_lock))
  36.298 -				continue;
  36.299 -			if (!test_and_set_bit(0,&global_irq_lock))
  36.300 -				break;
  36.301 -		}
  36.302 -	}
  36.303 -}
  36.304 -
  36.305 -/*
  36.306 - * This is called when we want to synchronize with
  36.307 - * interrupts. We may for example tell a device to
  36.308 - * stop sending interrupts: but to make sure there
  36.309 - * are no interrupts that are executing on another
  36.310 - * CPU we need to call this function.
  36.311 - */
  36.312 -void synchronize_irq(void)
  36.313 -{
  36.314 -	if (irqs_running()) {
  36.315 -		/* Stupid approach */
  36.316 -		cli();
  36.317 -		sti();
  36.318 -	}
  36.319 -}
  36.320 -
  36.321 -static inline void get_irqlock(int cpu)
  36.322 -{
  36.323 -	if (test_and_set_bit(0,&global_irq_lock)) {
  36.324 -		/* do we already hold the lock? */
  36.325 -		if ((unsigned char) cpu == global_irq_holder)
  36.326 -			return;
  36.327 -		/* Uhhuh.. Somebody else got it. Wait.. */
  36.328 -		do {
  36.329 -			do {
  36.330 -				rep_nop();
  36.331 -			} while (test_bit(0,&global_irq_lock));
  36.332 -		} while (test_and_set_bit(0,&global_irq_lock));		
  36.333 -	}
  36.334 -	/* 
  36.335 -	 * We also to make sure that nobody else is running
  36.336 -	 * in an interrupt context. 
  36.337 -	 */
  36.338 -	wait_on_irq(cpu);
  36.339 -
  36.340 -	/*
  36.341 -	 * Ok, finally..
  36.342 -	 */
  36.343 -	global_irq_holder = cpu;
  36.344 -}
  36.345 -
  36.346 -/*
  36.347 - * A global "cli()" while in an interrupt context
  36.348 - * turns into just a local cli(). Interrupts
  36.349 - * should use spinlocks for the (very unlikely)
  36.350 - * case that they ever want to protect against
  36.351 - * each other.
  36.352 - *
  36.353 - * If we already have local interrupts disabled,
  36.354 - * this will not turn a local disable into a
  36.355 - * global one (problems with spinlocks: this makes
  36.356 - * save_flags+cli+sti usable inside a spinlock).
  36.357 - */
  36.358 -void __global_cli(void)
  36.359 -{
  36.360 -	unsigned int flags;
  36.361 -
  36.362 -	__save_flags(flags);
  36.363 -	if (!flags) {
  36.364 -		int cpu = smp_processor_id();
  36.365 -		__cli();
  36.366 -		if (!local_irq_count(cpu))
  36.367 -			get_irqlock(cpu);
  36.368 -	}
  36.369 -}
  36.370 -
  36.371 -void __global_sti(void)
  36.372 -{
  36.373 -	int cpu = smp_processor_id();
  36.374 -
  36.375 -	if (!local_irq_count(cpu))
  36.376 -		release_irqlock(cpu);
  36.377 -	__sti();
  36.378 -}
  36.379 -
  36.380 -/*
  36.381 - * SMP flags value to restore to:
  36.382 - * 0 - global cli
  36.383 - * 1 - global sti
  36.384 - * 2 - local cli
  36.385 - * 3 - local sti
  36.386 - */
  36.387 -unsigned long __global_save_flags(void)
  36.388 -{
  36.389 -	int retval;
  36.390 -	int local_enabled;
  36.391 -	unsigned long flags;
  36.392 -	int cpu = smp_processor_id();
  36.393 -
  36.394 -	__save_flags(flags);
  36.395 -	local_enabled = !flags;
  36.396 -	/* default to local */
  36.397 -	retval = 2 + local_enabled;
  36.398 -
  36.399 -	/* check for global flags if we're not in an interrupt */
  36.400 -	if (!local_irq_count(cpu)) {
  36.401 -		if (local_enabled)
  36.402 -			retval = 1;
  36.403 -		if (global_irq_holder == cpu)
  36.404 -			retval = 0;
  36.405 -	}
  36.406 -	return retval;
  36.407 -}
  36.408 -
  36.409 -void __global_restore_flags(unsigned long flags)
  36.410 -{
  36.411 -	switch (flags) {
  36.412 -	case 0:
  36.413 -		__global_cli();
  36.414 -		break;
  36.415 -	case 1:
  36.416 -		__global_sti();
  36.417 -		break;
  36.418 -	case 2:
  36.419 -		__cli();
  36.420 -		break;
  36.421 -	case 3:
  36.422 -		__sti();
  36.423 -		break;
  36.424 -	default:
  36.425 -		printk("global_restore_flags: %08lx (%08lx)\n",
  36.426 -			flags, (&flags)[-1]);
  36.427 -	}
  36.428 -}
  36.429 -
  36.430 -#endif
  36.431 -
  36.432 -/*
  36.433 - * This should really return information about whether
  36.434 - * we should do bottom half handling etc. Right now we
  36.435 - * end up _always_ checking the bottom half, which is a
  36.436 - * waste of time and is not what some drivers would
  36.437 - * prefer.
  36.438 - */
  36.439 -int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
  36.440 -{
  36.441 -	int status;
  36.442 -	int cpu = smp_processor_id();
  36.443 -
  36.444 -	irq_enter(cpu, irq);
  36.445 -
  36.446 -	status = 1;	/* Force the "do bottom halves" bit */
  36.447 -
  36.448 -	if (!(action->flags & SA_INTERRUPT))
  36.449 -		__sti();
  36.450 -
  36.451 -	do {
  36.452 -		status |= action->flags;
  36.453 -		action->handler(irq, action->dev_id, regs);
  36.454 -		action = action->next;
  36.455 -	} while (action);
  36.456 -	if (status & SA_SAMPLE_RANDOM)
  36.457 -		add_interrupt_randomness(irq);
  36.458 -	__cli();
  36.459 -
  36.460 -	irq_exit(cpu, irq);
  36.461 -
  36.462 -	return status;
  36.463 -}
  36.464 -
  36.465 -/*
  36.466 - * Generic enable/disable code: this just calls
  36.467 - * down into the PIC-specific version for the actual
  36.468 - * hardware disable after having gotten the irq
  36.469 - * controller lock. 
  36.470 - */
  36.471 - 
  36.472 -/**
  36.473 - *	disable_irq_nosync - disable an irq without waiting
  36.474 - *	@irq: Interrupt to disable
  36.475 - *
  36.476 - *	Disable the selected interrupt line.  Disables and Enables are
  36.477 - *	nested.
  36.478 - *	Unlike disable_irq(), this function does not ensure existing
  36.479 - *	instances of the IRQ handler have completed before returning.
  36.480 - *
  36.481 - *	This function may be called from IRQ context.
  36.482 - */
  36.483 - 
  36.484 -inline void disable_irq_nosync(unsigned int irq)
  36.485 -{
  36.486 -	irq_desc_t *desc = irq_desc + irq;
  36.487 -	unsigned long flags;
  36.488 -
  36.489 -	spin_lock_irqsave(&desc->lock, flags);
  36.490 -	if (!desc->depth++) {
  36.491 -		desc->status |= IRQ_DISABLED;
  36.492 -		desc->handler->disable(irq);
  36.493 -	}
  36.494 -	spin_unlock_irqrestore(&desc->lock, flags);
  36.495 -}
  36.496 -
  36.497 -/**
  36.498 - *	disable_irq - disable an irq and wait for completion
  36.499 - *	@irq: Interrupt to disable
  36.500 - *
  36.501 - *	Disable the selected interrupt line.  Enables and Disables are
  36.502 - *	nested.
  36.503 - *	This function waits for any pending IRQ handlers for this interrupt
  36.504 - *	to complete before returning. If you use this function while
  36.505 - *	holding a resource the IRQ handler may need you will deadlock.
  36.506 - *
  36.507 - *	This function may be called - with care - from IRQ context.
  36.508 - */
  36.509 - 
  36.510 -void disable_irq(unsigned int irq)
  36.511 -{
  36.512 -	disable_irq_nosync(irq);
  36.513 -
  36.514 -	if (!local_irq_count(smp_processor_id())) {
  36.515 -		do {
  36.516 -			barrier();
  36.517 -			cpu_relax();
  36.518 -		} while (irq_desc[irq].status & IRQ_INPROGRESS);
  36.519 -	}
  36.520 -}
  36.521 -
  36.522 -/**
  36.523 - *	enable_irq - enable handling of an irq
  36.524 - *	@irq: Interrupt to enable
  36.525 - *
  36.526 - *	Undoes the effect of one call to disable_irq().  If this
  36.527 - *	matches the last disable, processing of interrupts on this
  36.528 - *	IRQ line is re-enabled.
  36.529 - *
  36.530 - *	This function may be called from IRQ context.
  36.531 - */
  36.532 - 
  36.533 -void enable_irq(unsigned int irq)
  36.534 -{
  36.535 -	irq_desc_t *desc = irq_desc + irq;
  36.536 -	unsigned long flags;
  36.537 -
  36.538 -	spin_lock_irqsave(&desc->lock, flags);
  36.539 -	switch (desc->depth) {
  36.540 -	case 1: {
  36.541 -		unsigned int status = desc->status & ~IRQ_DISABLED;
  36.542 -		desc->status = status;
  36.543 -		if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
  36.544 -			desc->status = status | IRQ_REPLAY;
  36.545 -			hw_resend_irq(desc->handler,irq);
  36.546 -		}
  36.547 -		desc->handler->enable(irq);
  36.548 -		/* fall-through */
  36.549 -	}
  36.550 -	default:
  36.551 -		desc->depth--;
  36.552 -		break;
  36.553 -	case 0:
  36.554 -		printk("enable_irq(%u) unbalanced from %p\n", irq,
  36.555 -		       __builtin_return_address(0));
  36.556 -	}
  36.557 -	spin_unlock_irqrestore(&desc->lock, flags);
  36.558 -}
  36.559 -
  36.560 -/*
  36.561 - * do_IRQ handles all normal device IRQ's (the special
  36.562 - * SMP cross-CPU interrupts have their own specific
  36.563 - * handlers).
  36.564 - */
  36.565 -asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
  36.566 -{	
  36.567 -	/* 
  36.568 -	 * We ack quickly, we don't want the irq controller
  36.569 -	 * thinking we're snobs just because some other CPU has
  36.570 -	 * disabled global interrupts (we have already done the
  36.571 -	 * INT_ACK cycles, it's too late to try to pretend to the
  36.572 -	 * controller that we aren't taking the interrupt).
  36.573 -	 *
  36.574 -	 * 0 return value means that this irq is already being
  36.575 -	 * handled by some other CPU. (or is disabled)
  36.576 -	 */
  36.577 -	int irq = regs->orig_eax & 0xff; /* high bits used in ret_from_ code */
  36.578 -	int cpu = smp_processor_id();
  36.579 -	irq_desc_t *desc = irq_desc + irq;
  36.580 -	struct irqaction * action;
  36.581 -	unsigned int status;
  36.582 -#ifdef CONFIG_DEBUG_STACKOVERFLOW
  36.583 -	long esp;
  36.584 -
  36.585 -	/* Debugging check for stack overflow: is there less than 1KB free? */
  36.586 -	__asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : "0" (8191));
  36.587 -	if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
  36.588 -		extern void show_stack(unsigned long *);
  36.589 -
  36.590 -		printk("do_IRQ: stack overflow: %ld\n",
  36.591 -			esp - sizeof(struct task_struct));
  36.592 -		__asm__ __volatile__("movl %%esp,%0" : "=r" (esp));
  36.593 -		show_stack((void *)esp);
  36.594 -	}
  36.595 -#endif
  36.596 -
  36.597 -	kstat.irqs[cpu][irq]++;
  36.598 -	spin_lock(&desc->lock);
  36.599 -	desc->handler->ack(irq);
  36.600 -	/*
  36.601 -	   REPLAY is when Linux resends an IRQ that was dropped earlier
  36.602 -	   WAITING is used by probe to mark irqs that are being tested
  36.603 -	   */
  36.604 -	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
  36.605 -	status |= IRQ_PENDING; /* we _want_ to handle it */
  36.606 -
  36.607 -	/*
  36.608 -	 * If the IRQ is disabled for whatever reason, we cannot
  36.609 -	 * use the action we have.
  36.610 -	 */
  36.611 -	action = NULL;
  36.612 -	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
  36.613 -		action = desc->action;
  36.614 -		status &= ~IRQ_PENDING; /* we commit to handling */
  36.615 -		status |= IRQ_INPROGRESS; /* we are handling it */
  36.616 -	}
  36.617 -	desc->status = status;
  36.618 -
  36.619 -	/*
  36.620 -	 * If there is no IRQ handler or it was disabled, exit early.
  36.621 -	   Since we set PENDING, if another processor is handling
  36.622 -	   a different instance of this same irq, the other processor
  36.623 -	   will take care of it.
  36.624 -	 */
  36.625 -	if (!action)
  36.626 -		goto out;
  36.627 -
  36.628 -	/*
  36.629 -	 * Edge triggered interrupts need to remember
  36.630 -	 * pending events.
  36.631 -	 * This applies to any hw interrupts that allow a second
  36.632 -	 * instance of the same irq to arrive while we are in do_IRQ
  36.633 -	 * or in the handler. But the code here only handles the _second_
  36.634 -	 * instance of the irq, not the third or fourth. So it is mostly
  36.635 -	 * useful for irq hardware that does not mask cleanly in an
  36.636 -	 * SMP environment.
  36.637 -	 */
  36.638 -	for (;;) {
  36.639 -		spin_unlock(&desc->lock);
  36.640 -		handle_IRQ_event(irq, regs, action);
  36.641 -		spin_lock(&desc->lock);
  36.642 -		
  36.643 -		if (!(desc->status & IRQ_PENDING))
  36.644 -			break;
  36.645 -		desc->status &= ~IRQ_PENDING;
  36.646 -	}
  36.647 -	desc->status &= ~IRQ_INPROGRESS;
  36.648 -out:
  36.649 -	/*
  36.650 -	 * The ->end() handler has to deal with interrupts which got
  36.651 -	 * disabled while the handler was running.
  36.652 -	 */
  36.653 -	desc->handler->end(irq);
  36.654 -	spin_unlock(&desc->lock);
  36.655 -
  36.656 -	if (softirq_pending(cpu))
  36.657 -		do_softirq();
  36.658 -	return 1;
  36.659 -}
  36.660 -
  36.661 -/**
  36.662 - *	request_irq - allocate an interrupt line
  36.663 - *	@irq: Interrupt line to allocate
  36.664 - *	@handler: Function to be called when the IRQ occurs
  36.665 - *	@irqflags: Interrupt type flags
  36.666 - *	@devname: An ascii name for the claiming device
  36.667 - *	@dev_id: A cookie passed back to the handler function
  36.668 - *
  36.669 - *	This call allocates interrupt resources and enables the
  36.670 - *	interrupt line and IRQ handling. From the point this
  36.671 - *	call is made your handler function may be invoked. Since
  36.672 - *	your handler function must clear any interrupt the board 
  36.673 - *	raises, you must take care both to initialise your hardware
  36.674 - *	and to set up the interrupt handler in the right order.
  36.675 - *
  36.676 - *	Dev_id must be globally unique. Normally the address of the
  36.677 - *	device data structure is used as the cookie. Since the handler
  36.678 - *	receives this value it makes sense to use it.
  36.679 - *
  36.680 - *	If your interrupt is shared you must pass a non NULL dev_id
  36.681 - *	as this is required when freeing the interrupt.
  36.682 - *
  36.683 - *	Flags:
  36.684 - *
  36.685 - *	SA_SHIRQ		Interrupt is shared
  36.686 - *
  36.687 - *	SA_INTERRUPT		Disable local interrupts while processing
  36.688 - *
  36.689 - *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
  36.690 - *
  36.691 - */
  36.692 - 
  36.693 -int request_irq(unsigned int irq, 
  36.694 -		void (*handler)(int, void *, struct pt_regs *),
  36.695 -		unsigned long irqflags, 
  36.696 -		const char * devname,
  36.697 -		void *dev_id)
  36.698 -{
  36.699 -	int retval;
  36.700 -	struct irqaction * action;
  36.701 -
  36.702 -#if 1
  36.703 -	/*
  36.704 -	 * Sanity-check: shared interrupts should REALLY pass in
  36.705 -	 * a real dev-ID, otherwise we'll have trouble later trying
  36.706 -	 * to figure out which interrupt is which (messes up the
  36.707 -	 * interrupt freeing logic etc).
  36.708 -	 */
  36.709 -	if (irqflags & SA_SHIRQ) {
  36.710 -		if (!dev_id)
  36.711 -			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
  36.712 -	}
  36.713 -#endif
  36.714 -
  36.715 -	if (irq >= NR_IRQS)
  36.716 -		return -EINVAL;
  36.717 -	if (!handler)
  36.718 -		return -EINVAL;
  36.719 -
  36.720 -	action = (struct irqaction *)
  36.721 -			kmalloc(sizeof(struct irqaction), GFP_KERNEL);
  36.722 -	if (!action)
  36.723 -		return -ENOMEM;
  36.724 -
  36.725 -	action->handler = handler;
  36.726 -	action->flags = irqflags;
  36.727 -	action->mask = 0;
  36.728 -	action->name = devname;
  36.729 -	action->next = NULL;
  36.730 -	action->dev_id = dev_id;
  36.731 -
  36.732 -	retval = setup_irq(irq, action);
  36.733 -	if (retval)
  36.734 -		kfree(action);
  36.735 -	return retval;
  36.736 -}
  36.737 -
  36.738 -/*
  36.739 - * Internal function to unregister an irqaction - typically used to
  36.740 - * deallocate special interrupts that are part of the architecture.
  36.741 - */
  36.742 -int teardown_irq(unsigned int irq, struct irqaction * old)
  36.743 -{
  36.744 -	irq_desc_t *desc;
  36.745 -	struct irqaction **p;
  36.746 -	unsigned long flags;
  36.747 -
  36.748 -	if (irq >= NR_IRQS)
  36.749 -		return -ENOENT;
  36.750 -
  36.751 -	desc = irq_desc + irq;
  36.752 -	spin_lock_irqsave(&desc->lock,flags);
  36.753 -	p = &desc->action;
  36.754 -	for (;;) {
  36.755 -		struct irqaction * action = *p;
  36.756 -		if (action) {
  36.757 -			struct irqaction **pp = p;
  36.758 -			p = &action->next;
  36.759 -			if (action != old)
  36.760 -				continue;
  36.761 -
  36.762 -			/* Found it - now remove it from the list of entries */
  36.763 -			*pp = action->next;
  36.764 -			if (!desc->action) {
  36.765 -				desc->status |= IRQ_DISABLED;
  36.766 -				desc->handler->shutdown(irq);
  36.767 -			}
  36.768 -			spin_unlock_irqrestore(&desc->lock,flags);
  36.769 -
  36.770 -#ifdef CONFIG_SMP
  36.771 -			/* Wait to make sure it's not being used on another CPU */
  36.772 -			while (desc->status & IRQ_INPROGRESS) {
  36.773 -				barrier();
  36.774 -				cpu_relax();
  36.775 -			}
  36.776 -#endif
  36.777 -			return 0;
  36.778 -		}
  36.779 -		printk("Trying to free free IRQ%d\n",irq);
  36.780 -		spin_unlock_irqrestore(&desc->lock,flags);
  36.781 -		return -ENOENT;
  36.782 -	}
  36.783 -}
  36.784 -
  36.785 -/**
  36.786 - *	free_irq - free an interrupt
  36.787 - *	@irq: Interrupt line to free
  36.788 - *	@dev_id: Device identity to free
  36.789 - *
  36.790 - *	Remove an interrupt handler. The handler is removed and if the
  36.791 - *	interrupt line is no longer in use by any driver it is disabled.
  36.792 - *	On a shared IRQ the caller must ensure the interrupt is disabled
  36.793 - *	on the card it drives before calling this function. The function
  36.794 - *	does not return until any executing interrupts for this IRQ
  36.795 - *	have completed.
  36.796 - *
  36.797 - *	This function may be called from interrupt context. 
  36.798 - *
  36.799 - *	Bugs: Attempting to free an irq in a handler for the same irq hangs
  36.800 - *	      the machine.
  36.801 - */
  36.802 - 
  36.803 -void free_irq(unsigned int irq, void *dev_id)
  36.804 -{
  36.805 -	irq_desc_t *desc;
  36.806 -	struct irqaction *action;
  36.807 -	unsigned long flags;
  36.808 -
  36.809 -	if (irq >= NR_IRQS)
  36.810 -		return;
  36.811 -
  36.812 -	desc = irq_desc + irq;
  36.813 -	spin_lock_irqsave(&desc->lock,flags);
  36.814 -	for (action = desc->action; action != NULL; action = action->next) {
  36.815 -		if (action->dev_id != dev_id)
  36.816 -			continue;
  36.817 -
  36.818 -		spin_unlock_irqrestore(&desc->lock,flags);
  36.819 -
  36.820 -		if (teardown_irq(irq, action) == 0)
  36.821 -			kfree(action);
  36.822 -		return;
  36.823 -	}
  36.824 -	printk("Trying to free free IRQ%d\n",irq);
  36.825 -	spin_unlock_irqrestore(&desc->lock,flags);
  36.826 -	return;
  36.827 -}
  36.828 -
  36.829 -/*
  36.830 - * IRQ autodetection code..
  36.831 - *
  36.832 - * This depends on the fact that any interrupt that
  36.833 - * comes in on to an unassigned handler will get stuck
  36.834 - * with "IRQ_WAITING" cleared and the interrupt
  36.835 - * disabled.
  36.836 - */
  36.837 -
  36.838 -static DECLARE_MUTEX(probe_sem);
  36.839 -
  36.840 -/**
  36.841 - *	probe_irq_on	- begin an interrupt autodetect
  36.842 - *
  36.843 - *	Commence probing for an interrupt. The interrupts are scanned
  36.844 - *	and a mask of potential interrupt lines is returned.
  36.845 - *
  36.846 - */
  36.847 - 
  36.848 -unsigned long probe_irq_on(void)
  36.849 -{
  36.850 -	unsigned int i;
  36.851 -	irq_desc_t *desc;
  36.852 -	unsigned long val;
  36.853 -	unsigned long delay;
  36.854 -
  36.855 -	down(&probe_sem);
  36.856 -	/* 
  36.857 -	 * something may have generated an irq long ago and we want to
  36.858 -	 * flush such a longstanding irq before considering it as spurious. 
  36.859 -	 */
  36.860 -	for (i = NR_PIRQS-1; i > 0; i--)  {
  36.861 -		desc = irq_desc + i;
  36.862 -
  36.863 -		spin_lock_irq(&desc->lock);
  36.864 -		if (!irq_desc[i].action) 
  36.865 -			irq_desc[i].handler->startup(i);
  36.866 -		spin_unlock_irq(&desc->lock);
  36.867 -	}
  36.868 -
  36.869 -	/* Wait for longstanding interrupts to trigger. */
  36.870 -	for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
  36.871 -		/* about 20ms delay */ synchronize_irq();
  36.872 -
  36.873 -	/*
  36.874 -	 * enable any unassigned irqs
  36.875 -	 * (we must startup again here because if a longstanding irq
  36.876 -	 * happened in the previous stage, it may have masked itself)
  36.877 -	 */
  36.878 -	for (i = NR_PIRQS-1; i > 0; i--) {
  36.879 -		desc = irq_desc + i;
  36.880 -
  36.881 -		spin_lock_irq(&desc->lock);
  36.882 -		if (!desc->action) {
  36.883 -			desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
  36.884 -			if (desc->handler->startup(i))
  36.885 -				desc->status |= IRQ_PENDING;
  36.886 -		}
  36.887 -		spin_unlock_irq(&desc->lock);
  36.888 -	}
  36.889 -
  36.890 -	/*
  36.891 -	 * Wait for spurious interrupts to trigger
  36.892 -	 */
  36.893 -	for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
  36.894 -		/* about 100ms delay */ synchronize_irq();
  36.895 -
  36.896 -	/*
  36.897 -	 * Now filter out any obviously spurious interrupts
  36.898 -	 */
  36.899 -	val = 0;
  36.900 -	for (i = 0; i < NR_PIRQS; i++) {
  36.901 -		irq_desc_t *desc = irq_desc + i;
  36.902 -		unsigned int status;
  36.903 -
  36.904 -		spin_lock_irq(&desc->lock);
  36.905 -		status = desc->status;
  36.906 -
  36.907 -		if (status & IRQ_AUTODETECT) {
  36.908 -			/* It triggered already - consider it spurious. */
  36.909 -			if (!(status & IRQ_WAITING)) {
  36.910 -				desc->status = status & ~IRQ_AUTODETECT;
  36.911 -				desc->handler->shutdown(i);
  36.912 -			} else
  36.913 -				if (i < 32)
  36.914 -					val |= 1 << i;
  36.915 -		}
  36.916 -		spin_unlock_irq(&desc->lock);
  36.917 -	}
  36.918 -
  36.919 -	return val;
  36.920 -}
  36.921 -
  36.922 -/*
  36.923 - * Return a mask of triggered interrupts (this
  36.924 - * can handle only legacy ISA interrupts).
  36.925 - */
  36.926 - 
  36.927 -/**
  36.928 - *	probe_irq_mask - scan a bitmap of interrupt lines
  36.929 - *	@val:	mask of interrupts to consider
  36.930 - *
  36.931 - *	Scan the ISA bus interrupt lines and return a bitmap of
  36.932 - *	active interrupts. The interrupt probe logic state is then
  36.933 - *	returned to its previous value.
  36.934 - *
  36.935 - *	Note: we need to scan all the irq's even though we will
  36.936 - *	only return ISA irq numbers - just so that we reset them
  36.937 - *	all to a known state.
  36.938 - */
  36.939 -unsigned int probe_irq_mask(unsigned long val)
  36.940 -{
  36.941 -	int i;
  36.942 -	unsigned int mask;
  36.943 -
  36.944 -	mask = 0;
  36.945 -	for (i = 0; i < NR_PIRQS; i++) {
  36.946 -		irq_desc_t *desc = irq_desc + i;
  36.947 -		unsigned int status;
  36.948 -
  36.949 -		spin_lock_irq(&desc->lock);
  36.950 -		status = desc->status;
  36.951 -
  36.952 -		if (status & IRQ_AUTODETECT) {
  36.953 -			if (i < 16 && !(status & IRQ_WAITING))
  36.954 -				mask |= 1 << i;
  36.955 -
  36.956 -			desc->status = status & ~IRQ_AUTODETECT;
  36.957 -			desc->handler->shutdown(i);
  36.958 -		}
  36.959 -		spin_unlock_irq(&desc->lock);
  36.960 -	}
  36.961 -	up(&probe_sem);
  36.962 -
  36.963 -	return mask & val;
  36.964 -}
  36.965 -
  36.966 -/*
  36.967 - * Return the one interrupt that triggered (this can
  36.968 - * handle any interrupt source).
  36.969 - */
  36.970 -
  36.971 -/**
  36.972 - *	probe_irq_off	- end an interrupt autodetect
  36.973 - *	@val: mask of potential interrupts (unused)
  36.974 - *
  36.975 - *	Scans the unused interrupt lines and returns the line which
  36.976 - *	appears to have triggered the interrupt. If no interrupt was
  36.977 - *	found then zero is returned. If more than one interrupt is
  36.978 - *	found then minus the first candidate is returned to indicate
  36.979 - *	their is doubt.
  36.980 - *
  36.981 - *	The interrupt probe logic state is returned to its previous
  36.982 - *	value.
  36.983 - *
  36.984 - *	BUGS: When used in a module (which arguably shouldnt happen)
  36.985 - *	nothing prevents two IRQ probe callers from overlapping. The
  36.986 - *	results of this are non-optimal.
  36.987 - */
  36.988 - 
  36.989 -int probe_irq_off(unsigned long val)
  36.990 -{
  36.991 -	int i, irq_found, nr_irqs;
  36.992 -
  36.993 -	nr_irqs = 0;
  36.994 -	irq_found = 0;
  36.995 -	for (i = 0; i < NR_PIRQS; i++) {
  36.996 -		irq_desc_t *desc = irq_desc + i;
  36.997 -		unsigned int status;
  36.998 -
  36.999 -		spin_lock_irq(&desc->lock);
 36.1000 -		status = desc->status;
 36.1001 -
 36.1002 -		if (status & IRQ_AUTODETECT) {
 36.1003 -			if (!(status & IRQ_WAITING)) {
 36.1004 -				if (!nr_irqs)
 36.1005 -					irq_found = i;
 36.1006 -				nr_irqs++;
 36.1007 -			}
 36.1008 -			desc->status = status & ~IRQ_AUTODETECT;
 36.1009 -			desc->handler->shutdown(i);
 36.1010 -		}
 36.1011 -		spin_unlock_irq(&desc->lock);
 36.1012 -	}
 36.1013 -	up(&probe_sem);
 36.1014 -
 36.1015 -	if (nr_irqs > 1)
 36.1016 -		irq_found = -irq_found;
 36.1017 -	return irq_found;
 36.1018 -}
 36.1019 -
 36.1020 -/* this was setup_x86_irq but it seems pretty generic */
 36.1021 -int setup_irq(unsigned int irq, struct irqaction * new)
 36.1022 -{
 36.1023 -	int shared = 0;
 36.1024 -	unsigned long flags;
 36.1025 -	struct irqaction *old, **p;
 36.1026 -	irq_desc_t *desc = irq_desc + irq;
 36.1027 -
 36.1028 -	/*
 36.1029 -	 * Some drivers like serial.c use request_irq() heavily,
 36.1030 -	 * so we have to be careful not to interfere with a
 36.1031 -	 * running system.
 36.1032 -	 */
 36.1033 -	if (new->flags & SA_SAMPLE_RANDOM) {
 36.1034 -		/*
 36.1035 -		 * This function might sleep, we want to call it first,
 36.1036 -		 * outside of the atomic block.
 36.1037 -		 * Yes, this might clear the entropy pool if the wrong
 36.1038 -		 * driver is attempted to be loaded, without actually
 36.1039 -		 * installing a new handler, but is this really a problem,
 36.1040 -		 * only the sysadmin is able to do this.
 36.1041 -		 */
 36.1042 -		rand_initialize_irq(irq);
 36.1043 -	}
 36.1044 -
 36.1045 -	/*
 36.1046 -	 * The following block of code has to be executed atomically
 36.1047 -	 */
 36.1048 -	spin_lock_irqsave(&desc->lock,flags);
 36.1049 -	p = &desc->action;
 36.1050 -	if ((old = *p) != NULL) {
 36.1051 -		/* Can't share interrupts unless both agree to */
 36.1052 -		if (!(old->flags & new->flags & SA_SHIRQ)) {
 36.1053 -			spin_unlock_irqrestore(&desc->lock,flags);
 36.1054 -			return -EBUSY;
 36.1055 -		}
 36.1056 -
 36.1057 -		/* add new interrupt at end of irq queue */
 36.1058 -		do {
 36.1059 -			p = &old->next;
 36.1060 -			old = *p;
 36.1061 -		} while (old);
 36.1062 -		shared = 1;
 36.1063 -	}
 36.1064 -
 36.1065 -	*p = new;
 36.1066 -
 36.1067 -	if (!shared) {
 36.1068 -		desc->depth = 0;
 36.1069 -		desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
 36.1070 -		desc->handler->startup(irq);
 36.1071 -	}
 36.1072 -	spin_unlock_irqrestore(&desc->lock,flags);
 36.1073 -
 36.1074 -	register_irq_proc(irq);
 36.1075 -	return 0;
 36.1076 -}
 36.1077 -
 36.1078 -static struct proc_dir_entry * root_irq_dir;
 36.1079 -static struct proc_dir_entry * irq_dir [NR_IRQS];
 36.1080 -
 36.1081 -#define HEX_DIGITS 8
 36.1082 -
 36.1083 -static unsigned int parse_hex_value (const char *buffer,
 36.1084 -		unsigned long count, unsigned long *ret)
 36.1085 -{
 36.1086 -	unsigned char hexnum [HEX_DIGITS];
 36.1087 -	unsigned long value;
 36.1088 -	int i;
 36.1089 -
 36.1090 -	if (!count)
 36.1091 -		return -EINVAL;
 36.1092 -	if (count > HEX_DIGITS)
 36.1093 -		count = HEX_DIGITS;
 36.1094 -	if (copy_from_user(hexnum, buffer, count))
 36.1095 -		return -EFAULT;
 36.1096 -
 36.1097 -	/*
 36.1098 -	 * Parse the first 8 characters as a hex string, any non-hex char
 36.1099 -	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
 36.1100 -	 */
 36.1101 -	value = 0;
 36.1102 -
 36.1103 -	for (i = 0; i < count; i++) {
 36.1104 -		unsigned int c = hexnum[i];
 36.1105 -
 36.1106 -		switch (c) {
 36.1107 -			case '0' ... '9': c -= '0'; break;
 36.1108 -			case 'a' ... 'f': c -= 'a'-10; break;
 36.1109 -			case 'A' ... 'F': c -= 'A'-10; break;
 36.1110 -		default:
 36.1111 -			goto out;
 36.1112 -		}
 36.1113 -		value = (value << 4) | c;
 36.1114 -	}
 36.1115 -out:
 36.1116 -	*ret = value;
 36.1117 -	return 0;
 36.1118 -}
 36.1119 -
 36.1120 -#if CONFIG_SMP
 36.1121 -
 36.1122 -static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
 36.1123 -
 36.1124 -static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
 36.1125 -static int irq_affinity_read_proc (char *page, char **start, off_t off,
 36.1126 -			int count, int *eof, void *data)
 36.1127 -{
 36.1128 -	if (count < HEX_DIGITS+1)
 36.1129 -		return -EINVAL;
 36.1130 -	return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
 36.1131 -}
 36.1132 -
 36.1133 -static int irq_affinity_write_proc (struct file *file, const char *buffer,
 36.1134 -					unsigned long count, void *data)
 36.1135 -{
 36.1136 -	int irq = (long) data, full_count = count, err;
 36.1137 -	unsigned long new_value;
 36.1138 -
 36.1139 -	if (!irq_desc[irq].handler->set_affinity)
 36.1140 -		return -EIO;
 36.1141 -
 36.1142 -	err = parse_hex_value(buffer, count, &new_value);
 36.1143 -
 36.1144 -	/*
 36.1145 -	 * Do not allow disabling IRQs completely - it's a too easy
 36.1146 -	 * way to make the system unusable accidentally :-) At least
 36.1147 -	 * one online CPU still has to be targeted.
 36.1148 -	 */
 36.1149 -	if (!(new_value & cpu_online_map))
 36.1150 -		return -EINVAL;
 36.1151 -
 36.1152 -	irq_affinity[irq] = new_value;
 36.1153 -	irq_desc[irq].handler->set_affinity(irq, new_value);
 36.1154 -
 36.1155 -	return full_count;
 36.1156 -}
 36.1157 -
 36.1158 -#endif
 36.1159 -
 36.1160 -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
 36.1161 -			int count, int *eof, void *data)
 36.1162 -{
 36.1163 -	unsigned long *mask = (unsigned long *) data;
 36.1164 -	if (count < HEX_DIGITS+1)
 36.1165 -		return -EINVAL;
 36.1166 -	return sprintf (page, "%08lx\n", *mask);
 36.1167 -}
 36.1168 -
 36.1169 -static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
 36.1170 -					unsigned long count, void *data)
 36.1171 -{
 36.1172 -	unsigned long *mask = (unsigned long *) data, full_count = count, err;
 36.1173 -	unsigned long new_value;
 36.1174 -
 36.1175 -	err = parse_hex_value(buffer, count, &new_value);
 36.1176 -	if (err)
 36.1177 -		return err;
 36.1178 -
 36.1179 -	*mask = new_value;
 36.1180 -	return full_count;
 36.1181 -}
 36.1182 -
 36.1183 -#define MAX_NAMELEN 10
 36.1184 -
 36.1185 -static void register_irq_proc (unsigned int irq)
 36.1186 -{
 36.1187 -	char name [MAX_NAMELEN];
 36.1188 -
 36.1189 -	if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) ||
 36.1190 -			irq_dir[irq])
 36.1191 -		return;
 36.1192 -
 36.1193 -	memset(name, 0, MAX_NAMELEN);
 36.1194 -	sprintf(name, "%d", irq);
 36.1195 -
 36.1196 -	/* create /proc/irq/1234 */
 36.1197 -	irq_dir[irq] = proc_mkdir(name, root_irq_dir);
 36.1198 -
 36.1199 -#if CONFIG_SMP
 36.1200 -	{
 36.1201 -		struct proc_dir_entry *entry;
 36.1202 -
 36.1203 -		/* create /proc/irq/1234/smp_affinity */
 36.1204 -		entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
 36.1205 -
 36.1206 -		if (entry) {
 36.1207 -			entry->nlink = 1;
 36.1208 -			entry->data = (void *)(long)irq;
 36.1209 -			entry->read_proc = irq_affinity_read_proc;
 36.1210 -			entry->write_proc = irq_affinity_write_proc;
 36.1211 -		}
 36.1212 -
 36.1213 -		smp_affinity_entry[irq] = entry;
 36.1214 -	}
 36.1215 -#endif
 36.1216 -}
 36.1217 -
 36.1218 -unsigned long prof_cpu_mask = -1;
 36.1219 -
 36.1220 -void init_irq_proc (void)
 36.1221 -{
 36.1222 -	struct proc_dir_entry *entry;
 36.1223 -	int i;
 36.1224 -
 36.1225 -	/* create /proc/irq */
 36.1226 -	root_irq_dir = proc_mkdir("irq", 0);
 36.1227 -
 36.1228 -	/* create /proc/irq/prof_cpu_mask */
 36.1229 -	entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
 36.1230 -
 36.1231 -	if (!entry)
 36.1232 -	    return;
 36.1233 -
 36.1234 -	entry->nlink = 1;
 36.1235 -	entry->data = (void *)&prof_cpu_mask;
 36.1236 -	entry->read_proc = prof_cpu_mask_read_proc;
 36.1237 -	entry->write_proc = prof_cpu_mask_write_proc;
 36.1238 -
 36.1239 -	/*
 36.1240 -	 * Create entries for all existing IRQs.
 36.1241 -	 */
 36.1242 -	for (i = 0; i < NR_IRQS; i++)
 36.1243 -		register_irq_proc(i);
 36.1244 -}
 36.1245 -
    37.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/ldt.c	Sat Oct 08 11:37:45 2005 -0600
    37.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.3 @@ -1,272 +0,0 @@
    37.4 -/*
    37.5 - * linux/kernel/ldt.c
    37.6 - *
    37.7 - * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
    37.8 - * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
    37.9 - */
   37.10 -
   37.11 -#include <linux/errno.h>
   37.12 -#include <linux/sched.h>
   37.13 -#include <linux/string.h>
   37.14 -#include <linux/mm.h>
   37.15 -#include <linux/smp.h>
   37.16 -#include <linux/smp_lock.h>
   37.17 -#include <linux/vmalloc.h>
   37.18 -#include <linux/slab.h>
   37.19 -
   37.20 -#include <asm/mmu_context.h>
   37.21 -#include <asm/uaccess.h>
   37.22 -#include <asm/system.h>
   37.23 -#include <asm/ldt.h>
   37.24 -#include <asm/desc.h>
   37.25 -
   37.26 -#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
   37.27 -static void flush_ldt(void *mm)
   37.28 -{
   37.29 -	if (current->active_mm)
   37.30 -		load_LDT(&current->active_mm->context);
   37.31 -}
   37.32 -#endif
   37.33 -
   37.34 -static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
   37.35 -{
   37.36 -	void *oldldt;
   37.37 -	void *newldt;
   37.38 -	int oldsize;
   37.39 -
   37.40 -	if (mincount <= pc->size)
   37.41 -		return 0;
   37.42 -	oldsize = pc->size;
   37.43 -	mincount = (mincount+511)&(~511);
   37.44 -	if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
   37.45 -		newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
   37.46 -	else
   37.47 -		newldt = kmalloc(mincount*LDT_ENTRY_SIZE, GFP_KERNEL);
   37.48 -
   37.49 -	if (!newldt)
   37.50 -		return -ENOMEM;
   37.51 -
   37.52 -	if (oldsize)
   37.53 -		memcpy(newldt, pc->ldt, oldsize*LDT_ENTRY_SIZE);
   37.54 -
   37.55 -	oldldt = pc->ldt;
   37.56 -	memset(newldt+oldsize*LDT_ENTRY_SIZE, 0, (mincount-oldsize)*LDT_ENTRY_SIZE);
   37.57 -	wmb();
   37.58 -	pc->ldt = newldt;
   37.59 -	pc->size = mincount;
   37.60 -	if (reload) {
   37.61 -		make_pages_readonly(
   37.62 -			pc->ldt,
   37.63 -			(pc->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
   37.64 -		load_LDT(pc);
   37.65 -#ifdef CONFIG_SMP
   37.66 -		if (current->mm->cpu_vm_mask != (1<<smp_processor_id()))
   37.67 -			smp_call_function(flush_ldt, 0, 1, 1);
   37.68 -#endif
   37.69 -	}
   37.70 -	wmb();
   37.71 -	if (oldsize) {
   37.72 -		make_pages_writable(
   37.73 -			oldldt, (oldsize*LDT_ENTRY_SIZE)/PAGE_SIZE);
   37.74 -		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
   37.75 -			vfree(oldldt);
   37.76 -		else
   37.77 -			kfree(oldldt);
   37.78 -	}
   37.79 -	return 0;
   37.80 -}
   37.81 -
   37.82 -static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
   37.83 -{
   37.84 -	int err = alloc_ldt(new, old->size, 0);
   37.85 -	if (err < 0) {
   37.86 -		printk(KERN_WARNING "ldt allocation failed\n");
   37.87 -		new->size = 0;
   37.88 -		return err;
   37.89 -	}
   37.90 -	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
   37.91 -	make_pages_readonly(new->ldt, (new->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
   37.92 -	return 0;
   37.93 -}
   37.94 -
   37.95 -/*
   37.96 - * we do not have to muck with descriptors here, that is
   37.97 - * done in switch_mm() as needed.
   37.98 - */
   37.99 -int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
  37.100 -{
  37.101 -	struct mm_struct * old_mm;
  37.102 -	int retval = 0;
  37.103 -
  37.104 -	init_MUTEX(&mm->context.sem);
  37.105 -	mm->context.size = 0;
  37.106 -	old_mm = current->mm;
  37.107 -	if (old_mm && old_mm->context.size > 0) {
  37.108 -		down(&old_mm->context.sem);
  37.109 -		retval = copy_ldt(&mm->context, &old_mm->context);
  37.110 -		up(&old_mm->context.sem);
  37.111 -	}
  37.112 -	return retval;
  37.113 -}
  37.114 -
  37.115 -/*
  37.116 - * No need to lock the MM as we are the last user
  37.117 - * Do not touch the ldt register, we are already
  37.118 - * in the next thread.
  37.119 - */
  37.120 -void destroy_context(struct mm_struct *mm)
  37.121 -{
  37.122 -	if (mm->context.size) {
  37.123 -		make_pages_writable(
  37.124 -			mm->context.ldt, 
  37.125 -			(mm->context.size*LDT_ENTRY_SIZE)/PAGE_SIZE);
  37.126 -		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
  37.127 -			vfree(mm->context.ldt);
  37.128 -		else
  37.129 -			kfree(mm->context.ldt);
  37.130 -		mm->context.size = 0;
  37.131 -	}
  37.132 -}
  37.133 -
  37.134 -static int read_ldt(void * ptr, unsigned long bytecount)
  37.135 -{
  37.136 -	int err;
  37.137 -	unsigned long size;
  37.138 -	struct mm_struct * mm = current->mm;
  37.139 -
  37.140 -	if (!mm->context.size)
  37.141 -		return 0;
  37.142 -	if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES)
  37.143 -		bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES;
  37.144 -
  37.145 -	down(&mm->context.sem);
  37.146 -	size = mm->context.size*LDT_ENTRY_SIZE;
  37.147 -	if (size > bytecount)
  37.148 -		size = bytecount;
  37.149 -
  37.150 -	err = 0;
  37.151 -	if (copy_to_user(ptr, mm->context.ldt, size))
  37.152 -		err = -EFAULT;
  37.153 -	up(&mm->context.sem);
  37.154 -	if (err < 0)
  37.155 -		return err;
  37.156 -	if (size != bytecount) {
  37.157 -		/* zero-fill the rest */
  37.158 -		clear_user(ptr+size, bytecount-size);
  37.159 -	}
  37.160 -	return bytecount;
  37.161 -}
  37.162 -
  37.163 -static int read_default_ldt(void * ptr, unsigned long bytecount)
  37.164 -{
  37.165 -	int err;
  37.166 -	unsigned long size;
  37.167 -	void *address;
  37.168 -
  37.169 -	err = 0;
  37.170 -	address = &default_ldt[0];
  37.171 -	size = 5*sizeof(struct desc_struct);
  37.172 -	if (size > bytecount)
  37.173 -		size = bytecount;
  37.174 -
  37.175 -	err = size;
  37.176 -	if (copy_to_user(ptr, address, size))
  37.177 -		err = -EFAULT;
  37.178 -
  37.179 -	return err;
  37.180 -}
  37.181 -
  37.182 -static int write_ldt(void * ptr, unsigned long bytecount, int oldmode)
  37.183 -{
  37.184 -	struct mm_struct * mm = current->mm;
  37.185 -	__u32 entry_1, entry_2, *lp;
  37.186 -	unsigned long mach_lp;
  37.187 -	int error;
  37.188 -	struct modify_ldt_ldt_s ldt_info;
  37.189 -
  37.190 -	error = -EINVAL;
  37.191 -	if (bytecount != sizeof(ldt_info))
  37.192 -		goto out;
  37.193 -	error = -EFAULT; 	
  37.194 -	if (copy_from_user(&ldt_info, ptr, sizeof(ldt_info)))
  37.195 -		goto out;
  37.196 -
  37.197 -	error = -EINVAL;
  37.198 -	if (ldt_info.entry_number >= LDT_ENTRIES)
  37.199 -		goto out;
  37.200 -	if (ldt_info.contents == 3) {
  37.201 -		if (oldmode)
  37.202 -			goto out;
  37.203 -		if (ldt_info.seg_not_present == 0)
  37.204 -			goto out;
  37.205 -	}
  37.206 -
  37.207 -	down(&mm->context.sem);
  37.208 -	if (ldt_info.entry_number >= mm->context.size) {
  37.209 -		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
  37.210 -		if (error < 0)
  37.211 -			goto out_unlock;
  37.212 -	}
  37.213 -
  37.214 -	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
  37.215 -	mach_lp = arbitrary_virt_to_machine(lp);
  37.216 -
  37.217 -   	/* Allow LDTs to be cleared by the user. */
  37.218 -   	if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
  37.219 -		if (oldmode ||
  37.220 -		    (ldt_info.contents == 0		&&
  37.221 -		     ldt_info.read_exec_only == 1	&&
  37.222 -		     ldt_info.seg_32bit == 0		&&
  37.223 -		     ldt_info.limit_in_pages == 0	&&
  37.224 -		     ldt_info.seg_not_present == 1	&&
  37.225 -		     ldt_info.useable == 0 )) {
  37.226 -			entry_1 = 0;
  37.227 -			entry_2 = 0;
  37.228 -			goto install;
  37.229 -		}
  37.230 -	}
  37.231 -
  37.232 -	entry_1 = ((ldt_info.base_addr & 0x0000ffff) << 16) |
  37.233 -		  (ldt_info.limit & 0x0ffff);
  37.234 -	entry_2 = (ldt_info.base_addr & 0xff000000) |
  37.235 -		  ((ldt_info.base_addr & 0x00ff0000) >> 16) |
  37.236 -		  (ldt_info.limit & 0xf0000) |
  37.237 -		  ((ldt_info.read_exec_only ^ 1) << 9) |
  37.238 -		  (ldt_info.contents << 10) |
  37.239 -		  ((ldt_info.seg_not_present ^ 1) << 15) |
  37.240 -		  (ldt_info.seg_32bit << 22) |
  37.241 -		  (ldt_info.limit_in_pages << 23) |
  37.242 -		  0x7000;
  37.243 -	if (!oldmode)
  37.244 -		entry_2 |= (ldt_info.useable << 20);
  37.245 -
  37.246 -	/* Install the new entry ...  */
  37.247 -install:
  37.248 -	error = HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
  37.249 -
  37.250 -out_unlock:
  37.251 -	up(&mm->context.sem);
  37.252 -out:
  37.253 -	return error;
  37.254 -}
  37.255 -
  37.256 -asmlinkage int sys_modify_ldt(int func, void *ptr, unsigned long bytecount)
  37.257 -{
  37.258 -	int ret = -ENOSYS;
  37.259 -
  37.260 -	switch (func) {
  37.261 -	case 0:
  37.262 -		ret = read_ldt(ptr, bytecount);
  37.263 -		break;
  37.264 -	case 1:
  37.265 -		ret = write_ldt(ptr, bytecount, 1);
  37.266 -		break;
  37.267 -	case 2:
  37.268 -		ret = read_default_ldt(ptr, bytecount);
  37.269 -		break;
  37.270 -	case 0x11:
  37.271 -		ret = write_ldt(ptr, bytecount, 0);
  37.272 -		break;
  37.273 -	}
  37.274 -	return ret;
  37.275 -}
    38.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/pci-pc.c	Sat Oct 08 11:37:45 2005 -0600
    38.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.3 @@ -1,260 +0,0 @@
    38.4 -/*
    38.5 - *	Low-Level PCI Support for PC
    38.6 - *
    38.7 - *	(c) 1999--2000 Martin Mares <mj@ucw.cz>
    38.8 - *
    38.9 - * Adjusted to use Xen's interface by Rolf Neugebauer, Intel Research Cambridge
   38.10 - * Further modifications by Keir Fraser, University of Cambridge
   38.11 - */
   38.12 -
   38.13 -#include <linux/config.h>
   38.14 -#include <linux/types.h>
   38.15 -#include <linux/kernel.h>
   38.16 -#include <linux/sched.h>
   38.17 -#include <linux/pci.h>
   38.18 -#include <linux/init.h>
   38.19 -#include <linux/ioport.h>
   38.20 -
   38.21 -#include <asm/segment.h>
   38.22 -#include <asm/io.h>
   38.23 -
   38.24 -#include <asm-xen/xen-public/xen.h>
   38.25 -#include <asm-xen/xen-public/physdev.h>
   38.26 -
   38.27 -#include "pci-i386.h"
   38.28 -
   38.29 -/*
   38.30 - * NB. The following interface functions are not included here:
   38.31 - *  1. void eisa_set_level_irq(unsigned int irq)
   38.32 - *  2. irq_routing_table * __devinit pcibios_get_irq_routing_table(void)
   38.33 - *  3. int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
   38.34 - * All are used by the ACPI driver. This should be ported to Xen if it is
   38.35 - * ever required -- Xen is the ultimate source for IRQ-routing knowledge.
   38.36 - */
   38.37 -
   38.38 -struct pci_ops *pci_root_ops = NULL;
   38.39 -
   38.40 -int (*pci_config_read)(int seg, int bus, int dev, int fn, 
   38.41 -                       int reg, int len, u32 *value) = NULL;
   38.42 -int (*pci_config_write)(int seg, int bus, int dev, int fn,
   38.43 -                        int reg, int len, u32 value) = NULL;
   38.44 -
   38.45 -unsigned int pci_probe = PCI_PROBE_BIOS;
   38.46 -
   38.47 -struct pci_fixup pcibios_fixups[] = { { 0 } };
   38.48 -
   38.49 -static int pci_confx_read(int seg, int bus, int dev, int fn, int reg, 
   38.50 -                          int len, u32 *value)
   38.51 -{
   38.52 -    int ret;
   38.53 -    physdev_op_t op;
   38.54 -
   38.55 -    if (bus > 255 || dev > 31 || fn > 7 || reg > 255)
   38.56 -        return -EINVAL;
   38.57 -
   38.58 -    op.cmd = PHYSDEVOP_PCI_CFGREG_READ;
   38.59 -    op.u.pci_cfgreg_read.bus  = bus;
   38.60 -    op.u.pci_cfgreg_read.dev  = dev;
   38.61 -    op.u.pci_cfgreg_read.func = fn;
   38.62 -    op.u.pci_cfgreg_read.reg  = reg;
   38.63 -    op.u.pci_cfgreg_read.len  = len;
   38.64 -
   38.65 -    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
   38.66 -        return ret;
   38.67 -
   38.68 -    *value = op.u.pci_cfgreg_read.value;
   38.69 -
   38.70 -    return 0;
   38.71 -}
   38.72 -
   38.73 -static int pci_confx_write(int seg, int bus, int dev, int fn, int reg, 
   38.74 -                           int len, u32 value)
   38.75 -{
   38.76 -    int ret;
   38.77 -    physdev_op_t op;
   38.78 -
   38.79 -    if ((bus > 255 || dev > 31 || fn > 7 || reg > 255)) 
   38.80 -        return -EINVAL;
   38.81 -
   38.82 -    op.cmd = PHYSDEVOP_PCI_CFGREG_WRITE;
   38.83 -    op.u.pci_cfgreg_write.bus   = bus;
   38.84 -    op.u.pci_cfgreg_write.dev   = dev;
   38.85 -    op.u.pci_cfgreg_write.func  = fn;
   38.86 -    op.u.pci_cfgreg_write.reg   = reg;
   38.87 -    op.u.pci_cfgreg_write.len   = len;
   38.88 -    op.u.pci_cfgreg_write.value = value;
   38.89 -
   38.90 -    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
   38.91 -        return ret;
   38.92 -    return 0;
   38.93 -}
   38.94 -
   38.95 -
   38.96 -static int pci_confx_read_config_byte(struct pci_dev *dev, 
   38.97 -                                      int where, u8 *value)
   38.98 -{
   38.99 -    int result; 
  38.100 -    u32 data;
  38.101 -
  38.102 -    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  38.103 -                            PCI_FUNC(dev->devfn), where, 1, &data);
  38.104 -
  38.105 -    *value = (u8)data;
  38.106 -
  38.107 -    return result;
  38.108 -}
  38.109 -
  38.110 -static int pci_confx_read_config_word(struct pci_dev *dev, 
  38.111 -                                      int where, u16 *value)
  38.112 -{
  38.113 -    int result; 
  38.114 -    u32 data;
  38.115 -
  38.116 -    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  38.117 -                            PCI_FUNC(dev->devfn), where, 2, &data);
  38.118 -
  38.119 -    *value = (u16)data;
  38.120 -
  38.121 -    return result;
  38.122 -}
  38.123 -
  38.124 -static int pci_confx_read_config_dword(struct pci_dev *dev, 
  38.125 -                                       int where, u32 *value)
  38.126 -{
  38.127 -    return pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  38.128 -                          PCI_FUNC(dev->devfn), where, 4, value);
  38.129 -}
  38.130 -
  38.131 -static int pci_confx_write_config_byte(struct pci_dev *dev, 
  38.132 -                                       int where, u8 value)
  38.133 -{
  38.134 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  38.135 -                           PCI_FUNC(dev->devfn), where, 1, value);
  38.136 -}
  38.137 -
  38.138 -static int pci_confx_write_config_word(struct pci_dev *dev, 
  38.139 -                                       int where, u16 value)
  38.140 -{
  38.141 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  38.142 -                           PCI_FUNC(dev->devfn), where, 2, value);
  38.143 -}
  38.144 -
  38.145 -static int pci_confx_write_config_dword(struct pci_dev *dev, 
  38.146 -                                        int where, u32 value)
  38.147 -{
  38.148 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  38.149 -                           PCI_FUNC(dev->devfn), where, 4, value);
  38.150 -}
  38.151 -
  38.152 -static struct pci_ops pci_conf_xen = {
  38.153 -    pci_confx_read_config_byte,
  38.154 -    pci_confx_read_config_word,
  38.155 -    pci_confx_read_config_dword,
  38.156 -    pci_confx_write_config_byte,
  38.157 -    pci_confx_write_config_word,
  38.158 -    pci_confx_write_config_dword
  38.159 -};
  38.160 -
  38.161 -void pcibios_penalize_isa_irq(int irq)
  38.162 -{ 
  38.163 -    /* nothing */
  38.164 -}
  38.165 -
  38.166 -void __devinit pcibios_fixup_bus(struct pci_bus *b)
  38.167 -{
  38.168 -    pci_read_bridge_bases(b);
  38.169 -}
  38.170 -
  38.171 -struct pci_bus * __devinit pcibios_scan_root(int busnum)
  38.172 -{
  38.173 -    struct list_head *list;
  38.174 -    struct pci_bus *bus;
  38.175 -
  38.176 -    list_for_each ( list, &pci_root_buses )
  38.177 -    {
  38.178 -        bus = pci_bus_b(list);
  38.179 -        if ( bus->number == busnum )
  38.180 -            return bus;
  38.181 -    }
  38.182 -
  38.183 -    printk("PCI: Probing PCI hardware (bus %02x)\n", busnum);
  38.184 -    return pci_scan_bus(busnum, pci_root_ops, NULL);
  38.185 -}
  38.186 -
  38.187 -void __init pcibios_init(void)
  38.188 -{
  38.189 -    int bus;
  38.190 -    physdev_op_t op;
  38.191 -
  38.192 -    if ( !pci_probe )
  38.193 -        return;
  38.194 -
  38.195 -    pci_root_ops     = &pci_conf_xen;
  38.196 -    pci_config_read  = pci_confx_read;
  38.197 -    pci_config_write = pci_confx_write;
  38.198 -
  38.199 -    pcibios_set_cacheline_size();
  38.200 -
  38.201 -    op.cmd = PHYSDEVOP_PCI_PROBE_ROOT_BUSES;
  38.202 -    if ( HYPERVISOR_physdev_op(&op) != 0 )
  38.203 -    {
  38.204 -        printk(KERN_WARNING "PCI: System does not support PCI\n");
  38.205 -        return;
  38.206 -    }
  38.207 -
  38.208 -    printk(KERN_INFO "PCI: Probing PCI hardware\n");
  38.209 -    for ( bus = 0; bus < 256; bus++ )
  38.210 -        if ( test_bit(bus, &op.u.pci_probe_root_buses.busmask[0]) )
  38.211 -            (void)pcibios_scan_root(bus);
  38.212 -
  38.213 -    pcibios_resource_survey();
  38.214 -}
  38.215 -
  38.216 -char * __devinit pcibios_setup(char *str)
  38.217 -{
  38.218 -    if ( !strcmp(str, "off") )
  38.219 -        pci_probe = 0;
  38.220 -    return NULL;
  38.221 -}
  38.222 -
  38.223 -unsigned int pcibios_assign_all_busses(void)
  38.224 -{
  38.225 -    return 0;
  38.226 -}
  38.227 -
  38.228 -int pcibios_enable_device(struct pci_dev *dev, int mask)
  38.229 -{
  38.230 -    int err;
  38.231 -    u8  pin;
  38.232 -    physdev_op_t op;
  38.233 -
  38.234 -    /* Inform Xen that we are going to use this device. */
  38.235 -    op.cmd = PHYSDEVOP_PCI_INITIALISE_DEVICE;
  38.236 -    op.u.pci_initialise_device.bus  = dev->bus->number;
  38.237 -    op.u.pci_initialise_device.dev  = PCI_SLOT(dev->devfn);
  38.238 -    op.u.pci_initialise_device.func = PCI_FUNC(dev->devfn);
  38.239 -    if ( (err = HYPERVISOR_physdev_op(&op)) != 0 )
  38.240 -        return err;
  38.241 -
  38.242 -    /* Now we can bind to the very final IRQ line. */
  38.243 -    pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &pin);
  38.244 -    dev->irq = pin;
  38.245 -
  38.246 -    /* Turn on device I/O and memory access as necessary. */
  38.247 -    if ( (err = pcibios_enable_resources(dev, mask)) < 0 )
  38.248 -        return err;
  38.249 -
  38.250 -    /* Sanity-check that an interrupt-producing device is routed to an IRQ. */
  38.251 -    pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
  38.252 -    if ( pin != 0 )
  38.253 -    {
  38.254 -        if ( dev->irq != 0 )
  38.255 -            printk(KERN_INFO "PCI: Obtained IRQ %d for device %s\n",
  38.256 -                   dev->irq, dev->slot_name);
  38.257 -        else
  38.258 -            printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of "
  38.259 -                   "device %s.\n", 'A' + pin - 1, dev->slot_name);
  38.260 -    }
  38.261 -
  38.262 -    return 0;
  38.263 -}
    39.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/process.c	Sat Oct 08 11:37:45 2005 -0600
    39.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.3 @@ -1,448 +0,0 @@
    39.4 -/*
    39.5 - *  linux/arch/i386/kernel/process.c
    39.6 - *
    39.7 - *  Copyright (C) 1995  Linus Torvalds
    39.8 - *
    39.9 - *  Pentium III FXSR, SSE support
   39.10 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   39.11 - */
   39.12 -
   39.13 -/*
   39.14 - * This file handles the architecture-dependent parts of process handling..
   39.15 - */
   39.16 -
   39.17 -#define __KERNEL_SYSCALLS__
   39.18 -#include <stdarg.h>
   39.19 -
   39.20 -#include <linux/errno.h>
   39.21 -#include <linux/sched.h>
   39.22 -#include <linux/kernel.h>
   39.23 -#include <linux/mm.h>
   39.24 -#include <linux/smp.h>
   39.25 -#include <linux/smp_lock.h>
   39.26 -#include <linux/stddef.h>
   39.27 -#include <linux/unistd.h>
   39.28 -#include <linux/ptrace.h>
   39.29 -#include <linux/slab.h>
   39.30 -#include <linux/vmalloc.h>
   39.31 -#include <linux/user.h>
   39.32 -#include <linux/a.out.h>
   39.33 -#include <linux/interrupt.h>
   39.34 -#include <linux/config.h>
   39.35 -#include <linux/delay.h>
   39.36 -#include <linux/reboot.h>
   39.37 -#include <linux/init.h>
   39.38 -#include <linux/mc146818rtc.h>
   39.39 -
   39.40 -#include <asm/uaccess.h>
   39.41 -#include <asm/pgtable.h>
   39.42 -#include <asm/system.h>
   39.43 -#include <asm/io.h>
   39.44 -#include <asm/ldt.h>
   39.45 -#include <asm/processor.h>
   39.46 -#include <asm/i387.h>
   39.47 -#include <asm/desc.h>
   39.48 -#include <asm/mmu_context.h>
   39.49 -#include <asm-xen/xen-public/physdev.h>
   39.50 -
   39.51 -#include <linux/irq.h>
   39.52 -
   39.53 -asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
   39.54 -
   39.55 -int hlt_counter;
   39.56 -
   39.57 -/*
   39.58 - * Powermanagement idle function, if any..
   39.59 - */
   39.60 -void (*pm_idle)(void);
   39.61 -
   39.62 -/*
   39.63 - * Power off function, if any
   39.64 - */
   39.65 -void (*pm_power_off)(void);
   39.66 -
   39.67 -void disable_hlt(void)
   39.68 -{
   39.69 -    hlt_counter++;
   39.70 -}
   39.71 -
   39.72 -void enable_hlt(void)
   39.73 -{
   39.74 -    hlt_counter--;
   39.75 -}
   39.76 -
   39.77 -/*
   39.78 - * The idle thread. There's no useful work to be
   39.79 - * done, so just try to conserve power and have a
   39.80 - * low exit latency (ie sit in a loop waiting for
   39.81 - * somebody to say that they'd like to reschedule)
   39.82 - */
   39.83 -void cpu_idle (void)
   39.84 -{
   39.85 -    extern int set_timeout_timer(void);
   39.86 -
   39.87 -    /* Endless idle loop with no priority at all. */
   39.88 -    init_idle();
   39.89 -    current->nice = 20;
   39.90 -    current->counter = -100;
   39.91 -
   39.92 -    for ( ; ; )
   39.93 -    {
   39.94 -        while ( !current->need_resched )
   39.95 -        {
   39.96 -            __cli();
   39.97 -            if ( current->need_resched )
   39.98 -            {
   39.99 -                /* The race-free check for events failed. */
  39.100 -                __sti();
  39.101 -                break;
  39.102 -            }
  39.103 -            else if ( set_timeout_timer() == 0 )
  39.104 -            {
  39.105 -                /* NB. Blocking reenable events in a race-free manner. */
  39.106 -                HYPERVISOR_block();
  39.107 -            }
  39.108 -            else
  39.109 -            {
  39.110 -                /* No race here: yielding will get us the CPU again anyway. */
  39.111 -                __sti();
  39.112 -                HYPERVISOR_yield();
  39.113 -            }
  39.114 -        }
  39.115 -        schedule();
  39.116 -        check_pgt_cache();
  39.117 -    }
  39.118 -}
  39.119 -
  39.120 -extern void show_trace(unsigned long* esp);
  39.121 -
  39.122 -void show_regs(struct pt_regs * regs)
  39.123 -{
  39.124 -    printk("\n");
  39.125 -    printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
  39.126 -    printk("EIP: %04x:[<%08lx>] CPU: %d",0xffff & regs->xcs,regs->eip, smp_processor_id());
  39.127 -    if (regs->xcs & 2)
  39.128 -        printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
  39.129 -    printk(" EFLAGS: %08lx    %s\n",regs->eflags, print_tainted());
  39.130 -    printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
  39.131 -           regs->eax,regs->ebx,regs->ecx,regs->edx);
  39.132 -    printk("ESI: %08lx EDI: %08lx EBP: %08lx",
  39.133 -           regs->esi, regs->edi, regs->ebp);
  39.134 -    printk(" DS: %04x ES: %04x\n",
  39.135 -           0xffff & regs->xds,0xffff & regs->xes);
  39.136 -
  39.137 -    show_trace(&regs->esp);
  39.138 -}
  39.139 -
  39.140 -
  39.141 -/*
  39.142 - * Create a kernel thread
  39.143 - */
  39.144 -int arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
  39.145 -{
  39.146 -    long retval, d0;
  39.147 -
  39.148 -    __asm__ __volatile__(
  39.149 -        "movl %%esp,%%esi\n\t"
  39.150 -        "int $0x80\n\t"		/* Linux/i386 system call */
  39.151 -        "cmpl %%esp,%%esi\n\t"	/* child or parent? */
  39.152 -        "je 1f\n\t"		/* parent - jump */
  39.153 -        /* Load the argument into eax, and push it.  That way, it does
  39.154 -         * not matter whether the called function is compiled with
  39.155 -         * -mregparm or not.  */
  39.156 -        "movl %4,%%eax\n\t"
  39.157 -        "pushl %%eax\n\t"		
  39.158 -        "call *%5\n\t"		/* call fn */
  39.159 -        "movl %3,%0\n\t"	/* exit */
  39.160 -        "int $0x80\n"
  39.161 -        "1:\t"
  39.162 -        :"=&a" (retval), "=&S" (d0)
  39.163 -        :"0" (__NR_clone), "i" (__NR_exit),
  39.164 -        "r" (arg), "r" (fn),
  39.165 -        "b" (flags | CLONE_VM)
  39.166 -        : "memory");
  39.167 -
  39.168 -    return retval;
  39.169 -}
  39.170 -
  39.171 -/*
  39.172 - * Free current thread data structures etc..
  39.173 - */
  39.174 -void exit_thread(void)
  39.175 -{
  39.176 -    /* nothing to do ... */
  39.177 -}
  39.178 -
  39.179 -void flush_thread(void)
  39.180 -{
  39.181 -    struct task_struct *tsk = current;
  39.182 -
  39.183 -    memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
  39.184 -
  39.185 -    /*
  39.186 -     * Forget coprocessor state..
  39.187 -     */
  39.188 -    clear_fpu(tsk);
  39.189 -    tsk->used_math = 0;
  39.190 -}
  39.191 -
  39.192 -void release_thread(struct task_struct *dead_task)
  39.193 -{
  39.194 -    if (dead_task->mm) {
  39.195 -        // temporary debugging check
  39.196 -        if (dead_task->mm->context.size) {
  39.197 -            printk("WARNING: dead process %8s still has LDT? <%p/%08x>\n",
  39.198 -                   dead_task->comm, 
  39.199 -		   dead_task->mm->context.ldt,
  39.200 -		   dead_task->mm->context.size);
  39.201 -            BUG();
  39.202 -        }
  39.203 -    }
  39.204 -    //release_x86_irqs(dead_task);
  39.205 -}
  39.206 -
  39.207 -
  39.208 -/*
  39.209 - * Save a segment.
  39.210 - */
  39.211 -#define savesegment(seg,value) \
  39.212 -	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
  39.213 -
  39.214 -int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
  39.215 -                unsigned long unused,
  39.216 -                struct task_struct * p, struct pt_regs * regs)
  39.217 -{
  39.218 -    struct pt_regs * childregs;
  39.219 -
  39.220 -    childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p)) - 1;
  39.221 -    struct_cpy(childregs, regs);
  39.222 -    childregs->eax = 0;
  39.223 -    childregs->esp = esp;
  39.224 -
  39.225 -    p->thread.esp = (unsigned long) childregs;
  39.226 -    p->thread.esp0 = (unsigned long) (childregs+1);
  39.227 -
  39.228 -    p->thread.eip = (unsigned long) ret_from_fork;
  39.229 -
  39.230 -    savesegment(fs,p->thread.fs);
  39.231 -    savesegment(gs,p->thread.gs);
  39.232 -
  39.233 -    unlazy_fpu(current);
  39.234 -    struct_cpy(&p->thread.i387, &current->thread.i387);
  39.235 -
  39.236 -    p->thread.io_pl = current->thread.io_pl;
  39.237 -
  39.238 -    return 0;
  39.239 -}
  39.240 -
  39.241 -/*
  39.242 - * fill in the user structure for a core dump..
  39.243 - */
  39.244 -void dump_thread(struct pt_regs * regs, struct user * dump)
  39.245 -{
  39.246 -    int i;
  39.247 -
  39.248 -/* changed the size calculations - should hopefully work better. lbt */
  39.249 -    dump->magic = CMAGIC;
  39.250 -    dump->start_code = 0;
  39.251 -    dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
  39.252 -    dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
  39.253 -    dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
  39.254 -    dump->u_dsize -= dump->u_tsize;
  39.255 -    dump->u_ssize = 0;
  39.256 -    for (i = 0; i < 8; i++)
  39.257 -        dump->u_debugreg[i] = current->thread.debugreg[i];  
  39.258 -
  39.259 -    if (dump->start_stack < TASK_SIZE)
  39.260 -        dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
  39.261 -
  39.262 -    dump->regs.ebx = regs->ebx;
  39.263 -    dump->regs.ecx = regs->ecx;
  39.264 -    dump->regs.edx = regs->edx;
  39.265 -    dump->regs.esi = regs->esi;
  39.266 -    dump->regs.edi = regs->edi;
  39.267 -    dump->regs.ebp = regs->ebp;
  39.268 -    dump->regs.eax = regs->eax;
  39.269 -    dump->regs.ds = regs->xds;
  39.270 -    dump->regs.es = regs->xes;
  39.271 -    savesegment(fs,dump->regs.fs);
  39.272 -    savesegment(gs,dump->regs.gs);
  39.273 -    dump->regs.orig_eax = regs->orig_eax;
  39.274 -    dump->regs.eip = regs->eip;
  39.275 -    dump->regs.cs = regs->xcs;
  39.276 -    dump->regs.eflags = regs->eflags;
  39.277 -    dump->regs.esp = regs->esp;
  39.278 -    dump->regs.ss = regs->xss;
  39.279 -
  39.280 -    dump->u_fpvalid = dump_fpu (regs, &dump->i387);
  39.281 -}
  39.282 -
  39.283 -/*
  39.284 - *	switch_to(x,yn) should switch tasks from x to y.
  39.285 - *
  39.286 - * We fsave/fwait so that an exception goes off at the right time
  39.287 - * (as a call from the fsave or fwait in effect) rather than to
  39.288 - * the wrong process. Lazy FP saving no longer makes any sense
  39.289 - * with modern CPU's, and this simplifies a lot of things (SMP
  39.290 - * and UP become the same).
  39.291 - *
  39.292 - * NOTE! We used to use the x86 hardware context switching. The
  39.293 - * reason for not using it any more becomes apparent when you
  39.294 - * try to recover gracefully from saved state that is no longer
  39.295 - * valid (stale segment register values in particular). With the
  39.296 - * hardware task-switch, there is no way to fix up bad state in
  39.297 - * a reasonable manner.
  39.298 - *
  39.299 - * The fact that Intel documents the hardware task-switching to
  39.300 - * be slow is a fairly red herring - this code is not noticeably
  39.301 - * faster. However, there _is_ some room for improvement here,
  39.302 - * so the performance issues may eventually be a valid point.
  39.303 - * More important, however, is the fact that this allows us much
  39.304 - * more flexibility.
  39.305 - */
  39.306 -void fastcall __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
  39.307 -{
  39.308 -    struct thread_struct *next = &next_p->thread;
  39.309 -    physdev_op_t op;
  39.310 -    multicall_entry_t _mcl[8], *mcl = _mcl;
  39.311 -
  39.312 -    /*
  39.313 -     * This is basically 'unlazy_fpu', except that we queue a multicall to 
  39.314 -     * indicate FPU task switch, rather than synchronously trapping to Xen.
  39.315 -     */
  39.316 -    if ( prev_p->flags & PF_USEDFPU )
  39.317 -    {
  39.318 -	if ( cpu_has_fxsr )
  39.319 -            asm volatile( "fxsave %0 ; fnclex"
  39.320 -                          : "=m" (prev_p->thread.i387.fxsave) );
  39.321 -	else
  39.322 -            asm volatile( "fnsave %0 ; fwait"
  39.323 -                          : "=m" (prev_p->thread.i387.fsave) );
  39.324 -	prev_p->flags &= ~PF_USEDFPU;
  39.325 -        mcl->op      = __HYPERVISOR_fpu_taskswitch;
  39.326 -        mcl->args[0] = 1;
  39.327 -        mcl++;
  39.328 -    }
  39.329 -
  39.330 -    mcl->op      = __HYPERVISOR_stack_switch;
  39.331 -    mcl->args[0] = __KERNEL_DS;
  39.332 -    mcl->args[1] = next->esp0;
  39.333 -    mcl++;
  39.334 -
  39.335 -    if ( prev_p->thread.io_pl != next->io_pl ) 
  39.336 -    {
  39.337 -        op.cmd             = PHYSDEVOP_SET_IOPL;
  39.338 -	op.u.set_iopl.iopl = next->io_pl;
  39.339 -        mcl->op      = __HYPERVISOR_physdev_op;
  39.340 -        mcl->args[0] = (unsigned long)&op;
  39.341 -        mcl++;
  39.342 -    }
  39.343 -
  39.344 -    (void)HYPERVISOR_multicall(_mcl, mcl - _mcl);
  39.345 -
  39.346 -    /*
  39.347 -     * Restore %fs and %gs.
  39.348 -     */
  39.349 -    loadsegment(fs, next->fs);
  39.350 -    loadsegment(gs, next->gs);
  39.351 -
  39.352 -    /*
  39.353 -     * Now maybe reload the debug registers
  39.354 -     */
  39.355 -    if ( next->debugreg[7] != 0 )
  39.356 -    {
  39.357 -        HYPERVISOR_set_debugreg(0, next->debugreg[0]);
  39.358 -        HYPERVISOR_set_debugreg(1, next->debugreg[1]);
  39.359 -        HYPERVISOR_set_debugreg(2, next->debugreg[2]);
  39.360 -        HYPERVISOR_set_debugreg(3, next->debugreg[3]);
  39.361 -        /* no 4 and 5 */
  39.362 -        HYPERVISOR_set_debugreg(6, next->debugreg[6]);
  39.363 -        HYPERVISOR_set_debugreg(7, next->debugreg[7]);
  39.364 -    }
  39.365 -}
  39.366 -
  39.367 -asmlinkage int sys_fork(struct pt_regs regs)
  39.368 -{
  39.369 -    return do_fork(SIGCHLD, regs.esp, &regs, 0);
  39.370 -}
  39.371 -
  39.372 -asmlinkage int sys_clone(struct pt_regs regs)
  39.373 -{
  39.374 -    unsigned long clone_flags;
  39.375 -    unsigned long newsp;
  39.376 -
  39.377 -    clone_flags = regs.ebx;
  39.378 -    newsp = regs.ecx;
  39.379 -    if (!newsp)
  39.380 -        newsp = regs.esp;
  39.381 -    return do_fork(clone_flags, newsp, &regs, 0);
  39.382 -}
  39.383 -
  39.384 -/*
  39.385 - * This is trivial, and on the face of it looks like it
  39.386 - * could equally well be done in user mode.
  39.387 - *
  39.388 - * Not so, for quite unobvious reasons - register pressure.
  39.389 - * In user mode vfork() cannot have a stack frame, and if
  39.390 - * done by calling the "clone()" system call directly, you
  39.391 - * do not have enough call-clobbered registers to hold all
  39.392 - * the information you need.
  39.393 - */
  39.394 -asmlinkage int sys_vfork(struct pt_regs regs)
  39.395 -{
  39.396 -    return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0);
  39.397 -}
  39.398 -
  39.399 -/*
  39.400 - * sys_execve() executes a new program.
  39.401 - */
  39.402 -asmlinkage int sys_execve(struct pt_regs regs)
  39.403 -{
  39.404 -    int error;
  39.405 -    char * filename;
  39.406 -
  39.407 -    filename = getname((char *) regs.ebx);
  39.408 -    error = PTR_ERR(filename);
  39.409 -    if (IS_ERR(filename))
  39.410 -        goto out;
  39.411 -    error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, &regs);
  39.412 -    if (error == 0)
  39.413 -        current->ptrace &= ~PT_DTRACE;
  39.414 -    putname(filename);
  39.415 - out:
  39.416 -    return error;
  39.417 -}
  39.418 -
  39.419 -/*
  39.420 - * These bracket the sleeping functions..
  39.421 - */
  39.422 -extern void scheduling_functions_start_here(void);
  39.423 -extern void scheduling_functions_end_here(void);
  39.424 -#define first_sched	((unsigned long) scheduling_functions_start_here)
  39.425 -#define last_sched	((unsigned long) scheduling_functions_end_here)
  39.426 -
  39.427 -unsigned long get_wchan(struct task_struct *p)
  39.428 -{
  39.429 -    unsigned long ebp, esp, eip;
  39.430 -    unsigned long stack_page;
  39.431 -    int count = 0;
  39.432 -    if (!p || p == current || p->state == TASK_RUNNING)
  39.433 -        return 0;
  39.434 -    stack_page = (unsigned long)p;
  39.435 -    esp = p->thread.esp;
  39.436 -    if (!stack_page || esp < stack_page || esp > 8188+stack_page)
  39.437 -        return 0;
  39.438 -    /* include/asm-i386/system.h:switch_to() pushes ebp last. */
  39.439 -    ebp = *(unsigned long *) esp;
  39.440 -    do {
  39.441 -        if (ebp < stack_page || ebp > 8184+stack_page)
  39.442 -            return 0;
  39.443 -        eip = *(unsigned long *) (ebp+4);
  39.444 -        if (eip < first_sched || eip >= last_sched)
  39.445 -            return eip;
  39.446 -        ebp = *(unsigned long *) ebp;
  39.447 -    } while (count++ < 16);
  39.448 -    return 0;
  39.449 -}
  39.450 -#undef last_sched
  39.451 -#undef first_sched
    40.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/setup.c	Sat Oct 08 11:37:45 2005 -0600
    40.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.3 @@ -1,1213 +0,0 @@
    40.4 -/*
    40.5 - *  linux/arch/i386/kernel/setup.c
    40.6 - *
    40.7 - *  Copyright (C) 1995  Linus Torvalds
    40.8 - */
    40.9 -
   40.10 -/*
   40.11 - * This file handles the architecture-dependent parts of initialization
   40.12 - */
   40.13 -
   40.14 -#define __KERNEL_SYSCALLS__
   40.15 -static int errno;
   40.16 -#include <linux/errno.h>
   40.17 -#include <linux/sched.h>
   40.18 -#include <linux/kernel.h>
   40.19 -#include <linux/mm.h>
   40.20 -#include <linux/stddef.h>
   40.21 -#include <linux/unistd.h>
   40.22 -#include <linux/ptrace.h>
   40.23 -#include <linux/slab.h>
   40.24 -#include <linux/user.h>
   40.25 -#include <linux/a.out.h>
   40.26 -#include <linux/tty.h>
   40.27 -#include <linux/ioport.h>
   40.28 -#include <linux/delay.h>
   40.29 -#include <linux/config.h>
   40.30 -#include <linux/init.h>
   40.31 -#include <linux/apm_bios.h>
   40.32 -#ifdef CONFIG_BLK_DEV_RAM
   40.33 -#include <linux/blk.h>
   40.34 -#endif
   40.35 -#include <linux/highmem.h>
   40.36 -#include <linux/bootmem.h>
   40.37 -#include <linux/seq_file.h>
   40.38 -#include <linux/reboot.h>
   40.39 -#include <asm/processor.h>
   40.40 -#include <linux/console.h>
   40.41 -#include <linux/module.h>
   40.42 -#include <asm/mtrr.h>
   40.43 -#include <asm/uaccess.h>
   40.44 -#include <asm/system.h>
   40.45 -#include <asm/io.h>
   40.46 -#include <asm/smp.h>
   40.47 -#include <asm/msr.h>
   40.48 -#include <asm/desc.h>
   40.49 -#include <asm/dma.h>
   40.50 -#include <asm/mpspec.h>
   40.51 -#include <asm/mmu_context.h>
   40.52 -#include <asm/ctrl_if.h>
   40.53 -#include <asm/hypervisor.h>
   40.54 -#include <asm-xen/xen-public/physdev.h>
   40.55 -#include <linux/netdevice.h>
   40.56 -#include <linux/rtnetlink.h>
   40.57 -#include <linux/tqueue.h>
   40.58 -#include <net/pkt_sched.h> /* dev_(de)activate */
   40.59 -
   40.60 -/*
   40.61 - * Point at the empty zero page to start with. We map the real shared_info
   40.62 - * page as soon as fixmap is up and running.
   40.63 - */
   40.64 -shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
   40.65 -
   40.66 -unsigned int *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
   40.67 -
   40.68 -/*
   40.69 - * Machine setup..
   40.70 - */
   40.71 -
   40.72 -char ignore_irq13;		/* set if exception 16 works */
   40.73 -struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
   40.74 -
   40.75 -unsigned long mmu_cr4_features;
   40.76 -
   40.77 -unsigned char * vgacon_mmap;
   40.78 -
   40.79 -/*
   40.80 - * Bus types ..
   40.81 - */
   40.82 -#ifdef CONFIG_EISA
   40.83 -int EISA_bus;
   40.84 -#endif
   40.85 -int MCA_bus;
   40.86 -
   40.87 -/* for MCA, but anyone else can use it if they want */
   40.88 -unsigned int machine_id;
   40.89 -unsigned int machine_submodel_id;
   40.90 -unsigned int BIOS_revision;
   40.91 -unsigned int mca_pentium_flag;
   40.92 -
   40.93 -/* For PCI or other memory-mapped resources */
   40.94 -unsigned long pci_mem_start = 0x10000000;
   40.95 -
   40.96 -/*
   40.97 - * Setup options
   40.98 - */
   40.99 -struct drive_info_struct { char dummy[32]; } drive_info;
  40.100 -struct screen_info screen_info;
  40.101 -struct apm_info apm_info;
  40.102 -struct sys_desc_table_struct {
  40.103 -    unsigned short length;
  40.104 -    unsigned char table[0];
  40.105 -};
  40.106 -
  40.107 -unsigned char aux_device_present;
  40.108 -
  40.109 -extern int root_mountflags;
  40.110 -extern char _text, _etext, _edata, _end;
  40.111 -
  40.112 -extern int blk_nohighio;
  40.113 -
  40.114 -int enable_acpi_smp_table;
  40.115 -
  40.116 -/* Raw start-of-day parameters from the hypervisor. */
  40.117 -union xen_start_info_union xen_start_info_union;
  40.118 -
  40.119 -#define COMMAND_LINE_SIZE MAX_GUEST_CMDLINE
  40.120 -static char command_line[COMMAND_LINE_SIZE];
  40.121 -char saved_command_line[COMMAND_LINE_SIZE];
  40.122 -
  40.123 -/* parse_mem_cmdline()
  40.124 - * returns the value of the mem= boot param converted to pages or 0
  40.125 - */ 
  40.126 -static int __init parse_mem_cmdline (char ** cmdline_p)
  40.127 -{
  40.128 -    char c = ' ', *to = command_line, *from = saved_command_line;
  40.129 -    int len = 0;
  40.130 -    unsigned long long bytes;
  40.131 -    int mem_param = 0;
  40.132 -
  40.133 -    /* Save unparsed command line copy for /proc/cmdline */
  40.134 -    memcpy(saved_command_line, xen_start_info.cmd_line, COMMAND_LINE_SIZE);
  40.135 -    saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
  40.136 -
  40.137 -    for (;;) {
  40.138 -        /*
  40.139 -         * "mem=nopentium" disables the 4MB page tables.
  40.140 -         * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
  40.141 -         * to <mem>, overriding the bios size.
  40.142 -         * "mem=XXX[KkmM]@XXX[KkmM]" defines a memory region from
  40.143 -         * <start> to <start>+<mem>, overriding the bios size.
  40.144 -         */
  40.145 -        if (c == ' ' && !memcmp(from, "mem=", 4)) {
  40.146 -            if (to != command_line)
  40.147 -                to--;
  40.148 -            if (!memcmp(from+4, "nopentium", 9)) {
  40.149 -                from += 9+4;
  40.150 -            } else if (!memcmp(from+4, "exactmap", 8)) {
  40.151 -                from += 8+4;
  40.152 -            } else {
  40.153 -                bytes = memparse(from+4, &from);
  40.154 -                mem_param = bytes>>PAGE_SHIFT;
  40.155 -		if (*from == '@')
  40.156 -                    (void)memparse(from+1, &from);
  40.157 -            }
  40.158 -        }
  40.159 -
  40.160 -        c = *(from++);
  40.161 -        if (!c)
  40.162 -            break;
  40.163 -        if (COMMAND_LINE_SIZE <= ++len)
  40.164 -            break;
  40.165 -        *(to++) = c;
  40.166 -    }
  40.167 -    *to = '\0';
  40.168 -    *cmdline_p = command_line;
  40.169 -
  40.170 -    return mem_param;
  40.171 -}
  40.172 -
  40.173 -/*
  40.174 - * Every exception-fixup table is sorted (i.e., kernel main table, and every
  40.175 - * module table. Some elements may be out of order if they reference text.init,
  40.176 - * for example. 
  40.177 - */
  40.178 -static void sort_exception_table(struct exception_table_entry *start,
  40.179 -                                 struct exception_table_entry *end)
  40.180 -{
  40.181 -    struct exception_table_entry *p, *q, tmp;
  40.182 -
  40.183 -    for ( p = start; p < end; p++ )
  40.184 -    {
  40.185 -        for ( q = p-1; q > start; q-- )
  40.186 -            if ( p->insn > q->insn )
  40.187 -                break;
  40.188 -        if ( ++q != p )
  40.189 -        {
  40.190 -            tmp = *p;
  40.191 -            memmove(q+1, q, (p-q)*sizeof(*p));
  40.192 -            *q = tmp;
  40.193 -        }
  40.194 -    }
  40.195 -}
  40.196 -
  40.197 -int xen_module_init(struct module *mod)
  40.198 -{
  40.199 -    sort_exception_table(mod->ex_table_start, mod->ex_table_end);
  40.200 -    return 0;
  40.201 -}
  40.202 -
  40.203 -void __init setup_arch(char **cmdline_p)
  40.204 -{
  40.205 -    int i,j;
  40.206 -    unsigned long bootmap_size, start_pfn, lmax_low_pfn;
  40.207 -    int mem_param;  /* user specified memory size in pages */
  40.208 -    int boot_pfn;   /* low pages available for bootmem */
  40.209 -    physdev_op_t op;
  40.210 -
  40.211 -    extern void hypervisor_callback(void);
  40.212 -    extern void failsafe_callback(void);
  40.213 -
  40.214 -    extern unsigned long cpu0_pte_quicklist[];
  40.215 -    extern unsigned long cpu0_pgd_quicklist[];
  40.216 -
  40.217 -    extern const struct exception_table_entry __start___ex_table[];
  40.218 -    extern const struct exception_table_entry __stop___ex_table[];
  40.219 -
  40.220 -    extern char _stext;
  40.221 -
  40.222 -    /* Force a quick death if the kernel panics. */
  40.223 -    extern int panic_timeout;
  40.224 -    if ( panic_timeout == 0 )
  40.225 -        panic_timeout = 1;
  40.226 -
  40.227 -    /* Ensure that the kernel exception-fixup table is sorted. */
  40.228 -    sort_exception_table(__start___ex_table, __stop___ex_table);
  40.229 -
  40.230 -#ifndef CONFIG_HIGHIO
  40.231 -    blk_nohighio = 1;
  40.232 -#endif
  40.233 -
  40.234 -    HYPERVISOR_vm_assist(
  40.235 -        VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
  40.236 -    HYPERVISOR_vm_assist(
  40.237 -        VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
  40.238 -        
  40.239 -    HYPERVISOR_set_callbacks(
  40.240 -        __KERNEL_CS, (unsigned long)hypervisor_callback,
  40.241 -        __KERNEL_CS, (unsigned long)failsafe_callback);
  40.242 -
  40.243 -    boot_cpu_data.pgd_quick = cpu0_pgd_quicklist;
  40.244 -    boot_cpu_data.pte_quick = cpu0_pte_quicklist;
  40.245 -
  40.246 -    /* This must be initialized to UNNAMED_MAJOR for ipconfig to work
  40.247 -       properly.  Setting ROOT_DEV to default to /dev/ram0 breaks initrd. */
  40.248 -    ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
  40.249 -    memset(&drive_info, 0, sizeof(drive_info));
  40.250 -    memset(&screen_info, 0, sizeof(screen_info));
  40.251 -    
  40.252 -    /* This is drawn from a dump from vgacon:startup in standard Linux. */
  40.253 -    screen_info.orig_video_mode = 3; 
  40.254 -    screen_info.orig_video_isVGA = 1;
  40.255 -    screen_info.orig_video_lines = 25;
  40.256 -    screen_info.orig_video_cols = 80;
  40.257 -    screen_info.orig_video_ega_bx = 3;
  40.258 -    screen_info.orig_video_points = 16;
  40.259 -
  40.260 -    memset(&apm_info.bios, 0, sizeof(apm_info.bios));
  40.261 -    aux_device_present = 0; 
  40.262 -#ifdef CONFIG_BLK_DEV_RAM
  40.263 -    rd_image_start = 0;
  40.264 -    rd_prompt = 0;
  40.265 -    rd_doload = 0;
  40.266 -#endif
  40.267 -
  40.268 -    root_mountflags &= ~MS_RDONLY;
  40.269 -    init_mm.start_code = (unsigned long) &_text;
  40.270 -    init_mm.end_code = (unsigned long) &_etext;
  40.271 -    init_mm.end_data = (unsigned long) &_edata;
  40.272 -    init_mm.brk = (unsigned long) &_end;
  40.273 -
  40.274 -    /* The mem= kernel command line param overrides the detected amount
  40.275 -     * of memory.   For xenolinux, if this override is larger than detected
  40.276 -     * memory, then boot using only detected memory and make provisions to
  40.277 -     * use all of the override value.   The hypervisor can give this
  40.278 -     * domain more memory later on and it will be added to the free
  40.279 -     * lists at that time.   See claim_new_pages() in
  40.280 -     * arch/xen/drivers/balloon/balloon.c
  40.281 -     */
  40.282 -    mem_param = parse_mem_cmdline(cmdline_p);
  40.283 -    if (mem_param < xen_start_info.nr_pages)
  40.284 -        mem_param = xen_start_info.nr_pages;
  40.285 -
  40.286 -#define PFN_UP(x)	(((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
  40.287 -#define PFN_DOWN(x)	((x) >> PAGE_SHIFT)
  40.288 -#define PFN_PHYS(x)	((x) << PAGE_SHIFT)
  40.289 -
  40.290 -/*
  40.291 - * 128MB for vmalloc(), iomap(), kmap(), and fixaddr mappings.
  40.292 - */
  40.293 -#define VMALLOC_RESERVE	(unsigned long)(128 << 20)
  40.294 -#define MAXMEM		(unsigned long)(HYPERVISOR_VIRT_START-PAGE_OFFSET-VMALLOC_RESERVE)
  40.295 -#define MAXMEM_PFN	PFN_DOWN(MAXMEM)
  40.296 -#define MAX_NONPAE_PFN	(1 << 20)
  40.297 -
  40.298 -    /*
  40.299 -     * Determine low and high memory ranges:
  40.300 -     */
  40.301 -    lmax_low_pfn = max_pfn = mem_param;
  40.302 -    if (lmax_low_pfn > MAXMEM_PFN) {
  40.303 -        lmax_low_pfn = MAXMEM_PFN;
  40.304 -#ifndef CONFIG_HIGHMEM
  40.305 -        /* Maximum memory usable is what is directly addressable */
  40.306 -        printk(KERN_WARNING "Warning only %ldMB will be used.\n",
  40.307 -               MAXMEM>>20);
  40.308 -        if (max_pfn > MAX_NONPAE_PFN)
  40.309 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  40.310 -        else
  40.311 -            printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
  40.312 -        max_pfn = lmax_low_pfn;
  40.313 -#else /* !CONFIG_HIGHMEM */
  40.314 -#ifndef CONFIG_X86_PAE
  40.315 -        if (max_pfn > MAX_NONPAE_PFN) {
  40.316 -            max_pfn = MAX_NONPAE_PFN;
  40.317 -            printk(KERN_WARNING "Warning only 4GB will be used.\n");
  40.318 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  40.319 -        }
  40.320 -#endif /* !CONFIG_X86_PAE */
  40.321 -#endif /* !CONFIG_HIGHMEM */
  40.322 -    }
  40.323 -
  40.324 -#ifdef CONFIG_HIGHMEM
  40.325 -    highstart_pfn = highend_pfn = max_pfn;
  40.326 -    if (max_pfn > MAXMEM_PFN) {
  40.327 -        highstart_pfn = MAXMEM_PFN;
  40.328 -        printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
  40.329 -               pages_to_mb(highend_pfn - highstart_pfn));
  40.330 -    }
  40.331 -#endif
  40.332 -
  40.333 -    phys_to_machine_mapping = (unsigned int *)xen_start_info.mfn_list;
  40.334 -    cur_pgd = init_mm.pgd = (pgd_t *)xen_start_info.pt_base;
  40.335 -
  40.336 -    start_pfn = (__pa(xen_start_info.pt_base) >> PAGE_SHIFT) + 
  40.337 -        xen_start_info.nr_pt_frames;
  40.338 -
  40.339 -    /*
  40.340 -     * Initialize the boot-time allocator, and free up all RAM. Then reserve 
  40.341 -     * space for OS image, initrd, phys->machine table, bootstrap page table,
  40.342 -     * and the bootmem bitmap. 
  40.343 -     * NB. There is definitely enough room for the bootmem bitmap in the
  40.344 -     * bootstrap page table. We are guaranteed to get >=512kB unused 'padding'
  40.345 -     * for our own use after all bootstrap elements 
  40.346 -     * (see asm-xen/xen-public/xen.h).
  40.347 -     */
  40.348 -    boot_pfn = min((int)xen_start_info.nr_pages,lmax_low_pfn);
  40.349 -    bootmap_size = init_bootmem(start_pfn,boot_pfn);
  40.350 -    free_bootmem(0, PFN_PHYS(boot_pfn));
  40.351 -    reserve_bootmem(__pa(&_stext), 
  40.352 -                    PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1 - 
  40.353 -                    __pa(&_stext));
  40.354 -
  40.355 -    /* init_bootmem() set the global max_low_pfn to boot_pfn.  Now max_low_pfn 
  40.356 -     * can be set to the override value.
  40.357 -     */
  40.358 -    max_low_pfn = lmax_low_pfn;
  40.359 -
  40.360 -#ifdef CONFIG_BLK_DEV_INITRD
  40.361 -    if ( xen_start_info.mod_start != 0 )
  40.362 -    {
  40.363 -        if ( (__pa(xen_start_info.mod_start) + xen_start_info.mod_len) <= 
  40.364 -             (max_low_pfn << PAGE_SHIFT) )
  40.365 -        {
  40.366 -            initrd_start = xen_start_info.mod_start;
  40.367 -            initrd_end   = initrd_start + xen_start_info.mod_len;
  40.368 -            initrd_below_start_ok = 1;
  40.369 -        }
  40.370 -        else
  40.371 -        {
  40.372 -            printk(KERN_ERR "initrd extends beyond end of memory "
  40.373 -                   "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
  40.374 -                   __pa(xen_start_info.mod_start) + xen_start_info.mod_len,
  40.375 -                   max_low_pfn << PAGE_SHIFT);
  40.376 -            initrd_start = 0;
  40.377 -        }
  40.378 -    }
  40.379 -#endif
  40.380 -
  40.381 -    paging_init();
  40.382 -
  40.383 -    /* Make sure we have a correctly sized P->M table. */
  40.384 -    if ( max_pfn != xen_start_info.nr_pages )
  40.385 -    {
  40.386 -        phys_to_machine_mapping = alloc_bootmem_low_pages(
  40.387 -            max_pfn * sizeof(unsigned long));
  40.388 -        if ( max_pfn > xen_start_info.nr_pages )
  40.389 -        {
  40.390 -            memset(phys_to_machine_mapping, ~0,
  40.391 -                   max_pfn * sizeof(unsigned long));
  40.392 -            memcpy(phys_to_machine_mapping,
  40.393 -                   (unsigned long *)xen_start_info.mfn_list,
  40.394 -                   xen_start_info.nr_pages * sizeof(unsigned long));
  40.395 -        }
  40.396 -        else
  40.397 -        {
  40.398 -            memcpy(phys_to_machine_mapping,
  40.399 -                   (unsigned long *)xen_start_info.mfn_list,
  40.400 -                   max_pfn * sizeof(unsigned long));
  40.401 -            if (HYPERVISOR_dom_mem_op(
  40.402 -                MEMOP_decrease_reservation,
  40.403 -                (unsigned long *)xen_start_info.mfn_list + max_pfn,
  40.404 -                xen_start_info.nr_pages - max_pfn, 0) !=
  40.405 -                (xen_start_info.nr_pages - max_pfn))
  40.406 -                BUG();
  40.407 -        }
  40.408 -        free_bootmem(__pa(xen_start_info.mfn_list), 
  40.409 -                     PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
  40.410 -                                     sizeof(unsigned long))));
  40.411 -    }
  40.412 -
  40.413 -    pfn_to_mfn_frame_list = alloc_bootmem_low_pages(PAGE_SIZE);
  40.414 -    for ( i=0, j=0; i < max_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ )
  40.415 -    {	
  40.416 -        pfn_to_mfn_frame_list[j] = 
  40.417 -            virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
  40.418 -    }
  40.419 -    HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
  40.420 -	virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
  40.421 -
  40.422 -    op.cmd             = PHYSDEVOP_SET_IOPL;
  40.423 -    op.u.set_iopl.iopl = current->thread.io_pl = 1;
  40.424 -    HYPERVISOR_physdev_op(&op);
  40.425 -
  40.426 -    if (xen_start_info.flags & SIF_INITDOMAIN )
  40.427 -    {
  40.428 -        if( !(xen_start_info.flags & SIF_PRIVILEGED) )
  40.429 -            panic("Xen granted us console access but not privileged status");
  40.430 -
  40.431 -#if defined(CONFIG_VT)
  40.432 -#if defined(CONFIG_VGA_CONSOLE)
  40.433 -        conswitchp = &vga_con;
  40.434 -#elif defined(CONFIG_DUMMY_CONSOLE)
  40.435 -        conswitchp = &dummy_con;
  40.436 -#endif
  40.437 -#endif
  40.438 -    }
  40.439 -}
  40.440 -
  40.441 -static int cachesize_override __initdata = -1;
  40.442 -static int __init cachesize_setup(char *str)
  40.443 -{
  40.444 -    get_option (&str, &cachesize_override);
  40.445 -    return 1;
  40.446 -}
  40.447 -__setup("cachesize=", cachesize_setup);
  40.448 -
  40.449 -static int __init highio_setup(char *str)
  40.450 -{
  40.451 -    printk("i386: disabling HIGHMEM block I/O\n");
  40.452 -    blk_nohighio = 1;
  40.453 -    return 1;
  40.454 -}
  40.455 -__setup("nohighio", highio_setup);
  40.456 -
  40.457 -static int __init get_model_name(struct cpuinfo_x86 *c)
  40.458 -{
  40.459 -    unsigned int *v;
  40.460 -    char *p, *q;
  40.461 -
  40.462 -    if (cpuid_eax(0x80000000) < 0x80000004)
  40.463 -        return 0;
  40.464 -
  40.465 -    v = (unsigned int *) c->x86_model_id;
  40.466 -    cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
  40.467 -    cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
  40.468 -    cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
  40.469 -    c->x86_model_id[48] = 0;
  40.470 -
  40.471 -    /* Intel chips right-justify this string for some dumb reason;
  40.472 -       undo that brain damage */
  40.473 -    p = q = &c->x86_model_id[0];
  40.474 -    while ( *p == ' ' )
  40.475 -        p++;
  40.476 -    if ( p != q ) {
  40.477 -        while ( *p )
  40.478 -            *q++ = *p++;
  40.479 -        while ( q <= &c->x86_model_id[48] )
  40.480 -            *q++ = '\0';	/* Zero-pad the rest */
  40.481 -    }
  40.482 -
  40.483 -    return 1;
  40.484 -}
  40.485 -
  40.486 -
  40.487 -static void __init display_cacheinfo(struct cpuinfo_x86 *c)
  40.488 -{
  40.489 -    unsigned int n, dummy, ecx, edx, l2size;
  40.490 -
  40.491 -    n = cpuid_eax(0x80000000);
  40.492 -
  40.493 -    if (n >= 0x80000005) {
  40.494 -        cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
  40.495 -        printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n",
  40.496 -               edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
  40.497 -        c->x86_cache_size=(ecx>>24)+(edx>>24);	
  40.498 -    }
  40.499 -
  40.500 -    if (n < 0x80000006)	/* Some chips just has a large L1. */
  40.501 -        return;
  40.502 -
  40.503 -    ecx = cpuid_ecx(0x80000006);
  40.504 -    l2size = ecx >> 16;
  40.505 -
  40.506 -    /* AMD errata T13 (order #21922) */
  40.507 -    if ((c->x86_vendor == X86_VENDOR_AMD) && (c->x86 == 6)) {
  40.508 -        if (c->x86_model == 3 && c->x86_mask == 0)	/* Duron Rev A0 */
  40.509 -            l2size = 64;
  40.510 -        if (c->x86_model == 4 &&
  40.511 -            (c->x86_mask==0 || c->x86_mask==1))	/* Tbird rev A1/A2 */
  40.512 -            l2size = 256;
  40.513 -    }
  40.514 -
  40.515 -    /* Intel PIII Tualatin. This comes in two flavours.
  40.516 -     * One has 256kb of cache, the other 512. We have no way
  40.517 -     * to determine which, so we use a boottime override
  40.518 -     * for the 512kb model, and assume 256 otherwise.
  40.519 -     */
  40.520 -    if ((c->x86_vendor == X86_VENDOR_INTEL) && (c->x86 == 6) &&
  40.521 -        (c->x86_model == 11) && (l2size == 0))
  40.522 -        l2size = 256;
  40.523 -
  40.524 -    if (c->x86_vendor == X86_VENDOR_CENTAUR) {
  40.525 -	/* VIA C3 CPUs (670-68F) need further shifting. */
  40.526 -	if ((c->x86 == 6) &&
  40.527 -	    ((c->x86_model == 7) || (c->x86_model == 8))) {
  40.528 -		l2size >>= 8;
  40.529 -	}
  40.530 -
  40.531 -	/* VIA also screwed up Nehemiah stepping 1, and made
  40.532 -	   it return '65KB' instead of '64KB'
  40.533 -	   - Note, it seems this may only be in engineering samples. */
  40.534 -	if ((c->x86==6) && (c->x86_model==9) &&
  40.535 -	    (c->x86_mask==1) && (l2size==65))
  40.536 -		l2size -= 1;
  40.537 -    }
  40.538 -
  40.539 -    /* Allow user to override all this if necessary. */
  40.540 -    if (cachesize_override != -1)
  40.541 -        l2size = cachesize_override;
  40.542 -
  40.543 -    if ( l2size == 0 )
  40.544 -        return;		/* Again, no L2 cache is possible */
  40.545 -
  40.546 -    c->x86_cache_size = l2size;
  40.547 -
  40.548 -    printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n",
  40.549 -           l2size, ecx & 0xFF);
  40.550 -}
  40.551 -
  40.552 -static void __init init_c3(struct cpuinfo_x86 *c)
  40.553 -{
  40.554 -    /* Test for Centaur Extended Feature Flags presence */
  40.555 -    if (cpuid_eax(0xC0000000) >= 0xC0000001) {
  40.556 -        /* store Centaur Extended Feature Flags as
  40.557 -         * word 5 of the CPU capability bit array
  40.558 -         */
  40.559 -        c->x86_capability[5] = cpuid_edx(0xC0000001);
  40.560 -    }
  40.561 -   
  40.562 -    switch (c->x86_model) {
  40.563 -    case 9:	/* Nehemiah */
  40.564 -    default:
  40.565 -        get_model_name(c);
  40.566 -        display_cacheinfo(c);
  40.567 -        break;
  40.568 -    }
  40.569 -}
  40.570 -
  40.571 -static void __init init_centaur(struct cpuinfo_x86 *c)
  40.572 -{
  40.573 -    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  40.574 -       3DNow is IDd by bit 31 in extended CPUID (1*3231) anyway */
  40.575 -    clear_bit(0*32+31, &c->x86_capability);
  40.576 -  
  40.577 -    switch (c->x86) {
  40.578 -    case 6:
  40.579 -        init_c3(c);
  40.580 -        break;
  40.581 -    default:
  40.582 -        panic("Unsupported Centaur CPU (%i)\n", c->x86);
  40.583 -    }
  40.584 -}
  40.585 -
  40.586 -static int __init init_amd(struct cpuinfo_x86 *c)
  40.587 -{
  40.588 -    int r;
  40.589 -
  40.590 -    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  40.591 -       3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
  40.592 -    clear_bit(0*32+31, &c->x86_capability);
  40.593 -	
  40.594 -    r = get_model_name(c);
  40.595 -
  40.596 -    switch(c->x86)
  40.597 -    {
  40.598 -    case 5: /* We don't like AMD K6 */
  40.599 -        panic("Unsupported AMD processor\n");
  40.600 -    case 6:	/* An Athlon/Duron. We can trust the BIOS probably */
  40.601 -        break;
  40.602 -    }
  40.603 -
  40.604 -    display_cacheinfo(c);
  40.605 -    return r;
  40.606 -}
  40.607 -
  40.608 -
  40.609 -static void __init init_intel(struct cpuinfo_x86 *c)
  40.610 -{
  40.611 -    char *p = NULL;
  40.612 -    unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */
  40.613 -
  40.614 -    if (c->cpuid_level > 1) {
  40.615 -        /* supports eax=2  call */
  40.616 -        int i, j, n;
  40.617 -        int regs[4];
  40.618 -        unsigned char *dp = (unsigned char *)regs;
  40.619 -
  40.620 -        /* Number of times to iterate */
  40.621 -        n = cpuid_eax(2) & 0xFF;
  40.622 -
  40.623 -        for ( i = 0 ; i < n ; i++ ) {
  40.624 -            cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
  40.625 -			
  40.626 -            /* If bit 31 is set, this is an unknown format */
  40.627 -            for ( j = 0 ; j < 3 ; j++ ) {
  40.628 -                if ( regs[j] < 0 ) regs[j] = 0;
  40.629 -            }
  40.630 -
  40.631 -            /* Byte 0 is level count, not a descriptor */
  40.632 -            for ( j = 1 ; j < 16 ; j++ ) {
  40.633 -                unsigned char des = dp[j];
  40.634 -                unsigned char dl, dh;
  40.635 -                unsigned int cs;
  40.636 -
  40.637 -                dh = des >> 4;
  40.638 -                dl = des & 0x0F;
  40.639 -
  40.640 -				/* Black magic... */
  40.641 -
  40.642 -                switch ( dh )
  40.643 -                {
  40.644 -                case 0:
  40.645 -                    switch ( dl ) {
  40.646 -                    case 6:
  40.647 -                        /* L1 I cache */
  40.648 -                        l1i += 8;
  40.649 -                        break;
  40.650 -                    case 8:
  40.651 -                        /* L1 I cache */
  40.652 -                        l1i += 16;
  40.653 -                        break;
  40.654 -                    case 10:
  40.655 -                        /* L1 D cache */
  40.656 -                        l1d += 8;
  40.657 -                        break;
  40.658 -                    case 12:
  40.659 -                        /* L1 D cache */
  40.660 -                        l1d += 16;
  40.661 -                        break;
  40.662 -                    default:;
  40.663 -                        /* TLB, or unknown */
  40.664 -                    }
  40.665 -                    break;
  40.666 -                case 2:
  40.667 -                    if ( dl ) {
  40.668 -                        /* L3 cache */
  40.669 -                        cs = (dl-1) << 9;
  40.670 -                        l3 += cs;
  40.671 -                    }
  40.672 -                    break;
  40.673 -                case 4:
  40.674 -                    if ( c->x86 > 6 && dl ) {
  40.675 -                        /* P4 family */
  40.676 -                        /* L3 cache */
  40.677 -                        cs = 128 << (dl-1);
  40.678 -                        l3 += cs;
  40.679 -                        break;
  40.680 -                    }
  40.681 -                    /* else same as 8 - fall through */
  40.682 -                case 8:
  40.683 -                    if ( dl ) {
  40.684 -                        /* L2 cache */
  40.685 -                        cs = 128 << (dl-1);
  40.686 -                        l2 += cs;
  40.687 -                    }
  40.688 -                    break;
  40.689 -                case 6:
  40.690 -                    if (dl > 5) {
  40.691 -                        /* L1 D cache */
  40.692 -                        cs = 8<<(dl-6);
  40.693 -                        l1d += cs;
  40.694 -                    }
  40.695 -                    break;
  40.696 -                case 7:
  40.697 -                    if ( dl >= 8 ) 
  40.698 -                    {
  40.699 -                        /* L2 cache */
  40.700 -                        cs = 64<<(dl-8);
  40.701 -                        l2 += cs;
  40.702 -                    } else {
  40.703 -                        /* L0 I cache, count as L1 */
  40.704 -                        cs = dl ? (16 << (dl-1)) : 12;
  40.705 -                        l1i += cs;
  40.706 -                    }
  40.707 -                    break;
  40.708 -                default:
  40.709 -                    /* TLB, or something else we don't know about */
  40.710 -                    break;
  40.711 -                }
  40.712 -            }
  40.713 -        }
  40.714 -        if ( l1i || l1d )
  40.715 -            printk(KERN_INFO "CPU: L1 I cache: %dK, L1 D cache: %dK\n",
  40.716 -                   l1i, l1d);
  40.717 -        if ( l2 )
  40.718 -            printk(KERN_INFO "CPU: L2 cache: %dK\n", l2);
  40.719 -        if ( l3 )
  40.720 -            printk(KERN_INFO "CPU: L3 cache: %dK\n", l3);
  40.721 -
  40.722 -        /*
  40.723 -         * This assumes the L3 cache is shared; it typically lives in
  40.724 -         * the northbridge.  The L1 caches are included by the L2
  40.725 -         * cache, and so should not be included for the purpose of
  40.726 -         * SMP switching weights.
  40.727 -         */
  40.728 -        c->x86_cache_size = l2 ? l2 : (l1i+l1d);
  40.729 -    }
  40.730 -
  40.731 -    /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it */
  40.732 -    if ( c->x86 == 6 && c->x86_model < 3 && c->x86_mask < 3 )
  40.733 -        clear_bit(X86_FEATURE_SEP, &c->x86_capability);
  40.734 -	
  40.735 -    /* Names for the Pentium II/Celeron processors 
  40.736 -       detectable only by also checking the cache size.
  40.737 -       Dixon is NOT a Celeron. */
  40.738 -    if (c->x86 == 6) {
  40.739 -        switch (c->x86_model) {
  40.740 -        case 5:
  40.741 -            if (l2 == 0)
  40.742 -                p = "Celeron (Covington)";
  40.743 -            if (l2 == 256)
  40.744 -                p = "Mobile Pentium II (Dixon)";
  40.745 -            break;
  40.746 -			
  40.747 -        case 6:
  40.748 -            if (l2 == 128)
  40.749 -                p = "Celeron (Mendocino)";
  40.750 -            break;
  40.751 -			
  40.752 -        case 8:
  40.753 -            if (l2 == 128)
  40.754 -                p = "Celeron (Coppermine)";
  40.755 -            break;
  40.756 -        }
  40.757 -    }
  40.758 -
  40.759 -    if ( p )
  40.760 -        strcpy(c->x86_model_id, p);
  40.761 -}
  40.762 -
  40.763 -void __init get_cpu_vendor(struct cpuinfo_x86 *c)
  40.764 -{
  40.765 -    char *v = c->x86_vendor_id;
  40.766 -
  40.767 -    if (!strcmp(v, "GenuineIntel"))
  40.768 -        c->x86_vendor = X86_VENDOR_INTEL;
  40.769 -    else if (!strcmp(v, "AuthenticAMD"))
  40.770 -        c->x86_vendor = X86_VENDOR_AMD;
  40.771 -    else if (!strcmp(v, "CentaurHauls"))
  40.772 -        c->x86_vendor = X86_VENDOR_CENTAUR;
  40.773 -    else
  40.774 -        c->x86_vendor = X86_VENDOR_UNKNOWN;
  40.775 -}
  40.776 -
  40.777 -struct cpu_model_info {
  40.778 -    int vendor;
  40.779 -    int family;
  40.780 -    char *model_names[16];
  40.781 -};
  40.782 -
  40.783 -/* Naming convention should be: <Name> [(<Codename>)] */
  40.784 -/* This table only is used unless init_<vendor>() below doesn't set it; */
  40.785 -/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
  40.786 -static struct cpu_model_info cpu_models[] __initdata = {
  40.787 -    { X86_VENDOR_INTEL,	6,
  40.788 -      { "Pentium Pro A-step", "Pentium Pro", NULL, "Pentium II (Klamath)", 
  40.789 -        NULL, "Pentium II (Deschutes)", "Mobile Pentium II",
  40.790 -        "Pentium III (Katmai)", "Pentium III (Coppermine)", NULL,
  40.791 -        "Pentium III (Cascades)", NULL, NULL, NULL, NULL }},
  40.792 -    { X86_VENDOR_AMD,	6, /* Is this this really necessary?? */
  40.793 -      { "Athlon", "Athlon",
  40.794 -        "Athlon", NULL, "Athlon", NULL,
  40.795 -        NULL, NULL, NULL,
  40.796 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL }}
  40.797 -};
  40.798 -
  40.799 -/* Look up CPU names by table lookup. */
  40.800 -static char __init *table_lookup_model(struct cpuinfo_x86 *c)
  40.801 -{
  40.802 -    struct cpu_model_info *info = cpu_models;
  40.803 -    int i;
  40.804 -
  40.805 -    if ( c->x86_model >= 16 )
  40.806 -        return NULL;	/* Range check */
  40.807 -
  40.808 -    for ( i = 0 ; i < sizeof(cpu_models)/sizeof(struct cpu_model_info) ; i++ ) {
  40.809 -        if ( info->vendor == c->x86_vendor &&
  40.810 -             info->family == c->x86 ) {
  40.811 -            return info->model_names[c->x86_model];
  40.812 -        }
  40.813 -        info++;
  40.814 -    }
  40.815 -    return NULL;		/* Not found */
  40.816 -}
  40.817 -
  40.818 -
  40.819 -
  40.820 -/* Standard macro to see if a specific flag is changeable */
  40.821 -static inline int flag_is_changeable_p(u32 flag)
  40.822 -{
  40.823 -    u32 f1, f2;
  40.824 -
  40.825 -    asm("pushfl\n\t"
  40.826 -        "pushfl\n\t"
  40.827 -        "popl %0\n\t"
  40.828 -        "movl %0,%1\n\t"
  40.829 -        "xorl %2,%0\n\t"
  40.830 -        "pushl %0\n\t"
  40.831 -        "popfl\n\t"
  40.832 -        "pushfl\n\t"
  40.833 -        "popl %0\n\t"
  40.834 -        "popfl\n\t"
  40.835 -        : "=&r" (f1), "=&r" (f2)
  40.836 -        : "ir" (flag));
  40.837 -
  40.838 -    return ((f1^f2) & flag) != 0;
  40.839 -}
  40.840 -
  40.841 -
  40.842 -/* Probe for the CPUID instruction */
  40.843 -static int __init have_cpuid_p(void)
  40.844 -{
  40.845 -    return flag_is_changeable_p(X86_EFLAGS_ID);
  40.846 -}
  40.847 -
  40.848 -
  40.849 -
  40.850 -#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
  40.851 -unsigned char eddnr;
  40.852 -struct edd_info edd[EDDMAXNR];
  40.853 -unsigned int edd_disk80_sig;
  40.854 -/**
  40.855 - * copy_edd() - Copy the BIOS EDD information
  40.856 - *              from empty_zero_page into a safe place.
  40.857 - *
  40.858 - */
  40.859 -static inline void copy_edd(void)
  40.860 -{
  40.861 -     eddnr = EDD_NR;
  40.862 -     memcpy(edd, EDD_BUF, sizeof(edd));
  40.863 -     edd_disk80_sig = DISK80_SIGNATURE_BUFFER;
  40.864 -}
  40.865 -#else
  40.866 -static inline void copy_edd(void) {}
  40.867 -#endif
  40.868 -
  40.869 -/*
  40.870 - * This does the hard work of actually picking apart the CPU stuff...
  40.871 - */
  40.872 -void __init identify_cpu(struct cpuinfo_x86 *c)
  40.873 -{
  40.874 -    int junk, i;
  40.875 -    u32 xlvl, tfms;
  40.876 -
  40.877 -    c->loops_per_jiffy = loops_per_jiffy;
  40.878 -    c->x86_cache_size = -1;
  40.879 -    c->x86_vendor = X86_VENDOR_UNKNOWN;
  40.880 -    c->cpuid_level = -1;	/* CPUID not detected */
  40.881 -    c->x86_model = c->x86_mask = 0;	/* So far unknown... */
  40.882 -    c->x86_vendor_id[0] = '\0'; /* Unset */
  40.883 -    c->x86_model_id[0] = '\0';  /* Unset */
  40.884 -    memset(&c->x86_capability, 0, sizeof c->x86_capability);
  40.885 -    c->hard_math = 1;
  40.886 -
  40.887 -    if ( !have_cpuid_p() ) {
  40.888 -        panic("Processor must support CPUID\n");
  40.889 -    } else {
  40.890 -        /* CPU does have CPUID */
  40.891 -
  40.892 -        /* Get vendor name */
  40.893 -        cpuid(0x00000000, &c->cpuid_level,
  40.894 -              (int *)&c->x86_vendor_id[0],
  40.895 -              (int *)&c->x86_vendor_id[8],
  40.896 -              (int *)&c->x86_vendor_id[4]);
  40.897 -		
  40.898 -        get_cpu_vendor(c);
  40.899 -        /* Initialize the standard set of capabilities */
  40.900 -        /* Note that the vendor-specific code below might override */
  40.901 -
  40.902 -        /* Intel-defined flags: level 0x00000001 */
  40.903 -        if ( c->cpuid_level >= 0x00000001 ) {
  40.904 -                        u32 capability, excap;
  40.905 -                        cpuid(0x00000001, &tfms, &junk, &excap, &capability);
  40.906 -                        c->x86_capability[0] = capability;
  40.907 -                        c->x86_capability[4] = excap;
  40.908 -                        c->x86 = (tfms >> 8) & 15;
  40.909 -                        c->x86_model = (tfms >> 4) & 15;
  40.910 -                        if (c->x86 == 0xf) {
  40.911 -                                c->x86 += (tfms >> 20) & 0xff;
  40.912 -                                c->x86_model += ((tfms >> 16) & 0xF) << 4;
  40.913 -                        }
  40.914 -                        c->x86_mask = tfms & 15;
  40.915 -        } else {
  40.916 -            /* Have CPUID level 0 only - unheard of */
  40.917 -            c->x86 = 4;
  40.918 -        }
  40.919 -
  40.920 -        /* AMD-defined flags: level 0x80000001 */
  40.921 -        xlvl = cpuid_eax(0x80000000);
  40.922 -        if ( (xlvl & 0xffff0000) == 0x80000000 ) {
  40.923 -            if ( xlvl >= 0x80000001 )
  40.924 -                c->x86_capability[1] = cpuid_edx(0x80000001);
  40.925 -            if ( xlvl >= 0x80000004 )
  40.926 -                get_model_name(c); /* Default name */
  40.927 -        }
  40.928 -
  40.929 -        /* Transmeta-defined flags: level 0x80860001 */
  40.930 -        xlvl = cpuid_eax(0x80860000);
  40.931 -        if ( (xlvl & 0xffff0000) == 0x80860000 ) {
  40.932 -            if (  xlvl >= 0x80860001 )
  40.933 -                c->x86_capability[2] = cpuid_edx(0x80860001);
  40.934 -        }
  40.935 -    }
  40.936 -
  40.937 -    printk(KERN_DEBUG "CPU: Before vendor init, caps: %08x %08x %08x, vendor = %d\n",
  40.938 -           c->x86_capability[0],
  40.939 -           c->x86_capability[1],
  40.940 -           c->x86_capability[2],
  40.941 -           c->x86_vendor);
  40.942 -
  40.943 -    /*
  40.944 -     * Vendor-specific initialization.  In this section we
  40.945 -     * canonicalize the feature flags, meaning if there are
  40.946 -     * features a certain CPU supports which CPUID doesn't
  40.947 -     * tell us, CPUID claiming incorrect flags, or other bugs,
  40.948 -     * we handle them here.
  40.949 -     *
  40.950 -     * At the end of this section, c->x86_capability better
  40.951 -     * indicate the features this CPU genuinely supports!
  40.952 -     */
  40.953 -    switch ( c->x86_vendor ) {
  40.954 -    case X86_VENDOR_AMD:
  40.955 -        init_amd(c);
  40.956 -        break;
  40.957 -
  40.958 -    case X86_VENDOR_INTEL:
  40.959 -        init_intel(c);
  40.960 -        break;
  40.961 -
  40.962 -    case X86_VENDOR_CENTAUR:
  40.963 -        init_centaur(c);
  40.964 -        break;
  40.965 -        
  40.966 -    default:
  40.967 -        printk("Unsupported CPU vendor (%d) -- please report!\n",
  40.968 -               c->x86_vendor);
  40.969 -    }
  40.970 -	
  40.971 -    printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n",
  40.972 -           c->x86_capability[0],
  40.973 -           c->x86_capability[1],
  40.974 -           c->x86_capability[2],
  40.975 -           c->x86_capability[3]);
  40.976 -
  40.977 -
  40.978 -    /* If the model name is still unset, do table lookup. */
  40.979 -    if ( !c->x86_model_id[0] ) {
  40.980 -        char *p;
  40.981 -        p = table_lookup_model(c);
  40.982 -        if ( p )
  40.983 -            strcpy(c->x86_model_id, p);
  40.984 -        else
  40.985 -            /* Last resort... */
  40.986 -            sprintf(c->x86_model_id, "%02x/%02x",
  40.987 -                    c->x86_vendor, c->x86_model);
  40.988 -    }
  40.989 -
  40.990 -    /* Now the feature flags better reflect actual CPU features! */
  40.991 -
  40.992 -    printk(KERN_DEBUG "CPU:     After generic, caps: %08x %08x %08x %08x\n",
  40.993 -           c->x86_capability[0],
  40.994 -           c->x86_capability[1],
  40.995 -           c->x86_capability[2],
  40.996 -           c->x86_capability[3]);
  40.997 -
  40.998 -    /*
  40.999 -     * On SMP, boot_cpu_data holds the common feature set between
 40.1000 -     * all CPUs; so make sure that we indicate which features are
 40.1001 -     * common between the CPUs.  The first time this routine gets
 40.1002 -     * executed, c == &boot_cpu_data.
 40.1003 -     */
 40.1004 -    if ( c != &boot_cpu_data ) {
 40.1005 -        /* AND the already accumulated flags with these */
 40.1006 -        for ( i = 0 ; i < NCAPINTS ; i++ )
 40.1007 -            boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
 40.1008 -    }
 40.1009 -
 40.1010 -    printk(KERN_DEBUG "CPU:             Common caps: %08x %08x %08x %08x\n",
 40.1011 -           boot_cpu_data.x86_capability[0],
 40.1012 -           boot_cpu_data.x86_capability[1],
 40.1013 -           boot_cpu_data.x86_capability[2],
 40.1014 -           boot_cpu_data.x86_capability[3]);
 40.1015 -}
 40.1016 -
 40.1017 -
 40.1018 -/* These need to match <asm/processor.h> */
 40.1019 -static char *cpu_vendor_names[] __initdata = {
 40.1020 -    "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" };
 40.1021 -
 40.1022 -
 40.1023 -void __init print_cpu_info(struct cpuinfo_x86 *c)
 40.1024 -{
 40.1025 -    char *vendor = NULL;
 40.1026 -
 40.1027 -    if (c->x86_vendor < sizeof(cpu_vendor_names)/sizeof(char *))
 40.1028 -        vendor = cpu_vendor_names[c->x86_vendor];
 40.1029 -    else if (c->cpuid_level >= 0)
 40.1030 -        vendor = c->x86_vendor_id;
 40.1031 -
 40.1032 -    if (vendor && strncmp(c->x86_model_id, vendor, strlen(vendor)))
 40.1033 -        printk("%s ", vendor);
 40.1034 -
 40.1035 -    if (!c->x86_model_id[0])
 40.1036 -        printk("%d86", c->x86);
 40.1037 -    else
 40.1038 -        printk("%s", c->x86_model_id);
 40.1039 -
 40.1040 -    if (c->x86_mask || c->cpuid_level >= 0) 
 40.1041 -        printk(" stepping %02x\n", c->x86_mask);
 40.1042 -    else
 40.1043 -        printk("\n");
 40.1044 -}
 40.1045 -
 40.1046 -/*
 40.1047 - *	Get CPU information for use by the procfs.
 40.1048 - */
 40.1049 -static int show_cpuinfo(struct seq_file *m, void *v)
 40.1050 -{
 40.1051 -    /* 
 40.1052 -     * These flag bits must match the definitions in <asm/cpufeature.h>.
 40.1053 -     * NULL means this bit is undefined or reserved; either way it doesn't
 40.1054 -     * have meaning as far as Linux is concerned.  Note that it's important
 40.1055 -     * to realize there is a difference between this table and CPUID -- if
 40.1056 -     * applications want to get the raw CPUID data, they should access
 40.1057 -     * /dev/cpu/<cpu_nr>/cpuid instead.
 40.1058 -	 */
 40.1059 -    static char *x86_cap_flags[] = {
 40.1060 -        /* Intel-defined */
 40.1061 -        "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
 40.1062 -        "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
 40.1063 -        "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx",
 40.1064 -        "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe",
 40.1065 -
 40.1066 -        /* AMD-defined */
 40.1067 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1068 -        NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
 40.1069 -        NULL, NULL, NULL, "mp", NULL, NULL, "mmxext", NULL,
 40.1070 -        NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
 40.1071 -
 40.1072 -        /* Transmeta-defined */
 40.1073 -        "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
 40.1074 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1075 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1076 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1077 -
 40.1078 -        /* Other (Linux-defined) */
 40.1079 -        "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", 
 40.1080 -	NULL, NULL, NULL, NULL,
 40.1081 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1082 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1083 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1084 -
 40.1085 -        /* Intel-defined (#2) */
 40.1086 -        "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2",
 40.1087 -        "est", NULL, "cid", NULL, NULL, NULL, NULL, NULL,
 40.1088 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1089 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1090 -
 40.1091 -        /* VIA/Cyrix/Centaur-defined */
 40.1092 -        NULL, NULL, "xstore", NULL, NULL, NULL, NULL, NULL,
 40.1093 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1094 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1095 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 40.1096 -
 40.1097 -    };
 40.1098 -    struct cpuinfo_x86 *c = v;
 40.1099 -    int i, n = c - cpu_data;
 40.1100 -    int fpu_exception;
 40.1101 -
 40.1102 -#ifdef CONFIG_SMP
 40.1103 -    if (!(cpu_online_map & (1<<n)))
 40.1104 -        return 0;
 40.1105 -#endif
 40.1106 -    seq_printf(m, "processor\t: %d\n"
 40.1107 -               "vendor_id\t: %s\n"
 40.1108 -               "cpu family\t: %d\n"
 40.1109 -               "model\t\t: %d\n"
 40.1110 -               "model name\t: %s\n",
 40.1111 -               n,
 40.1112 -               c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
 40.1113 -               c->x86,
 40.1114 -               c->x86_model,
 40.1115 -               c->x86_model_id[0] ? c->x86_model_id : "unknown");
 40.1116 -
 40.1117 -    if (c->x86_mask || c->cpuid_level >= 0)
 40.1118 -        seq_printf(m, "stepping\t: %d\n", c->x86_mask);
 40.1119 -    else
 40.1120 -        seq_printf(m, "stepping\t: unknown\n");
 40.1121 -
 40.1122 -    if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) {
 40.1123 -        seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
 40.1124 -                   cpu_khz / 1000, (cpu_khz % 1000));
 40.1125 -    }
 40.1126 -
 40.1127 -    /* Cache size */
 40.1128 -    if (c->x86_cache_size >= 0)
 40.1129 -        seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
 40.1130 -	
 40.1131 -	/* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
 40.1132 -    fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu);
 40.1133 -    seq_printf(m, "fdiv_bug\t: %s\n"
 40.1134 -               "hlt_bug\t\t: %s\n"
 40.1135 -               "f00f_bug\t: %s\n"
 40.1136 -               "coma_bug\t: %s\n"
 40.1137 -               "fpu\t\t: %s\n"
 40.1138 -               "fpu_exception\t: %s\n"
 40.1139 -               "cpuid level\t: %d\n"
 40.1140 -               "wp\t\t: %s\n"
 40.1141 -               "flags\t\t:",
 40.1142 -               c->fdiv_bug ? "yes" : "no",
 40.1143 -               c->hlt_works_ok ? "no" : "yes",
 40.1144 -               c->f00f_bug ? "yes" : "no",
 40.1145 -               c->coma_bug ? "yes" : "no",
 40.1146 -               c->hard_math ? "yes" : "no",
 40.1147 -               fpu_exception ? "yes" : "no",
 40.1148 -               c->cpuid_level,
 40.1149 -               c->wp_works_ok ? "yes" : "no");
 40.1150 -
 40.1151 -    for ( i = 0 ; i < 32*NCAPINTS ; i++ )
 40.1152 -        if ( test_bit(i, &c->x86_capability) &&
 40.1153 -             x86_cap_flags[i] != NULL )
 40.1154 -            seq_printf(m, " %s", x86_cap_flags[i]);
 40.1155 -
 40.1156 -    seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
 40.1157 -               c->loops_per_jiffy/(500000/HZ),
 40.1158 -               (c->loops_per_jiffy/(5000/HZ)) % 100);
 40.1159 -    return 0;
 40.1160 -}
 40.1161 -
 40.1162 -static void *c_start(struct seq_file *m, loff_t *pos)
 40.1163 -{
 40.1164 -    return *pos < NR_CPUS ? cpu_data + *pos : NULL;
 40.1165 -}
 40.1166 -static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 40.1167 -{
 40.1168 -    ++*pos;
 40.1169 -    return c_start(m, pos);
 40.1170 -}
 40.1171 -static void c_stop(struct seq_file *m, void *v)
 40.1172 -{
 40.1173 -}
 40.1174 -struct seq_operations cpuinfo_op = {
 40.1175 -    start:	c_start,
 40.1176 -    next:	c_next,
 40.1177 -    stop:	c_stop,
 40.1178 -    show:	show_cpuinfo,
 40.1179 -};
 40.1180 -
 40.1181 -unsigned long cpu_initialized __initdata = 0;
 40.1182 -
 40.1183 -/*
 40.1184 - * cpu_init() initializes state that is per-CPU. Some data is already
 40.1185 - * initialized (naturally) in the bootstrap process, such as the GDT
 40.1186 - * and IDT. We reload them nevertheless, this function acts as a
 40.1187 - * 'CPU state barrier', nothing should get across.
 40.1188 - */
 40.1189 -void __init cpu_init (void)
 40.1190 -{
 40.1191 -    int nr = smp_processor_id();
 40.1192 -
 40.1193 -    if (test_and_set_bit(nr, &cpu_initialized)) {
 40.1194 -        printk(KERN_WARNING "CPU#%d already initialized!\n", nr);
 40.1195 -        for (;;) __sti();
 40.1196 -    }
 40.1197 -    printk(KERN_INFO "Initializing CPU#%d\n", nr);
 40.1198 -
 40.1199 -    /*
 40.1200 -     * set up and load the per-CPU TSS and LDT
 40.1201 -     */
 40.1202 -    atomic_inc(&init_mm.mm_count);
 40.1203 -    current->active_mm = &init_mm;
 40.1204 -    if(current->mm)
 40.1205 -        BUG();
 40.1206 -    enter_lazy_tlb(&init_mm, current, nr);
 40.1207 -
 40.1208 -    HYPERVISOR_stack_switch(__KERNEL_DS, current->thread.esp0);
 40.1209 -
 40.1210 -    load_LDT(&init_mm.context);
 40.1211 -
 40.1212 -    /* Force FPU initialization. */
 40.1213 -    current->flags &= ~PF_USEDFPU;
 40.1214 -    current->used_math = 0;
 40.1215 -    stts();
 40.1216 -}
    41.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/signal.c	Sat Oct 08 11:37:45 2005 -0600
    41.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.3 @@ -1,717 +0,0 @@
    41.4 -/*
    41.5 - *  linux/arch/i386/kernel/signal.c
    41.6 - *
    41.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    41.8 - *
    41.9 - *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
   41.10 - *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
   41.11 - */
   41.12 -
   41.13 -#include <linux/sched.h>
   41.14 -#include <linux/mm.h>
   41.15 -#include <linux/smp.h>
   41.16 -#include <linux/smp_lock.h>
   41.17 -#include <linux/kernel.h>
   41.18 -#include <linux/signal.h>
   41.19 -#include <linux/errno.h>
   41.20 -#include <linux/wait.h>
   41.21 -#include <linux/ptrace.h>
   41.22 -#include <linux/unistd.h>
   41.23 -#include <linux/stddef.h>
   41.24 -#include <linux/tty.h>
   41.25 -#include <linux/personality.h>
   41.26 -#include <asm/ucontext.h>
   41.27 -#include <asm/uaccess.h>
   41.28 -#include <asm/i387.h>
   41.29 -
   41.30 -#define DEBUG_SIG 0
   41.31 -
   41.32 -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
   41.33 -
   41.34 -int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
   41.35 -
   41.36 -int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
   41.37 -{
   41.38 -	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
   41.39 -		return -EFAULT;
   41.40 -	if (from->si_code < 0)
   41.41 -		return __copy_to_user(to, from, sizeof(siginfo_t));
   41.42 -	else {
   41.43 -		int err;
   41.44 -
   41.45 -		/* If you change siginfo_t structure, please be sure
   41.46 -		   this code is fixed accordingly.
   41.47 -		   It should never copy any pad contained in the structure
   41.48 -		   to avoid security leaks, but must copy the generic
   41.49 -		   3 ints plus the relevant union member.  */
   41.50 -		err = __put_user(from->si_signo, &to->si_signo);
   41.51 -		err |= __put_user(from->si_errno, &to->si_errno);
   41.52 -		err |= __put_user((short)from->si_code, &to->si_code);
   41.53 -		/* First 32bits of unions are always present.  */
   41.54 -		err |= __put_user(from->si_pid, &to->si_pid);
   41.55 -		switch (from->si_code >> 16) {
   41.56 -		case __SI_FAULT >> 16:
   41.57 -			break;
   41.58 -		case __SI_CHLD >> 16:
   41.59 -			err |= __put_user(from->si_utime, &to->si_utime);
   41.60 -			err |= __put_user(from->si_stime, &to->si_stime);
   41.61 -			err |= __put_user(from->si_status, &to->si_status);
   41.62 -		default:
   41.63 -			err |= __put_user(from->si_uid, &to->si_uid);
   41.64 -			break;
   41.65 -		/* case __SI_RT: This is not generated by the kernel as of now.  */
   41.66 -		}
   41.67 -		return err;
   41.68 -	}
   41.69 -}
   41.70 -
   41.71 -/*
   41.72 - * Atomically swap in the new signal mask, and wait for a signal.
   41.73 - */
   41.74 -asmlinkage int
   41.75 -sys_sigsuspend(int history0, int history1, old_sigset_t mask)
   41.76 -{
   41.77 -	struct pt_regs * regs = (struct pt_regs *) &history0;
   41.78 -	sigset_t saveset;
   41.79 -
   41.80 -	mask &= _BLOCKABLE;
   41.81 -	spin_lock_irq(&current->sigmask_lock);
   41.82 -	saveset = current->blocked;
   41.83 -	siginitset(&current->blocked, mask);
   41.84 -	recalc_sigpending(current);
   41.85 -	spin_unlock_irq(&current->sigmask_lock);
   41.86 -
   41.87 -	regs->eax = -EINTR;
   41.88 -	while (1) {
   41.89 -		current->state = TASK_INTERRUPTIBLE;
   41.90 -		schedule();
   41.91 -		if (do_signal(regs, &saveset))
   41.92 -			return -EINTR;
   41.93 -	}
   41.94 -}
   41.95 -
   41.96 -asmlinkage int
   41.97 -sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
   41.98 -{
   41.99 -	struct pt_regs * regs = (struct pt_regs *) &unewset;
  41.100 -	sigset_t saveset, newset;
  41.101 -
  41.102 -	/* XXX: Don't preclude handling different sized sigset_t's.  */
  41.103 -	if (sigsetsize != sizeof(sigset_t))
  41.104 -		return -EINVAL;
  41.105 -
  41.106 -	if (copy_from_user(&newset, unewset, sizeof(newset)))
  41.107 -		return -EFAULT;
  41.108 -	sigdelsetmask(&newset, ~_BLOCKABLE);
  41.109 -
  41.110 -	spin_lock_irq(&current->sigmask_lock);
  41.111 -	saveset = current->blocked;
  41.112 -	current->blocked = newset;
  41.113 -	recalc_sigpending(current);
  41.114 -	spin_unlock_irq(&current->sigmask_lock);
  41.115 -
  41.116 -	regs->eax = -EINTR;
  41.117 -	while (1) {
  41.118 -		current->state = TASK_INTERRUPTIBLE;
  41.119 -		schedule();
  41.120 -		if (do_signal(regs, &saveset))
  41.121 -			return -EINTR;
  41.122 -	}
  41.123 -}
  41.124 -
  41.125 -asmlinkage int 
  41.126 -sys_sigaction(int sig, const struct old_sigaction *act,
  41.127 -	      struct old_sigaction *oact)
  41.128 -{
  41.129 -	struct k_sigaction new_ka, old_ka;
  41.130 -	int ret;
  41.131 -
  41.132 -	if (act) {
  41.133 -		old_sigset_t mask;
  41.134 -		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
  41.135 -		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
  41.136 -		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
  41.137 -			return -EFAULT;
  41.138 -		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
  41.139 -		__get_user(mask, &act->sa_mask);
  41.140 -		siginitset(&new_ka.sa.sa_mask, mask);
  41.141 -	}
  41.142 -
  41.143 -	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
  41.144 -
  41.145 -	if (!ret && oact) {
  41.146 -		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
  41.147 -		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
  41.148 -		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
  41.149 -			return -EFAULT;
  41.150 -		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
  41.151 -		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
  41.152 -	}
  41.153 -
  41.154 -	return ret;
  41.155 -}
  41.156 -
  41.157 -asmlinkage int
  41.158 -sys_sigaltstack(const stack_t *uss, stack_t *uoss)
  41.159 -{
  41.160 -	struct pt_regs *regs = (struct pt_regs *) &uss;
  41.161 -	return do_sigaltstack(uss, uoss, regs->esp);
  41.162 -}
  41.163 -
  41.164 -
  41.165 -/*
  41.166 - * Do a signal return; undo the signal stack.
  41.167 - */
  41.168 -
  41.169 -struct sigframe
  41.170 -{
  41.171 -	char *pretcode;
  41.172 -	int sig;
  41.173 -	struct sigcontext sc;
  41.174 -	struct _fpstate fpstate;
  41.175 -	unsigned long extramask[_NSIG_WORDS-1];
  41.176 -	char retcode[8];
  41.177 -};
  41.178 -
  41.179 -struct rt_sigframe
  41.180 -{
  41.181 -	char *pretcode;
  41.182 -	int sig;
  41.183 -	struct siginfo *pinfo;
  41.184 -	void *puc;
  41.185 -	struct siginfo info;
  41.186 -	struct ucontext uc;
  41.187 -	struct _fpstate fpstate;
  41.188 -	char retcode[8];
  41.189 -};
  41.190 -
  41.191 -static int
  41.192 -restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
  41.193 -{
  41.194 -	unsigned int err = 0;
  41.195 -
  41.196 -#define COPY(x)		err |= __get_user(regs->x, &sc->x)
  41.197 -
  41.198 -#define COPY_SEG(seg)							\
  41.199 -	{ unsigned short tmp;						\
  41.200 -	  err |= __get_user(tmp, &sc->seg);				\
  41.201 -	  regs->x##seg = tmp; }
  41.202 -
  41.203 -#define COPY_SEG_STRICT(seg)						\
  41.204 -	{ unsigned short tmp;						\
  41.205 -	  err |= __get_user(tmp, &sc->seg);				\
  41.206 -	  regs->x##seg = tmp|3; }
  41.207 -
  41.208 -#define GET_SEG(seg)							\
  41.209 -	{ unsigned short tmp;						\
  41.210 -	  err |= __get_user(tmp, &sc->seg);				\
  41.211 -	  loadsegment(seg,tmp); }
  41.212 -
  41.213 -	GET_SEG(gs);
  41.214 -	GET_SEG(fs);
  41.215 -	COPY_SEG(es);
  41.216 -	COPY_SEG(ds);
  41.217 -	COPY(edi);
  41.218 -	COPY(esi);
  41.219 -	COPY(ebp);
  41.220 -	COPY(esp);
  41.221 -	COPY(ebx);
  41.222 -	COPY(edx);
  41.223 -	COPY(ecx);
  41.224 -	COPY(eip);
  41.225 -	COPY_SEG_STRICT(cs);
  41.226 -	COPY_SEG_STRICT(ss);
  41.227 -	
  41.228 -	{
  41.229 -		unsigned int tmpflags;
  41.230 -		err |= __get_user(tmpflags, &sc->eflags);
  41.231 -		regs->eflags = (regs->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);
  41.232 -		regs->orig_eax = -1;		/* disable syscall checks */
  41.233 -	}
  41.234 -
  41.235 -	{
  41.236 -		struct _fpstate * buf;
  41.237 -		err |= __get_user(buf, &sc->fpstate);
  41.238 -		if (buf) {
  41.239 -			if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
  41.240 -				goto badframe;
  41.241 -			err |= restore_i387(buf);
  41.242 -		}
  41.243 -	}
  41.244 -
  41.245 -	err |= __get_user(*peax, &sc->eax);
  41.246 -	return err;
  41.247 -
  41.248 -badframe:
  41.249 -	return 1;
  41.250 -}
  41.251 -
  41.252 -asmlinkage int sys_sigreturn(unsigned long __unused)
  41.253 -{
  41.254 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  41.255 -	struct sigframe *frame = (struct sigframe *)(regs->esp - 8);
  41.256 -	sigset_t set;
  41.257 -	int eax;
  41.258 -
  41.259 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  41.260 -		goto badframe;
  41.261 -	if (__get_user(set.sig[0], &frame->sc.oldmask)
  41.262 -	    || (_NSIG_WORDS > 1
  41.263 -		&& __copy_from_user(&set.sig[1], &frame->extramask,
  41.264 -				    sizeof(frame->extramask))))
  41.265 -		goto badframe;
  41.266 -
  41.267 -	sigdelsetmask(&set, ~_BLOCKABLE);
  41.268 -	spin_lock_irq(&current->sigmask_lock);
  41.269 -	current->blocked = set;
  41.270 -	recalc_sigpending(current);
  41.271 -	spin_unlock_irq(&current->sigmask_lock);
  41.272 -	
  41.273 -	if (restore_sigcontext(regs, &frame->sc, &eax))
  41.274 -		goto badframe;
  41.275 -	return eax;
  41.276 -
  41.277 -badframe:
  41.278 -	force_sig(SIGSEGV, current);
  41.279 -	return 0;
  41.280 -}	
  41.281 -
  41.282 -asmlinkage int sys_rt_sigreturn(unsigned long __unused)
  41.283 -{
  41.284 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  41.285 -	struct rt_sigframe *frame = (struct rt_sigframe *)(regs->esp - 4);
  41.286 -	sigset_t set;
  41.287 -	stack_t st;
  41.288 -	int eax;
  41.289 -
  41.290 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  41.291 -		goto badframe;
  41.292 -	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
  41.293 -		goto badframe;
  41.294 -
  41.295 -	sigdelsetmask(&set, ~_BLOCKABLE);
  41.296 -	spin_lock_irq(&current->sigmask_lock);
  41.297 -	current->blocked = set;
  41.298 -	recalc_sigpending(current);
  41.299 -	spin_unlock_irq(&current->sigmask_lock);
  41.300 -	
  41.301 -	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax))
  41.302 -		goto badframe;
  41.303 -
  41.304 -	if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
  41.305 -		goto badframe;
  41.306 -	/* It is more difficult to avoid calling this function than to
  41.307 -	   call it and ignore errors.  */
  41.308 -	do_sigaltstack(&st, NULL, regs->esp);
  41.309 -
  41.310 -	return eax;
  41.311 -
  41.312 -badframe:
  41.313 -	force_sig(SIGSEGV, current);
  41.314 -	return 0;
  41.315 -}	
  41.316 -
  41.317 -/*
  41.318 - * Set up a signal frame.
  41.319 - */
  41.320 -
  41.321 -static int
  41.322 -setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
  41.323 -		 struct pt_regs *regs, unsigned long mask)
  41.324 -{
  41.325 -	int tmp, err = 0;
  41.326 -
  41.327 -	tmp = 0;
  41.328 -	__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
  41.329 -	err |= __put_user(tmp, (unsigned int *)&sc->gs);
  41.330 -	__asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp));
  41.331 -	err |= __put_user(tmp, (unsigned int *)&sc->fs);
  41.332 -
  41.333 -	err |= __put_user(regs->xes, (unsigned int *)&sc->es);
  41.334 -	err |= __put_user(regs->xds, (unsigned int *)&sc->ds);
  41.335 -	err |= __put_user(regs->edi, &sc->edi);
  41.336 -	err |= __put_user(regs->esi, &sc->esi);
  41.337 -	err |= __put_user(regs->ebp, &sc->ebp);
  41.338 -	err |= __put_user(regs->esp, &sc->esp);
  41.339 -	err |= __put_user(regs->ebx, &sc->ebx);
  41.340 -	err |= __put_user(regs->edx, &sc->edx);
  41.341 -	err |= __put_user(regs->ecx, &sc->ecx);
  41.342 -	err |= __put_user(regs->eax, &sc->eax);
  41.343 -	err |= __put_user(current->thread.trap_no, &sc->trapno);
  41.344 -	err |= __put_user(current->thread.error_code, &sc->err);
  41.345 -	err |= __put_user(regs->eip, &sc->eip);
  41.346 -	err |= __put_user(regs->xcs, (unsigned int *)&sc->cs);
  41.347 -	err |= __put_user(regs->eflags, &sc->eflags);
  41.348 -	err |= __put_user(regs->esp, &sc->esp_at_signal);
  41.349 -	err |= __put_user(regs->xss, (unsigned int *)&sc->ss);
  41.350 -
  41.351 -	tmp = save_i387(fpstate);
  41.352 -	if (tmp < 0)
  41.353 -	  err = 1;
  41.354 -	else
  41.355 -	  err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate);
  41.356 -
  41.357 -	/* non-iBCS2 extensions.. */
  41.358 -	err |= __put_user(mask, &sc->oldmask);
  41.359 -	err |= __put_user(current->thread.cr2, &sc->cr2);
  41.360 -
  41.361 -	return err;
  41.362 -}
  41.363 -
  41.364 -/*
  41.365 - * Determine which stack to use..
  41.366 - */
  41.367 -static inline void *
  41.368 -get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
  41.369 -{
  41.370 -	unsigned long esp;
  41.371 -
  41.372 -	/* Default to using normal stack */
  41.373 -	esp = regs->esp;
  41.374 -
  41.375 -	/* This is the X/Open sanctioned signal stack switching.  */
  41.376 -	if (ka->sa.sa_flags & SA_ONSTACK) {
  41.377 -		if (sas_ss_flags(esp) == 0)
  41.378 -			esp = current->sas_ss_sp + current->sas_ss_size;
  41.379 -	}
  41.380 -
  41.381 -	/* This is the legacy signal stack switching. */
  41.382 -	else if ((regs->xss & 0xffff) != __USER_DS &&
  41.383 -		 !(ka->sa.sa_flags & SA_RESTORER) &&
  41.384 -		 ka->sa.sa_restorer) {
  41.385 -		esp = (unsigned long) ka->sa.sa_restorer;
  41.386 -	}
  41.387 -
  41.388 -	return (void *)((esp - frame_size) & -8ul);
  41.389 -}
  41.390 -
  41.391 -static void setup_frame(int sig, struct k_sigaction *ka,
  41.392 -			sigset_t *set, struct pt_regs * regs)
  41.393 -{
  41.394 -	struct sigframe *frame;
  41.395 -	int err = 0;
  41.396 -
  41.397 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  41.398 -
  41.399 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  41.400 -		goto give_sigsegv;
  41.401 -
  41.402 -	err |= __put_user((current->exec_domain
  41.403 -		           && current->exec_domain->signal_invmap
  41.404 -		           && sig < 32
  41.405 -		           ? current->exec_domain->signal_invmap[sig]
  41.406 -		           : sig),
  41.407 -		          &frame->sig);
  41.408 -	if (err)
  41.409 -		goto give_sigsegv;
  41.410 -
  41.411 -	err |= setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
  41.412 -	if (err)
  41.413 -		goto give_sigsegv;
  41.414 -
  41.415 -	if (_NSIG_WORDS > 1) {
  41.416 -		err |= __copy_to_user(frame->extramask, &set->sig[1],
  41.417 -				      sizeof(frame->extramask));
  41.418 -	}
  41.419 -	if (err)
  41.420 -		goto give_sigsegv;
  41.421 -
  41.422 -	/* Set up to return from userspace.  If provided, use a stub
  41.423 -	   already in userspace.  */
  41.424 -	if (ka->sa.sa_flags & SA_RESTORER) {
  41.425 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  41.426 -	} else {
  41.427 -		err |= __put_user(frame->retcode, &frame->pretcode);
  41.428 -		/* This is popl %eax ; movl $,%eax ; int $0x80 */
  41.429 -		err |= __put_user(0xb858, (short *)(frame->retcode+0));
  41.430 -		err |= __put_user(__NR_sigreturn, (int *)(frame->retcode+2));
  41.431 -		err |= __put_user(0x80cd, (short *)(frame->retcode+6));
  41.432 -	}
  41.433 -
  41.434 -	if (err)
  41.435 -		goto give_sigsegv;
  41.436 -
  41.437 -	/* Set up registers for signal handler */
  41.438 -	regs->esp = (unsigned long) frame;
  41.439 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  41.440 -
  41.441 -	set_fs(USER_DS);
  41.442 -	regs->xds = __USER_DS;
  41.443 -	regs->xes = __USER_DS;
  41.444 -	regs->xss = __USER_DS;
  41.445 -	regs->xcs = __USER_CS;
  41.446 -	regs->eflags &= ~TF_MASK;
  41.447 -
  41.448 -#if DEBUG_SIG
  41.449 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  41.450 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  41.451 -#endif
  41.452 -
  41.453 -	return;
  41.454 -
  41.455 -give_sigsegv:
  41.456 -	if (sig == SIGSEGV)
  41.457 -		ka->sa.sa_handler = SIG_DFL;
  41.458 -	force_sig(SIGSEGV, current);
  41.459 -}
  41.460 -
  41.461 -static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
  41.462 -			   sigset_t *set, struct pt_regs * regs)
  41.463 -{
  41.464 -	struct rt_sigframe *frame;
  41.465 -	int err = 0;
  41.466 -
  41.467 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  41.468 -
  41.469 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  41.470 -		goto give_sigsegv;
  41.471 -
  41.472 -	err |= __put_user((current->exec_domain
  41.473 -		    	   && current->exec_domain->signal_invmap
  41.474 -		    	   && sig < 32
  41.475 -		    	   ? current->exec_domain->signal_invmap[sig]
  41.476 -			   : sig),
  41.477 -			  &frame->sig);
  41.478 -	err |= __put_user(&frame->info, &frame->pinfo);
  41.479 -	err |= __put_user(&frame->uc, &frame->puc);
  41.480 -	err |= copy_siginfo_to_user(&frame->info, info);
  41.481 -	if (err)
  41.482 -		goto give_sigsegv;
  41.483 -
  41.484 -	/* Create the ucontext.  */
  41.485 -	err |= __put_user(0, &frame->uc.uc_flags);
  41.486 -	err |= __put_user(0, &frame->uc.uc_link);
  41.487 -	err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
  41.488 -	err |= __put_user(sas_ss_flags(regs->esp),
  41.489 -			  &frame->uc.uc_stack.ss_flags);
  41.490 -	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
  41.491 -	err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->fpstate,
  41.492 -			        regs, set->sig[0]);
  41.493 -	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
  41.494 -	if (err)
  41.495 -		goto give_sigsegv;
  41.496 -
  41.497 -	/* Set up to return from userspace.  If provided, use a stub
  41.498 -	   already in userspace.  */
  41.499 -	if (ka->sa.sa_flags & SA_RESTORER) {
  41.500 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  41.501 -	} else {
  41.502 -		err |= __put_user(frame->retcode, &frame->pretcode);
  41.503 -		/* This is movl $,%eax ; int $0x80 */
  41.504 -		err |= __put_user(0xb8, (char *)(frame->retcode+0));
  41.505 -		err |= __put_user(__NR_rt_sigreturn, (int *)(frame->retcode+1));
  41.506 -		err |= __put_user(0x80cd, (short *)(frame->retcode+5));
  41.507 -	}
  41.508 -
  41.509 -	if (err)
  41.510 -		goto give_sigsegv;
  41.511 -
  41.512 -	/* Set up registers for signal handler */
  41.513 -	regs->esp = (unsigned long) frame;
  41.514 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  41.515 -
  41.516 -	set_fs(USER_DS);
  41.517 -	regs->xds = __USER_DS;
  41.518 -	regs->xes = __USER_DS;
  41.519 -	regs->xss = __USER_DS;
  41.520 -	regs->xcs = __USER_CS;
  41.521 -	regs->eflags &= ~TF_MASK;
  41.522 -
  41.523 -#if DEBUG_SIG
  41.524 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  41.525 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  41.526 -#endif
  41.527 -
  41.528 -	return;
  41.529 -
  41.530 -give_sigsegv:
  41.531 -	if (sig == SIGSEGV)
  41.532 -		ka->sa.sa_handler = SIG_DFL;
  41.533 -	force_sig(SIGSEGV, current);
  41.534 -}
  41.535 -
  41.536 -/*
  41.537 - * OK, we're invoking a handler
  41.538 - */	
  41.539 -
  41.540 -static void
  41.541 -handle_signal(unsigned long sig, struct k_sigaction *ka,
  41.542 -	      siginfo_t *info, sigset_t *oldset, struct pt_regs * regs)
  41.543 -{
  41.544 -	/* Are we from a system call? */
  41.545 -	if (regs->orig_eax >= 0) {
  41.546 -		/* If so, check system call restarting.. */
  41.547 -		switch (regs->eax) {
  41.548 -			case -ERESTARTNOHAND:
  41.549 -				regs->eax = -EINTR;
  41.550 -				break;
  41.551 -
  41.552 -			case -ERESTARTSYS:
  41.553 -				if (!(ka->sa.sa_flags & SA_RESTART)) {
  41.554 -					regs->eax = -EINTR;
  41.555 -					break;
  41.556 -				}
  41.557 -			/* fallthrough */
  41.558 -			case -ERESTARTNOINTR:
  41.559 -				regs->eax = regs->orig_eax;
  41.560 -				regs->eip -= 2;
  41.561 -		}
  41.562 -	}
  41.563 -
  41.564 -	/* Set up the stack frame */
  41.565 -	if (ka->sa.sa_flags & SA_SIGINFO)
  41.566 -		setup_rt_frame(sig, ka, info, oldset, regs);
  41.567 -	else
  41.568 -		setup_frame(sig, ka, oldset, regs);
  41.569 -
  41.570 -	if (ka->sa.sa_flags & SA_ONESHOT)
  41.571 -		ka->sa.sa_handler = SIG_DFL;
  41.572 -
  41.573 -	if (!(ka->sa.sa_flags & SA_NODEFER)) {
  41.574 -		spin_lock_irq(&current->sigmask_lock);
  41.575 -		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
  41.576 -		sigaddset(&current->blocked,sig);
  41.577 -		recalc_sigpending(current);
  41.578 -		spin_unlock_irq(&current->sigmask_lock);
  41.579 -	}
  41.580 -}
  41.581 -
  41.582 -/*
  41.583 - * Note that 'init' is a special process: it doesn't get signals it doesn't
  41.584 - * want to handle. Thus you cannot kill init even with a SIGKILL even by
  41.585 - * mistake.
  41.586 - */
  41.587 -int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset)
  41.588 -{
  41.589 -	siginfo_t info;
  41.590 -	struct k_sigaction *ka;
  41.591 -
  41.592 -	/*
  41.593 -	 * We want the common case to go fast, which
  41.594 -	 * is why we may in certain cases get here from
  41.595 -	 * kernel mode. Just return without doing anything
  41.596 -	 * if so.
  41.597 -	 */
  41.598 -	if ((regs->xcs & 2) != 2)
  41.599 -		return 1;
  41.600 -
  41.601 -	if (!oldset)
  41.602 -		oldset = &current->blocked;
  41.603 -
  41.604 -	for (;;) {
  41.605 -		unsigned long signr;
  41.606 -
  41.607 -		spin_lock_irq(&current->sigmask_lock);
  41.608 -		signr = dequeue_signal(&current->blocked, &info);
  41.609 -		spin_unlock_irq(&current->sigmask_lock);
  41.610 -
  41.611 -		if (!signr)
  41.612 -			break;
  41.613 -
  41.614 -		if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
  41.615 -			/* Let the debugger run.  */
  41.616 -			current->exit_code = signr;
  41.617 -			current->state = TASK_STOPPED;
  41.618 -			notify_parent(current, SIGCHLD);
  41.619 -			schedule();
  41.620 -
  41.621 -			/* We're back.  Did the debugger cancel the sig?  */
  41.622 -			if (!(signr = current->exit_code))
  41.623 -				continue;
  41.624 -			current->exit_code = 0;
  41.625 -
  41.626 -			/* The debugger continued.  Ignore SIGSTOP.  */
  41.627 -			if (signr == SIGSTOP)
  41.628 -				continue;
  41.629 -
  41.630 -			/* Update the siginfo structure.  Is this good?  */
  41.631 -			if (signr != info.si_signo) {
  41.632 -				info.si_signo = signr;
  41.633 -				info.si_errno = 0;
  41.634 -				info.si_code = SI_USER;
  41.635 -				info.si_pid = current->p_pptr->pid;
  41.636 -				info.si_uid = current->p_pptr->uid;
  41.637 -			}
  41.638 -
  41.639 -			/* If the (new) signal is now blocked, requeue it.  */
  41.640 -			if (sigismember(&current->blocked, signr)) {
  41.641 -				send_sig_info(signr, &info, current);
  41.642 -				continue;
  41.643 -			}
  41.644 -		}
  41.645 -
  41.646 -		ka = &current->sig->action[signr-1];
  41.647 -		if (ka->sa.sa_handler == SIG_IGN) {
  41.648 -			if (signr != SIGCHLD)
  41.649 -				continue;
  41.650 -			/* Check for SIGCHLD: it's special.  */
  41.651 -			while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0)
  41.652 -				/* nothing */;
  41.653 -			continue;
  41.654 -		}
  41.655 -
  41.656 -		if (ka->sa.sa_handler == SIG_DFL) {
  41.657 -			int exit_code = signr;
  41.658 -
  41.659 -			/* Init gets no signals it doesn't want.  */
  41.660 -			if (current->pid == 1)
  41.661 -				continue;
  41.662 -
  41.663 -			switch (signr) {
  41.664 -			case SIGCONT: case SIGCHLD: case SIGWINCH: case SIGURG:
  41.665 -				continue;
  41.666 -
  41.667 -			case SIGTSTP: case SIGTTIN: case SIGTTOU:
  41.668 -				if (is_orphaned_pgrp(current->pgrp))
  41.669 -					continue;
  41.670 -				/* FALLTHRU */
  41.671 -
  41.672 -			case SIGSTOP: {
  41.673 -				struct signal_struct *sig;
  41.674 -				current->state = TASK_STOPPED;
  41.675 -				current->exit_code = signr;
  41.676 -				sig = current->p_pptr->sig;
  41.677 -				if (sig && !(sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP))
  41.678 -					notify_parent(current, SIGCHLD);
  41.679 -				schedule();
  41.680 -				continue;
  41.681 -			}
  41.682 -
  41.683 -			case SIGQUIT: case SIGILL: case SIGTRAP:
  41.684 -			case SIGABRT: case SIGFPE: case SIGSEGV:
  41.685 -			case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
  41.686 -				if (do_coredump(signr, regs))
  41.687 -					exit_code |= 0x80;
  41.688 -				/* FALLTHRU */
  41.689 -
  41.690 -			default:
  41.691 -				sig_exit(signr, exit_code, &info);
  41.692 -				/* NOTREACHED */
  41.693 -			}
  41.694 -		}
  41.695 -
  41.696 -		/* Reenable any watchpoints before delivering the
  41.697 -		 * signal to user space. The processor register will
  41.698 -		 * have been cleared if the watchpoint triggered
  41.699 -		 * inside the kernel.
  41.700 -		 */
  41.701 -                if ( current->thread.debugreg[7] != 0 )
  41.702 -                    HYPERVISOR_set_debugreg(7, current->thread.debugreg[7]);
  41.703 -
  41.704 -		/* Whee!  Actually deliver the signal.  */
  41.705 -		handle_signal(signr, ka, &info, oldset, regs);
  41.706 -		return 1;
  41.707 -	}
  41.708 -
  41.709 -	/* Did we come from a system call? */
  41.710 -	if (regs->orig_eax >= 0) {
  41.711 -		/* Restart the system call - no handlers present */
  41.712 -		if (regs->eax == -ERESTARTNOHAND ||
  41.713 -		    regs->eax == -ERESTARTSYS ||
  41.714 -		    regs->eax == -ERESTARTNOINTR) {
  41.715 -			regs->eax = regs->orig_eax;
  41.716 -			regs->eip -= 2;
  41.717 -		}
  41.718 -	}
  41.719 -	return 0;
  41.720 -}
    42.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/time.c	Sat Oct 08 11:37:45 2005 -0600
    42.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.3 @@ -1,741 +0,0 @@
    42.4 -/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
    42.5 - ****************************************************************************
    42.6 - * (C) 2002-2003 - Rolf Neugebauer - Intel Research Cambridge
    42.7 - * (C) 2002-2003 - Keir Fraser - University of Cambridge
    42.8 - ****************************************************************************
    42.9 - *
   42.10 - *        File: arch/xen/kernel/time.c
   42.11 - *      Author: Rolf Neugebauer and Keir Fraser
   42.12 - * 
   42.13 - * Description: Interface with Xen to get correct notion of time
   42.14 - */
   42.15 -
   42.16 -/*
   42.17 - *  linux/arch/i386/kernel/time.c
   42.18 - *
   42.19 - *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
   42.20 - *
   42.21 - * This file contains the PC-specific time handling details:
   42.22 - * reading the RTC at bootup, etc..
   42.23 - * 1994-07-02    Alan Modra
   42.24 - * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
   42.25 - * 1995-03-26    Markus Kuhn
   42.26 - *      fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
   42.27 - *      precision CMOS clock update
   42.28 - * 1996-05-03    Ingo Molnar
   42.29 - *      fixed time warps in do_[slow|fast]_gettimeoffset()
   42.30 - * 1997-09-10 Updated NTP code according to technical memorandum Jan '96
   42.31 - *  "A Kernel Model for Precision Timekeeping" by Dave Mills
   42.32 - * 1998-09-05    (Various)
   42.33 - * More robust do_fast_gettimeoffset() algorithm implemented
   42.34 - * (works with APM, Cyrix 6x86MX and Centaur C6),
   42.35 - * monotonic gettimeofday() with fast_get_timeoffset(),
   42.36 - * drift-proof precision TSC calibration on boot
   42.37 - * (C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
   42.38 - * Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
   42.39 - * ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
   42.40 - * 1998-12-16    Andrea Arcangeli
   42.41 - * Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
   42.42 - * because was not accounting lost_ticks.
   42.43 - * 1998-12-24 Copyright (C) 1998  Andrea Arcangeli
   42.44 - * Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
   42.45 - * serialize accesses to xtime/lost_ticks).
   42.46 - */
   42.47 -
   42.48 -#include <asm/smp.h>
   42.49 -#include <asm/irq.h>
   42.50 -#include <asm/msr.h>
   42.51 -#include <asm/delay.h>
   42.52 -#include <asm/mpspec.h>
   42.53 -#include <asm/uaccess.h>
   42.54 -#include <asm/processor.h>
   42.55 -
   42.56 -#include <asm/div64.h>
   42.57 -#include <asm/hypervisor.h>
   42.58 -#include <asm-xen/xen-public/dom0_ops.h>
   42.59 -
   42.60 -#include <linux/mc146818rtc.h>
   42.61 -#include <linux/kernel.h>
   42.62 -#include <linux/interrupt.h>
   42.63 -#include <linux/time.h>
   42.64 -#include <linux/init.h>
   42.65 -#include <linux/smp.h>
   42.66 -#include <linux/irq.h>
   42.67 -#include <linux/sysctl.h>
   42.68 -#include <linux/sysrq.h>
   42.69 -
   42.70 -spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
   42.71 -extern rwlock_t xtime_lock;
   42.72 -extern unsigned long wall_jiffies;
   42.73 -
   42.74 -unsigned long cpu_khz; /* get this from Xen, used elsewhere */
   42.75 -
   42.76 -static unsigned int rdtsc_bitshift;
   42.77 -static u32 st_scale_f; /* convert ticks -> usecs */
   42.78 -static u32 st_scale_i; /* convert ticks -> usecs */
   42.79 -
   42.80 -/* These are peridically updated in shared_info, and then copied here. */
   42.81 -static u32 shadow_tsc_stamp;
   42.82 -static u64 shadow_system_time;
   42.83 -static u32 shadow_time_version;
   42.84 -static struct timeval shadow_tv;
   42.85 -
   42.86 -/*
   42.87 - * We use this to ensure that gettimeofday() is monotonically increasing. We
   42.88 - * only break this guarantee if the wall clock jumps backwards "a long way".
   42.89 - */
   42.90 -static struct timeval last_seen_tv = {0,0};
   42.91 -
   42.92 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
   42.93 -/* Periodically propagate synchronised time base to the RTC and to Xen. */
   42.94 -static long last_update_to_rtc, last_update_to_xen;
   42.95 -#endif
   42.96 -
   42.97 -/* Periodically take synchronised time base from Xen, if we need it. */
   42.98 -static long last_update_from_xen;   /* UTC seconds when last read Xen clock. */
   42.99 -
  42.100 -/* Keep track of last time we did processing/updating of jiffies and xtime. */
  42.101 -static u64 processed_system_time;   /* System time (ns) at last processing. */
  42.102 -
  42.103 -#define NS_PER_TICK (1000000000ULL/HZ)
  42.104 -
  42.105 -#ifndef NSEC_PER_SEC
  42.106 -#define NSEC_PER_SEC (1000000000L)
  42.107 -#endif
  42.108 -
  42.109 -#define HANDLE_USEC_UNDERFLOW(_tv)         \
  42.110 -    do {                                   \
  42.111 -        while ( (_tv).tv_usec < 0 )        \
  42.112 -        {                                  \
  42.113 -            (_tv).tv_usec += 1000000;      \
  42.114 -            (_tv).tv_sec--;                \
  42.115 -        }                                  \
  42.116 -    } while ( 0 )
  42.117 -#define HANDLE_USEC_OVERFLOW(_tv)          \
  42.118 -    do {                                   \
  42.119 -        while ( (_tv).tv_usec >= 1000000 ) \
  42.120 -        {                                  \
  42.121 -            (_tv).tv_usec -= 1000000;      \
  42.122 -            (_tv).tv_sec++;                \
  42.123 -        }                                  \
  42.124 -    } while ( 0 )
  42.125 -static inline void __normalize_time(time_t *sec, s64 *nsec)
  42.126 -{
  42.127 -	while (*nsec >= NSEC_PER_SEC) {
  42.128 -		(*nsec) -= NSEC_PER_SEC;
  42.129 -		(*sec)++;
  42.130 -	}
  42.131 -	while (*nsec < 0) {
  42.132 -		(*nsec) += NSEC_PER_SEC;
  42.133 -		(*sec)--;
  42.134 -	}
  42.135 -}
  42.136 -
  42.137 -/* Dynamically-mapped IRQs. */
  42.138 -static int time_irq, debug_irq;
  42.139 -
  42.140 -/* Does this guest OS track Xen time, or set its wall clock independently? */
  42.141 -static int independent_wallclock = 0;
  42.142 -static int __init __independent_wallclock(char *str)
  42.143 -{
  42.144 -    independent_wallclock = 1;
  42.145 -    return 1;
  42.146 -}
  42.147 -__setup("independent_wallclock", __independent_wallclock);
  42.148 -#define INDEPENDENT_WALLCLOCK() \
  42.149 -    (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
  42.150 -
  42.151 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  42.152 -/*
  42.153 - * In order to set the CMOS clock precisely, set_rtc_mmss has to be
  42.154 - * called 500 ms after the second nowtime has started, because when
  42.155 - * nowtime is written into the registers of the CMOS clock, it will
  42.156 - * jump to the next second precisely 500 ms later. Check the Motorola
  42.157 - * MC146818A or Dallas DS12887 data sheet for details.
  42.158 - *
  42.159 - * BUG: This routine does not handle hour overflow properly; it just
  42.160 - *      sets the minutes. Usually you'll only notice that after reboot!
  42.161 - */
  42.162 -static int set_rtc_mmss(unsigned long nowtime)
  42.163 -{
  42.164 -    int retval = 0;
  42.165 -    int real_seconds, real_minutes, cmos_minutes;
  42.166 -    unsigned char save_control, save_freq_select;
  42.167 -
  42.168 -    /* gets recalled with irq locally disabled */
  42.169 -    spin_lock(&rtc_lock);
  42.170 -    save_control = CMOS_READ(RTC_CONTROL);
  42.171 -    CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
  42.172 -
  42.173 -    save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
  42.174 -    CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
  42.175 -
  42.176 -    cmos_minutes = CMOS_READ(RTC_MINUTES);
  42.177 -    if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
  42.178 -        BCD_TO_BIN(cmos_minutes);
  42.179 -
  42.180 -    /*
  42.181 -     * since we're only adjusting minutes and seconds, don't interfere with
  42.182 -     * hour overflow. This avoids messing with unknown time zones but requires
  42.183 -     * your RTC not to be off by more than 15 minutes
  42.184 -     */
  42.185 -    real_seconds = nowtime % 60;
  42.186 -    real_minutes = nowtime / 60;
  42.187 -    if ( ((abs(real_minutes - cmos_minutes) + 15)/30) & 1 )
  42.188 -        real_minutes += 30;  /* correct for half hour time zone */
  42.189 -    real_minutes %= 60;
  42.190 -
  42.191 -    if ( abs(real_minutes - cmos_minutes) < 30 )
  42.192 -    {
  42.193 -        if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
  42.194 -        {
  42.195 -            BIN_TO_BCD(real_seconds);
  42.196 -            BIN_TO_BCD(real_minutes);
  42.197 -        }
  42.198 -        CMOS_WRITE(real_seconds,RTC_SECONDS);
  42.199 -        CMOS_WRITE(real_minutes,RTC_MINUTES);
  42.200 -    }
  42.201 -    else 
  42.202 -    {
  42.203 -        printk(KERN_WARNING
  42.204 -               "set_rtc_mmss: can't update from %d to %d\n",
  42.205 -               cmos_minutes, real_minutes);
  42.206 -        retval = -1;
  42.207 -    }
  42.208 -
  42.209 -    /* The following flags have to be released exactly in this order,
  42.210 -     * otherwise the DS12887 (popular MC146818A clone with integrated
  42.211 -     * battery and quartz) will not reset the oscillator and will not
  42.212 -     * update precisely 500 ms later. You won't find this mentioned in
  42.213 -     * the Dallas Semiconductor data sheets, but who believes data
  42.214 -     * sheets anyway ...                           -- Markus Kuhn
  42.215 -     */
  42.216 -    CMOS_WRITE(save_control, RTC_CONTROL);
  42.217 -    CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
  42.218 -    spin_unlock(&rtc_lock);
  42.219 -
  42.220 -    return retval;
  42.221 -}
  42.222 -#endif
  42.223 -
  42.224 -
  42.225 -/*
  42.226 - * Reads a consistent set of time-base values from Xen, into a shadow data
  42.227 - * area. Must be called with the xtime_lock held for writing.
  42.228 - */
  42.229 -static void __get_time_values_from_xen(void)
  42.230 -{
  42.231 -	shared_info_t           *s = HYPERVISOR_shared_info;
  42.232 -	struct vcpu_time_info   *src;
  42.233 -	struct shadow_time_info *dst;
  42.234 -
  42.235 -	src = &s->vcpu_time[smp_processor_id()];
  42.236 -	dst = &per_cpu(shadow_time, smp_processor_id());
  42.237 -
  42.238 -	do {
  42.239 -		dst->version = src->time_version2;
  42.240 -		rmb();
  42.241 -		dst->tsc_timestamp     = src->tsc_timestamp;
  42.242 -		dst->system_timestamp  = src->system_time;
  42.243 -		dst->tsc_to_nsec_mul   = src->tsc_to_system_mul;
  42.244 -		dst->tsc_shift         = src->tsc_shift;
  42.245 -		rmb();
  42.246 -	}
  42.247 -	while (dst->version != src->time_version1);
  42.248 -
  42.249 -	dst->tsc_to_usec_mul = dst->tsc_to_nsec_mul / 1000;
  42.250 -
  42.251 -	if ((shadow_tv.tv_sec != s->wc_sec) ||
  42.252 -	    (shadow_tv.tv_usec != s->wc_usec))
  42.253 -		update_wallclock();
  42.254 -}
  42.255 -
  42.256 -
  42.257 -/*
  42.258 - * Returns the system time elapsed, in ns, since the current shadow_timestamp
  42.259 - * was calculated. Must be called with the xtime_lock held for reading.
  42.260 - */
  42.261 -static inline unsigned long __get_time_delta_usecs(void)
  42.262 -{
  42.263 -    s32      delta_tsc;
  42.264 -    u32      low;
  42.265 -    u64      delta, tsc;
  42.266 -
  42.267 -    rdtscll(tsc);
  42.268 -    low = (u32)(tsc >> rdtsc_bitshift);
  42.269 -    delta_tsc = (s32)(low - shadow_tsc_stamp);
  42.270 -    if ( unlikely(delta_tsc < 0) ) delta_tsc = 0;
  42.271 -    delta = ((u64)delta_tsc * st_scale_f);
  42.272 -    delta >>= 32;
  42.273 -    delta += ((u64)delta_tsc * st_scale_i);
  42.274 -
  42.275 -    return (unsigned long)delta;
  42.276 -}
  42.277 -
  42.278 -static inline int time_values_up_to_date()
  42.279 -{
  42.280 -	struct vcpu_time_info   *src;
  42.281 -	struct shadow_time_info *dst;
  42.282 -
  42.283 -	src = &HYPERVISOR_shared_info->vcpu_time[smp_processor_id()];
  42.284 -	dst = &per_cpu(shadow_time, smp_processor_id());
  42.285 -
  42.286 -	return (dst->version == src->time_version2);
  42.287 -}
  42.288 -
  42.289 -
  42.290 -/*
  42.291 - * Returns the current time-of-day in UTC timeval format.
  42.292 - */
  42.293 -void do_gettimeofday(struct timeval *tv)
  42.294 -{
  42.295 -    unsigned long flags, lost;
  42.296 -    struct timeval _tv;
  42.297 -    s64 nsec;
  42.298 -
  42.299 - again:
  42.300 -    read_lock_irqsave(&xtime_lock, flags);
  42.301 -
  42.302 -    _tv.tv_usec = __get_time_delta_usecs();
  42.303 -    if ( (lost = (jiffies - wall_jiffies)) != 0 )
  42.304 -        _tv.tv_usec += lost * (1000000 / HZ);
  42.305 -    _tv.tv_sec   = xtime.tv_sec;
  42.306 -    _tv.tv_usec += xtime.tv_usec;
  42.307 -
  42.308 -    nsec = shadow_system_time - processed_system_time;
  42.309 -    __normalize_time(&_tv.tv_sec, &nsec);
  42.310 -    _tv.tv_usec += (long)nsec / 1000L;
  42.311 -
  42.312 -    if ( unlikely(!time_values_up_to_date()) )
  42.313 -    {
  42.314 -        /*
  42.315 -         * We may have blocked for a long time, rendering our calculations
  42.316 -         * invalid (e.g. the time delta may have overflowed). Detect that
  42.317 -         * and recalculate with fresh values.
  42.318 -         */
  42.319 -        read_unlock_irqrestore(&xtime_lock, flags);
  42.320 -        write_lock_irqsave(&xtime_lock, flags);
  42.321 -        __get_time_values_from_xen();
  42.322 -        write_unlock_irqrestore(&xtime_lock, flags);
  42.323 -        goto again;
  42.324 -    }
  42.325 -
  42.326 -    HANDLE_USEC_OVERFLOW(_tv);
  42.327 -
  42.328 -    /* Ensure that time-of-day is monotonically increasing. */
  42.329 -    if ( (_tv.tv_sec < last_seen_tv.tv_sec) ||
  42.330 -         ((_tv.tv_sec == last_seen_tv.tv_sec) &&
  42.331 -          (_tv.tv_usec < last_seen_tv.tv_usec)) )
  42.332 -        _tv = last_seen_tv;
  42.333 -    last_seen_tv = _tv;
  42.334 -
  42.335 -    read_unlock_irqrestore(&xtime_lock, flags);
  42.336 -
  42.337 -    *tv = _tv;
  42.338 -}
  42.339 -
  42.340 -
  42.341 -/*
  42.342 - * Sets the current time-of-day based on passed-in UTC timeval parameter.
  42.343 - */
  42.344 -void do_settimeofday(struct timeval *tv)
  42.345 -{
  42.346 -    struct timeval newtv;
  42.347 -    s64            nsec;
  42.348 -    suseconds_t    usec;
  42.349 -    
  42.350 -    if ( !INDEPENDENT_WALLCLOCK() )
  42.351 -        return;
  42.352 -    
  42.353 -    write_lock_irq(&xtime_lock);
  42.354 -    
  42.355 -    /*
  42.356 -     * Ensure we don't get blocked for a long time so that our time delta
  42.357 -     * overflows. If that were to happen then our shadow time values would
  42.358 -     * be stale, so we can retry with fresh ones.
  42.359 -     */
  42.360 - again:
  42.361 -    usec = tv->tv_usec - __get_time_delta_usecs();
  42.362 -
  42.363 -    nsec = shadow_system_time - processed_system_time;
  42.364 -    __normalize_time(&tv->tv_sec, &nsec);
  42.365 -    usec -= (long)nsec / 1000L;
  42.366 -
  42.367 -    if ( unlikely(!TIME_VALUES_UP_TO_DATE) )
  42.368 -    {
  42.369 -        __get_time_values_from_xen();
  42.370 -        goto again;
  42.371 -    }
  42.372 -    tv->tv_usec = usec;
  42.373 -    
  42.374 -    HANDLE_USEC_UNDERFLOW(*tv);
  42.375 -    
  42.376 -    newtv = *tv;
  42.377 -    
  42.378 -    tv->tv_usec -= (jiffies - wall_jiffies) * (1000000 / HZ);
  42.379 -    HANDLE_USEC_UNDERFLOW(*tv);
  42.380 -
  42.381 -    xtime = *tv;
  42.382 -    time_adjust = 0;  /* stop active adjtime() */
  42.383 -    time_status |= STA_UNSYNC;
  42.384 -    time_maxerror = NTP_PHASE_LIMIT;
  42.385 -    time_esterror = NTP_PHASE_LIMIT;
  42.386 -
  42.387 -    /* Reset all our running time counts. They make no sense now. */
  42.388 -    last_seen_tv.tv_sec = 0;
  42.389 -    last_update_from_xen = 0;
  42.390 -
  42.391 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  42.392 -    if ( xen_start_info.flags & SIF_INITDOMAIN )
  42.393 -    {
  42.394 -        dom0_op_t op;
  42.395 -        last_update_to_rtc = last_update_to_xen = 0;
  42.396 -        op.cmd = DOM0_SETTIME;
  42.397 -        op.u.settime.secs        = newtv.tv_sec;
  42.398 -        op.u.settime.usecs       = newtv.tv_usec;
  42.399 -        op.u.settime.system_time = shadow_system_time;
  42.400 -        write_unlock_irq(&xtime_lock);
  42.401 -        HYPERVISOR_dom0_op(&op);
  42.402 -    }
  42.403 -    else
  42.404 -#endif
  42.405 -    {
  42.406 -        write_unlock_irq(&xtime_lock);
  42.407 -    }
  42.408 -}
  42.409 -
  42.410 -
  42.411 -asmlinkage long sys_stime(int *tptr)
  42.412 -{
  42.413 -    int value;
  42.414 -    struct timeval tv;
  42.415 -
  42.416 -    if ( !capable(CAP_SYS_TIME) )
  42.417 -        return -EPERM;
  42.418 -
  42.419 -    if ( get_user(value, tptr) )
  42.420 -        return -EFAULT;
  42.421 -
  42.422 -    tv.tv_sec  = value;
  42.423 -    tv.tv_usec = 0;
  42.424 -
  42.425 -    do_settimeofday(&tv);
  42.426 -
  42.427 -    return 0;
  42.428 -}
  42.429 -
  42.430 -
  42.431 -/* Convert jiffies to system time. Call with xtime_lock held for reading. */
  42.432 -static inline u64 __jiffies_to_st(unsigned long j) 
  42.433 -{
  42.434 -    return processed_system_time + ((j - jiffies) * NS_PER_TICK);
  42.435 -}
  42.436 -
  42.437 -
  42.438 -static inline void do_timer_interrupt(int irq, void *dev_id,
  42.439 -                                      struct pt_regs *regs)
  42.440 -{
  42.441 -    s64 delta;
  42.442 -    unsigned long ticks = 0;
  42.443 -    long sec_diff;
  42.444 -
  42.445 -    do {
  42.446 -        __get_time_values_from_xen();
  42.447 -        
  42.448 -        delta = (s64)(shadow_system_time + 
  42.449 -                      ((s64)__get_time_delta_usecs() * 1000LL) -
  42.450 -                      processed_system_time);
  42.451 -    }
  42.452 -    while ( !TIME_VALUES_UP_TO_DATE );
  42.453 -
  42.454 -    if ( unlikely(delta < 0) )
  42.455 -    {
  42.456 -        printk("Timer ISR: Time went backwards: %lld\n", delta);
  42.457 -        return;
  42.458 -    }
  42.459 -
  42.460 -    /* Process elapsed jiffies since last call. */
  42.461 -    while ( delta >= NS_PER_TICK )
  42.462 -    {
  42.463 -        ticks++;
  42.464 -        delta -= NS_PER_TICK;
  42.465 -        processed_system_time += NS_PER_TICK;
  42.466 -    }
  42.467 -
  42.468 -    if ( ticks != 0 )
  42.469 -    {
  42.470 -        do_timer_ticks(ticks);
  42.471 -
  42.472 -        if ( user_mode(regs) )
  42.473 -            update_process_times_us(ticks, 0);
  42.474 -        else
  42.475 -            update_process_times_us(0, ticks);
  42.476 -    }
  42.477 -
  42.478 -    /*
  42.479 -     * Take synchronised time from Xen once a minute if we're not
  42.480 -     * synchronised ourselves, and we haven't chosen to keep an independent
  42.481 -     * time base.
  42.482 -     */
  42.483 -    if ( !INDEPENDENT_WALLCLOCK() &&
  42.484 -         ((time_status & STA_UNSYNC) != 0) &&
  42.485 -         (xtime.tv_sec > (last_update_from_xen + 60)) )
  42.486 -    {
  42.487 -        /* Adjust shadow timeval for jiffies that haven't updated xtime yet. */
  42.488 -        shadow_tv.tv_usec -= (jiffies - wall_jiffies) * (1000000/HZ);
  42.489 -        HANDLE_USEC_UNDERFLOW(shadow_tv);
  42.490 -
  42.491 -        /*
  42.492 -         * Reset our running time counts if they are invalidated by a warp
  42.493 -         * backwards of more than 500ms.
  42.494 -         */
  42.495 -        sec_diff = xtime.tv_sec - shadow_tv.tv_sec;
  42.496 -        if ( unlikely(abs(sec_diff) > 1) ||
  42.497 -             unlikely(((sec_diff * 1000000) + 
  42.498 -                       xtime.tv_usec - shadow_tv.tv_usec) > 500000) )
  42.499 -        {
  42.500 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  42.501 -            last_update_to_rtc = last_update_to_xen = 0;
  42.502 -#endif
  42.503 -            last_seen_tv.tv_sec = 0;
  42.504 -        }
  42.505 -
  42.506 -        /* Update our unsynchronised xtime appropriately. */
  42.507 -        xtime = shadow_tv;
  42.508 -
  42.509 -        last_update_from_xen = xtime.tv_sec;
  42.510 -    }
  42.511 -
  42.512 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  42.513 -    if ( (xen_start_info.flags & SIF_INITDOMAIN) &&
  42.514 -         ((time_status & STA_UNSYNC) == 0) )
  42.515 -    {
  42.516 -        /* Send synchronised time to Xen approximately every minute. */
  42.517 -        if ( xtime.tv_sec > (last_update_to_xen + 60) )
  42.518 -        {
  42.519 -            dom0_op_t op;
  42.520 -            struct timeval tv = xtime;
  42.521 -
  42.522 -            tv.tv_usec += (jiffies - wall_jiffies) * (1000000/HZ);
  42.523 -            HANDLE_USEC_OVERFLOW(tv);
  42.524 -
  42.525 -            op.cmd = DOM0_SETTIME;
  42.526 -            op.u.settime.secs        = tv.tv_sec;
  42.527 -            op.u.settime.usecs       = tv.tv_usec;
  42.528 -            op.u.settime.system_time = shadow_system_time;
  42.529 -            HYPERVISOR_dom0_op(&op);
  42.530 -
  42.531 -            last_update_to_xen = xtime.tv_sec;
  42.532 -        }
  42.533 -
  42.534 -        /*
  42.535 -         * If we have an externally synchronized Linux clock, then update CMOS
  42.536 -         * clock accordingly every ~11 minutes. Set_rtc_mmss() has to be called
  42.537 -         * as close as possible to 500 ms before the new second starts.
  42.538 -         */
  42.539 -        if ( (xtime.tv_sec > (last_update_to_rtc + 660)) &&
  42.540 -             (xtime.tv_usec >= (500000 - ((unsigned) tick) / 2)) &&
  42.541 -             (xtime.tv_usec <= (500000 + ((unsigned) tick) / 2)) )
  42.542 -        {
  42.543 -            if ( set_rtc_mmss(xtime.tv_sec) == 0 )
  42.544 -                last_update_to_rtc = xtime.tv_sec;
  42.545 -            else
  42.546 -                last_update_to_rtc = xtime.tv_sec - 600;
  42.547 -        }
  42.548 -    }
  42.549 -#endif
  42.550 -}
  42.551 -
  42.552 -
  42.553 -static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  42.554 -{
  42.555 -    write_lock(&xtime_lock);
  42.556 -    do_timer_interrupt(irq, NULL, regs);
  42.557 -    write_unlock(&xtime_lock);
  42.558 -}
  42.559 -
  42.560 -static struct irqaction irq_timer = {
  42.561 -    timer_interrupt, 
  42.562 -    SA_INTERRUPT, 
  42.563 -    0, 
  42.564 -    "timer", 
  42.565 -    NULL, 
  42.566 -    NULL
  42.567 -};
  42.568 -
  42.569 -
  42.570 -/*
  42.571 - * This function works out when the the next timer function has to be
  42.572 - * executed (by looking at the timer list) and sets the Xen one-shot
  42.573 - * domain timer to the appropriate value. This is typically called in
  42.574 - * cpu_idle() before the domain blocks.
  42.575 - * 
  42.576 - * The function returns a non-0 value on error conditions.
  42.577 - * 
  42.578 - * It must be called with interrupts disabled.
  42.579 - */
  42.580 -extern spinlock_t timerlist_lock;
  42.581 -int set_timeout_timer(void)
  42.582 -{
  42.583 -    struct timer_list *timer;
  42.584 -    u64 alarm = 0;
  42.585 -    int ret = 0;
  42.586 -
  42.587 -    spin_lock(&timerlist_lock);
  42.588 -
  42.589 -    /*
  42.590 -     * This is safe against long blocking (since calculations are not based on 
  42.591 -     * TSC deltas). It is also safe against warped system time since
  42.592 -     * suspend-resume is cooperative and we would first get locked out. It is 
  42.593 -     * safe against normal updates of jiffies since interrupts are off.
  42.594 -     */
  42.595 -    if ( (timer = next_timer_event()) != NULL )
  42.596 -        alarm = __jiffies_to_st(timer->expires);
  42.597 -
  42.598 -    /* Tasks on the timer task queue expect to be executed on the next tick. */
  42.599 -    if ( TQ_ACTIVE(tq_timer) )
  42.600 -        alarm = __jiffies_to_st(jiffies + 1);
  42.601 -
  42.602 -    /* Failure is pretty bad, but we'd best soldier on. */
  42.603 -    if ( HYPERVISOR_set_timer_op(alarm) != 0 )
  42.604 -        ret = -1;
  42.605 -    
  42.606 -    spin_unlock(&timerlist_lock);
  42.607 -
  42.608 -    return ret;
  42.609 -}
  42.610 -
  42.611 -
  42.612 -/* Time debugging. */
  42.613 -static void dbg_time_int(int irq, void *dev_id, struct pt_regs *ptregs)
  42.614 -{
  42.615 -    unsigned long flags, j;
  42.616 -    u64 s_now, j_st;
  42.617 -    struct timeval s_tv, tv;
  42.618 -
  42.619 -    struct timer_list *timer;
  42.620 -    u64 t_st;
  42.621 -
  42.622 -    read_lock_irqsave(&xtime_lock, flags);
  42.623 -    s_tv.tv_sec  = shadow_tv.tv_sec;
  42.624 -    s_tv.tv_usec = shadow_tv.tv_usec;
  42.625 -    s_now        = shadow_system_time;
  42.626 -    read_unlock_irqrestore(&xtime_lock, flags);
  42.627 -
  42.628 -    do_gettimeofday(&tv);
  42.629 -
  42.630 -    j = jiffies;
  42.631 -    j_st = __jiffies_to_st(j);
  42.632 -
  42.633 -    timer = next_timer_event();
  42.634 -    t_st = __jiffies_to_st(timer->expires);
  42.635 -
  42.636 -    printk(KERN_ALERT "time: shadow_st=0x%X:%08X\n",
  42.637 -           (u32)(s_now>>32), (u32)s_now);
  42.638 -    printk(KERN_ALERT "time: wct=%lds %ldus shadow_wct=%lds %ldus\n",
  42.639 -           tv.tv_sec, tv.tv_usec, s_tv.tv_sec, s_tv.tv_usec);
  42.640 -    printk(KERN_ALERT "time: jiffies=%lu(0x%X:%08X) timeout=%lu(0x%X:%08X)\n",
  42.641 -           jiffies,(u32)(j_st>>32), (u32)j_st,
  42.642 -           timer->expires,(u32)(t_st>>32), (u32)t_st);
  42.643 -    printk(KERN_ALERT "time: processed_system_time=0x%X:%08X\n",
  42.644 -           (u32)(processed_system_time>>32), (u32)processed_system_time);
  42.645 -
  42.646 -#ifdef CONFIG_MAGIC_SYSRQ
  42.647 -    handle_sysrq('t',NULL,NULL,NULL);
  42.648 -#endif
  42.649 -}
  42.650 -
  42.651 -static struct irqaction dbg_time = {
  42.652 -    dbg_time_int, 
  42.653 -    SA_SHIRQ, 
  42.654 -    0, 
  42.655 -    "timer_dbg", 
  42.656 -    &dbg_time_int,
  42.657 -    NULL
  42.658 -};
  42.659 -
  42.660 -void __init time_init(void)
  42.661 -{
  42.662 -    unsigned long long alarm;
  42.663 -    u64 __cpu_khz, __cpu_ghz, cpu_freq, scale, scale2;
  42.664 -    unsigned int cpu_ghz;
  42.665 -
  42.666 -    __cpu_khz = __cpu_ghz = cpu_freq = HYPERVISOR_shared_info->cpu_freq;
  42.667 -    do_div(__cpu_khz, 1000UL);
  42.668 -    cpu_khz = (u32)__cpu_khz;
  42.669 -    do_div(__cpu_ghz, 1000000000UL);
  42.670 -    cpu_ghz = (unsigned int)__cpu_ghz;
  42.671 -
  42.672 -    printk("Xen reported: %lu.%03lu MHz processor.\n", 
  42.673 -           cpu_khz / 1000, cpu_khz % 1000);
  42.674 -
  42.675 -    xtime.tv_sec = HYPERVISOR_shared_info->wc_sec;
  42.676 -    xtime.tv_usec = HYPERVISOR_shared_info->wc_usec;
  42.677 -    processed_system_time = shadow_system_time;
  42.678 -
  42.679 -    for ( rdtsc_bitshift = 0; cpu_ghz != 0; rdtsc_bitshift++, cpu_ghz >>= 1 )
  42.680 -        continue;
  42.681 -
  42.682 -    scale = 1000000LL << (32 + rdtsc_bitshift);
  42.683 -    do_div(scale, (u32)cpu_freq);
  42.684 -
  42.685 -    if ( (cpu_freq >> 32) != 0 )
  42.686 -    {
  42.687 -        scale2 = 1000000LL << rdtsc_bitshift;
  42.688 -        do_div(scale2, (u32)(cpu_freq>>32));
  42.689 -        scale += scale2;
  42.690 -    }
  42.691 -
  42.692 -    st_scale_f = scale & 0xffffffff;
  42.693 -    st_scale_i = scale >> 32;
  42.694 -
  42.695 -    __get_time_values_from_xen();
  42.696 -    processed_system_time = shadow_system_time;
  42.697 -
  42.698 -    time_irq  = bind_virq_to_irq(VIRQ_TIMER);
  42.699 -    debug_irq = bind_virq_to_irq(VIRQ_DEBUG);
  42.700 -
  42.701 -    (void)setup_irq(time_irq, &irq_timer);
  42.702 -    (void)setup_irq(debug_irq, &dbg_time);
  42.703 -
  42.704 -    rdtscll(alarm);
  42.705 -}
  42.706 -
  42.707 -void time_suspend(void)
  42.708 -{
  42.709 -}
  42.710 -
  42.711 -void time_resume(void)
  42.712 -{
  42.713 -    unsigned long flags;
  42.714 -    write_lock_irqsave(&xtime_lock, flags);
  42.715 -    /* Get timebases for new environment. */ 
  42.716 -    __get_time_values_from_xen();
  42.717 -    /* Reset our own concept of passage of system time. */
  42.718 -    processed_system_time = shadow_system_time;
  42.719 -    /* Accept a warp in UTC (wall-clock) time. */
  42.720 -    last_seen_tv.tv_sec = 0;
  42.721 -    /* Make sure we resync UTC time with Xen on next timer interrupt. */
  42.722 -    last_update_from_xen = 0;
  42.723 -    write_unlock_irqrestore(&xtime_lock, flags);
  42.724 -}
  42.725 -
  42.726 -/*
  42.727 - * /proc/sys/xen: This really belongs in another file. It can stay here for
  42.728 - * now however.
  42.729 - */
  42.730 -static ctl_table xen_subtable[] = {
  42.731 -    {1, "independent_wallclock", &independent_wallclock,
  42.732 -     sizeof(independent_wallclock), 0644, NULL, proc_dointvec},
  42.733 -    {0}
  42.734 -};
  42.735 -static ctl_table xen_table[] = {
  42.736 -    {123, "xen", NULL, 0, 0555, xen_subtable},
  42.737 -    {0}
  42.738 -};
  42.739 -static int __init xen_sysctl_init(void)
  42.740 -{
  42.741 -    (void)register_sysctl_table(xen_table, 0);
  42.742 -    return 0;
  42.743 -}
  42.744 -__initcall(xen_sysctl_init);
    43.1 --- a/linux-2.4-xen-sparse/arch/xen/kernel/traps.c	Sat Oct 08 11:37:45 2005 -0600
    43.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.3 @@ -1,619 +0,0 @@
    43.4 -/*
    43.5 - *  linux/arch/i386/traps.c
    43.6 - *
    43.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    43.8 - *
    43.9 - *  Pentium III FXSR, SSE support
   43.10 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   43.11 - */
   43.12 -
   43.13 -/*
   43.14 - * 'Traps.c' handles hardware traps and faults after we have saved some
   43.15 - * state in 'asm.s'.
   43.16 - */
   43.17 -#include <linux/config.h>
   43.18 -#include <linux/sched.h>
   43.19 -#include <linux/kernel.h>
   43.20 -#include <linux/string.h>
   43.21 -#include <linux/errno.h>
   43.22 -#include <linux/ptrace.h>
   43.23 -#include <linux/timer.h>
   43.24 -#include <linux/mm.h>
   43.25 -#include <linux/init.h>
   43.26 -#include <linux/delay.h>
   43.27 -#include <linux/spinlock.h>
   43.28 -#include <linux/interrupt.h>
   43.29 -#include <linux/highmem.h>
   43.30 -
   43.31 -#include <asm/system.h>
   43.32 -#include <asm/uaccess.h>
   43.33 -#include <asm/io.h>
   43.34 -#include <asm/atomic.h>
   43.35 -#include <asm/debugreg.h>
   43.36 -#include <asm/desc.h>
   43.37 -#include <asm/i387.h>
   43.38 -
   43.39 -#include <asm/smp.h>
   43.40 -#include <asm/pgalloc.h>
   43.41 -
   43.42 -#include <asm/hypervisor.h>
   43.43 -
   43.44 -#include <linux/irq.h>
   43.45 -#include <linux/module.h>
   43.46 -
   43.47 -asmlinkage int system_call(void);
   43.48 -asmlinkage void lcall7(void);
   43.49 -asmlinkage void lcall27(void);
   43.50 -
   43.51 -asmlinkage void divide_error(void);
   43.52 -asmlinkage void debug(void);
   43.53 -asmlinkage void int3(void);
   43.54 -asmlinkage void overflow(void);
   43.55 -asmlinkage void bounds(void);
   43.56 -asmlinkage void invalid_op(void);
   43.57 -asmlinkage void device_not_available(void);
   43.58 -asmlinkage void double_fault(void);
   43.59 -asmlinkage void coprocessor_segment_overrun(void);
   43.60 -asmlinkage void invalid_TSS(void);
   43.61 -asmlinkage void segment_not_present(void);
   43.62 -asmlinkage void stack_segment(void);
   43.63 -asmlinkage void general_protection(void);
   43.64 -asmlinkage void page_fault(void);
   43.65 -asmlinkage void coprocessor_error(void);
   43.66 -asmlinkage void simd_coprocessor_error(void);
   43.67 -asmlinkage void alignment_check(void);
   43.68 -asmlinkage void fixup_4gb_segment(void);
   43.69 -asmlinkage void machine_check(void);
   43.70 -
   43.71 -int kstack_depth_to_print = 24;
   43.72 -
   43.73 -
   43.74 -/*
   43.75 - * If the address is either in the .text section of the
   43.76 - * kernel, or in the vmalloc'ed module regions, it *may* 
   43.77 - * be the address of a calling routine
   43.78 - */
   43.79 -
   43.80 -#ifdef CONFIG_MODULES
   43.81 -
   43.82 -extern struct module *module_list;
   43.83 -extern struct module kernel_module;
   43.84 -
   43.85 -static inline int kernel_text_address(unsigned long addr)
   43.86 -{
   43.87 -	int retval = 0;
   43.88 -	struct module *mod;
   43.89 -
   43.90 -	if (addr >= (unsigned long) &_stext &&
   43.91 -	    addr <= (unsigned long) &_etext)
   43.92 -		return 1;
   43.93 -
   43.94 -	for (mod = module_list; mod != &kernel_module; mod = mod->next) {
   43.95 -		/* mod_bound tests for addr being inside the vmalloc'ed
   43.96 -		 * module area. Of course it'd be better to test only
   43.97 -		 * for the .text subset... */
   43.98 -		if (mod_bound(addr, 0, mod)) {
   43.99 -			retval = 1;
  43.100 -			break;
  43.101 -		}
  43.102 -	}
  43.103 -
  43.104 -	return retval;
  43.105 -}
  43.106 -
  43.107 -#else
  43.108 -
  43.109 -static inline int kernel_text_address(unsigned long addr)
  43.110 -{
  43.111 -	return (addr >= (unsigned long) &_stext &&
  43.112 -		addr <= (unsigned long) &_etext);
  43.113 -}
  43.114 -
  43.115 -#endif
  43.116 -
  43.117 -void show_trace(unsigned long * stack)
  43.118 -{
  43.119 -	int i;
  43.120 -	unsigned long addr;
  43.121 -
  43.122 -	if (!stack)
  43.123 -		stack = (unsigned long*)&stack;
  43.124 -
  43.125 -	printk("Call Trace: ");
  43.126 -	i = 1;
  43.127 -	while (((long) stack & (THREAD_SIZE-1)) != 0) {
  43.128 -		addr = *stack++;
  43.129 -		if (kernel_text_address(addr)) {
  43.130 -			if (i && ((i % 6) == 0))
  43.131 -				printk("\n   ");
  43.132 -			printk("[<%08lx>] ", addr);
  43.133 -			i++;
  43.134 -		}
  43.135 -	}
  43.136 -	printk("\n");
  43.137 -}
  43.138 -
  43.139 -void show_trace_task(struct task_struct *tsk)
  43.140 -{
  43.141 -	unsigned long esp = tsk->thread.esp;
  43.142 -
  43.143 -	/* User space on another CPU? */
  43.144 -	if ((esp ^ (unsigned long)tsk) & (PAGE_MASK<<1))
  43.145 -		return;
  43.146 -	show_trace((unsigned long *)esp);
  43.147 -}
  43.148 -
  43.149 -void show_stack(unsigned long * esp)
  43.150 -{
  43.151 -	unsigned long *stack;
  43.152 -	int i;
  43.153 -
  43.154 -	// debugging aid: "show_stack(NULL);" prints the
  43.155 -	// back trace for this cpu.
  43.156 -
  43.157 -	if(esp==NULL)
  43.158 -		esp=(unsigned long*)&esp;
  43.159 -
  43.160 -	stack = esp;
  43.161 -	for(i=0; i < kstack_depth_to_print; i++) {
  43.162 -		if (((long) stack & (THREAD_SIZE-1)) == 0)
  43.163 -			break;
  43.164 -		if (i && ((i % 8) == 0))
  43.165 -			printk("\n       ");
  43.166 -		printk("%08lx ", *stack++);
  43.167 -	}
  43.168 -	printk("\n");
  43.169 -	show_trace(esp);
  43.170 -}
  43.171 -
  43.172 -void show_registers(struct pt_regs *regs)
  43.173