direct-io.hg

changeset 5983:b53a65034532

Merge in minor ia64 Makefile change from xen-unstable
author djm@kirby.fc.hp.com
date Fri Jul 29 13:25:03 2005 -0700 (2005-07-29)
parents a4196568095c 55a5ad2f028d
children 10872902be39
files .hgignore Makefile buildconfigs/Rules.mk buildconfigs/mk.linux-2.6-xen buildconfigs/mk.linux-2.6-xen0 buildconfigs/mk.linux-2.6-xenU docs/misc/shype4xen_readme.txt docs/src/user.tex linux-2.6-xen-sparse/arch/xen/Kconfig linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/entry.S linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6-xen-sparse/arch/xen/i386/kernel/irq.c linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6-xen-sparse/arch/xen/i386/pci/irq.c linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6-xen-sparse/arch/xen/kernel/reboot.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/Makefile linux-2.6-xen-sparse/drivers/xen/Makefile linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/netback/common.h linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/io.h linux-2.6-xen-sparse/include/asm-xen/hypervisor.h linux-2.6-xen-sparse/include/asm-xen/xenbus.h linux-2.6-xen-sparse/include/linux/mm.h linux-2.6-xen-sparse/kernel/ptrace.c patches/linux-2.6.12/smp-alts.patch tools/Makefile tools/debugger/gdb/gdbbuild tools/debugger/libxendebug/xendebug.c tools/debugger/pdb/PDB.ml tools/debugger/pdb/Process.ml tools/debugger/pdb/Process.mli tools/debugger/pdb/Util.ml tools/debugger/pdb/Xen_domain.ml tools/debugger/pdb/Xen_domain.mli tools/debugger/pdb/debugger.ml tools/debugger/pdb/linux-2.6-module/Makefile tools/debugger/pdb/linux-2.6-module/debug.c tools/debugger/pdb/linux-2.6-module/module.c tools/debugger/pdb/linux-2.6-module/pdb_debug.h tools/debugger/pdb/linux-2.6-module/pdb_module.h tools/debugger/pdb/pdb_caml_process.c tools/debugger/pdb/pdb_caml_xcs.c tools/debugger/pdb/pdb_caml_xen.h tools/debugger/pdb/readme tools/debugger/pdb/server.ml tools/examples/xend-config.sxp tools/firmware/rombios/rombios.c tools/ioemu/monitor.c tools/ioemu/target-i386-dm/qemu-dm.debug tools/ioemu/vnc.c tools/libxc/Makefile tools/libxc/xc.h tools/libxc/xc_domain.c tools/libxc/xc_linux_build.c tools/libxc/xc_load_elf.c tools/libxc/xc_private.c tools/libxc/xc_private.h tools/libxc/xc_ptrace.c tools/misc/Makefile tools/misc/policyprocessor/XmlToBinInterface.java tools/python/setup.py tools/python/xen/lowlevel/xc/xc.c tools/python/xen/lowlevel/xs/xs.c tools/python/xen/lowlevel/xu/xu.c tools/python/xen/sv/CreateDomain.py tools/python/xen/sv/Daemon.py tools/python/xen/sv/DomInfo.py tools/python/xen/sv/DomList.py tools/python/xen/sv/GenTabbed.py tools/python/xen/sv/HTMLBase.py tools/python/xen/sv/Main.py tools/python/xen/sv/MigrateDomain.py tools/python/xen/sv/NodeInfo.py tools/python/xen/sv/RestoreDomain.py tools/python/xen/sv/SaveDomain.py tools/python/xen/sv/TabView.py tools/python/xen/sv/Wizard.py tools/python/xen/sv/__init__.py tools/python/xen/sv/params.py tools/python/xen/sv/util.py tools/python/xen/xend/XendCheckpoint.py tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/XendRoot.py tools/python/xen/xend/image.py tools/python/xen/xend/server/SrvDaemon.py tools/python/xen/xend/server/channel.py tools/python/xen/xend/xenstore/xsnode.py tools/python/xen/xm/create.py tools/python/xen/xm/main.py tools/sv/Makefile tools/sv/images/destroy.png tools/sv/images/finish.png tools/sv/images/internet.jpg tools/sv/images/internet.psd tools/sv/images/next.png tools/sv/images/orb_01.jpg tools/sv/images/orb_02.jpg tools/sv/images/pause.png tools/sv/images/previous.png tools/sv/images/reboot.png tools/sv/images/seperator-left-highlight.jpg tools/sv/images/seperator-right-highlight.jpg tools/sv/images/seperator.jpg tools/sv/images/shutdown.png tools/sv/images/small-destroy.png tools/sv/images/small-pause.png tools/sv/images/small-unpause.png tools/sv/images/unpause.png tools/sv/images/xen.png tools/sv/inc/script.js tools/sv/inc/style.css tools/sv/index.psp tools/xcs/xcs.h tools/xenstore/Makefile tools/xenstore/TODO tools/xenstore/testsuite/02directory.sh tools/xenstore/testsuite/07watch.sh tools/xenstore/testsuite/08transaction.sh tools/xenstore/testsuite/09domain.sh tools/xenstore/testsuite/10domain-homedir.sh tools/xenstore/testsuite/11domain-watch.sh tools/xenstore/testsuite/12readonly.sh tools/xenstore/testsuite/13watch-ack.sh tools/xenstore/testsuite/test.sh tools/xenstore/xenstored_core.c tools/xenstore/xenstored_core.h tools/xenstore/xenstored_domain.c tools/xenstore/xenstored_domain.h tools/xenstore/xenstored_transaction.c tools/xenstore/xenstored_transaction.h tools/xenstore/xenstored_watch.c tools/xenstore/xenstored_watch.h tools/xenstore/xs.c tools/xenstore/xs.h tools/xenstore/xs_random.c tools/xenstore/xs_test.c xen/Makefile xen/acm/acm_core.c xen/acm/acm_policy.c xen/arch/ia64/Makefile xen/arch/ia64/asm-offsets.c xen/arch/ia64/dom_fw.c xen/arch/ia64/domain.c xen/arch/ia64/hypercall.c xen/arch/ia64/hyperprivop.S xen/arch/ia64/patch/linux-2.6.11/kregs.h xen/arch/ia64/pcdp.c xen/arch/ia64/process.c xen/arch/ia64/regionreg.c xen/arch/ia64/vcpu.c xen/arch/ia64/xenasm.S xen/arch/ia64/xenmisc.c xen/arch/ia64/xensetup.c xen/arch/ia64/xentime.c xen/arch/x86/Makefile xen/arch/x86/acpi/boot.c xen/arch/x86/apic.c xen/arch/x86/cpu/common.c xen/arch/x86/domain.c xen/arch/x86/domain_build.c xen/arch/x86/genapic/es7000plat.c xen/arch/x86/i8259.c xen/arch/x86/io_apic.c xen/arch/x86/mpparse.c xen/arch/x86/setup.c xen/arch/x86/shadow.c xen/arch/x86/shadow32.c xen/arch/x86/smpboot.c xen/arch/x86/time.c xen/arch/x86/traps.c xen/arch/x86/vmx.c xen/arch/x86/vmx_intercept.c xen/arch/x86/vmx_io.c xen/arch/x86/vmx_platform.c xen/arch/x86/vmx_vmcs.c xen/arch/x86/x86_32/mm.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/entry.S xen/arch/x86/x86_64/mm.c xen/arch/x86/x86_64/traps.c xen/common/ac_timer.c xen/common/dom_mem_ops.c xen/common/domain.c xen/common/grant_table.c xen/common/page_alloc.c xen/common/policy_ops.c xen/common/sched_sedf.c xen/common/symbols.c xen/common/xmalloc.c xen/drivers/char/console.c xen/include/acm/acm_core.h xen/include/acm/acm_hooks.h xen/include/asm-ia64/event.h xen/include/asm-ia64/vcpu.h xen/include/asm-ia64/vmx.h xen/include/asm-ia64/vmx_vpd.h xen/include/asm-ia64/xensystem.h xen/include/asm-x86/apicdef.h xen/include/asm-x86/config.h xen/include/asm-x86/fixmap.h xen/include/asm-x86/genapic.h xen/include/asm-x86/hpet.h xen/include/asm-x86/mach-bigsmp/mach_apic.h xen/include/asm-x86/mach-default/mach_apic.h xen/include/asm-x86/mach-es7000/mach_apic.h xen/include/asm-x86/mach-generic/mach_apic.h xen/include/asm-x86/mach-summit/mach_apic.h xen/include/asm-x86/mach-summit/mach_mpparse.h xen/include/asm-x86/shadow.h xen/include/asm-x86/shadow_64.h xen/include/asm-x86/shadow_public.h xen/include/asm-x86/time.h xen/include/asm-x86/types.h xen/include/asm-x86/vmx.h xen/include/asm-x86/vmx_virpit.h xen/include/asm-x86/vmx_vmcs.h xen/include/public/arch-ia64.h xen/include/public/grant_table.h xen/include/public/io/netif.h xen/include/public/xen.h xen/include/xen/mm.h xen/include/xen/sched.h xen/include/xen/symbols.h xen/include/xen/time.h xen/tools/Makefile xen/tools/symbols.c
line diff
     1.1 --- a/.hgignore	Fri Jul 29 11:52:33 2005 -0700
     1.2 +++ b/.hgignore	Fri Jul 29 13:25:03 2005 -0700
     1.3 @@ -87,6 +87,11 @@
     1.4  ^tools/cmdline/.*$
     1.5  ^tools/cmdline/xen/.*$
     1.6  ^tools/debugger/pdb/pdb$
     1.7 +^tools/debugger/pdb/linux-[0-9.]*-module/.*\.ko$
     1.8 +^tools/debugger/pdb/linux-[0-9.]*-module/.*\.mod.c$
     1.9 +^tools/debugger/pdb/linux-[0-9.]*-module/\..*\.cmd$
    1.10 +^tools/debugger/pdb/linux-[0-9.]*-module/.tmp_versions/.*$
    1.11 +^tools/debugger/pdb/._bcdi/.*$
    1.12  ^tools/firmware/acpi/acpigen$
    1.13  ^tools/firmware/.*\.bin$
    1.14  ^tools/firmware/.*\.sym$
    1.15 @@ -157,10 +162,6 @@
    1.16  ^xen/arch/x86/asm-offsets\.s$
    1.17  ^xen/arch/x86/boot/mkelf32$
    1.18  ^xen/ddb/.*$
    1.19 -^xen/drivers/pci/classlist\.h$
    1.20 -^xen/drivers/pci/devlist\.h$
    1.21 -^xen/drivers/pci/gen-devlist$
    1.22 -^xen/figlet/figlet$
    1.23  ^xen/include/asm$
    1.24  ^xen/include/asm-.*/asm-offsets\.h$
    1.25  ^xen/include/hypervisor-ifs/arch$
    1.26 @@ -170,8 +171,8 @@
    1.27  ^xen/include/xen/banner\.h$
    1.28  ^xen/include/xen/compile\.h$
    1.29  ^xen/tags$
    1.30 -^xen/tools/elf-reloc$
    1.31  ^xen/tools/figlet/figlet$
    1.32 +^xen/tools/symbols$
    1.33  ^xen/xen$
    1.34  ^xen/xen-syms$
    1.35  ^xen/xen\..*$
     2.1 --- a/Makefile	Fri Jul 29 11:52:33 2005 -0700
     2.2 +++ b/Makefile	Fri Jul 29 13:25:03 2005 -0700
     2.3 @@ -163,7 +163,7 @@ help:
     2.4  uninstall: DESTDIR=
     2.5  uninstall: D=$(DESTDIR)
     2.6  uninstall:
     2.7 -	[ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-$(date +%s)
     2.8 +	[ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s`
     2.9  	rm -rf $(D)/etc/init.d/xend*
    2.10  	rm -rf $(D)/usr/$(LIBDIR)/libxc* $(D)/usr/$(LIBDIR)/libxutil*
    2.11  	rm -rf $(D)/usr/$(LIBDIR)/python/xen $(D)/usr/include/xen
     3.1 --- a/buildconfigs/Rules.mk	Fri Jul 29 11:52:33 2005 -0700
     3.2 +++ b/buildconfigs/Rules.mk	Fri Jul 29 13:25:03 2005 -0700
     3.3 @@ -101,7 +101,7 @@ ref-%/.valid-ref: pristine-%/.valid-pris
     3.4  	rm -rf tmp-$@
     3.5  
     3.6  %-mrproper: %-mrproper-extra
     3.7 -	rm -rf pristine-$* ref-$* $*.tar.bz2
     3.8 +	rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2
     3.9  	rm -rf $*-xen.patch
    3.10  
    3.11  netbsd-%-mrproper-extra:
    3.12 @@ -111,5 +111,12 @@ netbsd-%-mrproper-extra:
    3.13  %-mrproper-extra:
    3.14  	@: # do nothing
    3.15  
    3.16 +config-update-pae:
    3.17 +ifeq ($(XEN_TARGET_X86_PAE),y)
    3.18 +	sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
    3.19 +else
    3.20 +	@: # do nothing yet
    3.21 +endif
    3.22 +
    3.23  # never delete any intermediate files.
    3.24  .SECONDARY:
     4.1 --- a/buildconfigs/mk.linux-2.6-xen	Fri Jul 29 11:52:33 2005 -0700
     4.2 +++ b/buildconfigs/mk.linux-2.6-xen	Fri Jul 29 13:25:03 2005 -0700
     4.3 @@ -32,6 +32,8 @@ build: $(LINUX_DIR)/include/linux/autoco
     4.4  	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
     4.5  	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
     4.6  		$(LINUX_DIR)/.config
     4.7 +	# See if we need to munge config to enable PAE
     4.8 +	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
     4.9  	# Patch kernel Makefile to set EXTRAVERSION
    4.10  	( cd $(LINUX_DIR) ; \
    4.11  	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
     5.1 --- a/buildconfigs/mk.linux-2.6-xen0	Fri Jul 29 11:52:33 2005 -0700
     5.2 +++ b/buildconfigs/mk.linux-2.6-xen0	Fri Jul 29 13:25:03 2005 -0700
     5.3 @@ -32,6 +32,8 @@ build: $(LINUX_DIR)/include/linux/autoco
     5.4  	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
     5.5  	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
     5.6  		$(LINUX_DIR)/.config
     5.7 +	# See if we need to munge config to enable PAE
     5.8 +	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
     5.9  	# Patch kernel Makefile to set EXTRAVERSION
    5.10  	( cd $(LINUX_DIR) ; \
    5.11  	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
     6.1 --- a/buildconfigs/mk.linux-2.6-xenU	Fri Jul 29 11:52:33 2005 -0700
     6.2 +++ b/buildconfigs/mk.linux-2.6-xenU	Fri Jul 29 13:25:03 2005 -0700
     6.3 @@ -32,6 +32,8 @@ build: $(LINUX_DIR)/include/linux/autoco
     6.4  	  cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
     6.5  	  || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
     6.6  		$(LINUX_DIR)/.config
     6.7 +	# See if we need to munge config to enable PAE
     6.8 +	$(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
     6.9  	# Patch kernel Makefile to set EXTRAVERSION
    6.10  	( cd $(LINUX_DIR) ; \
    6.11  	  sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
     7.1 --- a/docs/misc/shype4xen_readme.txt	Fri Jul 29 11:52:33 2005 -0700
     7.2 +++ b/docs/misc/shype4xen_readme.txt	Fri Jul 29 13:25:03 2005 -0700
     7.3 @@ -567,4 +567,22 @@ is that policy files/management should b
     7.4  Our policy interface enables managers to create a single binary policy file in a trusted
     7.5  environment and distributed it to multiple systems for enforcement.
     7.6  
     7.7 +5. Booting with a binary policy:
     7.8 +********************************
     7.9 +The grub configuration file can be adapted to boot the hypervisor with an
    7.10 +already active policy. To do this, a binary policy file - this can be
    7.11 +the same file as used by the policy_tool - should be placed into the boot
    7.12 +partition. The following entry from the grub configuration file shows how
    7.13 +a binary policy can be added to the system during boot time. Note that the 
    7.14 +binary policy must be of the same type that the hypervisor was compiled 
    7.15 +for. The policy module line should also only be added as the last module
    7.16 +line if XEN was compiled with the access control module (ACM).
    7.17 +
    7.18 +title XEN0 3.0 Devel
    7.19 +	kernel /xen.gz dom0_mem=400000
    7.20 +	module /vmlinuz-2.6.12-xen0 root=/dev/hda2 ro console=tty0
    7.21 +	module /initrd-2.6.12-xen0.img
    7.22 +	module /xen_sample_policy.bin
    7.23 +
    7.24 +
    7.25  ====================end-of file=======================================
     8.1 --- a/docs/src/user.tex	Fri Jul 29 11:52:33 2005 -0700
     8.2 +++ b/docs/src/user.tex	Fri Jul 29 13:25:03 2005 -0700
     8.3 @@ -930,12 +930,12 @@ memory at the request of the administrat
     8.4  \subsection{Setting memory footprints from dom0}
     8.5  
     8.6  The machine administrator can request that a domain alter its memory
     8.7 -footprint using the \path{xm balloon} command.  For instance, we can
     8.8 +footprint using the \path{xm set-mem} command.  For instance, we can
     8.9  request that our example ttylinux domain reduce its memory footprint
    8.10  to 32 megabytes.
    8.11  
    8.12  \begin{verbatim}
    8.13 -# xm balloon ttylinux 32
    8.14 +# xm set-mem ttylinux 32
    8.15  \end{verbatim}
    8.16  
    8.17  We can now see the result of this in the output of \path{xm list}:
    8.18 @@ -951,16 +951,16 @@ The domain has responded to the request 
    8.19  can restore the domain to its original size using the command line:
    8.20  
    8.21  \begin{verbatim}
    8.22 -# xm balloon ttylinux 64
    8.23 +# xm set-mem ttylinux 64
    8.24  \end{verbatim}
    8.25  
    8.26  \subsection{Setting memory footprints from within a domain}
    8.27  
    8.28 -The virtual file \path{/proc/xen/memory\_target} allows the owner of a
    8.29 +The virtual file \path{/proc/xen/balloon} allows the owner of a
    8.30  domain to adjust their own memory footprint.  Reading the file
    8.31 -(e.g. \path{cat /proc/xen/memory\_target}) prints out the current
    8.32 +(e.g. \path{cat /proc/xen/balloon}) prints out the current
    8.33  memory footprint of the domain.  Writing the file
    8.34 -(e.g. \path{echo new\_target > /proc/xen/memory\_target}) requests
    8.35 +(e.g. \path{echo new\_target > /proc/xen/balloon}) requests
    8.36  that the kernel adjust the domain's memory footprint to a new value.
    8.37  
    8.38  \subsection{Setting memory limits}
    8.39 @@ -1285,7 +1285,7 @@ custom variables (for instance, the \pat
    8.40  The available commands are as follows:
    8.41  
    8.42  \begin{description}
    8.43 -\item[balloon] Request a domain to adjust its memory footprint.
    8.44 +\item[set-mem] Request a domain to adjust its memory footprint.
    8.45  \item[create] Create a new domain.
    8.46  \item[destroy] Kill a domain immediately.
    8.47  \item[list] List running domains.
     9.1 --- a/linux-2.4.30-xen-sparse/Makefile	Fri Jul 29 11:52:33 2005 -0700
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,592 +0,0 @@
     9.4 -VERSION = 2
     9.5 -PATCHLEVEL = 4
     9.6 -SUBLEVEL = 30
     9.7 -EXTRAVERSION =
     9.8 -
     9.9 -KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
    9.10 -
    9.11 -# SUBARCH always tells us the underlying machine architecture.
    9.12 -# Unless overridden, by default ARCH is equivalent to SUBARCH.
    9.13 -# This will be overriden for Xen and UML builds.
    9.14 -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
    9.15 -ARCH ?= $(SUBARCH)
    9.16 -
    9.17 -## XXX The following hack can be discarded after users have adjusted to the
    9.18 -## architectural name change 'xeno' -> 'xen'.
    9.19 -ifeq ($(ARCH),xeno)
    9.20 -  ARCH := xen
    9.21 -endif
    9.22 -
    9.23 -KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
    9.24 -
    9.25 -CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
    9.26 -	  else if [ -x /bin/bash ]; then echo /bin/bash; \
    9.27 -	  else echo sh; fi ; fi)
    9.28 -TOPDIR	:= $(shell /bin/pwd)
    9.29 -
    9.30 -HPATH   	= $(TOPDIR)/include
    9.31 -FINDHPATH	= $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
    9.32 -
    9.33 -HOSTCC  	= gcc
    9.34 -HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
    9.35 -
    9.36 -CROSS_COMPILE 	=
    9.37 -
    9.38 -#
    9.39 -# Include the make variables (CC, etc...)
    9.40 -#
    9.41 -
    9.42 -AS		= $(CROSS_COMPILE)as
    9.43 -LD		= $(CROSS_COMPILE)ld
    9.44 -CC		= $(CROSS_COMPILE)gcc
    9.45 -CPP		= $(CC) -E
    9.46 -AR		= $(CROSS_COMPILE)ar
    9.47 -NM		= $(CROSS_COMPILE)nm
    9.48 -STRIP		= $(CROSS_COMPILE)strip
    9.49 -OBJCOPY		= $(CROSS_COMPILE)objcopy
    9.50 -OBJDUMP		= $(CROSS_COMPILE)objdump
    9.51 -MAKEFILES	= $(TOPDIR)/.config
    9.52 -GENKSYMS	= /sbin/genksyms
    9.53 -DEPMOD		= /sbin/depmod
    9.54 -MODFLAGS	= -DMODULE
    9.55 -CFLAGS_KERNEL	=
    9.56 -PERL		= perl
    9.57 -AWK		= awk
    9.58 -RPM 		:= $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
    9.59 -		    	else echo rpm; fi)
    9.60 -
    9.61 -export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
    9.62 -	CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
    9.63 -	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL AWK
    9.64 -
    9.65 -all:	do-it-all
    9.66 -
    9.67 -#
    9.68 -# Make "config" the default target if there is no configuration file or
    9.69 -# "depend" the target if there is no top-level dependency information.
    9.70 -#
    9.71 -
    9.72 -ifeq (.config,$(wildcard .config))
    9.73 -include .config
    9.74 -ifeq (.depend,$(wildcard .depend))
    9.75 -include .depend
    9.76 -do-it-all:	Version vmlinux
    9.77 -else
    9.78 -CONFIGURATION = depend
    9.79 -do-it-all:	depend
    9.80 -endif
    9.81 -else
    9.82 -CONFIGURATION = config
    9.83 -do-it-all:	config
    9.84 -endif
    9.85 -
    9.86 -#
    9.87 -# INSTALL_PATH specifies where to place the updated kernel and system map
    9.88 -# images.  Uncomment if you want to place them anywhere other than root.
    9.89 -#
    9.90 -
    9.91 -#export	INSTALL_PATH=/boot
    9.92 -
    9.93 -#
    9.94 -# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
    9.95 -# relocations required by build roots.  This is not defined in the
    9.96 -# makefile but the arguement can be passed to make if needed.
    9.97 -#
    9.98 -
    9.99 -MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
   9.100 -export MODLIB
   9.101 -
   9.102 -#
   9.103 -# standard CFLAGS
   9.104 -#
   9.105 -
   9.106 -CPPFLAGS := -D__KERNEL__ -I$(HPATH)
   9.107 -
   9.108 -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
   9.109 -	  -fno-strict-aliasing -fno-common
   9.110 -ifndef CONFIG_FRAME_POINTER
   9.111 -CFLAGS += -fomit-frame-pointer
   9.112 -endif
   9.113 -AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
   9.114 -
   9.115 -#
   9.116 -# ROOT_DEV specifies the default root-device when making the image.
   9.117 -# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
   9.118 -# the default of FLOPPY is used by 'build'.
   9.119 -# This is i386 specific.
   9.120 -#
   9.121 -
   9.122 -export ROOT_DEV = CURRENT
   9.123 -
   9.124 -#
   9.125 -# If you want to preset the SVGA mode, uncomment the next line and
   9.126 -# set SVGA_MODE to whatever number you want.
   9.127 -# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
   9.128 -# The number is the same as you would ordinarily press at bootup.
   9.129 -# This is i386 specific.
   9.130 -#
   9.131 -
   9.132 -export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
   9.133 -
   9.134 -#
   9.135 -# If you want the RAM disk device, define this to be the size in blocks.
   9.136 -# This is i386 specific.
   9.137 -#
   9.138 -
   9.139 -#export RAMDISK = -DRAMDISK=512
   9.140 -
   9.141 -CORE_FILES	=kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
   9.142 -NETWORKS	=net/network.o
   9.143 -
   9.144 -LIBS		=$(TOPDIR)/lib/lib.a
   9.145 -SUBDIRS		=kernel drivers mm fs net ipc lib crypto
   9.146 -
   9.147 -DRIVERS-n :=
   9.148 -DRIVERS-y :=
   9.149 -DRIVERS-m :=
   9.150 -DRIVERS-  :=
   9.151 -
   9.152 -DRIVERS-$(CONFIG_ACPI_BOOT) += drivers/acpi/acpi.o
   9.153 -DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o
   9.154 -DRIVERS-y += drivers/char/char.o \
   9.155 -	drivers/block/block.o \
   9.156 -	drivers/misc/misc.o \
   9.157 -	drivers/net/net.o
   9.158 -DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
   9.159 -DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o
   9.160 -DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o
   9.161 -DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
   9.162 -DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
   9.163 -DRIVERS-$(CONFIG_DEV_APPLETALK) += drivers/net/appletalk/appletalk.o
   9.164 -DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.o
   9.165 -DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.o
   9.166 -DRIVERS-$(CONFIG_ARCNET) += drivers/net/arcnet/arcnetdrv.o
   9.167 -DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
   9.168 -DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
   9.169 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
   9.170 -DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
   9.171 -DRIVERS-$(CONFIG_FUSION_BOOT) += drivers/message/fusion/fusion.o
   9.172 -DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
   9.173 -
   9.174 -ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
   9.175 -DRIVERS-y += drivers/cdrom/driver.o
   9.176 -endif
   9.177 -
   9.178 -DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o
   9.179 -DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o
   9.180 -DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
   9.181 -DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
   9.182 -DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o
   9.183 -DRIVERS-$(CONFIG_NET_WIRELESS) += drivers/net/wireless/wireless_net.o
   9.184 -DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o
   9.185 -DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
   9.186 -DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
   9.187 -DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
   9.188 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
   9.189 -DRIVERS-$(CONFIG_PPC32) += drivers/macintosh/macintosh.o
   9.190 -DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
   9.191 -DRIVERS-$(CONFIG_ISAPNP) += drivers/pnp/pnp.o
   9.192 -DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
   9.193 -DRIVERS-$(CONFIG_VT) += drivers/video/video.o
   9.194 -DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
   9.195 -DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
   9.196 -DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
   9.197 -DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
   9.198 -DRIVERS-$(CONFIG_USB_GADGET) += drivers/usb/gadget/built-in.o
   9.199 -DRIVERS-y +=drivers/media/media.o
   9.200 -DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
   9.201 -DRIVERS-$(CONFIG_HIL) += drivers/hil/hil.o
   9.202 -DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o
   9.203 -DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
   9.204 -DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
   9.205 -DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
   9.206 -DRIVERS-$(CONFIG_GSC) += drivers/gsc/gscbus.o
   9.207 -DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
   9.208 -DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o
   9.209 -DRIVERS-$(CONFIG_ISDN_BOOL) += drivers/isdn/vmlinux-obj.o
   9.210 -DRIVERS-$(CONFIG_CRYPTO) += crypto/crypto.o
   9.211 -
   9.212 -DRIVERS := $(DRIVERS-y)
   9.213 -
   9.214 -
   9.215 -# files removed with 'make clean'
   9.216 -CLEAN_FILES = \
   9.217 -	kernel/ksyms.lst include/linux/compile.h \
   9.218 -	vmlinux System.map \
   9.219 -	.tmp* \
   9.220 -	drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
   9.221 -	drivers/char/conmakehash \
   9.222 -	drivers/char/drm/*-mod.c \
   9.223 -	drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
   9.224 -	drivers/zorro/devlist.h drivers/zorro/gen-devlist \
   9.225 -	drivers/sound/bin2hex drivers/sound/hex2hex \
   9.226 -	drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
   9.227 -	drivers/scsi/aic7xxx/aicasm/aicasm \
   9.228 -	drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
   9.229 -	drivers/scsi/aic7xxx/aicasm/aicasm_gram.h \
   9.230 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.c \
   9.231 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.h \
   9.232 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.c \
   9.233 -	drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
   9.234 -	drivers/scsi/aic7xxx/aicasm/aicdb.h \
   9.235 -	drivers/scsi/aic7xxx/aicasm/y.tab.h \
   9.236 -	drivers/scsi/53c700_d.h \
   9.237 -	drivers/tc/lk201-map.c \
   9.238 -	net/khttpd/make_times_h \
   9.239 -	net/khttpd/times.h \
   9.240 -	submenu* \
   9.241 -	drivers/ieee1394/oui.c
   9.242 -# directories removed with 'make clean'
   9.243 -CLEAN_DIRS = \
   9.244 -	modules
   9.245 -
   9.246 -# files removed with 'make mrproper'
   9.247 -MRPROPER_FILES = \
   9.248 -	include/linux/autoconf.h include/linux/version.h \
   9.249 -	lib/crc32table.h lib/gen_crc32table \
   9.250 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
   9.251 -	drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
   9.252 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
   9.253 -	drivers/net/hamradio/soundmodem/gentbl \
   9.254 -	drivers/sound/*_boot.h drivers/sound/.*.boot \
   9.255 -	drivers/sound/msndinit.c \
   9.256 -	drivers/sound/msndperm.c \
   9.257 -	drivers/sound/pndsperm.c \
   9.258 -	drivers/sound/pndspini.c \
   9.259 -	drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
   9.260 -	.version .config* config.in config.old \
   9.261 -	scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
   9.262 -	scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
   9.263 -	.menuconfig.log \
   9.264 -	include/asm \
   9.265 -	.hdepend scripts/mkdep scripts/split-include scripts/docproc \
   9.266 -	$(TOPDIR)/include/linux/modversions.h \
   9.267 -	kernel.spec
   9.268 -
   9.269 -# directories removed with 'make mrproper'
   9.270 -MRPROPER_DIRS = \
   9.271 -	include/config \
   9.272 -	$(TOPDIR)/include/linux/modules
   9.273 -
   9.274 -
   9.275 -include arch/$(ARCH)/Makefile
   9.276 -
   9.277 -# Extra cflags for kbuild 2.4.  The default is to forbid includes by kernel code
   9.278 -# from user space headers.  Some UML code requires user space headers, in the
   9.279 -# UML Makefiles add 'kbuild_2_4_nostdinc :=' before include Rules.make.  No
   9.280 -# other kernel code should include user space headers, if you need
   9.281 -# 'kbuild_2_4_nostdinc :=' or -I/usr/include for kernel code and you are not UML
   9.282 -# then your code is broken!  KAO.
   9.283 -
   9.284 -kbuild_2_4_nostdinc	:= -nostdinc -iwithprefix include
   9.285 -export kbuild_2_4_nostdinc
   9.286 -
   9.287 -export	CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
   9.288 -
   9.289 -export	NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
   9.290 -
   9.291 -.S.s:
   9.292 -	$(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $<
   9.293 -.S.o:
   9.294 -	$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
   9.295 -
   9.296 -Version: dummy
   9.297 -	@rm -f include/linux/compile.h
   9.298 -
   9.299 -boot: vmlinux
   9.300 -	@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
   9.301 -
   9.302 -vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs
   9.303 -	$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \
   9.304 -		--start-group \
   9.305 -		$(CORE_FILES) \
   9.306 -		$(DRIVERS) \
   9.307 -		$(NETWORKS) \
   9.308 -		$(LIBS) \
   9.309 -		--end-group \
   9.310 -		-o vmlinux
   9.311 -	$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
   9.312 -
   9.313 -symlinks:
   9.314 -	rm -f include/asm
   9.315 -	( cd include ; ln -sf asm-$(ARCH) asm)
   9.316 -	@if [ ! -d include/linux/modules ]; then \
   9.317 -		mkdir include/linux/modules; \
   9.318 -	fi
   9.319 -
   9.320 -oldconfig: symlinks
   9.321 -	$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
   9.322 -
   9.323 -xconfig: symlinks
   9.324 -	$(MAKE) -C scripts kconfig.tk
   9.325 -	wish -f scripts/kconfig.tk
   9.326 -
   9.327 -menuconfig: include/linux/version.h symlinks
   9.328 -	$(MAKE) -C scripts/lxdialog all
   9.329 -	$(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
   9.330 -
   9.331 -config: symlinks
   9.332 -	$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
   9.333 -
   9.334 -include/config/MARKER: scripts/split-include include/linux/autoconf.h
   9.335 -	scripts/split-include include/linux/autoconf.h include/config
   9.336 -	@ touch include/config/MARKER
   9.337 -
   9.338 -linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
   9.339 -
   9.340 -$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
   9.341 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
   9.342 -
   9.343 -$(TOPDIR)/include/linux/version.h: include/linux/version.h
   9.344 -$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
   9.345 -
   9.346 -newversion:
   9.347 -	. scripts/mkversion > .tmpversion
   9.348 -	@mv -f .tmpversion .version
   9.349 -
   9.350 -uts_len		:= 64
   9.351 -uts_truncate	:= sed -e 's/\(.\{1,$(uts_len)\}\).*/\1/'
   9.352 -
   9.353 -include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
   9.354 -	@echo -n \#`cat .version` > .ver1
   9.355 -	@if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver1; fi
   9.356 -	@if [ -f .name ]; then  echo -n \-`cat .name` >> .ver1; fi
   9.357 -	@LANG=C echo ' '`date` >> .ver1
   9.358 -	@echo \#define UTS_VERSION \"`cat .ver1 | $(uts_truncate)`\" > .ver
   9.359 -	@LANG=C echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
   9.360 -	@echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
   9.361 -	@echo \#define LINUX_COMPILE_HOST \"`hostname | $(uts_truncate)`\" >> .ver
   9.362 -	@([ -x /bin/dnsdomainname ] && /bin/dnsdomainname > .ver1) || \
   9.363 -	 ([ -x /bin/domainname ] && /bin/domainname > .ver1) || \
   9.364 -	 echo > .ver1
   9.365 -	@echo \#define LINUX_COMPILE_DOMAIN \"`cat .ver1 | $(uts_truncate)`\" >> .ver
   9.366 -	@echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> .ver
   9.367 -	@mv -f .ver $@
   9.368 -	@rm -f .ver1
   9.369 -
   9.370 -include/linux/version.h: ./Makefile
   9.371 -	@expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
   9.372 -	  (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
   9.373 -	@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
   9.374 -	@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
   9.375 -	@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
   9.376 -	@mv -f .ver $@
   9.377 -
   9.378 -comma	:= ,
   9.379 -
   9.380 -init/version.o: init/version.c include/linux/compile.h include/config/MARKER
   9.381 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(SUBARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
   9.382 -
   9.383 -init/main.o: init/main.c include/config/MARKER
   9.384 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
   9.385 -
   9.386 -init/do_mounts.o: init/do_mounts.c include/config/MARKER
   9.387 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
   9.388 -
   9.389 -fs lib mm ipc kernel drivers net: dummy
   9.390 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
   9.391 -
   9.392 -TAGS: dummy
   9.393 -	{ find include/asm-${ARCH} -name '*.h' -print ; \
   9.394 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
   9.395 -	find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | grep -v '\.svn' | etags -
   9.396 -
   9.397 -# Exuberant ctags works better with -I
   9.398 -tags: dummy
   9.399 -	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
   9.400 -	ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
   9.401 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
   9.402 -	find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
   9.403 -
   9.404 -ifdef CONFIG_MODULES
   9.405 -ifdef CONFIG_MODVERSIONS
   9.406 -MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
   9.407 -endif
   9.408 -
   9.409 -.PHONY: modules
   9.410 -modules: $(patsubst %, _mod_%, $(SUBDIRS))
   9.411 -
   9.412 -.PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
   9.413 -$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
   9.414 -	$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
   9.415 -
   9.416 -.PHONY: modules_install
   9.417 -modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
   9.418 -
   9.419 -.PHONY: _modinst_
   9.420 -_modinst_:
   9.421 -	@rm -rf $(MODLIB)/kernel
   9.422 -	@rm -f $(MODLIB)/build
   9.423 -	@mkdir -p $(MODLIB)/kernel
   9.424 -	@ln -s $(TOPDIR) $(MODLIB)/build
   9.425 -
   9.426 -# If System.map exists, run depmod.  This deliberately does not have a
   9.427 -# dependency on System.map since that would run the dependency tree on
   9.428 -# vmlinux.  This depmod is only for convenience to give the initial
   9.429 -# boot a modules.dep even before / is mounted read-write.  However the
   9.430 -# boot script depmod is the master version.
   9.431 -ifeq "$(strip $(INSTALL_MOD_PATH))" ""
   9.432 -depmod_opts	:=
   9.433 -else
   9.434 -depmod_opts	:= -b $(INSTALL_MOD_PATH) -r
   9.435 -endif
   9.436 -.PHONY: _modinst_post
   9.437 -_modinst_post: _modinst_post_pcmcia
   9.438 -	if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
   9.439 -
   9.440 -# Backwards compatibilty symlinks for people still using old versions
   9.441 -# of pcmcia-cs with hard coded pathnames on insmod.  Remove
   9.442 -# _modinst_post_pcmcia for kernel 2.4.1.
   9.443 -.PHONY: _modinst_post_pcmcia
   9.444 -_modinst_post_pcmcia:
   9.445 -	cd $(MODLIB); \
   9.446 -	mkdir -p pcmcia; \
   9.447 -	find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
   9.448 -
   9.449 -.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
   9.450 -$(patsubst %, _modinst_%, $(SUBDIRS)) :
   9.451 -	$(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
   9.452 -
   9.453 -# modules disabled....
   9.454 -
   9.455 -else
   9.456 -modules modules_install: dummy
   9.457 -	@echo
   9.458 -	@echo "The present kernel configuration has modules disabled."
   9.459 -	@echo "Type 'make config' and enable loadable module support."
   9.460 -	@echo "Then build a kernel with module support enabled."
   9.461 -	@echo
   9.462 -	@exit 1
   9.463 -endif
   9.464 -
   9.465 -clean:	archclean
   9.466 -	find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
   9.467 -		| grep -v lxdialog/ | xargs rm -f
   9.468 -	rm -f $(CLEAN_FILES)
   9.469 -	rm -rf $(CLEAN_DIRS)
   9.470 -	$(MAKE) -C Documentation/DocBook clean
   9.471 -
   9.472 -mrproper: clean archmrproper
   9.473 -	find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
   9.474 -	rm -f $(MRPROPER_FILES)
   9.475 -	rm -rf $(MRPROPER_DIRS)
   9.476 -	$(MAKE) -C Documentation/DocBook mrproper
   9.477 -
   9.478 -distclean: mrproper
   9.479 -	rm -f core `find . \( -not -type d \) -and \
   9.480 -		\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
   9.481 -		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
   9.482 -		-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
   9.483 -
   9.484 -backup: mrproper
   9.485 -	cd .. && tar cf - linux/ | gzip -9 > backup.gz
   9.486 -	sync
   9.487 -
   9.488 -sgmldocs: 
   9.489 -	chmod 755 $(TOPDIR)/scripts/docgen
   9.490 -	chmod 755 $(TOPDIR)/scripts/gen-all-syms
   9.491 -	chmod 755 $(TOPDIR)/scripts/kernel-doc
   9.492 -	$(MAKE) -C $(TOPDIR)/Documentation/DocBook books
   9.493 -
   9.494 -psdocs: sgmldocs
   9.495 -	$(MAKE) -C Documentation/DocBook ps
   9.496 -
   9.497 -pdfdocs: sgmldocs
   9.498 -	$(MAKE) -C Documentation/DocBook pdf
   9.499 -
   9.500 -htmldocs: sgmldocs
   9.501 -	$(MAKE) -C Documentation/DocBook html
   9.502 -
   9.503 -mandocs:
   9.504 -	chmod 755 $(TOPDIR)/scripts/kernel-doc
   9.505 -	chmod 755 $(TOPDIR)/scripts/split-man
   9.506 -	$(MAKE) -C Documentation/DocBook man
   9.507 -
   9.508 -sums:
   9.509 -	find . -type f -print | sort | xargs sum > .SUMS
   9.510 -
   9.511 -dep-files: scripts/mkdep archdep include/linux/version.h
   9.512 -	rm -f .depend .hdepend
   9.513 -	$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
   9.514 -ifdef CONFIG_MODVERSIONS
   9.515 -	$(MAKE) update-modverfile
   9.516 -endif
   9.517 -	scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
   9.518 -	scripts/mkdep -- init/*.c > .depend
   9.519 -
   9.520 -ifdef CONFIG_MODVERSIONS
   9.521 -MODVERFILE := $(TOPDIR)/include/linux/modversions.h
   9.522 -else
   9.523 -MODVERFILE :=
   9.524 -endif
   9.525 -export	MODVERFILE
   9.526 -
   9.527 -depend dep: dep-files
   9.528 -
   9.529 -checkconfig:
   9.530 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
   9.531 -
   9.532 -checkhelp:
   9.533 -	find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
   9.534 -
   9.535 -checkincludes:
   9.536 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
   9.537 -
   9.538 -ifdef CONFIGURATION
   9.539 -..$(CONFIGURATION):
   9.540 -	@echo
   9.541 -	@echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
   9.542 -	@echo
   9.543 -	$(MAKE) $(CONFIGURATION)
   9.544 -	@echo
   9.545 -	@echo "Successful. Try re-making (ignore the error that follows)"
   9.546 -	@echo
   9.547 -	exit 1
   9.548 -
   9.549 -#dummy: ..$(CONFIGURATION)
   9.550 -dummy:
   9.551 -
   9.552 -else
   9.553 -
   9.554 -dummy:
   9.555 -
   9.556 -endif
   9.557 -
   9.558 -include Rules.make
   9.559 -
   9.560 -#
   9.561 -# This generates dependencies for the .h files.
   9.562 -#
   9.563 -
   9.564 -scripts/mkdep: scripts/mkdep.c
   9.565 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
   9.566 -
   9.567 -scripts/split-include: scripts/split-include.c
   9.568 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
   9.569 -
   9.570 -#
   9.571 -# RPM target
   9.572 -#
   9.573 -#	If you do a make spec before packing the tarball you can rpm -ta it
   9.574 -#
   9.575 -spec:
   9.576 -	. scripts/mkspec >kernel.spec
   9.577 -
   9.578 -#
   9.579 -#	Build a tar ball, generate an rpm from it and pack the result
   9.580 -#	There arw two bits of magic here
   9.581 -#	1) The use of /. to avoid tar packing just the symlink
   9.582 -#	2) Removing the .dep files as they have source paths in them that
   9.583 -#	   will become invalid
   9.584 -#
   9.585 -rpm:	clean spec
   9.586 -	find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
   9.587 -	set -e; \
   9.588 -	cd $(TOPDIR)/.. ; \
   9.589 -	ln -sf $(TOPDIR) $(KERNELPATH) ; \
   9.590 -	tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
   9.591 -	rm $(KERNELPATH) ; \
   9.592 -	cd $(TOPDIR) ; \
   9.593 -	. scripts/mkversion > .version ; \
   9.594 -	$(RPM) -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
   9.595 -	rm $(TOPDIR)/../$(KERNELPATH).tar.gz
    10.1 --- a/linux-2.4.30-xen-sparse/arch/xen/Makefile	Fri Jul 29 11:52:33 2005 -0700
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,139 +0,0 @@
    10.4 -#
    10.5 -# xen/Makefile
    10.6 -#
    10.7 -# This file is included by the global makefile so that you can add your own
    10.8 -# architecture-specific flags and dependencies. Remember to do have actions
    10.9 -# for "archclean" and "archdep" for cleaning up and making dependencies for
   10.10 -# this architecture
   10.11 -#
   10.12 -# This file is subject to the terms and conditions of the GNU General Public
   10.13 -# License.  See the file "COPYING" in the main directory of this archive
   10.14 -# for more details.
   10.15 -#
   10.16 -# Copyright (C) 1994 by Linus Torvalds
   10.17 -#
   10.18 -# 19990713  Artur Skawina <skawina@geocities.com>
   10.19 -#           Added '-march' and '-mpreferred-stack-boundary' support
   10.20 -#
   10.21 -
   10.22 -# If no .config file exists then use the appropriate defconfig-* file
   10.23 -ifneq (.config,$(wildcard .config))
   10.24 -DUMMYX:=$(shell cp $(TOPDIR)/arch/xen/defconfig$(EXTRAVERSION) $(TOPDIR)/.config)
   10.25 --include $(TOPDIR)/.config
   10.26 -endif
   10.27 -
   10.28 -LD=$(CROSS_COMPILE)ld -m elf_i386
   10.29 -OBJCOPY=$(CROSS_COMPILE)objcopy -R .note -R .comment -S
   10.30 -LDFLAGS=-e stext
   10.31 -LINKFLAGS =-T $(TOPDIR)/arch/xen/vmlinux.lds $(LDFLAGS)
   10.32 -
   10.33 -CFLAGS += -pipe
   10.34 -
   10.35 -check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
   10.36 -
   10.37 -# prevent gcc from keeping the stack 16 byte aligned
   10.38 -CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
   10.39 -
   10.40 -ifdef CONFIG_M686
   10.41 -CFLAGS += -march=i686
   10.42 -endif
   10.43 -
   10.44 -ifdef CONFIG_MPENTIUMIII
   10.45 -CFLAGS += -march=i686
   10.46 -endif
   10.47 -
   10.48 -ifdef CONFIG_MPENTIUM4
   10.49 -CFLAGS += -march=i686
   10.50 -endif
   10.51 -
   10.52 -ifdef CONFIG_MK7
   10.53 -CFLAGS += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
   10.54 -endif
   10.55 -
   10.56 -# Disable unit-at-a-time mode, it makes gcc use a lot more stack
   10.57 -# due to the lack of sharing of stacklots.
   10.58 -CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
   10.59 -
   10.60 -HEAD := arch/xen/kernel/head.o arch/xen/kernel/init_task.o
   10.61 -
   10.62 -SUBDIRS += arch/xen/kernel arch/xen/mm arch/xen/lib
   10.63 -SUBDIRS += arch/xen/drivers/console 
   10.64 -SUBDIRS += arch/xen/drivers/evtchn
   10.65 -SUBDIRS += arch/xen/drivers/blkif
   10.66 -SUBDIRS += arch/xen/drivers/netif
   10.67 -SUBDIRS += arch/xen/drivers/usbif
   10.68 -SUBDIRS += arch/xen/drivers/balloon
   10.69 -ifdef CONFIG_XEN_PRIVILEGED_GUEST
   10.70 -SUBDIRS += arch/xen/drivers/dom0 
   10.71 -endif
   10.72 -
   10.73 -CORE_FILES += arch/xen/kernel/kernel.o arch/xen/mm/mm.o
   10.74 -CORE_FILES += arch/xen/drivers/evtchn/drv.o
   10.75 -CORE_FILES += arch/xen/drivers/console/drv.o
   10.76 -DRIVERS += arch/xen/drivers/blkif/drv.o
   10.77 -DRIVERS += arch/xen/drivers/netif/drv.o
   10.78 -DRIVERS += arch/xen/drivers/usbif/drv.o
   10.79 -ifdef CONFIG_XEN_PRIVILEGED_GUEST
   10.80 -CORE_FILES += arch/xen/drivers/dom0/drv.o
   10.81 -endif
   10.82 -CORE_FILES += arch/xen/drivers/balloon/drv.o
   10.83 -LIBS := $(TOPDIR)/arch/xen/lib/lib.a $(LIBS) $(TOPDIR)/arch/xen/lib/lib.a
   10.84 -
   10.85 -arch/xen/kernel: dummy
   10.86 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/kernel
   10.87 -
   10.88 -arch/xen/mm: dummy
   10.89 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/mm
   10.90 -
   10.91 -arch/xen/drivers/console: dummy
   10.92 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/console
   10.93 -
   10.94 -arch/xen/drivers/network: dummy
   10.95 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/network
   10.96 -
   10.97 -arch/xen/drivers/block: dummy
   10.98 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/block
   10.99 -
  10.100 -arch/xen/drivers/dom0: dummy
  10.101 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/dom0
  10.102 -
  10.103 -arch/xen/drivers/balloon: dummy
  10.104 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/balloon
  10.105 -
  10.106 -MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
  10.107 -
  10.108 -vmlinux: arch/xen/vmlinux.lds
  10.109 -
  10.110 -FORCE: ;
  10.111 -
  10.112 -.PHONY: bzImage compressed clean archclean archmrproper archdep
  10.113 -
  10.114 -
  10.115 -bzImage: vmlinux
  10.116 -	@$(MAKEBOOT) bzImage
  10.117 -
  10.118 -INSTALL_NAME ?= $(KERNELRELEASE)
  10.119 -install: bzImage
  10.120 -	mkdir -p $(INSTALL_PATH)/boot
  10.121 -	ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
  10.122 -	rm -f $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  10.123 -	install -m0644 arch/$(ARCH)/boot/bzImage $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  10.124 -	install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  10.125 -	install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  10.126 -	install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  10.127 -	ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
  10.128 -
  10.129 -%_config: arch/xen/defconfig-%
  10.130 -	rm -f .config arch/xen/defconfig
  10.131 -	cp -f arch/xen/defconfig-$(@:_config=) arch/xen/defconfig
  10.132 -	cp -f arch/xen/defconfig-$(@:_config=) .config
  10.133 -
  10.134 -
  10.135 -archclean:
  10.136 -	@$(MAKEBOOT) clean
  10.137 -
  10.138 -archmrproper:
  10.139 -	rm -f include/asm-xen/xen-public/arch
  10.140 -
  10.141 -archdep:
  10.142 -	@$(MAKEBOOT) dep
    11.1 --- a/linux-2.4.30-xen-sparse/arch/xen/boot/Makefile	Fri Jul 29 11:52:33 2005 -0700
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,13 +0,0 @@
    11.4 -#
    11.5 -# arch/xen/boot/Makefile
    11.6 -#
    11.7 -
    11.8 -bzImage: $(TOPDIR)/vmlinux
    11.9 -	$(OBJCOPY) $< Image
   11.10 -	gzip -f -9 < Image > $@
   11.11 -	rm -f Image
   11.12 -
   11.13 -dep:
   11.14 -
   11.15 -clean:
   11.16 -	rm -f bzImage Image
    12.1 --- a/linux-2.4.30-xen-sparse/arch/xen/config.in	Fri Jul 29 11:52:33 2005 -0700
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,337 +0,0 @@
    12.4 -#
    12.5 -# For a description of the syntax of this configuration file,
    12.6 -# see Documentation/kbuild/config-language.txt.
    12.7 -#
    12.8 -mainmenu_name "Linux Kernel Configuration"
    12.9 -
   12.10 -define_bool CONFIG_XEN y
   12.11 -
   12.12 -define_bool CONFIG_X86 y
   12.13 -define_bool CONFIG_ISA y
   12.14 -define_bool CONFIG_SBUS n
   12.15 -
   12.16 -define_bool CONFIG_UID16 y
   12.17 -
   12.18 -mainmenu_option next_comment
   12.19 -comment 'Xen'
   12.20 -bool 'Support for privileged operations (domain 0)' CONFIG_XEN_PRIVILEGED_GUEST
   12.21 -bool 'Device-driver domain (physical device access)' CONFIG_XEN_PHYSDEV_ACCESS
   12.22 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   12.23 -    bool 'USB-device backend driver' CONFIG_XEN_USB_BACKEND
   12.24 -fi
   12.25 -bool 'Scrub memory before freeing it to Xen' CONFIG_XEN_SCRUB_PAGES
   12.26 -bool 'Network-device frontend driver' CONFIG_XEN_NETDEV_FRONTEND
   12.27 -bool 'Block-device frontend driver' CONFIG_XEN_BLKDEV_FRONTEND
   12.28 -bool 'Block-device uses grant tables' CONFIG_XEN_BLKDEV_GRANT
   12.29 -bool 'USB-device frontend driver' CONFIG_XEN_USB_FRONTEND
   12.30 -endmenu
   12.31 -# The IBM S/390 patch needs this.
   12.32 -define_bool CONFIG_NO_IDLE_HZ y
   12.33 -
   12.34 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   12.35 -   define_bool CONFIG_FOREIGN_PAGES y
   12.36 -else
   12.37 -   define_bool CONFIG_FOREIGN_PAGES n
   12.38 -   define_bool CONFIG_NETDEVICES y
   12.39 -   define_bool CONFIG_VT n
   12.40 -fi
   12.41 -
   12.42 -mainmenu_option next_comment
   12.43 -comment 'Code maturity level options'
   12.44 -bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
   12.45 -endmenu
   12.46 -
   12.47 -mainmenu_option next_comment
   12.48 -comment 'Loadable module support'
   12.49 -bool 'Enable loadable module support' CONFIG_MODULES
   12.50 -if [ "$CONFIG_MODULES" = "y" ]; then
   12.51 -   bool '  Set version information on all module symbols' CONFIG_MODVERSIONS
   12.52 -   bool '  Kernel module loader' CONFIG_KMOD
   12.53 -fi
   12.54 -endmenu
   12.55 -
   12.56 -mainmenu_option next_comment
   12.57 -comment 'Processor type and features'
   12.58 -choice 'Processor family' \
   12.59 -	"Pentium-Pro/Celeron/Pentium-II		CONFIG_M686 \
   12.60 -	 Pentium-III/Celeron(Coppermine)	CONFIG_MPENTIUMIII \
   12.61 -	 Pentium-4				CONFIG_MPENTIUM4 \
   12.62 -	 Athlon/Duron/K7			CONFIG_MK7 \
   12.63 -	 Opteron/Athlon64/Hammer/K8             CONFIG_MK8 \
   12.64 -	 VIA-C3-2                               CONFIG_MVIAC3_2" Pentium-Pro
   12.65 -
   12.66 -   define_bool CONFIG_X86_WP_WORKS_OK y
   12.67 -   define_bool CONFIG_X86_INVLPG y
   12.68 -   define_bool CONFIG_X86_CMPXCHG y
   12.69 -   define_bool CONFIG_X86_XADD y
   12.70 -   define_bool CONFIG_X86_BSWAP y
   12.71 -   define_bool CONFIG_X86_POPAD_OK y
   12.72 -   define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
   12.73 -   define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
   12.74 -
   12.75 -   define_bool CONFIG_X86_GOOD_APIC y
   12.76 -   define_bool CONFIG_X86_PGE y
   12.77 -   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
   12.78 -   define_bool CONFIG_X86_TSC y
   12.79 -
   12.80 -if [ "$CONFIG_M686" = "y" ]; then
   12.81 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   12.82 -fi
   12.83 -if [ "$CONFIG_MPENTIUMIII" = "y" ]; then
   12.84 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   12.85 -fi
   12.86 -if [ "$CONFIG_MPENTIUM4" = "y" ]; then
   12.87 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 7
   12.88 -fi
   12.89 -if [ "$CONFIG_MK8" = "y" ]; then
   12.90 -   define_bool CONFIG_MK7 y
   12.91 -fi
   12.92 -if [ "$CONFIG_MK7" = "y" ]; then
   12.93 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 6
   12.94 -   define_bool CONFIG_X86_USE_3DNOW y
   12.95 -fi
   12.96 -if [ "$CONFIG_MVIAC3_2" = "y" ]; then
   12.97 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   12.98 -fi
   12.99 -
  12.100 -#if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  12.101 -#   tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD
  12.102 -#fi
  12.103 -
  12.104 -choice 'High Memory Support' \
  12.105 -	"off    CONFIG_NOHIGHMEM \
  12.106 -	 4GB    CONFIG_HIGHMEM4G" off
  12.107 -#	 64GB   CONFIG_HIGHMEM64G" off
  12.108 -if [ "$CONFIG_HIGHMEM4G" = "y" ]; then
  12.109 -   define_bool CONFIG_HIGHMEM y
  12.110 -fi
  12.111 -if [ "$CONFIG_HIGHMEM64G" = "y" ]; then
  12.112 -   define_bool CONFIG_HIGHMEM y
  12.113 -   define_bool CONFIG_X86_PAE y
  12.114 -fi
  12.115 -
  12.116 -if [ "$CONFIG_HIGHMEM" = "y" ]; then
  12.117 -   bool 'HIGHMEM I/O support' CONFIG_HIGHIO
  12.118 -fi
  12.119 -
  12.120 -define_int CONFIG_FORCE_MAX_ZONEORDER 11
  12.121 -
  12.122 -#bool 'Symmetric multi-processing support' CONFIG_SMP
  12.123 -#if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then
  12.124 -#   define_bool CONFIG_HAVE_DEC_LOCK y
  12.125 -#fi
  12.126 -endmenu
  12.127 -
  12.128 -mainmenu_option next_comment
  12.129 -comment 'General setup'
  12.130 -
  12.131 -bool 'Networking support' CONFIG_NET
  12.132 -
  12.133 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  12.134 -   bool 'PCI support' CONFIG_PCI
  12.135 -   source drivers/pci/Config.in
  12.136 -
  12.137 -   bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
  12.138 -
  12.139 -   if [ "$CONFIG_HOTPLUG" = "y" ] ; then
  12.140 -      source drivers/pcmcia/Config.in
  12.141 -      source drivers/hotplug/Config.in
  12.142 -   else
  12.143 -      define_bool CONFIG_PCMCIA n
  12.144 -      define_bool CONFIG_HOTPLUG_PCI n
  12.145 -   fi
  12.146 -fi
  12.147 -
  12.148 -bool 'System V IPC' CONFIG_SYSVIPC
  12.149 -bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
  12.150 -bool 'Sysctl support' CONFIG_SYSCTL
  12.151 -if [ "$CONFIG_PROC_FS" = "y" ]; then
  12.152 -   choice 'Kernel core (/proc/kcore) format' \
  12.153 -	"ELF		CONFIG_KCORE_ELF	\
  12.154 -	 A.OUT		CONFIG_KCORE_AOUT" ELF
  12.155 -fi
  12.156 -tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
  12.157 -bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
  12.158 -tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
  12.159 -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
  12.160 -
  12.161 -endmenu
  12.162 -
  12.163 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  12.164 -   source drivers/mtd/Config.in
  12.165 -
  12.166 -   source drivers/parport/Config.in
  12.167 -
  12.168 -   source drivers/pnp/Config.in
  12.169 -
  12.170 -   source drivers/block/Config.in
  12.171 -
  12.172 -   source drivers/md/Config.in
  12.173 -fi
  12.174 -
  12.175 -if [ "$CONFIG_NET" = "y" ]; then
  12.176 -   source net/Config.in
  12.177 -fi
  12.178 -
  12.179 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  12.180 -   mainmenu_option next_comment
  12.181 -   comment 'ATA/IDE/MFM/RLL support'
  12.182 -
  12.183 -   tristate 'ATA/IDE/MFM/RLL support' CONFIG_IDE
  12.184 -
  12.185 -   if [ "$CONFIG_IDE" != "n" ]; then
  12.186 -      source drivers/ide/Config.in
  12.187 -   else
  12.188 -      define_bool CONFIG_BLK_DEV_HD n
  12.189 -   fi
  12.190 -   endmenu
  12.191 -fi
  12.192 -
  12.193 -mainmenu_option next_comment
  12.194 -comment 'SCSI support'
  12.195 -
  12.196 -tristate 'SCSI support' CONFIG_SCSI
  12.197 -
  12.198 -if [ "$CONFIG_SCSI" != "n" ]; then
  12.199 -   source drivers/scsi/Config.in
  12.200 -fi
  12.201 -endmenu
  12.202 -
  12.203 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  12.204 -   source drivers/message/fusion/Config.in
  12.205 -
  12.206 -   source drivers/ieee1394/Config.in
  12.207 -
  12.208 -   source drivers/message/i2o/Config.in
  12.209 -
  12.210 -   if [ "$CONFIG_NET" = "y" ]; then
  12.211 -      mainmenu_option next_comment
  12.212 -      comment 'Network device support'
  12.213 -
  12.214 -      bool 'Network device support' CONFIG_NETDEVICES
  12.215 -      if [ "$CONFIG_NETDEVICES" = "y" ]; then
  12.216 -         source drivers/net/Config.in
  12.217 -         if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
  12.218 -            source drivers/atm/Config.in
  12.219 -         fi
  12.220 -      fi
  12.221 -      endmenu
  12.222 -   fi
  12.223 -
  12.224 -   source net/ax25/Config.in
  12.225 -
  12.226 -   source net/irda/Config.in
  12.227 -
  12.228 -   mainmenu_option next_comment
  12.229 -   comment 'ISDN subsystem'
  12.230 -   if [ "$CONFIG_NET" != "n" ]; then
  12.231 -      tristate 'ISDN support' CONFIG_ISDN
  12.232 -      if [ "$CONFIG_ISDN" != "n" ]; then
  12.233 -         source drivers/isdn/Config.in
  12.234 -      fi
  12.235 -   fi
  12.236 -   endmenu
  12.237 -
  12.238 -   if [ "$CONFIG_ISA" = "y" ]; then
  12.239 -       mainmenu_option next_comment
  12.240 -       comment 'Old CD-ROM drivers (not SCSI, not IDE)'
  12.241 -   
  12.242 -       bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
  12.243 -       if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
  12.244 -          source drivers/cdrom/Config.in
  12.245 -       fi
  12.246 -       endmenu
  12.247 -   fi
  12.248 -
  12.249 -   #
  12.250 -   # input before char - char/joystick depends on it. As does USB.
  12.251 -   #
  12.252 -   source drivers/input/Config.in
  12.253 -else
  12.254 -   #
  12.255 -   # Block device driver configuration
  12.256 -   #
  12.257 -   mainmenu_option next_comment
  12.258 -   comment 'Block devices'
  12.259 -   tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
  12.260 -   dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
  12.261 -   tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
  12.262 -   if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
  12.263 -      int '  Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
  12.264 -   fi
  12.265 -   dep_bool '  Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
  12.266 -   bool 'Per partition statistics in /proc/partitions' CONFIG_BLK_STATS
  12.267 -   define_bool CONFIG_BLK_DEV_HD n
  12.268 -   endmenu
  12.269 -fi
  12.270 -
  12.271 -source drivers/char/Config.in
  12.272 -
  12.273 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" -o "$CONFIG_XEN_USB_FRONTEND" = "y" ]; then
  12.274 -   source drivers/media/Config.in
  12.275 -fi
  12.276 -
  12.277 -source fs/Config.in
  12.278 -
  12.279 -mainmenu_option next_comment
  12.280 -comment 'Console drivers'
  12.281 -
  12.282 -define_bool CONFIG_XEN_CONSOLE y
  12.283 -
  12.284 -if [ "$CONFIG_VT" = "y" ]; then
  12.285 -   bool 'VGA text console' CONFIG_VGA_CONSOLE
  12.286 -   bool 'Dummy console' CONFIG_DUMMY_CONSOLE 
  12.287 -   if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  12.288 -      bool 'Video mode selection support' CONFIG_VIDEO_SELECT
  12.289 -      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  12.290 -         tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
  12.291 -         source drivers/video/Config.in
  12.292 -      fi
  12.293 -   fi
  12.294 -fi
  12.295 -endmenu
  12.296 -
  12.297 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  12.298 -   mainmenu_option next_comment
  12.299 -   comment 'Sound'
  12.300 -
  12.301 -   tristate 'Sound card support' CONFIG_SOUND
  12.302 -   if [ "$CONFIG_SOUND" != "n" ]; then
  12.303 -      source drivers/sound/Config.in
  12.304 -   fi
  12.305 -   endmenu
  12.306 -fi
  12.307 -
  12.308 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" -o "$CONFIG_XEN_USB_FRONTEND" = "y" ]; then
  12.309 -   if [ "$CONFIG_XEN_USB_FRONTEND" = "y" -o "$CONFIG_XEN_USB_BACKEND" = "y" ]; then
  12.310 -       define_bool CONFIG_USB y
  12.311 -   fi
  12.312 -   source drivers/usb/Config.in
  12.313 -fi
  12.314 -
  12.315 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  12.316 -   source net/bluetooth/Config.in
  12.317 -fi
  12.318 -
  12.319 -mainmenu_option next_comment
  12.320 -comment 'Kernel hacking'
  12.321 -
  12.322 -bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
  12.323 -if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
  12.324 -   bool '  Check for stack overflows' CONFIG_DEBUG_STACKOVERFLOW
  12.325 -   bool '  Debug high memory support' CONFIG_DEBUG_HIGHMEM
  12.326 -   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
  12.327 -   bool '  Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT
  12.328 -   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
  12.329 -   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
  12.330 -   bool '  Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE
  12.331 -   bool '  Load all symbols for debugging' CONFIG_KALLSYMS
  12.332 -   bool '  Compile the kernel with frame pointers' CONFIG_FRAME_POINTER
  12.333 -fi
  12.334 -
  12.335 -int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0
  12.336 -
  12.337 -endmenu
  12.338 -
  12.339 -source crypto/Config.in
  12.340 -source lib/Config.in
    13.1 --- a/linux-2.4.30-xen-sparse/arch/xen/defconfig-xen0	Fri Jul 29 11:52:33 2005 -0700
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,927 +0,0 @@
    13.4 -#
    13.5 -# Automatically generated by make menuconfig: don't edit
    13.6 -#
    13.7 -CONFIG_XEN=y
    13.8 -CONFIG_X86=y
    13.9 -CONFIG_ISA=y
   13.10 -# CONFIG_SBUS is not set
   13.11 -CONFIG_UID16=y
   13.12 -
   13.13 -#
   13.14 -# Xen
   13.15 -#
   13.16 -CONFIG_XEN_PRIVILEGED_GUEST=y
   13.17 -CONFIG_XEN_PHYSDEV_ACCESS=y
   13.18 -# CONFIG_XEN_USB_BACKEND is not set
   13.19 -CONFIG_XEN_SCRUB_PAGES=y
   13.20 -CONFIG_XEN_NETDEV_FRONTEND=y
   13.21 -CONFIG_XEN_BLKDEV_FRONTEND=y
   13.22 -CONFIG_XEN_BLKDEV_GRANT=y
   13.23 -# CONFIG_XEN_USB_FRONTEND is not set
   13.24 -CONFIG_NO_IDLE_HZ=y
   13.25 -CONFIG_FOREIGN_PAGES=y
   13.26 -
   13.27 -#
   13.28 -# Code maturity level options
   13.29 -#
   13.30 -CONFIG_EXPERIMENTAL=y
   13.31 -
   13.32 -#
   13.33 -# Loadable module support
   13.34 -#
   13.35 -CONFIG_MODULES=y
   13.36 -CONFIG_MODVERSIONS=y
   13.37 -CONFIG_KMOD=y
   13.38 -
   13.39 -#
   13.40 -# Processor type and features
   13.41 -#
   13.42 -CONFIG_M686=y
   13.43 -# CONFIG_MPENTIUMIII is not set
   13.44 -# CONFIG_MPENTIUM4 is not set
   13.45 -# CONFIG_MK7 is not set
   13.46 -# CONFIG_MK8 is not set
   13.47 -# CONFIG_MVIAC3_2 is not set
   13.48 -CONFIG_X86_WP_WORKS_OK=y
   13.49 -CONFIG_X86_INVLPG=y
   13.50 -CONFIG_X86_CMPXCHG=y
   13.51 -CONFIG_X86_XADD=y
   13.52 -CONFIG_X86_BSWAP=y
   13.53 -CONFIG_X86_POPAD_OK=y
   13.54 -# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
   13.55 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   13.56 -CONFIG_X86_GOOD_APIC=y
   13.57 -CONFIG_X86_PGE=y
   13.58 -CONFIG_X86_USE_PPRO_CHECKSUM=y
   13.59 -CONFIG_X86_TSC=y
   13.60 -CONFIG_X86_L1_CACHE_SHIFT=5
   13.61 -CONFIG_NOHIGHMEM=y
   13.62 -# CONFIG_HIGHMEM4G is not set
   13.63 -CONFIG_FORCE_MAX_ZONEORDER=11
   13.64 -
   13.65 -#
   13.66 -# General setup
   13.67 -#
   13.68 -CONFIG_NET=y
   13.69 -CONFIG_PCI=y
   13.70 -CONFIG_PCI_NAMES=y
   13.71 -CONFIG_HOTPLUG=y
   13.72 -
   13.73 -#
   13.74 -# PCMCIA/CardBus support
   13.75 -#
   13.76 -# CONFIG_PCMCIA is not set
   13.77 -
   13.78 -#
   13.79 -# PCI Hotplug Support
   13.80 -#
   13.81 -# CONFIG_HOTPLUG_PCI is not set
   13.82 -# CONFIG_HOTPLUG_PCI_COMPAQ is not set
   13.83 -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
   13.84 -# CONFIG_HOTPLUG_PCI_SHPC is not set
   13.85 -# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
   13.86 -# CONFIG_HOTPLUG_PCI_PCIE is not set
   13.87 -# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
   13.88 -CONFIG_SYSVIPC=y
   13.89 -# CONFIG_BSD_PROCESS_ACCT is not set
   13.90 -CONFIG_SYSCTL=y
   13.91 -CONFIG_KCORE_ELF=y
   13.92 -# CONFIG_KCORE_AOUT is not set
   13.93 -CONFIG_BINFMT_AOUT=y
   13.94 -CONFIG_BINFMT_ELF=y
   13.95 -# CONFIG_BINFMT_MISC is not set
   13.96 -# CONFIG_OOM_KILLER is not set
   13.97 -
   13.98 -#
   13.99 -# Memory Technology Devices (MTD)
  13.100 -#
  13.101 -# CONFIG_MTD is not set
  13.102 -
  13.103 -#
  13.104 -# Parallel port support
  13.105 -#
  13.106 -# CONFIG_PARPORT is not set
  13.107 -
  13.108 -#
  13.109 -# Plug and Play configuration
  13.110 -#
  13.111 -CONFIG_PNP=y
  13.112 -# CONFIG_ISAPNP is not set
  13.113 -
  13.114 -#
  13.115 -# Block devices
  13.116 -#
  13.117 -# CONFIG_BLK_DEV_FD is not set
  13.118 -# CONFIG_BLK_DEV_XD is not set
  13.119 -# CONFIG_PARIDE is not set
  13.120 -# CONFIG_BLK_CPQ_DA is not set
  13.121 -# CONFIG_BLK_CPQ_CISS_DA is not set
  13.122 -# CONFIG_CISS_SCSI_TAPE is not set
  13.123 -# CONFIG_CISS_MONITOR_THREAD is not set
  13.124 -# CONFIG_BLK_DEV_DAC960 is not set
  13.125 -# CONFIG_BLK_DEV_UMEM is not set
  13.126 -# CONFIG_BLK_DEV_SX8 is not set
  13.127 -CONFIG_BLK_DEV_LOOP=y
  13.128 -CONFIG_BLK_DEV_NBD=y
  13.129 -CONFIG_BLK_DEV_RAM=y
  13.130 -CONFIG_BLK_DEV_RAM_SIZE=4096
  13.131 -CONFIG_BLK_DEV_INITRD=y
  13.132 -# CONFIG_BLK_STATS is not set
  13.133 -
  13.134 -#
  13.135 -# Multi-device support (RAID and LVM)
  13.136 -#
  13.137 -CONFIG_MD=y
  13.138 -CONFIG_BLK_DEV_MD=y
  13.139 -CONFIG_MD_LINEAR=y
  13.140 -# CONFIG_MD_RAID0 is not set
  13.141 -CONFIG_MD_RAID1=y
  13.142 -# CONFIG_MD_RAID5 is not set
  13.143 -# CONFIG_MD_MULTIPATH is not set
  13.144 -CONFIG_BLK_DEV_LVM=y
  13.145 -
  13.146 -#
  13.147 -# Networking options
  13.148 -#
  13.149 -CONFIG_PACKET=y
  13.150 -CONFIG_PACKET_MMAP=y
  13.151 -# CONFIG_NETLINK_DEV is not set
  13.152 -CONFIG_NETFILTER=y
  13.153 -# CONFIG_NETFILTER_DEBUG is not set
  13.154 -CONFIG_FILTER=y
  13.155 -CONFIG_UNIX=y
  13.156 -CONFIG_INET=y
  13.157 -# CONFIG_IP_MULTICAST is not set
  13.158 -# CONFIG_IP_ADVANCED_ROUTER is not set
  13.159 -CONFIG_IP_PNP=y
  13.160 -CONFIG_IP_PNP_DHCP=y
  13.161 -# CONFIG_IP_PNP_BOOTP is not set
  13.162 -# CONFIG_IP_PNP_RARP is not set
  13.163 -# CONFIG_NET_IPIP is not set
  13.164 -# CONFIG_NET_IPGRE is not set
  13.165 -# CONFIG_ARPD is not set
  13.166 -# CONFIG_INET_ECN is not set
  13.167 -# CONFIG_SYN_COOKIES is not set
  13.168 -
  13.169 -#
  13.170 -#   IP: Netfilter Configuration
  13.171 -#
  13.172 -CONFIG_IP_NF_CONNTRACK=m
  13.173 -CONFIG_IP_NF_FTP=m
  13.174 -# CONFIG_IP_NF_AMANDA is not set
  13.175 -CONFIG_IP_NF_TFTP=m
  13.176 -CONFIG_IP_NF_IRC=m
  13.177 -# CONFIG_IP_NF_QUEUE is not set
  13.178 -CONFIG_IP_NF_IPTABLES=y
  13.179 -# CONFIG_IP_NF_MATCH_LIMIT is not set
  13.180 -# CONFIG_IP_NF_MATCH_MAC is not set
  13.181 -# CONFIG_IP_NF_MATCH_PKTTYPE is not set
  13.182 -# CONFIG_IP_NF_MATCH_MARK is not set
  13.183 -# CONFIG_IP_NF_MATCH_MULTIPORT is not set
  13.184 -# CONFIG_IP_NF_MATCH_TOS is not set
  13.185 -# CONFIG_IP_NF_MATCH_RECENT is not set
  13.186 -# CONFIG_IP_NF_MATCH_ECN is not set
  13.187 -# CONFIG_IP_NF_MATCH_DSCP is not set
  13.188 -# CONFIG_IP_NF_MATCH_AH_ESP is not set
  13.189 -# CONFIG_IP_NF_MATCH_LENGTH is not set
  13.190 -# CONFIG_IP_NF_MATCH_TTL is not set
  13.191 -# CONFIG_IP_NF_MATCH_TCPMSS is not set
  13.192 -# CONFIG_IP_NF_MATCH_HELPER is not set
  13.193 -CONFIG_IP_NF_MATCH_STATE=m
  13.194 -CONFIG_IP_NF_MATCH_CONNTRACK=m
  13.195 -# CONFIG_IP_NF_MATCH_UNCLEAN is not set
  13.196 -# CONFIG_IP_NF_MATCH_OWNER is not set
  13.197 -CONFIG_IP_NF_MATCH_PHYSDEV=y
  13.198 -CONFIG_IP_NF_FILTER=y
  13.199 -CONFIG_IP_NF_TARGET_REJECT=y
  13.200 -# CONFIG_IP_NF_TARGET_MIRROR is not set
  13.201 -CONFIG_IP_NF_NAT=m
  13.202 -CONFIG_IP_NF_NAT_NEEDED=y
  13.203 -CONFIG_IP_NF_TARGET_MASQUERADE=m
  13.204 -CONFIG_IP_NF_TARGET_REDIRECT=m
  13.205 -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
  13.206 -CONFIG_IP_NF_NAT_IRC=m
  13.207 -CONFIG_IP_NF_NAT_FTP=m
  13.208 -CONFIG_IP_NF_NAT_TFTP=m
  13.209 -# CONFIG_IP_NF_MANGLE is not set
  13.210 -CONFIG_IP_NF_TARGET_LOG=y
  13.211 -CONFIG_IP_NF_TARGET_ULOG=y
  13.212 -# CONFIG_IP_NF_TARGET_TCPMSS is not set
  13.213 -# CONFIG_IP_NF_ARPTABLES is not set
  13.214 -
  13.215 -#
  13.216 -#   IP: Virtual Server Configuration
  13.217 -#
  13.218 -# CONFIG_IP_VS is not set
  13.219 -# CONFIG_IPV6 is not set
  13.220 -# CONFIG_KHTTPD is not set
  13.221 -
  13.222 -#
  13.223 -#    SCTP Configuration (EXPERIMENTAL)
  13.224 -#
  13.225 -# CONFIG_IP_SCTP is not set
  13.226 -# CONFIG_ATM is not set
  13.227 -CONFIG_VLAN_8021Q=y
  13.228 -# CONFIG_IPX is not set
  13.229 -# CONFIG_ATALK is not set
  13.230 -# CONFIG_DECNET is not set
  13.231 -CONFIG_BRIDGE=y
  13.232 -CONFIG_BRIDGE_NF_EBTABLES=m
  13.233 -CONFIG_BRIDGE_EBT_T_FILTER=m
  13.234 -CONFIG_BRIDGE_EBT_T_NAT=m
  13.235 -CONFIG_BRIDGE_EBT_BROUTE=m
  13.236 -CONFIG_BRIDGE_EBT_LOG=m
  13.237 -CONFIG_BRIDGE_EBT_IPF=m
  13.238 -CONFIG_BRIDGE_EBT_ARPF=m
  13.239 -CONFIG_BRIDGE_EBT_AMONG=m
  13.240 -CONFIG_BRIDGE_EBT_LIMIT=m
  13.241 -CONFIG_BRIDGE_EBT_VLANF=m
  13.242 -CONFIG_BRIDGE_EBT_802_3=m
  13.243 -CONFIG_BRIDGE_EBT_PKTTYPE=m
  13.244 -CONFIG_BRIDGE_EBT_STP=m
  13.245 -CONFIG_BRIDGE_EBT_MARKF=m
  13.246 -CONFIG_BRIDGE_EBT_ARPREPLY=m
  13.247 -CONFIG_BRIDGE_EBT_SNAT=m
  13.248 -CONFIG_BRIDGE_EBT_DNAT=m
  13.249 -CONFIG_BRIDGE_EBT_REDIRECT=m
  13.250 -CONFIG_BRIDGE_EBT_MARK_T=m
  13.251 -# CONFIG_X25 is not set
  13.252 -# CONFIG_LAPB is not set
  13.253 -# CONFIG_LLC is not set
  13.254 -# CONFIG_NET_DIVERT is not set
  13.255 -# CONFIG_ECONET is not set
  13.256 -# CONFIG_WAN_ROUTER is not set
  13.257 -# CONFIG_NET_FASTROUTE is not set
  13.258 -# CONFIG_NET_HW_FLOWCONTROL is not set
  13.259 -
  13.260 -#
  13.261 -# QoS and/or fair queueing
  13.262 -#
  13.263 -# CONFIG_NET_SCHED is not set
  13.264 -
  13.265 -#
  13.266 -# Network testing
  13.267 -#
  13.268 -# CONFIG_NET_PKTGEN is not set
  13.269 -
  13.270 -#
  13.271 -# ATA/IDE/MFM/RLL support
  13.272 -#
  13.273 -CONFIG_IDE=y
  13.274 -
  13.275 -#
  13.276 -# IDE, ATA and ATAPI Block devices
  13.277 -#
  13.278 -CONFIG_BLK_DEV_IDE=y
  13.279 -# CONFIG_BLK_DEV_HD_IDE is not set
  13.280 -# CONFIG_BLK_DEV_HD is not set
  13.281 -# CONFIG_BLK_DEV_IDE_SATA is not set
  13.282 -CONFIG_BLK_DEV_IDEDISK=y
  13.283 -CONFIG_IDEDISK_MULTI_MODE=y
  13.284 -CONFIG_IDEDISK_STROKE=y
  13.285 -# CONFIG_BLK_DEV_IDECS is not set
  13.286 -# CONFIG_BLK_DEV_DELKIN is not set
  13.287 -CONFIG_BLK_DEV_IDECD=y
  13.288 -CONFIG_BLK_DEV_IDETAPE=y
  13.289 -CONFIG_BLK_DEV_IDEFLOPPY=y
  13.290 -CONFIG_BLK_DEV_IDESCSI=y
  13.291 -CONFIG_IDE_TASK_IOCTL=y
  13.292 -CONFIG_BLK_DEV_CMD640=y
  13.293 -CONFIG_BLK_DEV_CMD640_ENHANCED=y
  13.294 -# CONFIG_BLK_DEV_ISAPNP is not set
  13.295 -CONFIG_BLK_DEV_IDEPCI=y
  13.296 -CONFIG_BLK_DEV_GENERIC=y
  13.297 -CONFIG_IDEPCI_SHARE_IRQ=y
  13.298 -CONFIG_BLK_DEV_IDEDMA_PCI=y
  13.299 -CONFIG_BLK_DEV_OFFBOARD=y
  13.300 -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
  13.301 -CONFIG_IDEDMA_PCI_AUTO=y
  13.302 -# CONFIG_IDEDMA_ONLYDISK is not set
  13.303 -CONFIG_BLK_DEV_IDEDMA=y
  13.304 -# CONFIG_IDEDMA_PCI_WIP is not set
  13.305 -CONFIG_BLK_DEV_ADMA100=y
  13.306 -CONFIG_BLK_DEV_AEC62XX=y
  13.307 -CONFIG_BLK_DEV_ALI15X3=y
  13.308 -CONFIG_WDC_ALI15X3=y
  13.309 -CONFIG_BLK_DEV_AMD74XX=y
  13.310 -CONFIG_AMD74XX_OVERRIDE=y
  13.311 -# CONFIG_BLK_DEV_ATIIXP is not set
  13.312 -CONFIG_BLK_DEV_CMD64X=y
  13.313 -CONFIG_BLK_DEV_TRIFLEX=y
  13.314 -CONFIG_BLK_DEV_CY82C693=y
  13.315 -CONFIG_BLK_DEV_CS5530=y
  13.316 -CONFIG_BLK_DEV_HPT34X=y
  13.317 -# CONFIG_HPT34X_AUTODMA is not set
  13.318 -CONFIG_BLK_DEV_HPT366=y
  13.319 -CONFIG_BLK_DEV_PIIX=y
  13.320 -CONFIG_BLK_DEV_NS87415=y
  13.321 -# CONFIG_BLK_DEV_OPTI621 is not set
  13.322 -CONFIG_BLK_DEV_PDC202XX_OLD=y
  13.323 -CONFIG_PDC202XX_BURST=y
  13.324 -CONFIG_BLK_DEV_PDC202XX_NEW=y
  13.325 -CONFIG_PDC202XX_FORCE=y
  13.326 -CONFIG_BLK_DEV_RZ1000=y
  13.327 -CONFIG_BLK_DEV_SC1200=y
  13.328 -CONFIG_BLK_DEV_SVWKS=y
  13.329 -CONFIG_BLK_DEV_SIIMAGE=y
  13.330 -CONFIG_BLK_DEV_SIS5513=y
  13.331 -CONFIG_BLK_DEV_SLC90E66=y
  13.332 -CONFIG_BLK_DEV_TRM290=y
  13.333 -CONFIG_BLK_DEV_VIA82CXXX=y
  13.334 -CONFIG_IDE_CHIPSETS=y
  13.335 -# CONFIG_BLK_DEV_4DRIVES is not set
  13.336 -# CONFIG_BLK_DEV_ALI14XX is not set
  13.337 -# CONFIG_BLK_DEV_DTC2278 is not set
  13.338 -# CONFIG_BLK_DEV_HT6560B is not set
  13.339 -# CONFIG_BLK_DEV_PDC4030 is not set
  13.340 -# CONFIG_BLK_DEV_QD65XX is not set
  13.341 -# CONFIG_BLK_DEV_UMC8672 is not set
  13.342 -CONFIG_IDEDMA_AUTO=y
  13.343 -# CONFIG_IDEDMA_IVB is not set
  13.344 -# CONFIG_DMA_NONPCI is not set
  13.345 -CONFIG_BLK_DEV_PDC202XX=y
  13.346 -# CONFIG_BLK_DEV_ATARAID is not set
  13.347 -# CONFIG_BLK_DEV_ATARAID_PDC is not set
  13.348 -# CONFIG_BLK_DEV_ATARAID_HPT is not set
  13.349 -# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
  13.350 -# CONFIG_BLK_DEV_ATARAID_SII is not set
  13.351 -
  13.352 -#
  13.353 -# SCSI support
  13.354 -#
  13.355 -CONFIG_SCSI=y
  13.356 -CONFIG_BLK_DEV_SD=y
  13.357 -CONFIG_SD_EXTRA_DEVS=40
  13.358 -# CONFIG_CHR_DEV_ST is not set
  13.359 -# CONFIG_CHR_DEV_OSST is not set
  13.360 -# CONFIG_BLK_DEV_SR is not set
  13.361 -CONFIG_CHR_DEV_SG=y
  13.362 -# CONFIG_SCSI_DEBUG_QUEUES is not set
  13.363 -# CONFIG_SCSI_MULTI_LUN is not set
  13.364 -# CONFIG_SCSI_CONSTANTS is not set
  13.365 -# CONFIG_SCSI_LOGGING is not set
  13.366 -
  13.367 -#
  13.368 -# SCSI low-level drivers
  13.369 -#
  13.370 -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
  13.371 -# CONFIG_SCSI_7000FASST is not set
  13.372 -# CONFIG_SCSI_ACARD is not set
  13.373 -# CONFIG_SCSI_AHA152X is not set
  13.374 -# CONFIG_SCSI_AHA1542 is not set
  13.375 -# CONFIG_SCSI_AHA1740 is not set
  13.376 -CONFIG_SCSI_AACRAID=y
  13.377 -CONFIG_SCSI_AIC7XXX=y
  13.378 -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
  13.379 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000
  13.380 -# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
  13.381 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
  13.382 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
  13.383 -CONFIG_AIC7XXX_DEBUG_MASK=0
  13.384 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
  13.385 -CONFIG_SCSI_AIC79XX=y
  13.386 -CONFIG_AIC79XX_CMDS_PER_DEVICE=32
  13.387 -CONFIG_AIC79XX_RESET_DELAY_MS=15000
  13.388 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
  13.389 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
  13.390 -# CONFIG_AIC79XX_DEBUG_ENABLE is not set
  13.391 -CONFIG_AIC79XX_DEBUG_MASK=0
  13.392 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
  13.393 -# CONFIG_SCSI_DPT_I2O is not set
  13.394 -# CONFIG_SCSI_ADVANSYS is not set
  13.395 -# CONFIG_SCSI_IN2000 is not set
  13.396 -# CONFIG_SCSI_AM53C974 is not set
  13.397 -CONFIG_SCSI_MEGARAID=y
  13.398 -# CONFIG_SCSI_MEGARAID2 is not set
  13.399 -CONFIG_SCSI_SATA=y
  13.400 -# CONFIG_SCSI_SATA_AHCI is not set
  13.401 -# CONFIG_SCSI_SATA_SVW is not set
  13.402 -CONFIG_SCSI_ATA_PIIX=y
  13.403 -# CONFIG_SCSI_SATA_NV is not set
  13.404 -# CONFIG_SCSI_SATA_QSTOR is not set
  13.405 -CONFIG_SCSI_SATA_PROMISE=y
  13.406 -CONFIG_SCSI_SATA_SX4=y
  13.407 -CONFIG_SCSI_SATA_SIL=y
  13.408 -CONFIG_SCSI_SATA_SIS=y
  13.409 -# CONFIG_SCSI_SATA_ULI is not set
  13.410 -CONFIG_SCSI_SATA_VIA=y
  13.411 -CONFIG_SCSI_SATA_VITESSE=y
  13.412 -CONFIG_SCSI_BUSLOGIC=y
  13.413 -# CONFIG_SCSI_OMIT_FLASHPOINT is not set
  13.414 -# CONFIG_SCSI_CPQFCTS is not set
  13.415 -# CONFIG_SCSI_DMX3191D is not set
  13.416 -# CONFIG_SCSI_DTC3280 is not set
  13.417 -# CONFIG_SCSI_EATA is not set
  13.418 -# CONFIG_SCSI_EATA_DMA is not set
  13.419 -# CONFIG_SCSI_EATA_PIO is not set
  13.420 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
  13.421 -# CONFIG_SCSI_GDTH is not set
  13.422 -# CONFIG_SCSI_GENERIC_NCR5380 is not set
  13.423 -# CONFIG_SCSI_IPS is not set
  13.424 -# CONFIG_SCSI_INITIO is not set
  13.425 -# CONFIG_SCSI_INIA100 is not set
  13.426 -# CONFIG_SCSI_NCR53C406A is not set
  13.427 -# CONFIG_SCSI_NCR53C7xx is not set
  13.428 -CONFIG_SCSI_SYM53C8XX_2=y
  13.429 -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
  13.430 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
  13.431 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
  13.432 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
  13.433 -# CONFIG_SCSI_PAS16 is not set
  13.434 -# CONFIG_SCSI_PCI2000 is not set
  13.435 -# CONFIG_SCSI_PCI2220I is not set
  13.436 -# CONFIG_SCSI_PSI240I is not set
  13.437 -# CONFIG_SCSI_QLOGIC_FAS is not set
  13.438 -# CONFIG_SCSI_QLOGIC_ISP is not set
  13.439 -# CONFIG_SCSI_QLOGIC_FC is not set
  13.440 -# CONFIG_SCSI_QLOGIC_1280 is not set
  13.441 -# CONFIG_SCSI_SEAGATE is not set
  13.442 -# CONFIG_SCSI_SIM710 is not set
  13.443 -# CONFIG_SCSI_SYM53C416 is not set
  13.444 -# CONFIG_SCSI_DC390T is not set
  13.445 -# CONFIG_SCSI_T128 is not set
  13.446 -# CONFIG_SCSI_U14_34F is not set
  13.447 -# CONFIG_SCSI_ULTRASTOR is not set
  13.448 -# CONFIG_SCSI_NSP32 is not set
  13.449 -# CONFIG_SCSI_DEBUG is not set
  13.450 -
  13.451 -#
  13.452 -# Fusion MPT device support
  13.453 -#
  13.454 -# CONFIG_FUSION is not set
  13.455 -# CONFIG_FUSION_BOOT is not set
  13.456 -# CONFIG_FUSION_ISENSE is not set
  13.457 -# CONFIG_FUSION_CTL is not set
  13.458 -# CONFIG_FUSION_LAN is not set
  13.459 -
  13.460 -#
  13.461 -# IEEE 1394 (FireWire) support (EXPERIMENTAL)
  13.462 -#
  13.463 -# CONFIG_IEEE1394 is not set
  13.464 -
  13.465 -#
  13.466 -# I2O device support
  13.467 -#
  13.468 -# CONFIG_I2O is not set
  13.469 -# CONFIG_I2O_PCI is not set
  13.470 -# CONFIG_I2O_BLOCK is not set
  13.471 -# CONFIG_I2O_LAN is not set
  13.472 -# CONFIG_I2O_SCSI is not set
  13.473 -# CONFIG_I2O_PROC is not set
  13.474 -
  13.475 -#
  13.476 -# Network device support
  13.477 -#
  13.478 -CONFIG_NETDEVICES=y
  13.479 -
  13.480 -#
  13.481 -# ARCnet devices
  13.482 -#
  13.483 -# CONFIG_ARCNET is not set
  13.484 -# CONFIG_DUMMY is not set
  13.485 -# CONFIG_BONDING is not set
  13.486 -# CONFIG_EQUALIZER is not set
  13.487 -# CONFIG_TUN is not set
  13.488 -# CONFIG_ETHERTAP is not set
  13.489 -
  13.490 -#
  13.491 -# Ethernet (10 or 100Mbit)
  13.492 -#
  13.493 -CONFIG_NET_ETHERNET=y
  13.494 -# CONFIG_SUNLANCE is not set
  13.495 -# CONFIG_HAPPYMEAL is not set
  13.496 -# CONFIG_SUNBMAC is not set
  13.497 -# CONFIG_SUNQE is not set
  13.498 -# CONFIG_SUNGEM is not set
  13.499 -CONFIG_NET_VENDOR_3COM=y
  13.500 -# CONFIG_EL1 is not set
  13.501 -# CONFIG_EL2 is not set
  13.502 -# CONFIG_ELPLUS is not set
  13.503 -# CONFIG_EL16 is not set
  13.504 -# CONFIG_EL3 is not set
  13.505 -# CONFIG_3C515 is not set
  13.506 -# CONFIG_ELMC is not set
  13.507 -# CONFIG_ELMC_II is not set
  13.508 -CONFIG_VORTEX=y
  13.509 -# CONFIG_TYPHOON is not set
  13.510 -# CONFIG_LANCE is not set
  13.511 -# CONFIG_NET_VENDOR_SMC is not set
  13.512 -# CONFIG_NET_VENDOR_RACAL is not set
  13.513 -# CONFIG_AT1700 is not set
  13.514 -# CONFIG_DEPCA is not set
  13.515 -# CONFIG_HP100 is not set
  13.516 -# CONFIG_NET_ISA is not set
  13.517 -CONFIG_NET_PCI=y
  13.518 -CONFIG_PCNET32=y
  13.519 -# CONFIG_AMD8111_ETH is not set
  13.520 -# CONFIG_ADAPTEC_STARFIRE is not set
  13.521 -# CONFIG_AC3200 is not set
  13.522 -# CONFIG_APRICOT is not set
  13.523 -# CONFIG_B44 is not set
  13.524 -# CONFIG_CS89x0 is not set
  13.525 -# CONFIG_TULIP is not set
  13.526 -# CONFIG_DE4X5 is not set
  13.527 -# CONFIG_DGRS is not set
  13.528 -# CONFIG_DM9102 is not set
  13.529 -# CONFIG_EEPRO100 is not set
  13.530 -# CONFIG_EEPRO100_PIO is not set
  13.531 -CONFIG_E100=y
  13.532 -# CONFIG_LNE390 is not set
  13.533 -# CONFIG_FEALNX is not set
  13.534 -# CONFIG_NATSEMI is not set
  13.535 -CONFIG_NE2K_PCI=y
  13.536 -# CONFIG_FORCEDETH is not set
  13.537 -# CONFIG_NE3210 is not set
  13.538 -# CONFIG_ES3210 is not set
  13.539 -# CONFIG_8139CP is not set
  13.540 -# CONFIG_8139TOO is not set
  13.541 -# CONFIG_8139TOO_PIO is not set
  13.542 -# CONFIG_8139TOO_TUNE_TWISTER is not set
  13.543 -# CONFIG_8139TOO_8129 is not set
  13.544 -# CONFIG_8139_OLD_RX_RESET is not set
  13.545 -# CONFIG_SIS900 is not set
  13.546 -# CONFIG_EPIC100 is not set
  13.547 -# CONFIG_SUNDANCE is not set
  13.548 -# CONFIG_SUNDANCE_MMIO is not set
  13.549 -# CONFIG_TLAN is not set
  13.550 -# CONFIG_VIA_RHINE is not set
  13.551 -# CONFIG_VIA_RHINE_MMIO is not set
  13.552 -# CONFIG_WINBOND_840 is not set
  13.553 -# CONFIG_NET_POCKET is not set
  13.554 -
  13.555 -#
  13.556 -# Ethernet (1000 Mbit)
  13.557 -#
  13.558 -# CONFIG_ACENIC is not set
  13.559 -# CONFIG_DL2K is not set
  13.560 -CONFIG_E1000=y
  13.561 -# CONFIG_E1000_NAPI is not set
  13.562 -# CONFIG_MYRI_SBUS is not set
  13.563 -# CONFIG_NS83820 is not set
  13.564 -# CONFIG_HAMACHI is not set
  13.565 -# CONFIG_YELLOWFIN is not set
  13.566 -# CONFIG_R8169 is not set
  13.567 -# CONFIG_SK98LIN is not set
  13.568 -CONFIG_TIGON3=y
  13.569 -# CONFIG_FDDI is not set
  13.570 -# CONFIG_HIPPI is not set
  13.571 -# CONFIG_PLIP is not set
  13.572 -# CONFIG_PPP is not set
  13.573 -# CONFIG_SLIP is not set
  13.574 -
  13.575 -#
  13.576 -# Wireless LAN (non-hamradio)
  13.577 -#
  13.578 -# CONFIG_NET_RADIO is not set
  13.579 -
  13.580 -#
  13.581 -# Token Ring devices
  13.582 -#
  13.583 -# CONFIG_TR is not set
  13.584 -# CONFIG_NET_FC is not set
  13.585 -# CONFIG_RCPCI is not set
  13.586 -# CONFIG_SHAPER is not set
  13.587 -
  13.588 -#
  13.589 -# Wan interfaces
  13.590 -#
  13.591 -# CONFIG_WAN is not set
  13.592 -
  13.593 -#
  13.594 -# Amateur Radio support
  13.595 -#
  13.596 -# CONFIG_HAMRADIO is not set
  13.597 -
  13.598 -#
  13.599 -# IrDA (infrared) support
  13.600 -#
  13.601 -# CONFIG_IRDA is not set
  13.602 -
  13.603 -#
  13.604 -# ISDN subsystem
  13.605 -#
  13.606 -# CONFIG_ISDN is not set
  13.607 -
  13.608 -#
  13.609 -# Old CD-ROM drivers (not SCSI, not IDE)
  13.610 -#
  13.611 -# CONFIG_CD_NO_IDESCSI is not set
  13.612 -
  13.613 -#
  13.614 -# Input core support
  13.615 -#
  13.616 -# CONFIG_INPUT is not set
  13.617 -# CONFIG_INPUT_KEYBDEV is not set
  13.618 -# CONFIG_INPUT_MOUSEDEV is not set
  13.619 -# CONFIG_INPUT_JOYDEV is not set
  13.620 -# CONFIG_INPUT_EVDEV is not set
  13.621 -# CONFIG_INPUT_UINPUT is not set
  13.622 -
  13.623 -#
  13.624 -# Character devices
  13.625 -#
  13.626 -CONFIG_VT=y
  13.627 -CONFIG_VT_CONSOLE=y
  13.628 -# CONFIG_SERIAL is not set
  13.629 -# CONFIG_SERIAL_EXTENDED is not set
  13.630 -# CONFIG_SERIAL_NONSTANDARD is not set
  13.631 -CONFIG_UNIX98_PTYS=y
  13.632 -CONFIG_UNIX98_PTY_COUNT=256
  13.633 -
  13.634 -#
  13.635 -# I2C support
  13.636 -#
  13.637 -# CONFIG_I2C is not set
  13.638 -
  13.639 -#
  13.640 -# Mice
  13.641 -#
  13.642 -# CONFIG_BUSMOUSE is not set
  13.643 -CONFIG_MOUSE=y
  13.644 -CONFIG_PSMOUSE=y
  13.645 -# CONFIG_82C710_MOUSE is not set
  13.646 -# CONFIG_PC110_PAD is not set
  13.647 -# CONFIG_MK712_MOUSE is not set
  13.648 -
  13.649 -#
  13.650 -# Joysticks
  13.651 -#
  13.652 -# CONFIG_INPUT_GAMEPORT is not set
  13.653 -# CONFIG_QIC02_TAPE is not set
  13.654 -# CONFIG_IPMI_HANDLER is not set
  13.655 -# CONFIG_IPMI_PANIC_EVENT is not set
  13.656 -# CONFIG_IPMI_DEVICE_INTERFACE is not set
  13.657 -# CONFIG_IPMI_KCS is not set
  13.658 -# CONFIG_IPMI_WATCHDOG is not set
  13.659 -
  13.660 -#
  13.661 -# Watchdog Cards
  13.662 -#
  13.663 -# CONFIG_WATCHDOG is not set
  13.664 -# CONFIG_SCx200 is not set
  13.665 -# CONFIG_SCx200_GPIO is not set
  13.666 -# CONFIG_AMD_RNG is not set
  13.667 -# CONFIG_INTEL_RNG is not set
  13.668 -# CONFIG_HW_RANDOM is not set
  13.669 -# CONFIG_AMD_PM768 is not set
  13.670 -# CONFIG_NVRAM is not set
  13.671 -# CONFIG_RTC is not set
  13.672 -# CONFIG_DTLK is not set
  13.673 -# CONFIG_R3964 is not set
  13.674 -# CONFIG_APPLICOM is not set
  13.675 -# CONFIG_SONYPI is not set
  13.676 -
  13.677 -#
  13.678 -# Ftape, the floppy tape device driver
  13.679 -#
  13.680 -# CONFIG_FTAPE is not set
  13.681 -# CONFIG_AGP is not set
  13.682 -
  13.683 -#
  13.684 -# Direct Rendering Manager (XFree86 DRI support)
  13.685 -#
  13.686 -# CONFIG_DRM is not set
  13.687 -# CONFIG_MWAVE is not set
  13.688 -# CONFIG_OBMOUSE is not set
  13.689 -
  13.690 -#
  13.691 -# Multimedia devices
  13.692 -#
  13.693 -# CONFIG_VIDEO_DEV is not set
  13.694 -
  13.695 -#
  13.696 -# File systems
  13.697 -#
  13.698 -# CONFIG_QUOTA is not set
  13.699 -# CONFIG_QFMT_V2 is not set
  13.700 -CONFIG_AUTOFS_FS=y
  13.701 -CONFIG_AUTOFS4_FS=y
  13.702 -# CONFIG_REISERFS_FS is not set
  13.703 -# CONFIG_REISERFS_CHECK is not set
  13.704 -# CONFIG_REISERFS_PROC_INFO is not set
  13.705 -# CONFIG_ADFS_FS is not set
  13.706 -# CONFIG_ADFS_FS_RW is not set
  13.707 -# CONFIG_AFFS_FS is not set
  13.708 -# CONFIG_HFS_FS is not set
  13.709 -# CONFIG_HFSPLUS_FS is not set
  13.710 -# CONFIG_BEFS_FS is not set
  13.711 -# CONFIG_BEFS_DEBUG is not set
  13.712 -# CONFIG_BFS_FS is not set
  13.713 -CONFIG_EXT3_FS=y
  13.714 -CONFIG_JBD=y
  13.715 -# CONFIG_JBD_DEBUG is not set
  13.716 -CONFIG_FAT_FS=y
  13.717 -CONFIG_MSDOS_FS=y
  13.718 -CONFIG_UMSDOS_FS=y
  13.719 -CONFIG_VFAT_FS=y
  13.720 -# CONFIG_EFS_FS is not set
  13.721 -# CONFIG_JFFS_FS is not set
  13.722 -# CONFIG_JFFS2_FS is not set
  13.723 -# CONFIG_CRAMFS is not set
  13.724 -CONFIG_TMPFS=y
  13.725 -CONFIG_RAMFS=y
  13.726 -CONFIG_ISO9660_FS=y
  13.727 -CONFIG_JOLIET=y
  13.728 -CONFIG_ZISOFS=y
  13.729 -# CONFIG_JFS_FS is not set
  13.730 -# CONFIG_JFS_DEBUG is not set
  13.731 -# CONFIG_JFS_STATISTICS is not set
  13.732 -# CONFIG_MINIX_FS is not set
  13.733 -# CONFIG_VXFS_FS is not set
  13.734 -# CONFIG_NTFS_FS is not set
  13.735 -# CONFIG_NTFS_RW is not set
  13.736 -# CONFIG_HPFS_FS is not set
  13.737 -CONFIG_PROC_FS=y
  13.738 -# CONFIG_DEVFS_FS is not set
  13.739 -# CONFIG_DEVFS_MOUNT is not set
  13.740 -# CONFIG_DEVFS_DEBUG is not set
  13.741 -CONFIG_DEVPTS_FS=y
  13.742 -# CONFIG_QNX4FS_FS is not set
  13.743 -# CONFIG_QNX4FS_RW is not set
  13.744 -# CONFIG_ROMFS_FS is not set
  13.745 -CONFIG_EXT2_FS=y
  13.746 -# CONFIG_SYSV_FS is not set
  13.747 -# CONFIG_UDF_FS is not set
  13.748 -# CONFIG_UDF_RW is not set
  13.749 -# CONFIG_UFS_FS is not set
  13.750 -# CONFIG_UFS_FS_WRITE is not set
  13.751 -# CONFIG_XFS_FS is not set
  13.752 -# CONFIG_XFS_QUOTA is not set
  13.753 -# CONFIG_XFS_RT is not set
  13.754 -# CONFIG_XFS_TRACE is not set
  13.755 -# CONFIG_XFS_DEBUG is not set
  13.756 -
  13.757 -#
  13.758 -# Network File Systems
  13.759 -#
  13.760 -# CONFIG_CODA_FS is not set
  13.761 -# CONFIG_INTERMEZZO_FS is not set
  13.762 -CONFIG_NFS_FS=y
  13.763 -CONFIG_NFS_V3=y
  13.764 -# CONFIG_NFS_DIRECTIO is not set
  13.765 -CONFIG_ROOT_NFS=y
  13.766 -CONFIG_NFSD=y
  13.767 -CONFIG_NFSD_V3=y
  13.768 -# CONFIG_NFSD_TCP is not set
  13.769 -CONFIG_SUNRPC=y
  13.770 -CONFIG_LOCKD=y
  13.771 -CONFIG_LOCKD_V4=y
  13.772 -# CONFIG_SMB_FS is not set
  13.773 -# CONFIG_NCP_FS is not set
  13.774 -# CONFIG_NCPFS_PACKET_SIGNING is not set
  13.775 -# CONFIG_NCPFS_IOCTL_LOCKING is not set
  13.776 -# CONFIG_NCPFS_STRONG is not set
  13.777 -# CONFIG_NCPFS_NFS_NS is not set
  13.778 -# CONFIG_NCPFS_OS2_NS is not set
  13.779 -# CONFIG_NCPFS_SMALLDOS is not set
  13.780 -# CONFIG_NCPFS_NLS is not set
  13.781 -# CONFIG_NCPFS_EXTRAS is not set
  13.782 -CONFIG_ZISOFS_FS=y
  13.783 -
  13.784 -#
  13.785 -# Partition Types
  13.786 -#
  13.787 -CONFIG_PARTITION_ADVANCED=y
  13.788 -# CONFIG_ACORN_PARTITION is not set
  13.789 -# CONFIG_OSF_PARTITION is not set
  13.790 -# CONFIG_AMIGA_PARTITION is not set
  13.791 -# CONFIG_ATARI_PARTITION is not set
  13.792 -# CONFIG_MAC_PARTITION is not set
  13.793 -CONFIG_MSDOS_PARTITION=y
  13.794 -# CONFIG_BSD_DISKLABEL is not set
  13.795 -# CONFIG_MINIX_SUBPARTITION is not set
  13.796 -# CONFIG_SOLARIS_X86_PARTITION is not set
  13.797 -# CONFIG_UNIXWARE_DISKLABEL is not set
  13.798 -# CONFIG_LDM_PARTITION is not set
  13.799 -# CONFIG_SGI_PARTITION is not set
  13.800 -# CONFIG_ULTRIX_PARTITION is not set
  13.801 -# CONFIG_SUN_PARTITION is not set
  13.802 -# CONFIG_EFI_PARTITION is not set
  13.803 -# CONFIG_SMB_NLS is not set
  13.804 -CONFIG_NLS=y
  13.805 -
  13.806 -#
  13.807 -# Native Language Support
  13.808 -#
  13.809 -CONFIG_NLS_DEFAULT="iso8559-1"
  13.810 -# CONFIG_NLS_CODEPAGE_437 is not set
  13.811 -# CONFIG_NLS_CODEPAGE_737 is not set
  13.812 -# CONFIG_NLS_CODEPAGE_775 is not set
  13.813 -# CONFIG_NLS_CODEPAGE_850 is not set
  13.814 -# CONFIG_NLS_CODEPAGE_852 is not set
  13.815 -# CONFIG_NLS_CODEPAGE_855 is not set
  13.816 -# CONFIG_NLS_CODEPAGE_857 is not set
  13.817 -# CONFIG_NLS_CODEPAGE_860 is not set
  13.818 -# CONFIG_NLS_CODEPAGE_861 is not set
  13.819 -# CONFIG_NLS_CODEPAGE_862 is not set
  13.820 -# CONFIG_NLS_CODEPAGE_863 is not set
  13.821 -# CONFIG_NLS_CODEPAGE_864 is not set
  13.822 -# CONFIG_NLS_CODEPAGE_865 is not set
  13.823 -# CONFIG_NLS_CODEPAGE_866 is not set
  13.824 -# CONFIG_NLS_CODEPAGE_869 is not set
  13.825 -# CONFIG_NLS_CODEPAGE_936 is not set
  13.826 -# CONFIG_NLS_CODEPAGE_950 is not set
  13.827 -# CONFIG_NLS_CODEPAGE_932 is not set
  13.828 -# CONFIG_NLS_CODEPAGE_949 is not set
  13.829 -# CONFIG_NLS_CODEPAGE_874 is not set
  13.830 -# CONFIG_NLS_ISO8859_8 is not set
  13.831 -# CONFIG_NLS_CODEPAGE_1250 is not set
  13.832 -# CONFIG_NLS_CODEPAGE_1251 is not set
  13.833 -CONFIG_NLS_ISO8859_1=y
  13.834 -# CONFIG_NLS_ISO8859_2 is not set
  13.835 -# CONFIG_NLS_ISO8859_3 is not set
  13.836 -# CONFIG_NLS_ISO8859_4 is not set
  13.837 -# CONFIG_NLS_ISO8859_5 is not set
  13.838 -# CONFIG_NLS_ISO8859_6 is not set
  13.839 -# CONFIG_NLS_ISO8859_7 is not set
  13.840 -# CONFIG_NLS_ISO8859_9 is not set
  13.841 -# CONFIG_NLS_ISO8859_13 is not set
  13.842 -# CONFIG_NLS_ISO8859_14 is not set
  13.843 -# CONFIG_NLS_ISO8859_15 is not set
  13.844 -# CONFIG_NLS_KOI8_R is not set
  13.845 -# CONFIG_NLS_KOI8_U is not set
  13.846 -# CONFIG_NLS_UTF8 is not set
  13.847 -
  13.848 -#
  13.849 -# Console drivers
  13.850 -#
  13.851 -CONFIG_XEN_CONSOLE=y
  13.852 -CONFIG_VGA_CONSOLE=y
  13.853 -CONFIG_DUMMY_CONSOLE=y
  13.854 -# CONFIG_VIDEO_SELECT is not set
  13.855 -# CONFIG_MDA_CONSOLE is not set
  13.856 -
  13.857 -#
  13.858 -# Frame-buffer support
  13.859 -#
  13.860 -# CONFIG_FB is not set
  13.861 -
  13.862 -#
  13.863 -# Sound
  13.864 -#
  13.865 -# CONFIG_SOUND is not set
  13.866 -
  13.867 -#
  13.868 -# USB support
  13.869 -#
  13.870 -# CONFIG_USB is not set
  13.871 -
  13.872 -#
  13.873 -# Support for USB gadgets
  13.874 -#
  13.875 -# CONFIG_USB_GADGET is not set
  13.876 -
  13.877 -#
  13.878 -# Bluetooth support
  13.879 -#
  13.880 -# CONFIG_BLUEZ is not set
  13.881 -
  13.882 -#
  13.883 -# Kernel hacking
  13.884 -#
  13.885 -CONFIG_DEBUG_KERNEL=y
  13.886 -# CONFIG_DEBUG_STACKOVERFLOW is not set
  13.887 -# CONFIG_DEBUG_HIGHMEM is not set
  13.888 -# CONFIG_DEBUG_SLAB is not set
  13.889 -# CONFIG_DEBUG_IOVIRT is not set
  13.890 -# CONFIG_MAGIC_SYSRQ is not set
  13.891 -# CONFIG_DEBUG_SPINLOCK is not set
  13.892 -# CONFIG_DEBUG_BUGVERBOSE is not set
  13.893 -CONFIG_KALLSYMS=y
  13.894 -# CONFIG_FRAME_POINTER is not set
  13.895 -CONFIG_LOG_BUF_SHIFT=0
  13.896 -
  13.897 -#
  13.898 -# Cryptographic options
  13.899 -#
  13.900 -CONFIG_CRYPTO=y
  13.901 -CONFIG_CRYPTO_HMAC=y
  13.902 -CONFIG_CRYPTO_NULL=m
  13.903 -CONFIG_CRYPTO_MD4=m
  13.904 -CONFIG_CRYPTO_MD5=m
  13.905 -CONFIG_CRYPTO_SHA1=m
  13.906 -CONFIG_CRYPTO_SHA256=m
  13.907 -CONFIG_CRYPTO_SHA512=m
  13.908 -# CONFIG_CRYPTO_WP512 is not set
  13.909 -CONFIG_CRYPTO_DES=m
  13.910 -CONFIG_CRYPTO_BLOWFISH=m
  13.911 -CONFIG_CRYPTO_TWOFISH=m
  13.912 -CONFIG_CRYPTO_SERPENT=m
  13.913 -CONFIG_CRYPTO_AES=m
  13.914 -CONFIG_CRYPTO_CAST5=m
  13.915 -CONFIG_CRYPTO_CAST6=m
  13.916 -# CONFIG_CRYPTO_TEA is not set
  13.917 -# CONFIG_CRYPTO_KHAZAD is not set
  13.918 -# CONFIG_CRYPTO_ANUBIS is not set
  13.919 -CONFIG_CRYPTO_ARC4=m
  13.920 -CONFIG_CRYPTO_DEFLATE=m
  13.921 -# CONFIG_CRYPTO_MICHAEL_MIC is not set
  13.922 -# CONFIG_CRYPTO_TEST is not set
  13.923 -
  13.924 -#
  13.925 -# Library routines
  13.926 -#
  13.927 -# CONFIG_CRC32 is not set
  13.928 -CONFIG_ZLIB_INFLATE=y
  13.929 -CONFIG_ZLIB_DEFLATE=m
  13.930 -# CONFIG_FW_LOADER is not set
    14.1 --- a/linux-2.4.30-xen-sparse/arch/xen/defconfig-xenU	Fri Jul 29 11:52:33 2005 -0700
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,562 +0,0 @@
    14.4 -#
    14.5 -# Automatically generated make config: don't edit
    14.6 -#
    14.7 -CONFIG_XEN=y
    14.8 -CONFIG_X86=y
    14.9 -CONFIG_ISA=y
   14.10 -# CONFIG_SBUS is not set
   14.11 -CONFIG_UID16=y
   14.12 -
   14.13 -#
   14.14 -# Xen
   14.15 -#
   14.16 -# CONFIG_XEN_PRIVILEGED_GUEST is not set
   14.17 -# CONFIG_XEN_PHYSDEV_ACCESS is not set
   14.18 -CONFIG_XEN_SCRUB_PAGES=y
   14.19 -CONFIG_XEN_NETDEV_FRONTEND=y
   14.20 -CONFIG_XEN_BLKDEV_FRONTEND=y
   14.21 -CONFIG_XEN_BLKDEV_GRANT=y
   14.22 -# CONFIG_XEN_USB_FRONTEND is not set
   14.23 -CONFIG_NO_IDLE_HZ=y
   14.24 -# CONFIG_FOREIGN_PAGES is not set
   14.25 -CONFIG_NETDEVICES=y
   14.26 -# CONFIG_VT is not set
   14.27 -
   14.28 -#
   14.29 -# Code maturity level options
   14.30 -#
   14.31 -CONFIG_EXPERIMENTAL=y
   14.32 -
   14.33 -#
   14.34 -# Loadable module support
   14.35 -#
   14.36 -CONFIG_MODULES=y
   14.37 -CONFIG_MODVERSIONS=y
   14.38 -CONFIG_KMOD=y
   14.39 -
   14.40 -#
   14.41 -# Processor type and features
   14.42 -#
   14.43 -CONFIG_M686=y
   14.44 -# CONFIG_MPENTIUMIII is not set
   14.45 -# CONFIG_MPENTIUM4 is not set
   14.46 -# CONFIG_MK7 is not set
   14.47 -# CONFIG_MK8 is not set
   14.48 -# CONFIG_MVIAC3_2 is not set
   14.49 -CONFIG_X86_WP_WORKS_OK=y
   14.50 -CONFIG_X86_INVLPG=y
   14.51 -CONFIG_X86_CMPXCHG=y
   14.52 -CONFIG_X86_XADD=y
   14.53 -CONFIG_X86_BSWAP=y
   14.54 -CONFIG_X86_POPAD_OK=y
   14.55 -# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
   14.56 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   14.57 -CONFIG_X86_GOOD_APIC=y
   14.58 -CONFIG_X86_PGE=y
   14.59 -CONFIG_X86_USE_PPRO_CHECKSUM=y
   14.60 -CONFIG_X86_TSC=y
   14.61 -CONFIG_X86_L1_CACHE_SHIFT=5
   14.62 -CONFIG_NOHIGHMEM=y
   14.63 -# CONFIG_HIGHMEM4G is not set
   14.64 -CONFIG_FORCE_MAX_ZONEORDER=11
   14.65 -
   14.66 -#
   14.67 -# General setup
   14.68 -#
   14.69 -CONFIG_NET=y
   14.70 -CONFIG_SYSVIPC=y
   14.71 -# CONFIG_BSD_PROCESS_ACCT is not set
   14.72 -CONFIG_SYSCTL=y
   14.73 -CONFIG_KCORE_ELF=y
   14.74 -# CONFIG_KCORE_AOUT is not set
   14.75 -CONFIG_BINFMT_AOUT=y
   14.76 -CONFIG_BINFMT_ELF=y
   14.77 -# CONFIG_BINFMT_MISC is not set
   14.78 -# CONFIG_OOM_KILLER is not set
   14.79 -
   14.80 -#
   14.81 -# Networking options
   14.82 -#
   14.83 -CONFIG_PACKET=y
   14.84 -CONFIG_PACKET_MMAP=y
   14.85 -# CONFIG_NETLINK_DEV is not set
   14.86 -CONFIG_NETFILTER=y
   14.87 -# CONFIG_NETFILTER_DEBUG is not set
   14.88 -CONFIG_FILTER=y
   14.89 -CONFIG_UNIX=y
   14.90 -CONFIG_INET=y
   14.91 -# CONFIG_IP_MULTICAST is not set
   14.92 -# CONFIG_IP_ADVANCED_ROUTER is not set
   14.93 -CONFIG_IP_PNP=y
   14.94 -CONFIG_IP_PNP_DHCP=y
   14.95 -# CONFIG_IP_PNP_BOOTP is not set
   14.96 -# CONFIG_IP_PNP_RARP is not set
   14.97 -# CONFIG_NET_IPIP is not set
   14.98 -# CONFIG_NET_IPGRE is not set
   14.99 -# CONFIG_ARPD is not set
  14.100 -# CONFIG_INET_ECN is not set
  14.101 -# CONFIG_SYN_COOKIES is not set
  14.102 -
  14.103 -#
  14.104 -#   IP: Netfilter Configuration
  14.105 -#
  14.106 -CONFIG_IP_NF_CONNTRACK=y
  14.107 -CONFIG_IP_NF_FTP=y
  14.108 -# CONFIG_IP_NF_AMANDA is not set
  14.109 -CONFIG_IP_NF_TFTP=y
  14.110 -CONFIG_IP_NF_IRC=y
  14.111 -# CONFIG_IP_NF_QUEUE is not set
  14.112 -CONFIG_IP_NF_IPTABLES=y
  14.113 -# CONFIG_IP_NF_MATCH_LIMIT is not set
  14.114 -# CONFIG_IP_NF_MATCH_MAC is not set
  14.115 -# CONFIG_IP_NF_MATCH_PKTTYPE is not set
  14.116 -# CONFIG_IP_NF_MATCH_MARK is not set
  14.117 -# CONFIG_IP_NF_MATCH_MULTIPORT is not set
  14.118 -# CONFIG_IP_NF_MATCH_TOS is not set
  14.119 -# CONFIG_IP_NF_MATCH_RECENT is not set
  14.120 -# CONFIG_IP_NF_MATCH_ECN is not set
  14.121 -# CONFIG_IP_NF_MATCH_DSCP is not set
  14.122 -# CONFIG_IP_NF_MATCH_AH_ESP is not set
  14.123 -# CONFIG_IP_NF_MATCH_LENGTH is not set
  14.124 -# CONFIG_IP_NF_MATCH_TTL is not set
  14.125 -# CONFIG_IP_NF_MATCH_TCPMSS is not set
  14.126 -# CONFIG_IP_NF_MATCH_HELPER is not set
  14.127 -CONFIG_IP_NF_MATCH_STATE=y
  14.128 -CONFIG_IP_NF_MATCH_CONNTRACK=y
  14.129 -# CONFIG_IP_NF_MATCH_UNCLEAN is not set
  14.130 -# CONFIG_IP_NF_MATCH_OWNER is not set
  14.131 -CONFIG_IP_NF_FILTER=y
  14.132 -CONFIG_IP_NF_TARGET_REJECT=y
  14.133 -# CONFIG_IP_NF_TARGET_MIRROR is not set
  14.134 -CONFIG_IP_NF_NAT=y
  14.135 -CONFIG_IP_NF_NAT_NEEDED=y
  14.136 -CONFIG_IP_NF_TARGET_MASQUERADE=y
  14.137 -CONFIG_IP_NF_TARGET_REDIRECT=y
  14.138 -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
  14.139 -CONFIG_IP_NF_NAT_IRC=y
  14.140 -CONFIG_IP_NF_NAT_FTP=y
  14.141 -CONFIG_IP_NF_NAT_TFTP=y
  14.142 -# CONFIG_IP_NF_MANGLE is not set
  14.143 -CONFIG_IP_NF_TARGET_LOG=y
  14.144 -CONFIG_IP_NF_TARGET_ULOG=y
  14.145 -# CONFIG_IP_NF_TARGET_TCPMSS is not set
  14.146 -# CONFIG_IP_NF_ARPTABLES is not set
  14.147 -
  14.148 -#
  14.149 -#   IP: Virtual Server Configuration
  14.150 -#
  14.151 -# CONFIG_IP_VS is not set
  14.152 -# CONFIG_IPV6 is not set
  14.153 -# CONFIG_KHTTPD is not set
  14.154 -
  14.155 -#
  14.156 -#    SCTP Configuration (EXPERIMENTAL)
  14.157 -#
  14.158 -# CONFIG_IP_SCTP is not set
  14.159 -# CONFIG_ATM is not set
  14.160 -CONFIG_VLAN_8021Q=y
  14.161 -
  14.162 -#
  14.163 -#  
  14.164 -#
  14.165 -# CONFIG_IPX is not set
  14.166 -# CONFIG_ATALK is not set
  14.167 -# CONFIG_DECNET is not set
  14.168 -# CONFIG_BRIDGE is not set
  14.169 -# CONFIG_X25 is not set
  14.170 -# CONFIG_LAPB is not set
  14.171 -# CONFIG_LLC is not set
  14.172 -# CONFIG_NET_DIVERT is not set
  14.173 -# CONFIG_ECONET is not set
  14.174 -# CONFIG_WAN_ROUTER is not set
  14.175 -# CONFIG_NET_FASTROUTE is not set
  14.176 -# CONFIG_NET_HW_FLOWCONTROL is not set
  14.177 -
  14.178 -#
  14.179 -# QoS and/or fair queueing
  14.180 -#
  14.181 -# CONFIG_NET_SCHED is not set
  14.182 -
  14.183 -#
  14.184 -# Network testing
  14.185 -#
  14.186 -# CONFIG_NET_PKTGEN is not set
  14.187 -
  14.188 -#
  14.189 -# SCSI support
  14.190 -#
  14.191 -CONFIG_SCSI=y
  14.192 -
  14.193 -#
  14.194 -# SCSI support type (disk, tape, CD-ROM)
  14.195 -#
  14.196 -CONFIG_BLK_DEV_SD=y
  14.197 -CONFIG_SD_EXTRA_DEVS=40
  14.198 -# CONFIG_CHR_DEV_ST is not set
  14.199 -# CONFIG_CHR_DEV_OSST is not set
  14.200 -# CONFIG_BLK_DEV_SR is not set
  14.201 -CONFIG_CHR_DEV_SG=y
  14.202 -
  14.203 -#
  14.204 -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  14.205 -#
  14.206 -# CONFIG_SCSI_DEBUG_QUEUES is not set
  14.207 -# CONFIG_SCSI_MULTI_LUN is not set
  14.208 -# CONFIG_SCSI_CONSTANTS is not set
  14.209 -# CONFIG_SCSI_LOGGING is not set
  14.210 -
  14.211 -#
  14.212 -# SCSI low-level drivers
  14.213 -#
  14.214 -# CONFIG_SCSI_7000FASST is not set
  14.215 -# CONFIG_SCSI_ACARD is not set
  14.216 -# CONFIG_SCSI_AHA152X is not set
  14.217 -# CONFIG_SCSI_AHA1542 is not set
  14.218 -# CONFIG_SCSI_AHA1740 is not set
  14.219 -# CONFIG_SCSI_AACRAID is not set
  14.220 -# CONFIG_SCSI_AIC7XXX is not set
  14.221 -# CONFIG_SCSI_AIC79XX is not set
  14.222 -# CONFIG_SCSI_AIC7XXX_OLD is not set
  14.223 -# CONFIG_SCSI_DPT_I2O is not set
  14.224 -# CONFIG_SCSI_ADVANSYS is not set
  14.225 -# CONFIG_SCSI_IN2000 is not set
  14.226 -# CONFIG_SCSI_AM53C974 is not set
  14.227 -# CONFIG_SCSI_MEGARAID is not set
  14.228 -# CONFIG_SCSI_MEGARAID2 is not set
  14.229 -# CONFIG_SCSI_SATA is not set
  14.230 -# CONFIG_SCSI_SATA_AHCI is not set
  14.231 -# CONFIG_SCSI_SATA_SVW is not set
  14.232 -# CONFIG_SCSI_ATA_PIIX is not set
  14.233 -# CONFIG_SCSI_SATA_NV is not set
  14.234 -# CONFIG_SCSI_SATA_QSTOR is not set
  14.235 -# CONFIG_SCSI_SATA_PROMISE is not set
  14.236 -# CONFIG_SCSI_SATA_SX4 is not set
  14.237 -# CONFIG_SCSI_SATA_SIL is not set
  14.238 -# CONFIG_SCSI_SATA_SIS is not set
  14.239 -# CONFIG_SCSI_SATA_ULI is not set
  14.240 -# CONFIG_SCSI_SATA_VIA is not set
  14.241 -# CONFIG_SCSI_SATA_VITESSE is not set
  14.242 -# CONFIG_SCSI_BUSLOGIC is not set
  14.243 -# CONFIG_SCSI_DMX3191D is not set
  14.244 -# CONFIG_SCSI_DTC3280 is not set
  14.245 -# CONFIG_SCSI_EATA is not set
  14.246 -# CONFIG_SCSI_EATA_DMA is not set
  14.247 -# CONFIG_SCSI_EATA_PIO is not set
  14.248 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
  14.249 -# CONFIG_SCSI_GDTH is not set
  14.250 -# CONFIG_SCSI_GENERIC_NCR5380 is not set
  14.251 -# CONFIG_SCSI_IPS is not set
  14.252 -# CONFIG_SCSI_INITIO is not set
  14.253 -# CONFIG_SCSI_INIA100 is not set
  14.254 -# CONFIG_SCSI_PPA is not set
  14.255 -# CONFIG_SCSI_IMM is not set
  14.256 -# CONFIG_SCSI_NCR53C406A is not set
  14.257 -# CONFIG_SCSI_NCR53C7xx is not set
  14.258 -# CONFIG_SCSI_PAS16 is not set
  14.259 -# CONFIG_SCSI_PCI2000 is not set
  14.260 -# CONFIG_SCSI_PCI2220I is not set
  14.261 -# CONFIG_SCSI_PSI240I is not set
  14.262 -# CONFIG_SCSI_QLOGIC_FAS is not set
  14.263 -# CONFIG_SCSI_SEAGATE is not set
  14.264 -# CONFIG_SCSI_SIM710 is not set
  14.265 -# CONFIG_SCSI_SYM53C416 is not set
  14.266 -# CONFIG_SCSI_T128 is not set
  14.267 -# CONFIG_SCSI_U14_34F is not set
  14.268 -# CONFIG_SCSI_ULTRASTOR is not set
  14.269 -# CONFIG_SCSI_NSP32 is not set
  14.270 -# CONFIG_SCSI_DEBUG is not set
  14.271 -
  14.272 -#
  14.273 -# Block devices
  14.274 -#
  14.275 -CONFIG_BLK_DEV_LOOP=y
  14.276 -CONFIG_BLK_DEV_NBD=y
  14.277 -CONFIG_BLK_DEV_RAM=y
  14.278 -CONFIG_BLK_DEV_RAM_SIZE=4096
  14.279 -CONFIG_BLK_DEV_INITRD=y
  14.280 -# CONFIG_BLK_STATS is not set
  14.281 -# CONFIG_BLK_DEV_HD is not set
  14.282 -
  14.283 -#
  14.284 -# Character devices
  14.285 -#
  14.286 -# CONFIG_VT is not set
  14.287 -# CONFIG_SERIAL is not set
  14.288 -# CONFIG_SERIAL_EXTENDED is not set
  14.289 -# CONFIG_SERIAL_NONSTANDARD is not set
  14.290 -CONFIG_UNIX98_PTYS=y
  14.291 -CONFIG_UNIX98_PTY_COUNT=256
  14.292 -# CONFIG_PRINTER is not set
  14.293 -# CONFIG_PPDEV is not set
  14.294 -# CONFIG_TIPAR is not set
  14.295 -
  14.296 -#
  14.297 -# I2C support
  14.298 -#
  14.299 -# CONFIG_I2C is not set
  14.300 -
  14.301 -#
  14.302 -# Mice
  14.303 -#
  14.304 -# CONFIG_BUSMOUSE is not set
  14.305 -CONFIG_MOUSE=y
  14.306 -CONFIG_PSMOUSE=y
  14.307 -# CONFIG_82C710_MOUSE is not set
  14.308 -# CONFIG_PC110_PAD is not set
  14.309 -# CONFIG_MK712_MOUSE is not set
  14.310 -
  14.311 -#
  14.312 -# Joysticks
  14.313 -#
  14.314 -# CONFIG_INPUT_GAMEPORT is not set
  14.315 -# CONFIG_INPUT_NS558 is not set
  14.316 -# CONFIG_INPUT_LIGHTNING is not set
  14.317 -# CONFIG_INPUT_PCIGAME is not set
  14.318 -# CONFIG_INPUT_CS461X is not set
  14.319 -# CONFIG_INPUT_EMU10K1 is not set
  14.320 -# CONFIG_INPUT_SERIO is not set
  14.321 -# CONFIG_INPUT_SERPORT is not set
  14.322 -
  14.323 -#
  14.324 -# Joysticks
  14.325 -#
  14.326 -# CONFIG_INPUT_ANALOG is not set
  14.327 -# CONFIG_INPUT_A3D is not set
  14.328 -# CONFIG_INPUT_ADI is not set
  14.329 -# CONFIG_INPUT_COBRA is not set
  14.330 -# CONFIG_INPUT_GF2K is not set
  14.331 -# CONFIG_INPUT_GRIP is not set
  14.332 -# CONFIG_INPUT_INTERACT is not set
  14.333 -# CONFIG_INPUT_TMDC is not set
  14.334 -# CONFIG_INPUT_SIDEWINDER is not set
  14.335 -# CONFIG_INPUT_IFORCE_USB is not set
  14.336 -# CONFIG_INPUT_IFORCE_232 is not set
  14.337 -# CONFIG_INPUT_WARRIOR is not set
  14.338 -# CONFIG_INPUT_MAGELLAN is not set
  14.339 -# CONFIG_INPUT_SPACEORB is not set
  14.340 -# CONFIG_INPUT_SPACEBALL is not set
  14.341 -# CONFIG_INPUT_STINGER is not set
  14.342 -# CONFIG_INPUT_DB9 is not set
  14.343 -# CONFIG_INPUT_GAMECON is not set
  14.344 -# CONFIG_INPUT_TURBOGRAFX is not set
  14.345 -# CONFIG_QIC02_TAPE is not set
  14.346 -# CONFIG_IPMI_HANDLER is not set
  14.347 -# CONFIG_IPMI_PANIC_EVENT is not set
  14.348 -# CONFIG_IPMI_DEVICE_INTERFACE is not set
  14.349 -# CONFIG_IPMI_KCS is not set
  14.350 -# CONFIG_IPMI_WATCHDOG is not set
  14.351 -
  14.352 -#
  14.353 -# Watchdog Cards
  14.354 -#
  14.355 -# CONFIG_WATCHDOG is not set
  14.356 -# CONFIG_SCx200 is not set
  14.357 -# CONFIG_SCx200_GPIO is not set
  14.358 -# CONFIG_AMD_RNG is not set
  14.359 -# CONFIG_INTEL_RNG is not set
  14.360 -# CONFIG_HW_RANDOM is not set
  14.361 -# CONFIG_AMD_PM768 is not set
  14.362 -# CONFIG_NVRAM is not set
  14.363 -# CONFIG_RTC is not set
  14.364 -# CONFIG_DTLK is not set
  14.365 -# CONFIG_R3964 is not set
  14.366 -# CONFIG_APPLICOM is not set
  14.367 -# CONFIG_SONYPI is not set
  14.368 -
  14.369 -#
  14.370 -# Ftape, the floppy tape device driver
  14.371 -#
  14.372 -# CONFIG_FTAPE is not set
  14.373 -# CONFIG_AGP is not set
  14.374 -
  14.375 -#
  14.376 -# Direct Rendering Manager (XFree86 DRI support)
  14.377 -#
  14.378 -# CONFIG_DRM is not set
  14.379 -# CONFIG_MWAVE is not set
  14.380 -# CONFIG_OBMOUSE is not set
  14.381 -
  14.382 -#
  14.383 -# File systems
  14.384 -#
  14.385 -# CONFIG_QUOTA is not set
  14.386 -# CONFIG_QFMT_V2 is not set
  14.387 -CONFIG_AUTOFS_FS=y
  14.388 -CONFIG_AUTOFS4_FS=y
  14.389 -# CONFIG_REISERFS_FS is not set
  14.390 -# CONFIG_REISERFS_CHECK is not set
  14.391 -# CONFIG_REISERFS_PROC_INFO is not set
  14.392 -# CONFIG_ADFS_FS is not set
  14.393 -# CONFIG_ADFS_FS_RW is not set
  14.394 -# CONFIG_AFFS_FS is not set
  14.395 -# CONFIG_HFS_FS is not set
  14.396 -# CONFIG_HFSPLUS_FS is not set
  14.397 -# CONFIG_BEFS_FS is not set
  14.398 -# CONFIG_BEFS_DEBUG is not set
  14.399 -# CONFIG_BFS_FS is not set
  14.400 -CONFIG_EXT3_FS=y
  14.401 -CONFIG_JBD=y
  14.402 -# CONFIG_JBD_DEBUG is not set
  14.403 -CONFIG_FAT_FS=y
  14.404 -CONFIG_MSDOS_FS=y
  14.405 -CONFIG_UMSDOS_FS=y
  14.406 -CONFIG_VFAT_FS=y
  14.407 -# CONFIG_EFS_FS is not set
  14.408 -# CONFIG_JFFS_FS is not set
  14.409 -# CONFIG_JFFS2_FS is not set
  14.410 -# CONFIG_CRAMFS is not set
  14.411 -CONFIG_TMPFS=y
  14.412 -CONFIG_RAMFS=y
  14.413 -CONFIG_ISO9660_FS=y
  14.414 -CONFIG_JOLIET=y
  14.415 -CONFIG_ZISOFS=y
  14.416 -# CONFIG_JFS_FS is not set
  14.417 -# CONFIG_JFS_DEBUG is not set
  14.418 -# CONFIG_JFS_STATISTICS is not set
  14.419 -# CONFIG_MINIX_FS is not set
  14.420 -# CONFIG_VXFS_FS is not set
  14.421 -# CONFIG_NTFS_FS is not set
  14.422 -# CONFIG_NTFS_RW is not set
  14.423 -# CONFIG_HPFS_FS is not set
  14.424 -CONFIG_PROC_FS=y
  14.425 -# CONFIG_DEVFS_FS is not set
  14.426 -# CONFIG_DEVFS_MOUNT is not set
  14.427 -# CONFIG_DEVFS_DEBUG is not set
  14.428 -CONFIG_DEVPTS_FS=y
  14.429 -# CONFIG_QNX4FS_FS is not set
  14.430 -# CONFIG_QNX4FS_RW is not set
  14.431 -# CONFIG_ROMFS_FS is not set
  14.432 -CONFIG_EXT2_FS=y
  14.433 -# CONFIG_SYSV_FS is not set
  14.434 -# CONFIG_UDF_FS is not set
  14.435 -# CONFIG_UDF_RW is not set
  14.436 -# CONFIG_UFS_FS is not set
  14.437 -# CONFIG_UFS_FS_WRITE is not set
  14.438 -# CONFIG_XFS_FS is not set
  14.439 -# CONFIG_XFS_QUOTA is not set
  14.440 -# CONFIG_XFS_RT is not set
  14.441 -# CONFIG_XFS_TRACE is not set
  14.442 -# CONFIG_XFS_DEBUG is not set
  14.443 -
  14.444 -#
  14.445 -# Network File Systems
  14.446 -#
  14.447 -# CONFIG_CODA_FS is not set
  14.448 -# CONFIG_INTERMEZZO_FS is not set
  14.449 -CONFIG_NFS_FS=y
  14.450 -CONFIG_NFS_V3=y
  14.451 -# CONFIG_NFS_DIRECTIO is not set
  14.452 -CONFIG_ROOT_NFS=y
  14.453 -CONFIG_NFSD=y
  14.454 -CONFIG_NFSD_V3=y
  14.455 -# CONFIG_NFSD_TCP is not set
  14.456 -CONFIG_SUNRPC=y
  14.457 -CONFIG_LOCKD=y
  14.458 -CONFIG_LOCKD_V4=y
  14.459 -# CONFIG_SMB_FS is not set
  14.460 -# CONFIG_NCP_FS is not set
  14.461 -# CONFIG_NCPFS_PACKET_SIGNING is not set
  14.462 -# CONFIG_NCPFS_IOCTL_LOCKING is not set
  14.463 -# CONFIG_NCPFS_STRONG is not set
  14.464 -# CONFIG_NCPFS_NFS_NS is not set
  14.465 -# CONFIG_NCPFS_OS2_NS is not set
  14.466 -# CONFIG_NCPFS_SMALLDOS is not set
  14.467 -# CONFIG_NCPFS_NLS is not set
  14.468 -# CONFIG_NCPFS_EXTRAS is not set
  14.469 -CONFIG_ZISOFS_FS=y
  14.470 -
  14.471 -#
  14.472 -# Partition Types
  14.473 -#
  14.474 -CONFIG_PARTITION_ADVANCED=y
  14.475 -# CONFIG_ACORN_PARTITION is not set
  14.476 -# CONFIG_OSF_PARTITION is not set
  14.477 -# CONFIG_AMIGA_PARTITION is not set
  14.478 -# CONFIG_ATARI_PARTITION is not set
  14.479 -# CONFIG_MAC_PARTITION is not set
  14.480 -CONFIG_MSDOS_PARTITION=y
  14.481 -# CONFIG_BSD_DISKLABEL is not set
  14.482 -# CONFIG_MINIX_SUBPARTITION is not set
  14.483 -# CONFIG_SOLARIS_X86_PARTITION is not set
  14.484 -# CONFIG_UNIXWARE_DISKLABEL is not set
  14.485 -# CONFIG_LDM_PARTITION is not set
  14.486 -# CONFIG_SGI_PARTITION is not set
  14.487 -# CONFIG_ULTRIX_PARTITION is not set
  14.488 -# CONFIG_SUN_PARTITION is not set
  14.489 -# CONFIG_EFI_PARTITION is not set
  14.490 -# CONFIG_SMB_NLS is not set
  14.491 -CONFIG_NLS=y
  14.492 -
  14.493 -#
  14.494 -# Native Language Support
  14.495 -#
  14.496 -CONFIG_NLS_DEFAULT="iso8559-1"
  14.497 -# CONFIG_NLS_CODEPAGE_437 is not set
  14.498 -# CONFIG_NLS_CODEPAGE_737 is not set
  14.499 -# CONFIG_NLS_CODEPAGE_775 is not set
  14.500 -# CONFIG_NLS_CODEPAGE_850 is not set
  14.501 -# CONFIG_NLS_CODEPAGE_852 is not set
  14.502 -# CONFIG_NLS_CODEPAGE_855 is not set
  14.503 -# CONFIG_NLS_CODEPAGE_857 is not set
  14.504 -# CONFIG_NLS_CODEPAGE_860 is not set
  14.505 -# CONFIG_NLS_CODEPAGE_861 is not set
  14.506 -# CONFIG_NLS_CODEPAGE_862 is not set
  14.507 -# CONFIG_NLS_CODEPAGE_863 is not set
  14.508 -# CONFIG_NLS_CODEPAGE_864 is not set
  14.509 -# CONFIG_NLS_CODEPAGE_865 is not set
  14.510 -# CONFIG_NLS_CODEPAGE_866 is not set
  14.511 -# CONFIG_NLS_CODEPAGE_869 is not set
  14.512 -# CONFIG_NLS_CODEPAGE_936 is not set
  14.513 -# CONFIG_NLS_CODEPAGE_950 is not set
  14.514 -# CONFIG_NLS_CODEPAGE_932 is not set
  14.515 -# CONFIG_NLS_CODEPAGE_949 is not set
  14.516 -# CONFIG_NLS_CODEPAGE_874 is not set
  14.517 -# CONFIG_NLS_ISO8859_8 is not set
  14.518 -# CONFIG_NLS_CODEPAGE_1250 is not set
  14.519 -# CONFIG_NLS_CODEPAGE_1251 is not set
  14.520 -CONFIG_NLS_ISO8859_1=y
  14.521 -# CONFIG_NLS_ISO8859_2 is not set
  14.522 -# CONFIG_NLS_ISO8859_3 is not set
  14.523 -# CONFIG_NLS_ISO8859_4 is not set
  14.524 -# CONFIG_NLS_ISO8859_5 is not set
  14.525 -# CONFIG_NLS_ISO8859_6 is not set
  14.526 -# CONFIG_NLS_ISO8859_7 is not set
  14.527 -# CONFIG_NLS_ISO8859_9 is not set
  14.528 -# CONFIG_NLS_ISO8859_13 is not set
  14.529 -# CONFIG_NLS_ISO8859_14 is not set
  14.530 -# CONFIG_NLS_ISO8859_15 is not set
  14.531 -# CONFIG_NLS_KOI8_R is not set
  14.532 -# CONFIG_NLS_KOI8_U is not set
  14.533 -# CONFIG_NLS_UTF8 is not set
  14.534 -
  14.535 -#
  14.536 -# Console drivers
  14.537 -#
  14.538 -CONFIG_XEN_CONSOLE=y
  14.539 -
  14.540 -#
  14.541 -# Kernel hacking
  14.542 -#
  14.543 -CONFIG_DEBUG_KERNEL=y
  14.544 -# CONFIG_DEBUG_STACKOVERFLOW is not set
  14.545 -# CONFIG_DEBUG_HIGHMEM is not set
  14.546 -# CONFIG_DEBUG_SLAB is not set
  14.547 -# CONFIG_DEBUG_IOVIRT is not set
  14.548 -# CONFIG_MAGIC_SYSRQ is not set
  14.549 -# CONFIG_DEBUG_SPINLOCK is not set
  14.550 -# CONFIG_DEBUG_BUGVERBOSE is not set
  14.551 -CONFIG_KALLSYMS=y
  14.552 -# CONFIG_FRAME_POINTER is not set
  14.553 -CONFIG_LOG_BUF_SHIFT=0
  14.554 -
  14.555 -#
  14.556 -# Cryptographic options
  14.557 -#
  14.558 -# CONFIG_CRYPTO is not set
  14.559 -
  14.560 -#
  14.561 -# Library routines
  14.562 -#
  14.563 -# CONFIG_CRC32 is not set
  14.564 -CONFIG_ZLIB_INFLATE=y
  14.565 -# CONFIG_ZLIB_DEFLATE is not set
    15.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/balloon/Makefile	Fri Jul 29 11:52:33 2005 -0700
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,4 +0,0 @@
    15.4 -O_TARGET := drv.o
    15.5 -export-objs := balloon.o
    15.6 -obj-y := balloon.o
    15.7 -include $(TOPDIR)/Rules.make
    16.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/Makefile	Fri Jul 29 11:52:33 2005 -0700
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,10 +0,0 @@
    16.4 -
    16.5 -O_TARGET := drv.o
    16.6 -
    16.7 -subdir-$(CONFIG_XEN_BLKDEV_FRONTEND) += frontend
    16.8 -obj-$(CONFIG_XEN_BLKDEV_FRONTEND)    += frontend/drv.o
    16.9 -
   16.10 -subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
   16.11 -obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
   16.12 -
   16.13 -include $(TOPDIR)/Rules.make
    17.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/backend/Makefile	Fri Jul 29 11:52:33 2005 -0700
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,3 +0,0 @@
    17.4 -O_TARGET := drv.o
    17.5 -obj-y := main.o control.o interface.o vbd.o
    17.6 -include $(TOPDIR)/Rules.make
    18.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile	Fri Jul 29 11:52:33 2005 -0700
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,3 +0,0 @@
    18.4 -O_TARGET := drv.o
    18.5 -obj-y := blkfront.o vbd.o
    18.6 -include $(TOPDIR)/Rules.make
    19.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/frontend/common.h	Fri Jul 29 11:52:33 2005 -0700
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,93 +0,0 @@
    19.4 -/******************************************************************************
    19.5 - * arch/xen/drivers/blkif/frontend/common.h
    19.6 - * 
    19.7 - * Shared definitions between all levels of XenoLinux Virtual block devices.
    19.8 - */
    19.9 -
   19.10 -#ifndef __XEN_DRIVERS_COMMON_H__
   19.11 -#define __XEN_DRIVERS_COMMON_H__
   19.12 -
   19.13 -#include <linux/config.h>
   19.14 -#include <linux/module.h>
   19.15 -#include <linux/kernel.h>
   19.16 -#include <linux/sched.h>
   19.17 -#include <linux/slab.h>
   19.18 -#include <linux/string.h>
   19.19 -#include <linux/errno.h>
   19.20 -#include <linux/fs.h>
   19.21 -#include <linux/hdreg.h>
   19.22 -#include <linux/blkdev.h>
   19.23 -#include <linux/major.h>
   19.24 -#include <asm-xen/xen-public/xen.h>
   19.25 -#include <asm/io.h>
   19.26 -#include <asm/atomic.h>
   19.27 -#include <asm/uaccess.h>
   19.28 -#include <asm-xen/xen-public/io/blkif.h>
   19.29 -
   19.30 -#if 1
   19.31 -#define IPRINTK(fmt, args...) \
   19.32 -    printk(KERN_INFO "xen_blk: " fmt, ##args)
   19.33 -#else
   19.34 -#define IPRINTK(fmt, args...) ((void)0)
   19.35 -#endif
   19.36 -
   19.37 -#if 1
   19.38 -#define WPRINTK(fmt, args...) \
   19.39 -    printk(KERN_WARNING "xen_blk: " fmt, ##args)
   19.40 -#else
   19.41 -#define WPRINTK(fmt, args...) ((void)0)
   19.42 -#endif
   19.43 -
   19.44 -#if 0
   19.45 -#define DPRINTK(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   19.46 -#else
   19.47 -#define DPRINTK(_f, _a...) ((void)0)
   19.48 -#endif
   19.49 -
   19.50 -#if 0
   19.51 -#define DPRINTK_IOCTL(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   19.52 -#else
   19.53 -#define DPRINTK_IOCTL(_f, _a...) ((void)0)
   19.54 -#endif
   19.55 -
   19.56 -/* Private gendisk->flags[] values. */
   19.57 -#define GENHD_FL_XEN        2 /* Is unit a Xen block device?  */
   19.58 -#define GENHD_FL_VIRT_PARTNS 4 /* Are unit partitions virtual? */
   19.59 -
   19.60 -/*
   19.61 - * We have one of these per vbd, whether ide, scsi or 'other'.
   19.62 - * They hang in an array off the gendisk structure. We may end up putting
   19.63 - * all kinds of interesting stuff here :-)
   19.64 - */
   19.65 -typedef struct xl_disk {
   19.66 -    int usage;
   19.67 -} xl_disk_t;
   19.68 -
   19.69 -extern int blkif_open(struct inode *inode, struct file *filep);
   19.70 -extern int blkif_release(struct inode *inode, struct file *filep);
   19.71 -extern int blkif_ioctl(struct inode *inode, struct file *filep,
   19.72 -                                 unsigned command, unsigned long argument);
   19.73 -extern int blkif_check(kdev_t dev);
   19.74 -extern int blkif_revalidate(kdev_t dev);
   19.75 -extern void blkif_control_send(blkif_request_t *req, blkif_response_t *rsp);
   19.76 -extern void do_blkif_request (request_queue_t *rq); 
   19.77 -
   19.78 -extern void xlvbd_update_vbds(void);
   19.79 -
   19.80 -static inline xl_disk_t *xldev_to_xldisk(kdev_t xldev)
   19.81 -{
   19.82 -    struct gendisk *gd = get_gendisk(xldev);
   19.83 -    
   19.84 -    if ( gd == NULL ) 
   19.85 -        return NULL;
   19.86 -    
   19.87 -    return (xl_disk_t *)gd->real_devices + 
   19.88 -        (MINOR(xldev) >> gd->minor_shift);
   19.89 -}
   19.90 -
   19.91 -
   19.92 -/* Virtual block-device subsystem. */
   19.93 -extern int  xlvbd_init(void);
   19.94 -extern void xlvbd_cleanup(void); 
   19.95 -
   19.96 -#endif /* __XEN_DRIVERS_COMMON_H__ */
    20.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c	Fri Jul 29 11:52:33 2005 -0700
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,540 +0,0 @@
    20.4 -/******************************************************************************
    20.5 - * arch/xen/drivers/blkif/frontend/vbd.c
    20.6 - * 
    20.7 - * Xenolinux virtual block-device driver.
    20.8 - * 
    20.9 - * Copyright (c) 2003-2004, Keir Fraser & Steve Hand
   20.10 - * Modifications by Mark A. Williamson are (c) Intel Research Cambridge
   20.11 - */
   20.12 -
   20.13 -#include "common.h"
   20.14 -#include <linux/blk.h>
   20.15 -
   20.16 -/*
   20.17 - * For convenience we distinguish between ide, scsi and 'other' (i.e.
   20.18 - * potentially combinations of the two) in the naming scheme and in a few 
   20.19 - * other places (like default readahead, etc).
   20.20 - */
   20.21 -#define XLIDE_MAJOR_NAME  "hd"
   20.22 -#define XLSCSI_MAJOR_NAME "sd"
   20.23 -#define XLVBD_MAJOR_NAME "xvd"
   20.24 -
   20.25 -#define XLIDE_DEVS_PER_MAJOR   2
   20.26 -#define XLSCSI_DEVS_PER_MAJOR 16
   20.27 -#define XLVBD_DEVS_PER_MAJOR  16
   20.28 -
   20.29 -#define XLIDE_PARTN_SHIFT  6    /* amount to shift minor to get 'real' minor */
   20.30 -#define XLIDE_MAX_PART    (1 << XLIDE_PARTN_SHIFT)     /* minors per ide vbd */
   20.31 -
   20.32 -#define XLSCSI_PARTN_SHIFT 4    /* amount to shift minor to get 'real' minor */
   20.33 -#define XLSCSI_MAX_PART   (1 << XLSCSI_PARTN_SHIFT)   /* minors per scsi vbd */
   20.34 -
   20.35 -#define XLVBD_PARTN_SHIFT  4    /* amount to shift minor to get 'real' minor */
   20.36 -#define XLVBD_MAX_PART    (1 << XLVBD_PARTN_SHIFT) /* minors per 'other' vbd */
   20.37 -
   20.38 -/* The below are for the generic drivers/block/ll_rw_block.c code. */
   20.39 -static int xlide_blksize_size[256];
   20.40 -static int xlide_hardsect_size[256];
   20.41 -static int xlide_max_sectors[256];
   20.42 -static int xlscsi_blksize_size[256];
   20.43 -static int xlscsi_hardsect_size[256];
   20.44 -static int xlscsi_max_sectors[256];
   20.45 -static int xlvbd_blksize_size[256];
   20.46 -static int xlvbd_hardsect_size[256];
   20.47 -static int xlvbd_max_sectors[256];
   20.48 -
   20.49 -/* Information about our VBDs. */
   20.50 -#define MAX_VBDS 64
   20.51 -static int nr_vbds;
   20.52 -static vdisk_t *vbd_info;
   20.53 -
   20.54 -static struct block_device_operations xlvbd_block_fops = 
   20.55 -{
   20.56 -    open:               blkif_open,
   20.57 -    release:            blkif_release,
   20.58 -    ioctl:              blkif_ioctl,
   20.59 -    check_media_change: blkif_check,
   20.60 -    revalidate:         blkif_revalidate,
   20.61 -};
   20.62 -
   20.63 -static int xlvbd_get_vbd_info(vdisk_t *disk_info)
   20.64 -{
   20.65 -    vdisk_t         *buf = (vdisk_t *)__get_free_page(GFP_KERNEL);
   20.66 -    blkif_request_t  req;
   20.67 -    blkif_response_t rsp;
   20.68 -    int              nr;
   20.69 -
   20.70 -    memset(&req, 0, sizeof(req));
   20.71 -    req.operation   = BLKIF_OP_PROBE;
   20.72 -    req.nr_segments = 1;
   20.73 -#ifdef CONFIG_XEN_BLKDEV_GRANT
   20.74 -    blkif_control_probe_send(&req, &rsp,
   20.75 -                             (unsigned long)(virt_to_machine(buf)));
   20.76 -#else
   20.77 -    req.frame_and_sects[0] = virt_to_machine(buf) | 7;
   20.78 -
   20.79 -    blkif_control_send(&req, &rsp);
   20.80 -#endif
   20.81 -
   20.82 -    if ( rsp.status <= 0 )
   20.83 -    {
   20.84 -        printk(KERN_ALERT "Could not probe disks (%d)\n", rsp.status);
   20.85 -        return -1;
   20.86 -    }
   20.87 -
   20.88 -    if ( (nr = rsp.status) > MAX_VBDS )
   20.89 -         nr = MAX_VBDS;
   20.90 -    memcpy(disk_info, buf, nr * sizeof(vdisk_t));
   20.91 -
   20.92 -    return nr;
   20.93 -}
   20.94 -
   20.95 -/*
   20.96 - * xlvbd_init_device - initialise a VBD device
   20.97 - * @disk:              a vdisk_t describing the VBD
   20.98 - *
   20.99 - * Takes a vdisk_t * that describes a VBD the domain has access to.
  20.100 - * Performs appropriate initialisation and registration of the device.
  20.101 - *
  20.102 - * Care needs to be taken when making re-entrant calls to ensure that
  20.103 - * corruption does not occur.  Also, devices that are in use should not have
  20.104 - * their details updated.  This is the caller's responsibility.
  20.105 - */
  20.106 -static int xlvbd_init_device(vdisk_t *xd)
  20.107 -{
  20.108 -    int device = xd->device;
  20.109 -    int major  = MAJOR(device); 
  20.110 -    int minor  = MINOR(device);
  20.111 -    int is_ide = IDE_DISK_MAJOR(major);  /* is this an ide device? */
  20.112 -    int is_scsi= SCSI_BLK_MAJOR(major);  /* is this a scsi device? */
  20.113 -    char *major_name;
  20.114 -    struct gendisk *gd;
  20.115 -    struct block_device *bd;
  20.116 -    xl_disk_t *disk;
  20.117 -    int i, rc = 0, max_part, partno;
  20.118 -    unsigned long capacity;
  20.119 -
  20.120 -    unsigned char buf[64];
  20.121 -
  20.122 -    if ( (bd = bdget(device)) == NULL )
  20.123 -        return -1;
  20.124 -
  20.125 -    if ( ((disk = xldev_to_xldisk(device)) != NULL) && (disk->usage != 0) )
  20.126 -    {
  20.127 -        printk(KERN_ALERT "VBD update failed - in use [dev=%x]\n", device);
  20.128 -        rc = -1;
  20.129 -        goto out;
  20.130 -    }
  20.131 -
  20.132 -    if ( is_ide ) {
  20.133 -
  20.134 -	major_name = XLIDE_MAJOR_NAME; 
  20.135 -	max_part   = XLIDE_MAX_PART;
  20.136 -
  20.137 -    } else if ( is_scsi ) {
  20.138 -
  20.139 -	major_name = XLSCSI_MAJOR_NAME;
  20.140 -	max_part   = XLSCSI_MAX_PART;
  20.141 -
  20.142 -    } else { 
  20.143 -
  20.144 -        /* SMH: hmm - probably a CCISS driver or sim; assume CCISS for now */
  20.145 -	printk(KERN_ALERT "Assuming device %02x:%02x is CCISS/SCSI\n", 
  20.146 -	       major, minor);
  20.147 -	is_scsi    = 1; 
  20.148 -	major_name = "cciss"; 
  20.149 -	max_part   = XLSCSI_MAX_PART;
  20.150 -
  20.151 -    }
  20.152 -    
  20.153 -    partno = minor & (max_part - 1); 
  20.154 -    
  20.155 -    if ( (gd = get_gendisk(device)) == NULL )
  20.156 -    {
  20.157 -        rc = register_blkdev(major, major_name, &xlvbd_block_fops);
  20.158 -        if ( rc < 0 )
  20.159 -        {
  20.160 -            printk(KERN_ALERT "XL VBD: can't get major %d\n", major);
  20.161 -            goto out;
  20.162 -        }
  20.163 -
  20.164 -        if ( is_ide )
  20.165 -        { 
  20.166 -            blksize_size[major]  = xlide_blksize_size;
  20.167 -            hardsect_size[major] = xlide_hardsect_size;
  20.168 -            max_sectors[major]   = xlide_max_sectors;
  20.169 -            read_ahead[major]    = 8;
  20.170 -        } 
  20.171 -        else if ( is_scsi )
  20.172 -        { 
  20.173 -            blksize_size[major]  = xlscsi_blksize_size;
  20.174 -            hardsect_size[major] = xlscsi_hardsect_size;
  20.175 -            max_sectors[major]   = xlscsi_max_sectors;
  20.176 -            read_ahead[major]    = 8;
  20.177 -        }
  20.178 -        else
  20.179 -        { 
  20.180 -            blksize_size[major]  = xlvbd_blksize_size;
  20.181 -            hardsect_size[major] = xlvbd_hardsect_size;
  20.182 -            max_sectors[major]   = xlvbd_max_sectors;
  20.183 -            read_ahead[major]    = 8;
  20.184 -        }
  20.185 -
  20.186 -        blk_init_queue(BLK_DEFAULT_QUEUE(major), do_blkif_request);
  20.187 -
  20.188 -        /*
  20.189 -         * Turn off barking 'headactive' mode. We dequeue buffer heads as
  20.190 -         * soon as we pass them to the back-end driver.
  20.191 -         */
  20.192 -        blk_queue_headactive(BLK_DEFAULT_QUEUE(major), 0);
  20.193 -
  20.194 -        /* Construct an appropriate gendisk structure. */
  20.195 -        gd             = kmalloc(sizeof(struct gendisk), GFP_KERNEL);
  20.196 -        gd->major      = major;
  20.197 -        gd->major_name = major_name; 
  20.198 -    
  20.199 -        gd->max_p      = max_part; 
  20.200 -        if ( is_ide )
  20.201 -        { 
  20.202 -            gd->minor_shift  = XLIDE_PARTN_SHIFT; 
  20.203 -            gd->nr_real      = XLIDE_DEVS_PER_MAJOR; 
  20.204 -        } 
  20.205 -        else if ( is_scsi )
  20.206 -        { 
  20.207 -            gd->minor_shift  = XLSCSI_PARTN_SHIFT; 
  20.208 -            gd->nr_real      = XLSCSI_DEVS_PER_MAJOR; 
  20.209 -        }
  20.210 -        else
  20.211 -        { 
  20.212 -            gd->minor_shift  = XLVBD_PARTN_SHIFT; 
  20.213 -            gd->nr_real      = XLVBD_DEVS_PER_MAJOR; 
  20.214 -        }
  20.215 -
  20.216 -        /* 
  20.217 -        ** The sizes[] and part[] arrays hold the sizes and other 
  20.218 -        ** information about every partition with this 'major' (i.e. 
  20.219 -        ** every disk sharing the 8 bit prefix * max partns per disk) 
  20.220 -        */
  20.221 -        gd->sizes = kmalloc(max_part*gd->nr_real*sizeof(int), GFP_KERNEL);
  20.222 -        gd->part  = kmalloc(max_part*gd->nr_real*sizeof(struct hd_struct), 
  20.223 -                            GFP_KERNEL);
  20.224 -        memset(gd->sizes, 0, max_part * gd->nr_real * sizeof(int));
  20.225 -        memset(gd->part,  0, max_part * gd->nr_real 
  20.226 -               * sizeof(struct hd_struct));
  20.227 -
  20.228 -
  20.229 -        gd->real_devices = kmalloc(gd->nr_real * sizeof(xl_disk_t), 
  20.230 -                                   GFP_KERNEL);
  20.231 -        memset(gd->real_devices, 0, gd->nr_real * sizeof(xl_disk_t));
  20.232 -
  20.233 -        gd->next   = NULL;            
  20.234 -        gd->fops   = &xlvbd_block_fops;
  20.235 -
  20.236 -        gd->de_arr = kmalloc(gd->nr_real * sizeof(*gd->de_arr), 
  20.237 -                             GFP_KERNEL);
  20.238 -        gd->flags  = kmalloc(gd->nr_real * sizeof(*gd->flags), GFP_KERNEL);
  20.239 -    
  20.240 -        memset(gd->de_arr, 0, gd->nr_real * sizeof(*gd->de_arr));
  20.241 -        memset(gd->flags, 0, gd->nr_real *  sizeof(*gd->flags));
  20.242 -
  20.243 -        add_gendisk(gd);
  20.244 -
  20.245 -        blk_size[major] = gd->sizes;
  20.246 -    }
  20.247 -
  20.248 -    if ( xd->info & VDISK_READONLY )
  20.249 -        set_device_ro(device, 1);
  20.250 -
  20.251 -    gd->flags[minor >> gd->minor_shift] |= GENHD_FL_XEN;
  20.252 -
  20.253 -    /* NB. Linux 2.4 only handles 32-bit sector offsets and capacities. */
  20.254 -    capacity = (unsigned long)xd->capacity;
  20.255 -
  20.256 -    if ( partno != 0 )
  20.257 -    {
  20.258 -        /*
  20.259 -         * If this was previously set up as a real disc we will have set 
  20.260 -         * up partition-table information. Virtual partitions override 
  20.261 -         * 'real' partitions, and the two cannot coexist on a device.
  20.262 -         */
  20.263 -        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  20.264 -             (gd->sizes[minor & ~(max_part-1)] != 0) )
  20.265 -        {
  20.266 -            /*
  20.267 -             * Any non-zero sub-partition entries must be cleaned out before
  20.268 -             * installing 'virtual' partition entries. The two types cannot
  20.269 -             * coexist, and virtual partitions are favoured.
  20.270 -             */
  20.271 -            kdev_t dev = device & ~(max_part-1);
  20.272 -            for ( i = max_part - 1; i > 0; i-- )
  20.273 -            {
  20.274 -                invalidate_device(dev+i, 1);
  20.275 -                gd->part[MINOR(dev+i)].start_sect = 0;
  20.276 -                gd->part[MINOR(dev+i)].nr_sects   = 0;
  20.277 -                gd->sizes[MINOR(dev+i)]           = 0;
  20.278 -            }
  20.279 -            printk(KERN_ALERT
  20.280 -                   "Virtual partitions found for /dev/%s - ignoring any "
  20.281 -                   "real partition information we may have found.\n",
  20.282 -                   disk_name(gd, MINOR(device), buf));
  20.283 -        }
  20.284 -
  20.285 -        /* Need to skankily setup 'partition' information */
  20.286 -        gd->part[minor].start_sect = 0; 
  20.287 -        gd->part[minor].nr_sects   = capacity; 
  20.288 -        gd->sizes[minor]           = capacity >>(BLOCK_SIZE_BITS-9); 
  20.289 -
  20.290 -        gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  20.291 -    }
  20.292 -    else
  20.293 -    {
  20.294 -        gd->part[minor].nr_sects = capacity;
  20.295 -        gd->sizes[minor] = capacity>>(BLOCK_SIZE_BITS-9);
  20.296 -        
  20.297 -        /* Some final fix-ups depending on the device type */
  20.298 -        if ( xd->info & VDISK_REMOVABLE )
  20.299 -        { 
  20.300 -            gd->flags[minor >> gd->minor_shift] |= GENHD_FL_REMOVABLE; 
  20.301 -            printk(KERN_ALERT 
  20.302 -                   "Skipping partition check on %s /dev/%s\n", 
  20.303 -                   (xd->info & VDISK_CDROM) ? "cdrom" : "removable",
  20.304 -                   disk_name(gd, MINOR(device), buf)); 
  20.305 -        }
  20.306 -        else
  20.307 -        {
  20.308 -            /* Only check partitions on real discs (not virtual!). */
  20.309 -            if ( gd->flags[minor>>gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  20.310 -            {
  20.311 -                printk(KERN_ALERT
  20.312 -                       "Skipping partition check on virtual /dev/%s\n",
  20.313 -                       disk_name(gd, MINOR(device), buf));
  20.314 -                break;
  20.315 -            }
  20.316 -            register_disk(gd, device, gd->max_p, &xlvbd_block_fops, capacity);
  20.317 -        }
  20.318 -    }
  20.319 -
  20.320 - out:
  20.321 -    bdput(bd);    
  20.322 -    return rc;
  20.323 -}
  20.324 -
  20.325 -
  20.326 -/*
  20.327 - * xlvbd_remove_device - remove a device node if possible
  20.328 - * @device:       numeric device ID
  20.329 - *
  20.330 - * Updates the gendisk structure and invalidates devices.
  20.331 - *
  20.332 - * This is OK for now but in future, should perhaps consider where this should
  20.333 - * deallocate gendisks / unregister devices.
  20.334 - */
  20.335 -static int xlvbd_remove_device(int device)
  20.336 -{
  20.337 -    int i, rc = 0, minor = MINOR(device);
  20.338 -    struct gendisk *gd;
  20.339 -    struct block_device *bd;
  20.340 -    xl_disk_t *disk = NULL;
  20.341 -
  20.342 -    if ( (bd = bdget(device)) == NULL )
  20.343 -        return -1;
  20.344 -
  20.345 -    if ( ((gd = get_gendisk(device)) == NULL) ||
  20.346 -         ((disk = xldev_to_xldisk(device)) == NULL) )
  20.347 -        BUG();
  20.348 -
  20.349 -    if ( disk->usage != 0 )
  20.350 -    {
  20.351 -        printk(KERN_ALERT "VBD removal failed - in use [dev=%x]\n", device);
  20.352 -        rc = -1;
  20.353 -        goto out;
  20.354 -    }
  20.355 - 
  20.356 -    if ( (minor & (gd->max_p-1)) != 0 )
  20.357 -    {
  20.358 -        /* 1: The VBD is mapped to a partition rather than a whole unit. */
  20.359 -        invalidate_device(device, 1);
  20.360 -	gd->part[minor].start_sect = 0;
  20.361 -        gd->part[minor].nr_sects   = 0;
  20.362 -        gd->sizes[minor]           = 0;
  20.363 -
  20.364 -        /* Clear the consists-of-virtual-partitions flag if possible. */
  20.365 -        gd->flags[minor >> gd->minor_shift] &= ~GENHD_FL_VIRT_PARTNS;
  20.366 -        for ( i = 1; i < gd->max_p; i++ )
  20.367 -            if ( gd->sizes[(minor & ~(gd->max_p-1)) + i] != 0 )
  20.368 -                gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  20.369 -
  20.370 -        /*
  20.371 -         * If all virtual partitions are now gone, and a 'whole unit' VBD is
  20.372 -         * present, then we can try to grok the unit's real partition table.
  20.373 -         */
  20.374 -        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  20.375 -             (gd->sizes[minor & ~(gd->max_p-1)] != 0) &&
  20.376 -             !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_REMOVABLE) )
  20.377 -        {
  20.378 -            register_disk(gd,
  20.379 -                          device&~(gd->max_p-1), 
  20.380 -                          gd->max_p, 
  20.381 -                          &xlvbd_block_fops,
  20.382 -                          gd->part[minor&~(gd->max_p-1)].nr_sects);
  20.383 -        }
  20.384 -    }
  20.385 -    else
  20.386 -    {
  20.387 -        /*
  20.388 -         * 2: The VBD is mapped to an entire 'unit'. Clear all partitions.
  20.389 -         * NB. The partition entries are only cleared if there are no VBDs
  20.390 -         * mapped to individual partitions on this unit.
  20.391 -         */
  20.392 -        i = gd->max_p - 1; /* Default: clear subpartitions as well. */
  20.393 -        if ( gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  20.394 -            i = 0; /* 'Virtual' mode: only clear the 'whole unit' entry. */
  20.395 -        while ( i >= 0 )
  20.396 -        {
  20.397 -            invalidate_device(device+i, 1);
  20.398 -            gd->part[minor+i].start_sect = 0;
  20.399 -            gd->part[minor+i].nr_sects   = 0;
  20.400 -            gd->sizes[minor+i]           = 0;
  20.401 -            i--;
  20.402 -        }
  20.403 -    }
  20.404 -
  20.405 - out:
  20.406 -    bdput(bd);
  20.407 -    return rc;
  20.408 -}
  20.409 -
  20.410 -/*
  20.411 - * xlvbd_update_vbds - reprobes the VBD status and performs updates driver
  20.412 - * state. The VBDs need to be updated in this way when the domain is
  20.413 - * initialised and also each time we receive an XLBLK_UPDATE event.
  20.414 - */
  20.415 -void xlvbd_update_vbds(void)
  20.416 -{
  20.417 -    int i, j, k, old_nr, new_nr;
  20.418 -    vdisk_t *old_info, *new_info, *merged_info;
  20.419 -
  20.420 -    old_info = vbd_info;
  20.421 -    old_nr   = nr_vbds;
  20.422 -
  20.423 -    new_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  20.424 -    if (!new_info)
  20.425 -        return;
  20.426 -
  20.427 -    if ( unlikely(new_nr = xlvbd_get_vbd_info(new_info)) < 0 )
  20.428 -        goto out;
  20.429 -
  20.430 -    /*
  20.431 -     * Final list maximum size is old list + new list. This occurs only when
  20.432 -     * old list and new list do not overlap at all, and we cannot yet destroy
  20.433 -     * VBDs in the old list because the usage counts are busy.
  20.434 -     */
  20.435 -    merged_info = kmalloc((old_nr + new_nr) * sizeof(vdisk_t), GFP_KERNEL);
  20.436 -    if (!merged_info)
  20.437 -        goto out;
  20.438 -
  20.439 -    /* @i tracks old list; @j tracks new list; @k tracks merged list. */
  20.440 -    i = j = k = 0;
  20.441 -
  20.442 -    while ( (i < old_nr) && (j < new_nr) )
  20.443 -    {
  20.444 -        if ( old_info[i].device < new_info[j].device )
  20.445 -        {
  20.446 -            if ( xlvbd_remove_device(old_info[i].device) != 0 )
  20.447 -                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  20.448 -            i++;
  20.449 -        }
  20.450 -        else if ( old_info[i].device > new_info[j].device )
  20.451 -        {
  20.452 -            if ( xlvbd_init_device(&new_info[j]) == 0 )
  20.453 -                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  20.454 -            j++;
  20.455 -        }
  20.456 -        else
  20.457 -        {
  20.458 -            if ( ((old_info[i].capacity == new_info[j].capacity) &&
  20.459 -                  (old_info[i].info == new_info[j].info)) ||
  20.460 -                 (xlvbd_remove_device(old_info[i].device) != 0) )
  20.461 -                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  20.462 -            else if ( xlvbd_init_device(&new_info[j]) == 0 )
  20.463 -                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  20.464 -            i++; j++;
  20.465 -        }
  20.466 -    }
  20.467 -
  20.468 -    for ( ; i < old_nr; i++ )
  20.469 -    {
  20.470 -        if ( xlvbd_remove_device(old_info[i].device) != 0 )
  20.471 -            memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  20.472 -    }
  20.473 -
  20.474 -    for ( ; j < new_nr; j++ )
  20.475 -    {
  20.476 -        if ( xlvbd_init_device(&new_info[j]) == 0 )
  20.477 -            memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  20.478 -    }
  20.479 -
  20.480 -    vbd_info = merged_info;
  20.481 -    nr_vbds  = k;
  20.482 -
  20.483 -    kfree(old_info);
  20.484 -out:
  20.485 -    kfree(new_info);
  20.486 -}
  20.487 -
  20.488 -
  20.489 -/*
  20.490 - * Set up all the linux device goop for the virtual block devices (vbd's) that
  20.491 - * we know about. Note that although from the backend driver's p.o.v. VBDs are
  20.492 - * addressed simply an opaque 16-bit device number, the domain creation tools 
  20.493 - * conventionally allocate these numbers to correspond to those used by 'real' 
  20.494 - * linux -- this is just for convenience as it means e.g. that the same 
  20.495 - * /etc/fstab can be used when booting with or without Xen.
  20.496 - */
  20.497 -int xlvbd_init(void)
  20.498 -{
  20.499 -    int i;
  20.500 -    
  20.501 -    /*
  20.502 -     * If compiled as a module, we don't support unloading yet. We therefore 
  20.503 -     * permanently increment the reference count to disallow it.
  20.504 -     */
  20.505 -    SET_MODULE_OWNER(&xlvbd_block_fops);
  20.506 -    MOD_INC_USE_COUNT;
  20.507 -
  20.508 -    /* Initialize the global arrays. */
  20.509 -    for ( i = 0; i < 256; i++ ) 
  20.510 -    {
  20.511 -        xlide_blksize_size[i]  = 1024;
  20.512 -        xlide_hardsect_size[i] = 512;
  20.513 -        xlide_max_sectors[i]   = 512;
  20.514 -
  20.515 -        xlscsi_blksize_size[i]  = 1024;
  20.516 -        xlscsi_hardsect_size[i] = 512;
  20.517 -        xlscsi_max_sectors[i]   = 512;
  20.518 -
  20.519 -        xlvbd_blksize_size[i]  = 512;
  20.520 -        xlvbd_hardsect_size[i] = 512;
  20.521 -        xlvbd_max_sectors[i]   = 512;
  20.522 -    }
  20.523 -
  20.524 -    vbd_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  20.525 -    if (!vbd_info)
  20.526 -        return -ENOMEM;
  20.527 -
  20.528 -    nr_vbds  = xlvbd_get_vbd_info(vbd_info);
  20.529 -
  20.530 -    if ( nr_vbds < 0 )
  20.531 -    {
  20.532 -        kfree(vbd_info);
  20.533 -        vbd_info = NULL;
  20.534 -        nr_vbds  = 0;
  20.535 -    }
  20.536 -    else
  20.537 -    {
  20.538 -        for ( i = 0; i < nr_vbds; i++ )
  20.539 -            xlvbd_init_device(&vbd_info[i]);
  20.540 -    }
  20.541 -
  20.542 -    return 0;
  20.543 -}
    21.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/console/Makefile	Fri Jul 29 11:52:33 2005 -0700
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,3 +0,0 @@
    21.4 -O_TARGET := drv.o
    21.5 -obj-$(CONFIG_XEN_CONSOLE) := console.o
    21.6 -include $(TOPDIR)/Rules.make
    22.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/dom0/Makefile	Fri Jul 29 11:52:33 2005 -0700
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,3 +0,0 @@
    22.4 -O_TARGET := drv.o
    22.5 -obj-y := core.o
    22.6 -include $(TOPDIR)/Rules.make
    23.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/evtchn/Makefile	Fri Jul 29 11:52:33 2005 -0700
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,3 +0,0 @@
    23.4 -O_TARGET := drv.o
    23.5 -obj-y := evtchn.o
    23.6 -include $(TOPDIR)/Rules.make
    24.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/netif/Makefile	Fri Jul 29 11:52:33 2005 -0700
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,10 +0,0 @@
    24.4 -
    24.5 -O_TARGET := drv.o
    24.6 -
    24.7 -subdir-$(CONFIG_XEN_NETDEV_FRONTEND) += frontend
    24.8 -obj-$(CONFIG_XEN_NETDEV_FRONTEND)    += frontend/drv.o
    24.9 -
   24.10 -subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
   24.11 -obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
   24.12 -
   24.13 -include $(TOPDIR)/Rules.make
    25.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/netif/backend/Makefile	Fri Jul 29 11:52:33 2005 -0700
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,4 +0,0 @@
    25.4 -O_TARGET := drv.o
    25.5 -export-objs := interface.o
    25.6 -obj-y := main.o control.o interface.o
    25.7 -include $(TOPDIR)/Rules.make
    26.1 --- a/linux-2.4.30-xen-sparse/arch/xen/drivers/netif/frontend/Makefile	Fri Jul 29 11:52:33 2005 -0700
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,3 +0,0 @@
    26.4 -O_TARGET := drv.o
    26.5 -obj-y := main.o
    26.6 -include $(TOPDIR)/Rules.make
    27.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/Makefile	Fri Jul 29 11:52:33 2005 -0700
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,20 +0,0 @@
    27.4 -
    27.5 -.S.o:
    27.6 -	$(CC) $(AFLAGS) -traditional -c $< -o $*.o
    27.7 -
    27.8 -all: kernel.o head.o init_task.o
    27.9 -
   27.10 -O_TARGET := kernel.o
   27.11 -
   27.12 -export-objs     := i386_ksyms.o gnttab.o skbuff.o ctrl_if.o
   27.13 -
   27.14 -obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o  \
   27.15 -		ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o \
   27.16 -		i386_ksyms.o i387.o evtchn.o ctrl_if.o pci-dma.o \
   27.17 -		reboot.o fixup.o gnttab.o skbuff.o
   27.18 -
   27.19 -ifdef CONFIG_PCI
   27.20 -obj-y	+= pci-i386.o pci-pc.o
   27.21 -endif
   27.22 -
   27.23 -include $(TOPDIR)/Rules.make
    28.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/entry.S	Fri Jul 29 11:52:33 2005 -0700
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,779 +0,0 @@
    28.4 -/*
    28.5 - *  linux/arch/i386/entry.S
    28.6 - *
    28.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    28.8 - */
    28.9 -
   28.10 -/*
   28.11 - * entry.S contains the system-call and fault low-level handling routines.
   28.12 - * This also contains the timer-interrupt handler, as well as all interrupts
   28.13 - * and faults that can result in a task-switch.
   28.14 - *
   28.15 - * NOTE: This code handles signal-recognition, which happens every time
   28.16 - * after a timer-interrupt and after each system call.
   28.17 - *
   28.18 - * I changed all the .align's to 4 (16 byte alignment), as that's faster
   28.19 - * on a 486.
   28.20 - *
   28.21 - * Stack layout in 'ret_to_user':
   28.22 - * 	ptrace needs to have all regs on the stack.
   28.23 - *	if the order here is changed, it needs to be
   28.24 - *	updated in fork.c:copy_process, signal.c:do_signal,
   28.25 - *	ptrace.c and ptrace.h
   28.26 - *
   28.27 - *	 0(%esp) - %ebx
   28.28 - *	 4(%esp) - %ecx
   28.29 - *	 8(%esp) - %edx
   28.30 - *       C(%esp) - %esi
   28.31 - *	10(%esp) - %edi
   28.32 - *	14(%esp) - %ebp
   28.33 - *	18(%esp) - %eax
   28.34 - *	1C(%esp) - %ds
   28.35 - *	20(%esp) - %es
   28.36 - *	24(%esp) - orig_eax
   28.37 - *	28(%esp) - %eip
   28.38 - *	2C(%esp) - %cs
   28.39 - *	30(%esp) - %eflags
   28.40 - *	34(%esp) - %oldesp
   28.41 - *	38(%esp) - %oldss
   28.42 - *
   28.43 - * "current" is in register %ebx during any slow entries.
   28.44 - */
   28.45 -
   28.46 -#include <linux/config.h>
   28.47 -#include <linux/sys.h>
   28.48 -#include <linux/linkage.h>
   28.49 -#include <asm/segment.h>
   28.50 -#include <asm/smp.h>
   28.51 -
   28.52 -EBX		= 0x00
   28.53 -ECX		= 0x04
   28.54 -EDX		= 0x08
   28.55 -ESI		= 0x0C
   28.56 -EDI		= 0x10
   28.57 -EBP		= 0x14
   28.58 -EAX		= 0x18
   28.59 -DS		= 0x1C
   28.60 -ES		= 0x20
   28.61 -ORIG_EAX	= 0x24
   28.62 -EIP		= 0x28
   28.63 -CS		= 0x2C
   28.64 -EFLAGS		= 0x30
   28.65 -OLDESP		= 0x34
   28.66 -OLDSS		= 0x38
   28.67 -
   28.68 -CF_MASK		= 0x00000001
   28.69 -TF_MASK		= 0x00000100
   28.70 -IF_MASK		= 0x00000200
   28.71 -DF_MASK		= 0x00000400
   28.72 -NT_MASK		= 0x00004000
   28.73 -
   28.74 -/* Offsets into task_struct. */
   28.75 -state		=  0
   28.76 -flags		=  4
   28.77 -sigpending	=  8
   28.78 -addr_limit	= 12
   28.79 -exec_domain	= 16
   28.80 -need_resched	= 20
   28.81 -tsk_ptrace	= 24
   28.82 -processor	= 52
   28.83 -
   28.84 -/* Offsets into shared_info_t. */
   28.85 -#define evtchn_upcall_pending /* 0 */
   28.86 -#define evtchn_upcall_mask       1
   28.87 -
   28.88 -ENOSYS = 38
   28.89 -
   28.90 -
   28.91 -#define SAVE_ALL \
   28.92 -	cld; \
   28.93 -	pushl %es; \
   28.94 -	pushl %ds; \
   28.95 -	pushl %eax; \
   28.96 -	pushl %ebp; \
   28.97 -	pushl %edi; \
   28.98 -	pushl %esi; \
   28.99 -	pushl %edx; \
  28.100 -	pushl %ecx; \
  28.101 -	pushl %ebx; \
  28.102 -	movl $(__KERNEL_DS),%edx; \
  28.103 -	movl %edx,%ds; \
  28.104 -	movl %edx,%es;
  28.105 -
  28.106 -#define RESTORE_ALL	\
  28.107 -	popl %ebx;	\
  28.108 -	popl %ecx;	\
  28.109 -	popl %edx;	\
  28.110 -	popl %esi;	\
  28.111 -	popl %edi;	\
  28.112 -	popl %ebp;	\
  28.113 -	popl %eax;	\
  28.114 -1:	popl %ds;	\
  28.115 -2:	popl %es;	\
  28.116 -	addl $4,%esp;	\
  28.117 -3:	iret;		\
  28.118 -.section .fixup,"ax";	\
  28.119 -4:	movl $0,(%esp);	\
  28.120 -	jmp 1b;		\
  28.121 -5:	movl $0,(%esp);	\
  28.122 -	jmp 2b;		\
  28.123 -6:	pushl %ss;	\
  28.124 -	popl %ds;	\
  28.125 -	pushl %ss;	\
  28.126 -	popl %es;	\
  28.127 -	pushl $11;	\
  28.128 -	call do_exit;	\
  28.129 -.previous;		\
  28.130 -.section __ex_table,"a";\
  28.131 -	.align 4;	\
  28.132 -	.long 1b,4b;	\
  28.133 -	.long 2b,5b;	\
  28.134 -	.long 3b,6b;	\
  28.135 -.previous
  28.136 -
  28.137 -#define GET_CURRENT(reg) \
  28.138 -	movl $-8192, reg; \
  28.139 -	andl %esp, reg
  28.140 -
  28.141 -ENTRY(lcall7)
  28.142 -	pushfl			# We get a different stack layout with call
  28.143 -	pushl %eax		# gates, which has to be cleaned up later..
  28.144 -	SAVE_ALL
  28.145 -	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
  28.146 -	movl CS(%esp),%edx	# this is eip..
  28.147 -	movl EFLAGS(%esp),%ecx	# and this is cs..
  28.148 -	movl %eax,EFLAGS(%esp)	#
  28.149 -	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
  28.150 -	pushl %eax
  28.151 -	popfl
  28.152 -	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  28.153 -	movl %ecx,CS(%esp)	#
  28.154 -	movl %esp,%ebx
  28.155 -	pushl %ebx
  28.156 -	andl $-8192,%ebx	# GET_CURRENT
  28.157 -	movl exec_domain(%ebx),%edx	# Get the execution domain
  28.158 -	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
  28.159 -	pushl $0x7
  28.160 -	call *%edx
  28.161 -	addl $4, %esp
  28.162 -	popl %eax
  28.163 -	jmp ret_to_user
  28.164 -
  28.165 -ENTRY(lcall27)
  28.166 -	pushfl			# We get a different stack layout with call
  28.167 -	pushl %eax		# gates, which has to be cleaned up later..
  28.168 -	SAVE_ALL
  28.169 -	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
  28.170 -	movl CS(%esp),%edx	# this is eip..
  28.171 -	movl EFLAGS(%esp),%ecx	# and this is cs..
  28.172 -	movl %eax,EFLAGS(%esp)	#
  28.173 -	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
  28.174 -	pushl %eax
  28.175 -	popfl
  28.176 -	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  28.177 -	movl %ecx,CS(%esp)	#
  28.178 -	movl %esp,%ebx
  28.179 -	pushl %ebx
  28.180 -	andl $-8192,%ebx	# GET_CURRENT
  28.181 -	movl exec_domain(%ebx),%edx	# Get the execution domain
  28.182 -	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
  28.183 -	pushl $0x27
  28.184 -	call *%edx
  28.185 -	addl $4, %esp
  28.186 -	popl %eax
  28.187 -	jmp ret_to_user
  28.188 -
  28.189 -ENTRY(ret_from_fork)
  28.190 -	pushl %ebx
  28.191 -	call SYMBOL_NAME(schedule_tail)
  28.192 -	addl $4, %esp
  28.193 -	GET_CURRENT(%ebx)
  28.194 -	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  28.195 -	jne tracesys_exit
  28.196 -	jmp ret_to_user
  28.197 -
  28.198 -/*
  28.199 - * Return to user mode is not as complex as all this looks,
  28.200 - * but we want the default path for a system call return to
  28.201 - * go as quickly as possible which is why some of this is
  28.202 - * less clear than it otherwise should be.
  28.203 - */
  28.204 -ENTRY(system_call)
  28.205 -	pushl %eax			# save orig_eax
  28.206 -	SAVE_ALL
  28.207 -	GET_CURRENT(%ebx)
  28.208 -	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  28.209 -	jne tracesys
  28.210 -	cmpl $(NR_syscalls),%eax
  28.211 -	jae badsys
  28.212 -	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  28.213 -	movl %eax,EAX(%esp)		# save the return value
  28.214 -ret_to_user:
  28.215 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  28.216 -        movb $1,evtchn_upcall_mask(%esi) # make tests atomic
  28.217 -ret_to_user_nocli:
  28.218 -	cmpl $0,need_resched(%ebx)
  28.219 -	jne  reschedule
  28.220 -	cmpl $0,sigpending(%ebx)
  28.221 -	je   safesti                    # ensure need_resched updates are seen
  28.222 -/*signal_return:*/
  28.223 -	movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
  28.224 -	movl %esp,%eax
  28.225 -	xorl %edx,%edx
  28.226 -	call SYMBOL_NAME(do_signal)
  28.227 -	jmp  safesti
  28.228 -
  28.229 -	ALIGN
  28.230 -restore_all:
  28.231 -	RESTORE_ALL
  28.232 -
  28.233 -	ALIGN
  28.234 -tracesys:
  28.235 -	movl $-ENOSYS,EAX(%esp)
  28.236 -	call SYMBOL_NAME(syscall_trace)
  28.237 -	movl ORIG_EAX(%esp),%eax
  28.238 -	cmpl $(NR_syscalls),%eax
  28.239 -	jae tracesys_exit
  28.240 -	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  28.241 -	movl %eax,EAX(%esp)		# save the return value
  28.242 -tracesys_exit:
  28.243 -	call SYMBOL_NAME(syscall_trace)
  28.244 -	jmp ret_to_user
  28.245 -badsys:
  28.246 -	movl $-ENOSYS,EAX(%esp)
  28.247 -	jmp ret_to_user
  28.248 -
  28.249 -	ALIGN
  28.250 -ENTRY(ret_from_intr)
  28.251 -	GET_CURRENT(%ebx)
  28.252 -ret_from_exception:
  28.253 -	movb CS(%esp),%al
  28.254 -	testl $2,%eax
  28.255 -	jne ret_to_user
  28.256 -	jmp restore_all
  28.257 -
  28.258 -	ALIGN
  28.259 -reschedule:
  28.260 -        movb $0,evtchn_upcall_mask(%esi)  # reenable event callbacks
  28.261 -	call SYMBOL_NAME(schedule)        # test
  28.262 -	jmp  ret_to_user
  28.263 -
  28.264 -ENTRY(divide_error)
  28.265 -	pushl $0		# no error code
  28.266 -	pushl $ SYMBOL_NAME(do_divide_error)
  28.267 -	ALIGN
  28.268 -error_code:
  28.269 -	pushl %ds
  28.270 -	pushl %eax
  28.271 -	xorl %eax,%eax
  28.272 -	pushl %ebp
  28.273 -	pushl %edi
  28.274 -	pushl %esi
  28.275 -	pushl %edx
  28.276 -	decl %eax			# eax = -1
  28.277 -	pushl %ecx
  28.278 -	pushl %ebx
  28.279 -	GET_CURRENT(%ebx)
  28.280 -	cld
  28.281 -	movl %es,%ecx
  28.282 -	movl ORIG_EAX(%esp), %esi	# get the error code
  28.283 -	movl ES(%esp), %edi		# get the function address
  28.284 -	movl %eax, ORIG_EAX(%esp)
  28.285 -	movl %ecx, ES(%esp)
  28.286 -	movl %esp,%edx
  28.287 -	pushl %esi			# push the error code
  28.288 -	pushl %edx			# push the pt_regs pointer
  28.289 -	movl $(__KERNEL_DS),%edx
  28.290 -	movl %edx,%ds
  28.291 -	movl %edx,%es
  28.292 -	call *%edi
  28.293 -	addl $8,%esp
  28.294 -	jmp ret_from_exception
  28.295 -
  28.296 -# A note on the "critical region" in our callback handler.
  28.297 -# We want to avoid stacking callback handlers due to events occurring
  28.298 -# during handling of the last event. To do this, we keep events disabled
  28.299 -# until we've done all processing. HOWEVER, we must enable events before
  28.300 -# popping the stack frame (can't be done atomically) and so it would still
  28.301 -# be possible to get enough handler activations to overflow the stack.
  28.302 -# Although unlikely, bugs of that kind are hard to track down, so we'd
  28.303 -# like to avoid the possibility.
  28.304 -# So, on entry to the handler we detect whether we interrupted an
  28.305 -# existing activation in its critical region -- if so, we pop the current
  28.306 -# activation and restart the handler using the previous one.
  28.307 -ENTRY(hypervisor_callback)
  28.308 -        pushl %eax
  28.309 -        SAVE_ALL
  28.310 -        GET_CURRENT(%ebx)
  28.311 -        movl EIP(%esp),%eax
  28.312 -        cmpl $scrit,%eax
  28.313 -        jb   11f
  28.314 -        cmpl $ecrit,%eax
  28.315 -        jb   critical_region_fixup
  28.316 -11:     push %esp
  28.317 -        call evtchn_do_upcall
  28.318 -        add  $4,%esp
  28.319 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  28.320 -        movb CS(%esp),%cl
  28.321 -	test $2,%cl          # slow return to ring 2 or 3
  28.322 -	jne  ret_to_user_nocli
  28.323 -safesti:movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
  28.324 -scrit:  /**** START OF CRITICAL REGION ****/
  28.325 -        testb $0xFF,evtchn_upcall_pending(%esi)
  28.326 -        jnz  14f              # process more events if necessary...
  28.327 -        RESTORE_ALL
  28.328 -14:     movb $1,evtchn_upcall_mask(%esi)
  28.329 -        jmp  11b
  28.330 -ecrit:  /**** END OF CRITICAL REGION ****/
  28.331 -# [How we do the fixup]. We want to merge the current stack frame with the
  28.332 -# just-interrupted frame. How we do this depends on where in the critical
  28.333 -# region the interrupted handler was executing, and so how many saved
  28.334 -# registers are in each frame. We do this quickly using the lookup table
  28.335 -# 'critical_fixup_table'. For each byte offset in the critical region, it
  28.336 -# provides the number of bytes which have already been popped from the
  28.337 -# interrupted stack frame. 
  28.338 -critical_region_fixup:
  28.339 -        addl $critical_fixup_table-scrit,%eax
  28.340 -        movzbl (%eax),%eax    # %eax contains num bytes popped
  28.341 -        mov  %esp,%esi
  28.342 -        add  %eax,%esi        # %esi points at end of src region
  28.343 -        mov  %esp,%edi
  28.344 -        add  $0x34,%edi       # %edi points at end of dst region
  28.345 -        mov  %eax,%ecx
  28.346 -        shr  $2,%ecx          # convert words to bytes
  28.347 -        je   16f              # skip loop if nothing to copy
  28.348 -15:     subl $4,%esi          # pre-decrementing copy loop
  28.349 -        subl $4,%edi
  28.350 -        movl (%esi),%eax
  28.351 -        movl %eax,(%edi)
  28.352 -        loop 15b
  28.353 -16:     movl %edi,%esp        # final %edi is top of merged stack
  28.354 -        jmp  11b
  28.355 -        
  28.356 -critical_fixup_table:        
  28.357 -        .byte 0x00,0x00,0x00                  # testb $0xFF,(%esi)
  28.358 -        .byte 0x00,0x00                       # jnz  14f
  28.359 -        .byte 0x00                            # pop  %ebx
  28.360 -        .byte 0x04                            # pop  %ecx
  28.361 -        .byte 0x08                            # pop  %edx
  28.362 -        .byte 0x0c                            # pop  %esi
  28.363 -        .byte 0x10                            # pop  %edi
  28.364 -        .byte 0x14                            # pop  %ebp
  28.365 -        .byte 0x18                            # pop  %eax
  28.366 -        .byte 0x1c                            # pop  %ds
  28.367 -        .byte 0x20                            # pop  %es
  28.368 -        .byte 0x24,0x24,0x24                  # add  $4,%esp
  28.369 -        .byte 0x28                            # iret
  28.370 -        .byte 0x00,0x00,0x00,0x00             # movb $1,4(%esi)
  28.371 -        .byte 0x00,0x00                       # jmp  11b
  28.372 -
  28.373 -# Hypervisor uses this for application faults while it executes.
  28.374 -ENTRY(failsafe_callback)
  28.375 -1:      popl %ds
  28.376 -2:      popl %es
  28.377 -3:      popl %fs
  28.378 -4:      popl %gs
  28.379 -5:      iret
  28.380 -.section .fixup,"ax";	\
  28.381 -6:	movl $0,(%esp);	\
  28.382 -	jmp 1b;		\
  28.383 -7:	movl $0,(%esp);	\
  28.384 -	jmp 2b;		\
  28.385 -8:	movl $0,(%esp);	\
  28.386 -	jmp 3b;		\
  28.387 -9:	movl $0,(%esp);	\
  28.388 -	jmp 4b;		\
  28.389 -10:	pushl %ss;	\
  28.390 -	popl %ds;	\
  28.391 -	pushl %ss;	\
  28.392 -	popl %es;	\
  28.393 -	pushl $11;	\
  28.394 -	call do_exit;	\
  28.395 -.previous;		\
  28.396 -.section __ex_table,"a";\
  28.397 -	.align 4;	\
  28.398 -	.long 1b,6b;	\
  28.399 -	.long 2b,7b;	\
  28.400 -	.long 3b,8b;	\
  28.401 -	.long 4b,9b;	\
  28.402 -	.long 5b,10b;	\
  28.403 -.previous
  28.404 -        
  28.405 -ENTRY(coprocessor_error)
  28.406 -	pushl $0
  28.407 -	pushl $ SYMBOL_NAME(do_coprocessor_error)
  28.408 -	jmp error_code
  28.409 -
  28.410 -ENTRY(simd_coprocessor_error)
  28.411 -	pushl $0
  28.412 -	pushl $ SYMBOL_NAME(do_simd_coprocessor_error)
  28.413 -	jmp error_code
  28.414 -
  28.415 -ENTRY(device_not_available)
  28.416 -	pushl $-1		# mark this as an int
  28.417 -	SAVE_ALL
  28.418 -	GET_CURRENT(%ebx)
  28.419 -	call SYMBOL_NAME(math_state_restore)
  28.420 -	jmp ret_from_exception
  28.421 -
  28.422 -ENTRY(debug)
  28.423 -	pushl $0
  28.424 -	pushl $ SYMBOL_NAME(do_debug)
  28.425 -	jmp error_code
  28.426 -
  28.427 -ENTRY(int3)
  28.428 -	pushl $0
  28.429 -	pushl $ SYMBOL_NAME(do_int3)
  28.430 -	jmp error_code
  28.431 -
  28.432 -ENTRY(overflow)
  28.433 -	pushl $0
  28.434 -	pushl $ SYMBOL_NAME(do_overflow)
  28.435 -	jmp error_code
  28.436 -
  28.437 -ENTRY(bounds)
  28.438 -	pushl $0
  28.439 -	pushl $ SYMBOL_NAME(do_bounds)
  28.440 -	jmp error_code
  28.441 -
  28.442 -ENTRY(invalid_op)
  28.443 -	pushl $0
  28.444 -	pushl $ SYMBOL_NAME(do_invalid_op)
  28.445 -	jmp error_code
  28.446 -
  28.447 -ENTRY(coprocessor_segment_overrun)
  28.448 -	pushl $0
  28.449 -	pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
  28.450 -	jmp error_code
  28.451 -
  28.452 -ENTRY(double_fault)
  28.453 -	pushl $ SYMBOL_NAME(do_double_fault)
  28.454 -	jmp error_code
  28.455 -
  28.456 -ENTRY(invalid_TSS)
  28.457 -	pushl $ SYMBOL_NAME(do_invalid_TSS)
  28.458 -	jmp error_code
  28.459 -
  28.460 -ENTRY(segment_not_present)
  28.461 -	pushl $ SYMBOL_NAME(do_segment_not_present)
  28.462 -	jmp error_code
  28.463 -
  28.464 -ENTRY(stack_segment)
  28.465 -	pushl $ SYMBOL_NAME(do_stack_segment)
  28.466 -	jmp error_code
  28.467 -
  28.468 -ENTRY(general_protection)
  28.469 -	pushl $ SYMBOL_NAME(do_general_protection)
  28.470 -	jmp error_code
  28.471 -
  28.472 -ENTRY(alignment_check)
  28.473 -	pushl $ SYMBOL_NAME(do_alignment_check)
  28.474 -	jmp error_code
  28.475 -
  28.476 -# This handler is special, because it gets an extra value on its stack,
  28.477 -# which is the linear faulting address.
  28.478 -#define PAGE_FAULT_STUB(_name1, _name2)                                  \
  28.479 -ENTRY(_name1)                                                            \
  28.480 -	pushl %ds                                                      ; \
  28.481 -	pushl %eax                                                     ; \
  28.482 -	xorl %eax,%eax                                                 ; \
  28.483 -	pushl %ebp                                                     ; \
  28.484 -	pushl %edi                                                     ; \
  28.485 -	pushl %esi                                                     ; \
  28.486 -	pushl %edx                                                     ; \
  28.487 -	decl %eax                      /* eax = -1 */                  ; \
  28.488 -	pushl %ecx                                                     ; \
  28.489 -	pushl %ebx                                                     ; \
  28.490 -	GET_CURRENT(%ebx)                                              ; \
  28.491 -	cld                                                            ; \
  28.492 -	movl %es,%ecx                                                  ; \
  28.493 -	movl ORIG_EAX(%esp), %esi      /* get the error code */        ; \
  28.494 -	movl ES(%esp), %edi            /* get the faulting address */  ; \
  28.495 -	movl %eax, ORIG_EAX(%esp)                                      ; \
  28.496 -	movl %ecx, ES(%esp)                                            ; \
  28.497 -	movl %esp,%edx                                                 ; \
  28.498 -        pushl %edi                     /* push the faulting address */ ; \
  28.499 -	pushl %esi                     /* push the error code */       ; \
  28.500 -	pushl %edx                     /* push the pt_regs pointer */  ; \
  28.501 -	movl $(__KERNEL_DS),%edx                                       ; \
  28.502 -	movl %edx,%ds                                                  ; \
  28.503 -	movl %edx,%es                                                  ; \
  28.504 -	call SYMBOL_NAME(_name2)                                       ; \
  28.505 -	addl $12,%esp                                                  ; \
  28.506 -	jmp ret_from_exception                                         ;
  28.507 -PAGE_FAULT_STUB(page_fault, do_page_fault)
  28.508 -
  28.509 -ENTRY(machine_check)
  28.510 -	pushl $0
  28.511 -	pushl $ SYMBOL_NAME(do_machine_check)
  28.512 -	jmp error_code
  28.513 -
  28.514 -ENTRY(fixup_4gb_segment)
  28.515 -	pushl $ SYMBOL_NAME(do_fixup_4gb_segment)
  28.516 -	jmp error_code
  28.517 -
  28.518 -.data
  28.519 -ENTRY(sys_call_table)
  28.520 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 0  -  old "setup()" system call*/
  28.521 -	.long SYMBOL_NAME(sys_exit)
  28.522 -	.long SYMBOL_NAME(sys_fork)
  28.523 -	.long SYMBOL_NAME(sys_read)
  28.524 -	.long SYMBOL_NAME(sys_write)
  28.525 -	.long SYMBOL_NAME(sys_open)		/* 5 */
  28.526 -	.long SYMBOL_NAME(sys_close)
  28.527 -	.long SYMBOL_NAME(sys_waitpid)
  28.528 -	.long SYMBOL_NAME(sys_creat)
  28.529 -	.long SYMBOL_NAME(sys_link)
  28.530 -	.long SYMBOL_NAME(sys_unlink)		/* 10 */
  28.531 -	.long SYMBOL_NAME(sys_execve)
  28.532 -	.long SYMBOL_NAME(sys_chdir)
  28.533 -	.long SYMBOL_NAME(sys_time)
  28.534 -	.long SYMBOL_NAME(sys_mknod)
  28.535 -	.long SYMBOL_NAME(sys_chmod)		/* 15 */
  28.536 -	.long SYMBOL_NAME(sys_lchown16)
  28.537 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old break syscall holder */
  28.538 -	.long SYMBOL_NAME(sys_stat)
  28.539 -	.long SYMBOL_NAME(sys_lseek)
  28.540 -	.long SYMBOL_NAME(sys_getpid)		/* 20 */
  28.541 -	.long SYMBOL_NAME(sys_mount)
  28.542 -	.long SYMBOL_NAME(sys_oldumount)
  28.543 -	.long SYMBOL_NAME(sys_setuid16)
  28.544 -	.long SYMBOL_NAME(sys_getuid16)
  28.545 -	.long SYMBOL_NAME(sys_stime)		/* 25 */
  28.546 -	.long SYMBOL_NAME(sys_ptrace)
  28.547 -	.long SYMBOL_NAME(sys_alarm)
  28.548 -	.long SYMBOL_NAME(sys_fstat)
  28.549 -	.long SYMBOL_NAME(sys_pause)
  28.550 -	.long SYMBOL_NAME(sys_utime)		/* 30 */
  28.551 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old stty syscall holder */
  28.552 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old gtty syscall holder */
  28.553 -	.long SYMBOL_NAME(sys_access)
  28.554 -	.long SYMBOL_NAME(sys_nice)
  28.555 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 35 */		/* old ftime syscall holder */
  28.556 -	.long SYMBOL_NAME(sys_sync)
  28.557 -	.long SYMBOL_NAME(sys_kill)
  28.558 -	.long SYMBOL_NAME(sys_rename)
  28.559 -	.long SYMBOL_NAME(sys_mkdir)
  28.560 -	.long SYMBOL_NAME(sys_rmdir)		/* 40 */
  28.561 -	.long SYMBOL_NAME(sys_dup)
  28.562 -	.long SYMBOL_NAME(sys_pipe)
  28.563 -	.long SYMBOL_NAME(sys_times)
  28.564 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old prof syscall holder */
  28.565 -	.long SYMBOL_NAME(sys_brk)		/* 45 */
  28.566 -	.long SYMBOL_NAME(sys_setgid16)
  28.567 -	.long SYMBOL_NAME(sys_getgid16)
  28.568 -	.long SYMBOL_NAME(sys_signal)
  28.569 -	.long SYMBOL_NAME(sys_geteuid16)
  28.570 -	.long SYMBOL_NAME(sys_getegid16)	/* 50 */
  28.571 -	.long SYMBOL_NAME(sys_acct)
  28.572 -	.long SYMBOL_NAME(sys_umount)					/* recycled never used phys() */
  28.573 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old lock syscall holder */
  28.574 -	.long SYMBOL_NAME(sys_ioctl)
  28.575 -	.long SYMBOL_NAME(sys_fcntl)		/* 55 */
  28.576 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old mpx syscall holder */
  28.577 -	.long SYMBOL_NAME(sys_setpgid)
  28.578 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old ulimit syscall holder */
  28.579 -	.long SYMBOL_NAME(sys_olduname)
  28.580 -	.long SYMBOL_NAME(sys_umask)		/* 60 */
  28.581 -	.long SYMBOL_NAME(sys_chroot)
  28.582 -	.long SYMBOL_NAME(sys_ustat)
  28.583 -	.long SYMBOL_NAME(sys_dup2)
  28.584 -	.long SYMBOL_NAME(sys_getppid)
  28.585 -	.long SYMBOL_NAME(sys_getpgrp)		/* 65 */
  28.586 -	.long SYMBOL_NAME(sys_setsid)
  28.587 -	.long SYMBOL_NAME(sys_sigaction)
  28.588 -	.long SYMBOL_NAME(sys_sgetmask)
  28.589 -	.long SYMBOL_NAME(sys_ssetmask)
  28.590 -	.long SYMBOL_NAME(sys_setreuid16)	/* 70 */
  28.591 -	.long SYMBOL_NAME(sys_setregid16)
  28.592 -	.long SYMBOL_NAME(sys_sigsuspend)
  28.593 -	.long SYMBOL_NAME(sys_sigpending)
  28.594 -	.long SYMBOL_NAME(sys_sethostname)
  28.595 -	.long SYMBOL_NAME(sys_setrlimit)	/* 75 */
  28.596 -	.long SYMBOL_NAME(sys_old_getrlimit)
  28.597 -	.long SYMBOL_NAME(sys_getrusage)
  28.598 -	.long SYMBOL_NAME(sys_gettimeofday)
  28.599 -	.long SYMBOL_NAME(sys_settimeofday)
  28.600 -	.long SYMBOL_NAME(sys_getgroups16)	/* 80 */
  28.601 -	.long SYMBOL_NAME(sys_setgroups16)
  28.602 -	.long SYMBOL_NAME(old_select)
  28.603 -	.long SYMBOL_NAME(sys_symlink)
  28.604 -	.long SYMBOL_NAME(sys_lstat)
  28.605 -	.long SYMBOL_NAME(sys_readlink)		/* 85 */
  28.606 -	.long SYMBOL_NAME(sys_uselib)
  28.607 -	.long SYMBOL_NAME(sys_swapon)
  28.608 -	.long SYMBOL_NAME(sys_reboot)
  28.609 -	.long SYMBOL_NAME(old_readdir)
  28.610 -	.long SYMBOL_NAME(old_mmap)		/* 90 */
  28.611 -	.long SYMBOL_NAME(sys_munmap)
  28.612 -	.long SYMBOL_NAME(sys_truncate)
  28.613 -	.long SYMBOL_NAME(sys_ftruncate)
  28.614 -	.long SYMBOL_NAME(sys_fchmod)
  28.615 -	.long SYMBOL_NAME(sys_fchown16)		/* 95 */
  28.616 -	.long SYMBOL_NAME(sys_getpriority)
  28.617 -	.long SYMBOL_NAME(sys_setpriority)
  28.618 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old profil syscall holder */
  28.619 -	.long SYMBOL_NAME(sys_statfs)
  28.620 -	.long SYMBOL_NAME(sys_fstatfs)		/* 100 */
  28.621 -	.long SYMBOL_NAME(sys_ioperm)
  28.622 -	.long SYMBOL_NAME(sys_socketcall)
  28.623 -	.long SYMBOL_NAME(sys_syslog)
  28.624 -	.long SYMBOL_NAME(sys_setitimer)
  28.625 -	.long SYMBOL_NAME(sys_getitimer)	/* 105 */
  28.626 -	.long SYMBOL_NAME(sys_newstat)
  28.627 -	.long SYMBOL_NAME(sys_newlstat)
  28.628 -	.long SYMBOL_NAME(sys_newfstat)
  28.629 -	.long SYMBOL_NAME(sys_uname)
  28.630 -	.long SYMBOL_NAME(sys_iopl)		/* 110 */
  28.631 -	.long SYMBOL_NAME(sys_vhangup)
  28.632 -	.long SYMBOL_NAME(sys_ni_syscall)	/* old "idle" system call */
  28.633 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  28.634 -	.long SYMBOL_NAME(sys_wait4)
  28.635 -	.long SYMBOL_NAME(sys_swapoff)		/* 115 */
  28.636 -	.long SYMBOL_NAME(sys_sysinfo)
  28.637 -	.long SYMBOL_NAME(sys_ipc)
  28.638 -	.long SYMBOL_NAME(sys_fsync)
  28.639 -	.long SYMBOL_NAME(sys_sigreturn)
  28.640 -	.long SYMBOL_NAME(sys_clone)		/* 120 */
  28.641 -	.long SYMBOL_NAME(sys_setdomainname)
  28.642 -	.long SYMBOL_NAME(sys_newuname)
  28.643 -	.long SYMBOL_NAME(sys_modify_ldt)
  28.644 -	.long SYMBOL_NAME(sys_adjtimex)
  28.645 -	.long SYMBOL_NAME(sys_mprotect)		/* 125 */
  28.646 -	.long SYMBOL_NAME(sys_sigprocmask)
  28.647 -	.long SYMBOL_NAME(sys_create_module)
  28.648 -	.long SYMBOL_NAME(sys_init_module)
  28.649 -	.long SYMBOL_NAME(sys_delete_module)
  28.650 -	.long SYMBOL_NAME(sys_get_kernel_syms)	/* 130 */
  28.651 -	.long SYMBOL_NAME(sys_quotactl)
  28.652 -	.long SYMBOL_NAME(sys_getpgid)
  28.653 -	.long SYMBOL_NAME(sys_fchdir)
  28.654 -	.long SYMBOL_NAME(sys_bdflush)
  28.655 -	.long SYMBOL_NAME(sys_sysfs)		/* 135 */
  28.656 -	.long SYMBOL_NAME(sys_personality)
  28.657 -	.long SYMBOL_NAME(sys_ni_syscall)	/* for afs_syscall */
  28.658 -	.long SYMBOL_NAME(sys_setfsuid16)
  28.659 -	.long SYMBOL_NAME(sys_setfsgid16)
  28.660 -	.long SYMBOL_NAME(sys_llseek)		/* 140 */
  28.661 -	.long SYMBOL_NAME(sys_getdents)
  28.662 -	.long SYMBOL_NAME(sys_select)
  28.663 -	.long SYMBOL_NAME(sys_flock)
  28.664 -	.long SYMBOL_NAME(sys_msync)
  28.665 -	.long SYMBOL_NAME(sys_readv)		/* 145 */
  28.666 -	.long SYMBOL_NAME(sys_writev)
  28.667 -	.long SYMBOL_NAME(sys_getsid)
  28.668 -	.long SYMBOL_NAME(sys_fdatasync)
  28.669 -	.long SYMBOL_NAME(sys_sysctl)
  28.670 -	.long SYMBOL_NAME(sys_mlock)		/* 150 */
  28.671 -	.long SYMBOL_NAME(sys_munlock)
  28.672 -	.long SYMBOL_NAME(sys_mlockall)
  28.673 -	.long SYMBOL_NAME(sys_munlockall)
  28.674 -	.long SYMBOL_NAME(sys_sched_setparam)
  28.675 -	.long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
  28.676 -	.long SYMBOL_NAME(sys_sched_setscheduler)
  28.677 -	.long SYMBOL_NAME(sys_sched_getscheduler)
  28.678 -	.long SYMBOL_NAME(sys_sched_yield)
  28.679 -	.long SYMBOL_NAME(sys_sched_get_priority_max)
  28.680 -	.long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
  28.681 -	.long SYMBOL_NAME(sys_sched_rr_get_interval)
  28.682 -	.long SYMBOL_NAME(sys_nanosleep)
  28.683 -	.long SYMBOL_NAME(sys_mremap)
  28.684 -	.long SYMBOL_NAME(sys_setresuid16)
  28.685 -	.long SYMBOL_NAME(sys_getresuid16)	/* 165 */
  28.686 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  28.687 -	.long SYMBOL_NAME(sys_query_module)
  28.688 -	.long SYMBOL_NAME(sys_poll)
  28.689 -	.long SYMBOL_NAME(sys_nfsservctl)
  28.690 -	.long SYMBOL_NAME(sys_setresgid16)	/* 170 */
  28.691 -	.long SYMBOL_NAME(sys_getresgid16)
  28.692 -	.long SYMBOL_NAME(sys_prctl)
  28.693 -	.long SYMBOL_NAME(sys_rt_sigreturn)
  28.694 -	.long SYMBOL_NAME(sys_rt_sigaction)
  28.695 -	.long SYMBOL_NAME(sys_rt_sigprocmask)	/* 175 */
  28.696 -	.long SYMBOL_NAME(sys_rt_sigpending)
  28.697 -	.long SYMBOL_NAME(sys_rt_sigtimedwait)
  28.698 -	.long SYMBOL_NAME(sys_rt_sigqueueinfo)
  28.699 -	.long SYMBOL_NAME(sys_rt_sigsuspend)
  28.700 -	.long SYMBOL_NAME(sys_pread)		/* 180 */
  28.701 -	.long SYMBOL_NAME(sys_pwrite)
  28.702 -	.long SYMBOL_NAME(sys_chown16)
  28.703 -	.long SYMBOL_NAME(sys_getcwd)
  28.704 -	.long SYMBOL_NAME(sys_capget)
  28.705 -	.long SYMBOL_NAME(sys_capset)           /* 185 */
  28.706 -	.long SYMBOL_NAME(sys_sigaltstack)
  28.707 -	.long SYMBOL_NAME(sys_sendfile)
  28.708 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams1 */
  28.709 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams2 */
  28.710 -	.long SYMBOL_NAME(sys_vfork)            /* 190 */
  28.711 -	.long SYMBOL_NAME(sys_getrlimit)
  28.712 -	.long SYMBOL_NAME(sys_mmap2)
  28.713 -	.long SYMBOL_NAME(sys_truncate64)
  28.714 -	.long SYMBOL_NAME(sys_ftruncate64)
  28.715 -	.long SYMBOL_NAME(sys_stat64)		/* 195 */
  28.716 -	.long SYMBOL_NAME(sys_lstat64)
  28.717 -	.long SYMBOL_NAME(sys_fstat64)
  28.718 -	.long SYMBOL_NAME(sys_lchown)
  28.719 -	.long SYMBOL_NAME(sys_getuid)
  28.720 -	.long SYMBOL_NAME(sys_getgid)		/* 200 */
  28.721 -	.long SYMBOL_NAME(sys_geteuid)
  28.722 -	.long SYMBOL_NAME(sys_getegid)
  28.723 -	.long SYMBOL_NAME(sys_setreuid)
  28.724 -	.long SYMBOL_NAME(sys_setregid)
  28.725 -	.long SYMBOL_NAME(sys_getgroups)	/* 205 */
  28.726 -	.long SYMBOL_NAME(sys_setgroups)
  28.727 -	.long SYMBOL_NAME(sys_fchown)
  28.728 -	.long SYMBOL_NAME(sys_setresuid)
  28.729 -	.long SYMBOL_NAME(sys_getresuid)
  28.730 -	.long SYMBOL_NAME(sys_setresgid)	/* 210 */
  28.731 -	.long SYMBOL_NAME(sys_getresgid)
  28.732 -	.long SYMBOL_NAME(sys_chown)
  28.733 -	.long SYMBOL_NAME(sys_setuid)
  28.734 -	.long SYMBOL_NAME(sys_setgid)
  28.735 -	.long SYMBOL_NAME(sys_setfsuid)		/* 215 */
  28.736 -	.long SYMBOL_NAME(sys_setfsgid)
  28.737 -	.long SYMBOL_NAME(sys_pivot_root)
  28.738 -	.long SYMBOL_NAME(sys_mincore)
  28.739 -	.long SYMBOL_NAME(sys_madvise)
  28.740 -	.long SYMBOL_NAME(sys_getdents64)	/* 220 */
  28.741 -	.long SYMBOL_NAME(sys_fcntl64)
  28.742 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for TUX */
  28.743 -	.long SYMBOL_NAME(sys_ni_syscall)	/* Reserved for Security */
  28.744 -	.long SYMBOL_NAME(sys_gettid)
  28.745 -	.long SYMBOL_NAME(sys_readahead)	/* 225 */
  28.746 -	.long SYMBOL_NAME(sys_setxattr)
  28.747 -	.long SYMBOL_NAME(sys_lsetxattr)
  28.748 -	.long SYMBOL_NAME(sys_fsetxattr)
  28.749 -	.long SYMBOL_NAME(sys_getxattr)
  28.750 -	.long SYMBOL_NAME(sys_lgetxattr)	/* 230 */
  28.751 -	.long SYMBOL_NAME(sys_fgetxattr)
  28.752 -	.long SYMBOL_NAME(sys_listxattr)
  28.753 -	.long SYMBOL_NAME(sys_llistxattr)
  28.754 -	.long SYMBOL_NAME(sys_flistxattr)
  28.755 -	.long SYMBOL_NAME(sys_removexattr)	/* 235 */
  28.756 -	.long SYMBOL_NAME(sys_lremovexattr)
  28.757 -	.long SYMBOL_NAME(sys_fremovexattr)
  28.758 - 	.long SYMBOL_NAME(sys_tkill)
  28.759 -	.long SYMBOL_NAME(sys_sendfile64)
  28.760 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 240 reserved for futex */
  28.761 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_setaffinity */
  28.762 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_getaffinity */
  28.763 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_thread_area */
  28.764 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_get_thread_area */
  28.765 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 245 sys_io_setup */
  28.766 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_destroy */
  28.767 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_getevents */
  28.768 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_submit */
  28.769 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_cancel */
  28.770 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 250 sys_alloc_hugepages */
  28.771 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_free_hugepages */
  28.772 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_exit_group */
  28.773 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_lookup_dcookie */
  28.774 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_create */
  28.775 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_ctl 255 */
  28.776 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_wait */
  28.777 - 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_remap_file_pages */
  28.778 - 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_tid_address */
  28.779 -
  28.780 -	.rept NR_syscalls-(.-sys_call_table)/4
  28.781 -		.long SYMBOL_NAME(sys_ni_syscall)
  28.782 -	.endr
    29.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/head.S	Fri Jul 29 11:52:33 2005 -0700
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,41 +0,0 @@
    29.4 -
    29.5 -.section __xen_guest
    29.6 -    .ascii "GUEST_OS=linux,GUEST_VER=2.4,XEN_VER=3.0,VIRT_BASE=0xC0000000"
    29.7 -    .ascii ",LOADER=generic"
    29.8 -    .byte  0
    29.9 -
   29.10 -.text
   29.11 -#include <linux/config.h>
   29.12 -#include <linux/threads.h>
   29.13 -#include <linux/linkage.h>
   29.14 -#include <asm/segment.h>
   29.15 -#include <asm/page.h>
   29.16 -#include <asm/pgtable.h>
   29.17 -#include <asm/desc.h>
   29.18 -
   29.19 -ENTRY(stext)
   29.20 -ENTRY(_stext)
   29.21 -        cld
   29.22 -        lss stack_start,%esp
   29.23 -        /* Copy the necessary stuff from xen_start_info structure. */
   29.24 -        mov $SYMBOL_NAME(xen_start_info_union),%edi
   29.25 -        mov $128,%ecx
   29.26 -        rep movsl
   29.27 -        jmp SYMBOL_NAME(start_kernel)
   29.28 -
   29.29 -ENTRY(stack_start)
   29.30 -	.long SYMBOL_NAME(init_task_union)+8192, __KERNEL_DS
   29.31 -
   29.32 -.org 0x1000
   29.33 -ENTRY(empty_zero_page)
   29.34 -
   29.35 -.org 0x2000
   29.36 -ENTRY(default_ldt)
   29.37 -
   29.38 -.org 0x3000
   29.39 -ENTRY(cpu0_pte_quicklist)
   29.40 -
   29.41 -.org 0x3400
   29.42 -ENTRY(cpu0_pgd_quicklist)
   29.43 -        
   29.44 -.org 0x3800
    30.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/i386_ksyms.c	Fri Jul 29 11:52:33 2005 -0700
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,180 +0,0 @@
    30.4 -#include <linux/config.h>
    30.5 -#include <linux/module.h>
    30.6 -#include <linux/smp.h>
    30.7 -#include <linux/user.h>
    30.8 -#include <linux/elfcore.h>
    30.9 -#include <linux/mca.h>
   30.10 -#include <linux/sched.h>
   30.11 -#include <linux/in6.h>
   30.12 -#include <linux/interrupt.h>
   30.13 -#include <linux/smp_lock.h>
   30.14 -#include <linux/pm.h>
   30.15 -#include <linux/pci.h>
   30.16 -#include <linux/apm_bios.h>
   30.17 -#include <linux/kernel.h>
   30.18 -#include <linux/string.h>
   30.19 -#include <linux/tty.h>
   30.20 -
   30.21 -#include <asm/semaphore.h>
   30.22 -#include <asm/processor.h>
   30.23 -#include <asm/i387.h>
   30.24 -#include <asm/uaccess.h>
   30.25 -#include <asm/checksum.h>
   30.26 -#include <asm/io.h>
   30.27 -#include <asm/hardirq.h>
   30.28 -#include <asm/delay.h>
   30.29 -#include <asm/irq.h>
   30.30 -#include <asm/mmx.h>
   30.31 -#include <asm/desc.h>
   30.32 -#include <asm/pgtable.h>
   30.33 -#include <asm/pgalloc.h>
   30.34 -
   30.35 -extern void dump_thread(struct pt_regs *, struct user *);
   30.36 -extern spinlock_t rtc_lock;
   30.37 -
   30.38 -#if defined(CONFIG_APMXXX) || defined(CONFIG_APM_MODULEXXX)
   30.39 -extern void machine_real_restart(unsigned char *, int);
   30.40 -EXPORT_SYMBOL(machine_real_restart);
   30.41 -extern void default_idle(void);
   30.42 -EXPORT_SYMBOL(default_idle);
   30.43 -#endif
   30.44 -
   30.45 -#ifdef CONFIG_SMP
   30.46 -extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
   30.47 -extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
   30.48 -#endif
   30.49 -
   30.50 -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
   30.51 -extern struct drive_info_struct drive_info;
   30.52 -EXPORT_SYMBOL(drive_info);
   30.53 -#endif
   30.54 -
   30.55 -// XXX extern unsigned long get_cmos_time(void);
   30.56 -
   30.57 -/* platform dependent support */
   30.58 -EXPORT_SYMBOL(boot_cpu_data);
   30.59 -EXPORT_SYMBOL(dump_thread);
   30.60 -EXPORT_SYMBOL(dump_fpu);
   30.61 -EXPORT_SYMBOL(dump_extended_fpu);
   30.62 -EXPORT_SYMBOL(__ioremap);
   30.63 -EXPORT_SYMBOL(iounmap);
   30.64 -EXPORT_SYMBOL(enable_irq);
   30.65 -EXPORT_SYMBOL(disable_irq);
   30.66 -EXPORT_SYMBOL(disable_irq_nosync);
   30.67 -EXPORT_SYMBOL(probe_irq_mask);
   30.68 -EXPORT_SYMBOL(kernel_thread);
   30.69 -EXPORT_SYMBOL(pm_idle);
   30.70 -EXPORT_SYMBOL(pm_power_off);
   30.71 -EXPORT_SYMBOL(apm_info);
   30.72 -//EXPORT_SYMBOL(gdt);
   30.73 -EXPORT_SYMBOL(empty_zero_page);
   30.74 -EXPORT_SYMBOL(phys_to_machine_mapping);
   30.75 -
   30.76 -
   30.77 -#ifdef CONFIG_DEBUG_IOVIRT
   30.78 -EXPORT_SYMBOL(__io_virt_debug);
   30.79 -#endif
   30.80 -
   30.81 -EXPORT_SYMBOL_NOVERS(__down_failed);
   30.82 -EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
   30.83 -EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
   30.84 -EXPORT_SYMBOL_NOVERS(__up_wakeup);
   30.85 -/* Networking helper routines. */
   30.86 -EXPORT_SYMBOL(csum_partial_copy_generic);
   30.87 -/* Delay loops */
   30.88 -EXPORT_SYMBOL(__ndelay);
   30.89 -EXPORT_SYMBOL(__udelay);
   30.90 -EXPORT_SYMBOL(__delay);
   30.91 -EXPORT_SYMBOL(__const_udelay);
   30.92 -
   30.93 -EXPORT_SYMBOL_NOVERS(__get_user_1);
   30.94 -EXPORT_SYMBOL_NOVERS(__get_user_2);
   30.95 -EXPORT_SYMBOL_NOVERS(__get_user_4);
   30.96 -
   30.97 -EXPORT_SYMBOL(strtok);
   30.98 -EXPORT_SYMBOL(strpbrk);
   30.99 -EXPORT_SYMBOL(strstr);
  30.100 -
  30.101 -EXPORT_SYMBOL(strncpy_from_user);
  30.102 -EXPORT_SYMBOL(__strncpy_from_user);
  30.103 -EXPORT_SYMBOL(clear_user);
  30.104 -EXPORT_SYMBOL(__clear_user);
  30.105 -EXPORT_SYMBOL(__generic_copy_from_user);
  30.106 -EXPORT_SYMBOL(__generic_copy_to_user);
  30.107 -EXPORT_SYMBOL(strnlen_user);
  30.108 -
  30.109 -
  30.110 -EXPORT_SYMBOL(pci_alloc_consistent);
  30.111 -EXPORT_SYMBOL(pci_free_consistent);
  30.112 -
  30.113 -#ifdef CONFIG_PCI
  30.114 -EXPORT_SYMBOL(pcibios_penalize_isa_irq);
  30.115 -EXPORT_SYMBOL(pci_mem_start);
  30.116 -#endif
  30.117 -
  30.118 -
  30.119 -#ifdef CONFIG_X86_USE_3DNOW
  30.120 -EXPORT_SYMBOL(_mmx_memcpy);
  30.121 -EXPORT_SYMBOL(mmx_clear_page);
  30.122 -EXPORT_SYMBOL(mmx_copy_page);
  30.123 -#endif
  30.124 -
  30.125 -#ifdef CONFIG_SMP
  30.126 -EXPORT_SYMBOL(cpu_data);
  30.127 -EXPORT_SYMBOL(kernel_flag_cacheline);
  30.128 -EXPORT_SYMBOL(smp_num_cpus);
  30.129 -EXPORT_SYMBOL(cpu_online_map);
  30.130 -EXPORT_SYMBOL_NOVERS(__write_lock_failed);
  30.131 -EXPORT_SYMBOL_NOVERS(__read_lock_failed);
  30.132 -
  30.133 -/* Global SMP irq stuff */
  30.134 -EXPORT_SYMBOL(synchronize_irq);
  30.135 -EXPORT_SYMBOL(global_irq_holder);
  30.136 -EXPORT_SYMBOL(__global_cli);
  30.137 -EXPORT_SYMBOL(__global_sti);
  30.138 -EXPORT_SYMBOL(__global_save_flags);
  30.139 -EXPORT_SYMBOL(__global_restore_flags);
  30.140 -EXPORT_SYMBOL(smp_call_function);
  30.141 -
  30.142 -/* TLB flushing */
  30.143 -EXPORT_SYMBOL(flush_tlb_page);
  30.144 -
  30.145 -/* HT support */
  30.146 -EXPORT_SYMBOL(smp_num_siblings);
  30.147 -EXPORT_SYMBOL(cpu_sibling_map);
  30.148 -#endif
  30.149 -
  30.150 -#ifdef CONFIG_X86_IO_APIC
  30.151 -EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
  30.152 -#endif
  30.153 -
  30.154 -#ifdef CONFIG_VT
  30.155 -EXPORT_SYMBOL(screen_info);
  30.156 -#endif
  30.157 -
  30.158 -EXPORT_SYMBOL(get_wchan);
  30.159 -
  30.160 -EXPORT_SYMBOL(rtc_lock);
  30.161 -
  30.162 -#undef memcpy
  30.163 -#undef memset
  30.164 -extern void * memset(void *,int,__kernel_size_t);
  30.165 -extern void * memcpy(void *,const void *,__kernel_size_t);
  30.166 -EXPORT_SYMBOL_NOVERS(memcpy);
  30.167 -EXPORT_SYMBOL_NOVERS(memset);
  30.168 -
  30.169 -#ifdef CONFIG_HAVE_DEC_LOCK
  30.170 -EXPORT_SYMBOL(atomic_dec_and_lock);
  30.171 -#endif
  30.172 -
  30.173 -#ifdef CONFIG_MULTIQUAD
  30.174 -EXPORT_SYMBOL(xquad_portio);
  30.175 -#endif
  30.176 -
  30.177 -#include <asm/xen_proc.h>
  30.178 -EXPORT_SYMBOL(create_xen_proc_entry);
  30.179 -EXPORT_SYMBOL(remove_xen_proc_entry);
  30.180 -
  30.181 -EXPORT_SYMBOL(evtchn_do_upcall);
  30.182 -EXPORT_SYMBOL(force_evtchn_callback);
  30.183 -EXPORT_SYMBOL(HYPERVISOR_shared_info);
    31.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/irq.c	Fri Jul 29 11:52:33 2005 -0700
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,1242 +0,0 @@
    31.4 -/*
    31.5 - *	linux/arch/i386/kernel/irq.c
    31.6 - *
    31.7 - *	Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
    31.8 - *
    31.9 - * This file contains the code used by various IRQ handling routines:
   31.10 - * asking for different IRQ's should be done through these routines
   31.11 - * instead of just grabbing them. Thus setups with different IRQ numbers
   31.12 - * shouldn't result in any weird surprises, and installing new handlers
   31.13 - * should be easier.
   31.14 - */
   31.15 -
   31.16 -/*
   31.17 - * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
   31.18 - *
   31.19 - * IRQs are in fact implemented a bit like signal handlers for the kernel.
   31.20 - * Naturally it's not a 1:1 relation, but there are similarities.
   31.21 - */
   31.22 -
   31.23 -#include <linux/config.h>
   31.24 -#include <linux/ptrace.h>
   31.25 -#include <linux/errno.h>
   31.26 -#include <linux/signal.h>
   31.27 -#include <linux/sched.h>
   31.28 -#include <linux/ioport.h>
   31.29 -#include <linux/interrupt.h>
   31.30 -#include <linux/timex.h>
   31.31 -#include <linux/slab.h>
   31.32 -#include <linux/random.h>
   31.33 -#include <linux/smp_lock.h>
   31.34 -#include <linux/init.h>
   31.35 -#include <linux/kernel_stat.h>
   31.36 -#include <linux/irq.h>
   31.37 -#include <linux/proc_fs.h>
   31.38 -#include <linux/seq_file.h>
   31.39 -
   31.40 -#include <asm/atomic.h>
   31.41 -#include <asm/io.h>
   31.42 -#include <asm/smp.h>
   31.43 -#include <asm/system.h>
   31.44 -#include <asm/bitops.h>
   31.45 -#include <asm/uaccess.h>
   31.46 -#include <asm/pgalloc.h>
   31.47 -#include <asm/delay.h>
   31.48 -#include <asm/desc.h>
   31.49 -#include <asm/irq.h>
   31.50 -
   31.51 -
   31.52 -
   31.53 -/*
   31.54 - * Linux has a controller-independent x86 interrupt architecture.
   31.55 - * every controller has a 'controller-template', that is used
   31.56 - * by the main code to do the right thing. Each driver-visible
   31.57 - * interrupt source is transparently wired to the apropriate
   31.58 - * controller. Thus drivers need not be aware of the
   31.59 - * interrupt-controller.
   31.60 - *
   31.61 - * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC,
   31.62 - * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC.
   31.63 - * (IO-APICs assumed to be messaging to Pentium local-APICs)
   31.64 - *
   31.65 - * the code is designed to be easily extended with new/different
   31.66 - * interrupt controllers, without having to do assembly magic.
   31.67 - */
   31.68 -
   31.69 -/*
   31.70 - * Controller mappings for all interrupt sources:
   31.71 - */
   31.72 -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
   31.73 -	{ [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}};
   31.74 -
   31.75 -static void register_irq_proc (unsigned int irq);
   31.76 -
   31.77 -/*
   31.78 - * Special irq handlers.
   31.79 - */
   31.80 -
   31.81 -void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
   31.82 -
   31.83 -/*
   31.84 - * Generic no controller code
   31.85 - */
   31.86 -
   31.87 -static void enable_none(unsigned int irq) { }
   31.88 -static unsigned int startup_none(unsigned int irq) { return 0; }
   31.89 -static void disable_none(unsigned int irq) { }
   31.90 -static void ack_none(unsigned int irq)
   31.91 -{
   31.92 -/*
   31.93 - * 'what should we do if we get a hw irq event on an illegal vector'.
   31.94 - * each architecture has to answer this themselves, it doesnt deserve
   31.95 - * a generic callback i think.
   31.96 - */
   31.97 -#if CONFIG_X86
   31.98 -	printk("unexpected IRQ trap at vector %02x\n", irq);
   31.99 -#ifdef CONFIG_X86_LOCAL_APIC
  31.100 -	/*
  31.101 -	 * Currently unexpected vectors happen only on SMP and APIC.
  31.102 -	 * We _must_ ack these because every local APIC has only N
  31.103 -	 * irq slots per priority level, and a 'hanging, unacked' IRQ
  31.104 -	 * holds up an irq slot - in excessive cases (when multiple
  31.105 -	 * unexpected vectors occur) that might lock up the APIC
  31.106 -	 * completely.
  31.107 -	 */
  31.108 -	ack_APIC_irq();
  31.109 -#endif
  31.110 -#endif
  31.111 -}
  31.112 -
  31.113 -/* startup is the same as "enable", shutdown is same as "disable" */
  31.114 -#define shutdown_none	disable_none
  31.115 -#define end_none	enable_none
  31.116 -
  31.117 -struct hw_interrupt_type no_irq_type = {
  31.118 -	"none",
  31.119 -	startup_none,
  31.120 -	shutdown_none,
  31.121 -	enable_none,
  31.122 -	disable_none,
  31.123 -	ack_none,
  31.124 -	end_none
  31.125 -};
  31.126 -
  31.127 -atomic_t irq_err_count;
  31.128 -#ifdef CONFIG_X86_IO_APIC
  31.129 -#ifdef APIC_MISMATCH_DEBUG
  31.130 -atomic_t irq_mis_count;
  31.131 -#endif
  31.132 -#endif
  31.133 -
  31.134 -/*
  31.135 - * Generic, controller-independent functions:
  31.136 - */
  31.137 -
  31.138 -int show_interrupts(struct seq_file *p, void *v)
  31.139 -{
  31.140 -	int i, j;
  31.141 -	struct irqaction * action;
  31.142 -
  31.143 -	seq_printf(p, "           ");
  31.144 -	for (j=0; j<smp_num_cpus; j++)
  31.145 -		seq_printf(p, "CPU%d       ",j);
  31.146 -	seq_putc(p,'\n');
  31.147 -
  31.148 -	for (i = 0 ; i < NR_IRQS ; i++) {
  31.149 -		action = irq_desc[i].action;
  31.150 -		if (!action) 
  31.151 -			continue;
  31.152 -		seq_printf(p, "%3d: ",i);
  31.153 -#ifndef CONFIG_SMP
  31.154 -		seq_printf(p, "%10u ", kstat_irqs(i));
  31.155 -#else
  31.156 -		for (j = 0; j < smp_num_cpus; j++)
  31.157 -			seq_printf(p, "%10u ",
  31.158 -				kstat.irqs[cpu_logical_map(j)][i]);
  31.159 -#endif
  31.160 -		seq_printf(p, " %14s", irq_desc[i].handler->typename);
  31.161 -		seq_printf(p, "  %s", action->name);
  31.162 -
  31.163 -		for (action=action->next; action; action = action->next)
  31.164 -			seq_printf(p, ", %s", action->name);
  31.165 -		seq_putc(p,'\n');
  31.166 -	}
  31.167 -	seq_printf(p, "NMI: ");
  31.168 -	for (j = 0; j < smp_num_cpus; j++)
  31.169 -		seq_printf(p, "%10u ",
  31.170 -			nmi_count(cpu_logical_map(j)));
  31.171 -	seq_printf(p, "\n");
  31.172 -#if CONFIG_X86_LOCAL_APIC
  31.173 -	seq_printf(p, "LOC: ");
  31.174 -	for (j = 0; j < smp_num_cpus; j++)
  31.175 -		seq_printf(p, "%10u ",
  31.176 -			apic_timer_irqs[cpu_logical_map(j)]);
  31.177 -	seq_printf(p, "\n");
  31.178 -#endif
  31.179 -	seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
  31.180 -#ifdef CONFIG_X86_IO_APIC
  31.181 -#ifdef APIC_MISMATCH_DEBUG
  31.182 -	seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
  31.183 -#endif
  31.184 -#endif
  31.185 -
  31.186 -	return 0;
  31.187 -}
  31.188 -
  31.189 -
  31.190 -/*
  31.191 - * Global interrupt locks for SMP. Allow interrupts to come in on any
  31.192 - * CPU, yet make cli/sti act globally to protect critical regions..
  31.193 - */
  31.194 -
  31.195 -#ifdef CONFIG_SMP
  31.196 -unsigned char global_irq_holder = NO_PROC_ID;
  31.197 -unsigned volatile long global_irq_lock; /* pendantic: long for set_bit --RR */
  31.198 -
  31.199 -extern void show_stack(unsigned long* esp);
  31.200 -
  31.201 -static void show(char * str)
  31.202 -{
  31.203 -	int i;
  31.204 -	int cpu = smp_processor_id();
  31.205 -
  31.206 -	printk("\n%s, CPU %d:\n", str, cpu);
  31.207 -	printk("irq:  %d [",irqs_running());
  31.208 -	for(i=0;i < smp_num_cpus;i++)
  31.209 -		printk(" %d",local_irq_count(i));
  31.210 -	printk(" ]\nbh:   %d [",spin_is_locked(&global_bh_lock) ? 1 : 0);
  31.211 -	for(i=0;i < smp_num_cpus;i++)
  31.212 -		printk(" %d",local_bh_count(i));
  31.213 -
  31.214 -	printk(" ]\nStack dumps:");
  31.215 -	for(i = 0; i < smp_num_cpus; i++) {
  31.216 -		unsigned long esp;
  31.217 -		if (i == cpu)
  31.218 -			continue;
  31.219 -		printk("\nCPU %d:",i);
  31.220 -		esp = init_tss[i].esp0;
  31.221 -		if (!esp) {
  31.222 -			/* tss->esp0 is set to NULL in cpu_init(),
  31.223 -			 * it's initialized when the cpu returns to user
  31.224 -			 * space. -- manfreds
  31.225 -			 */
  31.226 -			printk(" <unknown> ");
  31.227 -			continue;
  31.228 -		}
  31.229 -		esp &= ~(THREAD_SIZE-1);
  31.230 -		esp += sizeof(struct task_struct);
  31.231 -		show_stack((void*)esp);
  31.232 - 	}
  31.233 -	printk("\nCPU %d:",cpu);
  31.234 -	show_stack(NULL);
  31.235 -	printk("\n");
  31.236 -}
  31.237 -	
  31.238 -#define MAXCOUNT 100000000
  31.239 -
  31.240 -/*
  31.241 - * I had a lockup scenario where a tight loop doing
  31.242 - * spin_unlock()/spin_lock() on CPU#1 was racing with
  31.243 - * spin_lock() on CPU#0. CPU#0 should have noticed spin_unlock(), but
  31.244 - * apparently the spin_unlock() information did not make it
  31.245 - * through to CPU#0 ... nasty, is this by design, do we have to limit
  31.246 - * 'memory update oscillation frequency' artificially like here?
  31.247 - *
  31.248 - * Such 'high frequency update' races can be avoided by careful design, but
  31.249 - * some of our major constructs like spinlocks use similar techniques,
  31.250 - * it would be nice to clarify this issue. Set this define to 0 if you
  31.251 - * want to check whether your system freezes.  I suspect the delay done
  31.252 - * by SYNC_OTHER_CORES() is in correlation with 'snooping latency', but
  31.253 - * i thought that such things are guaranteed by design, since we use
  31.254 - * the 'LOCK' prefix.
  31.255 - */
  31.256 -#define SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND 0
  31.257 -
  31.258 -#if SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND
  31.259 -# define SYNC_OTHER_CORES(x) udelay(x+1)
  31.260 -#else
  31.261 -/*
  31.262 - * We have to allow irqs to arrive between __sti and __cli
  31.263 - */
  31.264 -# define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop")
  31.265 -#endif
  31.266 -
  31.267 -static inline void wait_on_irq(int cpu)
  31.268 -{
  31.269 -	int count = MAXCOUNT;
  31.270 -
  31.271 -	for (;;) {
  31.272 -
  31.273 -		/*
  31.274 -		 * Wait until all interrupts are gone. Wait
  31.275 -		 * for bottom half handlers unless we're
  31.276 -		 * already executing in one..
  31.277 -		 */
  31.278 -		if (!irqs_running())
  31.279 -			if (local_bh_count(cpu) || !spin_is_locked(&global_bh_lock))
  31.280 -				break;
  31.281 -
  31.282 -		/* Duh, we have to loop. Release the lock to avoid deadlocks */
  31.283 -		clear_bit(0,&global_irq_lock);
  31.284 -
  31.285 -		for (;;) {
  31.286 -			if (!--count) {
  31.287 -				show("wait_on_irq");
  31.288 -				count = ~0;
  31.289 -			}
  31.290 -			__sti();
  31.291 -			SYNC_OTHER_CORES(cpu);
  31.292 -			__cli();
  31.293 -			if (irqs_running())
  31.294 -				continue;
  31.295 -			if (global_irq_lock)
  31.296 -				continue;
  31.297 -			if (!local_bh_count(cpu) && spin_is_locked(&global_bh_lock))
  31.298 -				continue;
  31.299 -			if (!test_and_set_bit(0,&global_irq_lock))
  31.300 -				break;
  31.301 -		}
  31.302 -	}
  31.303 -}
  31.304 -
  31.305 -/*
  31.306 - * This is called when we want to synchronize with
  31.307 - * interrupts. We may for example tell a device to
  31.308 - * stop sending interrupts: but to make sure there
  31.309 - * are no interrupts that are executing on another
  31.310 - * CPU we need to call this function.
  31.311 - */
  31.312 -void synchronize_irq(void)
  31.313 -{
  31.314 -	if (irqs_running()) {
  31.315 -		/* Stupid approach */
  31.316 -		cli();
  31.317 -		sti();
  31.318 -	}
  31.319 -}
  31.320 -
  31.321 -static inline void get_irqlock(int cpu)
  31.322 -{
  31.323 -	if (test_and_set_bit(0,&global_irq_lock)) {
  31.324 -		/* do we already hold the lock? */
  31.325 -		if ((unsigned char) cpu == global_irq_holder)
  31.326 -			return;
  31.327 -		/* Uhhuh.. Somebody else got it. Wait.. */
  31.328 -		do {
  31.329 -			do {
  31.330 -				rep_nop();
  31.331 -			} while (test_bit(0,&global_irq_lock));
  31.332 -		} while (test_and_set_bit(0,&global_irq_lock));		
  31.333 -	}
  31.334 -	/* 
  31.335 -	 * We also to make sure that nobody else is running
  31.336 -	 * in an interrupt context. 
  31.337 -	 */
  31.338 -	wait_on_irq(cpu);
  31.339 -
  31.340 -	/*
  31.341 -	 * Ok, finally..
  31.342 -	 */
  31.343 -	global_irq_holder = cpu;
  31.344 -}
  31.345 -
  31.346 -/*
  31.347 - * A global "cli()" while in an interrupt context
  31.348 - * turns into just a local cli(). Interrupts
  31.349 - * should use spinlocks for the (very unlikely)
  31.350 - * case that they ever want to protect against
  31.351 - * each other.
  31.352 - *
  31.353 - * If we already have local interrupts disabled,
  31.354 - * this will not turn a local disable into a
  31.355 - * global one (problems with spinlocks: this makes
  31.356 - * save_flags+cli+sti usable inside a spinlock).
  31.357 - */
  31.358 -void __global_cli(void)
  31.359 -{
  31.360 -	unsigned int flags;
  31.361 -
  31.362 -	__save_flags(flags);
  31.363 -	if (!flags) {
  31.364 -		int cpu = smp_processor_id();
  31.365 -		__cli();
  31.366 -		if (!local_irq_count(cpu))
  31.367 -			get_irqlock(cpu);
  31.368 -	}
  31.369 -}
  31.370 -
  31.371 -void __global_sti(void)
  31.372 -{
  31.373 -	int cpu = smp_processor_id();
  31.374 -
  31.375 -	if (!local_irq_count(cpu))
  31.376 -		release_irqlock(cpu);
  31.377 -	__sti();
  31.378 -}
  31.379 -
  31.380 -/*
  31.381 - * SMP flags value to restore to:
  31.382 - * 0 - global cli
  31.383 - * 1 - global sti
  31.384 - * 2 - local cli
  31.385 - * 3 - local sti
  31.386 - */
  31.387 -unsigned long __global_save_flags(void)
  31.388 -{
  31.389 -	int retval;
  31.390 -	int local_enabled;
  31.391 -	unsigned long flags;
  31.392 -	int cpu = smp_processor_id();
  31.393 -
  31.394 -	__save_flags(flags);
  31.395 -	local_enabled = !flags;
  31.396 -	/* default to local */
  31.397 -	retval = 2 + local_enabled;
  31.398 -
  31.399 -	/* check for global flags if we're not in an interrupt */
  31.400 -	if (!local_irq_count(cpu)) {
  31.401 -		if (local_enabled)
  31.402 -			retval = 1;
  31.403 -		if (global_irq_holder == cpu)
  31.404 -			retval = 0;
  31.405 -	}
  31.406 -	return retval;
  31.407 -}
  31.408 -
  31.409 -void __global_restore_flags(unsigned long flags)
  31.410 -{
  31.411 -	switch (flags) {
  31.412 -	case 0:
  31.413 -		__global_cli();
  31.414 -		break;
  31.415 -	case 1:
  31.416 -		__global_sti();
  31.417 -		break;
  31.418 -	case 2:
  31.419 -		__cli();
  31.420 -		break;
  31.421 -	case 3:
  31.422 -		__sti();
  31.423 -		break;
  31.424 -	default:
  31.425 -		printk("global_restore_flags: %08lx (%08lx)\n",
  31.426 -			flags, (&flags)[-1]);
  31.427 -	}
  31.428 -}
  31.429 -
  31.430 -#endif
  31.431 -
  31.432 -/*
  31.433 - * This should really return information about whether
  31.434 - * we should do bottom half handling etc. Right now we
  31.435 - * end up _always_ checking the bottom half, which is a
  31.436 - * waste of time and is not what some drivers would
  31.437 - * prefer.
  31.438 - */
  31.439 -int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
  31.440 -{
  31.441 -	int status;
  31.442 -	int cpu = smp_processor_id();
  31.443 -
  31.444 -	irq_enter(cpu, irq);
  31.445 -
  31.446 -	status = 1;	/* Force the "do bottom halves" bit */
  31.447 -
  31.448 -	if (!(action->flags & SA_INTERRUPT))
  31.449 -		__sti();
  31.450 -
  31.451 -	do {
  31.452 -		status |= action->flags;
  31.453 -		action->handler(irq, action->dev_id, regs);
  31.454 -		action = action->next;
  31.455 -	} while (action);
  31.456 -	if (status & SA_SAMPLE_RANDOM)
  31.457 -		add_interrupt_randomness(irq);
  31.458 -	__cli();
  31.459 -
  31.460 -	irq_exit(cpu, irq);
  31.461 -
  31.462 -	return status;
  31.463 -}
  31.464 -
  31.465 -/*
  31.466 - * Generic enable/disable code: this just calls
  31.467 - * down into the PIC-specific version for the actual
  31.468 - * hardware disable after having gotten the irq
  31.469 - * controller lock. 
  31.470 - */
  31.471 - 
  31.472 -/**
  31.473 - *	disable_irq_nosync - disable an irq without waiting
  31.474 - *	@irq: Interrupt to disable
  31.475 - *
  31.476 - *	Disable the selected interrupt line.  Disables and Enables are
  31.477 - *	nested.
  31.478 - *	Unlike disable_irq(), this function does not ensure existing
  31.479 - *	instances of the IRQ handler have completed before returning.
  31.480 - *
  31.481 - *	This function may be called from IRQ context.
  31.482 - */
  31.483 - 
  31.484 -inline void disable_irq_nosync(unsigned int irq)
  31.485 -{
  31.486 -	irq_desc_t *desc = irq_desc + irq;
  31.487 -	unsigned long flags;
  31.488 -
  31.489 -	spin_lock_irqsave(&desc->lock, flags);
  31.490 -	if (!desc->depth++) {
  31.491 -		desc->status |= IRQ_DISABLED;
  31.492 -		desc->handler->disable(irq);
  31.493 -	}
  31.494 -	spin_unlock_irqrestore(&desc->lock, flags);
  31.495 -}
  31.496 -
  31.497 -/**
  31.498 - *	disable_irq - disable an irq and wait for completion
  31.499 - *	@irq: Interrupt to disable
  31.500 - *
  31.501 - *	Disable the selected interrupt line.  Enables and Disables are
  31.502 - *	nested.
  31.503 - *	This function waits for any pending IRQ handlers for this interrupt
  31.504 - *	to complete before returning. If you use this function while
  31.505 - *	holding a resource the IRQ handler may need you will deadlock.
  31.506 - *
  31.507 - *	This function may be called - with care - from IRQ context.
  31.508 - */
  31.509 - 
  31.510 -void disable_irq(unsigned int irq)
  31.511 -{
  31.512 -	disable_irq_nosync(irq);
  31.513 -
  31.514 -	if (!local_irq_count(smp_processor_id())) {
  31.515 -		do {
  31.516 -			barrier();
  31.517 -			cpu_relax();
  31.518 -		} while (irq_desc[irq].status & IRQ_INPROGRESS);
  31.519 -	}
  31.520 -}
  31.521 -
  31.522 -/**
  31.523 - *	enable_irq - enable handling of an irq
  31.524 - *	@irq: Interrupt to enable
  31.525 - *
  31.526 - *	Undoes the effect of one call to disable_irq().  If this
  31.527 - *	matches the last disable, processing of interrupts on this
  31.528 - *	IRQ line is re-enabled.
  31.529 - *
  31.530 - *	This function may be called from IRQ context.
  31.531 - */
  31.532 - 
  31.533 -void enable_irq(unsigned int irq)
  31.534 -{
  31.535 -	irq_desc_t *desc = irq_desc + irq;
  31.536 -	unsigned long flags;
  31.537 -
  31.538 -	spin_lock_irqsave(&desc->lock, flags);
  31.539 -	switch (desc->depth) {
  31.540 -	case 1: {
  31.541 -		unsigned int status = desc->status & ~IRQ_DISABLED;
  31.542 -		desc->status = status;
  31.543 -		if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
  31.544 -			desc->status = status | IRQ_REPLAY;
  31.545 -			hw_resend_irq(desc->handler,irq);
  31.546 -		}
  31.547 -		desc->handler->enable(irq);
  31.548 -		/* fall-through */
  31.549 -	}
  31.550 -	default:
  31.551 -		desc->depth--;
  31.552 -		break;
  31.553 -	case 0:
  31.554 -		printk("enable_irq(%u) unbalanced from %p\n", irq,
  31.555 -		       __builtin_return_address(0));
  31.556 -	}
  31.557 -	spin_unlock_irqrestore(&desc->lock, flags);
  31.558 -}
  31.559 -
  31.560 -/*
  31.561 - * do_IRQ handles all normal device IRQ's (the special
  31.562 - * SMP cross-CPU interrupts have their own specific
  31.563 - * handlers).
  31.564 - */
  31.565 -asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
  31.566 -{	
  31.567 -	/* 
  31.568 -	 * We ack quickly, we don't want the irq controller
  31.569 -	 * thinking we're snobs just because some other CPU has
  31.570 -	 * disabled global interrupts (we have already done the
  31.571 -	 * INT_ACK cycles, it's too late to try to pretend to the
  31.572 -	 * controller that we aren't taking the interrupt).
  31.573 -	 *
  31.574 -	 * 0 return value means that this irq is already being
  31.575 -	 * handled by some other CPU. (or is disabled)
  31.576 -	 */
  31.577 -	int irq = regs->orig_eax & 0xff; /* high bits used in ret_from_ code */
  31.578 -	int cpu = smp_processor_id();
  31.579 -	irq_desc_t *desc = irq_desc + irq;
  31.580 -	struct irqaction * action;
  31.581 -	unsigned int status;
  31.582 -#ifdef CONFIG_DEBUG_STACKOVERFLOW
  31.583 -	long esp;
  31.584 -
  31.585 -	/* Debugging check for stack overflow: is there less than 1KB free? */
  31.586 -	__asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : "0" (8191));
  31.587 -	if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
  31.588 -		extern void show_stack(unsigned long *);
  31.589 -
  31.590 -		printk("do_IRQ: stack overflow: %ld\n",
  31.591 -			esp - sizeof(struct task_struct));
  31.592 -		__asm__ __volatile__("movl %%esp,%0" : "=r" (esp));
  31.593 -		show_stack((void *)esp);
  31.594 -	}
  31.595 -#endif
  31.596 -
  31.597 -	kstat.irqs[cpu][irq]++;
  31.598 -	spin_lock(&desc->lock);
  31.599 -	desc->handler->ack(irq);
  31.600 -	/*
  31.601 -	   REPLAY is when Linux resends an IRQ that was dropped earlier
  31.602 -	   WAITING is used by probe to mark irqs that are being tested
  31.603 -	   */
  31.604 -	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
  31.605 -	status |= IRQ_PENDING; /* we _want_ to handle it */
  31.606 -
  31.607 -	/*
  31.608 -	 * If the IRQ is disabled for whatever reason, we cannot
  31.609 -	 * use the action we have.
  31.610 -	 */
  31.611 -	action = NULL;
  31.612 -	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
  31.613 -		action = desc->action;
  31.614 -		status &= ~IRQ_PENDING; /* we commit to handling */
  31.615 -		status |= IRQ_INPROGRESS; /* we are handling it */
  31.616 -	}
  31.617 -	desc->status = status;
  31.618 -
  31.619 -	/*
  31.620 -	 * If there is no IRQ handler or it was disabled, exit early.
  31.621 -	   Since we set PENDING, if another processor is handling
  31.622 -	   a different instance of this same irq, the other processor
  31.623 -	   will take care of it.
  31.624 -	 */
  31.625 -	if (!action)
  31.626 -		goto out;
  31.627 -
  31.628 -	/*
  31.629 -	 * Edge triggered interrupts need to remember
  31.630 -	 * pending events.
  31.631 -	 * This applies to any hw interrupts that allow a second
  31.632 -	 * instance of the same irq to arrive while we are in do_IRQ
  31.633 -	 * or in the handler. But the code here only handles the _second_
  31.634 -	 * instance of the irq, not the third or fourth. So it is mostly
  31.635 -	 * useful for irq hardware that does not mask cleanly in an
  31.636 -	 * SMP environment.
  31.637 -	 */
  31.638 -	for (;;) {
  31.639 -		spin_unlock(&desc->lock);
  31.640 -		handle_IRQ_event(irq, regs, action);
  31.641 -		spin_lock(&desc->lock);
  31.642 -		
  31.643 -		if (!(desc->status & IRQ_PENDING))
  31.644 -			break;
  31.645 -		desc->status &= ~IRQ_PENDING;
  31.646 -	}
  31.647 -	desc->status &= ~IRQ_INPROGRESS;
  31.648 -out:
  31.649 -	/*
  31.650 -	 * The ->end() handler has to deal with interrupts which got
  31.651 -	 * disabled while the handler was running.
  31.652 -	 */
  31.653 -	desc->handler->end(irq);
  31.654 -	spin_unlock(&desc->lock);
  31.655 -
  31.656 -	if (softirq_pending(cpu))
  31.657 -		do_softirq();
  31.658 -	return 1;
  31.659 -}
  31.660 -
  31.661 -/**
  31.662 - *	request_irq - allocate an interrupt line
  31.663 - *	@irq: Interrupt line to allocate
  31.664 - *	@handler: Function to be called when the IRQ occurs
  31.665 - *	@irqflags: Interrupt type flags
  31.666 - *	@devname: An ascii name for the claiming device
  31.667 - *	@dev_id: A cookie passed back to the handler function
  31.668 - *
  31.669 - *	This call allocates interrupt resources and enables the
  31.670 - *	interrupt line and IRQ handling. From the point this
  31.671 - *	call is made your handler function may be invoked. Since
  31.672 - *	your handler function must clear any interrupt the board 
  31.673 - *	raises, you must take care both to initialise your hardware
  31.674 - *	and to set up the interrupt handler in the right order.
  31.675 - *
  31.676 - *	Dev_id must be globally unique. Normally the address of the
  31.677 - *	device data structure is used as the cookie. Since the handler
  31.678 - *	receives this value it makes sense to use it.
  31.679 - *
  31.680 - *	If your interrupt is shared you must pass a non NULL dev_id
  31.681 - *	as this is required when freeing the interrupt.
  31.682 - *
  31.683 - *	Flags:
  31.684 - *
  31.685 - *	SA_SHIRQ		Interrupt is shared
  31.686 - *
  31.687 - *	SA_INTERRUPT		Disable local interrupts while processing
  31.688 - *
  31.689 - *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
  31.690 - *
  31.691 - */
  31.692 - 
  31.693 -int request_irq(unsigned int irq, 
  31.694 -		void (*handler)(int, void *, struct pt_regs *),
  31.695 -		unsigned long irqflags, 
  31.696 -		const char * devname,
  31.697 -		void *dev_id)
  31.698 -{
  31.699 -	int retval;
  31.700 -	struct irqaction * action;
  31.701 -
  31.702 -#if 1
  31.703 -	/*
  31.704 -	 * Sanity-check: shared interrupts should REALLY pass in
  31.705 -	 * a real dev-ID, otherwise we'll have trouble later trying
  31.706 -	 * to figure out which interrupt is which (messes up the
  31.707 -	 * interrupt freeing logic etc).
  31.708 -	 */
  31.709 -	if (irqflags & SA_SHIRQ) {
  31.710 -		if (!dev_id)
  31.711 -			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
  31.712 -	}
  31.713 -#endif
  31.714 -
  31.715 -	if (irq >= NR_IRQS)
  31.716 -		return -EINVAL;
  31.717 -	if (!handler)
  31.718 -		return -EINVAL;
  31.719 -
  31.720 -	action = (struct irqaction *)
  31.721 -			kmalloc(sizeof(struct irqaction), GFP_KERNEL);
  31.722 -	if (!action)
  31.723 -		return -ENOMEM;
  31.724 -
  31.725 -	action->handler = handler;
  31.726 -	action->flags = irqflags;
  31.727 -	action->mask = 0;
  31.728 -	action->name = devname;
  31.729 -	action->next = NULL;
  31.730 -	action->dev_id = dev_id;
  31.731 -
  31.732 -	retval = setup_irq(irq, action);
  31.733 -	if (retval)
  31.734 -		kfree(action);
  31.735 -	return retval;
  31.736 -}
  31.737 -
  31.738 -/*
  31.739 - * Internal function to unregister an irqaction - typically used to
  31.740 - * deallocate special interrupts that are part of the architecture.
  31.741 - */
  31.742 -int teardown_irq(unsigned int irq, struct irqaction * old)
  31.743 -{
  31.744 -	irq_desc_t *desc;
  31.745 -	struct irqaction **p;
  31.746 -	unsigned long flags;
  31.747 -
  31.748 -	if (irq >= NR_IRQS)
  31.749 -		return -ENOENT;
  31.750 -
  31.751 -	desc = irq_desc + irq;
  31.752 -	spin_lock_irqsave(&desc->lock,flags);
  31.753 -	p = &desc->action;
  31.754 -	for (;;) {
  31.755 -		struct irqaction * action = *p;
  31.756 -		if (action) {
  31.757 -			struct irqaction **pp = p;
  31.758 -			p = &action->next;
  31.759 -			if (action != old)
  31.760 -				continue;
  31.761 -
  31.762 -			/* Found it - now remove it from the list of entries */
  31.763 -			*pp = action->next;
  31.764 -			if (!desc->action) {
  31.765 -				desc->status |= IRQ_DISABLED;
  31.766 -				desc->handler->shutdown(irq);
  31.767 -			}
  31.768 -			spin_unlock_irqrestore(&desc->lock,flags);
  31.769 -
  31.770 -#ifdef CONFIG_SMP
  31.771 -			/* Wait to make sure it's not being used on another CPU */
  31.772 -			while (desc->status & IRQ_INPROGRESS) {
  31.773 -				barrier();
  31.774 -				cpu_relax();
  31.775 -			}
  31.776 -#endif
  31.777 -			return 0;
  31.778 -		}
  31.779 -		printk("Trying to free free IRQ%d\n",irq);
  31.780 -		spin_unlock_irqrestore(&desc->lock,flags);
  31.781 -		return -ENOENT;
  31.782 -	}
  31.783 -}
  31.784 -
  31.785 -/**
  31.786 - *	free_irq - free an interrupt
  31.787 - *	@irq: Interrupt line to free
  31.788 - *	@dev_id: Device identity to free
  31.789 - *
  31.790 - *	Remove an interrupt handler. The handler is removed and if the
  31.791 - *	interrupt line is no longer in use by any driver it is disabled.
  31.792 - *	On a shared IRQ the caller must ensure the interrupt is disabled
  31.793 - *	on the card it drives before calling this function. The function
  31.794 - *	does not return until any executing interrupts for this IRQ
  31.795 - *	have completed.
  31.796 - *
  31.797 - *	This function may be called from interrupt context. 
  31.798 - *
  31.799 - *	Bugs: Attempting to free an irq in a handler for the same irq hangs
  31.800 - *	      the machine.
  31.801 - */
  31.802 - 
  31.803 -void free_irq(unsigned int irq, void *dev_id)
  31.804 -{
  31.805 -	irq_desc_t *desc;
  31.806 -	struct irqaction *action;
  31.807 -	unsigned long flags;
  31.808 -
  31.809 -	if (irq >= NR_IRQS)
  31.810 -		return;
  31.811 -
  31.812 -	desc = irq_desc + irq;
  31.813 -	spin_lock_irqsave(&desc->lock,flags);
  31.814 -	for (action = desc->action; action != NULL; action = action->next) {
  31.815 -		if (action->dev_id != dev_id)
  31.816 -			continue;
  31.817 -
  31.818 -		spin_unlock_irqrestore(&desc->lock,flags);
  31.819 -
  31.820 -		if (teardown_irq(irq, action) == 0)
  31.821 -			kfree(action);
  31.822 -		return;
  31.823 -	}
  31.824 -	printk("Trying to free free IRQ%d\n",irq);
  31.825 -	spin_unlock_irqrestore(&desc->lock,flags);
  31.826 -	return;
  31.827 -}
  31.828 -
  31.829 -/*
  31.830 - * IRQ autodetection code..
  31.831 - *
  31.832 - * This depends on the fact that any interrupt that
  31.833 - * comes in on to an unassigned handler will get stuck
  31.834 - * with "IRQ_WAITING" cleared and the interrupt
  31.835 - * disabled.
  31.836 - */
  31.837 -
  31.838 -static DECLARE_MUTEX(probe_sem);
  31.839 -
  31.840 -/**
  31.841 - *	probe_irq_on	- begin an interrupt autodetect
  31.842 - *
  31.843 - *	Commence probing for an interrupt. The interrupts are scanned
  31.844 - *	and a mask of potential interrupt lines is returned.
  31.845 - *
  31.846 - */
  31.847 - 
  31.848 -unsigned long probe_irq_on(void)
  31.849 -{
  31.850 -	unsigned int i;
  31.851 -	irq_desc_t *desc;
  31.852 -	unsigned long val;
  31.853 -	unsigned long delay;
  31.854 -
  31.855 -	down(&probe_sem);
  31.856 -	/* 
  31.857 -	 * something may have generated an irq long ago and we want to
  31.858 -	 * flush such a longstanding irq before considering it as spurious. 
  31.859 -	 */
  31.860 -	for (i = NR_PIRQS-1; i > 0; i--)  {
  31.861 -		desc = irq_desc + i;
  31.862 -
  31.863 -		spin_lock_irq(&desc->lock);
  31.864 -		if (!irq_desc[i].action) 
  31.865 -			irq_desc[i].handler->startup(i);
  31.866 -		spin_unlock_irq(&desc->lock);
  31.867 -	}
  31.868 -
  31.869 -	/* Wait for longstanding interrupts to trigger. */
  31.870 -	for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
  31.871 -		/* about 20ms delay */ synchronize_irq();
  31.872 -
  31.873 -	/*
  31.874 -	 * enable any unassigned irqs
  31.875 -	 * (we must startup again here because if a longstanding irq
  31.876 -	 * happened in the previous stage, it may have masked itself)
  31.877 -	 */
  31.878 -	for (i = NR_PIRQS-1; i > 0; i--) {
  31.879 -		desc = irq_desc + i;
  31.880 -
  31.881 -		spin_lock_irq(&desc->lock);
  31.882 -		if (!desc->action) {
  31.883 -			desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
  31.884 -			if (desc->handler->startup(i))
  31.885 -				desc->status |= IRQ_PENDING;
  31.886 -		}
  31.887 -		spin_unlock_irq(&desc->lock);
  31.888 -	}
  31.889 -
  31.890 -	/*
  31.891 -	 * Wait for spurious interrupts to trigger
  31.892 -	 */
  31.893 -	for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
  31.894 -		/* about 100ms delay */ synchronize_irq();
  31.895 -
  31.896 -	/*
  31.897 -	 * Now filter out any obviously spurious interrupts
  31.898 -	 */
  31.899 -	val = 0;
  31.900 -	for (i = 0; i < NR_PIRQS; i++) {
  31.901 -		irq_desc_t *desc = irq_desc + i;
  31.902 -		unsigned int status;
  31.903 -
  31.904 -		spin_lock_irq(&desc->lock);
  31.905 -		status = desc->status;
  31.906 -
  31.907 -		if (status & IRQ_AUTODETECT) {
  31.908 -			/* It triggered already - consider it spurious. */
  31.909 -			if (!(status & IRQ_WAITING)) {
  31.910 -				desc->status = status & ~IRQ_AUTODETECT;
  31.911 -				desc->handler->shutdown(i);
  31.912 -			} else
  31.913 -				if (i < 32)
  31.914 -					val |= 1 << i;
  31.915 -		}
  31.916 -		spin_unlock_irq(&desc->lock);
  31.917 -	}
  31.918 -
  31.919 -	return val;
  31.920 -}
  31.921 -
  31.922 -/*
  31.923 - * Return a mask of triggered interrupts (this
  31.924 - * can handle only legacy ISA interrupts).
  31.925 - */
  31.926 - 
  31.927 -/**
  31.928 - *	probe_irq_mask - scan a bitmap of interrupt lines
  31.929 - *	@val:	mask of interrupts to consider
  31.930 - *
  31.931 - *	Scan the ISA bus interrupt lines and return a bitmap of
  31.932 - *	active interrupts. The interrupt probe logic state is then
  31.933 - *	returned to its previous value.
  31.934 - *
  31.935 - *	Note: we need to scan all the irq's even though we will
  31.936 - *	only return ISA irq numbers - just so that we reset them
  31.937 - *	all to a known state.
  31.938 - */
  31.939 -unsigned int probe_irq_mask(unsigned long val)
  31.940 -{
  31.941 -	int i;
  31.942 -	unsigned int mask;
  31.943 -
  31.944 -	mask = 0;
  31.945 -	for (i = 0; i < NR_PIRQS; i++) {
  31.946 -		irq_desc_t *desc = irq_desc + i;
  31.947 -		unsigned int status;
  31.948 -
  31.949 -		spin_lock_irq(&desc->lock);
  31.950 -		status = desc->status;
  31.951 -
  31.952 -		if (status & IRQ_AUTODETECT) {
  31.953 -			if (i < 16 && !(status & IRQ_WAITING))
  31.954 -				mask |= 1 << i;
  31.955 -
  31.956 -			desc->status = status & ~IRQ_AUTODETECT;
  31.957 -			desc->handler->shutdown(i);
  31.958 -		}
  31.959 -		spin_unlock_irq(&desc->lock);
  31.960 -	}
  31.961 -	up(&probe_sem);
  31.962 -
  31.963 -	return mask & val;
  31.964 -}
  31.965 -
  31.966 -/*
  31.967 - * Return the one interrupt that triggered (this can
  31.968 - * handle any interrupt source).
  31.969 - */
  31.970 -
  31.971 -/**
  31.972 - *	probe_irq_off	- end an interrupt autodetect
  31.973 - *	@val: mask of potential interrupts (unused)
  31.974 - *
  31.975 - *	Scans the unused interrupt lines and returns the line which
  31.976 - *	appears to have triggered the interrupt. If no interrupt was
  31.977 - *	found then zero is returned. If more than one interrupt is
  31.978 - *	found then minus the first candidate is returned to indicate
  31.979 - *	their is doubt.
  31.980 - *
  31.981 - *	The interrupt probe logic state is returned to its previous
  31.982 - *	value.
  31.983 - *
  31.984 - *	BUGS: When used in a module (which arguably shouldnt happen)
  31.985 - *	nothing prevents two IRQ probe callers from overlapping. The
  31.986 - *	results of this are non-optimal.
  31.987 - */
  31.988 - 
  31.989 -int probe_irq_off(unsigned long val)
  31.990 -{
  31.991 -	int i, irq_found, nr_irqs;
  31.992 -
  31.993 -	nr_irqs = 0;
  31.994 -	irq_found = 0;
  31.995 -	for (i = 0; i < NR_PIRQS; i++) {
  31.996 -		irq_desc_t *desc = irq_desc + i;
  31.997 -		unsigned int status;
  31.998 -
  31.999 -		spin_lock_irq(&desc->lock);
 31.1000 -		status = desc->status;
 31.1001 -
 31.1002 -		if (status & IRQ_AUTODETECT) {
 31.1003 -			if (!(status & IRQ_WAITING)) {
 31.1004 -				if (!nr_irqs)
 31.1005 -					irq_found = i;
 31.1006 -				nr_irqs++;
 31.1007 -			}
 31.1008 -			desc->status = status & ~IRQ_AUTODETECT;
 31.1009 -			desc->handler->shutdown(i);
 31.1010 -		}
 31.1011 -		spin_unlock_irq(&desc->lock);
 31.1012 -	}
 31.1013 -	up(&probe_sem);
 31.1014 -
 31.1015 -	if (nr_irqs > 1)
 31.1016 -		irq_found = -irq_found;
 31.1017 -	return irq_found;
 31.1018 -}
 31.1019 -
 31.1020 -/* this was setup_x86_irq but it seems pretty generic */
 31.1021 -int setup_irq(unsigned int irq, struct irqaction * new)
 31.1022 -{
 31.1023 -	int shared = 0;
 31.1024 -	unsigned long flags;
 31.1025 -	struct irqaction *old, **p;
 31.1026 -	irq_desc_t *desc = irq_desc + irq;
 31.1027 -
 31.1028 -	/*
 31.1029 -	 * Some drivers like serial.c use request_irq() heavily,
 31.1030 -	 * so we have to be careful not to interfere with a
 31.1031 -	 * running system.
 31.1032 -	 */
 31.1033 -	if (new->flags & SA_SAMPLE_RANDOM) {
 31.1034 -		/*
 31.1035 -		 * This function might sleep, we want to call it first,
 31.1036 -		 * outside of the atomic block.
 31.1037 -		 * Yes, this might clear the entropy pool if the wrong
 31.1038 -		 * driver is attempted to be loaded, without actually
 31.1039 -		 * installing a new handler, but is this really a problem,
 31.1040 -		 * only the sysadmin is able to do this.
 31.1041 -		 */
 31.1042 -		rand_initialize_irq(irq);
 31.1043 -	}
 31.1044 -
 31.1045 -	/*
 31.1046 -	 * The following block of code has to be executed atomically
 31.1047 -	 */
 31.1048 -	spin_lock_irqsave(&desc->lock,flags);
 31.1049 -	p = &desc->action;
 31.1050 -	if ((old = *p) != NULL) {
 31.1051 -		/* Can't share interrupts unless both agree to */
 31.1052 -		if (!(old->flags & new->flags & SA_SHIRQ)) {
 31.1053 -			spin_unlock_irqrestore(&desc->lock,flags);
 31.1054 -			return -EBUSY;
 31.1055 -		}
 31.1056 -
 31.1057 -		/* add new interrupt at end of irq queue */
 31.1058 -		do {
 31.1059 -			p = &old->next;
 31.1060 -			old = *p;
 31.1061 -		} while (old);
 31.1062 -		shared = 1;
 31.1063 -	}
 31.1064 -
 31.1065 -	*p = new;
 31.1066 -
 31.1067 -	if (!shared) {
 31.1068 -		desc->depth = 0;
 31.1069 -		desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
 31.1070 -		desc->handler->startup(irq);
 31.1071 -	}
 31.1072 -	spin_unlock_irqrestore(&desc->lock,flags);
 31.1073 -
 31.1074 -	register_irq_proc(irq);
 31.1075 -	return 0;
 31.1076 -}
 31.1077 -
 31.1078 -static struct proc_dir_entry * root_irq_dir;
 31.1079 -static struct proc_dir_entry * irq_dir [NR_IRQS];
 31.1080 -
 31.1081 -#define HEX_DIGITS 8
 31.1082 -
 31.1083 -static unsigned int parse_hex_value (const char *buffer,
 31.1084 -		unsigned long count, unsigned long *ret)
 31.1085 -{
 31.1086 -	unsigned char hexnum [HEX_DIGITS];
 31.1087 -	unsigned long value;
 31.1088 -	int i;
 31.1089 -
 31.1090 -	if (!count)
 31.1091 -		return -EINVAL;
 31.1092 -	if (count > HEX_DIGITS)
 31.1093 -		count = HEX_DIGITS;
 31.1094 -	if (copy_from_user(hexnum, buffer, count))
 31.1095 -		return -EFAULT;
 31.1096 -
 31.1097 -	/*
 31.1098 -	 * Parse the first 8 characters as a hex string, any non-hex char
 31.1099 -	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
 31.1100 -	 */
 31.1101 -	value = 0;
 31.1102 -
 31.1103 -	for (i = 0; i < count; i++) {
 31.1104 -		unsigned int c = hexnum[i];
 31.1105 -
 31.1106 -		switch (c) {
 31.1107 -			case '0' ... '9': c -= '0'; break;
 31.1108 -			case 'a' ... 'f': c -= 'a'-10; break;
 31.1109 -			case 'A' ... 'F': c -= 'A'-10; break;
 31.1110 -		default:
 31.1111 -			goto out;
 31.1112 -		}
 31.1113 -		value = (value << 4) | c;
 31.1114 -	}
 31.1115 -out:
 31.1116 -	*ret = value;
 31.1117 -	return 0;
 31.1118 -}
 31.1119 -
 31.1120 -#if CONFIG_SMP
 31.1121 -
 31.1122 -static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
 31.1123 -
 31.1124 -static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
 31.1125 -static int irq_affinity_read_proc (char *page, char **start, off_t off,
 31.1126 -			int count, int *eof, void *data)
 31.1127 -{
 31.1128 -	if (count < HEX_DIGITS+1)
 31.1129 -		return -EINVAL;
 31.1130 -	return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
 31.1131 -}
 31.1132 -
 31.1133 -static int irq_affinity_write_proc (struct file *file, const char *buffer,
 31.1134 -					unsigned long count, void *data)
 31.1135 -{
 31.1136 -	int irq = (long) data, full_count = count, err;
 31.1137 -	unsigned long new_value;
 31.1138 -
 31.1139 -	if (!irq_desc[irq].handler->set_affinity)
 31.1140 -		return -EIO;
 31.1141 -
 31.1142 -	err = parse_hex_value(buffer, count, &new_value);
 31.1143 -
 31.1144 -	/*
 31.1145 -	 * Do not allow disabling IRQs completely - it's a too easy
 31.1146 -	 * way to make the system unusable accidentally :-) At least
 31.1147 -	 * one online CPU still has to be targeted.
 31.1148 -	 */
 31.1149 -	if (!(new_value & cpu_online_map))
 31.1150 -		return -EINVAL;
 31.1151 -
 31.1152 -	irq_affinity[irq] = new_value;
 31.1153 -	irq_desc[irq].handler->set_affinity(irq, new_value);
 31.1154 -
 31.1155 -	return full_count;
 31.1156 -}
 31.1157 -
 31.1158 -#endif
 31.1159 -
 31.1160 -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
 31.1161 -			int count, int *eof, void *data)
 31.1162 -{
 31.1163 -	unsigned long *mask = (unsigned long *) data;
 31.1164 -	if (count < HEX_DIGITS+1)
 31.1165 -		return -EINVAL;
 31.1166 -	return sprintf (page, "%08lx\n", *mask);
 31.1167 -}
 31.1168 -
 31.1169 -static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
 31.1170 -					unsigned long count, void *data)
 31.1171 -{
 31.1172 -	unsigned long *mask = (unsigned long *) data, full_count = count, err;
 31.1173 -	unsigned long new_value;
 31.1174 -
 31.1175 -	err = parse_hex_value(buffer, count, &new_value);
 31.1176 -	if (err)
 31.1177 -		return err;
 31.1178 -
 31.1179 -	*mask = new_value;
 31.1180 -	return full_count;
 31.1181 -}
 31.1182 -
 31.1183 -#define MAX_NAMELEN 10
 31.1184 -
 31.1185 -static void register_irq_proc (unsigned int irq)
 31.1186 -{
 31.1187 -	char name [MAX_NAMELEN];
 31.1188 -
 31.1189 -	if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) ||
 31.1190 -			irq_dir[irq])
 31.1191 -		return;
 31.1192 -
 31.1193 -	memset(name, 0, MAX_NAMELEN);
 31.1194 -	sprintf(name, "%d", irq);
 31.1195 -
 31.1196 -	/* create /proc/irq/1234 */
 31.1197 -	irq_dir[irq] = proc_mkdir(name, root_irq_dir);
 31.1198 -
 31.1199 -#if CONFIG_SMP
 31.1200 -	{
 31.1201 -		struct proc_dir_entry *entry;
 31.1202 -
 31.1203 -		/* create /proc/irq/1234/smp_affinity */
 31.1204 -		entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
 31.1205 -
 31.1206 -		if (entry) {
 31.1207 -			entry->nlink = 1;
 31.1208 -			entry->data = (void *)(long)irq;
 31.1209 -			entry->read_proc = irq_affinity_read_proc;
 31.1210 -			entry->write_proc = irq_affinity_write_proc;
 31.1211 -		}
 31.1212 -
 31.1213 -		smp_affinity_entry[irq] = entry;
 31.1214 -	}
 31.1215 -#endif
 31.1216 -}
 31.1217 -
 31.1218 -unsigned long prof_cpu_mask = -1;
 31.1219 -
 31.1220 -void init_irq_proc (void)
 31.1221 -{
 31.1222 -	struct proc_dir_entry *entry;
 31.1223 -	int i;
 31.1224 -
 31.1225 -	/* create /proc/irq */
 31.1226 -	root_irq_dir = proc_mkdir("irq", 0);
 31.1227 -
 31.1228 -	/* create /proc/irq/prof_cpu_mask */
 31.1229 -	entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
 31.1230 -
 31.1231 -	if (!entry)
 31.1232 -	    return;
 31.1233 -
 31.1234 -	entry->nlink = 1;
 31.1235 -	entry->data = (void *)&prof_cpu_mask;
 31.1236 -	entry->read_proc = prof_cpu_mask_read_proc;
 31.1237 -	entry->write_proc = prof_cpu_mask_write_proc;
 31.1238 -
 31.1239 -	/*
 31.1240 -	 * Create entries for all existing IRQs.
 31.1241 -	 */
 31.1242 -	for (i = 0; i < NR_IRQS; i++)
 31.1243 -		register_irq_proc(i);
 31.1244 -}
 31.1245 -
    32.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/ldt.c	Fri Jul 29 11:52:33 2005 -0700
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,272 +0,0 @@
    32.4 -/*
    32.5 - * linux/kernel/ldt.c
    32.6 - *
    32.7 - * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
    32.8 - * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
    32.9 - */
   32.10 -
   32.11 -#include <linux/errno.h>
   32.12 -#include <linux/sched.h>
   32.13 -#include <linux/string.h>
   32.14 -#include <linux/mm.h>
   32.15 -#include <linux/smp.h>
   32.16 -#include <linux/smp_lock.h>
   32.17 -#include <linux/vmalloc.h>
   32.18 -#include <linux/slab.h>
   32.19 -
   32.20 -#include <asm/mmu_context.h>
   32.21 -#include <asm/uaccess.h>
   32.22 -#include <asm/system.h>
   32.23 -#include <asm/ldt.h>
   32.24 -#include <asm/desc.h>
   32.25 -
   32.26 -#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
   32.27 -static void flush_ldt(void *mm)
   32.28 -{
   32.29 -	if (current->active_mm)
   32.30 -		load_LDT(&current->active_mm->context);
   32.31 -}
   32.32 -#endif
   32.33 -
   32.34 -static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
   32.35 -{
   32.36 -	void *oldldt;
   32.37 -	void *newldt;
   32.38 -	int oldsize;
   32.39 -
   32.40 -	if (mincount <= pc->size)
   32.41 -		return 0;
   32.42 -	oldsize = pc->size;
   32.43 -	mincount = (mincount+511)&(~511);
   32.44 -	if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
   32.45 -		newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
   32.46 -	else
   32.47 -		newldt = kmalloc(mincount*LDT_ENTRY_SIZE, GFP_KERNEL);
   32.48 -
   32.49 -	if (!newldt)
   32.50 -		return -ENOMEM;
   32.51 -
   32.52 -	if (oldsize)
   32.53 -		memcpy(newldt, pc->ldt, oldsize*LDT_ENTRY_SIZE);
   32.54 -
   32.55 -	oldldt = pc->ldt;
   32.56 -	memset(newldt+oldsize*LDT_ENTRY_SIZE, 0, (mincount-oldsize)*LDT_ENTRY_SIZE);
   32.57 -	wmb();
   32.58 -	pc->ldt = newldt;
   32.59 -	pc->size = mincount;
   32.60 -	if (reload) {
   32.61 -		make_pages_readonly(
   32.62 -			pc->ldt,
   32.63 -			(pc->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
   32.64 -		load_LDT(pc);
   32.65 -#ifdef CONFIG_SMP
   32.66 -		if (current->mm->cpu_vm_mask != (1<<smp_processor_id()))
   32.67 -			smp_call_function(flush_ldt, 0, 1, 1);
   32.68 -#endif
   32.69 -	}
   32.70 -	wmb();
   32.71 -	if (oldsize) {
   32.72 -		make_pages_writable(
   32.73 -			oldldt, (oldsize*LDT_ENTRY_SIZE)/PAGE_SIZE);
   32.74 -		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
   32.75 -			vfree(oldldt);
   32.76 -		else
   32.77 -			kfree(oldldt);
   32.78 -	}
   32.79 -	return 0;
   32.80 -}
   32.81 -
   32.82 -static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
   32.83 -{
   32.84 -	int err = alloc_ldt(new, old->size, 0);
   32.85 -	if (err < 0) {
   32.86 -		printk(KERN_WARNING "ldt allocation failed\n");
   32.87 -		new->size = 0;
   32.88 -		return err;
   32.89 -	}
   32.90 -	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
   32.91 -	make_pages_readonly(new->ldt, (new->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
   32.92 -	return 0;
   32.93 -}
   32.94 -
   32.95 -/*
   32.96 - * we do not have to muck with descriptors here, that is
   32.97 - * done in switch_mm() as needed.
   32.98 - */
   32.99 -int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
  32.100 -{
  32.101 -	struct mm_struct * old_mm;
  32.102 -	int retval = 0;
  32.103 -
  32.104 -	init_MUTEX(&mm->context.sem);
  32.105 -	mm->context.size = 0;
  32.106 -	old_mm = current->mm;
  32.107 -	if (old_mm && old_mm->context.size > 0) {
  32.108 -		down(&old_mm->context.sem);
  32.109 -		retval = copy_ldt(&mm->context, &old_mm->context);
  32.110 -		up(&old_mm->context.sem);
  32.111 -	}
  32.112 -	return retval;
  32.113 -}
  32.114 -
  32.115 -/*
  32.116 - * No need to lock the MM as we are the last user
  32.117 - * Do not touch the ldt register, we are already
  32.118 - * in the next thread.
  32.119 - */
  32.120 -void destroy_context(struct mm_struct *mm)
  32.121 -{
  32.122 -	if (mm->context.size) {
  32.123 -		make_pages_writable(
  32.124 -			mm->context.ldt, 
  32.125 -			(mm->context.size*LDT_ENTRY_SIZE)/PAGE_SIZE);
  32.126 -		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
  32.127 -			vfree(mm->context.ldt);
  32.128 -		else
  32.129 -			kfree(mm->context.ldt);
  32.130 -		mm->context.size = 0;
  32.131 -	}
  32.132 -}
  32.133 -
  32.134 -static int read_ldt(void * ptr, unsigned long bytecount)
  32.135 -{
  32.136 -	int err;
  32.137 -	unsigned long size;
  32.138 -	struct mm_struct * mm = current->mm;
  32.139 -
  32.140 -	if (!mm->context.size)
  32.141 -		return 0;
  32.142 -	if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES)
  32.143 -		bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES;
  32.144 -
  32.145 -	down(&mm->context.sem);
  32.146 -	size = mm->context.size*LDT_ENTRY_SIZE;
  32.147 -	if (size > bytecount)
  32.148 -		size = bytecount;
  32.149 -
  32.150 -	err = 0;
  32.151 -	if (copy_to_user(ptr, mm->context.ldt, size))
  32.152 -		err = -EFAULT;
  32.153 -	up(&mm->context.sem);
  32.154 -	if (err < 0)
  32.155 -		return err;
  32.156 -	if (size != bytecount) {
  32.157 -		/* zero-fill the rest */
  32.158 -		clear_user(ptr+size, bytecount-size);
  32.159 -	}
  32.160 -	return bytecount;
  32.161 -}
  32.162 -
  32.163 -static int read_default_ldt(void * ptr, unsigned long bytecount)
  32.164 -{
  32.165 -	int err;
  32.166 -	unsigned long size;
  32.167 -	void *address;
  32.168 -
  32.169 -	err = 0;
  32.170 -	address = &default_ldt[0];
  32.171 -	size = 5*sizeof(struct desc_struct);
  32.172 -	if (size > bytecount)
  32.173 -		size = bytecount;
  32.174 -
  32.175 -	err = size;
  32.176 -	if (copy_to_user(ptr, address, size))
  32.177 -		err = -EFAULT;
  32.178 -
  32.179 -	return err;
  32.180 -}
  32.181 -
  32.182 -static int write_ldt(void * ptr, unsigned long bytecount, int oldmode)
  32.183 -{
  32.184 -	struct mm_struct * mm = current->mm;
  32.185 -	__u32 entry_1, entry_2, *lp;
  32.186 -	unsigned long mach_lp;
  32.187 -	int error;
  32.188 -	struct modify_ldt_ldt_s ldt_info;
  32.189 -
  32.190 -	error = -EINVAL;
  32.191 -	if (bytecount != sizeof(ldt_info))
  32.192 -		goto out;
  32.193 -	error = -EFAULT; 	
  32.194 -	if (copy_from_user(&ldt_info, ptr, sizeof(ldt_info)))
  32.195 -		goto out;
  32.196 -
  32.197 -	error = -EINVAL;
  32.198 -	if (ldt_info.entry_number >= LDT_ENTRIES)
  32.199 -		goto out;
  32.200 -	if (ldt_info.contents == 3) {
  32.201 -		if (oldmode)
  32.202 -			goto out;
  32.203 -		if (ldt_info.seg_not_present == 0)
  32.204 -			goto out;
  32.205 -	}
  32.206 -
  32.207 -	down(&mm->context.sem);
  32.208 -	if (ldt_info.entry_number >= mm->context.size) {
  32.209 -		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
  32.210 -		if (error < 0)
  32.211 -			goto out_unlock;
  32.212 -	}
  32.213 -
  32.214 -	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
  32.215 -	mach_lp = arbitrary_virt_to_machine(lp);
  32.216 -
  32.217 -   	/* Allow LDTs to be cleared by the user. */
  32.218 -   	if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
  32.219 -		if (oldmode ||
  32.220 -		    (ldt_info.contents == 0		&&
  32.221 -		     ldt_info.read_exec_only == 1	&&
  32.222 -		     ldt_info.seg_32bit == 0		&&
  32.223 -		     ldt_info.limit_in_pages == 0	&&
  32.224 -		     ldt_info.seg_not_present == 1	&&
  32.225 -		     ldt_info.useable == 0 )) {
  32.226 -			entry_1 = 0;
  32.227 -			entry_2 = 0;
  32.228 -			goto install;
  32.229 -		}
  32.230 -	}
  32.231 -
  32.232 -	entry_1 = ((ldt_info.base_addr & 0x0000ffff) << 16) |
  32.233 -		  (ldt_info.limit & 0x0ffff);
  32.234 -	entry_2 = (ldt_info.base_addr & 0xff000000) |
  32.235 -		  ((ldt_info.base_addr & 0x00ff0000) >> 16) |
  32.236 -		  (ldt_info.limit & 0xf0000) |
  32.237 -		  ((ldt_info.read_exec_only ^ 1) << 9) |
  32.238 -		  (ldt_info.contents << 10) |
  32.239 -		  ((ldt_info.seg_not_present ^ 1) << 15) |
  32.240 -		  (ldt_info.seg_32bit << 22) |
  32.241 -		  (ldt_info.limit_in_pages << 23) |
  32.242 -		  0x7000;
  32.243 -	if (!oldmode)
  32.244 -		entry_2 |= (ldt_info.useable << 20);
  32.245 -
  32.246 -	/* Install the new entry ...  */
  32.247 -install:
  32.248 -	error = HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
  32.249 -
  32.250 -out_unlock:
  32.251 -	up(&mm->context.sem);
  32.252 -out:
  32.253 -	return error;
  32.254 -}
  32.255 -
  32.256 -asmlinkage int sys_modify_ldt(int func, void *ptr, unsigned long bytecount)
  32.257 -{
  32.258 -	int ret = -ENOSYS;
  32.259 -
  32.260 -	switch (func) {
  32.261 -	case 0:
  32.262 -		ret = read_ldt(ptr, bytecount);
  32.263 -		break;
  32.264 -	case 1:
  32.265 -		ret = write_ldt(ptr, bytecount, 1);
  32.266 -		break;
  32.267 -	case 2:
  32.268 -		ret = read_default_ldt(ptr, bytecount);
  32.269 -		break;
  32.270 -	case 0x11:
  32.271 -		ret = write_ldt(ptr, bytecount, 0);
  32.272 -		break;
  32.273 -	}
  32.274 -	return ret;
  32.275 -}
    33.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/pci-pc.c	Fri Jul 29 11:52:33 2005 -0700
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,260 +0,0 @@
    33.4 -/*
    33.5 - *	Low-Level PCI Support for PC
    33.6 - *
    33.7 - *	(c) 1999--2000 Martin Mares <mj@ucw.cz>
    33.8 - *
    33.9 - * Adjusted to use Xen's interface by Rolf Neugebauer, Intel Research Cambridge
   33.10 - * Further modifications by Keir Fraser, University of Cambridge
   33.11 - */
   33.12 -
   33.13 -#include <linux/config.h>
   33.14 -#include <linux/types.h>
   33.15 -#include <linux/kernel.h>
   33.16 -#include <linux/sched.h>
   33.17 -#include <linux/pci.h>
   33.18 -#include <linux/init.h>
   33.19 -#include <linux/ioport.h>
   33.20 -
   33.21 -#include <asm/segment.h>
   33.22 -#include <asm/io.h>
   33.23 -
   33.24 -#include <asm-xen/xen-public/xen.h>
   33.25 -#include <asm-xen/xen-public/physdev.h>
   33.26 -
   33.27 -#include "pci-i386.h"
   33.28 -
   33.29 -/*
   33.30 - * NB. The following interface functions are not included here:
   33.31 - *  1. void eisa_set_level_irq(unsigned int irq)
   33.32 - *  2. irq_routing_table * __devinit pcibios_get_irq_routing_table(void)
   33.33 - *  3. int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
   33.34 - * All are used by the ACPI driver. This should be ported to Xen if it is
   33.35 - * ever required -- Xen is the ultimate source for IRQ-routing knowledge.
   33.36 - */
   33.37 -
   33.38 -struct pci_ops *pci_root_ops = NULL;
   33.39 -
   33.40 -int (*pci_config_read)(int seg, int bus, int dev, int fn, 
   33.41 -                       int reg, int len, u32 *value) = NULL;
   33.42 -int (*pci_config_write)(int seg, int bus, int dev, int fn,
   33.43 -                        int reg, int len, u32 value) = NULL;
   33.44 -
   33.45 -unsigned int pci_probe = PCI_PROBE_BIOS;
   33.46 -
   33.47 -struct pci_fixup pcibios_fixups[] = { { 0 } };
   33.48 -
   33.49 -static int pci_confx_read(int seg, int bus, int dev, int fn, int reg, 
   33.50 -                          int len, u32 *value)
   33.51 -{
   33.52 -    int ret;
   33.53 -    physdev_op_t op;
   33.54 -
   33.55 -    if (bus > 255 || dev > 31 || fn > 7 || reg > 255)
   33.56 -        return -EINVAL;
   33.57 -
   33.58 -    op.cmd = PHYSDEVOP_PCI_CFGREG_READ;
   33.59 -    op.u.pci_cfgreg_read.bus  = bus;
   33.60 -    op.u.pci_cfgreg_read.dev  = dev;
   33.61 -    op.u.pci_cfgreg_read.func = fn;
   33.62 -    op.u.pci_cfgreg_read.reg  = reg;
   33.63 -    op.u.pci_cfgreg_read.len  = len;
   33.64 -
   33.65 -    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
   33.66 -        return ret;
   33.67 -
   33.68 -    *value = op.u.pci_cfgreg_read.value;
   33.69 -
   33.70 -    return 0;
   33.71 -}
   33.72 -
   33.73 -static int pci_confx_write(int seg, int bus, int dev, int fn, int reg, 
   33.74 -                           int len, u32 value)
   33.75 -{
   33.76 -    int ret;
   33.77 -    physdev_op_t op;
   33.78 -
   33.79 -    if ((bus > 255 || dev > 31 || fn > 7 || reg > 255)) 
   33.80 -        return -EINVAL;
   33.81 -
   33.82 -    op.cmd = PHYSDEVOP_PCI_CFGREG_WRITE;
   33.83 -    op.u.pci_cfgreg_write.bus   = bus;
   33.84 -    op.u.pci_cfgreg_write.dev   = dev;
   33.85 -    op.u.pci_cfgreg_write.func  = fn;
   33.86 -    op.u.pci_cfgreg_write.reg   = reg;
   33.87 -    op.u.pci_cfgreg_write.len   = len;
   33.88 -    op.u.pci_cfgreg_write.value = value;
   33.89 -
   33.90 -    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
   33.91 -        return ret;
   33.92 -    return 0;
   33.93 -}
   33.94 -
   33.95 -
   33.96 -static int pci_confx_read_config_byte(struct pci_dev *dev, 
   33.97 -                                      int where, u8 *value)
   33.98 -{
   33.99 -    int result; 
  33.100 -    u32 data;
  33.101 -
  33.102 -    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  33.103 -                            PCI_FUNC(dev->devfn), where, 1, &data);
  33.104 -
  33.105 -    *value = (u8)data;
  33.106 -
  33.107 -    return result;
  33.108 -}
  33.109 -
  33.110 -static int pci_confx_read_config_word(struct pci_dev *dev, 
  33.111 -                                      int where, u16 *value)
  33.112 -{
  33.113 -    int result; 
  33.114 -    u32 data;
  33.115 -
  33.116 -    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  33.117 -                            PCI_FUNC(dev->devfn), where, 2, &data);
  33.118 -
  33.119 -    *value = (u16)data;
  33.120 -
  33.121 -    return result;
  33.122 -}
  33.123 -
  33.124 -static int pci_confx_read_config_dword(struct pci_dev *dev, 
  33.125 -                                       int where, u32 *value)
  33.126 -{
  33.127 -    return pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  33.128 -                          PCI_FUNC(dev->devfn), where, 4, value);
  33.129 -}
  33.130 -
  33.131 -static int pci_confx_write_config_byte(struct pci_dev *dev, 
  33.132 -                                       int where, u8 value)
  33.133 -{
  33.134 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  33.135 -                           PCI_FUNC(dev->devfn), where, 1, value);
  33.136 -}
  33.137 -
  33.138 -static int pci_confx_write_config_word(struct pci_dev *dev, 
  33.139 -                                       int where, u16 value)
  33.140 -{
  33.141 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  33.142 -                           PCI_FUNC(dev->devfn), where, 2, value);
  33.143 -}
  33.144 -
  33.145 -static int pci_confx_write_config_dword(struct pci_dev *dev, 
  33.146 -                                        int where, u32 value)
  33.147 -{
  33.148 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  33.149 -                           PCI_FUNC(dev->devfn), where, 4, value);
  33.150 -}
  33.151 -
  33.152 -static struct pci_ops pci_conf_xen = {
  33.153 -    pci_confx_read_config_byte,
  33.154 -    pci_confx_read_config_word,
  33.155 -    pci_confx_read_config_dword,
  33.156 -    pci_confx_write_config_byte,
  33.157 -    pci_confx_write_config_word,
  33.158 -    pci_confx_write_config_dword
  33.159 -};
  33.160 -
  33.161 -void pcibios_penalize_isa_irq(int irq)
  33.162 -{ 
  33.163 -    /* nothing */
  33.164 -}
  33.165 -
  33.166 -void __devinit pcibios_fixup_bus(struct pci_bus *b)
  33.167 -{
  33.168 -    pci_read_bridge_bases(b);
  33.169 -}
  33.170 -
  33.171 -struct pci_bus * __devinit pcibios_scan_root(int busnum)
  33.172 -{
  33.173 -    struct list_head *list;
  33.174 -    struct pci_bus *bus;
  33.175 -
  33.176 -    list_for_each ( list, &pci_root_buses )
  33.177 -    {
  33.178 -        bus = pci_bus_b(list);
  33.179 -        if ( bus->number == busnum )
  33.180 -            return bus;
  33.181 -    }
  33.182 -
  33.183 -    printk("PCI: Probing PCI hardware (bus %02x)\n", busnum);
  33.184 -    return pci_scan_bus(busnum, pci_root_ops, NULL);
  33.185 -}
  33.186 -
  33.187 -void __init pcibios_init(void)
  33.188 -{
  33.189 -    int bus;
  33.190 -    physdev_op_t op;
  33.191 -
  33.192 -    if ( !pci_probe )
  33.193 -        return;
  33.194 -
  33.195 -    pci_root_ops     = &pci_conf_xen;
  33.196 -    pci_config_read  = pci_confx_read;
  33.197 -    pci_config_write = pci_confx_write;
  33.198 -
  33.199 -    pcibios_set_cacheline_size();
  33.200 -
  33.201 -    op.cmd = PHYSDEVOP_PCI_PROBE_ROOT_BUSES;
  33.202 -    if ( HYPERVISOR_physdev_op(&op) != 0 )
  33.203 -    {
  33.204 -        printk(KERN_WARNING "PCI: System does not support PCI\n");
  33.205 -        return;
  33.206 -    }
  33.207 -
  33.208 -    printk(KERN_INFO "PCI: Probing PCI hardware\n");
  33.209 -    for ( bus = 0; bus < 256; bus++ )
  33.210 -        if ( test_bit(bus, &op.u.pci_probe_root_buses.busmask[0]) )
  33.211 -            (void)pcibios_scan_root(bus);
  33.212 -
  33.213 -    pcibios_resource_survey();
  33.214 -}
  33.215 -
  33.216 -char * __devinit pcibios_setup(char *str)
  33.217 -{
  33.218 -    if ( !strcmp(str, "off") )
  33.219 -        pci_probe = 0;
  33.220 -    return NULL;
  33.221 -}
  33.222 -
  33.223 -unsigned int pcibios_assign_all_busses(void)
  33.224 -{
  33.225 -    return 0;
  33.226 -}
  33.227 -
  33.228 -int pcibios_enable_device(struct pci_dev *dev, int mask)
  33.229 -{
  33.230 -    int err;
  33.231 -    u8  pin;
  33.232 -    physdev_op_t op;
  33.233 -
  33.234 -    /* Inform Xen that we are going to use this device. */
  33.235 -    op.cmd = PHYSDEVOP_PCI_INITIALISE_DEVICE;
  33.236 -    op.u.pci_initialise_device.bus  = dev->bus->number;
  33.237 -    op.u.pci_initialise_device.dev  = PCI_SLOT(dev->devfn);
  33.238 -    op.u.pci_initialise_device.func = PCI_FUNC(dev->devfn);
  33.239 -    if ( (err = HYPERVISOR_physdev_op(&op)) != 0 )
  33.240 -        return err;
  33.241 -
  33.242 -    /* Now we can bind to the very final IRQ line. */
  33.243 -    pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &pin);
  33.244 -    dev->irq = pin;
  33.245 -
  33.246 -    /* Turn on device I/O and memory access as necessary. */
  33.247 -    if ( (err = pcibios_enable_resources(dev, mask)) < 0 )
  33.248 -        return err;
  33.249 -
  33.250 -    /* Sanity-check that an interrupt-producing device is routed to an IRQ. */
  33.251 -    pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
  33.252 -    if ( pin != 0 )
  33.253 -    {
  33.254 -        if ( dev->irq != 0 )
  33.255 -            printk(KERN_INFO "PCI: Obtained IRQ %d for device %s\n",
  33.256 -                   dev->irq, dev->slot_name);
  33.257 -        else
  33.258 -            printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of "
  33.259 -                   "device %s.\n", 'A' + pin - 1, dev->slot_name);
  33.260 -    }
  33.261 -
  33.262 -    return 0;
  33.263 -}
    34.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/process.c	Fri Jul 29 11:52:33 2005 -0700
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,448 +0,0 @@
    34.4 -/*
    34.5 - *  linux/arch/i386/kernel/process.c
    34.6 - *
    34.7 - *  Copyright (C) 1995  Linus Torvalds
    34.8 - *
    34.9 - *  Pentium III FXSR, SSE support
   34.10 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   34.11 - */
   34.12 -
   34.13 -/*
   34.14 - * This file handles the architecture-dependent parts of process handling..
   34.15 - */
   34.16 -
   34.17 -#define __KERNEL_SYSCALLS__
   34.18 -#include <stdarg.h>
   34.19 -
   34.20 -#include <linux/errno.h>
   34.21 -#include <linux/sched.h>
   34.22 -#include <linux/kernel.h>
   34.23 -#include <linux/mm.h>
   34.24 -#include <linux/smp.h>
   34.25 -#include <linux/smp_lock.h>
   34.26 -#include <linux/stddef.h>
   34.27 -#include <linux/unistd.h>
   34.28 -#include <linux/ptrace.h>
   34.29 -#include <linux/slab.h>
   34.30 -#include <linux/vmalloc.h>
   34.31 -#include <linux/user.h>
   34.32 -#include <linux/a.out.h>
   34.33 -#include <linux/interrupt.h>
   34.34 -#include <linux/config.h>
   34.35 -#include <linux/delay.h>
   34.36 -#include <linux/reboot.h>
   34.37 -#include <linux/init.h>
   34.38 -#include <linux/mc146818rtc.h>
   34.39 -
   34.40 -#include <asm/uaccess.h>
   34.41 -#include <asm/pgtable.h>
   34.42 -#include <asm/system.h>
   34.43 -#include <asm/io.h>
   34.44 -#include <asm/ldt.h>
   34.45 -#include <asm/processor.h>
   34.46 -#include <asm/i387.h>
   34.47 -#include <asm/desc.h>
   34.48 -#include <asm/mmu_context.h>
   34.49 -#include <asm-xen/xen-public/physdev.h>
   34.50 -
   34.51 -#include <linux/irq.h>
   34.52 -
   34.53 -asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
   34.54 -
   34.55 -int hlt_counter;
   34.56 -
   34.57 -/*
   34.58 - * Powermanagement idle function, if any..
   34.59 - */
   34.60 -void (*pm_idle)(void);
   34.61 -
   34.62 -/*
   34.63 - * Power off function, if any
   34.64 - */
   34.65 -void (*pm_power_off)(void);
   34.66 -
   34.67 -void disable_hlt(void)
   34.68 -{
   34.69 -    hlt_counter++;
   34.70 -}
   34.71 -
   34.72 -void enable_hlt(void)
   34.73 -{
   34.74 -    hlt_counter--;
   34.75 -}
   34.76 -
   34.77 -/*
   34.78 - * The idle thread. There's no useful work to be
   34.79 - * done, so just try to conserve power and have a
   34.80 - * low exit latency (ie sit in a loop waiting for
   34.81 - * somebody to say that they'd like to reschedule)
   34.82 - */
   34.83 -void cpu_idle (void)
   34.84 -{
   34.85 -    extern int set_timeout_timer(void);
   34.86 -
   34.87 -    /* Endless idle loop with no priority at all. */
   34.88 -    init_idle();
   34.89 -    current->nice = 20;
   34.90 -    current->counter = -100;
   34.91 -
   34.92 -    for ( ; ; )
   34.93 -    {
   34.94 -        while ( !current->need_resched )
   34.95 -        {
   34.96 -            __cli();
   34.97 -            if ( current->need_resched )
   34.98 -            {
   34.99 -                /* The race-free check for events failed. */
  34.100 -                __sti();
  34.101 -                break;
  34.102 -            }
  34.103 -            else if ( set_timeout_timer() == 0 )
  34.104 -            {
  34.105 -                /* NB. Blocking reenable events in a race-free manner. */
  34.106 -                HYPERVISOR_block();
  34.107 -            }
  34.108 -            else
  34.109 -            {
  34.110 -                /* No race here: yielding will get us the CPU again anyway. */
  34.111 -                __sti();
  34.112 -                HYPERVISOR_yield();
  34.113 -            }
  34.114 -        }
  34.115 -        schedule();
  34.116 -        check_pgt_cache();
  34.117 -    }
  34.118 -}
  34.119 -
  34.120 -extern void show_trace(unsigned long* esp);
  34.121 -
  34.122 -void show_regs(struct pt_regs * regs)
  34.123 -{
  34.124 -    printk("\n");
  34.125 -    printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
  34.126 -    printk("EIP: %04x:[<%08lx>] CPU: %d",0xffff & regs->xcs,regs->eip, smp_processor_id());
  34.127 -    if (regs->xcs & 2)
  34.128 -        printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
  34.129 -    printk(" EFLAGS: %08lx    %s\n",regs->eflags, print_tainted());
  34.130 -    printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
  34.131 -           regs->eax,regs->ebx,regs->ecx,regs->edx);
  34.132 -    printk("ESI: %08lx EDI: %08lx EBP: %08lx",
  34.133 -           regs->esi, regs->edi, regs->ebp);
  34.134 -    printk(" DS: %04x ES: %04x\n",
  34.135 -           0xffff & regs->xds,0xffff & regs->xes);
  34.136 -
  34.137 -    show_trace(&regs->esp);
  34.138 -}
  34.139 -
  34.140 -
  34.141 -/*
  34.142 - * Create a kernel thread
  34.143 - */
  34.144 -int arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
  34.145 -{
  34.146 -    long retval, d0;
  34.147 -
  34.148 -    __asm__ __volatile__(
  34.149 -        "movl %%esp,%%esi\n\t"
  34.150 -        "int $0x80\n\t"		/* Linux/i386 system call */
  34.151 -        "cmpl %%esp,%%esi\n\t"	/* child or parent? */
  34.152 -        "je 1f\n\t"		/* parent - jump */
  34.153 -        /* Load the argument into eax, and push it.  That way, it does
  34.154 -         * not matter whether the called function is compiled with
  34.155 -         * -mregparm or not.  */
  34.156 -        "movl %4,%%eax\n\t"
  34.157 -        "pushl %%eax\n\t"		
  34.158 -        "call *%5\n\t"		/* call fn */
  34.159 -        "movl %3,%0\n\t"	/* exit */
  34.160 -        "int $0x80\n"
  34.161 -        "1:\t"
  34.162 -        :"=&a" (retval), "=&S" (d0)
  34.163 -        :"0" (__NR_clone), "i" (__NR_exit),
  34.164 -        "r" (arg), "r" (fn),
  34.165 -        "b" (flags | CLONE_VM)
  34.166 -        : "memory");
  34.167 -
  34.168 -    return retval;
  34.169 -}
  34.170 -
  34.171 -/*
  34.172 - * Free current thread data structures etc..
  34.173 - */
  34.174 -void exit_thread(void)
  34.175 -{
  34.176 -    /* nothing to do ... */
  34.177 -}
  34.178 -
  34.179 -void flush_thread(void)
  34.180 -{
  34.181 -    struct task_struct *tsk = current;
  34.182 -
  34.183 -    memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
  34.184 -
  34.185 -    /*
  34.186 -     * Forget coprocessor state..
  34.187 -     */
  34.188 -    clear_fpu(tsk);
  34.189 -    tsk->used_math = 0;
  34.190 -}
  34.191 -
  34.192 -void release_thread(struct task_struct *dead_task)
  34.193 -{
  34.194 -    if (dead_task->mm) {
  34.195 -        // temporary debugging check
  34.196 -        if (dead_task->mm->context.size) {
  34.197 -            printk("WARNING: dead process %8s still has LDT? <%p/%08x>\n",
  34.198 -                   dead_task->comm, 
  34.199 -		   dead_task->mm->context.ldt,
  34.200 -		   dead_task->mm->context.size);
  34.201 -            BUG();
  34.202 -        }
  34.203 -    }
  34.204 -    //release_x86_irqs(dead_task);
  34.205 -}
  34.206 -
  34.207 -
  34.208 -/*
  34.209 - * Save a segment.
  34.210 - */
  34.211 -#define savesegment(seg,value) \
  34.212 -	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
  34.213 -
  34.214 -int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
  34.215 -                unsigned long unused,
  34.216 -                struct task_struct * p, struct pt_regs * regs)
  34.217 -{
  34.218 -    struct pt_regs * childregs;
  34.219 -
  34.220 -    childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p)) - 1;
  34.221 -    struct_cpy(childregs, regs);
  34.222 -    childregs->eax = 0;
  34.223 -    childregs->esp = esp;
  34.224 -
  34.225 -    p->thread.esp = (unsigned long) childregs;
  34.226 -    p->thread.esp0 = (unsigned long) (childregs+1);
  34.227 -
  34.228 -    p->thread.eip = (unsigned long) ret_from_fork;
  34.229 -
  34.230 -    savesegment(fs,p->thread.fs);
  34.231 -    savesegment(gs,p->thread.gs);
  34.232 -
  34.233 -    unlazy_fpu(current);
  34.234 -    struct_cpy(&p->thread.i387, &current->thread.i387);
  34.235 -
  34.236 -    p->thread.io_pl = current->thread.io_pl;
  34.237 -
  34.238 -    return 0;
  34.239 -}
  34.240 -
  34.241 -/*
  34.242 - * fill in the user structure for a core dump..
  34.243 - */
  34.244 -void dump_thread(struct pt_regs * regs, struct user * dump)
  34.245 -{
  34.246 -    int i;
  34.247 -
  34.248 -/* changed the size calculations - should hopefully work better. lbt */
  34.249 -    dump->magic = CMAGIC;
  34.250 -    dump->start_code = 0;
  34.251 -    dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
  34.252 -    dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
  34.253 -    dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
  34.254 -    dump->u_dsize -= dump->u_tsize;
  34.255 -    dump->u_ssize = 0;
  34.256 -    for (i = 0; i < 8; i++)
  34.257 -        dump->u_debugreg[i] = current->thread.debugreg[i];  
  34.258 -
  34.259 -    if (dump->start_stack < TASK_SIZE)
  34.260 -        dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
  34.261 -
  34.262 -    dump->regs.ebx = regs->ebx;
  34.263 -    dump->regs.ecx = regs->ecx;
  34.264 -    dump->regs.edx = regs->edx;
  34.265 -    dump->regs.esi = regs->esi;
  34.266 -    dump->regs.edi = regs->edi;
  34.267 -    dump->regs.ebp = regs->ebp;
  34.268 -    dump->regs.eax = regs->eax;
  34.269 -    dump->regs.ds = regs->xds;
  34.270 -    dump->regs.es = regs->xes;
  34.271 -    savesegment(fs,dump->regs.fs);
  34.272 -    savesegment(gs,dump->regs.gs);
  34.273 -    dump->regs.orig_eax = regs->orig_eax;
  34.274 -    dump->regs.eip = regs->eip;
  34.275 -    dump->regs.cs = regs->xcs;
  34.276 -    dump->regs.eflags = regs->eflags;
  34.277 -    dump->regs.esp = regs->esp;
  34.278 -    dump->regs.ss = regs->xss;
  34.279 -
  34.280 -    dump->u_fpvalid = dump_fpu (regs, &dump->i387);
  34.281 -}
  34.282 -
  34.283 -/*
  34.284 - *	switch_to(x,yn) should switch tasks from x to y.
  34.285 - *
  34.286 - * We fsave/fwait so that an exception goes off at the right time
  34.287 - * (as a call from the fsave or fwait in effect) rather than to
  34.288 - * the wrong process. Lazy FP saving no longer makes any sense
  34.289 - * with modern CPU's, and this simplifies a lot of things (SMP
  34.290 - * and UP become the same).
  34.291 - *
  34.292 - * NOTE! We used to use the x86 hardware context switching. The
  34.293 - * reason for not using it any more becomes apparent when you
  34.294 - * try to recover gracefully from saved state that is no longer
  34.295 - * valid (stale segment register values in particular). With the
  34.296 - * hardware task-switch, there is no way to fix up bad state in
  34.297 - * a reasonable manner.
  34.298 - *
  34.299 - * The fact that Intel documents the hardware task-switching to
  34.300 - * be slow is a fairly red herring - this code is not noticeably
  34.301 - * faster. However, there _is_ some room for improvement here,
  34.302 - * so the performance issues may eventually be a valid point.
  34.303 - * More important, however, is the fact that this allows us much
  34.304 - * more flexibility.
  34.305 - */
  34.306 -void fastcall __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
  34.307 -{
  34.308 -    struct thread_struct *next = &next_p->thread;
  34.309 -    physdev_op_t op;
  34.310 -    multicall_entry_t _mcl[8], *mcl = _mcl;
  34.311 -
  34.312 -    /*
  34.313 -     * This is basically 'unlazy_fpu', except that we queue a multicall to 
  34.314 -     * indicate FPU task switch, rather than synchronously trapping to Xen.
  34.315 -     */
  34.316 -    if ( prev_p->flags & PF_USEDFPU )
  34.317 -    {
  34.318 -	if ( cpu_has_fxsr )
  34.319 -            asm volatile( "fxsave %0 ; fnclex"
  34.320 -                          : "=m" (prev_p->thread.i387.fxsave) );
  34.321 -	else
  34.322 -            asm volatile( "fnsave %0 ; fwait"
  34.323 -                          : "=m" (prev_p->thread.i387.fsave) );
  34.324 -	prev_p->flags &= ~PF_USEDFPU;
  34.325 -        mcl->op      = __HYPERVISOR_fpu_taskswitch;
  34.326 -        mcl->args[0] = 1;
  34.327 -        mcl++;
  34.328 -    }
  34.329 -
  34.330 -    mcl->op      = __HYPERVISOR_stack_switch;
  34.331 -    mcl->args[0] = __KERNEL_DS;
  34.332 -    mcl->args[1] = next->esp0;
  34.333 -    mcl++;
  34.334 -
  34.335 -    if ( prev_p->thread.io_pl != next->io_pl ) 
  34.336 -    {
  34.337 -        op.cmd             = PHYSDEVOP_SET_IOPL;
  34.338 -	op.u.set_iopl.iopl = next->io_pl;
  34.339 -        mcl->op      = __HYPERVISOR_physdev_op;
  34.340 -        mcl->args[0] = (unsigned long)&op;
  34.341 -        mcl++;
  34.342 -    }
  34.343 -
  34.344 -    (void)HYPERVISOR_multicall(_mcl, mcl - _mcl);
  34.345 -
  34.346 -    /*
  34.347 -     * Restore %fs and %gs.
  34.348 -     */
  34.349 -    loadsegment(fs, next->fs);
  34.350 -    loadsegment(gs, next->gs);
  34.351 -
  34.352 -    /*
  34.353 -     * Now maybe reload the debug registers
  34.354 -     */
  34.355 -    if ( next->debugreg[7] != 0 )
  34.356 -    {
  34.357 -        HYPERVISOR_set_debugreg(0, next->debugreg[0]);
  34.358 -        HYPERVISOR_set_debugreg(1, next->debugreg[1]);
  34.359 -        HYPERVISOR_set_debugreg(2, next->debugreg[2]);
  34.360 -        HYPERVISOR_set_debugreg(3, next->debugreg[3]);
  34.361 -        /* no 4 and 5 */
  34.362 -        HYPERVISOR_set_debugreg(6, next->debugreg[6]);
  34.363 -        HYPERVISOR_set_debugreg(7, next->debugreg[7]);
  34.364 -    }
  34.365 -}
  34.366 -
  34.367 -asmlinkage int sys_fork(struct pt_regs regs)
  34.368 -{
  34.369 -    return do_fork(SIGCHLD, regs.esp, &regs, 0);
  34.370 -}
  34.371 -
  34.372 -asmlinkage int sys_clone(struct pt_regs regs)
  34.373 -{
  34.374 -    unsigned long clone_flags;
  34.375 -    unsigned long newsp;
  34.376 -
  34.377 -    clone_flags = regs.ebx;
  34.378 -    newsp = regs.ecx;
  34.379 -    if (!newsp)
  34.380 -        newsp = regs.esp;
  34.381 -    return do_fork(clone_flags, newsp, &regs, 0);
  34.382 -}
  34.383 -
  34.384 -/*
  34.385 - * This is trivial, and on the face of it looks like it
  34.386 - * could equally well be done in user mode.
  34.387 - *
  34.388 - * Not so, for quite unobvious reasons - register pressure.
  34.389 - * In user mode vfork() cannot have a stack frame, and if
  34.390 - * done by calling the "clone()" system call directly, you
  34.391 - * do not have enough call-clobbered registers to hold all
  34.392 - * the information you need.
  34.393 - */
  34.394 -asmlinkage int sys_vfork(struct pt_regs regs)
  34.395 -{
  34.396 -    return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0);
  34.397 -}
  34.398 -
  34.399 -/*
  34.400 - * sys_execve() executes a new program.
  34.401 - */
  34.402 -asmlinkage int sys_execve(struct pt_regs regs)
  34.403 -{
  34.404 -    int error;
  34.405 -    char * filename;
  34.406 -
  34.407 -    filename = getname((char *) regs.ebx);
  34.408 -    error = PTR_ERR(filename);
  34.409 -    if (IS_ERR(filename))
  34.410 -        goto out;
  34.411 -    error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, &regs);
  34.412 -    if (error == 0)
  34.413 -        current->ptrace &= ~PT_DTRACE;
  34.414 -    putname(filename);
  34.415 - out:
  34.416 -    return error;
  34.417 -}
  34.418 -
  34.419 -/*
  34.420 - * These bracket the sleeping functions..
  34.421 - */
  34.422 -extern void scheduling_functions_start_here(void);
  34.423 -extern void scheduling_functions_end_here(void);
  34.424 -#define first_sched	((unsigned long) scheduling_functions_start_here)
  34.425 -#define last_sched	((unsigned long) scheduling_functions_end_here)
  34.426 -
  34.427 -unsigned long get_wchan(struct task_struct *p)
  34.428 -{
  34.429 -    unsigned long ebp, esp, eip;
  34.430 -    unsigned long stack_page;
  34.431 -    int count = 0;
  34.432 -    if (!p || p == current || p->state == TASK_RUNNING)
  34.433 -        return 0;
  34.434 -    stack_page = (unsigned long)p;
  34.435 -    esp = p->thread.esp;
  34.436 -    if (!stack_page || esp < stack_page || esp > 8188+stack_page)
  34.437 -        return 0;
  34.438 -    /* include/asm-i386/system.h:switch_to() pushes ebp last. */
  34.439 -    ebp = *(unsigned long *) esp;
  34.440 -    do {
  34.441 -        if (ebp < stack_page || ebp > 8184+stack_page)
  34.442 -            return 0;
  34.443 -        eip = *(unsigned long *) (ebp+4);
  34.444 -        if (eip < first_sched || eip >= last_sched)
  34.445 -            return eip;
  34.446 -        ebp = *(unsigned long *) ebp;
  34.447 -    } while (count++ < 16);
  34.448 -    return 0;
  34.449 -}
  34.450 -#undef last_sched
  34.451 -#undef first_sched
    35.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/setup.c	Fri Jul 29 11:52:33 2005 -0700
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,1213 +0,0 @@
    35.4 -/*
    35.5 - *  linux/arch/i386/kernel/setup.c
    35.6 - *
    35.7 - *  Copyright (C) 1995  Linus Torvalds
    35.8 - */
    35.9 -
   35.10 -/*
   35.11 - * This file handles the architecture-dependent parts of initialization
   35.12 - */
   35.13 -
   35.14 -#define __KERNEL_SYSCALLS__
   35.15 -static int errno;
   35.16 -#include <linux/errno.h>
   35.17 -#include <linux/sched.h>
   35.18 -#include <linux/kernel.h>
   35.19 -#include <linux/mm.h>
   35.20 -#include <linux/stddef.h>
   35.21 -#include <linux/unistd.h>
   35.22 -#include <linux/ptrace.h>
   35.23 -#include <linux/slab.h>
   35.24 -#include <linux/user.h>
   35.25 -#include <linux/a.out.h>
   35.26 -#include <linux/tty.h>
   35.27 -#include <linux/ioport.h>
   35.28 -#include <linux/delay.h>
   35.29 -#include <linux/config.h>
   35.30 -#include <linux/init.h>
   35.31 -#include <linux/apm_bios.h>
   35.32 -#ifdef CONFIG_BLK_DEV_RAM
   35.33 -#include <linux/blk.h>
   35.34 -#endif
   35.35 -#include <linux/highmem.h>
   35.36 -#include <linux/bootmem.h>
   35.37 -#include <linux/seq_file.h>
   35.38 -#include <linux/reboot.h>
   35.39 -#include <asm/processor.h>
   35.40 -#include <linux/console.h>
   35.41 -#include <linux/module.h>
   35.42 -#include <asm/mtrr.h>
   35.43 -#include <asm/uaccess.h>
   35.44 -#include <asm/system.h>
   35.45 -#include <asm/io.h>
   35.46 -#include <asm/smp.h>
   35.47 -#include <asm/msr.h>
   35.48 -#include <asm/desc.h>
   35.49 -#include <asm/dma.h>
   35.50 -#include <asm/mpspec.h>
   35.51 -#include <asm/mmu_context.h>
   35.52 -#include <asm/ctrl_if.h>
   35.53 -#include <asm/hypervisor.h>
   35.54 -#include <asm-xen/xen-public/physdev.h>
   35.55 -#include <linux/netdevice.h>
   35.56 -#include <linux/rtnetlink.h>
   35.57 -#include <linux/tqueue.h>
   35.58 -#include <net/pkt_sched.h> /* dev_(de)activate */
   35.59 -
   35.60 -/*
   35.61 - * Point at the empty zero page to start with. We map the real shared_info
   35.62 - * page as soon as fixmap is up and running.
   35.63 - */
   35.64 -shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
   35.65 -
   35.66 -unsigned int *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
   35.67 -
   35.68 -/*
   35.69 - * Machine setup..
   35.70 - */
   35.71 -
   35.72 -char ignore_irq13;		/* set if exception 16 works */
   35.73 -struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
   35.74 -
   35.75 -unsigned long mmu_cr4_features;
   35.76 -
   35.77 -unsigned char * vgacon_mmap;
   35.78 -
   35.79 -/*
   35.80 - * Bus types ..
   35.81 - */
   35.82 -#ifdef CONFIG_EISA
   35.83 -int EISA_bus;
   35.84 -#endif
   35.85 -int MCA_bus;
   35.86 -
   35.87 -/* for MCA, but anyone else can use it if they want */
   35.88 -unsigned int machine_id;
   35.89 -unsigned int machine_submodel_id;
   35.90 -unsigned int BIOS_revision;
   35.91 -unsigned int mca_pentium_flag;
   35.92 -
   35.93 -/* For PCI or other memory-mapped resources */
   35.94 -unsigned long pci_mem_start = 0x10000000;
   35.95 -
   35.96 -/*
   35.97 - * Setup options
   35.98 - */
   35.99 -struct drive_info_struct { char dummy[32]; } drive_info;
  35.100 -struct screen_info screen_info;
  35.101 -struct apm_info apm_info;
  35.102 -struct sys_desc_table_struct {
  35.103 -    unsigned short length;
  35.104 -    unsigned char table[0];
  35.105 -};
  35.106 -
  35.107 -unsigned char aux_device_present;
  35.108 -
  35.109 -extern int root_mountflags;
  35.110 -extern char _text, _etext, _edata, _end;
  35.111 -
  35.112 -extern int blk_nohighio;
  35.113 -
  35.114 -int enable_acpi_smp_table;
  35.115 -
  35.116 -/* Raw start-of-day parameters from the hypervisor. */
  35.117 -union xen_start_info_union xen_start_info_union;
  35.118 -
  35.119 -#define COMMAND_LINE_SIZE MAX_GUEST_CMDLINE
  35.120 -static char command_line[COMMAND_LINE_SIZE];
  35.121 -char saved_command_line[COMMAND_LINE_SIZE];
  35.122 -
  35.123 -/* parse_mem_cmdline()
  35.124 - * returns the value of the mem= boot param converted to pages or 0
  35.125 - */ 
  35.126 -static int __init parse_mem_cmdline (char ** cmdline_p)
  35.127 -{
  35.128 -    char c = ' ', *to = command_line, *from = saved_command_line;
  35.129 -    int len = 0;
  35.130 -    unsigned long long bytes;
  35.131 -    int mem_param = 0;
  35.132 -
  35.133 -    /* Save unparsed command line copy for /proc/cmdline */
  35.134 -    memcpy(saved_command_line, xen_start_info.cmd_line, COMMAND_LINE_SIZE);
  35.135 -    saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
  35.136 -
  35.137 -    for (;;) {
  35.138 -        /*
  35.139 -         * "mem=nopentium" disables the 4MB page tables.
  35.140 -         * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
  35.141 -         * to <mem>, overriding the bios size.
  35.142 -         * "mem=XXX[KkmM]@XXX[KkmM]" defines a memory region from
  35.143 -         * <start> to <start>+<mem>, overriding the bios size.
  35.144 -         */
  35.145 -        if (c == ' ' && !memcmp(from, "mem=", 4)) {
  35.146 -            if (to != command_line)
  35.147 -                to--;
  35.148 -            if (!memcmp(from+4, "nopentium", 9)) {
  35.149 -                from += 9+4;
  35.150 -            } else if (!memcmp(from+4, "exactmap", 8)) {
  35.151 -                from += 8+4;
  35.152 -            } else {
  35.153 -                bytes = memparse(from+4, &from);
  35.154 -                mem_param = bytes>>PAGE_SHIFT;
  35.155 -		if (*from == '@')
  35.156 -                    (void)memparse(from+1, &from);
  35.157 -            }
  35.158 -        }
  35.159 -
  35.160 -        c = *(from++);
  35.161 -        if (!c)
  35.162 -            break;
  35.163 -        if (COMMAND_LINE_SIZE <= ++len)
  35.164 -            break;
  35.165 -        *(to++) = c;
  35.166 -    }
  35.167 -    *to = '\0';
  35.168 -    *cmdline_p = command_line;
  35.169 -
  35.170 -    return mem_param;
  35.171 -}
  35.172 -
  35.173 -/*
  35.174 - * Every exception-fixup table is sorted (i.e., kernel main table, and every
  35.175 - * module table. Some elements may be out of order if they reference text.init,
  35.176 - * for example. 
  35.177 - */
  35.178 -static void sort_exception_table(struct exception_table_entry *start,
  35.179 -                                 struct exception_table_entry *end)
  35.180 -{
  35.181 -    struct exception_table_entry *p, *q, tmp;
  35.182 -
  35.183 -    for ( p = start; p < end; p++ )
  35.184 -    {
  35.185 -        for ( q = p-1; q > start; q-- )
  35.186 -            if ( p->insn > q->insn )
  35.187 -                break;
  35.188 -        if ( ++q != p )
  35.189 -        {
  35.190 -            tmp = *p;
  35.191 -            memmove(q+1, q, (p-q)*sizeof(*p));
  35.192 -            *q = tmp;
  35.193 -        }
  35.194 -    }
  35.195 -}
  35.196 -
  35.197 -int xen_module_init(struct module *mod)
  35.198 -{
  35.199 -    sort_exception_table(mod->ex_table_start, mod->ex_table_end);
  35.200 -    return 0;
  35.201 -}
  35.202 -
  35.203 -void __init setup_arch(char **cmdline_p)
  35.204 -{
  35.205 -    int i,j;
  35.206 -    unsigned long bootmap_size, start_pfn, lmax_low_pfn;
  35.207 -    int mem_param;  /* user specified memory size in pages */
  35.208 -    int boot_pfn;   /* low pages available for bootmem */
  35.209 -    physdev_op_t op;
  35.210 -
  35.211 -    extern void hypervisor_callback(void);
  35.212 -    extern void failsafe_callback(void);
  35.213 -
  35.214 -    extern unsigned long cpu0_pte_quicklist[];
  35.215 -    extern unsigned long cpu0_pgd_quicklist[];
  35.216 -
  35.217 -    extern const struct exception_table_entry __start___ex_table[];
  35.218 -    extern const struct exception_table_entry __stop___ex_table[];
  35.219 -
  35.220 -    extern char _stext;
  35.221 -
  35.222 -    /* Force a quick death if the kernel panics. */
  35.223 -    extern int panic_timeout;
  35.224 -    if ( panic_timeout == 0 )
  35.225 -        panic_timeout = 1;
  35.226 -
  35.227 -    /* Ensure that the kernel exception-fixup table is sorted. */
  35.228 -    sort_exception_table(__start___ex_table, __stop___ex_table);
  35.229 -
  35.230 -#ifndef CONFIG_HIGHIO
  35.231 -    blk_nohighio = 1;
  35.232 -#endif
  35.233 -
  35.234 -    HYPERVISOR_vm_assist(
  35.235 -        VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
  35.236 -    HYPERVISOR_vm_assist(
  35.237 -        VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
  35.238 -        
  35.239 -    HYPERVISOR_set_callbacks(
  35.240 -        __KERNEL_CS, (unsigned long)hypervisor_callback,
  35.241 -        __KERNEL_CS, (unsigned long)failsafe_callback);
  35.242 -
  35.243 -    boot_cpu_data.pgd_quick = cpu0_pgd_quicklist;
  35.244 -    boot_cpu_data.pte_quick = cpu0_pte_quicklist;
  35.245 -
  35.246 -    /* This must be initialized to UNNAMED_MAJOR for ipconfig to work
  35.247 -       properly.  Setting ROOT_DEV to default to /dev/ram0 breaks initrd. */
  35.248 -    ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
  35.249 -    memset(&drive_info, 0, sizeof(drive_info));
  35.250 -    memset(&screen_info, 0, sizeof(screen_info));
  35.251 -    
  35.252 -    /* This is drawn from a dump from vgacon:startup in standard Linux. */
  35.253 -    screen_info.orig_video_mode = 3; 
  35.254 -    screen_info.orig_video_isVGA = 1;
  35.255 -    screen_info.orig_video_lines = 25;
  35.256 -    screen_info.orig_video_cols = 80;
  35.257 -    screen_info.orig_video_ega_bx = 3;
  35.258 -    screen_info.orig_video_points = 16;
  35.259 -
  35.260 -    memset(&apm_info.bios, 0, sizeof(apm_info.bios));
  35.261 -    aux_device_present = 0; 
  35.262 -#ifdef CONFIG_BLK_DEV_RAM
  35.263 -    rd_image_start = 0;
  35.264 -    rd_prompt = 0;
  35.265 -    rd_doload = 0;
  35.266 -#endif
  35.267 -
  35.268 -    root_mountflags &= ~MS_RDONLY;
  35.269 -    init_mm.start_code = (unsigned long) &_text;
  35.270 -    init_mm.end_code = (unsigned long) &_etext;
  35.271 -    init_mm.end_data = (unsigned long) &_edata;
  35.272 -    init_mm.brk = (unsigned long) &_end;
  35.273 -
  35.274 -    /* The mem= kernel command line param overrides the detected amount
  35.275 -     * of memory.   For xenolinux, if this override is larger than detected
  35.276 -     * memory, then boot using only detected memory and make provisions to
  35.277 -     * use all of the override value.   The hypervisor can give this
  35.278 -     * domain more memory later on and it will be added to the free
  35.279 -     * lists at that time.   See claim_new_pages() in
  35.280 -     * arch/xen/drivers/balloon/balloon.c
  35.281 -     */
  35.282 -    mem_param = parse_mem_cmdline(cmdline_p);
  35.283 -    if (mem_param < xen_start_info.nr_pages)
  35.284 -        mem_param = xen_start_info.nr_pages;
  35.285 -
  35.286 -#define PFN_UP(x)	(((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
  35.287 -#define PFN_DOWN(x)	((x) >> PAGE_SHIFT)
  35.288 -#define PFN_PHYS(x)	((x) << PAGE_SHIFT)
  35.289 -
  35.290 -/*
  35.291 - * 128MB for vmalloc(), iomap(), kmap(), and fixaddr mappings.
  35.292 - */
  35.293 -#define VMALLOC_RESERVE	(unsigned long)(128 << 20)
  35.294 -#define MAXMEM		(unsigned long)(HYPERVISOR_VIRT_START-PAGE_OFFSET-VMALLOC_RESERVE)
  35.295 -#define MAXMEM_PFN	PFN_DOWN(MAXMEM)
  35.296 -#define MAX_NONPAE_PFN	(1 << 20)
  35.297 -
  35.298 -    /*
  35.299 -     * Determine low and high memory ranges:
  35.300 -     */
  35.301 -    lmax_low_pfn = max_pfn = mem_param;
  35.302 -    if (lmax_low_pfn > MAXMEM_PFN) {
  35.303 -        lmax_low_pfn = MAXMEM_PFN;
  35.304 -#ifndef CONFIG_HIGHMEM
  35.305 -        /* Maximum memory usable is what is directly addressable */
  35.306 -        printk(KERN_WARNING "Warning only %ldMB will be used.\n",
  35.307 -               MAXMEM>>20);
  35.308 -        if (max_pfn > MAX_NONPAE_PFN)
  35.309 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  35.310 -        else
  35.311 -            printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
  35.312 -        max_pfn = lmax_low_pfn;
  35.313 -#else /* !CONFIG_HIGHMEM */
  35.314 -#ifndef CONFIG_X86_PAE
  35.315 -        if (max_pfn > MAX_NONPAE_PFN) {
  35.316 -            max_pfn = MAX_NONPAE_PFN;
  35.317 -            printk(KERN_WARNING "Warning only 4GB will be used.\n");
  35.318 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  35.319 -        }
  35.320 -#endif /* !CONFIG_X86_PAE */
  35.321 -#endif /* !CONFIG_HIGHMEM */
  35.322 -    }
  35.323 -
  35.324 -#ifdef CONFIG_HIGHMEM
  35.325 -    highstart_pfn = highend_pfn = max_pfn;
  35.326 -    if (max_pfn > MAXMEM_PFN) {
  35.327 -        highstart_pfn = MAXMEM_PFN;
  35.328 -        printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
  35.329 -               pages_to_mb(highend_pfn - highstart_pfn));
  35.330 -    }
  35.331 -#endif
  35.332 -
  35.333 -    phys_to_machine_mapping = (unsigned int *)xen_start_info.mfn_list;
  35.334 -    cur_pgd = init_mm.pgd = (pgd_t *)xen_start_info.pt_base;
  35.335 -
  35.336 -    start_pfn = (__pa(xen_start_info.pt_base) >> PAGE_SHIFT) + 
  35.337 -        xen_start_info.nr_pt_frames;
  35.338 -
  35.339 -    /*
  35.340 -     * Initialize the boot-time allocator, and free up all RAM. Then reserve 
  35.341 -     * space for OS image, initrd, phys->machine table, bootstrap page table,
  35.342 -     * and the bootmem bitmap. 
  35.343 -     * NB. There is definitely enough room for the bootmem bitmap in the
  35.344 -     * bootstrap page table. We are guaranteed to get >=512kB unused 'padding'
  35.345 -     * for our own use after all bootstrap elements 
  35.346 -     * (see asm-xen/xen-public/xen.h).
  35.347 -     */
  35.348 -    boot_pfn = min((int)xen_start_info.nr_pages,lmax_low_pfn);
  35.349 -    bootmap_size = init_bootmem(start_pfn,boot_pfn);
  35.350 -    free_bootmem(0, PFN_PHYS(boot_pfn));
  35.351 -    reserve_bootmem(__pa(&_stext), 
  35.352 -                    PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1 - 
  35.353 -                    __pa(&_stext));
  35.354 -
  35.355 -    /* init_bootmem() set the global max_low_pfn to boot_pfn.  Now max_low_pfn 
  35.356 -     * can be set to the override value.
  35.357 -     */
  35.358 -    max_low_pfn = lmax_low_pfn;
  35.359 -
  35.360 -#ifdef CONFIG_BLK_DEV_INITRD
  35.361 -    if ( xen_start_info.mod_start != 0 )
  35.362 -    {
  35.363 -        if ( (__pa(xen_start_info.mod_start) + xen_start_info.mod_len) <= 
  35.364 -             (max_low_pfn << PAGE_SHIFT) )
  35.365 -        {
  35.366 -            initrd_start = xen_start_info.mod_start;
  35.367 -            initrd_end   = initrd_start + xen_start_info.mod_len;
  35.368 -            initrd_below_start_ok = 1;
  35.369 -        }
  35.370 -        else
  35.371 -        {
  35.372 -            printk(KERN_ERR "initrd extends beyond end of memory "
  35.373 -                   "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
  35.374 -                   __pa(xen_start_info.mod_start) + xen_start_info.mod_len,
  35.375 -                   max_low_pfn << PAGE_SHIFT);
  35.376 -            initrd_start = 0;
  35.377 -        }
  35.378 -    }
  35.379 -#endif
  35.380 -
  35.381 -    paging_init();
  35.382 -
  35.383 -    /* Make sure we have a correctly sized P->M table. */
  35.384 -    if ( max_pfn != xen_start_info.nr_pages )
  35.385 -    {
  35.386 -        phys_to_machine_mapping = alloc_bootmem_low_pages(
  35.387 -            max_pfn * sizeof(unsigned long));
  35.388 -        if ( max_pfn > xen_start_info.nr_pages )
  35.389 -        {
  35.390 -            memset(phys_to_machine_mapping, ~0,
  35.391 -                   max_pfn * sizeof(unsigned long));
  35.392 -            memcpy(phys_to_machine_mapping,
  35.393 -                   (unsigned long *)xen_start_info.mfn_list,
  35.394 -                   xen_start_info.nr_pages * sizeof(unsigned long));
  35.395 -        }
  35.396 -        else
  35.397 -        {
  35.398 -            memcpy(phys_to_machine_mapping,
  35.399 -                   (unsigned long *)xen_start_info.mfn_list,
  35.400 -                   max_pfn * sizeof(unsigned long));
  35.401 -            if (HYPERVISOR_dom_mem_op(
  35.402 -                MEMOP_decrease_reservation,
  35.403 -                (unsigned long *)xen_start_info.mfn_list + max_pfn,
  35.404 -                xen_start_info.nr_pages - max_pfn, 0) !=
  35.405 -                (xen_start_info.nr_pages - max_pfn))
  35.406 -                BUG();
  35.407 -        }
  35.408 -        free_bootmem(__pa(xen_start_info.mfn_list), 
  35.409 -                     PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
  35.410 -                                     sizeof(unsigned long))));
  35.411 -    }
  35.412 -
  35.413 -    pfn_to_mfn_frame_list = alloc_bootmem_low_pages(PAGE_SIZE);
  35.414 -    for ( i=0, j=0; i < max_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ )
  35.415 -    {	
  35.416 -        pfn_to_mfn_frame_list[j] = 
  35.417 -            virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
  35.418 -    }
  35.419 -    HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
  35.420 -	virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
  35.421 -
  35.422 -    op.cmd             = PHYSDEVOP_SET_IOPL;
  35.423 -    op.u.set_iopl.iopl = current->thread.io_pl = 1;
  35.424 -    HYPERVISOR_physdev_op(&op);
  35.425 -
  35.426 -    if (xen_start_info.flags & SIF_INITDOMAIN )
  35.427 -    {
  35.428 -        if( !(xen_start_info.flags & SIF_PRIVILEGED) )
  35.429 -            panic("Xen granted us console access but not privileged status");
  35.430 -
  35.431 -#if defined(CONFIG_VT)
  35.432 -#if defined(CONFIG_VGA_CONSOLE)
  35.433 -        conswitchp = &vga_con;
  35.434 -#elif defined(CONFIG_DUMMY_CONSOLE)
  35.435 -        conswitchp = &dummy_con;
  35.436 -#endif
  35.437 -#endif
  35.438 -    }
  35.439 -}
  35.440 -
  35.441 -static int cachesize_override __initdata = -1;
  35.442 -static int __init cachesize_setup(char *str)
  35.443 -{
  35.444 -    get_option (&str, &cachesize_override);
  35.445 -    return 1;
  35.446 -}
  35.447 -__setup("cachesize=", cachesize_setup);
  35.448 -
  35.449 -static int __init highio_setup(char *str)
  35.450 -{
  35.451 -    printk("i386: disabling HIGHMEM block I/O\n");
  35.452 -    blk_nohighio = 1;
  35.453 -    return 1;
  35.454 -}
  35.455 -__setup("nohighio", highio_setup);
  35.456 -
  35.457 -static int __init get_model_name(struct cpuinfo_x86 *c)
  35.458 -{
  35.459 -    unsigned int *v;
  35.460 -    char *p, *q;
  35.461 -
  35.462 -    if (cpuid_eax(0x80000000) < 0x80000004)
  35.463 -        return 0;
  35.464 -
  35.465 -    v = (unsigned int *) c->x86_model_id;
  35.466 -    cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
  35.467 -    cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
  35.468 -    cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
  35.469 -    c->x86_model_id[48] = 0;
  35.470 -
  35.471 -    /* Intel chips right-justify this string for some dumb reason;
  35.472 -       undo that brain damage */
  35.473 -    p = q = &c->x86_model_id[0];
  35.474 -    while ( *p == ' ' )
  35.475 -        p++;
  35.476 -    if ( p != q ) {
  35.477 -        while ( *p )
  35.478 -            *q++ = *p++;
  35.479 -        while ( q <= &c->x86_model_id[48] )
  35.480 -            *q++ = '\0';	/* Zero-pad the rest */
  35.481 -    }
  35.482 -
  35.483 -    return 1;
  35.484 -}
  35.485 -
  35.486 -
  35.487 -static void __init display_cacheinfo(struct cpuinfo_x86 *c)
  35.488 -{
  35.489 -    unsigned int n, dummy, ecx, edx, l2size;
  35.490 -
  35.491 -    n = cpuid_eax(0x80000000);
  35.492 -
  35.493 -    if (n >= 0x80000005) {
  35.494 -        cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
  35.495 -        printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n",
  35.496 -               edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
  35.497 -        c->x86_cache_size=(ecx>>24)+(edx>>24);	
  35.498 -    }
  35.499 -
  35.500 -    if (n < 0x80000006)	/* Some chips just has a large L1. */
  35.501 -        return;
  35.502 -
  35.503 -    ecx = cpuid_ecx(0x80000006);
  35.504 -    l2size = ecx >> 16;
  35.505 -
  35.506 -    /* AMD errata T13 (order #21922) */
  35.507 -    if ((c->x86_vendor == X86_VENDOR_AMD) && (c->x86 == 6)) {
  35.508 -        if (c->x86_model == 3 && c->x86_mask == 0)	/* Duron Rev A0 */
  35.509 -            l2size = 64;
  35.510 -        if (c->x86_model == 4 &&
  35.511 -            (c->x86_mask==0 || c->x86_mask==1))	/* Tbird rev A1/A2 */
  35.512 -            l2size = 256;
  35.513 -    }
  35.514 -
  35.515 -    /* Intel PIII Tualatin. This comes in two flavours.
  35.516 -     * One has 256kb of cache, the other 512. We have no way
  35.517 -     * to determine which, so we use a boottime override
  35.518 -     * for the 512kb model, and assume 256 otherwise.
  35.519 -     */
  35.520 -    if ((c->x86_vendor == X86_VENDOR_INTEL) && (c->x86 == 6) &&
  35.521 -        (c->x86_model == 11) && (l2size == 0))
  35.522 -        l2size = 256;
  35.523 -
  35.524 -    if (c->x86_vendor == X86_VENDOR_CENTAUR) {
  35.525 -	/* VIA C3 CPUs (670-68F) need further shifting. */
  35.526 -	if ((c->x86 == 6) &&
  35.527 -	    ((c->x86_model == 7) || (c->x86_model == 8))) {
  35.528 -		l2size >>= 8;
  35.529 -	}
  35.530 -
  35.531 -	/* VIA also screwed up Nehemiah stepping 1, and made
  35.532 -	   it return '65KB' instead of '64KB'
  35.533 -	   - Note, it seems this may only be in engineering samples. */
  35.534 -	if ((c->x86==6) && (c->x86_model==9) &&
  35.535 -	    (c->x86_mask==1) && (l2size==65))
  35.536 -		l2size -= 1;
  35.537 -    }
  35.538 -
  35.539 -    /* Allow user to override all this if necessary. */
  35.540 -    if (cachesize_override != -1)
  35.541 -        l2size = cachesize_override;
  35.542 -
  35.543 -    if ( l2size == 0 )
  35.544 -        return;		/* Again, no L2 cache is possible */
  35.545 -
  35.546 -    c->x86_cache_size = l2size;
  35.547 -
  35.548 -    printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n",
  35.549 -           l2size, ecx & 0xFF);
  35.550 -}
  35.551 -
  35.552 -static void __init init_c3(struct cpuinfo_x86 *c)
  35.553 -{
  35.554 -    /* Test for Centaur Extended Feature Flags presence */
  35.555 -    if (cpuid_eax(0xC0000000) >= 0xC0000001) {
  35.556 -        /* store Centaur Extended Feature Flags as
  35.557 -         * word 5 of the CPU capability bit array
  35.558 -         */
  35.559 -        c->x86_capability[5] = cpuid_edx(0xC0000001);
  35.560 -    }
  35.561 -   
  35.562 -    switch (c->x86_model) {
  35.563 -    case 9:	/* Nehemiah */
  35.564 -    default:
  35.565 -        get_model_name(c);
  35.566 -        display_cacheinfo(c);
  35.567 -        break;
  35.568 -    }
  35.569 -}
  35.570 -
  35.571 -static void __init init_centaur(struct cpuinfo_x86 *c)
  35.572 -{
  35.573 -    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  35.574 -       3DNow is IDd by bit 31 in extended CPUID (1*3231) anyway */
  35.575 -    clear_bit(0*32+31, &c->x86_capability);
  35.576 -  
  35.577 -    switch (c->x86) {
  35.578 -    case 6:
  35.579 -        init_c3(c);
  35.580 -        break;
  35.581 -    default:
  35.582 -        panic("Unsupported Centaur CPU (%i)\n", c->x86);
  35.583 -    }
  35.584 -}
  35.585 -
  35.586 -static int __init init_amd(struct cpuinfo_x86 *c)
  35.587 -{
  35.588 -    int r;
  35.589 -
  35.590 -    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  35.591 -       3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
  35.592 -    clear_bit(0*32+31, &c->x86_capability);
  35.593 -	
  35.594 -    r = get_model_name(c);
  35.595 -
  35.596 -    switch(c->x86)
  35.597 -    {
  35.598 -    case 5: /* We don't like AMD K6 */
  35.599 -        panic("Unsupported AMD processor\n");
  35.600 -    case 6:	/* An Athlon/Duron. We can trust the BIOS probably */
  35.601 -        break;
  35.602 -    }
  35.603 -
  35.604 -    display_cacheinfo(c);
  35.605 -    return r;
  35.606 -}
  35.607 -
  35.608 -
  35.609 -static void __init init_intel(struct cpuinfo_x86 *c)
  35.610 -{
  35.611 -    char *p = NULL;
  35.612 -    unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */
  35.613 -
  35.614 -    if (c->cpuid_level > 1) {
  35.615 -        /* supports eax=2  call */
  35.616 -        int i, j, n;
  35.617 -        int regs[4];
  35.618 -        unsigned char *dp = (unsigned char *)regs;
  35.619 -
  35.620 -        /* Number of times to iterate */
  35.621 -        n = cpuid_eax(2) & 0xFF;
  35.622 -
  35.623 -        for ( i = 0 ; i < n ; i++ ) {
  35.624 -            cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
  35.625 -			
  35.626 -            /* If bit 31 is set, this is an unknown format */
  35.627 -            for ( j = 0 ; j < 3 ; j++ ) {
  35.628 -                if ( regs[j] < 0 ) regs[j] = 0;
  35.629 -            }
  35.630 -
  35.631 -            /* Byte 0 is level count, not a descriptor */
  35.632 -            for ( j = 1 ; j < 16 ; j++ ) {
  35.633 -                unsigned char des = dp[j];
  35.634 -                unsigned char dl, dh;
  35.635 -                unsigned int cs;
  35.636 -
  35.637 -                dh = des >> 4;
  35.638 -                dl = des & 0x0F;
  35.639 -
  35.640 -				/* Black magic... */
  35.641 -
  35.642 -                switch ( dh )
  35.643 -                {
  35.644 -                case 0:
  35.645 -                    switch ( dl ) {
  35.646 -                    case 6:
  35.647 -                        /* L1 I cache */
  35.648 -                        l1i += 8;
  35.649 -                        break;
  35.650 -                    case 8:
  35.651 -                        /* L1 I cache */
  35.652 -                        l1i += 16;
  35.653 -                        break;
  35.654 -                    case 10:
  35.655 -                        /* L1 D cache */
  35.656 -                        l1d += 8;
  35.657 -                        break;
  35.658 -                    case 12:
  35.659 -                        /* L1 D cache */
  35.660 -                        l1d += 16;
  35.661 -                        break;
  35.662 -                    default:;
  35.663 -                        /* TLB, or unknown */
  35.664 -                    }
  35.665 -                    break;
  35.666 -                case 2:
  35.667 -                    if ( dl ) {
  35.668 -                        /* L3 cache */
  35.669 -                        cs = (dl-1) << 9;
  35.670 -                        l3 += cs;
  35.671 -                    }
  35.672 -                    break;
  35.673 -                case 4:
  35.674 -                    if ( c->x86 > 6 && dl ) {
  35.675 -                        /* P4 family */
  35.676 -                        /* L3 cache */
  35.677 -                        cs = 128 << (dl-1);
  35.678 -                        l3 += cs;
  35.679 -                        break;
  35.680 -                    }
  35.681 -                    /* else same as 8 - fall through */
  35.682 -                case 8:
  35.683 -                    if ( dl ) {
  35.684 -                        /* L2 cache */
  35.685 -                        cs = 128 << (dl-1);
  35.686 -                        l2 += cs;
  35.687 -                    }
  35.688 -                    break;
  35.689 -                case 6:
  35.690 -                    if (dl > 5) {
  35.691 -                        /* L1 D cache */
  35.692 -                        cs = 8<<(dl-6);
  35.693 -                        l1d += cs;
  35.694 -                    }
  35.695 -                    break;
  35.696 -                case 7:
  35.697 -                    if ( dl >= 8 ) 
  35.698 -                    {
  35.699 -                        /* L2 cache */
  35.700 -                        cs = 64<<(dl-8);
  35.701 -                        l2 += cs;
  35.702 -                    } else {
  35.703 -                        /* L0 I cache, count as L1 */
  35.704 -                        cs = dl ? (16 << (dl-1)) : 12;
  35.705 -                        l1i += cs;
  35.706 -                    }
  35.707 -                    break;
  35.708 -                default:
  35.709 -                    /* TLB, or something else we don't know about */
  35.710 -                    break;
  35.711 -                }
  35.712 -            }
  35.713 -        }
  35.714 -        if ( l1i || l1d )
  35.715 -            printk(KERN_INFO "CPU: L1 I cache: %dK, L1 D cache: %dK\n",
  35.716 -                   l1i, l1d);
  35.717 -        if ( l2 )
  35.718 -            printk(KERN_INFO "CPU: L2 cache: %dK\n", l2);
  35.719 -        if ( l3 )
  35.720 -            printk(KERN_INFO "CPU: L3 cache: %dK\n", l3);
  35.721 -
  35.722 -        /*
  35.723 -         * This assumes the L3 cache is shared; it typically lives in
  35.724 -         * the northbridge.  The L1 caches are included by the L2
  35.725 -         * cache, and so should not be included for the purpose of
  35.726 -         * SMP switching weights.
  35.727 -         */
  35.728 -        c->x86_cache_size = l2 ? l2 : (l1i+l1d);
  35.729 -    }
  35.730 -
  35.731 -    /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it */
  35.732 -    if ( c->x86 == 6 && c->x86_model < 3 && c->x86_mask < 3 )
  35.733 -        clear_bit(X86_FEATURE_SEP, &c->x86_capability);
  35.734 -	
  35.735 -    /* Names for the Pentium II/Celeron processors 
  35.736 -       detectable only by also checking the cache size.
  35.737 -       Dixon is NOT a Celeron. */
  35.738 -    if (c->x86 == 6) {
  35.739 -        switch (c->x86_model) {
  35.740 -        case 5:
  35.741 -            if (l2 == 0)
  35.742 -                p = "Celeron (Covington)";
  35.743 -            if (l2 == 256)
  35.744 -                p = "Mobile Pentium II (Dixon)";
  35.745 -            break;
  35.746 -			
  35.747 -        case 6:
  35.748 -            if (l2 == 128)
  35.749 -                p = "Celeron (Mendocino)";
  35.750 -            break;
  35.751 -			
  35.752 -        case 8:
  35.753 -            if (l2 == 128)
  35.754 -                p = "Celeron (Coppermine)";
  35.755 -            break;
  35.756 -        }
  35.757 -    }
  35.758 -
  35.759 -    if ( p )
  35.760 -        strcpy(c->x86_model_id, p);
  35.761 -}
  35.762 -
  35.763 -void __init get_cpu_vendor(struct cpuinfo_x86 *c)
  35.764 -{
  35.765 -    char *v = c->x86_vendor_id;
  35.766 -
  35.767 -    if (!strcmp(v, "GenuineIntel"))
  35.768 -        c->x86_vendor = X86_VENDOR_INTEL;
  35.769 -    else if (!strcmp(v, "AuthenticAMD"))
  35.770 -        c->x86_vendor = X86_VENDOR_AMD;
  35.771 -    else if (!strcmp(v, "CentaurHauls"))
  35.772 -        c->x86_vendor = X86_VENDOR_CENTAUR;
  35.773 -    else
  35.774 -        c->x86_vendor = X86_VENDOR_UNKNOWN;
  35.775 -}
  35.776 -
  35.777 -struct cpu_model_info {
  35.778 -    int vendor;
  35.779 -    int family;
  35.780 -    char *model_names[16];
  35.781 -};
  35.782 -
  35.783 -/* Naming convention should be: <Name> [(<Codename>)] */
  35.784 -/* This table only is used unless init_<vendor>() below doesn't set it; */
  35.785 -/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
  35.786 -static struct cpu_model_info cpu_models[] __initdata = {
  35.787 -    { X86_VENDOR_INTEL,	6,
  35.788 -      { "Pentium Pro A-step", "Pentium Pro", NULL, "Pentium II (Klamath)", 
  35.789 -        NULL, "Pentium II (Deschutes)", "Mobile Pentium II",
  35.790 -        "Pentium III (Katmai)", "Pentium III (Coppermine)", NULL,
  35.791 -        "Pentium III (Cascades)", NULL, NULL, NULL, NULL }},
  35.792 -    { X86_VENDOR_AMD,	6, /* Is this this really necessary?? */
  35.793 -      { "Athlon", "Athlon",
  35.794 -        "Athlon", NULL, "Athlon", NULL,
  35.795 -        NULL, NULL, NULL,
  35.796 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL }}
  35.797 -};
  35.798 -
  35.799 -/* Look up CPU names by table lookup. */
  35.800 -static char __init *table_lookup_model(struct cpuinfo_x86 *c)
  35.801 -{
  35.802 -    struct cpu_model_info *info = cpu_models;
  35.803 -    int i;
  35.804 -
  35.805 -    if ( c->x86_model >= 16 )
  35.806 -        return NULL;	/* Range check */
  35.807 -
  35.808 -    for ( i = 0 ; i < sizeof(cpu_models)/sizeof(struct cpu_model_info) ; i++ ) {
  35.809 -        if ( info->vendor == c->x86_vendor &&
  35.810 -             info->family == c->x86 ) {
  35.811 -            return info->model_names[c->x86_model];
  35.812 -        }
  35.813 -        info++;
  35.814 -    }
  35.815 -    return NULL;		/* Not found */
  35.816 -}
  35.817 -
  35.818 -
  35.819 -
  35.820 -/* Standard macro to see if a specific flag is changeable */
  35.821 -static inline int flag_is_changeable_p(u32 flag)
  35.822 -{
  35.823 -    u32 f1, f2;
  35.824 -
  35.825 -    asm("pushfl\n\t"
  35.826 -        "pushfl\n\t"
  35.827 -        "popl %0\n\t"
  35.828 -        "movl %0,%1\n\t"
  35.829 -        "xorl %2,%0\n\t"
  35.830 -        "pushl %0\n\t"
  35.831 -        "popfl\n\t"
  35.832 -        "pushfl\n\t"
  35.833 -        "popl %0\n\t"
  35.834 -        "popfl\n\t"
  35.835 -        : "=&r" (f1), "=&r" (f2)
  35.836 -        : "ir" (flag));
  35.837 -
  35.838 -    return ((f1^f2) & flag) != 0;
  35.839 -}
  35.840 -
  35.841 -
  35.842 -/* Probe for the CPUID instruction */
  35.843 -static int __init have_cpuid_p(void)
  35.844 -{
  35.845 -    return flag_is_changeable_p(X86_EFLAGS_ID);
  35.846 -}
  35.847 -
  35.848 -
  35.849 -
  35.850 -#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
  35.851 -unsigned char eddnr;
  35.852 -struct edd_info edd[EDDMAXNR];
  35.853 -unsigned int edd_disk80_sig;
  35.854 -/**
  35.855 - * copy_edd() - Copy the BIOS EDD information
  35.856 - *              from empty_zero_page into a safe place.
  35.857 - *
  35.858 - */
  35.859 -static inline void copy_edd(void)
  35.860 -{
  35.861 -     eddnr = EDD_NR;
  35.862 -     memcpy(edd, EDD_BUF, sizeof(edd));
  35.863 -     edd_disk80_sig = DISK80_SIGNATURE_BUFFER;
  35.864 -}
  35.865 -#else
  35.866 -static inline void copy_edd(void) {}
  35.867 -#endif
  35.868 -
  35.869 -/*
  35.870 - * This does the hard work of actually picking apart the CPU stuff...
  35.871 - */
  35.872 -void __init identify_cpu(struct cpuinfo_x86 *c)
  35.873 -{
  35.874 -    int junk, i;
  35.875 -    u32 xlvl, tfms;
  35.876 -
  35.877 -    c->loops_per_jiffy = loops_per_jiffy;
  35.878 -    c->x86_cache_size = -1;
  35.879 -    c->x86_vendor = X86_VENDOR_UNKNOWN;
  35.880 -    c->cpuid_level = -1;	/* CPUID not detected */
  35.881 -    c->x86_model = c->x86_mask = 0;	/* So far unknown... */
  35.882 -    c->x86_vendor_id[0] = '\0'; /* Unset */
  35.883 -    c->x86_model_id[0] = '\0';  /* Unset */
  35.884 -    memset(&c->x86_capability, 0, sizeof c->x86_capability);
  35.885 -    c->hard_math = 1;
  35.886 -
  35.887 -    if ( !have_cpuid_p() ) {
  35.888 -        panic("Processor must support CPUID\n");
  35.889 -    } else {
  35.890 -        /* CPU does have CPUID */
  35.891 -
  35.892 -        /* Get vendor name */
  35.893 -        cpuid(0x00000000, &c->cpuid_level,
  35.894 -              (int *)&c->x86_vendor_id[0],
  35.895 -              (int *)&c->x86_vendor_id[8],
  35.896 -              (int *)&c->x86_vendor_id[4]);
  35.897 -		
  35.898 -        get_cpu_vendor(c);
  35.899 -        /* Initialize the standard set of capabilities */
  35.900 -        /* Note that the vendor-specific code below might override */
  35.901 -
  35.902 -        /* Intel-defined flags: level 0x00000001 */
  35.903 -        if ( c->cpuid_level >= 0x00000001 ) {
  35.904 -                        u32 capability, excap;
  35.905 -                        cpuid(0x00000001, &tfms, &junk, &excap, &capability);
  35.906 -                        c->x86_capability[0] = capability;
  35.907 -                        c->x86_capability[4] = excap;
  35.908 -                        c->x86 = (tfms >> 8) & 15;
  35.909 -                        c->x86_model = (tfms >> 4) & 15;
  35.910 -                        if (c->x86 == 0xf) {
  35.911 -                                c->x86 += (tfms >> 20) & 0xff;
  35.912 -                                c->x86_model += ((tfms >> 16) & 0xF) << 4;
  35.913 -                        }
  35.914 -                        c->x86_mask = tfms & 15;
  35.915 -        } else {
  35.916 -            /* Have CPUID level 0 only - unheard of */
  35.917 -            c->x86 = 4;
  35.918 -        }
  35.919 -
  35.920 -        /* AMD-defined flags: level 0x80000001 */
  35.921 -        xlvl = cpuid_eax(0x80000000);
  35.922 -        if ( (xlvl & 0xffff0000) == 0x80000000 ) {
  35.923 -            if ( xlvl >= 0x80000001 )
  35.924 -                c->x86_capability[1] = cpuid_edx(0x80000001);
  35.925 -            if ( xlvl >= 0x80000004 )
  35.926 -                get_model_name(c); /* Default name */
  35.927 -        }
  35.928 -
  35.929 -        /* Transmeta-defined flags: level 0x80860001 */
  35.930 -        xlvl = cpuid_eax(0x80860000);
  35.931 -        if ( (xlvl & 0xffff0000) == 0x80860000 ) {
  35.932 -            if (  xlvl >= 0x80860001 )
  35.933 -                c->x86_capability[2] = cpuid_edx(0x80860001);
  35.934 -        }
  35.935 -    }
  35.936 -
  35.937 -    printk(KERN_DEBUG "CPU: Before vendor init, caps: %08x %08x %08x, vendor = %d\n",
  35.938 -           c->x86_capability[0],
  35.939 -           c->x86_capability[1],
  35.940 -           c->x86_capability[2],
  35.941 -           c->x86_vendor);
  35.942 -
  35.943 -    /*
  35.944 -     * Vendor-specific initialization.  In this section we
  35.945 -     * canonicalize the feature flags, meaning if there are
  35.946 -     * features a certain CPU supports which CPUID doesn't
  35.947 -     * tell us, CPUID claiming incorrect flags, or other bugs,
  35.948 -     * we handle them here.
  35.949 -     *
  35.950 -     * At the end of this section, c->x86_capability better
  35.951 -     * indicate the features this CPU genuinely supports!
  35.952 -     */
  35.953 -    switch ( c->x86_vendor ) {
  35.954 -    case X86_VENDOR_AMD:
  35.955 -        init_amd(c);
  35.956 -        break;
  35.957 -
  35.958 -    case X86_VENDOR_INTEL:
  35.959 -        init_intel(c);
  35.960 -        break;
  35.961 -
  35.962 -    case X86_VENDOR_CENTAUR:
  35.963 -        init_centaur(c);
  35.964 -        break;
  35.965 -        
  35.966 -    default:
  35.967 -        printk("Unsupported CPU vendor (%d) -- please report!\n",
  35.968 -               c->x86_vendor);
  35.969 -    }
  35.970 -	
  35.971 -    printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n",
  35.972 -           c->x86_capability[0],
  35.973 -           c->x86_capability[1],
  35.974 -           c->x86_capability[2],
  35.975 -           c->x86_capability[3]);
  35.976 -
  35.977 -
  35.978 -    /* If the model name is still unset, do table lookup. */
  35.979 -    if ( !c->x86_model_id[0] ) {
  35.980 -        char *p;
  35.981 -        p = table_lookup_model(c);
  35.982 -        if ( p )
  35.983 -            strcpy(c->x86_model_id, p);
  35.984 -        else
  35.985 -            /* Last resort... */
  35.986 -            sprintf(c->x86_model_id, "%02x/%02x",
  35.987 -                    c->x86_vendor, c->x86_model);
  35.988 -    }
  35.989 -
  35.990 -    /* Now the feature flags better reflect actual CPU features! */
  35.991 -
  35.992 -    printk(KERN_DEBUG "CPU:     After generic, caps: %08x %08x %08x %08x\n",
  35.993 -           c->x86_capability[0],
  35.994 -           c->x86_capability[1],
  35.995 -           c->x86_capability[2],
  35.996 -           c->x86_capability[3]);
  35.997 -
  35.998 -    /*
  35.999 -     * On SMP, boot_cpu_data holds the common feature set between
 35.1000 -     * all CPUs; so make sure that we indicate which features are
 35.1001 -     * common between the CPUs.  The first time this routine gets
 35.1002 -     * executed, c == &boot_cpu_data.
 35.1003 -     */
 35.1004 -    if ( c != &boot_cpu_data ) {
 35.1005 -        /* AND the already accumulated flags with these */
 35.1006 -        for ( i = 0 ; i < NCAPINTS ; i++ )
 35.1007 -            boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
 35.1008 -    }
 35.1009 -
 35.1010 -    printk(KERN_DEBUG "CPU:             Common caps: %08x %08x %08x %08x\n",
 35.1011 -           boot_cpu_data.x86_capability[0],
 35.1012 -           boot_cpu_data.x86_capability[1],
 35.1013 -           boot_cpu_data.x86_capability[2],
 35.1014 -           boot_cpu_data.x86_capability[3]);
 35.1015 -}
 35.1016 -
 35.1017 -
 35.1018 -/* These need to match <asm/processor.h> */
 35.1019 -static char *cpu_vendor_names[] __initdata = {
 35.1020 -    "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" };
 35.1021 -
 35.1022 -
 35.1023 -void __init print_cpu_info(struct cpuinfo_x86 *c)
 35.1024 -{
 35.1025 -    char *vendor = NULL;
 35.1026 -
 35.1027 -    if (c->x86_vendor < sizeof(cpu_vendor_names)/sizeof(char *))
 35.1028 -        vendor = cpu_vendor_names[c->x86_vendor];
 35.1029 -    else if (c->cpuid_level >= 0)
 35.1030 -        vendor = c->x86_vendor_id;
 35.1031 -
 35.1032 -    if (vendor && strncmp(c->x86_model_id, vendor, strlen(vendor)))
 35.1033 -        printk("%s ", vendor);
 35.1034 -
 35.1035 -    if (!c->x86_model_id[0])
 35.1036 -        printk("%d86", c->x86);
 35.1037 -    else
 35.1038 -        printk("%s", c->x86_model_id);
 35.1039 -
 35.1040 -    if (c->x86_mask || c->cpuid_level >= 0) 
 35.1041 -        printk(" stepping %02x\n", c->x86_mask);
 35.1042 -    else
 35.1043 -        printk("\n");
 35.1044 -}
 35.1045 -
 35.1046 -/*
 35.1047 - *	Get CPU information for use by the procfs.
 35.1048 - */
 35.1049 -static int show_cpuinfo(struct seq_file *m, void *v)
 35.1050 -{
 35.1051 -    /* 
 35.1052 -     * These flag bits must match the definitions in <asm/cpufeature.h>.
 35.1053 -     * NULL means this bit is undefined or reserved; either way it doesn't
 35.1054 -     * have meaning as far as Linux is concerned.  Note that it's important
 35.1055 -     * to realize there is a difference between this table and CPUID -- if
 35.1056 -     * applications want to get the raw CPUID data, they should access
 35.1057 -     * /dev/cpu/<cpu_nr>/cpuid instead.
 35.1058 -	 */
 35.1059 -    static char *x86_cap_flags[] = {
 35.1060 -        /* Intel-defined */
 35.1061 -        "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
 35.1062 -        "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
 35.1063 -        "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx",
 35.1064 -        "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe",
 35.1065 -
 35.1066 -        /* AMD-defined */
 35.1067 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1068 -        NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
 35.1069 -        NULL, NULL, NULL, "mp", NULL, NULL, "mmxext", NULL,
 35.1070 -        NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
 35.1071 -
 35.1072 -        /* Transmeta-defined */
 35.1073 -        "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
 35.1074 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1075 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1076 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1077 -
 35.1078 -        /* Other (Linux-defined) */
 35.1079 -        "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", 
 35.1080 -	NULL, NULL, NULL, NULL,
 35.1081 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1082 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1083 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1084 -
 35.1085 -        /* Intel-defined (#2) */
 35.1086 -        "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2",
 35.1087 -        "est", NULL, "cid", NULL, NULL, NULL, NULL, NULL,
 35.1088 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1089 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1090 -
 35.1091 -        /* VIA/Cyrix/Centaur-defined */
 35.1092 -        NULL, NULL, "xstore", NULL, NULL, NULL, NULL, NULL,
 35.1093 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1094 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1095 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 35.1096 -
 35.1097 -    };
 35.1098 -    struct cpuinfo_x86 *c = v;
 35.1099 -    int i, n = c - cpu_data;
 35.1100 -    int fpu_exception;
 35.1101 -
 35.1102 -#ifdef CONFIG_SMP
 35.1103 -    if (!(cpu_online_map & (1<<n)))
 35.1104 -        return 0;
 35.1105 -#endif
 35.1106 -    seq_printf(m, "processor\t: %d\n"
 35.1107 -               "vendor_id\t: %s\n"
 35.1108 -               "cpu family\t: %d\n"
 35.1109 -               "model\t\t: %d\n"
 35.1110 -               "model name\t: %s\n",
 35.1111 -               n,
 35.1112 -               c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
 35.1113 -               c->x86,
 35.1114 -               c->x86_model,
 35.1115 -               c->x86_model_id[0] ? c->x86_model_id : "unknown");
 35.1116 -
 35.1117 -    if (c->x86_mask || c->cpuid_level >= 0)
 35.1118 -        seq_printf(m, "stepping\t: %d\n", c->x86_mask);
 35.1119 -    else
 35.1120 -        seq_printf(m, "stepping\t: unknown\n");
 35.1121 -
 35.1122 -    if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) {
 35.1123 -        seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
 35.1124 -                   cpu_khz / 1000, (cpu_khz % 1000));
 35.1125 -    }
 35.1126 -
 35.1127 -    /* Cache size */
 35.1128 -    if (c->x86_cache_size >= 0)
 35.1129 -        seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
 35.1130 -	
 35.1131 -	/* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
 35.1132 -    fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu);
 35.1133 -    seq_printf(m, "fdiv_bug\t: %s\n"
 35.1134 -               "hlt_bug\t\t: %s\n"
 35.1135 -               "f00f_bug\t: %s\n"
 35.1136 -               "coma_bug\t: %s\n"
 35.1137 -               "fpu\t\t: %s\n"
 35.1138 -               "fpu_exception\t: %s\n"
 35.1139 -               "cpuid level\t: %d\n"
 35.1140 -               "wp\t\t: %s\n"
 35.1141 -               "flags\t\t:",
 35.1142 -               c->fdiv_bug ? "yes" : "no",
 35.1143 -               c->hlt_works_ok ? "no" : "yes",
 35.1144 -               c->f00f_bug ? "yes" : "no",
 35.1145 -               c->coma_bug ? "yes" : "no",
 35.1146 -               c->hard_math ? "yes" : "no",
 35.1147 -               fpu_exception ? "yes" : "no",
 35.1148 -               c->cpuid_level,
 35.1149 -               c->wp_works_ok ? "yes" : "no");
 35.1150 -
 35.1151 -    for ( i = 0 ; i < 32*NCAPINTS ; i++ )
 35.1152 -        if ( test_bit(i, &c->x86_capability) &&
 35.1153 -             x86_cap_flags[i] != NULL )
 35.1154 -            seq_printf(m, " %s", x86_cap_flags[i]);
 35.1155 -
 35.1156 -    seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
 35.1157 -               c->loops_per_jiffy/(500000/HZ),
 35.1158 -               (c->loops_per_jiffy/(5000/HZ)) % 100);
 35.1159 -    return 0;
 35.1160 -}
 35.1161 -
 35.1162 -static void *c_start(struct seq_file *m, loff_t *pos)
 35.1163 -{
 35.1164 -    return *pos < NR_CPUS ? cpu_data + *pos : NULL;
 35.1165 -}
 35.1166 -static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 35.1167 -{
 35.1168 -    ++*pos;
 35.1169 -    return c_start(m, pos);
 35.1170 -}
 35.1171 -static void c_stop(struct seq_file *m, void *v)
 35.1172 -{
 35.1173 -}
 35.1174 -struct seq_operations cpuinfo_op = {
 35.1175 -    start:	c_start,
 35.1176 -    next:	c_next,
 35.1177 -    stop:	c_stop,
 35.1178 -    show:	show_cpuinfo,
 35.1179 -};
 35.1180 -
 35.1181 -unsigned long cpu_initialized __initdata = 0;
 35.1182 -
 35.1183 -/*
 35.1184 - * cpu_init() initializes state that is per-CPU. Some data is already
 35.1185 - * initialized (naturally) in the bootstrap process, such as the GDT
 35.1186 - * and IDT. We reload them nevertheless, this function acts as a
 35.1187 - * 'CPU state barrier', nothing should get across.
 35.1188 - */
 35.1189 -void __init cpu_init (void)
 35.1190 -{
 35.1191 -    int nr = smp_processor_id();
 35.1192 -
 35.1193 -    if (test_and_set_bit(nr, &cpu_initialized)) {
 35.1194 -        printk(KERN_WARNING "CPU#%d already initialized!\n", nr);
 35.1195 -        for (;;) __sti();
 35.1196 -    }
 35.1197 -    printk(KERN_INFO "Initializing CPU#%d\n", nr);
 35.1198 -
 35.1199 -    /*
 35.1200 -     * set up and load the per-CPU TSS and LDT
 35.1201 -     */
 35.1202 -    atomic_inc(&init_mm.mm_count);
 35.1203 -    current->active_mm = &init_mm;
 35.1204 -    if(current->mm)
 35.1205 -        BUG();
 35.1206 -    enter_lazy_tlb(&init_mm, current, nr);
 35.1207 -
 35.1208 -    HYPERVISOR_stack_switch(__KERNEL_DS, current->thread.esp0);
 35.1209 -
 35.1210 -    load_LDT(&init_mm.context);
 35.1211 -
 35.1212 -    /* Force FPU initialization. */
 35.1213 -    current->flags &= ~PF_USEDFPU;
 35.1214 -    current->used_math = 0;
 35.1215 -    stts();
 35.1216 -}
    36.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/signal.c	Fri Jul 29 11:52:33 2005 -0700
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,717 +0,0 @@
    36.4 -/*
    36.5 - *  linux/arch/i386/kernel/signal.c
    36.6 - *
    36.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    36.8 - *
    36.9 - *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
   36.10 - *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
   36.11 - */
   36.12 -
   36.13 -#include <linux/sched.h>
   36.14 -#include <linux/mm.h>
   36.15 -#include <linux/smp.h>
   36.16 -#include <linux/smp_lock.h>
   36.17 -#include <linux/kernel.h>
   36.18 -#include <linux/signal.h>
   36.19 -#include <linux/errno.h>
   36.20 -#include <linux/wait.h>
   36.21 -#include <linux/ptrace.h>
   36.22 -#include <linux/unistd.h>
   36.23 -#include <linux/stddef.h>
   36.24 -#include <linux/tty.h>
   36.25 -#include <linux/personality.h>
   36.26 -#include <asm/ucontext.h>
   36.27 -#include <asm/uaccess.h>
   36.28 -#include <asm/i387.h>
   36.29 -
   36.30 -#define DEBUG_SIG 0
   36.31 -
   36.32 -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
   36.33 -
   36.34 -int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
   36.35 -
   36.36 -int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
   36.37 -{
   36.38 -	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
   36.39 -		return -EFAULT;
   36.40 -	if (from->si_code < 0)
   36.41 -		return __copy_to_user(to, from, sizeof(siginfo_t));
   36.42 -	else {
   36.43 -		int err;
   36.44 -
   36.45 -		/* If you change siginfo_t structure, please be sure
   36.46 -		   this code is fixed accordingly.
   36.47 -		   It should never copy any pad contained in the structure
   36.48 -		   to avoid security leaks, but must copy the generic
   36.49 -		   3 ints plus the relevant union member.  */
   36.50 -		err = __put_user(from->si_signo, &to->si_signo);
   36.51 -		err |= __put_user(from->si_errno, &to->si_errno);
   36.52 -		err |= __put_user((short)from->si_code, &to->si_code);
   36.53 -		/* First 32bits of unions are always present.  */
   36.54 -		err |= __put_user(from->si_pid, &to->si_pid);
   36.55 -		switch (from->si_code >> 16) {
   36.56 -		case __SI_FAULT >> 16:
   36.57 -			break;
   36.58 -		case __SI_CHLD >> 16:
   36.59 -			err |= __put_user(from->si_utime, &to->si_utime);
   36.60 -			err |= __put_user(from->si_stime, &to->si_stime);
   36.61 -			err |= __put_user(from->si_status, &to->si_status);
   36.62 -		default:
   36.63 -			err |= __put_user(from->si_uid, &to->si_uid);
   36.64 -			break;
   36.65 -		/* case __SI_RT: This is not generated by the kernel as of now.  */
   36.66 -		}
   36.67 -		return err;
   36.68 -	}
   36.69 -}
   36.70 -
   36.71 -/*
   36.72 - * Atomically swap in the new signal mask, and wait for a signal.
   36.73 - */
   36.74 -asmlinkage int
   36.75 -sys_sigsuspend(int history0, int history1, old_sigset_t mask)
   36.76 -{
   36.77 -	struct pt_regs * regs = (struct pt_regs *) &history0;
   36.78 -	sigset_t saveset;
   36.79 -
   36.80 -	mask &= _BLOCKABLE;
   36.81 -	spin_lock_irq(&current->sigmask_lock);
   36.82 -	saveset = current->blocked;
   36.83 -	siginitset(&current->blocked, mask);
   36.84 -	recalc_sigpending(current);
   36.85 -	spin_unlock_irq(&current->sigmask_lock);
   36.86 -
   36.87 -	regs->eax = -EINTR;
   36.88 -	while (1) {
   36.89 -		current->state = TASK_INTERRUPTIBLE;
   36.90 -		schedule();
   36.91 -		if (do_signal(regs, &saveset))
   36.92 -			return -EINTR;
   36.93 -	}
   36.94 -}
   36.95 -
   36.96 -asmlinkage int
   36.97 -sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
   36.98 -{
   36.99 -	struct pt_regs * regs = (struct pt_regs *) &unewset;
  36.100 -	sigset_t saveset, newset;
  36.101 -
  36.102 -	/* XXX: Don't preclude handling different sized sigset_t's.  */
  36.103 -	if (sigsetsize != sizeof(sigset_t))
  36.104 -		return -EINVAL;
  36.105 -
  36.106 -	if (copy_from_user(&newset, unewset, sizeof(newset)))
  36.107 -		return -EFAULT;
  36.108 -	sigdelsetmask(&newset, ~_BLOCKABLE);
  36.109 -
  36.110 -	spin_lock_irq(&current->sigmask_lock);
  36.111 -	saveset = current->blocked;
  36.112 -	current->blocked = newset;
  36.113 -	recalc_sigpending(current);
  36.114 -	spin_unlock_irq(&current->sigmask_lock);
  36.115 -
  36.116 -	regs->eax = -EINTR;
  36.117 -	while (1) {
  36.118 -		current->state = TASK_INTERRUPTIBLE;
  36.119 -		schedule();
  36.120 -		if (do_signal(regs, &saveset))
  36.121 -			return -EINTR;
  36.122 -	}
  36.123 -}
  36.124 -
  36.125 -asmlinkage int 
  36.126 -sys_sigaction(int sig, const struct old_sigaction *act,
  36.127 -	      struct old_sigaction *oact)
  36.128 -{
  36.129 -	struct k_sigaction new_ka, old_ka;
  36.130 -	int ret;
  36.131 -
  36.132 -	if (act) {
  36.133 -		old_sigset_t mask;
  36.134 -		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
  36.135 -		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
  36.136 -		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
  36.137 -			return -EFAULT;
  36.138 -		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
  36.139 -		__get_user(mask, &act->sa_mask);
  36.140 -		siginitset(&new_ka.sa.sa_mask, mask);
  36.141 -	}
  36.142 -
  36.143 -	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
  36.144 -
  36.145 -	if (!ret && oact) {
  36.146 -		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
  36.147 -		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
  36.148 -		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
  36.149 -			return -EFAULT;
  36.150 -		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
  36.151 -		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
  36.152 -	}
  36.153 -
  36.154 -	return ret;
  36.155 -}
  36.156 -
  36.157 -asmlinkage int
  36.158 -sys_sigaltstack(const stack_t *uss, stack_t *uoss)
  36.159 -{
  36.160 -	struct pt_regs *regs = (struct pt_regs *) &uss;
  36.161 -	return do_sigaltstack(uss, uoss, regs->esp);
  36.162 -}
  36.163 -
  36.164 -
  36.165 -/*
  36.166 - * Do a signal return; undo the signal stack.
  36.167 - */
  36.168 -
  36.169 -struct sigframe
  36.170 -{
  36.171 -	char *pretcode;
  36.172 -	int sig;
  36.173 -	struct sigcontext sc;
  36.174 -	struct _fpstate fpstate;
  36.175 -	unsigned long extramask[_NSIG_WORDS-1];
  36.176 -	char retcode[8];
  36.177 -};
  36.178 -
  36.179 -struct rt_sigframe
  36.180 -{
  36.181 -	char *pretcode;
  36.182 -	int sig;
  36.183 -	struct siginfo *pinfo;
  36.184 -	void *puc;
  36.185 -	struct siginfo info;
  36.186 -	struct ucontext uc;
  36.187 -	struct _fpstate fpstate;
  36.188 -	char retcode[8];
  36.189 -};
  36.190 -
  36.191 -static int
  36.192 -restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
  36.193 -{
  36.194 -	unsigned int err = 0;
  36.195 -
  36.196 -#define COPY(x)		err |= __get_user(regs->x, &sc->x)
  36.197 -
  36.198 -#define COPY_SEG(seg)							\
  36.199 -	{ unsigned short tmp;						\
  36.200 -	  err |= __get_user(tmp, &sc->seg);				\
  36.201 -	  regs->x##seg = tmp; }
  36.202 -
  36.203 -#define COPY_SEG_STRICT(seg)						\
  36.204 -	{ unsigned short tmp;						\
  36.205 -	  err |= __get_user(tmp, &sc->seg);				\
  36.206 -	  regs->x##seg = tmp|3; }
  36.207 -
  36.208 -#define GET_SEG(seg)							\
  36.209 -	{ unsigned short tmp;						\
  36.210 -	  err |= __get_user(tmp, &sc->seg);				\
  36.211 -	  loadsegment(seg,tmp); }
  36.212 -
  36.213 -	GET_SEG(gs);
  36.214 -	GET_SEG(fs);
  36.215 -	COPY_SEG(es);
  36.216 -	COPY_SEG(ds);
  36.217 -	COPY(edi);
  36.218 -	COPY(esi);
  36.219 -	COPY(ebp);
  36.220 -	COPY(esp);
  36.221 -	COPY(ebx);
  36.222 -	COPY(edx);
  36.223 -	COPY(ecx);
  36.224 -	COPY(eip);
  36.225 -	COPY_SEG_STRICT(cs);
  36.226 -	COPY_SEG_STRICT(ss);
  36.227 -	
  36.228 -	{
  36.229 -		unsigned int tmpflags;
  36.230 -		err |= __get_user(tmpflags, &sc->eflags);
  36.231 -		regs->eflags = (regs->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);
  36.232 -		regs->orig_eax = -1;		/* disable syscall checks */
  36.233 -	}
  36.234 -
  36.235 -	{
  36.236 -		struct _fpstate * buf;
  36.237 -		err |= __get_user(buf, &sc->fpstate);
  36.238 -		if (buf) {
  36.239 -			if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
  36.240 -				goto badframe;
  36.241 -			err |= restore_i387(buf);
  36.242 -		}
  36.243 -	}
  36.244 -
  36.245 -	err |= __get_user(*peax, &sc->eax);
  36.246 -	return err;
  36.247 -
  36.248 -badframe:
  36.249 -	return 1;
  36.250 -}
  36.251 -
  36.252 -asmlinkage int sys_sigreturn(unsigned long __unused)
  36.253 -{
  36.254 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  36.255 -	struct sigframe *frame = (struct sigframe *)(regs->esp - 8);
  36.256 -	sigset_t set;
  36.257 -	int eax;
  36.258 -
  36.259 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  36.260 -		goto badframe;
  36.261 -	if (__get_user(set.sig[0], &frame->sc.oldmask)
  36.262 -	    || (_NSIG_WORDS > 1
  36.263 -		&& __copy_from_user(&set.sig[1], &frame->extramask,
  36.264 -				    sizeof(frame->extramask))))
  36.265 -		goto badframe;
  36.266 -
  36.267 -	sigdelsetmask(&set, ~_BLOCKABLE);
  36.268 -	spin_lock_irq(&current->sigmask_lock);
  36.269 -	current->blocked = set;
  36.270 -	recalc_sigpending(current);
  36.271 -	spin_unlock_irq(&current->sigmask_lock);
  36.272 -	
  36.273 -	if (restore_sigcontext(regs, &frame->sc, &eax))
  36.274 -		goto badframe;
  36.275 -	return eax;
  36.276 -
  36.277 -badframe:
  36.278 -	force_sig(SIGSEGV, current);
  36.279 -	return 0;
  36.280 -}	
  36.281 -
  36.282 -asmlinkage int sys_rt_sigreturn(unsigned long __unused)
  36.283 -{
  36.284 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  36.285 -	struct rt_sigframe *frame = (struct rt_sigframe *)(regs->esp - 4);
  36.286 -	sigset_t set;
  36.287 -	stack_t st;
  36.288 -	int eax;
  36.289 -
  36.290 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  36.291 -		goto badframe;
  36.292 -	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
  36.293 -		goto badframe;
  36.294 -
  36.295 -	sigdelsetmask(&set, ~_BLOCKABLE);
  36.296 -	spin_lock_irq(&current->sigmask_lock);
  36.297 -	current->blocked = set;
  36.298 -	recalc_sigpending(current);
  36.299 -	spin_unlock_irq(&current->sigmask_lock);
  36.300 -	
  36.301 -	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax))
  36.302 -		goto badframe;
  36.303 -
  36.304 -	if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
  36.305 -		goto badframe;
  36.306 -	/* It is more difficult to avoid calling this function than to
  36.307 -	   call it and ignore errors.  */
  36.308 -	do_sigaltstack(&st, NULL, regs->esp);
  36.309 -
  36.310 -	return eax;
  36.311 -
  36.312 -badframe:
  36.313 -	force_sig(SIGSEGV, current);
  36.314 -	return 0;
  36.315 -}	
  36.316 -
  36.317 -/*
  36.318 - * Set up a signal frame.
  36.319 - */
  36.320 -
  36.321 -static int
  36.322 -setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
  36.323 -		 struct pt_regs *regs, unsigned long mask)
  36.324 -{
  36.325 -	int tmp, err = 0;
  36.326 -
  36.327 -	tmp = 0;
  36.328 -	__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
  36.329 -	err |= __put_user(tmp, (unsigned int *)&sc->gs);
  36.330 -	__asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp));
  36.331 -	err |= __put_user(tmp, (unsigned int *)&sc->fs);
  36.332 -
  36.333 -	err |= __put_user(regs->xes, (unsigned int *)&sc->es);
  36.334 -	err |= __put_user(regs->xds, (unsigned int *)&sc->ds);
  36.335 -	err |= __put_user(regs->edi, &sc->edi);
  36.336 -	err |= __put_user(regs->esi, &sc->esi);
  36.337 -	err |= __put_user(regs->ebp, &sc->ebp);
  36.338 -	err |= __put_user(regs->esp, &sc->esp);
  36.339 -	err |= __put_user(regs->ebx, &sc->ebx);
  36.340 -	err |= __put_user(regs->edx, &sc->edx);
  36.341 -	err |= __put_user(regs->ecx, &sc->ecx);
  36.342 -	err |= __put_user(regs->eax, &sc->eax);
  36.343 -	err |= __put_user(current->thread.trap_no, &sc->trapno);
  36.344 -	err |= __put_user(current->thread.error_code, &sc->err);
  36.345 -	err |= __put_user(regs->eip, &sc->eip);
  36.346 -	err |= __put_user(regs->xcs, (unsigned int *)&sc->cs);
  36.347 -	err |= __put_user(regs->eflags, &sc->eflags);
  36.348 -	err |= __put_user(regs->esp, &sc->esp_at_signal);
  36.349 -	err |= __put_user(regs->xss, (unsigned int *)&sc->ss);
  36.350 -
  36.351 -	tmp = save_i387(fpstate);
  36.352 -	if (tmp < 0)
  36.353 -	  err = 1;
  36.354 -	else
  36.355 -	  err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate);
  36.356 -
  36.357 -	/* non-iBCS2 extensions.. */
  36.358 -	err |= __put_user(mask, &sc->oldmask);
  36.359 -	err |= __put_user(current->thread.cr2, &sc->cr2);
  36.360 -
  36.361 -	return err;
  36.362 -}
  36.363 -
  36.364 -/*
  36.365 - * Determine which stack to use..
  36.366 - */
  36.367 -static inline void *
  36.368 -get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
  36.369 -{
  36.370 -	unsigned long esp;
  36.371 -
  36.372 -	/* Default to using normal stack */
  36.373 -	esp = regs->esp;
  36.374 -
  36.375 -	/* This is the X/Open sanctioned signal stack switching.  */
  36.376 -	if (ka->sa.sa_flags & SA_ONSTACK) {
  36.377 -		if (sas_ss_flags(esp) == 0)
  36.378 -			esp = current->sas_ss_sp + current->sas_ss_size;
  36.379 -	}
  36.380 -
  36.381 -	/* This is the legacy signal stack switching. */
  36.382 -	else if ((regs->xss & 0xffff) != __USER_DS &&
  36.383 -		 !(ka->sa.sa_flags & SA_RESTORER) &&
  36.384 -		 ka->sa.sa_restorer) {
  36.385 -		esp = (unsigned long) ka->sa.sa_restorer;
  36.386 -	}
  36.387 -
  36.388 -	return (void *)((esp - frame_size) & -8ul);
  36.389 -}
  36.390 -
  36.391 -static void setup_frame(int sig, struct k_sigaction *ka,
  36.392 -			sigset_t *set, struct pt_regs * regs)
  36.393 -{
  36.394 -	struct sigframe *frame;
  36.395 -	int err = 0;
  36.396 -
  36.397 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  36.398 -
  36.399 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  36.400 -		goto give_sigsegv;
  36.401 -
  36.402 -	err |= __put_user((current->exec_domain
  36.403 -		           && current->exec_domain->signal_invmap
  36.404 -		           && sig < 32
  36.405 -		           ? current->exec_domain->signal_invmap[sig]
  36.406 -		           : sig),
  36.407 -		          &frame->sig);
  36.408 -	if (err)
  36.409 -		goto give_sigsegv;
  36.410 -
  36.411 -	err |= setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
  36.412 -	if (err)
  36.413 -		goto give_sigsegv;
  36.414 -
  36.415 -	if (_NSIG_WORDS > 1) {
  36.416 -		err |= __copy_to_user(frame->extramask, &set->sig[1],
  36.417 -				      sizeof(frame->extramask));
  36.418 -	}
  36.419 -	if (err)
  36.420 -		goto give_sigsegv;
  36.421 -
  36.422 -	/* Set up to return from userspace.  If provided, use a stub
  36.423 -	   already in userspace.  */
  36.424 -	if (ka->sa.sa_flags & SA_RESTORER) {
  36.425 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  36.426 -	} else {
  36.427 -		err |= __put_user(frame->retcode, &frame->pretcode);
  36.428 -		/* This is popl %eax ; movl $,%eax ; int $0x80 */
  36.429 -		err |= __put_user(0xb858, (short *)(frame->retcode+0));
  36.430 -		err |= __put_user(__NR_sigreturn, (int *)(frame->retcode+2));
  36.431 -		err |= __put_user(0x80cd, (short *)(frame->retcode+6));
  36.432 -	}
  36.433 -
  36.434 -	if (err)
  36.435 -		goto give_sigsegv;
  36.436 -
  36.437 -	/* Set up registers for signal handler */
  36.438 -	regs->esp = (unsigned long) frame;
  36.439 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  36.440 -
  36.441 -	set_fs(USER_DS);
  36.442 -	regs->xds = __USER_DS;
  36.443 -	regs->xes = __USER_DS;
  36.444 -	regs->xss = __USER_DS;
  36.445 -	regs->xcs = __USER_CS;
  36.446 -	regs->eflags &= ~TF_MASK;
  36.447 -
  36.448 -#if DEBUG_SIG
  36.449 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  36.450 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  36.451 -#endif
  36.452 -
  36.453 -	return;
  36.454 -
  36.455 -give_sigsegv:
  36.456 -	if (sig == SIGSEGV)
  36.457 -		ka->sa.sa_handler = SIG_DFL;
  36.458 -	force_sig(SIGSEGV, current);
  36.459 -}
  36.460 -
  36.461 -static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
  36.462 -			   sigset_t *set, struct pt_regs * regs)
  36.463 -{
  36.464 -	struct rt_sigframe *frame;
  36.465 -	int err = 0;
  36.466 -
  36.467 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  36.468 -
  36.469 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  36.470 -		goto give_sigsegv;
  36.471 -
  36.472 -	err |= __put_user((current->exec_domain
  36.473 -		    	   && current->exec_domain->signal_invmap
  36.474 -		    	   && sig < 32
  36.475 -		    	   ? current->exec_domain->signal_invmap[sig]
  36.476 -			   : sig),
  36.477 -			  &frame->sig);
  36.478 -	err |= __put_user(&frame->info, &frame->pinfo);
  36.479 -	err |= __put_user(&frame->uc, &frame->puc);
  36.480 -	err |= copy_siginfo_to_user(&frame->info, info);
  36.481 -	if (err)
  36.482 -		goto give_sigsegv;
  36.483 -
  36.484 -	/* Create the ucontext.  */
  36.485 -	err |= __put_user(0, &frame->uc.uc_flags);
  36.486 -	err |= __put_user(0, &frame->uc.uc_link);
  36.487 -	err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
  36.488 -	err |= __put_user(sas_ss_flags(regs->esp),
  36.489 -			  &frame->uc.uc_stack.ss_flags);
  36.490 -	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
  36.491 -	err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->fpstate,
  36.492 -			        regs, set->sig[0]);
  36.493 -	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
  36.494 -	if (err)
  36.495 -		goto give_sigsegv;
  36.496 -
  36.497 -	/* Set up to return from userspace.  If provided, use a stub
  36.498 -	   already in userspace.  */
  36.499 -	if (ka->sa.sa_flags & SA_RESTORER) {
  36.500 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  36.501 -	} else {
  36.502 -		err |= __put_user(frame->retcode, &frame->pretcode);
  36.503 -		/* This is movl $,%eax ; int $0x80 */
  36.504 -		err |= __put_user(0xb8, (char *)(frame->retcode+0));
  36.505 -		err |= __put_user(__NR_rt_sigreturn, (int *)(frame->retcode+1));
  36.506 -		err |= __put_user(0x80cd, (short *)(frame->retcode+5));
  36.507 -	}
  36.508 -
  36.509 -	if (err)
  36.510 -		goto give_sigsegv;
  36.511 -
  36.512 -	/* Set up registers for signal handler */
  36.513 -	regs->esp = (unsigned long) frame;
  36.514 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  36.515 -
  36.516 -	set_fs(USER_DS);
  36.517 -	regs->xds = __USER_DS;
  36.518 -	regs->xes = __USER_DS;
  36.519 -	regs->xss = __USER_DS;
  36.520 -	regs->xcs = __USER_CS;
  36.521 -	regs->eflags &= ~TF_MASK;
  36.522 -
  36.523 -#if DEBUG_SIG
  36.524 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  36.525 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  36.526 -#endif
  36.527 -
  36.528 -	return;
  36.529 -
  36.530 -give_sigsegv:
  36.531 -	if (sig == SIGSEGV)
  36.532 -		ka->sa.sa_handler = SIG_DFL;
  36.533 -	force_sig(SIGSEGV, current);
  36.534 -}
  36.535 -
  36.536 -/*
  36.537 - * OK, we're invoking a handler
  36.538 - */	
  36.539 -
  36.540 -static void
  36.541 -handle_signal(unsigned long sig, struct k_sigaction *ka,
  36.542 -	      siginfo_t *info, sigset_t *oldset, struct pt_regs * regs)
  36.543 -{
  36.544 -	/* Are we from a system call? */
  36.545 -	if (regs->orig_eax >= 0) {
  36.546 -		/* If so, check system call restarting.. */
  36.547 -		switch (regs->eax) {
  36.548 -			case -ERESTARTNOHAND:
  36.549 -				regs->eax = -EINTR;
  36.550 -				break;
  36.551 -
  36.552 -			case -ERESTARTSYS:
  36.553 -				if (!(ka->sa.sa_flags & SA_RESTART)) {
  36.554 -					regs->eax = -EINTR;
  36.555 -					break;
  36.556 -				}
  36.557 -			/* fallthrough */
  36.558 -			case -ERESTARTNOINTR:
  36.559 -				regs->eax = regs->orig_eax;
  36.560 -				regs->eip -= 2;
  36.561 -		}
  36.562 -	}
  36.563 -
  36.564 -	/* Set up the stack frame */
  36.565 -	if (ka->sa.sa_flags & SA_SIGINFO)
  36.566 -		setup_rt_frame(sig, ka, info, oldset, regs);
  36.567 -	else
  36.568 -		setup_frame(sig, ka, oldset, regs);
  36.569 -
  36.570 -	if (ka->sa.sa_flags & SA_ONESHOT)
  36.571 -		ka->sa.sa_handler = SIG_DFL;
  36.572 -
  36.573 -	if (!(ka->sa.sa_flags & SA_NODEFER)) {
  36.574 -		spin_lock_irq(&current->sigmask_lock);
  36.575 -		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
  36.576 -		sigaddset(&current->blocked,sig);
  36.577 -		recalc_sigpending(current);
  36.578 -		spin_unlock_irq(&current->sigmask_lock);
  36.579 -	}
  36.580 -}
  36.581 -
  36.582 -/*
  36.583 - * Note that 'init' is a special process: it doesn't get signals it doesn't
  36.584 - * want to handle. Thus you cannot kill init even with a SIGKILL even by
  36.585 - * mistake.
  36.586 - */
  36.587 -int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset)
  36.588 -{
  36.589 -	siginfo_t info;
  36.590 -	struct k_sigaction *ka;
  36.591 -
  36.592 -	/*
  36.593 -	 * We want the common case to go fast, which
  36.594 -	 * is why we may in certain cases get here from
  36.595 -	 * kernel mode. Just return without doing anything
  36.596 -	 * if so.
  36.597 -	 */
  36.598 -	if ((regs->xcs & 2) != 2)
  36.599 -		return 1;
  36.600 -
  36.601 -	if (!oldset)
  36.602 -		oldset = &current->blocked;
  36.603 -
  36.604 -	for (;;) {
  36.605 -		unsigned long signr;
  36.606 -
  36.607 -		spin_lock_irq(&current->sigmask_lock);
  36.608 -		signr = dequeue_signal(&current->blocked, &info);
  36.609 -		spin_unlock_irq(&current->sigmask_lock);
  36.610 -
  36.611 -		if (!signr)
  36.612 -			break;
  36.613 -
  36.614 -		if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
  36.615 -			/* Let the debugger run.  */
  36.616 -			current->exit_code = signr;
  36.617 -			current->state = TASK_STOPPED;
  36.618 -			notify_parent(current, SIGCHLD);
  36.619 -			schedule();
  36.620 -
  36.621 -			/* We're back.  Did the debugger cancel the sig?  */
  36.622 -			if (!(signr = current->exit_code))
  36.623 -				continue;
  36.624 -			current->exit_code = 0;
  36.625 -
  36.626 -			/* The debugger continued.  Ignore SIGSTOP.  */
  36.627 -			if (signr == SIGSTOP)
  36.628 -				continue;
  36.629 -
  36.630 -			/* Update the siginfo structure.  Is this good?  */
  36.631 -			if (signr != info.si_signo) {
  36.632 -				info.si_signo = signr;
  36.633 -				info.si_errno = 0;
  36.634 -				info.si_code = SI_USER;
  36.635 -				info.si_pid = current->p_pptr->pid;
  36.636 -				info.si_uid = current->p_pptr->uid;
  36.637 -			}
  36.638 -
  36.639 -			/* If the (new) signal is now blocked, requeue it.  */
  36.640 -			if (sigismember(&current->blocked, signr)) {
  36.641 -				send_sig_info(signr, &info, current);
  36.642 -				continue;
  36.643 -			}
  36.644 -		}
  36.645 -
  36.646 -		ka = &current->sig->action[signr-1];
  36.647 -		if (ka->sa.sa_handler == SIG_IGN) {
  36.648 -			if (signr != SIGCHLD)
  36.649 -				continue;
  36.650 -			/* Check for SIGCHLD: it's special.  */
  36.651 -			while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0)
  36.652 -				/* nothing */;
  36.653 -			continue;
  36.654 -		}
  36.655 -
  36.656 -		if (ka->sa.sa_handler == SIG_DFL) {
  36.657 -			int exit_code = signr;
  36.658 -
  36.659 -			/* Init gets no signals it doesn't want.  */
  36.660 -			if (current->pid == 1)
  36.661 -				continue;
  36.662 -
  36.663 -			switch (signr) {
  36.664 -			case SIGCONT: case SIGCHLD: case SIGWINCH: case SIGURG:
  36.665 -				continue;
  36.666 -
  36.667 -			case SIGTSTP: case SIGTTIN: case SIGTTOU:
  36.668 -				if (is_orphaned_pgrp(current->pgrp))
  36.669 -					continue;
  36.670 -				/* FALLTHRU */
  36.671 -
  36.672 -			case SIGSTOP: {
  36.673 -				struct signal_struct *sig;
  36.674 -				current->state = TASK_STOPPED;
  36.675 -				current->exit_code = signr;
  36.676 -				sig = current->p_pptr->sig;
  36.677 -				if (sig && !(sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP))
  36.678 -					notify_parent(current, SIGCHLD);
  36.679 -				schedule();
  36.680 -				continue;
  36.681 -			}
  36.682 -
  36.683 -			case SIGQUIT: case SIGILL: case SIGTRAP:
  36.684 -			case SIGABRT: case SIGFPE: case SIGSEGV:
  36.685 -			case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
  36.686 -				if (do_coredump(signr, regs))
  36.687 -					exit_code |= 0x80;
  36.688 -				/* FALLTHRU */
  36.689 -
  36.690 -			default:
  36.691 -				sig_exit(signr, exit_code, &info);
  36.692 -				/* NOTREACHED */
  36.693 -			}
  36.694 -		}
  36.695 -
  36.696 -		/* Reenable any watchpoints before delivering the
  36.697 -		 * signal to user space. The processor register will
  36.698 -		 * have been cleared if the watchpoint triggered
  36.699 -		 * inside the kernel.
  36.700 -		 */
  36.701 -                if ( current->thread.debugreg[7] != 0 )
  36.702 -                    HYPERVISOR_set_debugreg(7, current->thread.debugreg[7]);
  36.703 -
  36.704 -		/* Whee!  Actually deliver the signal.  */
  36.705 -		handle_signal(signr, ka, &info, oldset, regs);
  36.706 -		return 1;
  36.707 -	}
  36.708 -
  36.709 -	/* Did we come from a system call? */
  36.710 -	if (regs->orig_eax >= 0) {
  36.711 -		/* Restart the system call - no handlers present */
  36.712 -		if (regs->eax == -ERESTARTNOHAND ||
  36.713 -		    regs->eax == -ERESTARTSYS ||
  36.714 -		    regs->eax == -ERESTARTNOINTR) {
  36.715 -			regs->eax = regs->orig_eax;
  36.716 -			regs->eip -= 2;
  36.717 -		}
  36.718 -	}
  36.719 -	return 0;
  36.720 -}
    37.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/time.c	Fri Jul 29 11:52:33 2005 -0700
    37.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.3 @@ -1,721 +0,0 @@
    37.4 -/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
    37.5 - ****************************************************************************
    37.6 - * (C) 2002-2003 - Rolf Neugebauer - Intel Research Cambridge
    37.7 - * (C) 2002-2003 - Keir Fraser - University of Cambridge
    37.8 - ****************************************************************************
    37.9 - *
   37.10 - *        File: arch/xen/kernel/time.c
   37.11 - *      Author: Rolf Neugebauer and Keir Fraser
   37.12 - * 
   37.13 - * Description: Interface with Xen to get correct notion of time
   37.14 - */
   37.15 -
   37.16 -/*
   37.17 - *  linux/arch/i386/kernel/time.c
   37.18 - *
   37.19 - *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
   37.20 - *
   37.21 - * This file contains the PC-specific time handling details:
   37.22 - * reading the RTC at bootup, etc..
   37.23 - * 1994-07-02    Alan Modra
   37.24 - * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
   37.25 - * 1995-03-26    Markus Kuhn
   37.26 - *      fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
   37.27 - *      precision CMOS clock update
   37.28 - * 1996-05-03    Ingo Molnar
   37.29 - *      fixed time warps in do_[slow|fast]_gettimeoffset()
   37.30 - * 1997-09-10 Updated NTP code according to technical memorandum Jan '96
   37.31 - *  "A Kernel Model for Precision Timekeeping" by Dave Mills
   37.32 - * 1998-09-05    (Various)
   37.33 - * More robust do_fast_gettimeoffset() algorithm implemented
   37.34 - * (works with APM, Cyrix 6x86MX and Centaur C6),
   37.35 - * monotonic gettimeofday() with fast_get_timeoffset(),
   37.36 - * drift-proof precision TSC calibration on boot
   37.37 - * (C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
   37.38 - * Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
   37.39 - * ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
   37.40 - * 1998-12-16    Andrea Arcangeli
   37.41 - * Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
   37.42 - * because was not accounting lost_ticks.
   37.43 - * 1998-12-24 Copyright (C) 1998  Andrea Arcangeli
   37.44 - * Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
   37.45 - * serialize accesses to xtime/lost_ticks).
   37.46 - */
   37.47 -
   37.48 -#include <asm/smp.h>
   37.49 -#include <asm/irq.h>
   37.50 -#include <asm/msr.h>
   37.51 -#include <asm/delay.h>
   37.52 -#include <asm/mpspec.h>
   37.53 -#include <asm/uaccess.h>
   37.54 -#include <asm/processor.h>
   37.55 -
   37.56 -#include <asm/div64.h>
   37.57 -#include <asm/hypervisor.h>
   37.58 -#include <asm-xen/xen-public/dom0_ops.h>
   37.59 -
   37.60 -#include <linux/mc146818rtc.h>
   37.61 -#include <linux/kernel.h>
   37.62 -#include <linux/interrupt.h>
   37.63 -#include <linux/time.h>
   37.64 -#include <linux/init.h>
   37.65 -#include <linux/smp.h>
   37.66 -#include <linux/irq.h>
   37.67 -#include <linux/sysctl.h>
   37.68 -#include <linux/sysrq.h>
   37.69 -
   37.70 -spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
   37.71 -extern rwlock_t xtime_lock;
   37.72 -extern unsigned long wall_jiffies;
   37.73 -
   37.74 -unsigned long cpu_khz; /* get this from Xen, used elsewhere */
   37.75 -
   37.76 -static unsigned int rdtsc_bitshift;
   37.77 -static u32 st_scale_f; /* convert ticks -> usecs */
   37.78 -static u32 st_scale_i; /* convert ticks -> usecs */
   37.79 -
   37.80 -/* These are peridically updated in shared_info, and then copied here. */
   37.81 -static u32 shadow_tsc_stamp;
   37.82 -static u64 shadow_system_time;
   37.83 -static u32 shadow_time_version;
   37.84 -static struct timeval shadow_tv;
   37.85 -
   37.86 -/*
   37.87 - * We use this to ensure that gettimeofday() is monotonically increasing. We
   37.88 - * only break this guarantee if the wall clock jumps backwards "a long way".
   37.89 - */
   37.90 -static struct timeval last_seen_tv = {0,0};
   37.91 -
   37.92 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
   37.93 -/* Periodically propagate synchronised time base to the RTC and to Xen. */
   37.94 -static long last_update_to_rtc, last_update_to_xen;
   37.95 -#endif
   37.96 -
   37.97 -/* Periodically take synchronised time base from Xen, if we need it. */
   37.98 -static long last_update_from_xen;   /* UTC seconds when last read Xen clock. */
   37.99 -
  37.100 -/* Keep track of last time we did processing/updating of jiffies and xtime. */
  37.101 -static u64 processed_system_time;   /* System time (ns) at last processing. */
  37.102 -
  37.103 -#define NS_PER_TICK (1000000000ULL/HZ)
  37.104 -
  37.105 -#ifndef NSEC_PER_SEC
  37.106 -#define NSEC_PER_SEC (1000000000L)
  37.107 -#endif
  37.108 -
  37.109 -#define HANDLE_USEC_UNDERFLOW(_tv)         \
  37.110 -    do {                                   \
  37.111 -        while ( (_tv).tv_usec < 0 )        \
  37.112 -        {                                  \
  37.113 -            (_tv).tv_usec += 1000000;      \
  37.114 -            (_tv).tv_sec--;                \
  37.115 -        }                                  \
  37.116 -    } while ( 0 )
  37.117 -#define HANDLE_USEC_OVERFLOW(_tv)          \
  37.118 -    do {                                   \
  37.119 -        while ( (_tv).tv_usec >= 1000000 ) \
  37.120 -        {                                  \
  37.121 -            (_tv).tv_usec -= 1000000;      \
  37.122 -            (_tv).tv_sec++;                \
  37.123 -        }                                  \
  37.124 -    } while ( 0 )
  37.125 -static inline void __normalize_time(time_t *sec, s64 *nsec)
  37.126 -{
  37.127 -	while (*nsec >= NSEC_PER_SEC) {
  37.128 -		(*nsec) -= NSEC_PER_SEC;
  37.129 -		(*sec)++;
  37.130 -	}
  37.131 -	while (*nsec < 0) {
  37.132 -		(*nsec) += NSEC_PER_SEC;
  37.133 -		(*sec)--;
  37.134 -	}
  37.135 -}
  37.136 -
  37.137 -/* Dynamically-mapped IRQs. */
  37.138 -static int time_irq, debug_irq;
  37.139 -
  37.140 -/* Does this guest OS track Xen time, or set its wall clock independently? */
  37.141 -static int independent_wallclock = 0;
  37.142 -static int __init __independent_wallclock(char *str)
  37.143 -{
  37.144 -    independent_wallclock = 1;
  37.145 -    return 1;
  37.146 -}
  37.147 -__setup("independent_wallclock", __independent_wallclock);
  37.148 -#define INDEPENDENT_WALLCLOCK() \
  37.149 -    (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
  37.150 -
  37.151 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  37.152 -/*
  37.153 - * In order to set the CMOS clock precisely, set_rtc_mmss has to be
  37.154 - * called 500 ms after the second nowtime has started, because when
  37.155 - * nowtime is written into the registers of the CMOS clock, it will
  37.156 - * jump to the next second precisely 500 ms later. Check the Motorola
  37.157 - * MC146818A or Dallas DS12887 data sheet for details.
  37.158 - *
  37.159 - * BUG: This routine does not handle hour overflow properly; it just
  37.160 - *      sets the minutes. Usually you'll only notice that after reboot!
  37.161 - */
  37.162 -static int set_rtc_mmss(unsigned long nowtime)
  37.163 -{
  37.164 -    int retval = 0;
  37.165 -    int real_seconds, real_minutes, cmos_minutes;
  37.166 -    unsigned char save_control, save_freq_select;
  37.167 -
  37.168 -    /* gets recalled with irq locally disabled */
  37.169 -    spin_lock(&rtc_lock);
  37.170 -    save_control = CMOS_READ(RTC_CONTROL);
  37.171 -    CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
  37.172 -
  37.173 -    save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
  37.174 -    CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
  37.175 -
  37.176 -    cmos_minutes = CMOS_READ(RTC_MINUTES);
  37.177 -    if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
  37.178 -        BCD_TO_BIN(cmos_minutes);
  37.179 -
  37.180 -    /*
  37.181 -     * since we're only adjusting minutes and seconds, don't interfere with
  37.182 -     * hour overflow. This avoids messing with unknown time zones but requires
  37.183 -     * your RTC not to be off by more than 15 minutes
  37.184 -     */
  37.185 -    real_seconds = nowtime % 60;
  37.186 -    real_minutes = nowtime / 60;
  37.187 -    if ( ((abs(real_minutes - cmos_minutes) + 15)/30) & 1 )
  37.188 -        real_minutes += 30;  /* correct for half hour time zone */
  37.189 -    real_minutes %= 60;
  37.190 -
  37.191 -    if ( abs(real_minutes - cmos_minutes) < 30 )
  37.192 -    {
  37.193 -        if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
  37.194 -        {
  37.195 -            BIN_TO_BCD(real_seconds);
  37.196 -            BIN_TO_BCD(real_minutes);
  37.197 -        }
  37.198 -        CMOS_WRITE(real_seconds,RTC_SECONDS);
  37.199 -        CMOS_WRITE(real_minutes,RTC_MINUTES);
  37.200 -    }
  37.201 -    else 
  37.202 -    {
  37.203 -        printk(KERN_WARNING
  37.204 -               "set_rtc_mmss: can't update from %d to %d\n",
  37.205 -               cmos_minutes, real_minutes);
  37.206 -        retval = -1;
  37.207 -    }
  37.208 -
  37.209 -    /* The following flags have to be released exactly in this order,
  37.210 -     * otherwise the DS12887 (popular MC146818A clone with integrated
  37.211 -     * battery and quartz) will not reset the oscillator and will not
  37.212 -     * update precisely 500 ms later. You won't find this mentioned in
  37.213 -     * the Dallas Semiconductor data sheets, but who believes data
  37.214 -     * sheets anyway ...                           -- Markus Kuhn
  37.215 -     */
  37.216 -    CMOS_WRITE(save_control, RTC_CONTROL);
  37.217 -    CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
  37.218 -    spin_unlock(&rtc_lock);
  37.219 -
  37.220 -    return retval;
  37.221 -}
  37.222 -#endif
  37.223 -
  37.224 -
  37.225 -/*
  37.226 - * Reads a consistent set of time-base values from Xen, into a shadow data
  37.227 - * area. Must be called with the xtime_lock held for writing.
  37.228 - */
  37.229 -static void __get_time_values_from_xen(void)
  37.230 -{
  37.231 -    do {
  37.232 -        shadow_time_version = HYPERVISOR_shared_info->time_version2;
  37.233 -        rmb();
  37.234 -        shadow_tv.tv_sec    = HYPERVISOR_shared_info->wc_sec;
  37.235 -        shadow_tv.tv_usec   = HYPERVISOR_shared_info->wc_usec;
  37.236 -        shadow_tsc_stamp    = 
  37.237 -            (u32)(HYPERVISOR_shared_info->tsc_timestamp >> rdtsc_bitshift);
  37.238 -        shadow_system_time  = HYPERVISOR_shared_info->system_time;
  37.239 -        rmb();
  37.240 -    }
  37.241 -    while ( shadow_time_version != HYPERVISOR_shared_info->time_version1 );
  37.242 -}
  37.243 -
  37.244 -#define TIME_VALUES_UP_TO_DATE \
  37.245 - ({ rmb(); (shadow_time_version == HYPERVISOR_shared_info->time_version2); })
  37.246 -
  37.247 -
  37.248 -/*
  37.249 - * Returns the system time elapsed, in ns, since the current shadow_timestamp
  37.250 - * was calculated. Must be called with the xtime_lock held for reading.
  37.251 - */
  37.252 -static inline unsigned long __get_time_delta_usecs(void)
  37.253 -{
  37.254 -    s32      delta_tsc;
  37.255 -    u32      low;
  37.256 -    u64      delta, tsc;
  37.257 -
  37.258 -    rdtscll(tsc);
  37.259 -    low = (u32)(tsc >> rdtsc_bitshift);
  37.260 -    delta_tsc = (s32)(low - shadow_tsc_stamp);
  37.261 -    if ( unlikely(delta_tsc < 0) ) delta_tsc = 0;
  37.262 -    delta = ((u64)delta_tsc * st_scale_f);
  37.263 -    delta >>= 32;
  37.264 -    delta += ((u64)delta_tsc * st_scale_i);
  37.265 -
  37.266 -    return (unsigned long)delta;
  37.267 -}
  37.268 -
  37.269 -
  37.270 -/*
  37.271 - * Returns the current time-of-day in UTC timeval format.
  37.272 - */
  37.273 -void do_gettimeofday(struct timeval *tv)
  37.274 -{
  37.275 -    unsigned long flags, lost;
  37.276 -    struct timeval _tv;
  37.277 -    s64 nsec;
  37.278 -
  37.279 - again:
  37.280 -    read_lock_irqsave(&xtime_lock, flags);
  37.281 -
  37.282 -    _tv.tv_usec = __get_time_delta_usecs();
  37.283 -    if ( (lost = (jiffies - wall_jiffies)) != 0 )
  37.284 -        _tv.tv_usec += lost * (1000000 / HZ);
  37.285 -    _tv.tv_sec   = xtime.tv_sec;
  37.286 -    _tv.tv_usec += xtime.tv_usec;
  37.287 -
  37.288 -    nsec = shadow_system_time - processed_system_time;
  37.289 -    __normalize_time(&_tv.tv_sec, &nsec);
  37.290 -    _tv.tv_usec += (long)nsec / 1000L;
  37.291 -
  37.292 -    if ( unlikely(!TIME_VALUES_UP_TO_DATE) )
  37.293 -    {
  37.294 -        /*
  37.295 -         * We may have blocked for a long time, rendering our calculations
  37.296 -         * invalid (e.g. the time delta may have overflowed). Detect that
  37.297 -         * and recalculate with fresh values.
  37.298 -         */
  37.299 -        read_unlock_irqrestore(&xtime_lock, flags);
  37.300 -        write_lock_irqsave(&xtime_lock, flags);
  37.301 -        __get_time_values_from_xen();
  37.302 -        write_unlock_irqrestore(&xtime_lock, flags);
  37.303 -        goto again;
  37.304 -    }
  37.305 -
  37.306 -    HANDLE_USEC_OVERFLOW(_tv);
  37.307 -
  37.308 -    /* Ensure that time-of-day is monotonically increasing. */
  37.309 -    if ( (_tv.tv_sec < last_seen_tv.tv_sec) ||
  37.310 -         ((_tv.tv_sec == last_seen_tv.tv_sec) &&
  37.311 -          (_tv.tv_usec < last_seen_tv.tv_usec)) )
  37.312 -        _tv = last_seen_tv;
  37.313 -    last_seen_tv = _tv;
  37.314 -
  37.315 -    read_unlock_irqrestore(&xtime_lock, flags);
  37.316 -
  37.317 -    *tv = _tv;
  37.318 -}
  37.319 -
  37.320 -
  37.321 -/*
  37.322 - * Sets the current time-of-day based on passed-in UTC timeval parameter.
  37.323 - */
  37.324 -void do_settimeofday(struct timeval *tv)
  37.325 -{
  37.326 -    struct timeval newtv;
  37.327 -    s64            nsec;
  37.328 -    suseconds_t    usec;
  37.329 -    
  37.330 -    if ( !INDEPENDENT_WALLCLOCK() )
  37.331 -        return;
  37.332 -    
  37.333 -    write_lock_irq(&xtime_lock);
  37.334 -    
  37.335 -    /*
  37.336 -     * Ensure we don't get blocked for a long time so that our time delta
  37.337 -     * overflows. If that were to happen then our shadow time values would
  37.338 -     * be stale, so we can retry with fresh ones.
  37.339 -     */
  37.340 - again:
  37.341 -    usec = tv->tv_usec - __get_time_delta_usecs();
  37.342 -
  37.343 -    nsec = shadow_system_time - processed_system_time;
  37.344 -    __normalize_time(&tv->tv_sec, &nsec);
  37.345 -    usec -= (long)nsec / 1000L;
  37.346 -
  37.347 -    if ( unlikely(!TIME_VALUES_UP_TO_DATE) )
  37.348 -    {
  37.349 -        __get_time_values_from_xen();
  37.350 -        goto again;
  37.351 -    }
  37.352 -    tv->tv_usec = usec;
  37.353 -    
  37.354 -    HANDLE_USEC_UNDERFLOW(*tv);
  37.355 -    
  37.356 -    newtv = *tv;
  37.357 -    
  37.358 -    tv->tv_usec -= (jiffies - wall_jiffies) * (1000000 / HZ);
  37.359 -    HANDLE_USEC_UNDERFLOW(*tv);
  37.360 -
  37.361 -    xtime = *tv;
  37.362 -    time_adjust = 0;  /* stop active adjtime() */
  37.363 -    time_status |= STA_UNSYNC;
  37.364 -    time_maxerror = NTP_PHASE_LIMIT;
  37.365 -    time_esterror = NTP_PHASE_LIMIT;
  37.366 -
  37.367 -    /* Reset all our running time counts. They make no sense now. */
  37.368 -    last_seen_tv.tv_sec = 0;
  37.369 -    last_update_from_xen = 0;
  37.370 -
  37.371 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  37.372 -    if ( xen_start_info.flags & SIF_INITDOMAIN )
  37.373 -    {
  37.374 -        dom0_op_t op;
  37.375 -        last_update_to_rtc = last_update_to_xen = 0;
  37.376 -        op.cmd = DOM0_SETTIME;
  37.377 -        op.u.settime.secs        = newtv.tv_sec;
  37.378 -        op.u.settime.usecs       = newtv.tv_usec;
  37.379 -        op.u.settime.system_time = shadow_system_time;
  37.380 -        write_unlock_irq(&xtime_lock);
  37.381 -        HYPERVISOR_dom0_op(&op);
  37.382 -    }
  37.383 -    else
  37.384 -#endif
  37.385 -    {
  37.386 -        write_unlock_irq(&xtime_lock);
  37.387 -    }
  37.388 -}
  37.389 -
  37.390 -
  37.391 -asmlinkage long sys_stime(int *tptr)
  37.392 -{
  37.393 -    int value;
  37.394 -    struct timeval tv;
  37.395 -
  37.396 -    if ( !capable(CAP_SYS_TIME) )
  37.397 -        return -EPERM;
  37.398 -
  37.399 -    if ( get_user(value, tptr) )
  37.400 -        return -EFAULT;
  37.401 -
  37.402 -    tv.tv_sec  = value;
  37.403 -    tv.tv_usec = 0;
  37.404 -
  37.405 -    do_settimeofday(&tv);
  37.406 -
  37.407 -    return 0;
  37.408 -}
  37.409 -
  37.410 -
  37.411 -/* Convert jiffies to system time. Call with xtime_lock held for reading. */
  37.412 -static inline u64 __jiffies_to_st(unsigned long j) 
  37.413 -{
  37.414 -    return processed_system_time + ((j - jiffies) * NS_PER_TICK);
  37.415 -}
  37.416 -
  37.417 -
  37.418 -static inline void do_timer_interrupt(int irq, void *dev_id,
  37.419 -                                      struct pt_regs *regs)
  37.420 -{
  37.421 -    s64 delta;
  37.422 -    unsigned long ticks = 0;
  37.423 -    long sec_diff;
  37.424 -
  37.425 -    do {
  37.426 -        __get_time_values_from_xen();
  37.427 -        
  37.428 -        delta = (s64)(shadow_system_time + 
  37.429 -                      ((s64)__get_time_delta_usecs() * 1000LL) -
  37.430 -                      processed_system_time);
  37.431 -    }
  37.432 -    while ( !TIME_VALUES_UP_TO_DATE );
  37.433 -
  37.434 -    if ( unlikely(delta < 0) )
  37.435 -    {
  37.436 -        printk("Timer ISR: Time went backwards: %lld\n", delta);
  37.437 -        return;
  37.438 -    }
  37.439 -
  37.440 -    /* Process elapsed jiffies since last call. */
  37.441 -    while ( delta >= NS_PER_TICK )
  37.442 -    {
  37.443 -        ticks++;
  37.444 -        delta -= NS_PER_TICK;
  37.445 -        processed_system_time += NS_PER_TICK;
  37.446 -    }
  37.447 -
  37.448 -    if ( ticks != 0 )
  37.449 -    {
  37.450 -        do_timer_ticks(ticks);
  37.451 -
  37.452 -        if ( user_mode(regs) )
  37.453 -            update_process_times_us(ticks, 0);
  37.454 -        else
  37.455 -            update_process_times_us(0, ticks);
  37.456 -    }
  37.457 -
  37.458 -    /*
  37.459 -     * Take synchronised time from Xen once a minute if we're not
  37.460 -     * synchronised ourselves, and we haven't chosen to keep an independent
  37.461 -     * time base.
  37.462 -     */
  37.463 -    if ( !INDEPENDENT_WALLCLOCK() &&
  37.464 -         ((time_status & STA_UNSYNC) != 0) &&
  37.465 -         (xtime.tv_sec > (last_update_from_xen + 60)) )
  37.466 -    {
  37.467 -        /* Adjust shadow timeval for jiffies that haven't updated xtime yet. */
  37.468 -        shadow_tv.tv_usec -= (jiffies - wall_jiffies) * (1000000/HZ);
  37.469 -        HANDLE_USEC_UNDERFLOW(shadow_tv);
  37.470 -
  37.471 -        /*
  37.472 -         * Reset our running time counts if they are invalidated by a warp
  37.473 -         * backwards of more than 500ms.
  37.474 -         */
  37.475 -        sec_diff = xtime.tv_sec - shadow_tv.tv_sec;
  37.476 -        if ( unlikely(abs(sec_diff) > 1) ||
  37.477 -             unlikely(((sec_diff * 1000000) + 
  37.478 -                       xtime.tv_usec - shadow_tv.tv_usec) > 500000) )
  37.479 -        {
  37.480 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  37.481 -            last_update_to_rtc = last_update_to_xen = 0;
  37.482 -#endif
  37.483 -            last_seen_tv.tv_sec = 0;
  37.484 -        }
  37.485 -
  37.486 -        /* Update our unsynchronised xtime appropriately. */
  37.487 -        xtime = shadow_tv;
  37.488 -
  37.489 -        last_update_from_xen = xtime.tv_sec;
  37.490 -    }
  37.491 -
  37.492 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  37.493 -    if ( (xen_start_info.flags & SIF_INITDOMAIN) &&
  37.494 -         ((time_status & STA_UNSYNC) == 0) )
  37.495 -    {
  37.496 -        /* Send synchronised time to Xen approximately every minute. */
  37.497 -        if ( xtime.tv_sec > (last_update_to_xen + 60) )
  37.498 -        {
  37.499 -            dom0_op_t op;
  37.500 -            struct timeval tv = xtime;
  37.501 -
  37.502 -            tv.tv_usec += (jiffies - wall_jiffies) * (1000000/HZ);
  37.503 -            HANDLE_USEC_OVERFLOW(tv);
  37.504 -
  37.505 -            op.cmd = DOM0_SETTIME;
  37.506 -            op.u.settime.secs        = tv.tv_sec;
  37.507 -            op.u.settime.usecs       = tv.tv_usec;
  37.508 -            op.u.settime.system_time = shadow_system_time;
  37.509 -            HYPERVISOR_dom0_op(&op);
  37.510 -
  37.511 -            last_update_to_xen = xtime.tv_sec;
  37.512 -        }
  37.513 -
  37.514 -        /*
  37.515 -         * If we have an externally synchronized Linux clock, then update CMOS
  37.516 -         * clock accordingly every ~11 minutes. Set_rtc_mmss() has to be called
  37.517 -         * as close as possible to 500 ms before the new second starts.
  37.518 -         */
  37.519 -        if ( (xtime.tv_sec > (last_update_to_rtc + 660)) &&
  37.520 -             (xtime.tv_usec >= (500000 - ((unsigned) tick) / 2)) &&
  37.521 -             (xtime.tv_usec <= (500000 + ((unsigned) tick) / 2)) )
  37.522 -        {
  37.523 -            if ( set_rtc_mmss(xtime.tv_sec) == 0 )
  37.524 -                last_update_to_rtc = xtime.tv_sec;
  37.525 -            else
  37.526 -                last_update_to_rtc = xtime.tv_sec - 600;
  37.527 -        }
  37.528 -    }
  37.529 -#endif
  37.530 -}
  37.531 -
  37.532 -
  37.533 -static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  37.534 -{
  37.535 -    write_lock(&xtime_lock);
  37.536 -    do_timer_interrupt(irq, NULL, regs);
  37.537 -    write_unlock(&xtime_lock);
  37.538 -}
  37.539 -
  37.540 -static struct irqaction irq_timer = {
  37.541 -    timer_interrupt, 
  37.542 -    SA_INTERRUPT, 
  37.543 -    0, 
  37.544 -    "timer", 
  37.545 -    NULL, 
  37.546 -    NULL
  37.547 -};
  37.548 -
  37.549 -
  37.550 -/*
  37.551 - * This function works out when the the next timer function has to be
  37.552 - * executed (by looking at the timer list) and sets the Xen one-shot
  37.553 - * domain timer to the appropriate value. This is typically called in
  37.554 - * cpu_idle() before the domain blocks.
  37.555 - * 
  37.556 - * The function returns a non-0 value on error conditions.
  37.557 - * 
  37.558 - * It must be called with interrupts disabled.
  37.559 - */
  37.560 -extern spinlock_t timerlist_lock;
  37.561 -int set_timeout_timer(void)
  37.562 -{
  37.563 -    struct timer_list *timer;
  37.564 -    u64 alarm = 0;
  37.565 -    int ret = 0;
  37.566 -
  37.567 -    spin_lock(&timerlist_lock);
  37.568 -
  37.569 -    /*
  37.570 -     * This is safe against long blocking (since calculations are not based on 
  37.571 -     * TSC deltas). It is also safe against warped system time since
  37.572 -     * suspend-resume is cooperative and we would first get locked out. It is 
  37.573 -     * safe against normal updates of jiffies since interrupts are off.
  37.574 -     */
  37.575 -    if ( (timer = next_timer_event()) != NULL )
  37.576 -        alarm = __jiffies_to_st(timer->expires);
  37.577 -
  37.578 -    /* Tasks on the timer task queue expect to be executed on the next tick. */
  37.579 -    if ( TQ_ACTIVE(tq_timer) )
  37.580 -        alarm = __jiffies_to_st(jiffies + 1);
  37.581 -
  37.582 -    /* Failure is pretty bad, but we'd best soldier on. */
  37.583 -    if ( HYPERVISOR_set_timer_op(alarm) != 0 )
  37.584 -        ret = -1;
  37.585 -    
  37.586 -    spin_unlock(&timerlist_lock);
  37.587 -
  37.588 -    return ret;
  37.589 -}
  37.590 -
  37.591 -
  37.592 -/* Time debugging. */
  37.593 -static void dbg_time_int(int irq, void *dev_id, struct pt_regs *ptregs)
  37.594 -{
  37.595 -    unsigned long flags, j;
  37.596 -    u64 s_now, j_st;
  37.597 -    struct timeval s_tv, tv;
  37.598 -
  37.599 -    struct timer_list *timer;
  37.600 -    u64 t_st;
  37.601 -
  37.602 -    read_lock_irqsave(&xtime_lock, flags);
  37.603 -    s_tv.tv_sec  = shadow_tv.tv_sec;
  37.604 -    s_tv.tv_usec = shadow_tv.tv_usec;
  37.605 -    s_now        = shadow_system_time;
  37.606 -    read_unlock_irqrestore(&xtime_lock, flags);
  37.607 -
  37.608 -    do_gettimeofday(&tv);
  37.609 -
  37.610 -    j = jiffies;
  37.611 -    j_st = __jiffies_to_st(j);
  37.612 -
  37.613 -    timer = next_timer_event();
  37.614 -    t_st = __jiffies_to_st(timer->expires);
  37.615 -
  37.616 -    printk(KERN_ALERT "time: shadow_st=0x%X:%08X\n",
  37.617 -           (u32)(s_now>>32), (u32)s_now);
  37.618 -    printk(KERN_ALERT "time: wct=%lds %ldus shadow_wct=%lds %ldus\n",
  37.619 -           tv.tv_sec, tv.tv_usec, s_tv.tv_sec, s_tv.tv_usec);
  37.620 -    printk(KERN_ALERT "time: jiffies=%lu(0x%X:%08X) timeout=%lu(0x%X:%08X)\n",
  37.621 -           jiffies,(u32)(j_st>>32), (u32)j_st,
  37.622 -           timer->expires,(u32)(t_st>>32), (u32)t_st);
  37.623 -    printk(KERN_ALERT "time: processed_system_time=0x%X:%08X\n",
  37.624 -           (u32)(processed_system_time>>32), (u32)processed_system_time);
  37.625 -
  37.626 -#ifdef CONFIG_MAGIC_SYSRQ
  37.627 -    handle_sysrq('t',NULL,NULL,NULL);
  37.628 -#endif
  37.629 -}
  37.630 -
  37.631 -static struct irqaction dbg_time = {
  37.632 -    dbg_time_int, 
  37.633 -    SA_SHIRQ, 
  37.634 -    0, 
  37.635 -    "timer_dbg", 
  37.636 -    &dbg_time_int,
  37.637 -    NULL
  37.638 -};
  37.639 -
  37.640 -void __init time_init(void)
  37.641 -{
  37.642 -    unsigned long long alarm;
  37.643 -    u64 __cpu_khz, __cpu_ghz, cpu_freq, scale, scale2;
  37.644 -    unsigned int cpu_ghz;
  37.645 -
  37.646 -    __cpu_khz = __cpu_ghz = cpu_freq = HYPERVISOR_shared_info->cpu_freq;
  37.647 -    do_div(__cpu_khz, 1000UL);
  37.648 -    cpu_khz = (u32)__cpu_khz;
  37.649 -    do_div(__cpu_ghz, 1000000000UL);
  37.650 -    cpu_ghz = (unsigned int)__cpu_ghz;
  37.651 -
  37.652 -    printk("Xen reported: %lu.%03lu MHz processor.\n", 
  37.653 -           cpu_khz / 1000, cpu_khz % 1000);
  37.654 -
  37.655 -    xtime.tv_sec = HYPERVISOR_shared_info->wc_sec;
  37.656 -    xtime.tv_usec = HYPERVISOR_shared_info->wc_usec;
  37.657 -    processed_system_time = shadow_system_time;
  37.658 -
  37.659 -    for ( rdtsc_bitshift = 0; cpu_ghz != 0; rdtsc_bitshift++, cpu_ghz >>= 1 )
  37.660 -        continue;
  37.661 -
  37.662 -    scale = 1000000LL << (32 + rdtsc_bitshift);
  37.663 -    do_div(scale, (u32)cpu_freq);
  37.664 -
  37.665 -    if ( (cpu_freq >> 32) != 0 )
  37.666 -    {
  37.667 -        scale2 = 1000000LL << rdtsc_bitshift;
  37.668 -        do_div(scale2, (u32)(cpu_freq>>32));
  37.669 -        scale += scale2;
  37.670 -    }
  37.671 -
  37.672 -    st_scale_f = scale & 0xffffffff;
  37.673 -    st_scale_i = scale >> 32;
  37.674 -
  37.675 -    __get_time_values_from_xen();
  37.676 -    processed_system_time = shadow_system_time;
  37.677 -
  37.678 -    time_irq  = bind_virq_to_irq(VIRQ_TIMER);
  37.679 -    debug_irq = bind_virq_to_irq(VIRQ_DEBUG);
  37.680 -
  37.681 -    (void)setup_irq(time_irq, &irq_timer);
  37.682 -    (void)setup_irq(debug_irq, &dbg_time);
  37.683 -
  37.684 -    rdtscll(alarm);
  37.685 -}
  37.686 -
  37.687 -void time_suspend(void)
  37.688 -{
  37.689 -}
  37.690 -
  37.691 -void time_resume(void)
  37.692 -{
  37.693 -    unsigned long flags;
  37.694 -    write_lock_irqsave(&xtime_lock, flags);
  37.695 -    /* Get timebases for new environment. */ 
  37.696 -    __get_time_values_from_xen();
  37.697 -    /* Reset our own concept of passage of system time. */
  37.698 -    processed_system_time = shadow_system_time;
  37.699 -    /* Accept a warp in UTC (wall-clock) time. */
  37.700 -    last_seen_tv.tv_sec = 0;
  37.701 -    /* Make sure we resync UTC time with Xen on next timer interrupt. */
  37.702 -    last_update_from_xen = 0;
  37.703 -    write_unlock_irqrestore(&xtime_lock, flags);
  37.704 -}
  37.705 -
  37.706 -/*
  37.707 - * /proc/sys/xen: This really belongs in another file. It can stay here for
  37.708 - * now however.
  37.709 - */
  37.710 -static ctl_table xen_subtable[] = {
  37.711 -    {1, "independent_wallclock", &independent_wallclock,
  37.712 -     sizeof(independent_wallclock), 0644, NULL, proc_dointvec},
  37.713 -    {0}
  37.714 -};
  37.715 -static ctl_table xen_table[] = {
  37.716 -    {123, "xen", NULL, 0, 0555, xen_subtable},
  37.717 -    {0}
  37.718 -};
  37.719 -static int __init xen_sysctl_init(void)
  37.720 -{
  37.721 -    (void)register_sysctl_table(xen_table, 0);
  37.722 -    return 0;
  37.723 -}
  37.724 -__initcall(xen_sysctl_init);
    38.1 --- a/linux-2.4.30-xen-sparse/arch/xen/kernel/traps.c	Fri Jul 29 11:52:33 2005 -0700
    38.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.3 @@ -1,619 +0,0 @@
    38.4 -/*
    38.5 - *  linux/arch/i386/traps.c
    38.6 - *
    38.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    38.8 - *
    38.9 - *  Pentium III FXSR, SSE support
   38.10 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   38.11 - */
   38.12 -
   38.13 -/*
   38.14 - * 'Traps.c' handles hardware traps and faults after we have saved some
   38.15 - * state in 'asm.s'.
   38.16 - */
   38.17 -#include <linux/config.h>
   38.18 -#include <linux/sched.h>
   38.19 -#include <linux/kernel.h>
   38.20 -#include <linux/string.h>
   38.21 -#include <linux/errno.h>
   38.22 -#include <linux/ptrace.h>
   38.23 -#include <linux/timer.h>
   38.24 -#include <linux/mm.h>
   38.25 -#include <linux/init.h>
   38.26 -#include <linux/delay.h>
   38.27 -#include <linux/spinlock.h>
   38.28 -#include <linux/interrupt.h>
   38.29 -#include <linux/highmem.h>
   38.30 -
   38.31 -#include <asm/system.h>
   38.32 -#include <asm/uaccess.h>
   38.33 -#include <asm/io.h>
   38.34 -#include <asm/atomic.h>
   38.35 -#include <asm/debugreg.h>
   38.36 -#include <asm/desc.h>
   38.37 -#include <asm/i387.h>
   38.38 -
   38.39 -#include <asm/smp.h>
   38.40 -#include <asm/pgalloc.h>
   38.41 -
   38.42 -#include <asm/hypervisor.h>
   38.43 -
   38.44 -#include <linux/irq.h>
   38.45 -#include <linux/module.h>
   38.46 -
   38.47 -asmlinkage int system_call(void);
   38.48 -asmlinkage void lcall7(void);
   38.49 -asmlinkage void lcall27(void);
   38.50 -
   38.51 -asmlinkage void divide_error(void);
   38.52 -asmlinkage void debug(void);
   38.53 -asmlinkage void int3(void);
   38.54 -asmlinkage void overflow(void);
   38.55 -asmlinkage void bounds(void);
   38.56 -asmlinkage void invalid_op(void);
   38.57 -asmlinkage void device_not_available(void);
   38.58 -asmlinkage void double_fault(void);
   38.59 -asmlinkage void coprocessor_segment_overrun(void);
   38.60 -asmlinkage void invalid_TSS(void);
   38.61 -asmlinkage void segment_not_present(void);
   38.62 -asmlinkage void stack_segment(void);
   38.63 -asmlinkage void general_protection(void);
   38.64 -asmlinkage void page_fault(void);
   38.65 -asmlinkage void coprocessor_error(void);
   38.66 -asmlinkage void simd_coprocessor_error(void);
   38.67 -asmlinkage void alignment_check(void);
   38.68 -asmlinkage void fixup_4gb_segment(void);
   38.69 -asmlinkage void machine_check(void);
   38.70 -
   38.71 -int kstack_depth_to_print = 24;
   38.72 -
   38.73 -
   38.74 -/*
   38.75 - * If the address is either in the .text section of the
   38.76 - * kernel, or in the vmalloc'ed module regions, it *may* 
   38.77 - * be the address of a calling routine
   38.78 - */
   38.79 -
   38.80 -#ifdef CONFIG_MODULES
   38.81 -
   38.82 -extern struct module *module_list;
   38.83 -extern struct module kernel_module;
   38.84 -
   38.85 -static inline int kernel_text_address(unsigned long addr)
   38.86 -{
   38.87 -	int retval = 0;
   38.88 -	struct module *mod;
   38.89 -
   38.90 -	if (addr >= (unsigned long) &_stext &&
   38.91 -	    addr <= (unsigned long) &_etext)
   38.92 -		return 1;
   38.93 -
   38.94 -	for (mod = module_list; mod != &kernel_module; mod = mod->next) {
   38.95 -		/* mod_bound tests for addr being inside the vmalloc'ed
   38.96 -		 * module area. Of course it'd be better to test only
   38.97 -		 * for the .text subset... */
   38.98 -		if (mod_bound(addr, 0, mod)) {
   38.99 -			retval = 1;
  38.100 -			break;
  38.101 -		}
  38.102 -	}
  38.103 -
  38.104 -	return retval;
  38.105 -}
  38.106 -
  38.107 -#else
  38.108 -
  38.109 -static inline int kernel_text_address(unsigned long addr)
  38.110 -{
  38.111 -	return (addr >= (unsigned long) &_stext &&
  38.112 -		addr <= (unsigned long) &_etext);
  38.113 -}
  38.114 -
  38.115 -#endif
  38.116 -
  38.117 -void show_trace(unsigned long * stack)
  38.118 -{
  38.119 -	int i;
  38.120 -	unsigned long addr;
  38.121 -
  38.122 -	if (!stack)
  38.123 -		stack = (unsigned long*)&stack;
  38.124 -
  38.125 -	printk("Call Trace: ");
  38.126 -	i = 1;
  38.127 -	while (((long) stack & (THREAD_SIZE-1)) != 0) {
  38.128 -		addr = *stack++;
  38.129 -		if (kernel_text_address(addr)) {
  38.130 -			if (i && ((i % 6) == 0))
  38.131 -				printk("\n   ");
  38.132 -			printk("[<%08lx>] ", addr);
  38.133 -			i++;
  38.134 -		}
  38.135 -	}
  38.136 -	printk("\n");
  38.137 -}
  38.138 -
  38.139 -void show_trace_task(struct task_struct *tsk)
  38.140 -{
  38.141 -	unsigned long esp = tsk->thread.esp;
  38.142 -
  38.143 -	/* User space on another CPU? */
  38.144 -	if ((esp ^ (unsigned long)tsk) & (PAGE_MASK<<1))
  38.145 -		return;
  38.146 -	show_trace((unsigned long *)esp);
  38.147 -}
  38.148 -
  38.149 -void show_stack(unsigned long * esp)
  38.150 -{
  38.151 -	unsigned long *stack;
  38.152 -	int i;
  38.153 -
  38.154 -	// debugging aid: "show_stack(NULL);" prints the
  38.155 -	// back trace for this cpu.
  38.156 -
  38.157 -	if(esp==NULL)
  38.158 -		esp=(unsigned long*)&esp;
  38.159 -
  38.160 -	stack = esp;
  38.161 -	for(i=0; i < kstack_depth_to_print; i++) {
  38.162 -		if (((long) stack & (THREAD_SIZE-1)) == 0)
  38.163 -			break;
  38.164 -		if (i && ((i % 8) == 0))
  38.165 -			printk("\n       ");
  38.166 -		printk("%08lx ", *stack++);
  38.167 -	}
  38.168 -	printk("\n");
  38.169 -	show_trace(esp);
  38.170 -}
  38.171 -
  38.172 -void show_registers(struct pt_regs *regs)
  38.173 -{
  38.174 -	int in_kernel = 1;
  38.175 -	unsigned long esp;
  38.176 -	unsigned short ss;
  38.177 -
  38.178 -	esp = (unsigned long) (&regs->esp);
  38.179 -	ss = __KERNEL_DS;
  38.180 -	if (regs->xcs & 2) {
  38.181 -		in_kernel = 0;
  38.182 -		esp = regs->esp;
  38.183 -		ss = regs->xss & 0xffff;
  38.184 -	}
  38.185 -	printk(KERN_ALERT "CPU:    %d\n", smp_processor_id() );
  38.186 -	printk(KERN_ALERT "EIP:    %04x:[<%08lx>]    %s\n",
  38.187 -	       0xffff & regs->xcs, regs->eip, print_tainted());
  38.188 -	printk(KERN_ALERT "EFLAGS: %08lx\n",regs->eflags);
  38.189 -	printk(KERN_ALERT "eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
  38.190 -		regs->eax, regs->ebx, regs->ecx, regs->edx);
  38.191 -	printk(KERN_ALERT "esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
  38.192 -		regs->esi, regs->edi, regs->ebp, esp);
  38.193 -	printk(KERN_ALERT "ds: %04x   es: %04x   ss: %04x\n",
  38.194 -		regs->xds & 0xffff, regs->xes & 0xffff, ss);
  38.195 -	printk(KERN_ALERT "Process %s (pid: %d, stackpage=%08lx)",
  38.196 -		current->comm, current->pid, 4096+(unsigned long)current);
  38.197 -	/*
  38.198 -	 * When in-kernel, we also print out the stack and code at the
  38.199 -	 * time of the fault..
  38.200 -	 */
  38.201 -	if (in_kernel) {
  38.202 -
  38.203 -		printk(KERN_ALERT "\nStack: ");
  38.204 -		show_stack((unsigned long*)esp);
  38.205 -
  38.206 -#if 0
  38.207 -                {
  38.208 -                        int i;
  38.209 -			printk(KERN_ALERT "\nCode: ");
  38.210 -			if(regs->eip < PAGE_OFFSET)
  38.211 -			        goto bad;
  38.212 -
  38.213 -			for(i=0;i<20;i++)
  38.214 -			{
  38.215 -			        unsigned char c;
  38.216 -			        if(__get_user(c, &((unsigned char*)regs->eip)[i])) {
  38.217 -bad:
  38.218 -				        printk(KERN_ALERT " Bad EIP value.");
  38.219 -					break;
  38.220 -				}
  38.221 -				printk("%02x ", c);
  38.222 -			}
  38.223 -		}
  38.224 -#endif
  38.225 -	}
  38.226 -	printk(KERN_ALERT "\n");
  38.227 -}	
  38.228 -
  38.229 -spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
  38.230 -
  38.231 -void die(const char * str, struct pt_regs * regs, long err)
  38.232 -{
  38.233 -	console_verbose();
  38.234 -	spin_lock_irq(&die_lock);
  38.235 -	bust_spinlocks(1);
  38.236 -	printk("%s: %04lx\n&quo