ia64/xen-unstable

changeset 3540:d8ba911dce48

bitkeeper revision 1.1159.1.537 (41f67ab3Du0bIUXPaemWGStms0aS8A)

Merge tempest.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk
into tempest.cl.cam.ac.uk:/local/scratch/smh22/xen-unstable.bk
author smh22@tempest.cl.cam.ac.uk
date Tue Jan 25 16:58:27 2005 +0000 (2005-01-25)
parents bb56e77896e7 93b8d938e316
children 08e173bd9db1
files .rootkeys BitKeeper/etc/ignore BitKeeper/etc/logging_ok Makefile buildconfigs/Rules.mk buildconfigs/mk.linux-2.4-xen0 buildconfigs/mk.linux-2.4-xenU buildconfigs/mk.linux-2.6-xen0 buildconfigs/mk.linux-2.6-xenU buildconfigs/mk.netbsd-2.0-xenU docs/Makefile install.sh linux-2.4.29-xen-sparse/arch/xen/Makefile linux-2.4.29-xen-sparse/mkbuildtree linux-2.6.10-xen-sparse/arch/xen/Makefile linux-2.6.10-xen-sparse/mkbuildtree netbsd-2.0-xen-sparse/mkbuildtree tools/Makefile tools/examples/Makefile tools/examples/init.d/xend tools/examples/network tools/ioemu/iodev/Makefile tools/libxc/Makefile tools/libxutil/Makefile tools/misc/Makefile tools/misc/miniterm/Makefile tools/python/Makefile tools/python/xen/sv/params.py tools/python/xen/xend/XendRoot.py tools/python/xen/xend/server/SrvServer.py tools/python/xen/xend/sxp.py tools/sv/Makefile tools/vnet/Makefile tools/vnet/examples/Makefile tools/vnet/vnet-module/Makefile-2.4 tools/vnet/vnet-module/Makefile-2.6 tools/vnet/vnetd/Makefile tools/xcs/Makefile tools/xentrace/Makefile tools/xfrd/Makefile xen/Makefile xen/Rules.mk xen/arch/x86/Makefile xen/arch/x86/Rules.mk xen/arch/x86/domain.c xen/arch/x86/mpparse.c xen/arch/x86/nmi.c xen/arch/x86/pci-pc.c xen/arch/x86/pdb-stub.c xen/common/Makefile xen/common/domain.c xen/common/physdev.c xen/common/sched_atropos.c xen/common/sched_bvt.c xen/common/sched_rrobin.c xen/common/slab.c xen/drivers/acpi/Makefile xen/drivers/char/Makefile xen/drivers/pci/Makefile xen/drivers/pci/pci.c xen/include/asm-x86/cpufeature.h xen/include/asm-x86/fixmap.h xen/include/asm-x86/irq.h xen/include/asm-x86/msr.h xen/include/xen/compile.h.in xen/include/xen/list.h xen/include/xen/pci.h
line diff
     1.1 --- a/.rootkeys	Mon Jan 24 10:19:03 2005 +0000
     1.2 +++ b/.rootkeys	Tue Jan 25 16:58:27 2005 +0000
     1.3 @@ -1060,6 +1060,7 @@ 3ddb79c25UE59iu4JJcbRalx95mvcg xen/inclu
     1.4  3e397e66m2tO3s-J8Jnr7Ws_tGoPTg xen/include/xen/ac_timer.h
     1.5  40715b2epYl2jBbxzz9CI2rgIca7Zg xen/include/xen/acpi.h
     1.6  3ddb79c0c0cX_DZE209-Bb-Rx1v-Aw xen/include/xen/cache.h
     1.7 +41f2cea7Yna7xc0X9fyavIjoSFFeVg xen/include/xen/compile.h.in
     1.8  3f840f12CkbYSlwMrY2S11Mpyxg7Nw xen/include/xen/compiler.h
     1.9  3ddb79c259jh8hE7vre_8NuE7nwNSA xen/include/xen/config.h
    1.10  3eb165e0eawr3R-p2ZQtSdLWtLRN_A xen/include/xen/console.h
     2.1 --- a/BitKeeper/etc/ignore	Mon Jan 24 10:19:03 2005 +0000
     2.2 +++ b/BitKeeper/etc/ignore	Tue Jan 25 16:58:27 2005 +0000
     2.3 @@ -1,6 +1,7 @@
     2.4  *.a
     2.5  *.d
     2.6  *.o
     2.7 +*.opic
     2.8  *.pyc
     2.9  *.so
    2.10  *.so.*
    2.11 @@ -20,9 +21,29 @@ docs/*.log
    2.12  docs/*.pdf
    2.13  docs/*.ps
    2.14  docs/*.toc
    2.15 +docs/figs/xenserver.eps
    2.16  docs/html/*
    2.17 +docs/interface/WARNINGS
    2.18 +docs/interface/images.pl
    2.19 +docs/interface/images.tex
    2.20 +docs/interface/img1.png
    2.21 +docs/interface/index.html
    2.22 +docs/interface/interface.css
    2.23 +docs/interface/interface.html
    2.24 +docs/interface/labels.pl
    2.25  docs/pdf/*
    2.26  docs/ps/*
    2.27 +docs/user/WARNINGS
    2.28 +docs/user/images.pl
    2.29 +docs/user/images.tex
    2.30 +docs/user/img1.png
    2.31 +docs/user/img2.png
    2.32 +docs/user/img3.png
    2.33 +docs/user/index.html
    2.34 +docs/user/internals.pl
    2.35 +docs/user/labels.pl
    2.36 +docs/user/user.css
    2.37 +docs/user/user.html
    2.38  extras/mini-os/h/hypervisor-ifs
    2.39  install/*
    2.40  linux-*-xen0/*
    2.41 @@ -55,9 +76,9 @@ tools/vnet/vnet-module/vnet_module.mod.*
    2.42  tools/vnetd/vnetd
    2.43  tools/web-shutdown.tap
    2.44  tools/x2d2/minixend
    2.45 -tools/xentrace/xentrace
    2.46  tools/xcs/xcs
    2.47  tools/xcs/xcsdump
    2.48 +tools/xentrace/xentrace
    2.49  tools/xfrd/xfrd
    2.50  xen/BLOG
    2.51  xen/arch/x86/asm-offsets.s
    2.52 @@ -70,6 +91,8 @@ xen/figlet/figlet
    2.53  xen/include/asm
    2.54  xen/include/asm-*/asm-offsets.h
    2.55  xen/include/hypervisor-ifs/arch
    2.56 +xen/include/xen/*.new
    2.57 +xen/include/xen/banner.h
    2.58  xen/include/xen/compile.h
    2.59  xen/tools/elf-reloc
    2.60  xen/tools/figlet/figlet
     3.1 --- a/BitKeeper/etc/logging_ok	Mon Jan 24 10:19:03 2005 +0000
     3.2 +++ b/BitKeeper/etc/logging_ok	Tue Jan 25 16:58:27 2005 +0000
     3.3 @@ -20,6 +20,7 @@ gm281@tetrapod.cl.cam.ac.uk
     3.4  iap10@freefall.cl.cam.ac.uk
     3.5  iap10@labyrinth.cl.cam.ac.uk
     3.6  iap10@nidd.cl.cam.ac.uk
     3.7 +iap10@pb007.cl.cam.ac.uk
     3.8  iap10@striker.cl.cam.ac.uk
     3.9  iap10@tetris.cl.cam.ac.uk
    3.10  jws22@gauntlet.cl.cam.ac.uk
     4.1 --- a/Makefile	Mon Jan 24 10:19:03 2005 +0000
     4.2 +++ b/Makefile	Tue Jan 25 16:58:27 2005 +0000
     4.3 @@ -2,10 +2,12 @@
     4.4  # Grand Unified Makefile for Xen.
     4.5  #
     4.6  
     4.7 -DIST_DIR    ?= $(shell pwd)/dist
     4.8 -INSTALL_DIR ?= $(DIST_DIR)/install
     4.9 +INSTALL		:= install
    4.10 +INSTALL_DIR	:= $(INSTALL) -d -m0755
    4.11 +INSTALL_DATA	:= $(INSTALL) -m0644
    4.12 +INSTALL_PROG	:= $(INSTALL) -m0755
    4.13  
    4.14 -KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
    4.15 +KERNELS ?= linux-2.6-xen0 linux-2.6-xenU  linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
    4.16  # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
    4.17  # You may use wildcards in the above e.g. KERNELS=*2.4*
    4.18  
    4.19 @@ -13,8 +15,7 @@ ALLKERNELS = $(patsubst buildconfigs/mk.
    4.20  ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
    4.21  XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
    4.22  
    4.23 -
    4.24 -export INSTALL_DIR
    4.25 +export DESTDIR
    4.26  
    4.27  include buildconfigs/Rules.mk
    4.28  
    4.29 @@ -26,43 +27,34 @@ all: dist
    4.30  
    4.31  # install everything into the standard system directories
    4.32  # NB: install explicitly does not check that everything is up to date!
    4.33 -install: install-tools install-xen install-kernels install-docs
    4.34 -
    4.35 -install-xen:
    4.36 -	$(MAKE) -C xen install
    4.37 -
    4.38 -install-tools:
    4.39 -	$(MAKE) -C tools install
    4.40 +install: xen checked-tools kernels docs
    4.41  
    4.42 -install-kernels:
    4.43 -	$(shell cp -a $(INSTALL_DIR)/boot/* /boot/)
    4.44 -	$(shell cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/)
    4.45 -	$(shell cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/)
    4.46 -	$(shell cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/)
    4.47 -
    4.48 -install-docs:
    4.49 -	sh ./docs/check_pkgs && $(MAKE) -C docs install || true
    4.50 +# Only check for install req'mts on 'make install', not on 'make dist'.
    4.51 +checked-tools:
    4.52 +	$(MAKE) -C tools/check install
    4.53 +	$(MAKE) -C tools install
    4.54  
    4.55  # build and install everything into local dist directory
    4.56 +dist: DISTDIR=$(CURDIR)/dist
    4.57 +dist: DESTDIR=$(DISTDIR)/install
    4.58  dist: xen tools kernels docs
    4.59 -	install -m0644 ./COPYING $(DIST_DIR)
    4.60 -	install -m0644 ./README $(DIST_DIR)
    4.61 -	install -m0755 ./install.sh $(DIST_DIR)
    4.62 -	mkdir -p $(DIST_DIR)/check
    4.63 -	install -m0755 tools/check/chk tools/check/check_* $(DIST_DIR)/check
    4.64 +	$(INSTALL_DIR) $(DISTDIR)/check
    4.65 +	$(INSTALL_DATA) ./COPYING $(DISTDIR)
    4.66 +	$(INSTALL_DATA) ./README $(DISTDIR)
    4.67 +	$(INSTALL_PROG) ./install.sh $(DISTDIR)
    4.68 +	$(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
    4.69  
    4.70  xen:
    4.71 -	$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C xen install
    4.72 +	$(MAKE) -C xen install
    4.73  
    4.74  tools:
    4.75 -	$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
    4.76 +	$(MAKE) -C tools install
    4.77  
    4.78  kernels:
    4.79 -	for i in $(XKERNELS) ; do $(MAKE) $$i-build ; done
    4.80 +	for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
    4.81  
    4.82  docs:
    4.83 -	sh ./docs/check_pkgs && \
    4.84 -		$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C docs install || true
    4.85 +	sh ./docs/check_pkgs && $(MAKE) -C docs install || true
    4.86  
    4.87  # Build all the various kernels and modules
    4.88  kbuild: kernels
    4.89 @@ -77,7 +69,7 @@ kclean:
    4.90  
    4.91  # Make patches from kernel sparse trees
    4.92  mkpatches:
    4.93 -	for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done
    4.94 +	for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch || exit 1; done
    4.95  
    4.96  
    4.97  # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
    4.98 @@ -103,38 +95,33 @@ mrproper: clean
    4.99  install-twisted:
   4.100  	wget http://www.twistedmatrix.com/products/get-current.epy
   4.101  	tar -zxf Twisted-*.tar.gz
   4.102 -	( cd Twisted-* ; python setup.py install )
   4.103 +	cd Twisted-* && python setup.py install
   4.104  
   4.105  install-logging: LOGGING=logging-0.4.9.2
   4.106  install-logging:
   4.107  	[ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
   4.108  	tar -zxf $(LOGGING).tar.gz
   4.109 -	( cd $(LOGGING) && python setup.py install )
   4.110 +	cd $(LOGGING) && python setup.py install
   4.111  
   4.112  # handy target to upgrade iptables (use rpm or apt-get in preference)
   4.113  install-iptables:
   4.114  	wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
   4.115 -	tar -jxf iptables-*.tar.bz2
   4.116 -	( cd iptables-* ; \
   4.117 -	  make PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install)
   4.118 +	tar -jxf iptables-1.2.11.tar.bz2
   4.119 +	$(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
   4.120  
   4.121  help:
   4.122  	@echo 'Installation targets:'
   4.123 -	@echo '  install          - install everything'
   4.124 -	@echo '  install-xen      - install the Xen hypervisor'
   4.125 -	@echo '  install-tools    - install the control tools'
   4.126 -	@echo '  install-kernels  - install guest kernels'
   4.127 -	@echo '  install-docs     - install documentation'
   4.128 +	@echo '  install          - build and install everything'
   4.129  	@echo ''
   4.130  	@echo 'Building targets:'
   4.131 -	@echo '  dist             - build everything and place in dist/'
   4.132 +	@echo '  dist             - build and install everything into local dist directory'
   4.133  	@echo '  world            - clean everything, delete guest kernel build'
   4.134  	@echo '                     trees then make dist'
   4.135 -	@echo '  xen              - build Xen hypervisor and place in dist/'
   4.136 -	@echo '  tools            - build tools and place in dist/'
   4.137 -	@echo '  kernels          - build guest kernels and place in dist/'
   4.138 +	@echo '  xen              - build and install Xen hypervisor'
   4.139 +	@echo '  tools            - build and install tools'
   4.140 +	@echo '  kernels          - build and install guest kernels'
   4.141  	@echo '  kbuild           - synonym for make kernels'
   4.142 -	@echo '  docs             - build docs and place in dist/'
   4.143 +	@echo '  docs             - build and install docs'
   4.144  	@echo ''
   4.145  	@echo 'Cleaning targets:'
   4.146  	@echo '  clean            - clean the Xen, tools and docs (but not'
     5.1 --- a/buildconfigs/Rules.mk	Mon Jan 24 10:19:03 2005 +0000
     5.2 +++ b/buildconfigs/Rules.mk	Tue Jan 25 16:58:27 2005 +0000
     5.3 @@ -1,8 +1,8 @@
     5.4  
     5.5  # We expect these two to already be set if people 
     5.6  # are using the top-level Makefile
     5.7 -DIST_DIR	?= $(shell pwd)/dist
     5.8 -INSTALL_DIR	?= $(DIST_DIR)/install
     5.9 +DISTDIR	?= $(CURDIR)/dist
    5.10 +DESTDIR	?= $(DISTDIR)/install
    5.11  
    5.12  .PHONY:	mkpatches mrproper
    5.13  
     6.1 --- a/buildconfigs/mk.linux-2.4-xen0	Mon Jan 24 10:19:03 2005 +0000
     6.2 +++ b/buildconfigs/mk.linux-2.4-xen0	Tue Jan 25 16:58:27 2005 +0000
     6.3 @@ -13,9 +13,11 @@ include buildconfigs/Rules.mk
     6.4  
     6.5  # The real action starts here!
     6.6  build: $(LINUX_DIR)/include/linux/autoconf.h
     6.7 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen modules
     6.8 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(INSTALL_DIR) modules_install
     6.9 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
    6.10 +	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    6.11 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
    6.12 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    6.13 +	fi
    6.14 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    6.15  
    6.16  patches/tmp/ebtables.diff:
    6.17  	mkdir -p patches/tmp
    6.18 @@ -35,8 +37,8 @@ patches/tmp/ebtables.diff:
    6.19  	# add ebtables patch
    6.20  	( cd $(LINUX_DIR) ; patch -p1 -F3 < ../patches/tmp/ebtables.diff )
    6.21  	# Re-use config from install dir if one exits else use default config
    6.22 -	[ -r $(INSTALL_DIR)/boot/config-$(FULLVERSION) ] && \
    6.23 -	  cp $(INSTALL_DIR)/boot/config-$(FULLVERSION) $(LINUX_DIR)/.config \
    6.24 +	[ -r $(DESTDIR)/boot/config-$(FULLVERSION) ] && \
    6.25 +	  cp $(DESTDIR)/boot/config-$(FULLVERSION) $(LINUX_DIR)/.config \
    6.26  	  || cp $(LINUX_DIR)/arch/xen/defconfig-$(EXTRAVERSION) \
    6.27  		$(LINUX_DIR)/.config
    6.28  	make -C $(LINUX_DIR) ARCH=xen oldconfig
     7.1 --- a/buildconfigs/mk.linux-2.4-xenU	Mon Jan 24 10:19:03 2005 +0000
     7.2 +++ b/buildconfigs/mk.linux-2.4-xenU	Tue Jan 25 16:58:27 2005 +0000
     7.3 @@ -13,9 +13,11 @@ include buildconfigs/Rules.mk
     7.4  
     7.5  # The real action starts here!
     7.6  build: $(LINUX_DIR)/include/linux/autoconf.h
     7.7 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen modules	
     7.8 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(INSTALL_DIR) modules_install
     7.9 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
    7.10 +	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
    7.11 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
    7.12 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
    7.13 +	fi
    7.14 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    7.15  
    7.16  $(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
    7.17  	rm -rf $(LINUX_DIR)
    7.18 @@ -28,8 +30,8 @@ build: $(LINUX_DIR)/include/linux/autoco
    7.19  	  sed -e 's/^EXTRAVERSION.*/&-$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    7.20  	  rm -f Makefile ; mv Mk.tmp Makefile )
    7.21  	# Re-use config from install dir if one exits else use default config
    7.22 -	[ -r $(INSTALL_DIR)/boot/config-$(FULLVERSION) ] && \
    7.23 -	  cp $(INSTALL_DIR)/boot/config-$(FULLVERSION) $(LINUX_DIR)/.config \
    7.24 +	[ -r $(DESTDIR)/boot/config-$(FULLVERSION) ] && \
    7.25 +	  cp $(DESTDIR)/boot/config-$(FULLVERSION) $(LINUX_DIR)/.config \
    7.26  	  || cp $(LINUX_DIR)/arch/xen/defconfig-$(EXTRAVERSION) \
    7.27  		$(LINUX_DIR)/.config
    7.28  	make -C $(LINUX_DIR) ARCH=xen oldconfig
     8.1 --- a/buildconfigs/mk.linux-2.6-xen0	Mon Jan 24 10:19:03 2005 +0000
     8.2 +++ b/buildconfigs/mk.linux-2.6-xen0	Tue Jan 25 16:58:27 2005 +0000
     8.3 @@ -15,9 +15,9 @@ include buildconfigs/Rules.mk
     8.4  build: $(LINUX_DIR)/include/linux/autoconf.h
     8.5  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
     8.6  	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
     8.7 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(INSTALL_DIR) modules_install ; \
     8.8 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
     8.9  	fi
    8.10 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
    8.11 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    8.12  
    8.13  $(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
    8.14  	rm -rf $(LINUX_DIR)
    8.15 @@ -30,8 +30,8 @@ build: $(LINUX_DIR)/include/linux/autoco
    8.16  	  sed -e 's/^EXTRAVERSION.*/&-$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    8.17  	  rm -f Makefile ; mv Mk.tmp Makefile )
    8.18  	# Re-use config from install dir if one exits else use default config
    8.19 -	[ -r $(INSTALL_DIR)/boot/config-$(FULLVERSION) ] && \
    8.20 -	  cp $(INSTALL_DIR)/boot/config-$(FULLVERSION) $(LINUX_DIR)/.config \
    8.21 +	[ -r $(DESTDIR)/boot/config-$(FULLVERSION) ] && \
    8.22 +	  cp $(DESTDIR)/boot/config-$(FULLVERSION) $(LINUX_DIR)/.config \
    8.23  	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig \
    8.24  		$(LINUX_DIR)/.config
    8.25  	make -C $(LINUX_DIR) ARCH=xen oldconfig
     9.1 --- a/buildconfigs/mk.linux-2.6-xenU	Mon Jan 24 10:19:03 2005 +0000
     9.2 +++ b/buildconfigs/mk.linux-2.6-xenU	Tue Jan 25 16:58:27 2005 +0000
     9.3 @@ -15,9 +15,9 @@ include buildconfigs/Rules.mk
     9.4  build: $(LINUX_DIR)/include/linux/autoconf.h
     9.5  	if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
     9.6  	    $(MAKE) -C $(LINUX_DIR) ARCH=xen modules ; \
     9.7 -	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(INSTALL_DIR) modules_install ; \
     9.8 +	    $(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
     9.9  	fi
    9.10 -	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
    9.11 +	$(MAKE) -C $(LINUX_DIR) ARCH=xen INSTALL_PATH=$(DESTDIR) install
    9.12  
    9.13  $(LINUX_DIR)/include/linux/autoconf.h: pristine-linux-$(LINUX_VER)
    9.14  	rm -rf $(LINUX_DIR)
    9.15 @@ -30,8 +30,8 @@ build: $(LINUX_DIR)/include/linux/autoco
    9.16  	  sed -e 's/^EXTRAVERSION.*/&-$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
    9.17  	  rm -f Makefile ; mv Mk.tmp Makefile )
    9.18  	# Re-use config from install dir if one exits else use default config
    9.19 -	[ -r $(INSTALL_DIR)/boot/config-$(FULLVERSION) ] && \
    9.20 -	  cp $(INSTALL_DIR)/boot/config-$(FULLVERSION) $(LINUX_DIR)/.config \
    9.21 +	[ -r $(DESTDIR)/boot/config-$(FULLVERSION) ] && \
    9.22 +	  cp $(DESTDIR)/boot/config-$(FULLVERSION) $(LINUX_DIR)/.config \
    9.23  	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig \
    9.24  		$(LINUX_DIR)/.config
    9.25  	make -C $(LINUX_DIR) ARCH=xen oldconfig
    10.1 --- a/buildconfigs/mk.netbsd-2.0-xenU	Mon Jan 24 10:19:03 2005 +0000
    10.2 +++ b/buildconfigs/mk.netbsd-2.0-xenU	Tue Jan 25 16:58:27 2005 +0000
    10.3 @@ -34,7 +34,7 @@ netbsd-%-tools: netbsd-%-tools.tar.bz2
    10.4  netbsd-xen%: $(NETBSD_DIR)/.valid netbsd-$(NETBSD_RELEASE)-tools
    10.5  	$(MAKE) -C netbsd-$(FULLVERSION) config
    10.6  	$(MAKE) -C netbsd-$(FULLVERSION) netbsd
    10.7 -	$(MAKE) -C netbsd-$(FULLVERSION) INSTALL_PATH=$(INSTALL_DIR) INSTALL_NAME=boot/netbsd-$(NETBSD_VER)-xen$* install
    10.8 +	$(MAKE) -C netbsd-$(FULLVERSION) INSTALL_PATH=$(DESTDIR) INSTALL_NAME=boot/netbsd-$(NETBSD_VER)-xen$* install
    10.9  
   10.10  clean:
   10.11  	$(MAKE) -C netbsd-$(FULLVERSION) clean
    11.1 --- a/docs/Makefile	Mon Jan 24 10:19:03 2005 +0000
    11.2 +++ b/docs/Makefile	Tue Jan 25 16:58:27 2005 +0000
    11.3 @@ -1,8 +1,21 @@
    11.4 +#!/usr/bin/make -f
    11.5  
    11.6 -DOC_TEX  := $(wildcard src/*.tex)
    11.7 -DOC_PS   := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
    11.8 -DOC_PDF  := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
    11.9 -DOC_HTML := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
   11.10 +INSTALL		= install
   11.11 +INSTALL_DIR	= $(INSTALL) -d -m0755
   11.12 +
   11.13 +PS2PDF		:= ps2pdf
   11.14 +DVIPS		:= dvips
   11.15 +LATEX		:= latex
   11.16 +FIG2DEV		:= fig2dev
   11.17 +TGIF		:= tgif
   11.18 +LATEX2HTML	:= latex2html
   11.19 +
   11.20 +pkgdocdir	:= /usr/share/doc/xen
   11.21 +
   11.22 +DOC_TEX		:= $(wildcard src/*.tex)
   11.23 +DOC_PS		:= $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
   11.24 +DOC_PDF		:= $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
   11.25 +DOC_HTML	:= $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
   11.26  
   11.27  GFX  = $(patsubst %.obj, %.eps, $(wildcard figs/*.obj))
   11.28  GFX += $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
   11.29 @@ -22,30 +35,34 @@ clean:
   11.30  	rm -rf $(GFX) ps pdf html
   11.31  
   11.32  install: all
   11.33 -	rm -rf $(prefix)/usr/share/doc/xen
   11.34 -	mkdir -p $(prefix)/usr/share/doc/xen
   11.35 -	cp -dR ps $(prefix)/usr/share/doc/xen
   11.36 -	cp -dR pdf $(prefix)/usr/share/doc/xen
   11.37 -	cp -dR html $(prefix)/usr/share/doc/xen
   11.38 +	rm -rf $(DESTDIR)$(pkgdocdir)
   11.39 +	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
   11.40 +	cp -dR ps $(DESTDIR)$(pkgdocdir)
   11.41 +	cp -dR pdf $(DESTDIR)$(pkgdocdir)
   11.42 +	cp -dR html $(DESTDIR)$(pkgdocdir)
   11.43  
   11.44  pdf/%.pdf: ps/%.ps
   11.45 -	mkdir -p pdf ; ps2pdf $< $@
   11.46 +	$(INSTALL_DIR) $(@D)
   11.47 +	$(PS2PDF) $< $@.new
   11.48 +	mv $@.new $@
   11.49  
   11.50  ps/%.ps: %.dvi
   11.51 -	mkdir -p ps ; dvips -Ppdf -G0 -o $@ $<
   11.52 +	$(INSTALL_DIR) $(@D)
   11.53 +	$(DVIPS) -Ppdf -G0 -o $@.new $<
   11.54 +	mv $@.new $@
   11.55  
   11.56  %.dvi: src/%.tex $(GFX)
   11.57 -	latex $< >/dev/null
   11.58 -	if [ -e $*.toc ] ; then latex $< >/dev/null ; fi
   11.59 +	$(LATEX) $< >/dev/null
   11.60 +	if [ -e $*.toc ] ; then $(LATEX) $< >/dev/null ; fi
   11.61  
   11.62  %.eps: %.fig
   11.63 -	fig2dev -L eps $< $@
   11.64 +	$(FIG2DEV) -L eps $< $@
   11.65  
   11.66  %.eps: %.obj
   11.67 -	tgif -print -color -eps $<
   11.68 +	$(TGIF) -print -color -eps $<
   11.69  
   11.70  html/%/index.html: src/%.tex
   11.71 -	mkdir -p html/$*
   11.72 -	latex2html -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
   11.73 -	-numbered_footnotes -local_icons -noinfo -math -dir html/$* \
   11.74 +	$(INSTALL_DIR) $(@D)
   11.75 +	$(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
   11.76 +	-numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
   11.77  	$< 1>/dev/null 2>/dev/null
    12.1 --- a/install.sh	Mon Jan 24 10:19:03 2005 +0000
    12.2 +++ b/install.sh	Tue Jan 25 16:58:27 2005 +0000
    12.3 @@ -23,6 +23,15 @@ if ! [ -d $dst ]; then
    12.4  fi
    12.5  
    12.6  echo "Installing Xen from '$src' to '$dst'..."
    12.7 +cd $src/boot
    12.8 +(echo '2.6.*' -2.6; echo '2.4.*' -2.4; echo '2.*.*' '') | while read mv
    12.9 +do
   12.10 +  l=$(eval ls -t vmlinuz-$m-xen0 2>/dev/null | head -n 1)
   12.11 +  [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xen0
   12.12 +  l=$(eval ls -t vmlinuz-$m-xenU 2>/dev/null | head -n 1)
   12.13 +  [ -e "$l" ] && ln -fs "$l" vmlinuz${v}-xenU
   12.14 +done
   12.15 +cd -
   12.16  cp -fdR $src/* $dst
   12.17  echo "All done."
   12.18  
    13.1 --- a/linux-2.4.29-xen-sparse/arch/xen/Makefile	Mon Jan 24 10:19:03 2005 +0000
    13.2 +++ b/linux-2.4.29-xen-sparse/arch/xen/Makefile	Tue Jan 25 16:58:27 2005 +0000
    13.3 @@ -120,9 +120,6 @@ install: bzImage
    13.4  	install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
    13.5  	install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(INSTALL_NAME)$(INSTALL_SUFFIX)
    13.6  
    13.7 -dist: 
    13.8 -	$(MAKE) INSTALL_PATH=../dist/install install
    13.9 -
   13.10  %_config: arch/xen/defconfig-%
   13.11  	rm -f .config arch/xen/defconfig
   13.12  	cp -f arch/xen/defconfig-$(@:_config=) arch/xen/defconfig
    14.1 --- a/linux-2.4.29-xen-sparse/mkbuildtree	Mon Jan 24 10:19:03 2005 +0000
    14.2 +++ b/linux-2.4.29-xen-sparse/mkbuildtree	Tue Jan 25 16:58:27 2005 +0000
    14.3 @@ -1,4 +1,4 @@
    14.4 -#!/bin/sh
    14.5 +#!/bin/bash
    14.6  
    14.7  # mkbuildtree <build tree>
    14.8  #
    15.1 --- a/linux-2.6.10-xen-sparse/arch/xen/Makefile	Mon Jan 24 10:19:03 2005 +0000
    15.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/Makefile	Tue Jan 25 16:58:27 2005 +0000
    15.3 @@ -54,8 +54,6 @@ install: vmlinuz
    15.4  	install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    15.5  	mkdir -p $(INSTALL_PATH)/usr/include/xen/linux
    15.6  	install -m0644 include/asm-xen/linux-public/*.h $(INSTALL_PATH)/usr/include/xen/linux
    15.7 -dist:
    15.8 -	$(MAKE) INSTALL_PATH=../dist/install install
    15.9  
   15.10  archclean:
   15.11  	@if [ -e arch/xen/arch ]; then $(MAKE) $(clean)=arch/xen/arch; fi;
    16.1 --- a/linux-2.6.10-xen-sparse/mkbuildtree	Mon Jan 24 10:19:03 2005 +0000
    16.2 +++ b/linux-2.6.10-xen-sparse/mkbuildtree	Tue Jan 25 16:58:27 2005 +0000
    16.3 @@ -1,4 +1,4 @@
    16.4 -#!/bin/sh
    16.5 +#!/bin/bash
    16.6  
    16.7  # mkbuildtree <build tree>
    16.8  #
    17.1 --- a/netbsd-2.0-xen-sparse/mkbuildtree	Mon Jan 24 10:19:03 2005 +0000
    17.2 +++ b/netbsd-2.0-xen-sparse/mkbuildtree	Tue Jan 25 16:58:27 2005 +0000
    17.3 @@ -1,4 +1,4 @@
    17.4 -#!/bin/sh
    17.5 +#!/bin/bash
    17.6  
    17.7  # mkbuildtree <build tree>
    17.8  #
    18.1 --- a/tools/Makefile	Mon Jan 24 10:19:03 2005 +0000
    18.2 +++ b/tools/Makefile	Tue Jan 25 16:58:27 2005 +0000
    18.3 @@ -12,9 +12,7 @@ all:
    18.4  	$(MAKE) -C ioemu
    18.5  
    18.6  install: 
    18.7 -ifneq ($(dist),yes)
    18.8 -	$(MAKE) -C check install
    18.9 -endif
   18.10 +	$(MAKE) -C check
   18.11  	$(MAKE) -C libxutil install
   18.12  	$(MAKE) -C libxc install
   18.13  	$(MAKE) -C misc install
   18.14 @@ -26,10 +24,6 @@ endif
   18.15  	$(MAKE) -C xcs install
   18.16  	$(MAKE) -C ioemu install
   18.17  
   18.18 -dist: $(TARGET)
   18.19 -	$(MAKE) prefix=`pwd`/../../install dist=yes install
   18.20 -
   18.21 -
   18.22  clean:
   18.23  	$(MAKE) -C libxutil clean
   18.24  	$(MAKE) -C libxc clean
    19.1 --- a/tools/examples/Makefile	Mon Jan 24 10:19:03 2005 +0000
    19.2 +++ b/tools/examples/Makefile	Tue Jan 25 16:58:27 2005 +0000
    19.3 @@ -1,3 +1,7 @@
    19.4 +INSTALL		= install
    19.5 +INSTALL_DIR	= $(INSTALL) -d -m0755
    19.6 +INSTALL_PROG	= $(INSTALL) -m0755
    19.7 +INSTALL_DATA	= $(INSTALL) -m0644
    19.8  
    19.9  # Init scripts.
   19.10  XEND_INITD = init.d/xend
   19.11 @@ -24,23 +28,23 @@ all:
   19.12  install: all install-initd install-configs install-scripts
   19.13  
   19.14  install-initd:
   19.15 -	install -d $(prefix)/etc/init.d
   19.16 -	install -m0755 $(XEND_INITD) $(prefix)/etc/init.d
   19.17 -	install -m0755 $(XENDOMAINS_INITD) $(prefix)/etc/init.d
   19.18 +	$(INSTALL_DIR) $(DESTDIR)/etc/init.d
   19.19 +	$(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
   19.20 +	$(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
   19.21  
   19.22  install-configs:
   19.23 -	install -d $(prefix)$(XEN_CONFIG_DIR)
   19.24 -	install -d $(prefix)$(XEN_CONFIG_DIR)/auto
   19.25 +	$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
   19.26 +	$(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
   19.27  	for i in $(XEN_CONFIGS); \
   19.28 -	    do [ -a $(prefix)/$(XEN_CONFIG_DIR)/$$i ] || \
   19.29 -	    install -m0644 $$i $(prefix)$(XEN_CONFIG_DIR); \
   19.30 +	    do [ -a $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
   19.31 +	    $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
   19.32  	done
   19.33  
   19.34  install-scripts:
   19.35 -	install -d $(prefix)$(XEN_SCRIPT_DIR)
   19.36 +	$(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
   19.37  	for i in $(XEN_SCRIPTS); \
   19.38 -	    do [ -a $(prefix)/$()/$$i ] || \
   19.39 -	    install -m0755 $$i $(prefix)$(XEN_SCRIPT_DIR); \
   19.40 +	    do [ -a $(DESTDIR)$(XEN_SCRIPT_DIR)/$$i ] || \
   19.41 +	    $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
   19.42  	done
   19.43  
   19.44  clean:
    20.1 --- a/tools/examples/init.d/xend	Mon Jan 24 10:19:03 2005 +0000
    20.2 +++ b/tools/examples/init.d/xend	Tue Jan 25 16:58:27 2005 +0000
    20.3 @@ -32,14 +32,14 @@ case "$1" in
    20.4    status)
    20.5  	xend status
    20.6  	;;
    20.7 -  restart|reload)
    20.8 +  restart|reload|force-reload)
    20.9  	xend restart
   20.10  	await_daemons_up
   20.11  	;;
   20.12    *)
   20.13  	# do not advertise unreasonable commands that there is no reason
   20.14  	# to use with this device
   20.15 -	echo $"Usage: $0 {start|stop|status|restart|reload}"
   20.16 +	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
   20.17  	exit 1
   20.18  esac
   20.19  
    21.1 --- a/tools/examples/network	Mon Jan 24 10:19:03 2005 +0000
    21.2 +++ b/tools/examples/network	Tue Jan 25 16:58:27 2005 +0000
    21.3 @@ -61,13 +61,13 @@ transfer_addrs () {
    21.4      local src=$1
    21.5      local dst=$2
    21.6      # Don't bother if $dst already has IP addresses.
    21.7 -    if ip addr show dev ${dst} | egrep -q '^ *inet' ; then
    21.8 +    if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then
    21.9          return
   21.10      fi
   21.11      # Address lines start with 'inet' and have the device in them.
   21.12      # Replace 'inet' with 'ip addr add' and change the device name $src
   21.13      # to 'dev $src'. Remove netmask as we'll add routes later.
   21.14 -    ip addr show dev ${src} | egrep '^ *inet' | sed -e "
   21.15 +    ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
   21.16  s/inet/ip addr add/
   21.17  s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@
   21.18  s/${src}/dev ${dst}/
    22.1 --- a/tools/ioemu/iodev/Makefile	Mon Jan 24 10:19:03 2005 +0000
    22.2 +++ b/tools/ioemu/iodev/Makefile	Tue Jan 25 16:58:27 2005 +0000
    22.3 @@ -12,4 +12,4 @@ device-model: $(OBJS) $(BXLIBS)
    22.4  include $(TOPDIR)/mk/helix.mk
    22.5  
    22.6  install:: all
    22.7 -	install device-model $(prefix)/usr/sbin
    22.8 +	install device-model $(DESTDIR)/usr/sbin
    23.1 --- a/tools/libxc/Makefile	Mon Jan 24 10:19:03 2005 +0000
    23.2 +++ b/tools/libxc/Makefile	Tue Jan 25 16:58:27 2005 +0000
    23.3 @@ -1,5 +1,9 @@
    23.4 +INSTALL		= install
    23.5 +INSTALL_PROG	= $(INSTALL) -m0755
    23.6 +INSTALL_DATA	= $(INSTALL) -m0644
    23.7 +INSTALL_DIR	= $(INSTALL) -d -m0755
    23.8  
    23.9 -MAJOR    = 2.0
   23.10 +MAJOR    = 3.0
   23.11  MINOR    = 0
   23.12  SONAME   = libxc.so.$(MAJOR)
   23.13  
   23.14 @@ -63,15 +67,15 @@ mk-symlinks:
   23.15  	  ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
   23.16  
   23.17  install: all
   23.18 -	mkdir -p $(prefix)/usr/lib
   23.19 -	mkdir -p $(prefix)/usr/include
   23.20 -	install -m0755 $(LIB) $(prefix)/usr/lib
   23.21 -	ln -sf libxc.so.$(MAJOR).$(MINOR) $(prefix)/usr/lib/libxc.so.$(MAJOR)
   23.22 -	ln -sf libxc.so.$(MAJOR) $(prefix)/usr/lib/libxc.so
   23.23 -	install -m0644 xc.h $(prefix)/usr/include
   23.24 +	$(INSTALL_DIR) $(DESTDIR)/usr/lib
   23.25 +	$(INSTALL_DIR) $(DESTDIR)/usr/include
   23.26 +	$(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/lib
   23.27 +	ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR)
   23.28 +	ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so
   23.29 +	$(INSTALL_DATA) xc.h $(DESTDIR)/usr/include
   23.30  
   23.31  clean:
   23.32 -	rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS
   23.33 +	rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen
   23.34  
   23.35  rpm: all
   23.36  	rm -rf staging
   23.37 @@ -89,8 +93,4 @@ libxc.so.$(MAJOR):
   23.38  libxc.so.$(MAJOR).$(MINOR): $(OBJS)
   23.39  	$(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -L../libxutil -lxutil -lz
   23.40  
   23.41 -.PHONY: TAGS clean install mk-symlinks rpm
   23.42 -TAGS:
   23.43 -	etags -t $(SRCS) *.h
   23.44 -
   23.45  -include $(DEPS)
    24.1 --- a/tools/libxutil/Makefile	Mon Jan 24 10:19:03 2005 +0000
    24.2 +++ b/tools/libxutil/Makefile	Tue Jan 25 16:58:27 2005 +0000
    24.3 @@ -1,4 +1,9 @@
    24.4  XEN_ROOT = ../..
    24.5 +INSTALL		= install
    24.6 +INSTALL_DATA	= $(INSTALL) -m0644
    24.7 +INSTALL_PROG	= $(INSTALL) -m0755
    24.8 +INSTALL_DIR	= $(INSTALL) -d -m0755
    24.9 +
   24.10  include $(XEN_ROOT)/tools/Make.defs
   24.11  
   24.12  CC = gcc
   24.13 @@ -20,17 +25,13 @@ LIB_SRCS += util.c
   24.14  
   24.15  LIB_OBJS := $(LIB_SRCS:.c=.o)
   24.16  
   24.17 -CFLAGS   += -Wall
   24.18 -CFLAGS   += -Werror
   24.19 -CFLAGS   += -g
   24.20 -CFLAGS   += -O3
   24.21 -CFLAGS   += -fno-strict-aliasing
   24.22 +CFLAGS   += -Wall -Werror -O3 -fno-strict-aliasing
   24.23  
   24.24  # Get gcc to generate the dependencies for us.
   24.25  CFLAGS   += -Wp,-MD,.$(@F).d
   24.26  DEPS     = .*.d
   24.27  
   24.28 -MAJOR    := 2.0
   24.29 +MAJOR    := 3.0
   24.30  MINOR    := 0
   24.31  LIB_NAME := libxutil
   24.32  LIB      := $(LIB_NAME).so 
   24.33 @@ -62,10 +63,10 @@ check-for-zlib:
   24.34  	fi
   24.35  
   24.36  install: all
   24.37 -	mkdir -p $(prefix)/usr/lib
   24.38 -	install -m0755 $(LIB) $(prefix)/usr/lib
   24.39 -	ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(prefix)/usr/lib/$(LIB_NAME).so.$(MAJOR)
   24.40 -	ln -sf $(LIB_NAME).so.$(MAJOR) $(prefix)/usr/lib/$(LIB_NAME).so
   24.41 +	$(INSTALL_DIR) -p $(DESTDIR)/usr/lib
   24.42 +	$(INSTALL_PROG) $(LIB) $(DESTDIR)/usr/lib
   24.43 +	ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR)
   24.44 +	ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so
   24.45  
   24.46  clean:
   24.47  	$(RM) *.a *.so *.so.* *.o *.rpm 
    25.1 --- a/tools/misc/Makefile	Mon Jan 24 10:19:03 2005 +0000
    25.2 +++ b/tools/misc/Makefile	Tue Jan 25 16:58:27 2005 +0000
    25.3 @@ -1,3 +1,6 @@
    25.4 +INSTALL		= install
    25.5 +INSTALL_PROG	= $(INSTALL) -m0755
    25.6 +INSTALL_DIR	= $(INSTALL) -d -m0755
    25.7  
    25.8  XEN_ROOT=../..
    25.9  include $(XEN_ROOT)/tools/Make.defs
   25.10 @@ -20,10 +23,10 @@ all: $(TARGETS)
   25.11  	$(MAKE) -C miniterm
   25.12  
   25.13  install: all
   25.14 -	mkdir -p $(prefix)/usr/bin
   25.15 -	mkdir -p $(prefix)/usr/sbin
   25.16 -	install -m0755 $(INSTALL_BIN) $(prefix)/usr/bin
   25.17 -	install -m0755 $(INSTALL_SBIN) $(prefix)/usr/sbin
   25.18 +	$(INSTALL_DIR) $(DESTDIR)/usr/bin
   25.19 +	$(INSTALL_DIR) $(DESTDIR)/usr/sbin
   25.20 +	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
   25.21 +	$(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
   25.22  	$(MAKE) -C miniterm install
   25.23  
   25.24  clean:
    26.1 --- a/tools/misc/miniterm/Makefile	Mon Jan 24 10:19:03 2005 +0000
    26.2 +++ b/tools/misc/miniterm/Makefile	Tue Jan 25 16:58:27 2005 +0000
    26.3 @@ -1,3 +1,6 @@
    26.4 +INSTALL		= install
    26.5 +INSTALL_PROG	= $(INSTALL) -m0755
    26.6 +INSTALL_DIR	= $(INSTALL) -d -m0755
    26.7  
    26.8  CC     = gcc
    26.9  CFLAGS = -Wall -O3
   26.10 @@ -6,8 +9,8 @@ TARGET = miniterm
   26.11  all: $(TARGET)
   26.12  
   26.13  install: all
   26.14 -	mkdir -p $(prefix)/usr/bin
   26.15 -	install -m0755 $(TARGET) $(prefix)/usr/bin
   26.16 +	$(INSTALL_DIR) $(DESTDIR)/usr/bin
   26.17 +	$(INSTALL_PROG) $(TARGET) $(DESTDIR)/usr/bin
   26.18  
   26.19  clean:
   26.20  	$(RM) *.o $(TARGET) *~
    27.1 --- a/tools/python/Makefile	Mon Jan 24 10:19:03 2005 +0000
    27.2 +++ b/tools/python/Makefile	Tue Jan 25 16:58:27 2005 +0000
    27.3 @@ -3,7 +3,7 @@ all:
    27.4  	python setup.py build
    27.5  
    27.6  install: all
    27.7 -	python setup.py install --home="$(prefix)/usr"
    27.8 +	python setup.py install --home="$(DESTDIR)/usr"
    27.9  
   27.10  clean:
   27.11  	rm -rf build *.pyc *.pyo *.o *.a *~
    28.1 --- a/tools/python/xen/sv/params.py	Mon Jan 24 10:19:03 2005 +0000
    28.2 +++ b/tools/python/xen/sv/params.py	Tue Jan 25 16:58:27 2005 +0000
    28.3 @@ -1,3 +1,3 @@
    28.4  SV_PORT = 8080
    28.5 -SV_ROOT = "/var/xen/sv/"
    28.6 -PID_FILE = "/var/xen/sv.pid"
    28.7 \ No newline at end of file
    28.8 +SV_ROOT = "/var/lib/xen/sv/"
    28.9 +PID_FILE = "/var/run/xen-sv.pid"
    29.1 --- a/tools/python/xen/xend/XendRoot.py	Mon Jan 24 10:19:03 2005 +0000
    29.2 +++ b/tools/python/xen/xend/XendRoot.py	Tue Jan 25 16:58:27 2005 +0000
    29.3 @@ -20,7 +20,7 @@ class XendRoot:
    29.4      """Root of the management classes."""
    29.5  
    29.6      """Default path to the root of the database."""
    29.7 -    dbroot_default = "/var/xen/xend-db"
    29.8 +    dbroot_default = "/var/lib/xen/xend-db"
    29.9  
   29.10      """Default path to the config file."""
   29.11      config_default = "/etc/xen/xend-config.sxp"
    30.1 --- a/tools/python/xen/xend/server/SrvServer.py	Mon Jan 24 10:19:03 2005 +0000
    30.2 +++ b/tools/python/xen/xend/server/SrvServer.py	Tue Jan 25 16:58:27 2005 +0000
    30.3 @@ -1,4 +1,4 @@
    30.4 -#!/usr/bin/python2
    30.5 +#!/usr/bin/python
    30.6  # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
    30.7  
    30.8  """Example xend HTTP and console server.
    31.1 --- a/tools/python/xen/xend/sxp.py	Mon Jan 24 10:19:03 2005 +0000
    31.2 +++ b/tools/python/xen/xend/sxp.py	Tue Jan 25 16:58:27 2005 +0000
    31.3 @@ -1,4 +1,4 @@
    31.4 -#!/usr/bin/python2
    31.5 +#!/usr/bin/python
    31.6  # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
    31.7  """
    31.8  Input-driven parsing for s-expression (sxp) format.
    32.1 --- a/tools/sv/Makefile	Mon Jan 24 10:19:03 2005 +0000
    32.2 +++ b/tools/sv/Makefile	Tue Jan 25 16:58:27 2005 +0000
    32.3 @@ -1,4 +1,7 @@
    32.4 -sv_insdir := $(prefix)/var/xen/sv
    32.5 +sv_insdir := /var/lib/xen/sv
    32.6 +INSTALL		= install
    32.7 +INSTALL_DIR	= $(INSTALL) -d -m0755
    32.8 +INSTALL_DATA	= $(INSTALL) -m0644
    32.9  
   32.10  all:
   32.11  
   32.12 @@ -14,17 +17,16 @@ IMAGES	+= next.png previous.png finish.p
   32.13  
   32.14  install:
   32.15  	# copy XenSV Main.rpy file
   32.16 -	@mkdir -p $(sv_insdir)
   32.17 -	@install -m0644 Main.rpy $(sv_insdir)
   32.18 +	@$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)
   32.19 +	@$(INSTALL_DATA) Main.rpy $(DESTDIR)$(sv_insdir)
   32.20  
   32.21  	# copy XenSV images
   32.22 -	@mkdir -p $(sv_insdir)/images
   32.23 -	@(cd images && install -m0644 $(IMAGES) $(sv_insdir)/images)
   32.24 +	@$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/images
   32.25 +	@(cd images && $(INSTALL_DATA) $(IMAGES) $(DESTDIR)$(sv_insdir)/images)
   32.26  
   32.27  	# copy XenSV stylesheet
   32.28 -	@mkdir -p $(sv_insdir)/inc
   32.29 -	@install -m0644 inc/style.css $(sv_insdir)/inc
   32.30 -	@install -m0644 inc/script.js $(sv_insdir)/inc
   32.31 +	@$(INSTALL_DIR) $(DESTDIR)$(sv_insdir)/inc
   32.32 +	@$(INSTALL_DATA) inc/style.css inc/script.js $(DESTDIR)$(sv_insdir)/inc
   32.33  
   32.34  clean:
   32.35  
    33.1 --- a/tools/vnet/Makefile	Mon Jan 24 10:19:03 2005 +0000
    33.2 +++ b/tools/vnet/Makefile	Tue Jan 25 16:58:27 2005 +0000
    33.3 @@ -44,9 +44,6 @@ install: compile
    33.4  	$(MAKE) -C vnet-module install
    33.5  	$(MAKE) -C examples install
    33.6  
    33.7 -dist: $(TARGET)
    33.8 -	$(MAKE) install
    33.9 -
   33.10  clean:
   33.11  	-$(MAKE) -C vnetd clean
   33.12  	-$(MAKE) -C vnet-module clean
    34.1 --- a/tools/vnet/examples/Makefile	Mon Jan 24 10:19:03 2005 +0000
    34.2 +++ b/tools/vnet/examples/Makefile	Tue Jan 25 16:58:27 2005 +0000
    34.3 @@ -6,7 +6,7 @@ XEN_SCRIPT_DIR:=/etc/xen/scripts
    34.4  all:
    34.5  
    34.6  install:
    34.7 -	install -m 0755 -d $(prefix)$(XEN_SCRIPT_DIR)
    34.8 -	install -m 0554 network-vnet $(prefix)$(XEN_SCRIPT_DIR)
    34.9 +	install -m 0755 -d $(DESTDIR)$(XEN_SCRIPT_DIR)
   34.10 +	install -m 0554 network-vnet $(DESTDIR)$(XEN_SCRIPT_DIR)
   34.11  
   34.12  clean:
   34.13 \ No newline at end of file
    35.1 --- a/tools/vnet/vnet-module/Makefile-2.4	Mon Jan 24 10:19:03 2005 +0000
    35.2 +++ b/tools/vnet/vnet-module/Makefile-2.4	Tue Jan 25 16:58:27 2005 +0000
    35.3 @@ -83,8 +83,8 @@ module modules: $(KERNEL_MODULE)
    35.4  
    35.5  .PHONY: install install-module modules_install
    35.6  install install-module modules_install: module
    35.7 -	install -m 0755 -d $(prefix)$(KERNEL_MODULE_DIR)
    35.8 -	install -m 0554 $(KERNEL_MODULE) $(prefix)$(KERNEL_MODULE_DIR)
    35.9 +	install -m 0755 -d $(DESTDIR)$(KERNEL_MODULE_DIR)
   35.10 +	install -m 0554 $(KERNEL_MODULE) $(DESTDIR)$(KERNEL_MODULE_DIR)
   35.11  
   35.12  TAGS:
   35.13  	etags *.c *.h
    36.1 --- a/tools/vnet/vnet-module/Makefile-2.6	Mon Jan 24 10:19:03 2005 +0000
    36.2 +++ b/tools/vnet/vnet-module/Makefile-2.6	Tue Jan 25 16:58:27 2005 +0000
    36.3 @@ -38,8 +38,8 @@ module modules:
    36.4  
    36.5  .PHONY: install install-module modules_install
    36.6  install install-module modules_install: module
    36.7 -	install -m 0755 -d $(prefix)$(KERNEL_MODULE_DIR)
    36.8 -	install -m 0554 $(KERNEL_MODULE) $(prefix)$(KERNEL_MODULE_DIR)
    36.9 +	install -m 0755 -d $(DESTDIR)$(KERNEL_MODULE_DIR)
   36.10 +	install -m 0554 $(KERNEL_MODULE) $(DESTDIR)$(KERNEL_MODULE_DIR)
   36.11  
   36.12  .PHONY: clean
   36.13  clean:
    37.1 --- a/tools/vnet/vnetd/Makefile	Mon Jan 24 10:19:03 2005 +0000
    37.2 +++ b/tools/vnet/vnetd/Makefile	Tue Jan 25 16:58:27 2005 +0000
    37.3 @@ -92,8 +92,8 @@ vnetd: $(VNETD_OBJ)
    37.4  	$(CC) $(CFLAGS) -o $@ $^ $(VNETD_LIBS) -ldl -lpthread
    37.5  
    37.6  install: vnetd
    37.7 -	mkdir -p $(prefix)/$(VNETD_INSTALL_DIR)
    37.8 -	install -m 0755 vnetd $(prefix)/$(VNETD_INSTALL_DIR)
    37.9 +	mkdir -p $(DESTDIR)$(VNETD_INSTALL_DIR)
   37.10 +	install -m 0755 vnetd $(DESTDIR)$(VNETD_INSTALL_DIR)
   37.11  
   37.12  clean:
   37.13  	-rm -f *.a *.o *~
    38.1 --- a/tools/xcs/Makefile	Mon Jan 24 10:19:03 2005 +0000
    38.2 +++ b/tools/xcs/Makefile	Tue Jan 25 16:58:27 2005 +0000
    38.3 @@ -6,6 +6,10 @@ include $(XEN_ROOT)/tools/Make.defs
    38.4  
    38.5  XCS_INSTALL_DIR = /usr/sbin
    38.6  
    38.7 +INSTALL         = install
    38.8 +INSTALL_PROG    = $(INSTALL) -m0755
    38.9 +INSTALL_DIR     = $(INSTALL) -d -m0755
   38.10 +
   38.11  CC       = gcc
   38.12  CFLAGS   = -Wall -Werror -g3 -D _XOPEN_SOURCE=600
   38.13  
   38.14 @@ -37,8 +41,8 @@ xcsdump: xcsdump.c
   38.15  	$(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_LIBXUTIL) -lxc -lxutil 
   38.16  
   38.17  install: xcs xcsdump
   38.18 -	mkdir -p $(prefix)/$(XCS_INSTALL_DIR)
   38.19 -	mkdir -p $(prefix)/usr/include
   38.20 -	install -m0755 xcs $(prefix)/$(XCS_INSTALL_DIR)
   38.21 -	install -m0755 xcsdump $(prefix)/$(XCS_INSTALL_DIR)
   38.22 -	install -m0644 xcs_proto.h $(prefix)/usr/include
   38.23 +	$(INSTALL_DIR) -p $(DESTDIR)/$(XCS_INSTALL_DIR)
   38.24 +	$(INSTALL_DIR) -p $(DESTDIR)/usr/include
   38.25 +	$(INSTALL_PROG) xcs $(DESTDIR)/$(XCS_INSTALL_DIR)
   38.26 +	$(INSTALL_PROG) xcsdump $(DESTDIR)/$(XCS_INSTALL_DIR)
   38.27 +	$(INSTALL_PROG) xcs_proto.h $(DESTDIR)/usr/include
    39.1 --- a/tools/xentrace/Makefile	Mon Jan 24 10:19:03 2005 +0000
    39.2 +++ b/tools/xentrace/Makefile	Tue Jan 25 16:58:27 2005 +0000
    39.3 @@ -1,3 +1,7 @@
    39.4 +INSTALL		= install
    39.5 +INSTALL_PROG	= $(INSTALL) -m0755
    39.6 +INSTALL_DIR	= $(INSTALL) -d -m0755
    39.7 +INSTALL_DATA	= $(INSTALL) -m0644
    39.8  
    39.9  XEN_ROOT=../..
   39.10  include $(XEN_ROOT)/tools/Make.defs
   39.11 @@ -20,12 +24,12 @@ MAN8     = $(wildcard *.8)
   39.12  all: $(BIN)
   39.13  
   39.14  install: all
   39.15 -	mkdir -p $(prefix)/usr/bin
   39.16 -	mkdir -p $(prefix)/usr/man/man1
   39.17 -	mkdir -p $(prefix)/usr/man/man8
   39.18 -	install -m0755 $(BIN) $(SCRIPTS) $(prefix)/usr/bin
   39.19 -	install -m0644 $(MAN1) $(prefix)/usr/man/man1
   39.20 -	install -m0644 $(MAN8) $(prefix)/usr/man/man8
   39.21 +	$(INSTALL_DIR) $(DESTDIR)/usr/bin
   39.22 +	$(INSTALL_DIR) $(DESTDIR)/usr/man/man1
   39.23 +	$(INSTALL_DIR) $(DESTDIR)/usr/man/man8
   39.24 +	$(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
   39.25 +	$(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/man/man1
   39.26 +	$(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/man/man8
   39.27  
   39.28  clean:
   39.29  	$(RM) *.a *.so *.o *.rpm $(BIN)
    40.1 --- a/tools/xfrd/Makefile	Mon Jan 24 10:19:03 2005 +0000
    40.2 +++ b/tools/xfrd/Makefile	Tue Jan 25 16:58:27 2005 +0000
    40.3 @@ -4,6 +4,10 @@
    40.4  # Mike Wray <mike.wray@hp.com>
    40.5  #============================================================================
    40.6  
    40.7 +INSTALL		= install
    40.8 +INSTALL_PROG	= $(INSTALL) -m0755
    40.9 +INSTALL_DIR	= $(INSTALL) -d -m0755
   40.10 +
   40.11  XEN_ROOT  = ../..
   40.12  include $(XEN_ROOT)/tools/Make.defs
   40.13  
   40.14 @@ -68,8 +72,8 @@ xfrd: $(XFRD_PROG_OBJ)
   40.15  
   40.16  .PHONY: install
   40.17  install: xfrd
   40.18 -	mkdir -p $(prefix)/$(XFRD_INSTALL_DIR)
   40.19 -	install -m 0755 xfrd $(prefix)/$(XFRD_INSTALL_DIR)
   40.20 +	$(INSTALL_DIR) $(DESTDIR)$(XFRD_INSTALL_DIR)
   40.21 +	$(INSTALL_PROG) xfrd $(DESTDIR)$(XFRD_INSTALL_DIR)
   40.22  
   40.23  .PHONY: libutil
   40.24  libutil: $(UTIL_LIB)
    41.1 --- a/xen/Makefile	Mon Jan 24 10:19:03 2005 +0000
    41.2 +++ b/xen/Makefile	Tue Jan 25 16:58:27 2005 +0000
    41.3 @@ -1,3 +1,6 @@
    41.4 +INSTALL			= install
    41.5 +INSTALL_DATA		= $(INSTALL) -m0644
    41.6 +INSTALL_DIR		= $(INSTALL) -d -m0755
    41.7  
    41.8  # This is the correct place to edit the build version.
    41.9  # All other places this is stored (eg. compile.h) should be autogenerated.
   41.10 @@ -5,28 +8,26 @@ export XEN_VERSION       = 3
   41.11  export XEN_SUBVERSION    = 0
   41.12  export XEN_EXTRAVERSION  = "-devel"
   41.13  
   41.14 -export BASEDIR          := $(shell pwd)
   41.15 +export BASEDIR          := $(CURDIR)
   41.16  
   41.17  include Rules.mk
   41.18  
   41.19 -default: $(TARGET)
   41.20 -	gzip -f -9 < $(TARGET) > $(TARGET).gz
   41.21 +default: $(TARGET).gz
   41.22 +$(TARGET).gz: $(TARGET)
   41.23 +	gzip -f -9 < $< > $@.new
   41.24 +	mv $@.new $@
   41.25  
   41.26  debug:	
   41.27  	objdump -D -S $(TARGET)-syms > $(TARGET).s
   41.28  
   41.29 -install: $(TARGET)
   41.30 -	gzip -f -9 < $(TARGET) > $(TARGET).gz
   41.31 -	mkdir -p $(prefix)/boot
   41.32 -	install -m0644 $(TARGET).gz $(prefix)/boot
   41.33 -	install -m0644 $(TARGET)-syms $(prefix)/boot
   41.34 -	mkdir -p $(prefix)/usr/include/xen/io
   41.35 -	install -m0644 include/public/*.h $(prefix)/usr/include/xen
   41.36 -	install -m0644 include/public/io/*.h $(prefix)/usr/include/xen/io
   41.37 -	install -m0644 include/public/COPYING $(prefix)/usr/include/xen
   41.38 -
   41.39 -dist: $(TARGET)
   41.40 -	$(MAKE) prefix=`pwd`/../dist/install dist=yes install
   41.41 +install: $(TARGET).gz
   41.42 +	$(INSTALL_DIR) $(DESTDIR)/boot
   41.43 +	$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot
   41.44 +	$(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot
   41.45 +	$(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
   41.46 +	$(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
   41.47 +	$(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
   41.48 +	$(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
   41.49  
   41.50  clean:
   41.51  	$(MAKE) -C tools clean
   41.52 @@ -35,41 +36,45 @@ clean:
   41.53  	$(MAKE) -C arch/$(TARGET_ARCH) clean
   41.54  	rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
   41.55  	rm -f include/asm-*/asm-offsets.h
   41.56 +	rm -f tools/figlet/*.o tools/figlet/figlet
   41.57  
   41.58 -$(TARGET): delete-unfresh-files
   41.59 +$(TARGET): delete-unfresh-files include/xen/compile.h
   41.60  	[ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
   41.61 -	$(MAKE) -C tools
   41.62 -	$(MAKE) include/xen/compile.h
   41.63  	$(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
   41.64  	$(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
   41.65  	$(MAKE) -C common
   41.66  	$(MAKE) -C drivers
   41.67  	$(MAKE) -C arch/$(TARGET_ARCH)
   41.68  
   41.69 -# Blow away kernel.o because build info is stored statically within it.
   41.70  delete-unfresh-files:
   41.71 -	rm -f include/xen/compile.h common/kernel.o
   41.72 +	rm -f include/xen/banner.h include/xen/compile.h
   41.73 +	$(MAKE) -C arch/$(TARGET_ARCH) delete-unfresh-files
   41.74  
   41.75  # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
   41.76 -include/xen/compile.h:
   41.77 -	@LANG=C echo /\* Autogenerated by root Makefile. Do not edit. \*/ > $@
   41.78 -	@LANG=C echo >> $@
   41.79 -	@LANG=C echo \#define XEN_COMPILE_DATE \"`date`\" >> $@
   41.80 -	@LANG=C echo \#define XEN_COMPILE_TIME \"`date +%T`\" >> $@
   41.81 -	@LANG=C echo \#define XEN_COMPILE_BY \"`whoami`\" >> $@
   41.82 -	@LANG=C echo \#define XEN_COMPILE_DOMAIN \"`([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])`\" >> $@
   41.83 -	@LANG=C echo \#define XEN_COMPILE_HOST \"`hostname`\" >> $@
   41.84 -	@LANG=C echo \#define XEN_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> $@
   41.85 -	@LANG=C echo >> $@
   41.86 -	@LANG=C echo \#define XEN_VERSION\ \ \ \ \ \ $(XEN_VERSION) >> $@
   41.87 -	@LANG=C echo \#define XEN_SUBVERSION\ \ \ $(XEN_SUBVERSION) >> $@
   41.88 -	@LANG=C echo \#define XEN_EXTRAVERSION \"$(XEN_EXTRAVERSION)\" >> $@
   41.89 -	@LANG=C echo >> $@
   41.90 -	@LANG=C echo \#define XEN_CHANGESET \"`bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo "information unavailable"`\" >> $@
   41.91 -	@LANG=C echo >> $@
   41.92 -	@LANG=C echo \#define XEN_BANNER \\ >> $@
   41.93 -	( cd ./tools/figlet && ./figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) 1>>../../$@ )
   41.94 -	@LANG=C echo >> $@
   41.95 +include/xen/compile.h: LANG=C
   41.96 +include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
   41.97 +	@sed -e 's/@@date@@/$(shell date)/g' \
   41.98 +	    -e 's/@@time@@/$(shell date +%T)/g' \
   41.99 +	    -e 's/@@whoami@@/$(shell whoami)/g' \
  41.100 +	    -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
  41.101 +	    -e 's/@@hostname@@/$(shell hostname)/g' \
  41.102 +	    -e 's/@@compiler@@/$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)/g' \
  41.103 +	    -e 's/@@version@@/$(XEN_VERSION)/g' \
  41.104 +	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
  41.105 +	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
  41.106 +	    -e 's!@@changeset@@!$(shell bk changes -nd':D: :T: :REV: :MD5KEY:' -r+ 2>/dev/null || echo information unavailable)!g' \
  41.107 +	    < include/xen/compile.h.in > $@.new
  41.108 +	@cat include/xen/banner.h >> $@.new
  41.109 +	@mv -f $@.new $@
  41.110 +
  41.111 +tools/figlet/figlet: tools/figlet/figlet.o
  41.112 +	$(CC) -o $@ $<
  41.113 +tools/figlet/figlet.o: tools/figlet/figlet.c
  41.114 +	$(CC) -o $@ -c $<
  41.115 +
  41.116 +include/xen/banner.h: tools/figlet/figlet tools/figlet/xen.flf
  41.117 +	tools/figlet/figlet -d tools/figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) > $@.new
  41.118 +	@mv -f $@.new $@
  41.119  
  41.120  include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
  41.121  	@(set -e; \
  41.122 @@ -94,6 +99,6 @@ TAGS:
  41.123  	( find include/asm-$(TARGET_ARCH) -name '*.h'; \
  41.124  	  find include -type d \( -name "asm-*" -o -name config \) -prune -o \
  41.125  		-name '*.h' -print; \
  41.126 -	  find $(SUBDIRS) -name '*.[ch]' ) | grep -v /SCCS/ | etags -
  41.127 +	  find $(SUBDIRS) -name '*.[chS]' ) | grep -v /SCCS/ | etags -
  41.128  MAP:
  41.129  	nm $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
    42.1 --- a/xen/Rules.mk	Mon Jan 24 10:19:03 2005 +0000
    42.2 +++ b/xen/Rules.mk	Tue Jan 25 16:58:27 2005 +0000
    42.3 @@ -22,6 +22,7 @@ HDRS    += $(wildcard $(BASEDIR)/include
    42.4  HDRS    += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
    42.5  HDRS    += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
    42.6  # compile.h is always regenerated, but other files shouldn't be rebuilt
    42.7 +HDRS    := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
    42.8  HDRS    := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
    42.9  
   42.10  C_SRCS  := $(wildcard *.c)
    43.1 --- a/xen/arch/x86/Makefile	Mon Jan 24 10:19:03 2005 +0000
    43.2 +++ b/xen/arch/x86/Makefile	Tue Jan 25 16:58:27 2005 +0000
    43.3 @@ -18,11 +18,17 @@ OBJS := $(subst vmx_io.o,,$(OBJS))
    43.4  OBJS := $(subst vmx_vmcs.o,,$(OBJS))
    43.5  endif
    43.6  
    43.7 -default: boot/$(TARGET_SUBARCH).o $(OBJS) boot/mkelf32
    43.8 -	$(LD) $(LDFLAGS) -r -o arch.o $(OBJS)
    43.9 +default: $(TARGET)
   43.10 +
   43.11 +$(TARGET): $(TARGET)-syms boot/mkelf32
   43.12 +	./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000
   43.13 +
   43.14 +$(CURDIR)/arch.o: $(OBJS)
   43.15 +	$(LD) $(LDFLAGS) -r -o $@ $(OBJS)
   43.16 +
   43.17 +$(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) $(TARGET_SUBARCH)/xen.lds
   43.18  	$(LD) $(LDFLAGS) -T $(TARGET_SUBARCH)/xen.lds -N \
   43.19 -	    boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $(TARGET)-syms
   43.20 -	./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000
   43.21 +	    boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $@
   43.22  
   43.23  asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c
   43.24  	$(CC) $(CFLAGS) -S -o $@ $<
   43.25 @@ -35,4 +41,8 @@ clean:
   43.26  	rm -f x86_32/*.o x86_32/*~ x86_32/core
   43.27  	rm -f x86_64/*.o x86_64/*~ x86_64/core
   43.28  
   43.29 -.PHONY: default clean
   43.30 +# setup.o contains bits of compile.h so it must be blown away
   43.31 +delete-unfresh-files:
   43.32 +	rm -f setup.o
   43.33 +
   43.34 +.PHONY: default clean delete-unfresh-files
    44.1 --- a/xen/arch/x86/Rules.mk	Mon Jan 24 10:19:03 2005 +0000
    44.2 +++ b/xen/arch/x86/Rules.mk	Tue Jan 25 16:58:27 2005 +0000
    44.3 @@ -24,13 +24,13 @@ CFLAGS  += $(call test-gcc-flag,-fno-sta
    44.4  
    44.5  ifeq ($(TARGET_SUBARCH),x86_32)
    44.6  CFLAGS  += -m32 -march=i686
    44.7 -LDFLAGS := --oformat elf32-i386 
    44.8 +LDFLAGS := -m elf_i386 
    44.9  endif
   44.10  
   44.11  ifeq ($(TARGET_SUBARCH),x86_64)
   44.12  CFLAGS  += -m64 -mno-red-zone -fpic -fno-reorder-blocks
   44.13  CFLAGS  += -fno-asynchronous-unwind-tables
   44.14 -LDFLAGS := --oformat elf64-x86-64
   44.15 +LDFLAGS := -m elf_x86_64
   44.16  endif
   44.17  
   44.18  # Test for at least GCC v3.2.x.
    45.1 --- a/xen/arch/x86/domain.c	Mon Jan 24 10:19:03 2005 +0000
    45.2 +++ b/xen/arch/x86/domain.c	Tue Jan 25 16:58:27 2005 +0000
    45.3 @@ -206,13 +206,11 @@ void machine_halt(void)
    45.4  void dump_pageframe_info(struct domain *d)
    45.5  {
    45.6      struct pfn_info *page;
    45.7 -    struct list_head *ent;
    45.8  
    45.9      if ( d->tot_pages < 10 )
   45.10      {
   45.11 -        list_for_each ( ent, &d->page_list )
   45.12 +        list_for_each_entry ( page, &d->page_list, list )
   45.13          {
   45.14 -            page = list_entry(ent, struct pfn_info, list);
   45.15              printk("Page %08x: caf=%08x, taf=%08x\n",
   45.16                     page_to_phys(page), page->count_info,
   45.17                     page->u.inuse.type_info);
    46.1 --- a/xen/arch/x86/mpparse.c	Mon Jan 24 10:19:03 2005 +0000
    46.2 +++ b/xen/arch/x86/mpparse.c	Tue Jan 25 16:58:27 2005 +0000
    46.3 @@ -1232,7 +1232,6 @@ void __init mp_config_acpi_legacy_irqs (
    46.4  
    46.5  void __init mp_parse_prt (void)
    46.6  {
    46.7 -	struct list_head	*node = NULL;
    46.8  	struct acpi_prt_entry	*entry = NULL;
    46.9  	int			ioapic = -1;
   46.10  	int			ioapic_pin = 0;
   46.11 @@ -1245,9 +1244,7 @@ void __init mp_parse_prt (void)
   46.12  	 * Parsing through the PCI Interrupt Routing Table (PRT) and program
   46.13  	 * routing for all entries.
   46.14  	 */
   46.15 -	list_for_each(node, &acpi_prt.entries) {
   46.16 -		entry = list_entry(node, struct acpi_prt_entry, node);
   46.17 -
   46.18 +	list_for_each_entry(entry, &acpi_prt.entries, node) {
   46.19  		/* Need to get irq for dynamic entry */
   46.20  		if (entry->link.handle) {
   46.21  			irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low);
    47.1 --- a/xen/arch/x86/nmi.c	Mon Jan 24 10:19:03 2005 +0000
    47.2 +++ b/xen/arch/x86/nmi.c	Tue Jan 25 16:58:27 2005 +0000
    47.3 @@ -48,9 +48,6 @@ extern int logical_proc_id[];
    47.4  #define P6_EVENT_CPU_CLOCKS_NOT_HALTED	0x79
    47.5  #define P6_NMI_EVENT		P6_EVENT_CPU_CLOCKS_NOT_HALTED
    47.6  
    47.7 -#define MSR_P4_MISC_ENABLE	0x1A0
    47.8 -#define MSR_P4_MISC_ENABLE_PERF_AVAIL	(1<<7)
    47.9 -#define MSR_P4_MISC_ENABLE_PEBS_UNAVAIL	(1<<12)
   47.10  #define MSR_P4_PERFCTR0		0x300
   47.11  #define MSR_P4_CCCR0		0x360
   47.12  #define P4_ESCR_EVENT_SELECT(N)	((N)<<25)
   47.13 @@ -186,15 +183,15 @@ static int __pminit setup_p4_watchdog(vo
   47.14  {
   47.15      unsigned int misc_enable, dummy;
   47.16  
   47.17 -    rdmsr(MSR_P4_MISC_ENABLE, misc_enable, dummy);
   47.18 -    if (!(misc_enable & MSR_P4_MISC_ENABLE_PERF_AVAIL))
   47.19 +    rdmsr(MSR_IA32_MISC_ENABLE, misc_enable, dummy);
   47.20 +    if (!(misc_enable & MSR_IA32_MISC_ENABLE_PERF_AVAIL))
   47.21          return 0;
   47.22  
   47.23      nmi_perfctr_msr = MSR_P4_IQ_COUNTER0;
   47.24  
   47.25      if ( logical_proc_id[smp_processor_id()] == 0 )
   47.26      {
   47.27 -        if (!(misc_enable & MSR_P4_MISC_ENABLE_PEBS_UNAVAIL))
   47.28 +        if (!(misc_enable & MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL))
   47.29              clear_msr_range(0x3F1, 2);
   47.30          /* MSR 0x3F0 seems to have a default value of 0xFC00, but current
   47.31             docs doesn't fully define it, so leave it alone for now. */
    48.1 --- a/xen/arch/x86/pci-pc.c	Mon Jan 24 10:19:03 2005 +0000
    48.2 +++ b/xen/arch/x86/pci-pc.c	Tue Jan 25 16:58:27 2005 +0000
    48.3 @@ -1372,11 +1372,9 @@ void __devinit  pcibios_fixup_bus(struct
    48.4  
    48.5  struct pci_bus * __devinit pcibios_scan_root(int busnum)
    48.6  {
    48.7 -	struct list_head *list;
    48.8  	struct pci_bus *bus;
    48.9  
   48.10 -	list_for_each(list, &pci_root_buses) {
   48.11 -		bus = pci_bus_b(list);
   48.12 +	pci_for_each_bus(bus) {
   48.13  		if (bus->number == busnum) {
   48.14  			/* Already scanned */
   48.15  			return bus;
    49.1 --- a/xen/arch/x86/pdb-stub.c	Mon Jan 24 10:19:03 2005 +0000
    49.2 +++ b/xen/arch/x86/pdb-stub.c	Tue Jan 25 16:58:27 2005 +0000
    49.3 @@ -778,12 +778,10 @@ void pdb_bkpt_add (unsigned long cr3, un
    49.4  struct pdb_breakpoint* pdb_bkpt_search (unsigned long cr3, 
    49.5  					unsigned long address)
    49.6  {
    49.7 -    struct list_head *list_entry;
    49.8      struct pdb_breakpoint *bkpt;
    49.9  
   49.10 -    list_for_each(list_entry, &breakpoints.list)
   49.11 +    list_for_each_entry ( bkpt, &breakpoints.list, list )
   49.12      {
   49.13 -        bkpt = list_entry(list_entry, struct pdb_breakpoint, list);
   49.14  	if ( bkpt->cr3 == cr3 && bkpt->address == address )
   49.15              return bkpt;
   49.16      }
   49.17 @@ -797,12 +795,10 @@ struct pdb_breakpoint* pdb_bkpt_search (
   49.18   */
   49.19  int pdb_bkpt_remove (unsigned long cr3, unsigned long address)
   49.20  {
   49.21 -    struct list_head *list_entry;
   49.22      struct pdb_breakpoint *bkpt;
   49.23  
   49.24 -    list_for_each(list_entry, &breakpoints.list)
   49.25 +    list_for_each_entry ( bkpt, &breakpoints.list, list )
   49.26      {
   49.27 -        bkpt = list_entry(list_entry, struct pdb_breakpoint, list);
   49.28  	if ( bkpt->cr3 == cr3 && bkpt->address == address )
   49.29  	{
   49.30              list_del(&bkpt->list);
    50.1 --- a/xen/common/Makefile	Mon Jan 24 10:19:03 2005 +0000
    50.2 +++ b/xen/common/Makefile	Tue Jan 25 16:58:27 2005 +0000
    50.3 @@ -24,7 +24,8 @@ endif
    50.4  OBJS := $(subst sched_atropos.o,,$(OBJS))
    50.5  OBJS := $(subst sched_rrobin.o,,$(OBJS))
    50.6  
    50.7 -default: $(OBJS)
    50.8 +default: common.o
    50.9 +common.o: $(OBJS)
   50.10  	$(LD) $(LDFLAGS) -r -o common.o $(OBJS)
   50.11  
   50.12  clean:
    51.1 --- a/xen/common/domain.c	Mon Jan 24 10:19:03 2005 +0000
    51.2 +++ b/xen/common/domain.c	Tue Jan 25 16:58:27 2005 +0000
    51.3 @@ -305,8 +305,8 @@ long do_boot_vcpu(unsigned long vcpu, fu
    51.4      int rc = 0;
    51.5      full_execution_context_t *c;
    51.6  
    51.7 -    if ( d->exec_domain[vcpu] != NULL )
    51.8 -        return EINVAL;
    51.9 +    if ( (vcpu >= MAX_VIRT_CPUS) || (d->exec_domain[vcpu] != NULL) )
   51.10 +        return -EINVAL;
   51.11  
   51.12      if ( alloc_exec_domain_struct(d, vcpu) == NULL )
   51.13          return -ENOMEM;
    52.1 --- a/xen/common/physdev.c	Mon Jan 24 10:19:03 2005 +0000
    52.2 +++ b/xen/common/physdev.c	Tue Jan 25 16:58:27 2005 +0000
    52.3 @@ -73,11 +73,9 @@ typedef struct _phys_dev_st {
    52.4  static phys_dev_t *find_pdev(struct domain *p, struct pci_dev *dev)
    52.5  {
    52.6      phys_dev_t *t, *res = NULL;
    52.7 -    struct list_head *tmp;
    52.8  
    52.9 -    list_for_each(tmp, &p->pcidev_list)
   52.10 +    list_for_each_entry ( t, &p->pcidev_list, node )
   52.11      {
   52.12 -        t = list_entry(tmp,  phys_dev_t, node);
   52.13          if ( dev == t->dev )
   52.14          {
   52.15              res = t;
   52.16 @@ -230,17 +228,16 @@ int physdev_pci_access_modify(
   52.17  int domain_iomem_in_pfn(struct domain *p, unsigned long pfn)
   52.18  {
   52.19      int ret = 0;
   52.20 -    struct list_head *l;
   52.21 +    phys_dev_t *phys_dev;
   52.22  
   52.23      VERBOSE_INFO("Checking if physdev-capable domain %u needs access to "
   52.24                   "pfn %08lx\n", p->id, pfn);
   52.25      
   52.26      spin_lock(&p->pcidev_lock);
   52.27  
   52.28 -    list_for_each(l, &p->pcidev_list)
   52.29 +    list_for_each_entry ( phys_dev, &p->pcidev_list, node )
   52.30      {
   52.31          int i;
   52.32 -        phys_dev_t *phys_dev = list_entry(l, phys_dev_t, node);
   52.33          struct pci_dev *pci_dev = phys_dev->dev;
   52.34  
   52.35          for ( i = 0; (i < DEVICE_COUNT_RESOURCE) && (ret == 0); i++ )
   52.36 @@ -635,15 +632,11 @@ static long pci_cfgreg_write(int bus, in
   52.37  static long pci_probe_root_buses(u32 *busmask)
   52.38  {
   52.39      phys_dev_t *pdev;
   52.40 -    struct list_head *tmp;
   52.41  
   52.42      memset(busmask, 0, 256/8);
   52.43  
   52.44 -    list_for_each ( tmp, &current->domain->pcidev_list )
   52.45 -    {
   52.46 -        pdev = list_entry(tmp, phys_dev_t, node);
   52.47 +    list_for_each_entry ( pdev, &current->domain->pcidev_list, node )
   52.48          set_bit(pdev->dev->bus->number, busmask);
   52.49 -    }
   52.50  
   52.51      return 0;
   52.52  }
    53.1 --- a/xen/common/sched_atropos.c	Mon Jan 24 10:19:03 2005 +0000
    53.2 +++ b/xen/common/sched_atropos.c	Tue Jan 25 16:58:27 2005 +0000
    53.3 @@ -1,6 +1,6 @@
    53.4  /*
    53.5 - *	atropos.c
    53.6 - *	---------
    53.7 + * atropos.c
    53.8 + * ---------
    53.9   *
   53.10   * Copyright (c) 1994 University of Cambridge Computer Laboratory.
   53.11   * This is part of Nemesis; consult your contract for terms and conditions.
   53.12 @@ -98,8 +98,9 @@ static inline int __task_on_runqueue(str
   53.13  static int q_len(struct list_head *q) 
   53.14  {
   53.15      int i = 0;
   53.16 -    struct list_head *tmp;
   53.17 -    list_for_each(tmp, q) i++;
   53.18 +    struct at_dom_info *tmp;
   53.19 +    list_for_each_entry ( tmp, q, waitq )
   53.20 +        i++;
   53.21      return i;
   53.22  }
   53.23  
   53.24 @@ -129,60 +130,39 @@ static inline struct domain *waitq_el(st
   53.25   */
   53.26  static void requeue(struct domain *sdom)
   53.27  {
   53.28 -    struct at_dom_info *inf = DOM_INFO(sdom);
   53.29 -    struct list_head *prev;
   53.30 -    struct list_head *next;
   53.31 +    struct at_dom_info *i, *inf = DOM_INFO(sdom);
   53.32  
   53.33 -
   53.34 -    if(!domain_runnable(sdom)) return;
   53.35 +    if ( !domain_runnable(sdom) )
   53.36 +        return;
   53.37      
   53.38 -    if(inf->state == ATROPOS_TASK_WAIT ||
   53.39 -        inf->state == ATROPOS_TASK_UNBLOCKED)
   53.40 +    if ( (inf->state == ATROPOS_TASK_WAIT) ||
   53.41 +         (inf->state == ATROPOS_TASK_UNBLOCKED) )
   53.42      {
   53.43 -        prev = WAITQ(sdom->processor);
   53.44 -
   53.45 -        list_for_each(next, WAITQ(sdom->processor))
   53.46 +        list_for_each_entry ( i, WAITQ(sdom->processor), waitq )
   53.47          {
   53.48 -            struct at_dom_info *i = 
   53.49 -                list_entry(next, struct at_dom_info, waitq);
   53.50              if ( i->deadline > inf->deadline )
   53.51              {
   53.52 -                __list_add(&inf->waitq, prev, next);
   53.53 +                __list_add(&inf->waitq, i->waitq.prev, &i->waitq);
   53.54                  break;
   53.55              }
   53.56 -
   53.57 -            prev = next;
   53.58          }
   53.59  
   53.60 -        /* put the domain on the end of the list if it hasn't been put
   53.61 -         * elsewhere */
   53.62 -        if ( next == WAITQ(sdom->processor) )
   53.63 +        if ( &i->waitq == WAITQ(sdom->processor) )
   53.64              list_add_tail(&inf->waitq, WAITQ(sdom->processor));
   53.65      }
   53.66      else if ( domain_runnable(sdom) )
   53.67      {
   53.68 -        /* insert into ordered run queue */
   53.69 -        
   53.70 -        prev = RUNQ(sdom->processor);
   53.71 -
   53.72 -        list_for_each(next, RUNQ(sdom->processor))
   53.73 +        list_for_each_entry ( i, RUNQ(sdom->processor), run_list )
   53.74          {
   53.75 -            struct at_dom_info *p = list_entry(next, struct at_dom_info,
   53.76 -                                               run_list);
   53.77 -
   53.78 -            if( p->deadline > inf->deadline || is_idle_task(p->owner) )
   53.79 +            if ( (i->deadline > inf->deadline) || is_idle_task(i->owner) )
   53.80              {
   53.81 -                __list_add(&inf->run_list, prev, next);
   53.82 +                __list_add(&inf->run_list, i->run_list.prev, &i->run_list);
   53.83                  break;
   53.84              }
   53.85 -
   53.86 -            prev = next;
   53.87          }
   53.88  
   53.89 -        if ( next == RUNQ(sdom->processor) )
   53.90 +        if ( &i->waitq == RUNQ(sdom->processor) )
   53.91              list_add_tail(&inf->run_list, RUNQ(sdom->processor));
   53.92 -        
   53.93 -    
   53.94      }
   53.95      /* silently ignore tasks in other states like BLOCKED, DYING, STOPPED, etc
   53.96       * - they shouldn't be on any queue */
   53.97 @@ -194,7 +174,7 @@ static int at_alloc_task(struct domain *
   53.98      ASSERT(p != NULL);
   53.99      
  53.100      p->sched_priv = xmem_cache_alloc(dom_info_cache);
  53.101 -    if( p->sched_priv == NULL )
  53.102 +    if ( p->sched_priv == NULL )
  53.103          return -1;
  53.104      
  53.105      return 0;
  53.106 @@ -294,26 +274,26 @@ static void unblock(struct domain *sdom)
  53.107      {
  53.108          /* Long blocking case */
  53.109  
  53.110 -	    /* The sdom has passed its deadline since it was blocked. 
  53.111 -	       Give it its new deadline based on the latency value. */
  53.112 -	    inf->prevddln = time;
  53.113 +        /* The sdom has passed its deadline since it was blocked. 
  53.114 +           Give it its new deadline based on the latency value. */
  53.115 +        inf->prevddln = time;
  53.116  
  53.117          /* Scale the scheduling parameters as requested by the latency hint. */
  53.118 -	    inf->deadline = time + inf->latency;
  53.119 +        inf->deadline = time + inf->latency;
  53.120          inf->slice = inf->nat_slice / ( inf->nat_period / inf->latency );
  53.121          inf->period = inf->latency;
  53.122 -	    inf->remain = inf->slice;
  53.123 +        inf->remain = inf->slice;
  53.124      }
  53.125      else 
  53.126      {
  53.127          /* Short blocking case */
  53.128  
  53.129 -	    /* We leave REMAIN intact, but put this domain on the WAIT
  53.130 -	        queue marked as recently unblocked.  It will be given
  53.131 -	        priority over other domains on the wait queue until while
  53.132 -	        REMAIN>0 in a generous attempt to help it make up for its
  53.133 -	        own foolishness. */
  53.134 -	    if(inf->remain > 0)
  53.135 +        /* We leave REMAIN intact, but put this domain on the WAIT
  53.136 +           queue marked as recently unblocked.  It will be given
  53.137 +           priority over other domains on the wait queue until while
  53.138 +           REMAIN>0 in a generous attempt to help it make up for its
  53.139 +           own foolishness. */
  53.140 +        if(inf->remain > 0)
  53.141              inf->state = ATROPOS_TASK_UNBLOCKED;
  53.142          else
  53.143              inf->state = ATROPOS_TASK_WAIT;
  53.144 @@ -349,10 +329,10 @@ static void block(struct domain* sdom)
  53.145   */
  53.146  task_slice_t ksched_scheduler(s_time_t time)
  53.147  {
  53.148 -    struct domain	*cur_sdom = current;  /* Current sdom           */
  53.149 -    s_time_t     newtime;
  53.150 -    s_time_t      ranfor;	        /* How long the domain ran      */
  53.151 -    struct domain	*sdom;	        /* tmp. scheduling domain	*/
  53.152 +    struct domain *cur_sdom = current;  /* Current sdom           */
  53.153 +    s_time_t       newtime;
  53.154 +    s_time_t       ranfor;              /* How long the domain ran      */
  53.155 +    struct domain *sdom;                /* tmp. scheduling domain       */
  53.156      int cpu = cur_sdom->processor;      /* current CPU                  */
  53.157      struct at_dom_info *cur_info;
  53.158      static unsigned long waitq_rrobin = 0;
  53.159 @@ -367,7 +347,7 @@ task_slice_t ksched_scheduler(s_time_t t
  53.160      /* If we were spinning in the idle loop, there is no current
  53.161       * domain to deschedule. */
  53.162      if (is_idle_task(cur_sdom))
  53.163 -	goto deschedule_done;
  53.164 +        goto deschedule_done;
  53.165  
  53.166      /*****************************
  53.167       * 
  53.168 @@ -375,7 +355,7 @@ task_slice_t ksched_scheduler(s_time_t t
  53.169       *
  53.170       ****************************/
  53.171  
  53.172 -   /* Record the time the domain was preempted and for how long it
  53.173 +    /* Record the time the domain was preempted and for how long it
  53.174         ran.  Work out if the domain is going to be blocked to save
  53.175         some pointless queue shuffling */
  53.176      cur_sdom->lastdeschd = time;
  53.177 @@ -388,26 +368,26 @@ task_slice_t ksched_scheduler(s_time_t t
  53.178           (cur_info->state == ATROPOS_TASK_UNBLOCKED) )
  53.179      {
  53.180  
  53.181 -	    /* In this block, we are doing accounting for an sdom which has 
  53.182 -	        been running in contracted time.  Note that this could now happen
  53.183 -	        even if the domain is on the wait queue (i.e. if it blocked) */
  53.184 +        /* In this block, we are doing accounting for an sdom which has 
  53.185 +           been running in contracted time.  Note that this could now happen
  53.186 +           even if the domain is on the wait queue (i.e. if it blocked) */
  53.187  
  53.188 -	    /* Deduct guaranteed time from the domain */
  53.189 -	    cur_info->remain  -= ranfor;
  53.190 +        /* Deduct guaranteed time from the domain */
  53.191 +        cur_info->remain  -= ranfor;
  53.192  
  53.193 -	    /* If guaranteed time has run out... */
  53.194 -	    if ( cur_info->remain <= 0 )
  53.195 +        /* If guaranteed time has run out... */
  53.196 +        if ( cur_info->remain <= 0 )
  53.197          {
  53.198 -	        /* Move domain to correct position in WAIT queue */
  53.199 +            /* Move domain to correct position in WAIT queue */
  53.200              /* XXX sdom_unblocked doesn't need this since it is 
  53.201                 already in the correct place. */
  53.202 -	        cur_info->state = ATROPOS_TASK_WAIT;
  53.203 -	    }
  53.204 +            cur_info->state = ATROPOS_TASK_WAIT;
  53.205 +        }
  53.206      }
  53.207  
  53.208      requeue(cur_sdom);
  53.209  
  53.210 -deschedule_done:
  53.211 + deschedule_done:
  53.212      /*****************************
  53.213       * 
  53.214       * We have now successfully descheduled the current sdom.
  53.215 @@ -424,10 +404,10 @@ deschedule_done:
  53.216       ****************************/
  53.217      
  53.218      while(!list_empty(WAITQ(cpu)) && 
  53.219 -	    DOM_INFO(sdom = waitq_el(WAITQ(cpu)->next))->deadline <= time ) 
  53.220 +          DOM_INFO(sdom = waitq_el(WAITQ(cpu)->next))->deadline <= time ) 
  53.221      {
  53.222  
  53.223 -	    struct at_dom_info *inf = DOM_INFO(sdom);
  53.224 +        struct at_dom_info *inf = DOM_INFO(sdom);
  53.225          dequeue(sdom);
  53.226          
  53.227          if ( inf->period != inf->nat_period )
  53.228 @@ -444,22 +424,22 @@ deschedule_done:
  53.229              }
  53.230          }
  53.231  
  53.232 -	    /* Domain begins a new period and receives a slice of CPU 
  53.233 -	     * If this domain has been blocking then throw away the
  53.234 -	     * rest of it's remain - it can't be trusted */
  53.235 -	    if (inf->remain > 0) 
  53.236 -	        inf->remain = inf->slice;
  53.237 +        /* Domain begins a new period and receives a slice of CPU 
  53.238 +         * If this domain has been blocking then throw away the
  53.239 +         * rest of it's remain - it can't be trusted */
  53.240 +        if (inf->remain > 0) 
  53.241 +            inf->remain = inf->slice;
  53.242          else 
  53.243 -	        inf->remain += inf->slice;
  53.244 +            inf->remain += inf->slice;
  53.245  
  53.246 -	    inf->prevddln = inf->deadline;
  53.247 -	    inf->deadline += inf->period;
  53.248 +        inf->prevddln = inf->deadline;
  53.249 +        inf->deadline += inf->period;
  53.250  
  53.251          if ( inf->remain <= 0 )
  53.252              inf->state = ATROPOS_TASK_WAIT;
  53.253  
  53.254 -	    /* Place on the appropriate queue */
  53.255 -	    requeue(sdom);
  53.256 +        /* Place on the appropriate queue */
  53.257 +        requeue(sdom);
  53.258      }
  53.259  
  53.260      /*****************************
  53.261 @@ -484,30 +464,27 @@ deschedule_done:
  53.262       * queue */
  53.263      if (cur_sdom->id == IDLE_DOMAIN_ID && !list_empty(WAITQ(cpu)))
  53.264      {
  53.265 -        struct list_head *item;
  53.266 +        struct at_dom_info *inf;
  53.267  
  53.268 -	    /* Try running a domain on the WAIT queue - this part of the
  53.269 -	        scheduler isn't particularly efficient but then again, we
  53.270 -	        don't have any guaranteed domains to worry about. */
  53.271 -	
  53.272 -	    /* See if there are any unblocked domains on the WAIT
  53.273 -	        queue who we can give preferential treatment to. */
  53.274 +        /* Try running a domain on the WAIT queue - this part of the
  53.275 +           scheduler isn't particularly efficient but then again, we
  53.276 +           don't have any guaranteed domains to worry about. */
  53.277 +
  53.278 +        /* See if there are any unblocked domains on the WAIT
  53.279 +           queue who we can give preferential treatment to. */
  53.280          
  53.281 -        list_for_each(item, WAITQ(cpu))
  53.282 +        list_for_each_entry ( inf, WAITQ(cpu), waitq )
  53.283          {
  53.284 -            struct at_dom_info *inf =
  53.285 -                list_entry(item, struct at_dom_info, waitq);
  53.286 -
  53.287              sdom = inf->owner;
  53.288              
  53.289 -	        if (inf->state == ATROPOS_TASK_UNBLOCKED) 
  53.290 +            if (inf->state == ATROPOS_TASK_UNBLOCKED) 
  53.291              { 
  53.292 -		        cur_sdom = sdom;
  53.293 -    		    cur_info  = inf;
  53.294 -	    	    newtime  = time + inf->remain;
  53.295 -		        goto found;
  53.296 -	        }
  53.297 -	    }
  53.298 +                cur_sdom = sdom;
  53.299 +                cur_info  = inf;
  53.300 +                newtime  = time + inf->remain;
  53.301 +                goto found;
  53.302 +            }
  53.303 +        }
  53.304  
  53.305          /* init values needed to approximate round-robin for slack time */
  53.306          i = 0;
  53.307 @@ -515,14 +492,11 @@ deschedule_done:
  53.308              waitq_rrobin = 0;
  53.309          
  53.310          
  53.311 -	    /* Last chance: pick a domain on the wait queue with the XTRA
  53.312 -	        flag set.  The NEXT_OPTM field is used to cheaply achieve
  53.313 -	        an approximation of round-robin order */
  53.314 -        list_for_each(item, WAITQ(cpu))
  53.315 +        /* Last chance: pick a domain on the wait queue with the XTRA
  53.316 +           flag set.  The NEXT_OPTM field is used to cheaply achieve
  53.317 +           an approximation of round-robin order */
  53.318 +        list_for_each_entry ( inf, WAITQ(cpu), waitq )
  53.319          {
  53.320 -            struct at_dom_info *inf =
  53.321 -                list_entry(item, struct at_dom_info, waitq);
  53.322 -            
  53.323              sdom = inf->owner;
  53.324              
  53.325              if (inf->xtratime && i >= waitq_rrobin) 
  53.326 @@ -538,7 +512,7 @@ deschedule_done:
  53.327          }
  53.328      }
  53.329  
  53.330 -    found:
  53.331 + found:
  53.332      /**********************
  53.333       * 
  53.334       * We now have to work out the time when we next need to
  53.335 @@ -554,7 +528,7 @@ deschedule_done:
  53.336      /* exhausted its time, cut short the time allocation */
  53.337      if (!list_empty(WAITQ(cpu)))
  53.338      {
  53.339 -	    newtime = MIN(newtime,
  53.340 +        newtime = MIN(newtime,
  53.341                        DOM_INFO(waitq_el(WAITQ(cpu)->next))->deadline);
  53.342      }
  53.343  
  53.344 @@ -603,44 +577,44 @@ static void at_dump_runq_el(struct domai
  53.345  /* dump relevant per-cpu state for a run queue dump */
  53.346  static void at_dump_cpu_state(int cpu)
  53.347  {
  53.348 -    struct list_head *list, *queue;
  53.349 +    struct list_head *queue;
  53.350      int loop = 0;
  53.351      struct at_dom_info *d_inf;
  53.352      struct domain *d;
  53.353  
  53.354      queue = RUNQ(cpu);
  53.355      printk("\nRUNQUEUE rq %lx   n: %lx, p: %lx\n",  (unsigned long)queue,
  53.356 -    (unsigned long) queue->next, (unsigned long) queue->prev);
  53.357 +           (unsigned long) queue->next, (unsigned long) queue->prev);
  53.358  
  53.359 -    list_for_each ( list, queue )
  53.360 +    list_for_each_entry ( d_inf, queue, run_list )
  53.361      {
  53.362 -        d_inf = list_entry(list, struct at_dom_info, run_list);
  53.363          d = d_inf->owner;
  53.364          printk("%3d: %d has=%c ", loop++, d->id, 
  53.365 -                                    test_bit(DF_RUNNING, &d->flags) ? 'T':'F');
  53.366 +               test_bit(DF_RUNNING, &d->flags) ? 'T':'F');
  53.367          at_dump_runq_el(d);
  53.368          printk("c=0x%X%08X\n", (u32)(d->cpu_time>>32), (u32)d->cpu_time);
  53.369          printk("         l: %lx n: %lx  p: %lx\n",
  53.370 -                        (unsigned long)list, (unsigned long)list->next,
  53.371 -                        (unsigned long)list->prev);
  53.372 +               (unsigned long)&d_inf->run_list,
  53.373 +               (unsigned long)d_inf->run_list.next,
  53.374 +               (unsigned long)d_inf->run_list.prev);
  53.375      }
  53.376  
  53.377  
  53.378      queue = WAITQ(cpu);
  53.379      printk("\nWAITQUEUE rq %lx   n: %lx, p: %lx\n",  (unsigned long)queue,
  53.380 -    (unsigned long) queue->next, (unsigned long) queue->prev);
  53.381 +           (unsigned long) queue->next, (unsigned long) queue->prev);
  53.382  
  53.383 -    list_for_each ( list, queue )
  53.384 +    list_for_each_entry ( d_inf, queue, waitq )
  53.385      {
  53.386 -        d_inf = list_entry(list, struct at_dom_info, waitq);
  53.387          d = d_inf->owner;
  53.388          printk("%3d: %d has=%c ", loop++, d->id, 
  53.389 -                                    test_bit(DF_RUNNING, &d->flags) ? 'T':'F');
  53.390 +               test_bit(DF_RUNNING, &d->flags) ? 'T':'F');
  53.391          at_dump_runq_el(d);
  53.392          printk("c=0x%X%08X\n", (u32)(d->cpu_time>>32), (u32)d->cpu_time);
  53.393          printk("         l: %lx n: %lx  p: %lx\n",
  53.394 -                        (unsigned long)list, (unsigned long)list->next,
  53.395 -                        (unsigned long)list->prev);
  53.396 +               (unsigned long)&d_inf->waitq,
  53.397 +               (unsigned long)d_inf->waitq.next,
  53.398 +               (unsigned long)d_inf->waitq.prev);
  53.399      }
  53.400         
  53.401  }
    54.1 --- a/xen/common/sched_bvt.c	Mon Jan 24 10:19:03 2005 +0000
    54.2 +++ b/xen/common/sched_bvt.c	Tue Jan 25 16:58:27 2005 +0000
    54.3 @@ -370,7 +370,6 @@ static task_slice_t bvt_do_schedule(s_ti
    54.4  {
    54.5      struct domain *d;
    54.6      struct exec_domain      *prev = current, *next = NULL, *next_prime, *ed; 
    54.7 -    struct list_head   *tmp;
    54.8      int                 cpu = prev->processor;
    54.9      s32                 r_time;     /* time for new dom to run */
   54.10      u32                 next_evt, next_prime_evt, min_avt;
   54.11 @@ -415,10 +414,8 @@ static task_slice_t bvt_do_schedule(s_ti
   54.12      next_prime_evt = ~0U;
   54.13      min_avt        = ~0U;
   54.14  
   54.15 -    list_for_each ( tmp, RUNQUEUE(cpu) )
   54.16 +    list_for_each_entry ( p_einf, RUNQUEUE(cpu), run_list )
   54.17      {
   54.18 -        p_einf = list_entry(tmp, struct bvt_edom_info, run_list);
   54.19 -
   54.20          if ( p_einf->evt < next_evt )
   54.21          {
   54.22              next_prime_einf  = next_einf;
   54.23 @@ -530,7 +527,7 @@ static void bvt_dump_settings(void)
   54.24  
   54.25  static void bvt_dump_cpu_state(int i)
   54.26  {
   54.27 -    struct list_head *list, *queue;
   54.28 +    struct list_head *queue;
   54.29      int loop = 0;
   54.30      struct bvt_edom_info *d_inf;
   54.31      struct exec_domain *d;
   54.32 @@ -541,17 +538,15 @@ static void bvt_dump_cpu_state(int i)
   54.33      printk("QUEUE rq %lx   n: %lx, p: %lx\n",  (unsigned long)queue,
   54.34             (unsigned long) queue->next, (unsigned long) queue->prev);
   54.35  
   54.36 -    list_for_each ( list, queue )
   54.37 +    list_for_each_entry ( d_inf, queue, run_list )
   54.38      {
   54.39 -        d_inf = list_entry(list, struct bvt_edom_info, run_list);
   54.40          d = d_inf->exec_domain;
   54.41          printk("%3d: %u has=%c ", loop++, d->domain->id,
   54.42                 test_bit(EDF_RUNNING, &d->ed_flags) ? 'T':'F');
   54.43          bvt_dump_runq_el(d);
   54.44          printk("c=0x%X%08X\n", (u32)(d->cpu_time>>32), (u32)d->cpu_time);
   54.45 -        printk("         l: %lx n: %lx  p: %lx\n",
   54.46 -               (unsigned long)list, (unsigned long)list->next,
   54.47 -               (unsigned long)list->prev);
   54.48 +        printk("         l: %p n: %p  p: %p\n",
   54.49 +               &d_inf->run_list, d_inf->run_list.next, d_inf->run_list.prev);
   54.50      }
   54.51  }
   54.52  
    55.1 --- a/xen/common/sched_rrobin.c	Mon Jan 24 10:19:03 2005 +0000
    55.2 +++ b/xen/common/sched_rrobin.c	Tue Jan 25 16:58:27 2005 +0000
    55.3 @@ -187,7 +187,7 @@ static void rr_dump_domain(struct domain
    55.4  
    55.5  static void rr_dump_cpu_state(int i)
    55.6  {
    55.7 -    struct list_head *list, *queue;
    55.8 +    struct list_head *queue;
    55.9      int loop = 0;
   55.10      struct rrobin_dom_info *d_inf;
   55.11  
   55.12 @@ -199,10 +199,9 @@ static void rr_dump_cpu_state(int i)
   55.13      d_inf = list_entry(queue, struct rrobin_dom_info, run_list);
   55.14      rr_dump_domain(d_inf->domain);
   55.15   
   55.16 -    list_for_each ( list, queue )
   55.17 +    list_for_each_entry ( d_inf, queue, run_list )
   55.18      {
   55.19          printk("%3d: ",loop++);
   55.20 -        d_inf = list_entry(list, struct rrobin_dom_info, run_list);
   55.21          rr_dump_domain(d_inf->domain);
   55.22      }
   55.23  }
    56.1 --- a/xen/common/slab.c	Mon Jan 24 10:19:03 2005 +0000
    56.2 +++ b/xen/common/slab.c	Tue Jan 25 16:58:27 2005 +0000
    56.3 @@ -774,11 +774,9 @@ xmem_cache_create (const char *name, siz
    56.4      /* Need the semaphore to access the chain. */
    56.5      down(&cache_chain_sem);
    56.6      {
    56.7 -        struct list_head *p;
    56.8 +	xmem_cache_t *pc;
    56.9  
   56.10 -        list_for_each(p, &cache_chain) {
   56.11 -            xmem_cache_t *pc = list_entry(p, xmem_cache_t, next);
   56.12 -
   56.13 +        list_for_each_entry(pc, &cache_chain, next) {
   56.14              /* The name field is constant - no lock needed. */
   56.15              if (!strcmp(pc->name, name))
   56.16                  BUG();
   56.17 @@ -802,14 +800,14 @@ xmem_cache_create (const char *name, siz
   56.18   */
   56.19  static int is_chained_xmem_cache(xmem_cache_t * cachep)
   56.20  {
   56.21 -    struct list_head *p;
   56.22 +    xmem_cache_t *pc;
   56.23      int ret = 0;
   56.24      unsigned long spin_flags;
   56.25  
   56.26      /* Find the cache in the chain of caches. */
   56.27      down(&cache_chain_sem);
   56.28 -    list_for_each(p, &cache_chain) {
   56.29 -        if (p == &cachep->next) {
   56.30 +    list_for_each_entry(pc, &cache_chain, next) {
   56.31 +        if (pc == &cachep) {
   56.32              ret = 1;
   56.33              break;
   56.34          }
   56.35 @@ -1765,7 +1763,6 @@ void dump_slabinfo()
   56.36      p = &cache_cache.next;
   56.37      do {
   56.38          xmem_cache_t	*cachep;
   56.39 -        struct list_head *q;
   56.40          slab_t		*slabp;
   56.41          unsigned long	active_objs;
   56.42          unsigned long	num_objs;
   56.43 @@ -1776,22 +1773,19 @@ void dump_slabinfo()
   56.44          spin_lock_irq(&cachep->spinlock);
   56.45          active_objs = 0;
   56.46          num_slabs = 0;
   56.47 -        list_for_each(q,&cachep->slabs_full) {
   56.48 -            slabp = list_entry(q, slab_t, list);
   56.49 +        list_for_each_entry(slabp, &cachep->slabs_full, list) {
   56.50              if (slabp->inuse != cachep->num)
   56.51                  BUG();
   56.52              active_objs += cachep->num;
   56.53              active_slabs++;
   56.54          }
   56.55 -        list_for_each(q,&cachep->slabs_partial) {
   56.56 -            slabp = list_entry(q, slab_t, list);
   56.57 +        list_for_each_entry(slabp, &cachep->slabs_partial, list) {
   56.58              if (slabp->inuse == cachep->num || !slabp->inuse)
   56.59                  BUG();
   56.60              active_objs += slabp->inuse;
   56.61              active_slabs++;
   56.62          }
   56.63 -        list_for_each(q,&cachep->slabs_free) {
   56.64 -            slabp = list_entry(q, slab_t, list);
   56.65 +        list_for_each_entry(slabp, &cachep->slabs_free, list) {
   56.66              if (slabp->inuse)
   56.67                  BUG();
   56.68              num_slabs++;
    57.1 --- a/xen/drivers/acpi/Makefile	Mon Jan 24 10:19:03 2005 +0000
    57.2 +++ b/xen/drivers/acpi/Makefile	Tue Jan 25 16:58:27 2005 +0000
    57.3 @@ -6,7 +6,8 @@ include $(BASEDIR)/Rules.mk
    57.4  
    57.5  OBJS := acpi_ksyms.o tables.o
    57.6  
    57.7 -default: $(OBJS)
    57.8 +default: driver.o
    57.9 +driver.o: $(OBJS)
   57.10  	$(LD) $(LDFLAGS) -r -o driver.o $(OBJS)
   57.11  
   57.12  clean:
    58.1 --- a/xen/drivers/char/Makefile	Mon Jan 24 10:19:03 2005 +0000
    58.2 +++ b/xen/drivers/char/Makefile	Tue Jan 25 16:58:27 2005 +0000
    58.3 @@ -1,7 +1,8 @@
    58.4  
    58.5  include $(BASEDIR)/Rules.mk
    58.6  
    58.7 -default: $(OBJS)
    58.8 +default: driver.o
    58.9 +driver.o: $(OBJS)
   58.10  	$(LD) $(LDFLAGS) -r -o driver.o $(OBJS)
   58.11  
   58.12  clean:
    59.1 --- a/xen/drivers/pci/Makefile	Mon Jan 24 10:19:03 2005 +0000
    59.2 +++ b/xen/drivers/pci/Makefile	Tue Jan 25 16:58:27 2005 +0000
    59.3 @@ -28,7 +28,8 @@ OBJS := pci.o quirks.o compat.o names.o 
    59.4  #obj-y += syscall.o
    59.5  #endif
    59.6  
    59.7 -default: $(OBJS)
    59.8 +default: driver.o
    59.9 +driver.o: $(OBJS)
   59.10  	$(LD) $(LDFLAGS) -r -o driver.o $(OBJS)
   59.11  
   59.12  clean:
    60.1 --- a/xen/drivers/pci/pci.c	Mon Jan 24 10:19:03 2005 +0000
    60.2 +++ b/xen/drivers/pci/pci.c	Tue Jan 25 16:58:27 2005 +0000
    60.3 @@ -1565,15 +1565,15 @@ static int pci_pm_resume_device(struct p
    60.4  
    60.5  static int pci_pm_save_state_bus(struct pci_bus *bus, u32 state)
    60.6  {
    60.7 -	struct list_head *list;
    60.8 +	struct pci_bus *i;
    60.9  	int error = 0;
   60.10  
   60.11 -	list_for_each(list, &bus->children) {
   60.12 -		error = pci_pm_save_state_bus(pci_bus_b(list),state);
   60.13 +	list_for_each_entry(i, &bus->children, node) {
   60.14 +		error = pci_pm_save_state_bus(i, state);
   60.15  		if (error) return error;
   60.16  	}
   60.17 -	list_for_each(list, &bus->devices) {
   60.18 -		error = pci_pm_save_state_device(pci_dev_b(list),state);
   60.19 +	list_for_each_entry(i, &bus->devices, node) {
   60.20 +		error = pci_pm_save_state_device(i, state);
   60.21  		if (error) return error;
   60.22  	}
   60.23  	return 0;
   60.24 @@ -1581,40 +1581,38 @@ static int pci_pm_save_state_bus(struct 
   60.25  
   60.26  static int pci_pm_suspend_bus(struct pci_bus *bus, u32 state)
   60.27  {
   60.28 -	struct list_head *list;
   60.29 +	struct pci_bus *i;
   60.30  
   60.31  	/* Walk the bus children list */
   60.32 -	list_for_each(list, &bus->children) 
   60.33 -		pci_pm_suspend_bus(pci_bus_b(list),state);
   60.34 +	list_for_each_entry(i, &bus->children, node) 
   60.35 +		pci_pm_suspend_bus(i, state);
   60.36  
   60.37  	/* Walk the device children list */
   60.38 -	list_for_each(list, &bus->devices)
   60.39 -		pci_pm_suspend_device(pci_dev_b(list),state);
   60.40 +	list_for_each_entry(i, &bus->devices, node)
   60.41 +		pci_pm_suspend_device(i, state);
   60.42  	return 0;
   60.43  }
   60.44  
   60.45  static int pci_pm_resume_bus(struct pci_bus *bus)
   60.46  {
   60.47 -	struct list_head *list;
   60.48 +	struct pci_bus *i;
   60.49  
   60.50  	/* Walk the device children list */
   60.51 -	list_for_each(list, &bus->devices)
   60.52 -		pci_pm_resume_device(pci_dev_b(list));
   60.53 +	list_for_each_entry(i, &bus->devices, node)
   60.54 +		pci_pm_resume_device(i);
   60.55  
   60.56  	/* And then walk the bus children */
   60.57 -	list_for_each(list, &bus->children)
   60.58 -		pci_pm_resume_bus(pci_bus_b(list));
   60.59 +	list_for_each_entry(i, &bus->children, node)
   60.60 +		pci_pm_resume_bus(i);
   60.61  	return 0;
   60.62  }
   60.63  
   60.64  static int pci_pm_save_state(u32 state)
   60.65  {
   60.66 -	struct list_head *list;
   60.67  	struct pci_bus *bus;
   60.68  	int error = 0;
   60.69  
   60.70 -	list_for_each(list, &pci_root_buses) {
   60.71 -		bus = pci_bus_b(list);
   60.72 +	list_for_each_entry(bus, &pci_root_buses, node) {
   60.73  		error = pci_pm_save_state_bus(bus,state);
   60.74  		if (!error)
   60.75  			error = pci_pm_save_state_device(bus->self,state);
   60.76 @@ -1624,11 +1622,9 @@ static int pci_pm_save_state(u32 state)
   60.77  
   60.78  static int pci_pm_suspend(u32 state)
   60.79  {
   60.80 -	struct list_head *list;
   60.81  	struct pci_bus *bus;
   60.82  
   60.83 -	list_for_each(list, &pci_root_buses) {
   60.84 -		bus = pci_bus_b(list);
   60.85 +	list_for_each_entry(bus, &pci_root_buses, node) {
   60.86  		pci_pm_suspend_bus(bus,state);
   60.87  		pci_pm_suspend_device(bus->self,state);
   60.88  	}
   60.89 @@ -1637,11 +1633,9 @@ static int pci_pm_suspend(u32 state)
   60.90  
   60.91  int pci_pm_resume(void)
   60.92  {
   60.93 -	struct list_head *list;
   60.94  	struct pci_bus *bus;
   60.95  
   60.96 -	list_for_each(list, &pci_root_buses) {
   60.97 -		bus = pci_bus_b(list);
   60.98 +	list_for_each_entry(bus, &pci_root_buses, node) {
   60.99  		pci_pm_resume_device(bus->self);
  60.100  		pci_pm_resume_bus(bus);
  60.101  	}
    61.1 --- a/xen/include/asm-x86/cpufeature.h	Mon Jan 24 10:19:03 2005 +0000
    61.2 +++ b/xen/include/asm-x86/cpufeature.h	Tue Jan 25 16:58:27 2005 +0000
    61.3 @@ -8,7 +8,7 @@
    61.4  #define __ASM_X86_CPUFEATURE_H
    61.5  
    61.6  /* Sample usage: CPU_FEATURE_P(cpu.x86_capability, FPU) */
    61.7 -#define CPU_FEATURE_P(CAP, FEATURE) test_bit(CAP, X86_FEATURE_##FEATURE ##_BIT)
    61.8 +#define CPU_FEATURE_P(CAP, FEATURE) test_bit(CAP, X86_FEATURE_##FEATURE)
    61.9  
   61.10  #define NCAPINTS	6	/* Currently we have 6 32-bit words worth of info */
   61.11  
    62.1 --- a/xen/include/asm-x86/fixmap.h	Mon Jan 24 10:19:03 2005 +0000
    62.2 +++ b/xen/include/asm-x86/fixmap.h	Tue Jan 25 16:58:27 2005 +0000
    62.3 @@ -26,7 +26,7 @@
    62.4   */
    62.5  enum fixed_addresses {
    62.6  #ifdef CONFIG_X86_LOCAL_APIC
    62.7 -    FIX_APIC_BASE,	/* local (CPU) APIC) -- required for SMP or not */
    62.8 +    FIX_APIC_BASE,	/* local (CPU) APIC -- required for SMP or not */
    62.9  #endif
   62.10  #ifdef CONFIG_X86_IO_APIC
   62.11      FIX_IO_APIC_BASE_0,
    63.1 --- a/xen/include/asm-x86/irq.h	Mon Jan 24 10:19:03 2005 +0000
    63.2 +++ b/xen/include/asm-x86/irq.h	Tue Jan 25 16:58:27 2005 +0000
    63.3 @@ -134,11 +134,6 @@ SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\
    63.4  	"push"__OS" $"#nr"<<16\n\t" \
    63.5  	"jmp common_interrupt");
    63.6  
    63.7 -extern unsigned long prof_cpu_mask;
    63.8 -extern unsigned int *prof_buffer;
    63.9 -extern unsigned long prof_len;
   63.10 -extern unsigned long prof_shift;
   63.11 -
   63.12  #include <xen/irq.h>
   63.13  
   63.14  static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
    64.1 --- a/xen/include/asm-x86/msr.h	Mon Jan 24 10:19:03 2005 +0000
    64.2 +++ b/xen/include/asm-x86/msr.h	Tue Jan 25 16:58:27 2005 +0000
    64.3 @@ -95,12 +95,6 @@
    64.4  #define MSR_IA32_EVNTSEL0      0x186
    64.5  #define MSR_IA32_EVNTSEL1      0x187
    64.6  
    64.7 -#define MSR_IA32_DEBUGCTLMSR       0x1d9
    64.8 -#define MSR_IA32_LASTBRANCHFROMIP  0x1db
    64.9 -#define MSR_IA32_LASTBRANCHTOIP        0x1dc
   64.10 -#define MSR_IA32_LASTINTFROMIP     0x1dd
   64.11 -#define MSR_IA32_LASTINTTOIP       0x1de
   64.12 -
   64.13  #define MSR_MTRRfix64K_00000	0x250
   64.14  #define MSR_MTRRfix16K_80000	0x258
   64.15  #define MSR_MTRRfix16K_A0000	0x259
   64.16 @@ -119,6 +113,8 @@
   64.17  #define MSR_IA32_MC0_ADDR      0x402
   64.18  #define MSR_IA32_MC0_MISC      0x403
   64.19  
   64.20 +#define MSR_IA32_DS_AREA	0x600
   64.21 +
   64.22  #define MSR_IA32_APICBASE		0x1b
   64.23  #define MSR_IA32_APICBASE_BSP		(1<<8)
   64.24  #define MSR_IA32_APICBASE_ENABLE	(1<<11)
   64.25 @@ -138,11 +134,22 @@
   64.26  #define MSR_IA32_THERM_STATUS		0x19c
   64.27  #define MSR_IA32_MISC_ENABLE		0x1a0
   64.28  
   64.29 +#define MSR_IA32_MISC_ENABLE_PERF_AVAIL   (1<<7)
   64.30 +#define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL  (1<<11)
   64.31 +#define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1<<12)
   64.32 +
   64.33  #define MSR_IA32_DEBUGCTLMSR		0x1d9
   64.34 -#define MSR_IA32_LASTBRANCHFROMIP	0x1db
   64.35 -#define MSR_IA32_LASTBRANCHTOIP		0x1dc
   64.36 -#define MSR_IA32_LASTINTFROMIP		0x1dd
   64.37 -#define MSR_IA32_LASTINTTOIP		0x1de
   64.38 +#define MSR_IA32_DEBUGCTLMSR_LBR        (1<<0)
   64.39 +#define MSR_IA32_DEBUGCTLMSR_BTF        (1<<1)
   64.40 +#define MSR_IA32_DEBUGCTLMSR_TR		(1<<2)
   64.41 +#define MSR_IA32_DEBUGCTLMSR_BTS        (1<<3)
   64.42 +#define MSR_IA32_DEBUGCTLMSR_BTINT      (1<<4)
   64.43 +
   64.44 +#define MSR_IA32_LASTBRANCH_TOS         0x1da
   64.45 +#define MSR_IA32_LASTBRANCH_0		0x1db
   64.46 +#define MSR_IA32_LASTBRANCH_1		0x1dc
   64.47 +#define MSR_IA32_LASTBRANCH_2		0x1dd
   64.48 +#define MSR_IA32_LASTBRANCH_3		0x1de
   64.49  
   64.50  #define MSR_IA32_MC0_CTL		0x400
   64.51  #define MSR_IA32_MC0_STATUS		0x401
   64.52 @@ -154,6 +161,7 @@
   64.53  #define MSR_P6_EVNTSEL0			0x186
   64.54  #define MSR_P6_EVNTSEL1			0x187
   64.55  
   64.56 +
   64.57  /* K7/K8 MSRs. Not complete. See the architecture manual for a more complete list. */
   64.58  #define MSR_K7_EVNTSEL0            0xC0010000
   64.59  #define MSR_K7_PERFCTR0            0xC0010004
    65.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    65.2 +++ b/xen/include/xen/compile.h.in	Tue Jan 25 16:58:27 2005 +0000
    65.3 @@ -0,0 +1,13 @@
    65.4 +#define XEN_COMPILE_DATE	"@@date@@"
    65.5 +#define XEN_COMPILE_TIME	"@@time@@"
    65.6 +#define XEN_COMPILE_BY		"@@whoami@@"
    65.7 +#define XEN_COMPILE_DOMAIN	"@@domain@@"
    65.8 +#define XEN_COMPILE_HOST	"@@hostname@@"
    65.9 +#define XEN_COMPILER		"@@compiler@@"
   65.10 +
   65.11 +#define XEN_VERSION		@@version@@
   65.12 +#define XEN_SUBVERSION		@@subversion@@
   65.13 +#define XEN_EXTRAVERSION	@@extraversion@@
   65.14 +
   65.15 +#define XEN_CHANGESET		"@@changeset@@"
   65.16 +#define XEN_BANNER		\
    66.1 --- a/xen/include/xen/list.h	Mon Jan 24 10:19:03 2005 +0000
    66.2 +++ b/xen/include/xen/list.h	Tue Jan 25 16:58:27 2005 +0000
    66.3 @@ -161,8 +161,6 @@ static __inline__ void list_splice(struc
    66.4  	for (pos = (head)->next, n = pos->next; pos != (head); \
    66.5  		pos = n, n = pos->next)
    66.6  
    66.7 -#endif
    66.8 -
    66.9  /**
   66.10   * list_for_each_entry	-	iterate over list of given type
   66.11   * @pos:	the type * to use as a loop counter.
   66.12 @@ -175,3 +173,6 @@ static __inline__ void list_splice(struc
   66.13  	     &pos->member != (head); 					\
   66.14  	     pos = list_entry(pos->member.next, typeof(*pos), member),	\
   66.15  		     prefetch(pos->member.next))
   66.16 +
   66.17 +#endif /* _LINUX_LIST_H */
   66.18 +
    67.1 --- a/xen/include/xen/pci.h	Mon Jan 24 10:19:03 2005 +0000
    67.2 +++ b/xen/include/xen/pci.h	Tue Jan 25 16:58:27 2005 +0000
    67.3 @@ -358,7 +358,7 @@ enum pci_mmap_state {
    67.4  	for(dev = pci_dev_g(pci_devices.prev); dev != pci_dev_g(&pci_devices); dev = pci_dev_g(dev->global_list.prev))
    67.5  
    67.6  #define pci_for_each_bus(bus) \
    67.7 -for(bus = pci_bus_b(pci_root_buses.next); bus != pci_bus_b(&pci_root_buses); bus = pci_bus_b(bus->node.next))
    67.8 +	list_for_each_entry(bus, &pci_root_buses, node)
    67.9  
   67.10  /*
   67.11   * The pci_dev structure is used to describe both PCI and ISAPnP devices.