WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Update to Linux 2.6.16-rc1-git4.

# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 2494b4e00cbb9089aec4125e78baa534aceeb14b
# Parent  da62972434955d84e8f72fea7eee9fd342a5204a
Update to Linux 2.6.16-rc1-git4.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r da6297243495 -r 2494b4e00cbb buildconfigs/Rules.mk
--- a/buildconfigs/Rules.mk     Thu Feb  2 18:15:22 2006
+++ b/buildconfigs/Rules.mk     Thu Feb  2 19:16:38 2006
@@ -26,12 +26,19 @@
 # Setup Linux search path
 LINUX_SRC_PATH ?= .:..
 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
+vpath patch-%.bz2 $(LINUX_SRC_PATH)
 
 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 
2,$(subst ., ,$*))
 linux-%.tar.bz2:
        @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
        wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
+
+patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 
2,$(subst ., ,$(*F)))
+patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, 
,$(*F))),snapshots,testing)
+patch-%.bz2:
+       @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
+       wget 
$(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
 
 # Expand NetBSD release to NetBSD version
 NETBSD_RELEASE  ?= 2.0
diff -r da6297243495 -r 2494b4e00cbb buildconfigs/linux-defconfig_xen0_x86_32
--- a/buildconfigs/linux-defconfig_xen0_x86_32  Thu Feb  2 18:15:22 2006
+++ b/buildconfigs/linux-defconfig_xen0_x86_32  Thu Feb  2 19:16:38 2006
@@ -1,16 +1,16 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xen0
-# Wed Feb  1 15:54:13 2006
+# Linux kernel version: 2.6.16-rc1-git4-xen0
+# Thu Feb  2 18:19:17 2006
 #
 CONFIG_X86_32=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_X86=y
 CONFIG_MMU=y
-CONFIG_UID16=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -32,17 +32,19 @@
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -51,8 +53,10 @@
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -115,6 +119,7 @@
 # CONFIG_MWINCHIP2 is not set
 # CONFIG_MWINCHIP3D is not set
 # CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
 # CONFIG_MCYRIXIII is not set
 # CONFIG_MVIAC3_2 is not set
 # CONFIG_X86_GENERIC is not set
@@ -153,10 +158,9 @@
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 # CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
 CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -172,6 +176,7 @@
 CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 
 #
@@ -285,6 +290,7 @@
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NETFILTER_XTABLES is not set
 
 #
 # IP: Netfilter Configuration
@@ -301,51 +307,6 @@
 # CONFIG_IP_NF_AMANDA is not set
 # CONFIG_IP_NF_PPTP is not set
 # CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-# CONFIG_IP_NF_MATCH_LIMIT is not set
-CONFIG_IP_NF_MATCH_IPRANGE=m
-# CONFIG_IP_NF_MATCH_MAC is not set
-# CONFIG_IP_NF_MATCH_PKTTYPE is not set
-# CONFIG_IP_NF_MATCH_MARK is not set
-# CONFIG_IP_NF_MATCH_MULTIPORT is not set
-# CONFIG_IP_NF_MATCH_TOS is not set
-# CONFIG_IP_NF_MATCH_RECENT is not set
-# CONFIG_IP_NF_MATCH_ECN is not set
-# CONFIG_IP_NF_MATCH_DSCP is not set
-# CONFIG_IP_NF_MATCH_AH_ESP is not set
-# CONFIG_IP_NF_MATCH_LENGTH is not set
-# CONFIG_IP_NF_MATCH_TTL is not set
-# CONFIG_IP_NF_MATCH_TCPMSS is not set
-# CONFIG_IP_NF_MATCH_HELPER is not set
-# CONFIG_IP_NF_MATCH_STATE is not set
-# CONFIG_IP_NF_MATCH_CONNTRACK is not set
-# CONFIG_IP_NF_MATCH_OWNER is not set
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
-# CONFIG_IP_NF_MATCH_REALM is not set
-# CONFIG_IP_NF_MATCH_SCTP is not set
-# CONFIG_IP_NF_MATCH_DCCP is not set
-# CONFIG_IP_NF_MATCH_COMMENT is not set
-# CONFIG_IP_NF_MATCH_CONNBYTES is not set
-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
-# CONFIG_IP_NF_MATCH_STRING is not set
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-# CONFIG_IP_NF_TARGET_LOG is not set
-# CONFIG_IP_NF_TARGET_ULOG is not set
-# CONFIG_IP_NF_TARGET_TCPMSS is not set
-# CONFIG_IP_NF_TARGET_NFQUEUE is not set
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-# CONFIG_IP_NF_TARGET_REDIRECT is not set
-# CONFIG_IP_NF_TARGET_NETMAP is not set
-# CONFIG_IP_NF_TARGET_SAME is not set
-# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_RAW is not set
-# CONFIG_IP_NF_ARPTABLES is not set
 
 #
 # Bridge: Netfilter Configuration
@@ -361,6 +322,11 @@
 # SCTP Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 CONFIG_BRIDGE=y
 # CONFIG_VLAN_8021Q is not set
@@ -564,6 +530,7 @@
 # CONFIG_SCSI_ADVANSYS is not set
 CONFIG_MEGARAID_NEWGEN=y
 # CONFIG_MEGARAID_MM is not set
+# CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 CONFIG_SCSI_SATA=y
 # CONFIG_SCSI_SATA_AHCI is not set
@@ -592,13 +559,7 @@
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=y
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-# CONFIG_SCSI_QLA2300 is not set
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA24XX is not set
+# CONFIG_SCSI_QLA_FC is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
@@ -721,12 +682,14 @@
 # CONFIG_DL2K is not set
 CONFIG_E1000=y
 # CONFIG_E1000_NAPI is not set
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SIS190 is not set
 # CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
 CONFIG_SK98LIN=y
 # CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=y
@@ -884,6 +847,7 @@
 # CONFIG_DRM_VIA is not set
 # CONFIG_DRM_SAVAGE is not set
 # CONFIG_MWAVE is not set
+# CONFIG_CS5535_GPIO is not set
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_HPET is not set
 # CONFIG_HANGCHECK_TIMER is not set
@@ -898,6 +862,12 @@
 # I2C support
 #
 # CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
 
 #
 # Dallas's 1-wire bus
@@ -988,12 +958,14 @@
 # may also be needed; see USB_STORAGE Help for more information
 #
 # CONFIG_USB_STORAGE is not set
+# CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
 # CONFIG_USB_AIPTEK is not set
@@ -1007,6 +979,7 @@
 # CONFIG_USB_YEALINK is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
 # CONFIG_USB_KEYSPAN_REMOTE is not set
 # CONFIG_USB_APPLETOUCH is not set
 
@@ -1082,6 +1055,11 @@
 #
 # SN Devices
 #
+
+#
+# EDAC - error detection and reporting (RAS)
+#
+# CONFIG_EDAC is not set
 
 #
 # File systems
@@ -1103,6 +1081,7 @@
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
@@ -1141,6 +1120,7 @@
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -1246,12 +1226,13 @@
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
@@ -1261,11 +1242,13 @@
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_EARLY_PRINTK=y
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUG_RODATA is not set
 # CONFIG_4KSTACKS is not set
 CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
@@ -1293,6 +1276,7 @@
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
 # CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
 # CONFIG_CRYPTO_AES_586 is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
@@ -1344,3 +1328,4 @@
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_X86_BIOS_REBOOT=y
+CONFIG_KTIME_SCALAR=y
diff -r da6297243495 -r 2494b4e00cbb buildconfigs/linux-defconfig_xen0_x86_64
--- a/buildconfigs/linux-defconfig_xen0_x86_64  Thu Feb  2 18:15:22 2006
+++ b/buildconfigs/linux-defconfig_xen0_x86_64  Thu Feb  2 19:16:38 2006
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xen0
-# Wed Feb  1 15:50:08 2006
+# Linux kernel version: 2.6.16-rc1-git4
+# Thu Feb  2 17:51:17 2006
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -15,6 +15,7 @@
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -36,17 +37,19 @@
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -55,8 +58,10 @@
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -90,6 +95,8 @@
 #
 # Processor type and features
 #
+CONFIG_X86_PC=y
+# CONFIG_X86_VSMP is not set
 # CONFIG_MK8 is not set
 # CONFIG_MPSC is not set
 CONFIG_GENERIC_CPU=y
@@ -107,6 +114,7 @@
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -116,9 +124,8 @@
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_SWIOTLB=y
-CONFIG_DUMMY_IOMMU=y
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 CONFIG_SECCOMP=y
 # CONFIG_HZ_100 is not set
@@ -173,7 +180,6 @@
 # CONFIG_IA32_AOUT is not set
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
 
 #
 # Networking
@@ -220,6 +226,7 @@
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NETFILTER_XTABLES is not set
 
 #
 # IP: Netfilter Configuration
@@ -236,51 +243,6 @@
 # CONFIG_IP_NF_AMANDA is not set
 # CONFIG_IP_NF_PPTP is not set
 # CONFIG_IP_NF_QUEUE is not set
-CONFIG_IP_NF_IPTABLES=m
-# CONFIG_IP_NF_MATCH_LIMIT is not set
-CONFIG_IP_NF_MATCH_IPRANGE=m
-# CONFIG_IP_NF_MATCH_MAC is not set
-# CONFIG_IP_NF_MATCH_PKTTYPE is not set
-# CONFIG_IP_NF_MATCH_MARK is not set
-# CONFIG_IP_NF_MATCH_MULTIPORT is not set
-# CONFIG_IP_NF_MATCH_TOS is not set
-# CONFIG_IP_NF_MATCH_RECENT is not set
-# CONFIG_IP_NF_MATCH_ECN is not set
-# CONFIG_IP_NF_MATCH_DSCP is not set
-# CONFIG_IP_NF_MATCH_AH_ESP is not set
-# CONFIG_IP_NF_MATCH_LENGTH is not set
-# CONFIG_IP_NF_MATCH_TTL is not set
-# CONFIG_IP_NF_MATCH_TCPMSS is not set
-# CONFIG_IP_NF_MATCH_HELPER is not set
-# CONFIG_IP_NF_MATCH_STATE is not set
-# CONFIG_IP_NF_MATCH_CONNTRACK is not set
-# CONFIG_IP_NF_MATCH_OWNER is not set
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
-# CONFIG_IP_NF_MATCH_REALM is not set
-# CONFIG_IP_NF_MATCH_SCTP is not set
-# CONFIG_IP_NF_MATCH_DCCP is not set
-# CONFIG_IP_NF_MATCH_COMMENT is not set
-# CONFIG_IP_NF_MATCH_CONNBYTES is not set
-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
-# CONFIG_IP_NF_MATCH_STRING is not set
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-# CONFIG_IP_NF_TARGET_LOG is not set
-# CONFIG_IP_NF_TARGET_ULOG is not set
-# CONFIG_IP_NF_TARGET_TCPMSS is not set
-# CONFIG_IP_NF_TARGET_NFQUEUE is not set
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-# CONFIG_IP_NF_TARGET_REDIRECT is not set
-# CONFIG_IP_NF_TARGET_NETMAP is not set
-# CONFIG_IP_NF_TARGET_SAME is not set
-# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
-CONFIG_IP_NF_NAT_FTP=m
-# CONFIG_IP_NF_MANGLE is not set
-# CONFIG_IP_NF_RAW is not set
-# CONFIG_IP_NF_ARPTABLES is not set
 
 #
 # Bridge: Netfilter Configuration
@@ -296,6 +258,11 @@
 # SCTP Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 CONFIG_BRIDGE=y
 # CONFIG_VLAN_8021Q is not set
@@ -499,6 +466,7 @@
 # CONFIG_SCSI_ADVANSYS is not set
 CONFIG_MEGARAID_NEWGEN=y
 # CONFIG_MEGARAID_MM is not set
+# CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_SAS is not set
 CONFIG_SCSI_SATA=y
 # CONFIG_SCSI_SATA_AHCI is not set
@@ -531,13 +499,7 @@
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=y
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-# CONFIG_SCSI_QLA2300 is not set
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA24XX is not set
+# CONFIG_SCSI_QLA_FC is not set
 # CONFIG_SCSI_LPFC is not set
 # CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
@@ -659,12 +621,14 @@
 # CONFIG_DL2K is not set
 CONFIG_E1000=y
 # CONFIG_E1000_NAPI is not set
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_SIS190 is not set
 # CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
 CONFIG_SK98LIN=y
 # CONFIG_VIA_VELOCITY is not set
 CONFIG_TIGON3=y
@@ -825,6 +789,12 @@
 # CONFIG_I2C is not set
 
 #
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
 # Dallas's 1-wire bus
 #
 # CONFIG_W1 is not set
@@ -913,12 +883,14 @@
 # may also be needed; see USB_STORAGE Help for more information
 #
 # CONFIG_USB_STORAGE is not set
+# CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
 # CONFIG_USB_AIPTEK is not set
@@ -932,6 +904,7 @@
 # CONFIG_USB_YEALINK is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
 # CONFIG_USB_KEYSPAN_REMOTE is not set
 # CONFIG_USB_APPLETOUCH is not set
 
@@ -1015,6 +988,11 @@
 #
 # SN Devices
 #
+
+#
+# EDAC - error detection and reporting (RAS)
+#
+# CONFIG_EDAC is not set
 
 #
 # Firmware Drivers
@@ -1042,6 +1020,7 @@
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
@@ -1080,6 +1059,7 @@
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -1186,20 +1166,23 @@
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
 CONFIG_LOG_BUF_SHIFT=15
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_INIT_DEBUG is not set
+# CONFIG_DEBUG_RODATA is not set
 
 #
 # Security options
@@ -1224,6 +1207,7 @@
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
 # CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
 # CONFIG_CRYPTO_AES_X86_64 is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
diff -r da6297243495 -r 2494b4e00cbb buildconfigs/linux-defconfig_xenU_x86_32
--- a/buildconfigs/linux-defconfig_xenU_x86_32  Thu Feb  2 18:15:22 2006
+++ b/buildconfigs/linux-defconfig_xenU_x86_32  Thu Feb  2 19:16:38 2006
@@ -1,16 +1,16 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xenU
-# Wed Feb  1 17:28:35 2006
+# Linux kernel version: 2.6.16-rc1-git4-xenU
+# Thu Feb  2 18:28:58 2006
 #
 CONFIG_X86_32=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_X86=y
 CONFIG_MMU=y
-CONFIG_UID16=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -31,18 +31,20 @@
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -51,8 +53,10 @@
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -116,6 +120,7 @@
 # CONFIG_MWINCHIP2 is not set
 # CONFIG_MWINCHIP3D is not set
 # CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
 # CONFIG_MCYRIXIII is not set
 # CONFIG_MVIAC3_2 is not set
 # CONFIG_X86_GENERIC is not set
@@ -152,10 +157,9 @@
 # CONFIG_DELL_RBU is not set
 # CONFIG_DCDBAS is not set
 # CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
 CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -170,6 +174,7 @@
 CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 CONFIG_HOTPLUG_CPU=y
 
@@ -223,6 +228,11 @@
 # SCTP Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
 # CONFIG_ATM is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_VLAN_8021Q is not set
@@ -370,6 +380,11 @@
 #
 # SN Devices
 #
+
+#
+# EDAC - error detection and reporting (RAS)
+#
+# CONFIG_EDAC is not set
 
 #
 # File systems
@@ -391,6 +406,7 @@
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
 # CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
@@ -429,6 +445,7 @@
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -529,12 +546,13 @@
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
@@ -544,11 +562,13 @@
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_EARLY_PRINTK=y
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUG_RODATA is not set
 # CONFIG_4KSTACKS is not set
 
 #
@@ -574,6 +594,7 @@
 # CONFIG_CRYPTO_BLOWFISH is not set
 # CONFIG_CRYPTO_TWOFISH is not set
 # CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
 # CONFIG_CRYPTO_AES_586 is not set
 # CONFIG_CRYPTO_CAST5 is not set
 # CONFIG_CRYPTO_CAST6 is not set
@@ -622,3 +643,4 @@
 CONFIG_X86_SMP=y
 CONFIG_X86_BIOS_REBOOT=y
 CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
diff -r da6297243495 -r 2494b4e00cbb buildconfigs/linux-defconfig_xenU_x86_64
--- a/buildconfigs/linux-defconfig_xenU_x86_64  Thu Feb  2 18:15:22 2006
+++ b/buildconfigs/linux-defconfig_xenU_x86_64  Thu Feb  2 19:16:38 2006
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xenU
-# Wed Feb  1 15:49:27 2006
+# Linux kernel version: 2.6.16-rc1-git4
+# Thu Feb  2 17:50:11 2006
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -15,6 +15,7 @@
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -37,18 +38,20 @@
 CONFIG_SYSCTL=y
 CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -57,8 +60,10 @@
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -93,6 +98,8 @@
 #
 # Processor type and features
 #
+CONFIG_X86_PC=y
+# CONFIG_X86_VSMP is not set
 # CONFIG_MK8 is not set
 CONFIG_MPSC=y
 # CONFIG_GENERIC_CPU is not set
@@ -109,6 +116,7 @@
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -118,10 +126,9 @@
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_NR_CPUS=8
 # CONFIG_HOTPLUG_CPU is not set
-CONFIG_DUMMY_IOMMU=y
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 CONFIG_SECCOMP=y
 # CONFIG_HZ_100 is not set
@@ -148,7 +155,6 @@
 # CONFIG_IA32_AOUT is not set
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
 
 #
 # Networking
@@ -243,6 +249,7 @@
 # Core Netfilter Configuration
 #
 # CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NETFILTER_XTABLES is not set
 
 #
 # IP: Netfilter Configuration
@@ -259,91 +266,11 @@
 CONFIG_IP_NF_AMANDA=m
 # CONFIG_IP_NF_PPTP is not set
 CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-# CONFIG_IP_NF_MATCH_DCCP is not set
-CONFIG_IP_NF_MATCH_COMMENT=m
-# CONFIG_IP_NF_MATCH_CONNBYTES is not set
-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
-# CONFIG_IP_NF_MATCH_STRING is not set
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-# CONFIG_IP_NF_TARGET_NFQUEUE is not set
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-# CONFIG_IP_NF_TARGET_TTL is not set
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
 
 #
 # IPv6: Netfilter Configuration (EXPERIMENTAL)
 #
 # CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-# CONFIG_IP6_NF_TARGET_REJECT is not set
-# CONFIG_IP6_NF_TARGET_NFQUEUE is not set
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-# CONFIG_IP6_NF_TARGET_HL is not set
-CONFIG_IP6_NF_RAW=m
 
 #
 # Bridge: Netfilter Configuration
@@ -383,6 +310,11 @@
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
 CONFIG_ATM=m
 CONFIG_ATM_CLIP=m
 # CONFIG_ATM_CLIP_NO_ICMP is not set
@@ -696,6 +628,11 @@
 #
 # SN Devices
 #
+
+#
+# EDAC - error detection and reporting (RAS)
+#
+# CONFIG_EDAC is not set
 
 #
 # Firmware Drivers
@@ -736,6 +673,7 @@
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 # CONFIG_XFS_RT is not set
+# CONFIG_OCFS2_FS is not set
 CONFIG_MINIX_FS=m
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
@@ -778,6 +716,7 @@
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 # CONFIG_RELAYFS_FS is not set
+# CONFIG_CONFIGFS_FS is not set
 
 #
 # Miscellaneous filesystems
@@ -857,6 +796,7 @@
 CONFIG_SGI_PARTITION=y
 # CONFIG_ULTRIX_PARTITION is not set
 CONFIG_SUN_PARTITION=y
+# CONFIG_KARMA_PARTITION is not set
 CONFIG_EFI_PARTITION=y
 
 #
@@ -913,20 +853,23 @@
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
 CONFIG_LOG_BUF_SHIFT=15
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_INIT_DEBUG is not set
+# CONFIG_DEBUG_RODATA is not set
 
 #
 # Security options
@@ -951,6 +894,7 @@
 CONFIG_CRYPTO_BLOWFISH=m
 CONFIG_CRYPTO_TWOFISH=m
 CONFIG_CRYPTO_SERPENT=m
+# CONFIG_CRYPTO_AES is not set
 # CONFIG_CRYPTO_AES_X86_64 is not set
 CONFIG_CRYPTO_CAST5=m
 CONFIG_CRYPTO_CAST6=m
diff -r da6297243495 -r 2494b4e00cbb buildconfigs/linux-defconfig_xen_x86_32
--- a/buildconfigs/linux-defconfig_xen_x86_32   Thu Feb  2 18:15:22 2006
+++ b/buildconfigs/linux-defconfig_xen_x86_32   Thu Feb  2 19:16:38 2006
@@ -1,16 +1,16 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xen
-# Wed Feb  1 17:28:24 2006
+# Linux kernel version: 2.6.16-rc1-git4-xen
+# Thu Feb  2 18:43:06 2006
 #
 CONFIG_X86_32=y
 CONFIG_SEMAPHORE_SLEEPERS=y
 CONFIG_X86=y
 CONFIG_MMU=y
-CONFIG_UID16=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -34,18 +34,20 @@
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_EMBEDDED=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -54,8 +56,11 @@
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+CONFIG_OBSOLETE_INTERMODULE=m
 
 #
 # Loadable module support
@@ -119,6 +124,7 @@
 # CONFIG_MWINCHIP2 is not set
 # CONFIG_MWINCHIP3D is not set
 # CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
 # CONFIG_MCYRIXIII is not set
 # CONFIG_MVIAC3_2 is not set
 # CONFIG_X86_GENERIC is not set
@@ -158,10 +164,9 @@
 CONFIG_DELL_RBU=m
 CONFIG_DCDBAS=m
 # CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
 CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
 # CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -177,8 +182,8 @@
 CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
-# CONFIG_CRASH_DUMP is not set
 CONFIG_HOTPLUG_CPU=y
 
 #
@@ -244,6 +249,11 @@
 # PC-card bridges
 #
 CONFIG_YENTA=m
+CONFIG_YENTA_O2=y
+CONFIG_YENTA_RICOH=y
+CONFIG_YENTA_TI=y
+CONFIG_YENTA_ENE_TUNE=y
+CONFIG_YENTA_TOSHIBA=y
 CONFIG_PD6729=m
 CONFIG_I82092=m
 CONFIG_PCCARD_NONSTATIC=m
@@ -313,6 +323,7 @@
 # TCP congestion control
 #
 CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=m
 CONFIG_TCP_CONG_WESTWOOD=m
 CONFIG_TCP_CONG_HTCP=m
 CONFIG_TCP_CONG_HSTCP=m
@@ -370,6 +381,29 @@
 CONFIG_NETFILTER_NETLINK=m
 CONFIG_NETFILTER_NETLINK_QUEUE=m
 CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
 #
 # IP: Netfilter Configuration
@@ -388,40 +422,23 @@
 CONFIG_IP_NF_PPTP=m
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
 CONFIG_IP_NF_MATCH_MULTIPORT=m
 CONFIG_IP_NF_MATCH_TOS=m
 CONFIG_IP_NF_MATCH_RECENT=m
 CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_DSCP=m
 CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
 CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_DCCP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNBYTES=m
 CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_MATCH_STRING=m
+CONFIG_IP_NF_MATCH_POLICY=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
 CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_TARGET_NFQUEUE=m
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -438,13 +455,9 @@
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CONNMARK=m
 CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
@@ -454,26 +467,20 @@
 #
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
 CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_FRAG=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_MULTIPORT=m
 CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
 CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
 CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
+CONFIG_IP6_NF_MATCH_POLICY=m
 CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_LOG=m
 CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_TARGET_NFQUEUE=m
 CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
 CONFIG_IP6_NF_TARGET_HL=m
 CONFIG_IP6_NF_RAW=m
 
@@ -533,6 +540,19 @@
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+CONFIG_TIPC=m
+CONFIG_TIPC_ADVANCED=y
+CONFIG_TIPC_ZONES=3
+CONFIG_TIPC_CLUSTERS=1
+CONFIG_TIPC_NODES=255
+CONFIG_TIPC_SLAVE_NODES=0
+CONFIG_TIPC_PORTS=8191
+CONFIG_TIPC_LOG=0
+# CONFIG_TIPC_DEBUG is not set
 CONFIG_ATM=y
 CONFIG_ATM_CLIP=y
 # CONFIG_ATM_CLIP_NO_ICMP is not set
@@ -828,6 +848,8 @@
 CONFIG_MTD_PMC551=m
 # CONFIG_MTD_PMC551_BUGFIX is not set
 # CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_DATAFLASH=m
+CONFIG_MTD_M25P80=m
 CONFIG_MTD_SLRAM=m
 CONFIG_MTD_PHRAM=m
 CONFIG_MTD_MTDRAM=m
@@ -1075,6 +1097,7 @@
 CONFIG_MEGARAID_NEWGEN=y
 CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
+CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
 CONFIG_SCSI_SATA=m
 CONFIG_SCSI_SATA_AHCI=m
@@ -1114,13 +1137,8 @@
 CONFIG_SCSI_QLOGIC_FC=m
 CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
 CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
+CONFIG_SCSI_QLA_FC=m
+# CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE is not set
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 CONFIG_SCSI_DC390T=m
@@ -1197,15 +1215,13 @@
 CONFIG_IEEE1394_ETH1394=m
 CONFIG_IEEE1394_DV1394=m
 CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
 
 #
 # I2O device support
 #
 CONFIG_I2O=m
+CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
 CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
 CONFIG_I2O_CONFIG=m
 CONFIG_I2O_CONFIG_OLD_IOCTL=y
 CONFIG_I2O_BUS=m
@@ -1315,6 +1331,7 @@
 CONFIG_DL2K=m
 CONFIG_E1000=m
 # CONFIG_E1000_NAPI is not set
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_NS83820=m
 CONFIG_HAMACHI=m
 CONFIG_YELLOWFIN=m
@@ -1323,6 +1340,7 @@
 # CONFIG_R8169_VLAN is not set
 CONFIG_SIS190=m
 CONFIG_SKGE=m
+CONFIG_SKY2=m
 CONFIG_SK98LIN=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
@@ -1370,8 +1388,9 @@
 #
 CONFIG_IPW2100=m
 CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW_DEBUG is not set
+# CONFIG_IPW2100_DEBUG is not set
 CONFIG_IPW2200=m
+# CONFIG_IPW2200_DEBUG is not set
 CONFIG_HERMES=m
 CONFIG_PLX_HERMES=m
 CONFIG_TMD_HERMES=m
@@ -1703,6 +1722,7 @@
 CONFIG_JOYSTICK_TURBOGRAFX=m
 CONFIG_JOYSTICK_JOYDUMP=m
 CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=m
 CONFIG_TOUCHSCREEN_GUNZE=m
 CONFIG_TOUCHSCREEN_ELO=m
 CONFIG_TOUCHSCREEN_MTOUCH=m
@@ -1744,13 +1764,13 @@
 # CONFIG_SERIAL_8250_CS is not set
 # CONFIG_SERIAL_8250_ACPI is not set
 CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 # CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_CORE=m
-CONFIG_SERIAL_JSM=m
+# CONFIG_SERIAL_JSM is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
@@ -1799,6 +1819,7 @@
 CONFIG_W83877F_WDT=m
 CONFIG_W83977F_WDT=m
 CONFIG_MACHZ_WDT=m
+CONFIG_SBC_EPX_C3_WATCHDOG=m
 
 #
 # PCI-based Watchdog Cards
@@ -1856,6 +1877,7 @@
 CONFIG_CARDMAN_4040=m
 CONFIG_MWAVE=m
 CONFIG_SCx200_GPIO=m
+CONFIG_CS5535_GPIO=m
 CONFIG_RAW_DRIVER=m
 CONFIG_MAX_RAW_DEVS=256
 # CONFIG_HPET is not set
@@ -1927,6 +1949,23 @@
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=m
+CONFIG_SPI_BUTTERFLY=m
+
+#
+# SPI Protocol Masters
+#
 
 #
 # Dallas's 1-wire bus
@@ -1974,6 +2013,7 @@
 CONFIG_SENSORS_SMSC47M1=m
 # CONFIG_SENSORS_SMSC47B397 is not set
 CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_VT8231=m
 CONFIG_SENSORS_W83781D=m
 CONFIG_SENSORS_W83792D=m
 CONFIG_SENSORS_W83L785TS=m
@@ -2003,6 +2043,7 @@
 #
 # Video Adapters
 #
+# CONFIG_VIDEO_ADV_DEBUG is not set
 CONFIG_VIDEO_BT848=m
 # CONFIG_VIDEO_BT848_DVB is not set
 CONFIG_VIDEO_SAA6588=m
@@ -2031,6 +2072,7 @@
 CONFIG_VIDEO_HEXIUM_GEMINI=m
 CONFIG_VIDEO_CX88=m
 # CONFIG_VIDEO_CX88_DVB is not set
+CONFIG_VIDEO_CX88_ALSA=m
 CONFIG_VIDEO_EM28XX=m
 CONFIG_VIDEO_OVCAMCHIP=m
 CONFIG_VIDEO_AUDIO_DECODER=m
@@ -2066,6 +2108,7 @@
 # CONFIG_DVB_USB_DEBUG is not set
 CONFIG_DVB_USB_A800=m
 CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
 CONFIG_DVB_USB_DIBUSB_MC=m
 CONFIG_DVB_USB_UMT_010=m
 CONFIG_DVB_USB_CXUSB=m
@@ -2110,6 +2153,7 @@
 #
 CONFIG_DVB_STV0299=m
 CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
 CONFIG_DVB_TDA8083=m
 CONFIG_DVB_TDA80XX=m
 CONFIG_DVB_MT312=m
@@ -2202,7 +2246,6 @@
 CONFIG_FB_ATY=m
 CONFIG_FB_ATY_CT=y
 CONFIG_FB_ATY_GENERIC_LCD=y
-CONFIG_FB_ATY_XL_INIT=y
 CONFIG_FB_ATY_GX=y
 CONFIG_FB_SAVAGE=m
 CONFIG_FB_SAVAGE_I2C=y
@@ -2249,8 +2292,6 @@
 # Advanced Linux Sound Architecture
 #
 CONFIG_SND=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
 CONFIG_SND_HWDEP=m
@@ -2263,9 +2304,10 @@
 CONFIG_SND_SEQUENCER_OSS=y
 CONFIG_SND_RTCTIMER=m
 CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
 # CONFIG_SND_VERBOSE_PRINTK is not set
 # CONFIG_SND_DEBUG is not set
-CONFIG_SND_GENERIC_DRIVER=y
 
 #
 # Generic devices
@@ -2273,6 +2315,8 @@
 CONFIG_SND_MPU401_UART=m
 CONFIG_SND_OPL3_LIB=m
 CONFIG_SND_VX_LIB=m
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_AC97_BUS=m
 CONFIG_SND_DUMMY=m
 CONFIG_SND_VIRMIDI=m
 CONFIG_SND_MTPAV=m
@@ -2282,6 +2326,7 @@
 #
 # PCI devices
 #
+CONFIG_SND_AD1889=m
 CONFIG_SND_ALI5451=m
 CONFIG_SND_ATIIXP=m
 CONFIG_SND_ATIIXP_MODEM=m
@@ -2291,40 +2336,41 @@
 CONFIG_SND_AZT3328=m
 CONFIG_SND_BT87X=m
 # CONFIG_SND_BT87X_OVERCLOCK is not set
+CONFIG_SND_CA0106=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_CS4281=m
 CONFIG_SND_CS46XX=m
 CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
+CONFIG_SND_CS5535AUDIO=m
 CONFIG_SND_EMU10K1=m
 # CONFIG_SND_EMU10K1X is not set
-# CONFIG_SND_CA0106 is not set
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_AD1889=m
-CONFIG_SND_CMIPCI=m
 CONFIG_SND_ENS1370=m
 CONFIG_SND_ENS1371=m
 CONFIG_SND_ES1938=m
 CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
 CONFIG_SND_FM801=m
 CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_HDSPM=m
 CONFIG_SND_ICE1712=m
 CONFIG_SND_ICE1724=m
 CONFIG_SND_INTEL8X0=m
 CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_PCXHR=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
 CONFIG_SND_SONICVIBES=m
+CONFIG_SND_TRIDENT=m
 CONFIG_SND_VIA82XX=m
 # CONFIG_SND_VIA82XX_MODEM is not set
 CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_YMFPCI=m
 
 #
 # USB devices
@@ -2403,12 +2449,15 @@
 CONFIG_USB_STORAGE_SDDR09=y
 CONFIG_USB_STORAGE_SDDR55=y
 CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_STORAGE_ALAUDA=y
+CONFIG_USB_LIBUSUAL=y
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=m
 CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 CONFIG_USB_HIDDEV=y
 
@@ -2428,6 +2477,7 @@
 CONFIG_USB_YEALINK=m
 CONFIG_USB_XPAD=m
 CONFIG_USB_ATI_REMOTE=m
+CONFIG_USB_ATI_REMOTE2=m
 CONFIG_USB_KEYSPAN_REMOTE=m
 CONFIG_USB_APPLETOUCH=m
 
@@ -2555,6 +2605,7 @@
 CONFIG_USB_ATM=m
 CONFIG_USB_SPEEDTOUCH=m
 CONFIG_USB_CXACRU=m
+CONFIG_USB_UEAGLEATM=m
 CONFIG_USB_XUSBATM=m
 
 #
@@ -2592,6 +2643,24 @@
 #
 # SN Devices
 #
+
+#
+# EDAC - error detection and reporting (RAS)
+#
+CONFIG_EDAC=m
+
+#
+# Reporting subsystems
+#
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_AMD76X=m
+CONFIG_EDAC_E7XXX=m
+CONFIG_EDAC_E752X=m
+CONFIG_EDAC_I82875P=m
+CONFIG_EDAC_I82860=m
+CONFIG_EDAC_R82600=m
+CONFIG_EDAC_POLL=y
 
 #
 # File systems
@@ -2625,6 +2694,7 @@
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 CONFIG_XFS_RT=y
+CONFIG_OCFS2_FS=m
 CONFIG_MINIX_FS=m
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
@@ -2669,6 +2739,7 @@
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 CONFIG_RELAYFS_FS=m
+CONFIG_CONFIGFS_FS=m
 
 #
 # Miscellaneous filesystems
@@ -2769,6 +2840,7 @@
 CONFIG_SGI_PARTITION=y
 CONFIG_ULTRIX_PARTITION=y
 CONFIG_SUN_PARTITION=y
+CONFIG_KARMA_PARTITION=y
 CONFIG_EFI_PARTITION=y
 
 #
@@ -2824,12 +2896,13 @@
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
@@ -2839,11 +2912,13 @@
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 # CONFIG_FRAME_POINTER is not set
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_EARLY_PRINTK is not set
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_DEBUG_RODATA is not set
 # CONFIG_4KSTACKS is not set
 CONFIG_X86_FIND_SMP_CONFIG=y
 CONFIG_X86_MPPARSE=y
@@ -2945,3 +3020,4 @@
 CONFIG_X86_SMP=y
 CONFIG_X86_BIOS_REBOOT=y
 CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
diff -r da6297243495 -r 2494b4e00cbb buildconfigs/linux-defconfig_xen_x86_64
--- a/buildconfigs/linux-defconfig_xen_x86_64   Thu Feb  2 18:15:22 2006
+++ b/buildconfigs/linux-defconfig_xen_x86_64   Thu Feb  2 19:16:38 2006
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-xen
-# Wed Feb  1 15:51:35 2006
+# Linux kernel version: 2.6.16-rc1-git4
+# Thu Feb  2 17:54:57 2006
 #
 CONFIG_X86_64=y
 CONFIG_64BIT=y
@@ -15,6 +15,7 @@
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
 
 #
 # Code maturity level options
@@ -37,18 +38,20 @@
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_VM86=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
+CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -57,8 +60,11 @@
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+CONFIG_OBSOLETE_INTERMODULE=m
 
 #
 # Loadable module support
@@ -93,6 +99,8 @@
 #
 # Processor type and features
 #
+CONFIG_X86_PC=y
+# CONFIG_X86_VSMP is not set
 # CONFIG_MK8 is not set
 # CONFIG_MPSC is not set
 CONFIG_GENERIC_CPU=y
@@ -111,6 +119,7 @@
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_BKL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_SELECT_MEMORY_MODEL=y
 CONFIG_FLATMEM_MANUAL=y
@@ -120,11 +129,10 @@
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4096
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_NR_CPUS=8
 # CONFIG_HOTPLUG_CPU is not set
 CONFIG_SWIOTLB=y
-CONFIG_DUMMY_IOMMU=y
+# CONFIG_CRASH_DUMP is not set
 CONFIG_PHYSICAL_START=0x100000
 CONFIG_SECCOMP=y
 # CONFIG_HZ_100 is not set
@@ -180,7 +188,6 @@
 # CONFIG_IA32_AOUT is not set
 CONFIG_COMPAT=y
 CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
 
 #
 # Networking
@@ -228,6 +235,7 @@
 # TCP congestion control
 #
 CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=m
 CONFIG_TCP_CONG_WESTWOOD=m
 CONFIG_TCP_CONG_HTCP=m
 CONFIG_TCP_CONG_HSTCP=m
@@ -285,6 +293,29 @@
 CONFIG_NETFILTER_NETLINK=m
 CONFIG_NETFILTER_NETLINK_QUEUE=m
 CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
 
 #
 # IP: Netfilter Configuration
@@ -303,40 +334,23 @@
 CONFIG_IP_NF_PPTP=m
 CONFIG_IP_NF_QUEUE=m
 CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
 CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
 CONFIG_IP_NF_MATCH_MULTIPORT=m
 CONFIG_IP_NF_MATCH_TOS=m
 CONFIG_IP_NF_MATCH_RECENT=m
 CONFIG_IP_NF_MATCH_ECN=m
 CONFIG_IP_NF_MATCH_DSCP=m
 CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
 CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
 CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
 CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_DCCP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNBYTES=m
 CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_MATCH_STRING=m
+CONFIG_IP_NF_MATCH_POLICY=m
 CONFIG_IP_NF_FILTER=m
 CONFIG_IP_NF_TARGET_REJECT=m
 CONFIG_IP_NF_TARGET_LOG=m
 CONFIG_IP_NF_TARGET_ULOG=m
 CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_TARGET_NFQUEUE=m
 CONFIG_IP_NF_NAT=m
 CONFIG_IP_NF_NAT_NEEDED=y
 CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -353,13 +367,9 @@
 CONFIG_IP_NF_TARGET_TOS=m
 CONFIG_IP_NF_TARGET_ECN=m
 CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
 CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CONNMARK=m
 CONFIG_IP_NF_TARGET_CLUSTERIP=m
 CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
 CONFIG_IP_NF_ARPTABLES=m
 CONFIG_IP_NF_ARPFILTER=m
 CONFIG_IP_NF_ARP_MANGLE=m
@@ -369,26 +379,20 @@
 #
 CONFIG_IP6_NF_QUEUE=m
 CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
 CONFIG_IP6_NF_MATCH_RT=m
 CONFIG_IP6_NF_MATCH_OPTS=m
 CONFIG_IP6_NF_MATCH_FRAG=m
 CONFIG_IP6_NF_MATCH_HL=m
 CONFIG_IP6_NF_MATCH_MULTIPORT=m
 CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
 CONFIG_IP6_NF_MATCH_IPV6HEADER=m
 CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
 CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
+CONFIG_IP6_NF_MATCH_POLICY=m
 CONFIG_IP6_NF_FILTER=m
 CONFIG_IP6_NF_TARGET_LOG=m
 CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_TARGET_NFQUEUE=m
 CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
 CONFIG_IP6_NF_TARGET_HL=m
 CONFIG_IP6_NF_RAW=m
 
@@ -443,6 +447,13 @@
 # CONFIG_SCTP_HMAC_NONE is not set
 # CONFIG_SCTP_HMAC_SHA1 is not set
 CONFIG_SCTP_HMAC_MD5=y
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+CONFIG_TIPC=m
+# CONFIG_TIPC_ADVANCED is not set
+# CONFIG_TIPC_DEBUG is not set
 CONFIG_ATM=m
 CONFIG_ATM_CLIP=m
 # CONFIG_ATM_CLIP_NO_ICMP is not set
@@ -708,6 +719,8 @@
 CONFIG_MTD_PMC551=m
 # CONFIG_MTD_PMC551_BUGFIX is not set
 # CONFIG_MTD_PMC551_DEBUG is not set
+CONFIG_MTD_DATAFLASH=m
+CONFIG_MTD_M25P80=m
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_PHRAM is not set
 CONFIG_MTD_MTDRAM=m
@@ -939,6 +952,7 @@
 CONFIG_MEGARAID_NEWGEN=y
 CONFIG_MEGARAID_MM=m
 CONFIG_MEGARAID_MAILBOX=m
+CONFIG_MEGARAID_LEGACY=m
 CONFIG_MEGARAID_SAS=m
 CONFIG_SCSI_SATA=y
 CONFIG_SCSI_SATA_AHCI=m
@@ -979,13 +993,8 @@
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=y
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
+CONFIG_SCSI_QLA_FC=m
+# CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE is not set
 CONFIG_SCSI_LPFC=m
 CONFIG_SCSI_DC395x=m
 CONFIG_SCSI_DC390T=m
@@ -1052,13 +1061,12 @@
 CONFIG_IEEE1394_ETH1394=m
 CONFIG_IEEE1394_DV1394=m
 CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
 
 #
 # I2O device support
 #
 CONFIG_I2O=m
+CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
 CONFIG_I2O_EXT_ADAPTEC=y
 CONFIG_I2O_EXT_ADAPTEC_DMA64=y
 CONFIG_I2O_CONFIG=m
@@ -1161,6 +1169,7 @@
 CONFIG_DL2K=m
 CONFIG_E1000=m
 CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
 CONFIG_NS83820=m
 CONFIG_HAMACHI=m
 CONFIG_YELLOWFIN=m
@@ -1169,6 +1178,7 @@
 CONFIG_R8169_VLAN=y
 CONFIG_SIS190=m
 CONFIG_SKGE=m
+CONFIG_SKY2=m
 CONFIG_SK98LIN=m
 CONFIG_VIA_VELOCITY=m
 CONFIG_TIGON3=m
@@ -1208,8 +1218,9 @@
 #
 CONFIG_IPW2100=m
 CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW_DEBUG is not set
+# CONFIG_IPW2100_DEBUG is not set
 CONFIG_IPW2200=m
+# CONFIG_IPW2200_DEBUG is not set
 CONFIG_AIRO=m
 CONFIG_HERMES=m
 CONFIG_PLX_HERMES=m
@@ -1461,6 +1472,7 @@
 CONFIG_JOYSTICK_TURBOGRAFX=m
 CONFIG_JOYSTICK_JOYDUMP=m
 CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=m
 CONFIG_TOUCHSCREEN_GUNZE=m
 CONFIG_TOUCHSCREEN_ELO=m
 CONFIG_TOUCHSCREEN_MTOUCH=m
@@ -1548,6 +1560,7 @@
 CONFIG_W83877F_WDT=m
 CONFIG_W83977F_WDT=m
 CONFIG_MACHZ_WDT=m
+CONFIG_SBC_EPX_C3_WATCHDOG=m
 
 #
 # PCI-based Watchdog Cards
@@ -1647,6 +1660,23 @@
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=m
+CONFIG_SPI_BUTTERFLY=m
+
+#
+# SPI Protocol Masters
+#
 
 #
 # Dallas's 1-wire bus
@@ -1694,6 +1724,7 @@
 CONFIG_SENSORS_SMSC47M1=m
 CONFIG_SENSORS_SMSC47B397=m
 CONFIG_SENSORS_VIA686A=m
+CONFIG_SENSORS_VT8231=m
 CONFIG_SENSORS_W83781D=m
 CONFIG_SENSORS_W83792D=m
 CONFIG_SENSORS_W83L785TS=m
@@ -1723,6 +1754,7 @@
 #
 # Video Adapters
 #
+# CONFIG_VIDEO_ADV_DEBUG is not set
 CONFIG_VIDEO_BT848=m
 # CONFIG_VIDEO_BT848_DVB is not set
 CONFIG_VIDEO_SAA6588=m
@@ -1753,6 +1785,7 @@
 CONFIG_VIDEO_HEXIUM_GEMINI=m
 CONFIG_VIDEO_CX88=m
 CONFIG_VIDEO_CX88_DVB=m
+CONFIG_VIDEO_CX88_ALSA=m
 CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y
 CONFIG_VIDEO_EM28XX=m
 CONFIG_VIDEO_OVCAMCHIP=m
@@ -1789,6 +1822,7 @@
 # CONFIG_DVB_USB_DEBUG is not set
 CONFIG_DVB_USB_A800=m
 CONFIG_DVB_USB_DIBUSB_MB=m
+# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
 CONFIG_DVB_USB_DIBUSB_MC=m
 CONFIG_DVB_USB_UMT_010=m
 CONFIG_DVB_USB_CXUSB=m
@@ -1838,6 +1872,7 @@
 #
 CONFIG_DVB_STV0299=m
 CONFIG_DVB_CX24110=m
+CONFIG_DVB_CX24123=m
 CONFIG_DVB_TDA8083=m
 CONFIG_DVB_TDA80XX=m
 CONFIG_DVB_MT312=m
@@ -1925,7 +1960,6 @@
 CONFIG_FB_ATY=m
 CONFIG_FB_ATY_CT=y
 CONFIG_FB_ATY_GENERIC_LCD=y
-# CONFIG_FB_ATY_XL_INIT is not set
 CONFIG_FB_ATY_GX=y
 CONFIG_FB_SAVAGE=m
 CONFIG_FB_SAVAGE_I2C=y
@@ -1936,7 +1970,6 @@
 CONFIG_FB_3DFX=m
 CONFIG_FB_3DFX_ACCEL=y
 CONFIG_FB_VOODOO1=m
-CONFIG_FB_CYBLA=m
 CONFIG_FB_TRIDENT=m
 CONFIG_FB_TRIDENT_ACCEL=y
 # CONFIG_FB_PM3 is not set
@@ -1976,8 +2009,6 @@
 # Advanced Linux Sound Architecture
 #
 CONFIG_SND=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
 CONFIG_SND_HWDEP=m
@@ -1990,9 +2021,10 @@
 CONFIG_SND_SEQUENCER_OSS=y
 CONFIG_SND_RTCTIMER=m
 CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
 # CONFIG_SND_VERBOSE_PRINTK is not set
 # CONFIG_SND_DEBUG is not set
-CONFIG_SND_GENERIC_DRIVER=y
 
 #
 # Generic devices
@@ -2000,6 +2032,8 @@
 CONFIG_SND_MPU401_UART=m
 CONFIG_SND_OPL3_LIB=m
 CONFIG_SND_VX_LIB=m
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_AC97_BUS=m
 CONFIG_SND_DUMMY=m
 CONFIG_SND_VIRMIDI=m
 CONFIG_SND_MTPAV=m
@@ -2009,6 +2043,8 @@
 #
 # PCI devices
 #
+CONFIG_SND_AD1889=m
+CONFIG_SND_ALS4000=m
 CONFIG_SND_ALI5451=m
 CONFIG_SND_ATIIXP=m
 CONFIG_SND_ATIIXP_MODEM=m
@@ -2018,41 +2054,40 @@
 CONFIG_SND_AZT3328=m
 CONFIG_SND_BT87X=m
 # CONFIG_SND_BT87X_OVERCLOCK is not set
+CONFIG_SND_CA0106=m
+CONFIG_SND_CMIPCI=m
+CONFIG_SND_CS4281=m
 CONFIG_SND_CS46XX=m
 CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
 CONFIG_SND_EMU10K1=m
 CONFIG_SND_EMU10K1X=m
-CONFIG_SND_CA0106=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
 CONFIG_SND_ENS1370=m
 CONFIG_SND_ENS1371=m
 CONFIG_SND_ES1938=m
 CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
 CONFIG_SND_FM801=m
 CONFIG_SND_FM801_TEA575X=m
+CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_HDSP=m
+CONFIG_SND_HDSPM=m
 CONFIG_SND_ICE1712=m
 CONFIG_SND_ICE1724=m
 CONFIG_SND_INTEL8X0=m
 CONFIG_SND_INTEL8X0M=m
+CONFIG_SND_KORG1212=m
+CONFIG_SND_MAESTRO3=m
+CONFIG_SND_MIXART=m
+CONFIG_SND_NM256=m
+CONFIG_SND_PCXHR=m
+CONFIG_SND_RME32=m
+CONFIG_SND_RME96=m
+CONFIG_SND_RME9652=m
 CONFIG_SND_SONICVIBES=m
+CONFIG_SND_TRIDENT=m
 CONFIG_SND_VIA82XX=m
 CONFIG_SND_VIA82XX_MODEM=m
 CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
+CONFIG_SND_YMFPCI=m
 
 #
 # USB devices
@@ -2119,12 +2154,15 @@
 CONFIG_USB_STORAGE_SDDR09=y
 CONFIG_USB_STORAGE_SDDR55=y
 CONFIG_USB_STORAGE_JUMPSHOT=y
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
 #
 CONFIG_USB_HID=y
 CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 CONFIG_HID_FF=y
 CONFIG_HID_PID=y
 CONFIG_LOGITECH_FF=y
@@ -2141,6 +2179,7 @@
 CONFIG_USB_YEALINK=m
 CONFIG_USB_XPAD=m
 CONFIG_USB_ATI_REMOTE=m
+CONFIG_USB_ATI_REMOTE2=m
 CONFIG_USB_KEYSPAN_REMOTE=m
 CONFIG_USB_APPLETOUCH=m
 
@@ -2267,6 +2306,7 @@
 CONFIG_USB_ATM=m
 CONFIG_USB_SPEEDTOUCH=m
 CONFIG_USB_CXACRU=m
+CONFIG_USB_UEAGLEATM=m
 CONFIG_USB_XUSBATM=m
 
 #
@@ -2297,6 +2337,24 @@
 #
 # SN Devices
 #
+
+#
+# EDAC - error detection and reporting (RAS)
+#
+CONFIG_EDAC=m
+
+#
+# Reporting subsystems
+#
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_AMD76X=m
+CONFIG_EDAC_E7XXX=m
+CONFIG_EDAC_E752X=m
+CONFIG_EDAC_I82875P=m
+CONFIG_EDAC_I82860=m
+CONFIG_EDAC_R82600=m
+CONFIG_EDAC_POLL=y
 
 #
 # Firmware Drivers
@@ -2338,6 +2396,7 @@
 CONFIG_XFS_SECURITY=y
 CONFIG_XFS_POSIX_ACL=y
 # CONFIG_XFS_RT is not set
+CONFIG_OCFS2_FS=m
 CONFIG_MINIX_FS=m
 CONFIG_ROMFS_FS=m
 CONFIG_INOTIFY=y
@@ -2380,6 +2439,7 @@
 # CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 CONFIG_RELAYFS_FS=m
+CONFIG_CONFIGFS_FS=m
 
 #
 # Miscellaneous filesystems
@@ -2469,6 +2529,7 @@
 CONFIG_SGI_PARTITION=y
 # CONFIG_ULTRIX_PARTITION is not set
 CONFIG_SUN_PARTITION=y
+# CONFIG_KARMA_PARTITION is not set
 CONFIG_EFI_PARTITION=y
 
 #
@@ -2525,20 +2586,23 @@
 # Kernel hacking
 #
 # CONFIG_PRINTK_TIME is not set
+CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
 CONFIG_LOG_BUF_SHIFT=15
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_MUTEXES is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_VM is not set
 # CONFIG_FRAME_POINTER is not set
+CONFIG_FORCED_INLINING=y
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_INIT_DEBUG is not set
+# CONFIG_DEBUG_RODATA is not set
 
 #
 # Security options
@@ -2547,6 +2611,7 @@
 CONFIG_KEYS_DEBUG_PROC_KEYS=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_NETWORK_XFRM=y
 CONFIG_SECURITY_CAPABILITIES=y
 # CONFIG_SECURITY_ROOTPLUG is not set
 # CONFIG_SECURITY_SECLVL is not set
diff -r da6297243495 -r 2494b4e00cbb buildconfigs/mk.linux-2.6-xen
--- a/buildconfigs/mk.linux-2.6-xen     Thu Feb  2 18:15:22 2006
+++ b/buildconfigs/mk.linux-2.6-xen     Thu Feb  2 19:16:38 2006
@@ -2,7 +2,7 @@
 OS           = linux
 
 LINUX_SERIES = 2.6
-LINUX_VER    = 2.6.15
+LINUX_VER    = 2.6.16-rc1-git4
 
 EXTRAVERSION ?= xen
 
@@ -19,6 +19,18 @@
            $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) 
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
        fi
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
install
+
+pristine-linux-%/.valid-pristine: override _LINUX_PDIR = linux-$*.16-rc1-git4
+pristine-linux-%.16-rc1-git4/.valid-pristine: linux-%.15.tar.bz2 
patch-%.16-rc1.bz2 patch-%.16-rc1-git4.bz2
+       rm -rf tmp-pristine-$(_LINUX_PDIR) $(@D)
+       mkdir -p tmp-pristine-$(_LINUX_PDIR)
+       tar -C tmp-pristine-$(_LINUX_PDIR) -jxf $<
+       -@rm tmp-pristine-$(_LINUX_PDIR)/pax_global_header
+       mv tmp-pristine-$(_LINUX_PDIR)/* $(@D)
+       @rm -rf tmp-pristine-$(_LINUX_PDIR)
+       bzcat $(wordlist 2,$(words $^),$^) | patch -d $(@D) -p1
+       touch $(@D)/.hgskip
+       touch $@ # update timestamp to avoid rebuild
 
 $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
        rm -rf $(LINUX_DIR)
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/arch/i386/Kconfig
--- a/linux-2.6-xen-sparse/arch/i386/Kconfig    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/Kconfig    Thu Feb  2 19:16:38 2006
@@ -29,10 +29,6 @@
 config SBUS
        bool
 
-config UID16
-       bool
-       default y
-
 config GENERIC_ISA_DMA
        bool
        default y
@@ -45,7 +41,21 @@
        bool
        default y
 
+config DMI
+       bool
+       default y
+
 source "init/Kconfig"
+
+config DOUBLEFAULT
+       default y
+       bool "Enable doublefault exception handler" if EMBEDDED
+       depends on !XEN
+       help
+          This option allows trapping of rare doublefault exceptions that
+          would otherwise cause a system to silently reboot. Disabling this
+          option saves about 4k and might cause you much additional grey
+          hair.
 
 menu "Processor type and features"
 
@@ -498,7 +508,6 @@
        depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || 
(X86_SUMMIT && ACPI))
        default n if X86_PC
        default y if (X86_NUMAQ || X86_SUMMIT)
-       select SPARSEMEM_STATIC
 
 # Need comments to help the hapless user trying to turn on NUMA support
 comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
@@ -527,6 +536,10 @@
        depends on NUMA
        default y
 
+config ARCH_FLATMEM_ENABLE
+       def_bool y
+       depends on (ARCH_SELECT_MEMORY_MODEL && X86_PC)
+
 config ARCH_DISCONTIGMEM_ENABLE
        def_bool y
        depends on NUMA
@@ -537,7 +550,8 @@
 
 config ARCH_SPARSEMEM_ENABLE
        def_bool y
-       depends on NUMA
+       depends on (NUMA || (X86_PC && EXPERIMENTAL))
+       select SPARSEMEM_STATIC
 
 config ARCH_SELECT_MEMORY_MODEL
        def_bool y
@@ -663,10 +677,6 @@
        and passes the first three arguments of a function call in registers.
        This will probably break binary only modules.
 
-       This feature is only enabled for gcc-3.0 and later - earlier compilers
-       generate incorrect output with certain kernel constructs when
-       -mregparm=3 is used.
-
 config SECCOMP
        bool "Enable seccomp to safely compute untrusted bytecode"
        depends on PROC_FS
@@ -686,17 +696,6 @@
 
 source kernel/Kconfig.hz
 
-config PHYSICAL_START
-       hex "Physical address where the kernel is loaded" if EMBEDDED
-       default "0x100000"
-       help
-         This gives the physical address where the kernel is loaded.
-         Primarily used in the case of kexec on panic where the
-         fail safe kernel needs to run at a different address than
-         the panic-ed kernel.
-
-         Don't change this unless you know what you are doing.
-
 config KEXEC
        bool "kexec system call (EXPERIMENTAL)"
        depends on EXPERIMENTAL && !X86_XEN
@@ -716,11 +715,30 @@
 
 config CRASH_DUMP
        bool "kernel crash dumps (EXPERIMENTAL)"
-       depends on EMBEDDED
        depends on EXPERIMENTAL
        depends on HIGHMEM
        help
          Generate crash dump after being started by kexec.
+
+config PHYSICAL_START
+       hex "Physical address where the kernel is loaded" if (EMBEDDED || 
CRASH_DUMP)
+
+       default "0x1000000" if CRASH_DUMP
+       default "0x100000"
+       help
+         This gives the physical address where the kernel is loaded. Normally
+         for regular kernels this value is 0x100000 (1MB). But in the case
+         of kexec on panic the fail safe kernel needs to run at a different
+         address than the panic-ed kernel. This option is used to set the load
+         address for kernels used to capture crash dump on being kexec'ed
+         after panic. The default value for crash dump kernels is
+         0x1000000 (16MB). This can also be set based on the "X" value as
+         specified in the "crashkernel=YM@XM" command line boot parameter
+         passed to the panic-ed kernel. Typically this parameter is set as
+         crashkernel=64M@16M. Please take a look at
+         Documentation/kdump/kdump.txt for more details about crash dumps.
+
+         Don't change this unless you know what you are doing.
 
 config HOTPLUG_CPU
        bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -1102,3 +1120,7 @@
        bool
        depends on X86_SMP || (X86_VOYAGER && SMP)
        default y
+
+config KTIME_SCALAR
+       bool
+       default y
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/arch/i386/Makefile
--- a/linux-2.6-xen-sparse/arch/i386/Makefile   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/Makefile   Thu Feb  2 19:16:38 2006
@@ -37,14 +37,11 @@
 # CPU-specific tuning. Anything which can be shared with UML should go here.
 include $(srctree)/arch/i386/Makefile.cpu
 
-# -mregparm=3 works ok on gcc-3.0 and later
-#
-GCC_VERSION                    := $(call cc-version)
-cflags-$(CONFIG_REGPARM)       += $(shell if [ $(GCC_VERSION) -ge 0300 ] ; 
then echo "-mregparm=3"; fi ;)
+cflags-$(CONFIG_REGPARM) += -mregparm=3
 
-# Disable unit-at-a-time mode, it makes gcc use a lot more stack
-# due to the lack of sharing of stacklots.
-CFLAGS += $(call cc-option,-fno-unit-at-a-time)
+# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
+# a lot more stack due to the lack of sharing of stacklots:
+CFLAGS                         += $(shell if [ $(call cc-version) -lt 0400 ] ; 
then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
 
 CFLAGS += $(cflags-y)
 
@@ -107,7 +104,7 @@
 boot := arch/i386/boot
 
 .PHONY: zImage bzImage compressed zlilo bzlilo \
-       zdisk bzdisk fdimage fdimage144 fdimage288 install kernel_install
+       zdisk bzdisk fdimage fdimage144 fdimage288 install
 
 ifdef CONFIG_XEN
 CPPFLAGS        := -D__KERNEL__ -Iinclude$(if $(KBUILD_SRC),2)/asm/mach-xen 
$(LINUXINCLUDE)
@@ -142,8 +139,7 @@
 fdimage fdimage144 fdimage288: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
 
-install: vmlinux
-install kernel_install:
+install:
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
 endif
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/Makefile
--- a/linux-2.6-xen-sparse/arch/i386/kernel/Makefile    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/Makefile    Thu Feb  2 19:16:38 2006
@@ -4,10 +4,10 @@
 
 extra-y := head.o init_task.o vmlinux.lds
 
-obj-y  := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
+obj-y  := process.o semaphore.o signal.o entry.o traps.o irq.o \
                ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
                pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \
-               doublefault.o quirks.o i8237.o
+               quirks.o i8237.o
 
 obj-y                          += cpu/
 obj-y                          += timers/
@@ -25,6 +25,7 @@
 obj-$(CONFIG_X86_IO_APIC)      += io_apic.o
 obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups.o
 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o crash.o
+obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
 obj-$(CONFIG_X86_NUMAQ)                += numaq.o
 obj-$(CONFIG_X86_SUMMIT_NUMA)  += summit.o
 obj-$(CONFIG_KPROBES)          += kprobes.o
@@ -33,6 +34,8 @@
 obj-$(CONFIG_ACPI_SRAT)        += srat.o
 obj-$(CONFIG_HPET_TIMER)       += time_hpet.o
 obj-$(CONFIG_EFI)              += efi.o efi_stub.o
+obj-$(CONFIG_DOUBLEFAULT)      += doublefault.o
+obj-$(CONFIG_VM86)             += vm86.o
 obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
 obj-$(CONFIG_SMP_ALTERNATIVES) += smpalts.o
 
@@ -86,7 +89,7 @@
 
 obj-y += fixup.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE)) := microcode-xen.o
-n-obj-xen := i8259.o doublefault.o timers/ reboot.o smpboot.o trampoline.o
+n-obj-xen := i8259.o timers/ reboot.o smpboot.o trampoline.o
 
 obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
 obj-y := $(call cherrypickxen, $(obj-y))
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/acpi/boot-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/acpi/boot-xen.c     Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/acpi/boot-xen.c     Thu Feb  2 
19:16:38 2006
@@ -108,7 +108,7 @@
        if (!phys_addr || !size)
                return NULL;
 
-       if (phys_addr < (end_pfn_map << PAGE_SHIFT))
+       if (phys_addr+size <= (end_pfn_map << PAGE_SHIFT) + PAGE_SIZE)
                return __va(phys_addr);
 
        return NULL;
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/apic-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/apic-xen.c  Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/apic-xen.c  Thu Feb  2 19:16:38 2006
@@ -26,6 +26,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/sysdev.h>
 #include <linux/cpu.h>
+#include <linux/module.h>
 
 #include <asm/atomic.h>
 #include <asm/smp.h>
@@ -37,8 +38,17 @@
 #include <asm/i8253.h>
 
 #include <mach_apic.h>
+#include <mach_ipi.h>
 
 #include "io_ports.h"
+
+#ifndef CONFIG_XEN
+/*
+ * cpu_mask that denotes the CPUs that needs timer interrupt coming in as
+ * IPIs in place of local APIC timers
+ */
+static cpumask_t timer_bcast_ipi;
+#endif
 
 /*
  * Knob to control our willingness to enable the local APIC.
@@ -73,6 +83,50 @@
        ack_APIC_irq();
 }
 
+#ifdef CONFIG_XEN
+void switch_APIC_timer_to_ipi(void *cpumask) { }
+EXPORT_SYMBOL(switch_APIC_timer_to_ipi);
+void switch_ipi_to_APIC_timer(void *cpumask) { }
+EXPORT_SYMBOL(switch_ipi_to_APIC_timer);
+#else
+#ifndef CONFIG_SMP
+static void up_apic_timer_interrupt_call(struct pt_regs *regs)
+{
+       int cpu = smp_processor_id();
+
+       /*
+        * the NMI deadlock-detector uses this.
+        */
+       per_cpu(irq_stat, cpu).apic_timer_irqs++;
+
+       smp_local_timer_interrupt(regs);
+}
+#endif
+
+void smp_send_timer_broadcast_ipi(struct pt_regs *regs)
+{
+       cpumask_t mask;
+
+       cpus_and(mask, cpu_online_map, timer_bcast_ipi);
+       if (!cpus_empty(mask)) {
+#ifdef CONFIG_SMP
+               send_IPI_mask(mask, LOCAL_TIMER_VECTOR);
+#else
+               /*
+                * We can directly call the apic timer interrupt handler
+                * in UP case. Minus all irq related functions
+                */
+               up_apic_timer_interrupt_call(regs);
+#endif
+       }
+}
+
+int setup_profiling_timer(unsigned int multiplier)
+{
+       return -EINVAL;
+}
+#endif
+
 /*
  * This initializes the IO-APIC and APIC hardware if this is
  * a UP kernel.
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c    Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c    Thu Feb  2 
19:16:38 2006
@@ -20,9 +20,6 @@
 #include "cpu.h"
 
 #ifndef CONFIG_XEN
-DEFINE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]);
-EXPORT_PER_CPU_SYMBOL(cpu_gdt_table);
-
 DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);
 EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack);
 #endif
@@ -212,7 +209,10 @@
 
 /* Do minimum CPU detection early.
    Fields really needed: vendor, cpuid_level, family, model, mask, cache 
alignment.
-   The others are not touched to avoid unwanted side effects. */
+   The others are not touched to avoid unwanted side effects.
+
+   WARNING: this function is only called on the BP.  Don't add code here
+   that is supposed to run on all CPUs. */
 static void __init early_cpu_detect(void)
 {
        struct cpuinfo_x86 *c = &boot_cpu_data;
@@ -244,12 +244,6 @@
                if (cap0 & (1<<19))
                        c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8;
        }
-
-       early_intel_workaround(c);
-
-#ifdef CONFIG_X86_HT
-       phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff;
-#endif
 }
 
 void __devinit generic_identify(struct cpuinfo_x86 * c)
@@ -297,6 +291,12 @@
                                get_model_name(c); /* Default name */
                }
        }
+
+       early_intel_workaround(c);
+
+#ifdef CONFIG_X86_HT
+       phys_proc_id[smp_processor_id()] = (cpuid_ebx(1) >> 24) & 0xff;
+#endif
 }
 
 static void __devinit squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
@@ -607,11 +607,6 @@
        cpu_gdt_init(&cpu_gdt_descr[cpu]);
 
        /*
-        * Delete NT
-        */
-       __asm__("pushfl ; andl $0xffffbfff,(%esp) ; popfl");
-
-       /*
         * Set up and load the per-CPU TSS and LDT
         */
        atomic_inc(&init_mm.mm_count);
@@ -624,6 +619,11 @@
 
        load_LDT(&init_mm.context);
 
+#ifdef CONFIG_DOUBLEFAULT
+       /* Set up doublefault TSS pointer in the GDT */
+       __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
+#endif
+
        /* Clear %fs and %gs. */
        asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S
--- a/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S Thu Feb  2 19:16:38 2006
@@ -392,6 +392,7 @@
 
        ALIGN
 work_notifysig_v86:
+#ifdef CONFIG_VM86
        pushl %ecx                      # save ti_flags for do_notify_resume
        call save_v86_state             # %eax contains pt_regs pointer
        popl %ecx
@@ -399,6 +400,7 @@
        xorl %edx, %edx
        call do_notify_resume
        jmp resume_userspace
+#endif
 
        # perform syscall exit tracing
        ALIGN
@@ -843,6 +845,7 @@
        pushl $do_fixup_4gb_segment
        jmp error_code
 
+.section .rodata,"a"
 #include "syscall_table.S"
 
 syscall_table_size=(.-sys_call_table)
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S
--- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S  Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S  Thu Feb  2 19:16:38 2006
@@ -161,15 +161,20 @@
        .quad 0x0000000000000000        /* 0x80 TSS descriptor */
        .quad 0x0000000000000000        /* 0x88 LDT descriptor */
 
-       /* Segments used for calling PnP BIOS */
+       /*
+        * Segments used for calling PnP BIOS have byte granularity.
+        * They code segments and data segments have fixed 64k limits,
+        * the transfer segment sizes are set at run time.
+        */
        .quad 0x0000000000000000        /* 0x90 32-bit code */
        .quad 0x0000000000000000        /* 0x98 16-bit code */
        .quad 0x0000000000000000        /* 0xa0 16-bit data */
        .quad 0x0000000000000000        /* 0xa8 16-bit data */
        .quad 0x0000000000000000        /* 0xb0 16-bit data */
+
        /*
         * The APM segments have byte granularity and their bases
-        * and limits are set at run time.
+        * are set at run time.  All have 64k limits.
         */
        .quad 0x0000000000000000        /* 0xb8 APM CS    code */
        .quad 0x0000000000000000        /* 0xc0 APM CS 16 code (16 bit) */
@@ -181,7 +186,9 @@
        .quad 0x0000000000000000        /* 0xe8 - unused */
        .quad 0x0000000000000000        /* 0xf0 - unused */
        .quad 0x0000000000000000        /* 0xf8 - GDT entry 31: double-fault 
TSS */
-       .fill GDT_ENTRIES-32,8,0
+
+       /* Be sure this is zeroed to avoid false validations in Xen */
+       .fill PAGE_SIZE_asm / 8 - GDT_ENTRIES,8,0
 
 .org 0x3000
 ENTRY(default_ldt)
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/init_task-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/init_task-xen.c     Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/init_task-xen.c     Thu Feb  2 
19:16:38 2006
@@ -45,5 +45,5 @@
  * per-CPU TSS segments. Threads are completely 'soft' on Linux,
  * no more per-task TSS's.
  */ 
-DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_maxaligned_in_smp = 
INIT_TSS;
+DEFINE_PER_CPU(struct tss_struct, init_tss) 
____cacheline_internodealigned_in_smp = INIT_TSS;
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c       Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c       Thu Feb  2 
19:16:38 2006
@@ -1701,7 +1701,7 @@
        for(apic = 0; apic < nr_ioapics; apic++) {
                int pin;
                /* See if any of the pins is in ExtINT mode */
-               for(pin = 0; pin < nr_ioapic_registers[i]; pin++) {
+               for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
                        struct IO_APIC_route_entry entry;
                        spin_lock_irqsave(&ioapic_lock, flags);
                        *(((int *)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * 
pin);
@@ -1775,8 +1775,8 @@
                entry.dest_mode       = 0; /* Physical */
                entry.delivery_mode   = dest_ExtINT; /* ExtInt */
                entry.vector          = 0;
-               entry.dest.physical.physical_dest = 0;
-
+               entry.dest.physical.physical_dest =
+                                       GET_APIC_ID(apic_read(APIC_ID));
 
                /*
                 * Add it to the IO-APIC irq-routing table:
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/ioport-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/ioport-xen.c        Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/ioport-xen.c        Thu Feb  2 
19:16:38 2006
@@ -7,6 +7,7 @@
 
 #include <linux/sched.h>
 #include <linux/kernel.h>
+#include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/ioport.h>
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c   Thu Feb  2 19:16:38 2006
@@ -19,7 +19,7 @@
 #include <linux/cpu.h>
 #include <linux/delay.h>
 
-DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_maxaligned_in_smp;
+DEFINE_PER_CPU(irq_cpustat_t, irq_stat) ____cacheline_internodealigned_in_smp;
 EXPORT_PER_CPU_SYMBOL(irq_stat);
 
 #ifndef CONFIG_X86_LOCAL_APIC
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/microcode-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/microcode-xen.c     Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/microcode-xen.c     Thu Feb  2 
19:16:38 2006
@@ -21,6 +21,7 @@
  */
 
 //#define DEBUG /* pr_debug */
+#include <linux/capability.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/sched.h>
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/mpparse-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/mpparse-xen.c       Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/mpparse-xen.c       Thu Feb  2 
19:16:38 2006
@@ -37,6 +37,12 @@
 /* Have we found an MP table */
 int smp_found_config;
 unsigned int __initdata maxcpus = NR_CPUS;
+
+#ifdef CONFIG_HOTPLUG_CPU
+#define CPU_HOTPLUG_ENABLED    (1)
+#else
+#define CPU_HOTPLUG_ENABLED    (0)
+#endif
 
 /*
  * Various Linux-internal data structures created from the
@@ -220,14 +226,18 @@
        cpu_set(num_processors, cpu_possible_map);
        num_processors++;
 
-       if ((num_processors > 8) &&
-           ((APIC_XAPIC(ver) &&
-            (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) ||
-            (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)))
-               def_to_bigsmp = 1;
-       else
-               def_to_bigsmp = 0;
-
+       if (CPU_HOTPLUG_ENABLED || (num_processors > 8)) {
+               switch (boot_cpu_data.x86_vendor) {
+               case X86_VENDOR_INTEL:
+                       if (!APIC_XAPIC(ver)) {
+                               def_to_bigsmp = 0;
+                               break;
+                       }
+                       /* If P4 and above fall through */
+               case X86_VENDOR_AMD:
+                       def_to_bigsmp = 1;
+               }
+       }
        bios_cpu_apicid[num_processors - 1] = m->mpc_apicid;
 }
 #else
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c       Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/pci-dma-xen.c       Thu Feb  2 
19:16:38 2006
@@ -17,6 +17,25 @@
 #include <xen/balloon.h>
 #include <asm/tlbflush.h>
 #include <asm/swiotlb.h>
+#include <asm/bug.h>
+
+#ifdef __x86_64__
+int iommu_merge __read_mostly = 0;
+EXPORT_SYMBOL(iommu_merge);
+
+dma_addr_t bad_dma_address __read_mostly;
+EXPORT_SYMBOL(bad_dma_address);
+
+/* This tells the BIO block layer to assume merging. Default to off
+   because we cannot guarantee merging later. */
+int iommu_bio_merge __read_mostly = 0;
+EXPORT_SYMBOL(iommu_bio_merge);
+
+__init int iommu_setup(char *p)
+{
+    return 1;
+}
+#endif
 
 struct dma_coherent_mem {
        void            *virt_base;
@@ -41,7 +60,9 @@
 {
        int i, rc;
 
-       BUG_ON(direction == DMA_NONE);
+       if (direction == DMA_NONE)
+               BUG();
+       WARN_ON(nents == 0 || sg[0].length == 0);
 
        if (swiotlb) {
                rc = swiotlb_map_sg(hwdev, sg, nents, direction);
@@ -266,7 +287,9 @@
 {
        dma_addr_t dma;
 
-       BUG_ON(direction == DMA_NONE);
+       if (direction == DMA_NONE)
+               BUG();
+       WARN_ON(size == 0);
 
        if (swiotlb) {
                dma = swiotlb_map_single(dev, ptr, size, direction);
@@ -285,7 +308,8 @@
 dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
                 enum dma_data_direction direction)
 {
-       BUG_ON(direction == DMA_NONE);
+       if (direction == DMA_NONE)
+               BUG();
        if (swiotlb)
                swiotlb_unmap_single(dev, dma_addr, size, direction);
 }
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c       Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c       Thu Feb  2 
19:16:38 2006
@@ -48,11 +48,13 @@
 #include <asm/processor.h>
 #include <asm/i387.h>
 #include <asm/desc.h>
-#include <xen/interface/physdev.h>
-#include <xen/interface/vcpu.h>
+#include <asm/vm86.h>
 #ifdef CONFIG_MATH_EMULATION
 #include <asm/math_emu.h>
 #endif
+
+#include <xen/interface/physdev.h>
+#include <xen/interface/vcpu.h>
 
 #include <linux/err.h>
 
@@ -222,9 +224,7 @@
        cr0 = read_cr0();
        cr2 = read_cr2();
        cr3 = read_cr3();
-       if (current_cpu_data.x86 > 4) {
-               cr4 = read_cr4();
-       }
+       cr4 = read_cr4_safe();
        printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, 
cr4);
        show_trace(NULL, &regs->esp);
 }
@@ -309,17 +309,7 @@
 
 void release_thread(struct task_struct *dead_task)
 {
-       if (dead_task->mm) {
-               // temporary debugging check
-               if (dead_task->mm->context.size) {
-                       printk("WARNING: dead process %8s still has LDT? 
<%p/%d>\n",
-                                       dead_task->comm,
-                                       dead_task->mm->context.ldt,
-                                       dead_task->mm->context.size);
-                       BUG();
-               }
-       }
-
+       BUG_ON(dead_task->mm);
        release_vm86_irqs(dead_task);
 }
 
@@ -340,18 +330,7 @@
        struct task_struct *tsk;
        int err;
 
-       childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) 
p->thread_info)) - 1;
-       /*
-        * The below -8 is to reserve 8 bytes on top of the ring0 stack.
-        * This is necessary to guarantee that the entire "struct pt_regs"
-        * is accessable even if the CPU haven't stored the SS/ESP registers
-        * on the stack (interrupt gate does not save these registers
-        * when switching to the same priv ring).
-        * Therefore beware: accessing the xss/esp fields of the
-        * "struct pt_regs" is possible, but they may contain the
-        * completely wrong values.
-        */
-       childregs = (struct pt_regs *) ((unsigned long) childregs - 8);
+       childregs = task_pt_regs(p);
        *childregs = *regs;
        childregs->eax = 0;
        childregs->esp = esp;
@@ -458,12 +437,7 @@
  */
 int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
 {
-       struct pt_regs ptregs;
-       
-       ptregs = *(struct pt_regs *)
-               ((unsigned long)tsk->thread_info +
-               /* see comments in copy_thread() about -8 */
-               THREAD_SIZE - sizeof(ptregs) - 8);
+       struct pt_regs ptregs = *task_pt_regs(tsk);
        ptregs.xcs &= 0xffff;
        ptregs.xds &= 0xffff;
        ptregs.xes &= 0xffff;
@@ -487,8 +461,8 @@
         * gcc should eliminate the ->thread_info dereference if
         * has_secure_computing returns 0 at compile time (SECCOMP=n).
         */
-       prev = prev_p->thread_info;
-       next = next_p->thread_info;
+       prev = task_thread_info(prev_p);
+       next = task_thread_info(next_p);
 
        if (has_secure_computing(prev) || has_secure_computing(next)) {
                /* slow path here */
@@ -707,7 +681,7 @@
        int count = 0;
        if (!p || p == current || p->state == TASK_RUNNING)
                return 0;
-       stack_page = (unsigned long)p->thread_info;
+       stack_page = (unsigned long)task_stack_page(p);
        esp = p->thread.esp;
        if (!stack_page || esp < stack_page || esp > top_esp+stack_page)
                return 0;
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/quirks-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/quirks-xen.c        Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/quirks-xen.c        Thu Feb  2 
19:16:38 2006
@@ -25,8 +25,7 @@
 
        /* enable access to config space*/
        pci_read_config_byte(dev, 0xf4, &config);
-       config |= 0x2;
-       pci_write_config_byte(dev, 0xf4, config);
+       pci_write_config_byte(dev, 0xf4, config|0x2);
 
        /* read xTPR register */
        raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word);
@@ -39,9 +38,9 @@
                (void)HYPERVISOR_dom0_op(&op);
        }
 
-       config &= ~0x2;
-       /* disable access to config space*/
-       pci_write_config_byte(dev, 0xf4, config);
+       /* put back the original value for config space*/
+       if (!(config & 0x2))
+               pci_write_config_byte(dev, 0xf4, config);
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7320_MCH,  
quirk_intel_irqbalance);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   PCI_DEVICE_ID_INTEL_E7525_MCH,  
quirk_intel_irqbalance);
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Thu Feb  2 19:16:38 2006
@@ -48,6 +48,7 @@
 #include <linux/notifier.h>
 #include <linux/kexec.h>
 #include <linux/crash_dump.h>
+#include <linux/dmi.h>
 
 #include <video/edid.h>
 
@@ -159,7 +160,6 @@
 struct e820map e820;
 
 extern void early_cpu_init(void);
-extern void dmi_scan_machine(void);
 extern void generic_apic_probe(char *);
 extern int root_mountflags;
 
@@ -944,7 +944,7 @@
                        }
                }
 #endif
-#ifdef CONFIG_CRASH_DUMP
+#ifdef CONFIG_PROC_VMCORE
                /* elfcorehdr= specifies the location of elf core header
                 * stored by the crashed kernel.
                 */
@@ -1001,6 +1001,12 @@
        return 0;
 }
 
+static int __init
+efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg)
+{
+       memory_present(0, start, end);
+       return 0;
+}
 
 /*
  * Find the highest page frame number we have available
@@ -1012,6 +1018,7 @@
        max_pfn = 0;
        if (efi_enabled) {
                efi_memmap_walk(efi_find_max_pfn, &max_pfn);
+               efi_memmap_walk(efi_memory_present_wrapper, NULL);
                return;
        }
 
@@ -1026,6 +1033,7 @@
                        continue;
                if (end > max_pfn)
                        max_pfn = end;
+               memory_present(0, start, end);
        }
 }
 #else
@@ -1796,7 +1804,7 @@
                if (s) {
                        extern void setup_early_printk(char *);
 
-                       setup_early_printk(s);
+                       setup_early_printk(strchr(s, '=') + 1);
                        printk("early console enabled\n");
                }
        }
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/smpboot.c   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/smpboot.c   Thu Feb  2 19:16:38 2006
@@ -875,8 +875,7 @@
                /* initialize thread_struct.  we really want to avoid destroy
                 * idle tread
                 */
-               idle->thread.esp = (unsigned long)(((struct pt_regs *)
-                       (THREAD_SIZE + (unsigned long) idle->thread_info)) - 1);
+               idle->thread.esp = (unsigned long)task_pt_regs(idle);
                init_idle(idle, cpu);
                return idle;
        }
@@ -902,6 +901,12 @@
        int timeout;
        unsigned long start_eip;
        unsigned short nmi_high = 0, nmi_low = 0;
+
+       if (!cpu_gdt_descr[cpu].address &&
+           !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
+               printk("Failed to allocate GDT for CPU %d\n", cpu);
+               return 1;
+       }
 
        ++cpucount;
 
@@ -1090,6 +1095,7 @@
                        cachesize = 16; /* Pentiums, 2x8kB cache */
                        bandwidth = 100;
                }
+               max_cache_size = cachesize * 1024;
        }
 }
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c   Thu Feb  2 19:16:38 2006
@@ -26,6 +26,12 @@
 #include <asm/dma.h>
 #include <asm/uaccess.h>
 #include <xen/interface/memory.h>
+
+#if defined(CONFIG_SWIOTLB)
+extern void swiotlb_init(void);
+int swiotlb;
+EXPORT_SYMBOL(swiotlb);
+#endif
 
 #define OFFSET(val,align) ((unsigned long)((val) & ( (align) - 1)))
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/traps-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/traps-xen.c Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/traps-xen.c Thu Feb  2 19:16:38 2006
@@ -109,33 +109,38 @@
                p < (void *)tinfo + THREAD_SIZE - 3;
 }
 
+static void print_addr_and_symbol(unsigned long addr, char *log_lvl)
+{
+       printk(log_lvl);
+       printk(" [<%08lx>] ", addr);
+       print_symbol("%s", addr);
+       printk("\n");
+}
+
 static inline unsigned long print_context_stack(struct thread_info *tinfo,
-                               unsigned long *stack, unsigned long ebp)
+                               unsigned long *stack, unsigned long ebp,
+                               char *log_lvl)
 {
        unsigned long addr;
 
 #ifdef CONFIG_FRAME_POINTER
        while (valid_stack_ptr(tinfo, (void *)ebp)) {
                addr = *(unsigned long *)(ebp + 4);
-               printk(" [<%08lx>] ", addr);
-               print_symbol("%s", addr);
-               printk("\n");
+               print_addr_and_symbol(addr, log_lvl);
                ebp = *(unsigned long *)ebp;
        }
 #else
        while (valid_stack_ptr(tinfo, stack)) {
                addr = *stack++;
-               if (__kernel_text_address(addr)) {
-                       printk(" [<%08lx>]", addr);
-                       print_symbol(" %s", addr);
-                       printk("\n");
-               }
+               if (__kernel_text_address(addr))
+                       print_addr_and_symbol(addr, log_lvl);
        }
 #endif
        return ebp;
 }
 
-void show_trace(struct task_struct *task, unsigned long * stack)
+static void show_trace_log_lvl(struct task_struct *task,
+                              unsigned long *stack, char *log_lvl)
 {
        unsigned long ebp;
 
@@ -154,15 +159,21 @@
                struct thread_info *context;
                context = (struct thread_info *)
                        ((unsigned long)stack & (~(THREAD_SIZE - 1)));
-               ebp = print_context_stack(context, stack, ebp);
+               ebp = print_context_stack(context, stack, ebp, log_lvl);
                stack = (unsigned long*)context->previous_esp;
                if (!stack)
                        break;
-               printk(" =======================\n");
-       }
-}
-
-void show_stack(struct task_struct *task, unsigned long *esp)
+               printk(KERN_EMERG " =======================\n");
+       }
+}
+
+void show_trace(struct task_struct *task, unsigned long * stack)
+{
+       show_trace_log_lvl(task, stack, "");
+}
+
+static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp,
+                              char *log_lvl)
 {
        unsigned long *stack;
        int i;
@@ -175,15 +186,26 @@
        }
 
        stack = esp;
+       printk(log_lvl);
        for(i = 0; i < kstack_depth_to_print; i++) {
                if (kstack_end(stack))
                        break;
-               if (i && ((i % 8) == 0))
-                       printk("\n       ");
+               if (i && ((i % 8) == 0)) {
+                       printk("\n");
+                       printk(log_lvl);
+                       printk("       ");
+               }
                printk("%08lx ", *stack++);
        }
-       printk("\nCall Trace:\n");
-       show_trace(task, esp);
+       printk("\n");
+       printk(log_lvl);
+       printk("Call Trace:\n");
+       show_trace_log_lvl(task, esp, log_lvl);
+}
+
+void show_stack(struct task_struct *task, unsigned long *esp)
+{
+       show_stack_log_lvl(task, esp, "");
 }
 
 /*
@@ -213,18 +235,18 @@
                ss = regs->xss & 0xffff;
        }
        print_modules();
-       printk("CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\nEFLAGS: %08lx"
-                       "   (%s) \n",
+       printk(KERN_EMERG "CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\n"
+                       "EFLAGS: %08lx   (%s) \n",
                smp_processor_id(), 0xffff & regs->xcs, regs->eip,
                print_tainted(), regs->eflags, system_utsname.release);
-       print_symbol("EIP is at %s\n", regs->eip);
-       printk("eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
+       print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip);
+       printk(KERN_EMERG "eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
                regs->eax, regs->ebx, regs->ecx, regs->edx);
-       printk("esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
+       printk(KERN_EMERG "esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
                regs->esi, regs->edi, regs->ebp, esp);
-       printk("ds: %04x   es: %04x   ss: %04x\n",
+       printk(KERN_EMERG "ds: %04x   es: %04x   ss: %04x\n",
                regs->xds & 0xffff, regs->xes & 0xffff, ss);
-       printk("Process %s (pid: %d, threadinfo=%p task=%p)",
+       printk(KERN_EMERG "Process %s (pid: %d, threadinfo=%p task=%p)",
                current->comm, current->pid, current_thread_info(), current);
        /*
         * When in-kernel, we also print out the stack and code at the
@@ -233,10 +255,10 @@
        if (in_kernel) {
                u8 __user *eip;
 
-               printk("\nStack: ");
-               show_stack(NULL, (unsigned long*)esp);
-
-               printk("Code: ");
+               printk("\n" KERN_EMERG "Stack: ");
+               show_stack_log_lvl(NULL, (unsigned long *)esp, KERN_EMERG);
+
+               printk(KERN_EMERG "Code: ");
 
                eip = (u8 __user *)regs->eip - 43;
                for (i = 0; i < 64; i++, eip++) {
@@ -277,15 +299,15 @@
                (unsigned long)file < PAGE_OFFSET || __get_user(c, file))
                file = "<bad filename>";
 
-       printk("------------[ cut here ]------------\n");
-       printk(KERN_ALERT "kernel BUG at %s:%d!\n", file, line);
+       printk(KERN_EMERG "------------[ cut here ]------------\n");
+       printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line);
 
 no_bug:
        return;
 
        /* Here we know it was a BUG but file-n-line is unavailable */
 bug:
-       printk("Kernel BUG\n");
+       printk(KERN_EMERG "Kernel BUG\n");
 }
 
 /* This is gone through when something in the kernel
@@ -303,28 +325,35 @@
                .lock_owner_depth =     0
        };
        static int die_counter;
+       unsigned long flags;
 
        if (die.lock_owner != raw_smp_processor_id()) {
                console_verbose();
-               spin_lock_irq(&die.lock);
+               spin_lock_irqsave(&die.lock, flags);
                die.lock_owner = smp_processor_id();
                die.lock_owner_depth = 0;
                bust_spinlocks(1);
        }
+       else
+               local_save_flags(flags);
 
        if (++die.lock_owner_depth < 3) {
                int nl = 0;
                handle_BUG(regs);
-               printk(KERN_ALERT "%s: %04lx [#%d]\n", str, err & 0xffff, 
++die_counter);
+               printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, 
++die_counter);
 #ifdef CONFIG_PREEMPT
-               printk("PREEMPT ");
+               printk(KERN_EMERG "PREEMPT ");
                nl = 1;
 #endif
 #ifdef CONFIG_SMP
+               if (!nl)
+                       printk(KERN_EMERG);
                printk("SMP ");
                nl = 1;
 #endif
 #ifdef CONFIG_DEBUG_PAGEALLOC
+               if (!nl)
+                       printk(KERN_EMERG);
                printk("DEBUG_PAGEALLOC");
                nl = 1;
 #endif
@@ -333,11 +362,11 @@
        notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
                show_registers(regs);
        } else
-               printk(KERN_ERR "Recursive die() failure, output suppressed\n");
+               printk(KERN_EMERG "Recursive die() failure, output 
suppressed\n");
 
        bust_spinlocks(0);
        die.lock_owner = -1;
-       spin_unlock_irq(&die.lock);
+       spin_unlock_irqrestore(&die.lock, flags);
 
        if (kexec_should_crash(current))
                crash_kexec(regs);
@@ -449,7 +478,7 @@
 #endif
 DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow)
 DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds)
-DO_ERROR_INFO( 6, SIGILL,  "invalid operand", invalid_op, ILL_ILLOPN, 
regs->eip)
+DO_ERROR_INFO( 6, SIGILL,  "invalid opcode", invalid_op, ILL_ILLOPN, regs->eip)
 DO_VM86_ERROR( 7, SIGSEGV, "device not available", device_not_available)
 DO_ERROR( 9, SIGFPE,  "coprocessor segment overrun", 
coprocessor_segment_overrun)
 DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
@@ -508,8 +537,10 @@
 
 static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
 {
-       printk("Uhhuh. NMI received. Dazed and confused, but trying to 
continue\n");
-       printk("You probably have a hardware problem with your RAM chips\n");
+       printk(KERN_EMERG "Uhhuh. NMI received. Dazed and confused, but trying "
+                       "to continue\n");
+       printk(KERN_EMERG "You probably have a hardware problem with your RAM "
+                       "chips\n");
 
        /* Clear and disable the memory parity error line. */
        clear_mem_error(reason);
@@ -517,7 +548,7 @@
 
 static void io_check_error(unsigned char reason, struct pt_regs * regs)
 {
-       printk("NMI: IOCK error (debug interrupt?)\n");
+       printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
        show_registers(regs);
 
        /* Re-enable the IOCK line, wait for a few seconds */
@@ -554,11 +585,11 @@
        * to get a message out.
        */
        bust_spinlocks(1);
-       printk(msg);
+       printk(KERN_EMERG "%s", msg);
        printk(" on CPU%d, eip %08lx, registers:\n",
                smp_processor_id(), regs->eip);
        show_registers(regs);
-       printk("console shuts up ...\n");
+       printk(KERN_EMERG "console shuts up ...\n");
        console_silent();
        spin_unlock(&nmi_print_lock);
        bust_spinlocks(0);
@@ -957,8 +988,8 @@
 
 asmlinkage void math_emulate(long arg)
 {
-       printk("math-emulation not enabled and no coprocessor found.\n");
-       printk("killing %s.\n",current->comm);
+       printk(KERN_EMERG "math-emulation not enabled and no coprocessor 
found.\n");
+       printk(KERN_EMERG "killing %s.\n",current->comm);
        force_sig(SIGFPE,current);
        schedule();
 }
@@ -989,7 +1020,7 @@
        {  1, 0|4, __KERNEL_CS, (unsigned long)debug                    },
        {  3, 3|4, __KERNEL_CS, (unsigned long)int3                     },
        {  4, 3, __KERNEL_CS, (unsigned long)overflow                   },
-       {  5, 3, __KERNEL_CS, (unsigned long)bounds                     },
+       {  5, 0, __KERNEL_CS, (unsigned long)bounds                     },
        {  6, 0, __KERNEL_CS, (unsigned long)invalid_op                 },
        {  7, 0|4, __KERNEL_CS, (unsigned long)device_not_available     },
        {  9, 0, __KERNEL_CS, (unsigned long)coprocessor_segment_overrun },
@@ -1013,6 +1044,28 @@
 {
        HYPERVISOR_set_trap_table(trap_table);
 
+       if (cpu_has_fxsr) {
+               /*
+                * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
+                * Generates a compile-time "error: zero width for bit-field" if
+                * the alignment is wrong.
+                */
+               struct fxsrAlignAssert {
+                       int _:!(offsetof(struct task_struct,
+                                       thread.i387.fxsave) & 15);
+               };
+
+               printk(KERN_INFO "Enabling fast FPU save and restore... ");
+               set_in_cr4(X86_CR4_OSFXSR);
+               printk("done.\n");
+       }
+       if (cpu_has_xmm) {
+               printk(KERN_INFO "Enabling unmasked SIMD FPU exception "
+                               "support... ");
+               set_in_cr4(X86_CR4_OSXMMEXCPT);
+               printk("done.\n");
+       }
+
        /*
         * default LDT is a single-entry callgate to lcall7 for iBCS
         * and a callgate to lcall27 for Solaris/x86 binaries
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/kernel/traps.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/traps.c     Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/traps.c     Thu Feb  2 19:16:38 2006
@@ -112,33 +112,38 @@
                p < (void *)tinfo + THREAD_SIZE - 3;
 }
 
+static void print_addr_and_symbol(unsigned long addr, char *log_lvl)
+{
+       printk(log_lvl);
+       printk(" [<%08lx>] ", addr);
+       print_symbol("%s", addr);
+       printk("\n");
+}
+
 static inline unsigned long print_context_stack(struct thread_info *tinfo,
-                               unsigned long *stack, unsigned long ebp)
+                               unsigned long *stack, unsigned long ebp,
+                               char *log_lvl)
 {
        unsigned long addr;
 
 #ifdef CONFIG_FRAME_POINTER
        while (valid_stack_ptr(tinfo, (void *)ebp)) {
                addr = *(unsigned long *)(ebp + 4);
-               printk(" [<%08lx>] ", addr);
-               print_symbol("%s", addr);
-               printk("\n");
+               print_addr_and_symbol(addr, log_lvl);
                ebp = *(unsigned long *)ebp;
        }
 #else
        while (valid_stack_ptr(tinfo, stack)) {
                addr = *stack++;
-               if (__kernel_text_address(addr)) {
-                       printk(" [<%08lx>]", addr);
-                       print_symbol(" %s", addr);
-                       printk("\n");
-               }
+               if (__kernel_text_address(addr))
+                       print_addr_and_symbol(addr, log_lvl);
        }
 #endif
        return ebp;
 }
 
-void show_trace(struct task_struct *task, unsigned long * stack)
+static void show_trace_log_lvl(struct task_struct *task,
+                              unsigned long *stack, char *log_lvl)
 {
        unsigned long ebp;
 
@@ -157,15 +162,21 @@
                struct thread_info *context;
                context = (struct thread_info *)
                        ((unsigned long)stack & (~(THREAD_SIZE - 1)));
-               ebp = print_context_stack(context, stack, ebp);
+               ebp = print_context_stack(context, stack, ebp, log_lvl);
                stack = (unsigned long*)context->previous_esp;
                if (!stack)
                        break;
-               printk(" =======================\n");
-       }
-}
-
-void show_stack(struct task_struct *task, unsigned long *esp)
+               printk(KERN_EMERG " =======================\n");
+       }
+}
+
+void show_trace(struct task_struct *task, unsigned long * stack)
+{
+       show_trace_log_lvl(task, stack, "");
+}
+
+static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp,
+                              char *log_lvl)
 {
        unsigned long *stack;
        int i;
@@ -178,15 +189,26 @@
        }
 
        stack = esp;
+       printk(log_lvl);
        for(i = 0; i < kstack_depth_to_print; i++) {
                if (kstack_end(stack))
                        break;
-               if (i && ((i % 8) == 0))
-                       printk("\n       ");
+               if (i && ((i % 8) == 0)) {
+                       printk("\n");
+                       printk(log_lvl);
+                       printk("       ");
+               }
                printk("%08lx ", *stack++);
        }
-       printk("\nCall Trace:\n");
-       show_trace(task, esp);
+       printk("\n");
+       printk(log_lvl);
+       printk("Call Trace:\n");
+       show_trace_log_lvl(task, esp, log_lvl);
+}
+
+void show_stack(struct task_struct *task, unsigned long *esp)
+{
+       show_stack_log_lvl(task, esp, "");
 }
 
 /*
@@ -216,18 +238,18 @@
                ss = regs->xss & 0xffff;
        }
        print_modules();
-       printk("CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\nEFLAGS: %08lx"
-                       "   (%s) \n",
+       printk(KERN_EMERG "CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\n"
+                       "EFLAGS: %08lx   (%s) \n",
                smp_processor_id(), 0xffff & regs->xcs, regs->eip,
                print_tainted(), regs->eflags, system_utsname.release);
-       print_symbol("EIP is at %s\n", regs->eip);
-       printk("eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
+       print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip);
+       printk(KERN_EMERG "eax: %08lx   ebx: %08lx   ecx: %08lx   edx: %08lx\n",
                regs->eax, regs->ebx, regs->ecx, regs->edx);
-       printk("esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
+       printk(KERN_EMERG "esi: %08lx   edi: %08lx   ebp: %08lx   esp: %08lx\n",
                regs->esi, regs->edi, regs->ebp, esp);
-       printk("ds: %04x   es: %04x   ss: %04x\n",
+       printk(KERN_EMERG "ds: %04x   es: %04x   ss: %04x\n",
                regs->xds & 0xffff, regs->xes & 0xffff, ss);
-       printk("Process %s (pid: %d, threadinfo=%p task=%p)",
+       printk(KERN_EMERG "Process %s (pid: %d, threadinfo=%p task=%p)",
                current->comm, current->pid, current_thread_info(), current);
        /*
         * When in-kernel, we also print out the stack and code at the
@@ -236,10 +258,10 @@
        if (in_kernel) {
                u8 __user *eip;
 
-               printk("\nStack: ");
-               show_stack(NULL, (unsigned long*)esp);
-
-               printk("Code: ");
+               printk("\n" KERN_EMERG "Stack: ");
+               show_stack_log_lvl(NULL, (unsigned long *)esp, KERN_EMERG);
+
+               printk(KERN_EMERG "Code: ");
 
                eip = (u8 __user *)regs->eip - 43;
                for (i = 0; i < 64; i++, eip++) {
@@ -280,15 +302,15 @@
                (unsigned long)file < PAGE_OFFSET || __get_user(c, file))
                file = "<bad filename>";
 
-       printk("------------[ cut here ]------------\n");
-       printk(KERN_ALERT "kernel BUG at %s:%d!\n", file, line);
+       printk(KERN_EMERG "------------[ cut here ]------------\n");
+       printk(KERN_EMERG "kernel BUG at %s:%d!\n", file, line);
 
 no_bug:
        return;
 
        /* Here we know it was a BUG but file-n-line is unavailable */
 bug:
-       printk("Kernel BUG\n");
+       printk(KERN_EMERG "Kernel BUG\n");
 }
 
 /* This is gone through when something in the kernel
@@ -306,28 +328,35 @@
                .lock_owner_depth =     0
        };
        static int die_counter;
+       unsigned long flags;
 
        if (die.lock_owner != raw_smp_processor_id()) {
                console_verbose();
-               spin_lock_irq(&die.lock);
+               spin_lock_irqsave(&die.lock, flags);
                die.lock_owner = smp_processor_id();
                die.lock_owner_depth = 0;
                bust_spinlocks(1);
        }
+       else
+               local_save_flags(flags);
 
        if (++die.lock_owner_depth < 3) {
                int nl = 0;
                handle_BUG(regs);
-               printk(KERN_ALERT "%s: %04lx [#%d]\n", str, err & 0xffff, 
++die_counter);
+               printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, 
++die_counter);
 #ifdef CONFIG_PREEMPT
-               printk("PREEMPT ");
+               printk(KERN_EMERG "PREEMPT ");
                nl = 1;
 #endif
 #ifdef CONFIG_SMP
+               if (!nl)
+                       printk(KERN_EMERG);
                printk("SMP ");
                nl = 1;
 #endif
 #ifdef CONFIG_DEBUG_PAGEALLOC
+               if (!nl)
+                       printk(KERN_EMERG);
                printk("DEBUG_PAGEALLOC");
                nl = 1;
 #endif
@@ -336,11 +365,11 @@
        notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
                show_registers(regs);
        } else
-               printk(KERN_ERR "Recursive die() failure, output suppressed\n");
+               printk(KERN_EMERG "Recursive die() failure, output 
suppressed\n");
 
        bust_spinlocks(0);
        die.lock_owner = -1;
-       spin_unlock_irq(&die.lock);
+       spin_unlock_irqrestore(&die.lock, flags);
 
        if (kexec_should_crash(current))
                crash_kexec(regs);
@@ -452,7 +481,7 @@
 #endif
 DO_VM86_ERROR( 4, SIGSEGV, "overflow", overflow)
 DO_VM86_ERROR( 5, SIGSEGV, "bounds", bounds)
-DO_ERROR_INFO( 6, SIGILL,  "invalid operand", invalid_op, ILL_ILLOPN, 
regs->eip)
+DO_ERROR_INFO( 6, SIGILL,  "invalid opcode", invalid_op, ILL_ILLOPN, regs->eip)
 DO_ERROR( 9, SIGFPE,  "coprocessor segment overrun", 
coprocessor_segment_overrun)
 DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
 DO_ERROR(11, SIGBUS,  "segment not present", segment_not_present)
@@ -524,8 +553,10 @@
 
 static void mem_parity_error(unsigned char reason, struct pt_regs * regs)
 {
-       printk("Uhhuh. NMI received. Dazed and confused, but trying to 
continue\n");
-       printk("You probably have a hardware problem with your RAM chips\n");
+       printk(KERN_EMERG "Uhhuh. NMI received. Dazed and confused, but trying "
+                       "to continue\n");
+       printk(KERN_EMERG "You probably have a hardware problem with your RAM "
+                       "chips\n");
 
        /* Clear and disable the memory parity error line. */
        clear_mem_error(reason);
@@ -533,7 +564,7 @@
 
 static void io_check_error(unsigned char reason, struct pt_regs * regs)
 {
-       printk("NMI: IOCK error (debug interrupt?)\n");
+       printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
        show_registers(regs);
 
        /* Re-enable the IOCK line, wait for a few seconds */
@@ -570,11 +601,11 @@
        * to get a message out.
        */
        bust_spinlocks(1);
-       printk(msg);
+       printk(KERN_EMERG "%s", msg);
        printk(" on CPU%d, eip %08lx, registers:\n",
                smp_processor_id(), regs->eip);
        show_registers(regs);
-       printk("console shuts up ...\n");
+       printk(KERN_EMERG "console shuts up ...\n");
        console_silent();
        spin_unlock(&nmi_print_lock);
        bust_spinlocks(0);
@@ -980,8 +1011,8 @@
 
 asmlinkage void math_emulate(long arg)
 {
-       printk("math-emulation not enabled and no coprocessor found.\n");
-       printk("killing %s.\n",current->comm);
+       printk(KERN_EMERG "math-emulation not enabled and no coprocessor 
found.\n");
+       printk(KERN_EMERG "killing %s.\n",current->comm);
        force_sig(SIGFPE,current);
        schedule();
 }
@@ -1068,9 +1099,9 @@
        set_trap_gate(0,&divide_error);
        set_intr_gate(1,&debug);
        set_intr_gate(2,&nmi);
-       set_system_intr_gate(3, &int3); /* int3-5 can be called from all */
+       set_system_intr_gate(3, &int3); /* int3/4 can be called from all */
        set_system_gate(4,&overflow);
-       set_system_gate(5,&bounds);
+       set_trap_gate(5,&bounds);
        set_trap_gate(6,&invalid_op);
        set_trap_gate(7,&device_not_available);
        set_task_gate(8,GDT_ENTRY_DOUBLEFAULT_TSS);
@@ -1088,6 +1119,28 @@
 #endif
        set_trap_gate(19,&simd_coprocessor_error);
 
+       if (cpu_has_fxsr) {
+               /*
+                * Verify that the FXSAVE/FXRSTOR data will be 16-byte aligned.
+                * Generates a compile-time "error: zero width for bit-field" if
+                * the alignment is wrong.
+                */
+               struct fxsrAlignAssert {
+                       int _:!(offsetof(struct task_struct,
+                                       thread.i387.fxsave) & 15);
+               };
+
+               printk(KERN_INFO "Enabling fast FPU save and restore... ");
+               set_in_cr4(X86_CR4_OSFXSR);
+               printk("done.\n");
+       }
+       if (cpu_has_xmm) {
+               printk(KERN_INFO "Enabling unmasked SIMD FPU exception "
+                               "support... ");
+               set_in_cr4(X86_CR4_OSXMMEXCPT);
+               printk("done.\n");
+       }
+
        set_system_gate(SYSCALL_VECTOR,&system_call);
 
        /*
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c      Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c      Thu Feb  2 19:16:38 2006
@@ -45,12 +45,6 @@
 
 extern unsigned long *contiguous_bitmap;
 
-#if defined(CONFIG_SWIOTLB)
-extern void swiotlb_init(void);
-int swiotlb;
-EXPORT_SYMBOL(swiotlb);
-#endif
-
 unsigned int __VMALLOC_RESERVE = 128 << 20;
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
@@ -315,7 +309,7 @@
        pkmap_page_table = pte; 
 }
 
-static void __devinit free_new_highpage(struct page *page, int pfn)
+static void __meminit free_new_highpage(struct page *page, int pfn)
 {
        set_page_count(page, 1);
        if (pfn < xen_start_info->nr_pages)
@@ -816,6 +810,30 @@
        printk (KERN_INFO "Freeing unused kernel memory: %dk freed\n", 
(__init_end - __init_begin) >> 10);
 }
 
+#ifdef CONFIG_DEBUG_RODATA
+
+extern char __start_rodata, __end_rodata;
+void mark_rodata_ro(void)
+{
+       unsigned long addr = (unsigned long)&__start_rodata;
+
+       for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE)
+               change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO);
+
+       printk ("Write protecting the kernel read-only data: %luk\n",
+                       (unsigned long)(&__end_rodata - &__start_rodata) >> 10);
+
+       /*
+        * change_page_attr() requires a global_flush_tlb() call after it.
+        * We do this after the printk so that if something went wrong in the
+        * change, the printk gets out at least to give a better debug hint
+        * of who is the culprit.
+        */
+       global_flush_tlb();
+}
+#endif
+
+
 #ifdef CONFIG_BLK_DEV_INITRD
 void free_initrd_mem(unsigned long start, unsigned long end)
 {
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c      Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c      Thu Feb  2 19:16:38 2006
@@ -78,7 +78,7 @@
        for (i=0; i < rt->size; i++)
                sum += addr[i];
        if (!sum) {
-               DBG("PCI: Interrupt Routing Table found at 0x%p\n", rt);
+               DBG(KERN_DEBUG "PCI: Interrupt Routing Table found at 0x%p\n", 
rt);
                return rt;
        }
        return NULL;
@@ -131,7 +131,7 @@
 #ifdef DEBUG
                {
                        int j;
-                       DBG("%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot);
+                       DBG(KERN_DEBUG "%02x:%02x slot=%02x", e->bus, 
e->devfn/8, e->slot);
                        for(j=0; j<4; j++)
                                DBG(" %d:%02x/%04x", j, e->irq[j].link, 
e->irq[j].bitmap);
                        DBG("\n");
@@ -163,10 +163,10 @@
                return;
 
        eisa_irq_mask |= (1 << irq);
-       printk("PCI: setting IRQ %u as level-triggered\n", irq);
+       printk(KERN_DEBUG "PCI: setting IRQ %u as level-triggered\n", irq);
        val = inb(port);
        if (!(val & mask)) {
-               DBG(" -> edge");
+               DBG(KERN_DEBUG " -> edge");
                outb(val | mask, port);
        }
 }
@@ -680,11 +680,11 @@
        {
        case PCI_DEVICE_ID_AL_M1533:
        case PCI_DEVICE_ID_AL_M1563:
-               printk("PCI: Using ALI IRQ Router\n");
-                       r->name = "ALI";
-                       r->get = pirq_ali_get;
-                       r->set = pirq_ali_set;
-                       return 1;
+               printk(KERN_DEBUG "PCI: Using ALI IRQ Router\n");
+               r->name = "ALI";
+               r->get = pirq_ali_get;
+               r->set = pirq_ali_set;
+               return 1;
        }
        return 0;
 }
@@ -752,12 +752,13 @@
        r->get = NULL;
        r->set = NULL;
        
-       DBG("PCI: Attempting to find IRQ router for %04x:%04x\n",
+       DBG(KERN_DEBUG "PCI: Attempting to find IRQ router for %04x:%04x\n",
            rt->rtr_vendor, rt->rtr_device);
 
        pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn);
        if (!pirq_router_dev) {
-               DBG("PCI: Interrupt router not found at %02x:%02x\n", 
rt->rtr_bus, rt->rtr_devfn);
+               DBG(KERN_DEBUG "PCI: Interrupt router not found at "
+                       "%02x:%02x\n", rt->rtr_bus, rt->rtr_devfn);
                return;
        }
 
@@ -802,7 +803,7 @@
        /* Find IRQ pin */
        pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
        if (!pin) {
-               DBG(" -> no interrupt pin\n");
+               DBG(KERN_DEBUG " -> no interrupt pin\n");
                return 0;
        }
        pin = pin - 1;
@@ -812,16 +813,16 @@
        if (!pirq_table)
                return 0;
        
-       DBG("IRQ for %s[%c]", pci_name(dev), 'A' + pin);
+       DBG(KERN_DEBUG "IRQ for %s[%c]", pci_name(dev), 'A' + pin);
        info = pirq_get_info(dev);
        if (!info) {
-               DBG(" -> not found in routing table\n");
+               DBG(" -> not found in routing table\n" KERN_DEBUG);
                return 0;
        }
        pirq = info->irq[pin].link;
        mask = info->irq[pin].bitmap;
        if (!pirq) {
-               DBG(" -> not routed\n");
+               DBG(" -> not routed\n" KERN_DEBUG);
                return 0;
        }
        DBG(" -> PIRQ %02x, mask %04x, excl %04x", pirq, mask, 
pirq_table->exclusive_irqs);
@@ -849,9 +850,12 @@
         * reported by the device if possible.
         */
        newirq = dev->irq;
-       if (!((1 << newirq) & mask)) {
+       if (newirq && !((1 << newirq) & mask)) {
                if ( pci_probe & PCI_USE_PIRQ_MASK) newirq = 0;
-               else printk(KERN_WARNING "PCI: IRQ %i for device %s doesn't 
match PIRQ mask - try pci=usepirqmask\n", newirq, pci_name(dev));
+               else printk("\n" KERN_WARNING
+                       "PCI: IRQ %i for device %s doesn't match PIRQ mask "
+                       "- try pci=usepirqmask\n" KERN_DEBUG, newirq,
+                       pci_name(dev));
        }
        if (!newirq && assign) {
                for (i = 0; i < 16; i++) {
@@ -926,14 +930,14 @@
        struct pci_dev *dev = NULL;
        u8 pin;
 
-       DBG("PCI: IRQ fixup\n");
+       DBG(KERN_DEBUG "PCI: IRQ fixup\n");
        while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
                /*
                 * If the BIOS has set an out of range IRQ number, just ignore 
it.
                 * Also keep track of which IRQ's are already in use.
                 */
                if (dev->irq >= 16) {
-                       DBG("%s: ignoring bogus IRQ %d\n", pci_name(dev), 
dev->irq);
+                       DBG(KERN_DEBUG "%s: ignoring bogus IRQ %d\n", 
pci_name(dev), dev->irq);
                        dev->irq = 0;
                }
                /* If the IRQ is already assigned to a PCI device, ignore its 
ISA use penalty */
@@ -1042,7 +1046,7 @@
 
 static int __init pcibios_irq_init(void)
 {
-       DBG("PCI: IRQ init\n");
+       DBG(KERN_DEBUG "PCI: IRQ init\n");
 
        if (pcibios_enable_irq || raw_pci_ops == NULL)
                return 0;
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/arch/ia64/Kconfig
--- a/linux-2.6-xen-sparse/arch/ia64/Kconfig    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/Kconfig    Thu Feb  2 19:16:38 2006
@@ -26,10 +26,6 @@
        bool
        default y
 
-config SWIOTLB
-       bool
-       default y
-
 config RWSEM_XCHGADD_ALGORITHM
        bool
        default y
@@ -101,23 +97,16 @@
        bool
        default y
 
-config IA64_UNCACHED_ALLOCATOR
-       bool
-       select GENERIC_ALLOCATOR
-
-config DMA_IS_DMA32
-       bool
-       default y
-
 choice
        prompt "System type"
        default IA64_GENERIC
 
 config IA64_GENERIC
        bool "generic"
-       select ACPI
        select NUMA
        select ACPI_NUMA
+       select VIRTUAL_MEM_MAP
+       select DISCONTIGMEM
        help
          This selects the system type of your hardware.  A "generic" kernel
          will run on any supported IA-64 system.  However, if you configure
@@ -215,21 +204,6 @@
 
 endchoice
 
-choice
-       prompt "Page Table Levels"
-       default PGTABLE_3
-
-config PGTABLE_3
-       bool "3 Levels"
-
-config PGTABLE_4
-       depends on !IA64_PAGE_SIZE_64KB
-       bool "4 Levels"
-
-endchoice
-
-source kernel/Kconfig.hz
-
 config IA64_BRL_EMU
        bool
        depends on ITANIUM
@@ -242,6 +216,40 @@
        default "6" if ITANIUM
 
 # align cache-sensitive data to 64 bytes
+config NUMA
+       bool "NUMA support"
+       depends on !IA64_HP_SIM
+       default y if IA64_SGI_SN2
+       select ACPI_NUMA
+       help
+         Say Y to compile the kernel to support NUMA (Non-Uniform Memory
+         Access).  This option is for configuring high-end multiprocessor
+         server systems.  If in doubt, say N.
+
+config VIRTUAL_MEM_MAP
+       bool "Virtual mem map"
+       default y if !IA64_HP_SIM
+       help
+         Say Y to compile the kernel with support for a virtual mem map.
+         This code also only takes effect if a memory hole of greater than
+         1 Gb is found during boot.  You must turn this option on if you
+         require the DISCONTIGMEM option for your machine. If you are
+         unsure, say Y.
+
+config HOLES_IN_ZONE
+       bool
+       default y if VIRTUAL_MEM_MAP
+
+config DISCONTIGMEM
+       bool "Discontiguous memory support"
+       depends on (IA64_DIG || IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || 
IA64_HP_ZX1_SWIOTLB) && NUMA && VIRTUAL_MEM_MAP
+       default y if (IA64_SGI_SN2 || IA64_GENERIC) && NUMA
+       help
+         Say Y to support efficient handling of discontiguous physical memory,
+         for architectures which are either NUMA (Non-Uniform Memory Access)
+         or have huge holes in the physical address space for other reasons.
+         See <file:Documentation/vm/numa> for more.
+
 config IA64_CYCLONE
        bool "Cyclone (EXA) Time Source support"
        help
@@ -253,10 +261,16 @@
        depends on !IA64_HP_SIM
        default y
 
+config IA64_SGI_SN_SIM
+       bool "SGI Medusa Simulator Support"
+       depends on IA64_SGI_SN2
+       help
+         If you are compiling a kernel that will run under SGI's IA-64
+         simulator (Medusa) then say Y, otherwise say N.
+
 config IA64_SGI_SN_XP
        tristate "Support communication between SGI SSIs"
-       depends on IA64_GENERIC || IA64_SGI_SN2
-       select IA64_UNCACHED_ALLOCATOR
+       depends on MSPEC
        help
          An SGI machine can be divided into multiple Single System
          Images which act independently of each other and have
@@ -265,10 +279,8 @@
          based on a network adapter and DMA messaging.
 
 config FORCE_MAX_ZONEORDER
-       int "MAX_ORDER (11 - 17)"  if !HUGETLB_PAGE
-       range 11 17  if !HUGETLB_PAGE
-       default "17" if HUGETLB_PAGE
-       default "11"
+       int
+       default "18"
 
 config SMP
        bool "Symmetric multi-processing support"
@@ -289,8 +301,8 @@
          If you don't know what to do here, say N.
 
 config NR_CPUS
-       int "Maximum number of CPUs (2-1024)"
-       range 2 1024
+       int "Maximum number of CPUs (2-512)"
+       range 2 512
        depends on SMP
        default "64"
        help
@@ -331,59 +343,10 @@
           Say Y here if you are building a kernel for a desktop, embedded
           or real-time system.  Say N if you are unsure.
 
-source "mm/Kconfig"
-
-config ARCH_SELECT_MEMORY_MODEL
-       def_bool y
-
-config ARCH_DISCONTIGMEM_ENABLE
-       def_bool y
-       help
-         Say Y to support efficient handling of discontiguous physical memory,
-         for architectures which are either NUMA (Non-Uniform Memory Access)
-         or have huge holes in the physical address space for other reasons.
-         See <file:Documentation/vm/numa> for more.
-
-config ARCH_FLATMEM_ENABLE
-       def_bool y
-
-config ARCH_SPARSEMEM_ENABLE
-       def_bool y
-       depends on ARCH_DISCONTIGMEM_ENABLE
-
-config ARCH_DISCONTIGMEM_DEFAULT
-       def_bool y if (IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || 
IA64_HP_ZX1_SWIOTLB)
-       depends on ARCH_DISCONTIGMEM_ENABLE
-
-config NUMA
-       bool "NUMA support"
-       depends on !IA64_HP_SIM && !FLATMEM
-       default y if IA64_SGI_SN2
-       help
-         Say Y to compile the kernel to support NUMA (Non-Uniform Memory
-         Access).  This option is for configuring high-end multiprocessor
-         server systems.  If in doubt, say N.
-
-# VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent.
-# VIRTUAL_MEM_MAP has been retained for historical reasons.
-config VIRTUAL_MEM_MAP
-       bool "Virtual mem map"
-       depends on !SPARSEMEM
-       default y if !IA64_HP_SIM
-       help
-         Say Y to compile the kernel with support for a virtual mem map.
-         This code also only takes effect if a memory hole of greater than
-         1 Gb is found during boot.  You must turn this option on if you
-         require the DISCONTIGMEM option for your machine. If you are
-         unsure, say Y.
-
-config HOLES_IN_ZONE
-       bool
-       default y if VIRTUAL_MEM_MAP
-
-config HAVE_ARCH_EARLY_PFN_TO_NID
-       def_bool y
-       depends on NEED_MULTIPLE_NODES
+config HAVE_DEC_LOCK
+       bool
+       depends on (SMP || PREEMPT)
+       default y
 
 config IA32_SUPPORT
        bool "Support for Linux/x86 binaries"
@@ -421,6 +384,11 @@
          To use this option, you have to ensure that the "/proc file system
          support" (CONFIG_PROC_FS) is enabled, too.
 
+config ACPI_DEALLOCATE_IRQ
+       bool
+       depends on IOSAPIC && EXPERIMENTAL
+       default y
+
 source "drivers/firmware/Kconfig"
 
 source "fs/Kconfig.binfmt"
@@ -429,13 +397,35 @@
 
 menu "Power management and ACPI"
 
-source "kernel/power/Kconfig"
+config PM
+       bool "Power Management support"
+       depends on !IA64_HP_SIM
+       default y
+       help
+         "Power Management" means that parts of your computer are shut
+         off or put into a power conserving "sleep" mode if they are not
+         being used.  There are two competing standards for doing this: APM
+         and ACPI.  If you want to use either one, say Y here and then also
+         to the requisite support below.
+
+         Power Management is most important for battery powered laptop
+         computers; if you have a laptop, check out the Linux Laptop home
+         page on the WWW at <http://www.linux-on-laptops.com/> and the
+         Battery Powered Linux mini-HOWTO, available from
+         <http://www.tldp.org/docs.html#howto>.
+
+         Note that, even if you say N here, Linux on the x86 architecture
+         will issue the hlt instruction if nothing is to be done, thereby
+         sending the processor to sleep and saving power.
+
+config ACPI
+       bool
+       depends on !IA64_HP_SIM
+       default y
+
+if !IA64_HP_SIM
 
 source "drivers/acpi/Kconfig"
-
-if PM
-
-source "arch/ia64/kernel/cpufreq/Kconfig"
 
 endif
 
@@ -448,8 +438,15 @@
 config PCI
        bool "PCI support"
        help
-         Real IA-64 machines all have PCI/PCI-X/PCI Express busses.  Say Y
-         here unless you are using a simulator without PCI support.
+         Find out whether you have a PCI motherboard. PCI is the name of a
+         bus system, i.e. the way the CPU talks to the other stuff inside
+         your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
+         VESA. If you have PCI, say Y, otherwise N.
+
+         The PCI-HOWTO, available from
+         <http://www.tldp.org/docs.html#howto>, contains valuable
+         information about which PCI hardware does work under Linux and which
+         doesn't.
 
 config PCI_DOMAINS
        bool
@@ -464,8 +461,6 @@
 endmenu
 
 endif
-
-source "net/Kconfig"
 
 source "drivers/Kconfig"
 
@@ -484,28 +479,10 @@
        bool
        default y
 
-config GENERIC_PENDING_IRQ
-       bool
-       depends on GENERIC_HARDIRQS && SMP
-       default y
-
 source "arch/ia64/hp/sim/Kconfig"
 
-menu "Instrumentation Support"
-        depends on EXPERIMENTAL
-
 source "arch/ia64/oprofile/Kconfig"
 
-config KPROBES
-       bool "Kprobes (EXPERIMENTAL)"
-       help
-         Kprobes allows you to trap at almost any kernel address and
-         execute a callback function.  register_kprobe() establishes
-         a probepoint and specifies the callback.  Kprobes is useful
-         for kernel debugging, non-intrusive instrumentation and testing.
-         If in doubt, say "N".
-endmenu
-
 source "arch/ia64/Kconfig.debug"
 
 source "security/Kconfig"
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/arch/ia64/Makefile
--- a/linux-2.6-xen-sparse/arch/ia64/Makefile   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/Makefile   Thu Feb  2 19:16:38 2006
@@ -10,6 +10,9 @@
 
 NM := $(CROSS_COMPILE)nm -B
 READELF := $(CROSS_COMPILE)readelf
+
+# following is temporary pending xen directory restructuring
+NOSTDINC_FLAGS += -Iinclude/asm-xen
 
 export AWK
 
@@ -88,7 +91,42 @@
 archclean:
        $(Q)$(MAKE) $(clean)=$(boot)
 
-CLEAN_FILES += vmlinux.gz bootloader
+CLEAN_FILES += include/asm-ia64/.offsets.h.stamp vmlinux.gz bootloader
+#CLEAN_FILES += include/asm-xen/xen-public 
include/asm-ia64/xen/asm-xsi-offsets.h
+#CLEAN_FILES += include/asm-xen/linux-public 
include/asm-xen/asm-ia64/hypervisor.h
+
+MRPROPER_FILES += include/asm-ia64/offsets.h
+
+prepare: include/asm-ia64/offsets.h
+
+arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h 
include/config/MARKER
+
+include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s
+       $(call filechk,gen-asm-offsets)
+
+arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
+
+#XEN_PATH ?= $(srctree)/../xen-ia64-unstable.hg/
+include/asm-ia64/.offsets.h.stamp:
+       mkdir -p include/asm-ia64
+       [ -s include/asm-ia64/offsets.h ] \
+        || echo "#define IA64_TASK_SIZE 0" > include/asm-ia64/offsets.h
+       touch $@
+       [ -e include/asm-xen/asm ] \
+        || ln -s asm-ia64 include/asm-xen/asm
+#      [ -e include/asm-xen/xen-public ] \
+#       || ln -s $(XEN_PATH)/xen/include/public \
+#              include/asm-xen/xen-public
+#      [ -e include/asm-ia64/xen/asm-xsi-offsets.h ] \
+#       || ln -s $(XEN_PATH)/xen/include/asm-ia64/asm-xsi-offsets.h \
+#              include/asm-ia64/xen/asm-xsi-offsets.h
+#      [ -e include/asm-xen/linux-public ] \
+#       || ln -s $(XEN_PATH)/linux-2.6-xen-sparse/include/asm-xen/linux-public 
\
+               include/asm-xen/linux-public
+       [ -e include/asm-xen/asm-ia64/hypervisor.h ] \
+        || ln -s 
$(XEN_PATH)/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypervisor.h \
+               include/asm-xen/asm-ia64/hypervisor.h
+
 
 boot:  lib/lib.a vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/ia64/kernel/entry.S
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/entry.S     Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/entry.S     Thu Feb  2 19:16:38 2006
@@ -37,7 +37,7 @@
 #include <asm/cache.h>
 #include <asm/errno.h>
 #include <asm/kregs.h>
-#include <asm/asm-offsets.h>
+#include <asm/offsets.h>
 #include <asm/pgtable.h>
 #include <asm/percpu.h>
 #include <asm/processor.h>
@@ -204,6 +204,9 @@
 (p6)   br.cond.dpnt .map
        ;;
 .done:
+(p6)   ssm psr.ic                      // if we had to map, reenable the 
psr.ic bit FIRST!!!
+       ;;
+(p6)   srlz.d
        ld8 sp=[r21]                    // load kernel stack pointer of new task
        mov IA64_KR(CURRENT)=in0        // update "current" application register
        mov r8=r13                      // return pointer to previously running 
task
@@ -231,9 +234,6 @@
        mov IA64_KR(CURRENT_STACK)=r26  // remember last page we mapped...
        ;;
        itr.d dtr[r25]=r23              // wire in new mapping...
-       ssm psr.ic                      // reenable the psr.ic bit
-       ;;
-       srlz.d
        br.cond.sptk .done
 END(__ia64_switch_to)
 
@@ -470,28 +470,17 @@
        br.cond.sptk.many b7
 END(load_switch_stack)
 
-GLOBAL_ENTRY(prefetch_stack)
-       add r14 = -IA64_SWITCH_STACK_SIZE, sp
-       add r15 = IA64_TASK_THREAD_KSP_OFFSET, in0
-       ;;
-       ld8 r16 = [r15]                         // load next's stack pointer
-       lfetch.fault.excl [r14], 128
-       ;;
-       lfetch.fault.excl [r14], 128
-       lfetch.fault [r16], 128
-       ;;
-       lfetch.fault.excl [r14], 128
-       lfetch.fault [r16], 128
-       ;;
-       lfetch.fault.excl [r14], 128
-       lfetch.fault [r16], 128
-       ;;
-       lfetch.fault.excl [r14], 128
-       lfetch.fault [r16], 128
-       ;;
-       lfetch.fault [r16], 128
+GLOBAL_ENTRY(__ia64_syscall)
+       .regstk 6,0,0,0
+       mov r15=in5                             // put syscall number in place
+       break __BREAK_SYSCALL
+       movl r2=errno
+       cmp.eq p6,p7=-1,r10
+       ;;
+(p6)   st4 [r2]=r8
+(p6)   mov r8=-1
        br.ret.sptk.many rp
-END(prefetch_stack)
+END(__ia64_syscall)
 
 GLOBAL_ENTRY(execve)
        mov r15=__NR_execve                     // put syscall number in place
@@ -651,7 +640,7 @@
  *           r8-r11: restored (syscall return value(s))
  *              r12: restored (user-level stack pointer)
  *              r13: restored (user-level thread pointer)
- *              r14: set to __kernel_syscall_via_epc
+ *              r14: cleared
  *              r15: restored (syscall #)
  *          r16-r17: cleared
  *              r18: user-level b6
@@ -672,7 +661,7 @@
  *               pr: restored (user-level pr)
  *               b0: restored (user-level rp)
  *               b6: restored
- *               b7: set to __kernel_syscall_via_epc
+ *               b7: cleared
  *          ar.unat: restored (user-level ar.unat)
  *           ar.pfs: restored (user-level ar.pfs)
  *           ar.rsc: restored (user-level ar.rsc)
@@ -718,79 +707,72 @@
        ;;
 (p6)   ld4 r31=[r18]                           // load 
current_thread_info()->flags
        ld8 r19=[r2],PT(B6)-PT(LOADRS)          // load ar.rsc value for 
"loadrs"
-       nop.i 0
-       ;;
-       mov r16=ar.bsp                          // M2  get existing backing 
store pointer
+       mov b7=r0               // clear b7
+       ;;
+       ld8 r23=[r3],PT(R11)-PT(AR_BSPSTORE)    // load ar.bspstore (may be 
garbage)
        ld8 r18=[r2],PT(R9)-PT(B6)              // load b6
 (p6)   and r15=TIF_WORK_MASK,r31               // any work other than 
TIF_SYSCALL_TRACE?
        ;;
-       ld8 r23=[r3],PT(R11)-PT(AR_BSPSTORE)    // load ar.bspstore (may be 
garbage)
+       mov r16=ar.bsp                          // M2  get existing backing 
store pointer
 (p6)   cmp4.ne.unc p6,p0=r15, r0               // any special work pending?
 (p6)   br.cond.spnt .work_pending_syscall
        ;;
        // start restoring the state saved on the kernel stack (struct pt_regs):
        ld8 r9=[r2],PT(CR_IPSR)-PT(R9)
        ld8 r11=[r3],PT(CR_IIP)-PT(R11)
-(pNonSys) break 0              //      bug check: we shouldn't be here if 
pNonSys is TRUE!
+       mov f6=f0               // clear f6
        ;;
        invala                  // M0|1 invalidate ALAT
-       rsm psr.i | psr.ic      // M2   turn off interrupts and interruption 
collection
-       cmp.eq p9,p0=r0,r0      // A    set p9 to indicate that we should 
restore cr.ifs
-
-       ld8 r29=[r2],16         // M0|1 load cr.ipsr
-       ld8 r28=[r3],16         // M0|1 load cr.iip
-       mov r22=r0              // A    clear r22
+       rsm psr.i | psr.ic      // M2 initiate turning off of interrupt and 
interruption collection
+       mov f9=f0               // clear f9
+
+       ld8 r29=[r2],16         // load cr.ipsr
+       ld8 r28=[r3],16                 // load cr.iip
+       mov f8=f0               // clear f8
        ;;
        ld8 r30=[r2],16         // M0|1 load cr.ifs
        ld8 r25=[r3],16         // M0|1 load ar.unat
+       cmp.eq p9,p0=r0,r0      // set p9 to indicate that we should restore 
cr.ifs
+       ;;
+       ld8 r26=[r2],PT(B0)-PT(AR_PFS)  // M0|1 load ar.pfs
+(pKStk)        mov r22=psr             // M2 read PSR now that interrupts are 
disabled
+       mov f10=f0              // clear f10
+       ;;
+       ld8 r21=[r2],PT(AR_RNAT)-PT(B0) // load b0
+       ld8 r27=[r3],PT(PR)-PT(AR_RSC)  // load ar.rsc
+       mov f11=f0              // clear f11
+       ;;
+       ld8 r24=[r2],PT(AR_FPSR)-PT(AR_RNAT)    // load ar.rnat (may be garbage)
+       ld8 r31=[r3],PT(R1)-PT(PR)              // load predicates
 (pUStk) add r14=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13
        ;;
-       ld8 r26=[r2],PT(B0)-PT(AR_PFS)  // M0|1 load ar.pfs
-(pKStk)        mov r22=psr                     // M2   read PSR now that 
interrupts are disabled
-       nop 0
-       ;;
-       ld8 r21=[r2],PT(AR_RNAT)-PT(B0) // M0|1 load b0
-       ld8 r27=[r3],PT(PR)-PT(AR_RSC)  // M0|1 load ar.rsc
-       mov f6=f0                       // F    clear f6
-       ;;
-       ld8 r24=[r2],PT(AR_FPSR)-PT(AR_RNAT)    // M0|1 load ar.rnat (may be 
garbage)
-       ld8 r31=[r3],PT(R1)-PT(PR)              // M0|1 load predicates
-       mov f7=f0                               // F    clear f7
-       ;;
-       ld8 r20=[r2],PT(R12)-PT(AR_FPSR)        // M0|1 load ar.fpsr
-       ld8.fill r1=[r3],16                     // M0|1 load r1
-(pUStk) mov r17=1                              // A
-       ;;
-(pUStk) st1 [r14]=r17                          // M2|3
-       ld8.fill r13=[r3],16                    // M0|1
-       mov f8=f0                               // F    clear f8
-       ;;
-       ld8.fill r12=[r2]                       // M0|1 restore r12 (sp)
-       ld8.fill r15=[r3]                       // M0|1 restore r15
-       mov b6=r18                              // I0   restore b6
-
-       addl r17=THIS_CPU(ia64_phys_stacked_size_p8),r0 // A
-       mov f9=f0                                       // F    clear f9
-(pKStk) br.cond.dpnt.many skip_rbs_switch              // B
-
-       srlz.d                          // M0   ensure interruption collection 
is off (for cover)
-       shr.u r18=r19,16                // I0|1 get byte size of existing 
"dirty" partition
-       cover                           // B    add current frame into dirty 
partition & set cr.ifs
-       ;;
-(pUStk) ld4 r17=[r17]                  // M0|1 r17 = 
cpu_data->phys_stacked_size_p8
-       mov r19=ar.bsp                  // M2   get new backing store pointer
-       mov f10=f0                      // F    clear f10
-
-       nop.m 0
-       movl r14=__kernel_syscall_via_epc // X
-       ;;
-       mov.m ar.csd=r0                 // M2   clear ar.csd
-       mov.m ar.ccv=r0                 // M2   clear ar.ccv
-       mov b7=r14                      // I0   clear b7 (hint with 
__kernel_syscall_via_epc)
-
-       mov.m ar.ssd=r0                 // M2   clear ar.ssd
-       mov f11=f0                      // F    clear f11
-       br.cond.sptk.many rbs_switch    // B
+       ld8 r20=[r2],PT(R12)-PT(AR_FPSR)        // load ar.fpsr
+       ld8.fill r1=[r3],16     // load r1
+(pUStk) mov r17=1
+       ;;
+       srlz.d                  // M0  ensure interruption collection is off
+       ld8.fill r13=[r3],16
+       mov f7=f0               // clear f7
+       ;;
+       ld8.fill r12=[r2]       // restore r12 (sp)
+       mov.m ar.ssd=r0         // M2 clear ar.ssd
+       mov r22=r0              // clear r22
+
+       ld8.fill r15=[r3]       // restore r15
+(pUStk) st1 [r14]=r17
+       addl r3=THIS_CPU(ia64_phys_stacked_size_p8),r0
+       ;;
+(pUStk)        ld4 r17=[r3]            // r17 = cpu_data->phys_stacked_size_p8
+       mov.m ar.csd=r0         // M2 clear ar.csd
+       mov b6=r18              // I0  restore b6
+       ;;
+       mov r14=r0              // clear r14
+       shr.u r18=r19,16        // I0|1 get byte size of existing "dirty" 
partition
+(pKStk) br.cond.dpnt.many skip_rbs_switch
+
+       mov.m ar.ccv=r0         // clear ar.ccv
+(pNonSys) br.cond.dpnt.many dont_preserve_current_frame
+       br.cond.sptk.many rbs_switch
 END(__ia64_leave_syscall)
 
 #ifdef CONFIG_IA32_SUPPORT
@@ -909,7 +891,7 @@
        ldf.fill f7=[r2],PT(F11)-PT(F7)
        ldf.fill f8=[r3],32
        ;;
-       srlz.d  // ensure that inter. collection is off (VHPT is don't care, 
since text is pinned)
+       srlz.i                  // ensure interruption collection is off
        mov ar.ccv=r15
        ;;
        ldf.fill f11=[r2]
@@ -969,10 +951,11 @@
         * NOTE: alloc, loadrs, and cover can't be predicated.
         */
 (pNonSys) br.cond.dpnt dont_preserve_current_frame
+
+rbs_switch:
        cover                           // add current frame into dirty 
partition and set cr.ifs
        ;;
        mov r19=ar.bsp                  // get new backing store pointer
-rbs_switch:
        sub r16=r16,r18                 // krbs = old bsp - size of dirty 
partition
        cmp.ne p9,p0=r0,r0              // clear p9 to skip restore of cr.ifs
        ;;
@@ -1047,14 +1030,14 @@
        mov loc5=0
        mov loc6=0
        mov loc7=0
-(pRecurse) br.call.dptk.few b0=rse_clear_invalid
+(pRecurse) br.call.sptk.few b0=rse_clear_invalid
        ;;
        mov loc8=0
        mov loc9=0
        cmp.ne pReturn,p0=r0,in1        // if recursion count != 0, we need to 
do a br.ret
        mov loc10=0
        mov loc11=0
-(pReturn) br.ret.dptk.many b0
+(pReturn) br.ret.sptk.many b0
 #endif /* !CONFIG_ITANIUM */
 #      undef pRecurse
 #      undef pReturn
@@ -1278,7 +1261,7 @@
        stf.spill [r17]=f11
        adds out0=16,sp                         // out0 = &sigscratch
        br.call.sptk.many rp=ia64_rt_sigreturn
-.ret19:        .restore sp,0
+.ret19:        .restore sp 0
        adds sp=16,sp
        ;;
        ld8 r9=[sp]                             // load new ar.unat
@@ -1600,11 +1583,11 @@
        data8 sys_add_key
        data8 sys_request_key
        data8 sys_keyctl
-       data8 sys_ioprio_set
-       data8 sys_ioprio_get                    // 1275
        data8 sys_ni_syscall
-       data8 sys_inotify_init
-       data8 sys_inotify_add_watch
-       data8 sys_inotify_rm_watch
+       data8 sys_ni_syscall                    // 1275
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
 
        .org sys_call_table + 8*NR_syscalls     // guard against failures to 
increase NR_syscalls
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/ia64/kernel/head.S
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/head.S      Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/head.S      Thu Feb  2 19:16:38 2006
@@ -25,7 +25,7 @@
 #include <asm/fpu.h>
 #include <asm/kregs.h>
 #include <asm/mmu_context.h>
-#include <asm/asm-offsets.h>
+#include <asm/offsets.h>
 #include <asm/pal.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Thu Feb  2 19:16:38 2006
@@ -20,7 +20,6 @@
  * 02/01/00 R.Seth     fixed get_cpuinfo for SMP
  * 01/07/99 S.Eranian  added the support for command line argument
  * 06/24/99 W.Drummond added boot_cpu_data.
- * 05/28/05 Z. Menyhart        Dynamic stride size for "flush_icache_range()"
  */
 #include <linux/config.h>
 #include <linux/module.h>
@@ -41,8 +40,6 @@
 #include <linux/serial_core.h>
 #include <linux/efi.h>
 #include <linux/initrd.h>
-#include <linux/platform.h>
-#include <linux/pm.h>
 
 #include <asm/ia32.h>
 #include <asm/machvec.h>
@@ -75,42 +72,13 @@
 unsigned long ia64_cycles_per_usec;
 struct ia64_boot_param *ia64_boot_param;
 struct screen_info screen_info;
-unsigned long vga_console_iobase;
-unsigned long vga_console_membase;
-
-static struct resource data_resource = {
-       .name   = "Kernel data",
-       .flags  = IORESOURCE_BUSY | IORESOURCE_MEM
-};
-
-static struct resource code_resource = {
-       .name   = "Kernel code",
-       .flags  = IORESOURCE_BUSY | IORESOURCE_MEM
-};
-extern void efi_initialize_iomem_resources(struct resource *,
-               struct resource *);
-extern char _text[], _end[], _etext[];
 
 unsigned long ia64_max_cacheline_size;
-
-int dma_get_cache_alignment(void)
-{
-        return ia64_max_cacheline_size;
-}
-EXPORT_SYMBOL(dma_get_cache_alignment);
-
 unsigned long ia64_iobase;     /* virtual address for I/O accesses */
 EXPORT_SYMBOL(ia64_iobase);
 struct io_space io_space[MAX_IO_SPACES];
 EXPORT_SYMBOL(io_space);
 unsigned int num_io_spaces;
-
-/*
- * "flush_icache_range()" needs to know what processor dependent stride size 
to use
- * when it makes i-cache(s) coherent with d-caches.
- */
-#define        I_CACHE_STRIDE_SHIFT    5       /* Safest way to go: 32 bytes 
by 32 bytes */
-unsigned long ia64_i_cache_stride_shift = ~0;
 
 /*
  * The merge_mask variable needs to be set to (max(iommu_page_size(iommu)) - 
1).  This
@@ -191,22 +159,6 @@
        }
 }
 
-/*
- * Request address space for all standard resources
- */
-static int __init register_memory(void)
-{
-       code_resource.start = ia64_tpa(_text);
-       code_resource.end   = ia64_tpa(_etext) - 1;
-       data_resource.start = ia64_tpa(_etext);
-       data_resource.end   = ia64_tpa(_end) - 1;
-       efi_initialize_iomem_resources(&code_resource, &data_resource);
-
-       return 0;
-}
-
-__initcall(register_memory);
-
 /**
  * reserve_memory - setup reserved memory areas
  *
@@ -247,9 +199,6 @@
        }
 #endif
 
-       efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end);
-       n++;
-
        /* end of memory marker */
        rsvd_region[n].start = ~0UL;
        rsvd_region[n].end   = ~0UL;
@@ -283,31 +232,28 @@
 static void __init
 io_port_init (void)
 {
+       extern unsigned long ia64_iobase;
        unsigned long phys_iobase;
 
        /*
-        * Set `iobase' based on the EFI memory map or, failing that, the
-        * value firmware left in ar.k0.
+        *  Set `iobase' to the appropriate address in region 6 (uncached 
access range).
         *
-        * Note that in ia32 mode, IN/OUT instructions use ar.k0 to compute
-        * the port's virtual address, so ia32_load_state() loads it with a
-        * user virtual address.  But in ia64 mode, glibc uses the
-        * *physical* address in ar.k0 to mmap the appropriate area from
-        * /dev/mem, and the inX()/outX() interfaces use MMIO.  In both
-        * cases, user-mode can only use the legacy 0-64K I/O port space.
-        *
-        * ar.k0 is not involved in kernel I/O port accesses, which can use
-        * any of the I/O port spaces and are done via MMIO using the
-        * virtual mmio_base from the appropriate io_space[].
+        *  The EFI memory map is the "preferred" location to get the I/O port 
space base,
+        *  rather the relying on AR.KR0. This should become more clear in 
future SAL
+        *  specs. We'll fall back to getting it out of AR.KR0 if no 
appropriate entry is
+        *  found in the memory map.
         */
        phys_iobase = efi_get_iobase();
-       if (!phys_iobase) {
+       if (phys_iobase)
+               /* set AR.KR0 since this is all we use it for anyway */
+               ia64_set_kr(IA64_KR_IO_BASE, phys_iobase);
+       else {
                phys_iobase = ia64_get_kr(IA64_KR_IO_BASE);
-               printk(KERN_INFO "No I/O port range found in EFI memory map, "
-                       "falling back to AR.KR0 (0x%lx)\n", phys_iobase);
+               printk(KERN_INFO "No I/O port range found in EFI memory map, 
falling back "
+                      "to AR.KR0\n");
+               printk(KERN_INFO "I/O port base = 0x%lx\n", phys_iobase);
        }
        ia64_iobase = (unsigned long) ioremap(phys_iobase, 0);
-       ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase));
 
        /* setup legacy IO port space */
        io_space[0].mmio_base = ia64_iobase;
@@ -327,29 +273,26 @@
 static inline int __init
 early_console_setup (char *cmdline)
 {
-       int earlycons = 0;
-
 #ifdef CONFIG_XEN
-       if (!early_xen_console_setup(cmdline))
-               earlycons++;
+       if (!early_xen_console_setup(cmdline)) return 0;
 #endif
 #ifdef CONFIG_SERIAL_SGI_L1_CONSOLE
        {
                extern int sn_serial_console_early_setup(void);
                if (!sn_serial_console_early_setup())
-                       earlycons++;
+                       return 0;
        }
 #endif
 #ifdef CONFIG_EFI_PCDP
        if (!efi_setup_pcdp_console(cmdline))
-               earlycons++;
+               return 0;
 #endif
 #ifdef CONFIG_SERIAL_8250_CONSOLE
        if (!early_serial_console_init(cmdline))
-               earlycons++;
-#endif
-
-       return (earlycons) ? 0 : -1;
+               return 0;
+#endif
+
+       return -1;
 }
 
 static inline void
@@ -430,7 +373,7 @@
        if (early_console_setup(*cmdline_p) == 0)
                mark_bsp_online();
 
-#ifdef CONFIG_ACPI
+#ifdef CONFIG_ACPI_BOOT
        /* Initialize the ACPI boot-time table parser */
        acpi_table_init();
 # ifdef CONFIG_ACPI_NUMA
@@ -465,9 +408,8 @@
 #endif
 
        cpu_init();     /* initialize the bootstrap CPU */
-       mmu_context_init();     /* initialize context_id bitmap */
-
-#ifdef CONFIG_ACPI
+
+#ifdef CONFIG_ACPI_BOOT
        acpi_boot_init();
 #endif
 
@@ -573,7 +515,7 @@
                   c->itc_freq / 1000000, c->itc_freq % 1000000,
                   lpj*HZ/500000, (lpj*HZ/5000) % 100);
 #ifdef CONFIG_SMP
-       seq_printf(m, "siblings   : %u\n", cpus_weight(cpu_core_map[cpunum]));
+       seq_printf(m, "siblings   : %u\n", c->num_log);
        if (c->threads_per_core > 1 || c->cores_per_socket > 1)
                seq_printf(m,
                           "physical id: %u\n"
@@ -683,12 +625,6 @@
        /* start_kernel() requires this... */
 }
 
-/*
- * Calculate the max. cache line size.
- *
- * In addition, the minimum of the i-cache stride sizes is calculated for
- * "flush_icache_range()".
- */
 static void
 get_max_cacheline_size (void)
 {
@@ -702,8 +638,6 @@
                 printk(KERN_ERR "%s: ia64_pal_cache_summary() failed 
(status=%ld)\n",
                        __FUNCTION__, status);
                 max = SMP_CACHE_BYTES;
-               /* Safest setup for "flush_icache_range()" */
-               ia64_i_cache_stride_shift = I_CACHE_STRIDE_SHIFT;
                goto out;
         }
 
@@ -712,31 +646,14 @@
                                                    &cci);
                if (status != 0) {
                        printk(KERN_ERR
-                              "%s: ia64_pal_cache_config_info(l=%lu, 2) failed 
(status=%ld)\n",
+                              "%s: ia64_pal_cache_config_info(l=%lu) failed 
(status=%ld)\n",
                               __FUNCTION__, l, status);
                        max = SMP_CACHE_BYTES;
-                       /* The safest setup for "flush_icache_range()" */
-                       cci.pcci_stride = I_CACHE_STRIDE_SHIFT;
-                       cci.pcci_unified = 1;
                }
                line_size = 1 << cci.pcci_line_size;
                if (line_size > max)
                        max = line_size;
-               if (!cci.pcci_unified) {
-                       status = ia64_pal_cache_config_info(l,
-                                                   /* cache_type 
(instruction)= */ 1,
-                                                   &cci);
-                       if (status != 0) {
-                               printk(KERN_ERR
-                               "%s: ia64_pal_cache_config_info(l=%lu, 1) 
failed (status=%ld)\n",
-                                       __FUNCTION__, l, status);
-                               /* The safest setup for "flush_icache_range()" 
*/
-                               cci.pcci_stride = I_CACHE_STRIDE_SHIFT;
-                       }
-               }
-               if (cci.pcci_stride < ia64_i_cache_stride_shift)
-                       ia64_i_cache_stride_shift = cci.pcci_stride;
-       }
+        }
   out:
        if (max > ia64_max_cacheline_size)
                ia64_max_cacheline_size = max;
@@ -865,7 +782,6 @@
        /* size of physical stacked register partition plus 8 bytes: */
        __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8;
        platform_cpu_init();
-       pm_idle = default_idle;
 }
 
 void
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre
--- a/linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre        Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre        Thu Feb  2 
19:16:38 2006
@@ -13,10 +13,10 @@
        mv net net.xen-x86
        mv kernel kernel.xen-x86
        mv drivers/acpi/tables.c drivers/acpi/tables.c.xen-x86
-#      mv arch/xen/kernel drivers/xen/core
-#      mv arch/xen arch/xen.xen-x86
-#      mkdir arch/xen
-#      mv arch/xen.xen-x86/configs arch/xen
+       mv arch/xen/kernel drivers/xen/core
+       mv arch/xen arch/xen.xen-x86
+       mkdir arch/xen
+       mv arch/xen.xen-x86/configs arch/xen
 #      mv include/asm-generic include/asm-generic.xen-x86
        mv include/linux include/linux.xen-x86
        mkdir include/linux
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c
--- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c  Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c  Thu Feb  2 
19:16:38 2006
@@ -4,7 +4,7 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <asm/hw_irq.h>
-#include <xen/evtchn.h>
+#include <asm-xen/evtchn.h>
 
 #define MAX_EVTCHN 1024
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/ia64/xen/xenentry.S
--- a/linux-2.6-xen-sparse/arch/ia64/xen/xenentry.S     Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/xenentry.S     Thu Feb  2 19:16:38 2006
@@ -14,7 +14,7 @@
 #include <asm/cache.h>
 #include <asm/errno.h>
 #include <asm/kregs.h>
-#include <asm/asm-offsets.h>
+#include <asm/offsets.h>
 #include <asm/pgtable.h>
 #include <asm/percpu.h>
 #include <asm/processor.h>
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S
--- a/linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S       Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S       Thu Feb  2 19:16:38 2006
@@ -35,7 +35,7 @@
 #include <asm/break.h>
 #include <asm/ia32.h>
 #include <asm/kregs.h>
-#include <asm/asm-offsets.h>
+#include <asm/offsets.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/arch/x86_64/Kconfig
--- a/linux-2.6-xen-sparse/arch/x86_64/Kconfig  Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/Kconfig  Thu Feb  2 19:16:38 2006
@@ -69,10 +69,32 @@
        bool
        default y
 
+config DMI
+       bool
+       default y
+
 source "init/Kconfig"
 
 
 menu "Processor type and features"
+
+choice
+       prompt "Subarchitecture Type"
+       default X86_PC
+
+config X86_PC
+       bool "PC-compatible"
+       help
+         Choose this option if your computer is a standard PC or compatible.
+
+config X86_VSMP
+       bool "Support for ScaleMP vSMP"
+        help
+         Support for ScaleMP vSMP systems.  Say 'Y' here if this kernel is
+         supposed to run on these EM64T-based machines.  Only choose this 
option
+         if you have one of these machines.
+
+endchoice
 
 choice
        prompt "Processor family"
@@ -100,7 +122,6 @@
 config X86_64_XEN
        bool "Enable Xen compatible kernel"
        select SWIOTLB if XEN_PHYSDEV_ACCESS
-       select DUMMY_IOMMU if XEN_PHYSDEV_ACCESS
        help
          This option will compile a kernel compatible with Xen hypervisor
 
@@ -299,7 +320,11 @@
 
 config ARCH_SPARSEMEM_ENABLE
        def_bool y
-       depends on NUMA
+       depends on (NUMA || EXPERIMENTAL)
+
+config ARCH_MEMORY_PROBE
+       def_bool y
+       depends on MEMORY_HOTPLUG
 
 config ARCH_FLATMEM_ENABLE
        def_bool y
@@ -309,6 +334,7 @@
 
 config HAVE_ARCH_EARLY_PFN_TO_NID
        def_bool y
+       depends on NUMA
 
 config NR_CPUS
        int "Maximum number of CPUs (2-256)"
@@ -346,7 +372,7 @@
          <http://www.intel.com/hardwaredesign/hpetspec.htm>.
 
 config X86_PM_TIMER
-       bool "PM timer"
+       bool "PM timer" if EMBEDDED
        depends on ACPI && !X86_64_XEN
        default y
        help
@@ -365,32 +391,24 @@
        depends on HPET_TIMER && RTC=y
 
 config GART_IOMMU
-       bool "IOMMU support"
-       default y
+       bool "K8 GART IOMMU support"
+       default y
+       select SWIOTLB
        depends on PCI && !X86_64_XEN
        help
          Support the IOMMU. Needed to run systems with more than 3GB of memory
          properly with 32-bit PCI devices that do not support DAC (Double 
Address
          Cycle). The IOMMU can be turned off at runtime with the iommu=off 
parameter.
          Normally the kernel will take the right choice by itself.
-         This option includes a driver for the AMD Opteron/Athlon64 IOMMU
-         and a software emulation used on some other systems.
+         This option includes a driver for the AMD Opteron/Athlon64 
northbridge IOMMU
+         and a software emulation used on other systems.
          If unsure, say Y.
 
 # need this always enabled with GART_IOMMU for the VIA workaround
 config SWIOTLB
-       bool
-       depends on GART_IOMMU
-       default y
-
-config DUMMY_IOMMU
-       bool
-       depends on !GART_IOMMU && !SWIOTLB
-       default y
-       help
-         Don't use IOMMU code. This will cause problems when you have more 
than 4GB
-         of memory and any 32-bit devices. Don't turn on unless you know what 
you
-         are doing.
+       bool
+       default y
+       depends on GART_IOMMU
 
 config X86_MCE
        bool "Machine check support" if EMBEDDED
@@ -417,17 +435,6 @@
        help
           Additional support for AMD specific MCE features such as
           the DRAM Error Threshold.
-
-config PHYSICAL_START
-       hex "Physical address where the kernel is loaded" if EMBEDDED
-       default "0x100000"
-       help
-         This gives the physical address where the kernel is loaded.
-         Primarily used in the case of kexec on panic where the
-         fail safe kernel needs to run at a different address than
-         the panic-ed kernel.
-
-         Don't change this unless you know what you are doing.
 
 config KEXEC
        bool "kexec system call (EXPERIMENTAL)"
@@ -445,6 +452,31 @@
          initially work for you.  It may help to enable device hotplugging
          support.  As of this writing the exact hardware interface is
          strongly in flux, so no good recommendation can be made.
+
+config CRASH_DUMP
+       bool "kernel crash dumps (EXPERIMENTAL)"
+       depends on EXPERIMENTAL
+       help
+               Generate crash dump after being started by kexec.
+
+config PHYSICAL_START
+       hex "Physical address where the kernel is loaded" if (EMBEDDED || 
CRASH_DUMP)
+       default "0x1000000" if CRASH_DUMP
+       default "0x100000"
+       help
+         This gives the physical address where the kernel is loaded. Normally
+         for regular kernels this value is 0x100000 (1MB). But in the case
+         of kexec on panic the fail safe kernel needs to run at a different
+         address than the panic-ed kernel. This option is used to set the load
+         address for kernels used to capture crash dump on being kexec'ed
+         after panic. The default value for crash dump kernels is
+         0x1000000 (16MB). This can also be set based on the "X" value as
+         specified in the "crashkernel=YM@XM" command line boot parameter
+         passed to the panic-ed kernel. Typically this parameter is set as
+         crashkernel=64M@16M. Please take a look at
+         Documentation/kdump/kdump.txt for more details about crash dumps.
+
+         Don't change this unless you know what you are doing.
 
 config SECCOMP
        bool "Enable seccomp to safely compute untrusted bytecode"
@@ -568,11 +600,6 @@
        depends on COMPAT && SYSVIPC
        default y
 
-config UID16
-       bool
-       depends on IA32_EMULATION
-       default y
-
 endmenu
 
 source "net/Kconfig"
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/arch/x86_64/Makefile
--- a/linux-2.6-xen-sparse/arch/x86_64/Makefile Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/Makefile Thu Feb  2 19:16:38 2006
@@ -31,6 +31,7 @@
 cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
 CFLAGS += $(cflags-y)
 
+CFLAGS += -m64
 CFLAGS += -mno-red-zone
 CFLAGS += -mcmodel=kernel
 CFLAGS += -pipe
@@ -38,8 +39,10 @@
 # actually it makes the kernel smaller too.
 CFLAGS += -fno-reorder-blocks  
 CFLAGS += -Wno-sign-compare
+ifneq ($(CONFIG_UNWIND_INFO),y)
+CFLAGS += -fno-asynchronous-unwind-tables
+endif
 ifneq ($(CONFIG_DEBUG_INFO),y)
-CFLAGS += -fno-asynchronous-unwind-tables
 # -fweb shrinks the kernel a bit, but the difference is very small
 # it also messes up debugging, so don't use it for now.
 #CFLAGS += $(call cc-option,-fweb)
@@ -49,6 +52,8 @@
 CFLAGS += $(call cc-option,-funit-at-a-time)
 # prevent gcc from generating any FP code by mistake
 CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
+
+AFLAGS += -m64
 
 head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o 
arch/x86_64/kernel/init_task.o
 
@@ -95,8 +100,11 @@
 bzdisk: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk
 
-install fdimage fdimage144 fdimage288: vmlinux
+fdimage fdimage144 fdimage288: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
+
+install:
+       $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ 
 endif
 
 archclean:
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/ia32/Makefile
--- a/linux-2.6-xen-sparse/arch/x86_64/ia32/Makefile    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/ia32/Makefile    Thu Feb  2 19:16:38 2006
@@ -2,9 +2,9 @@
 # Makefile for the ia32 kernel emulation subsystem.
 #
 
-obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_ioctl.o \
-       ia32_signal.o tls32.o \
-       ia32_binfmt.o fpu32.o ptrace32.o syscall32.o syscall32_syscall.o
+obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o tls32.o \
+       ia32_binfmt.o fpu32.o ptrace32.o syscall32.o syscall32_syscall.o \
+       mmap32.o
 
 sysv-$(CONFIG_SYSVIPC) := ipc32.o
 obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
@@ -30,7 +30,6 @@
 
 AFLAGS_vsyscall-sysenter.o = -m32 -Iarch/i386/kernel
 AFLAGS_vsyscall-syscall.o = -m32 -Iarch/i386/kernel
-CFLAGS_ia32_ioctl.o += -Ifs/
 
 ifdef CONFIG_XEN
 AFLAGS_vsyscall-int80.o = -m32 -Iarch/i386/kernel
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/ia32/ia32entry-xen.S
--- a/linux-2.6-xen-sparse/arch/x86_64/ia32/ia32entry-xen.S     Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/ia32/ia32entry-xen.S     Thu Feb  2 
19:16:38 2006
@@ -51,6 +51,18 @@
 #define __cli          cli
 #define __sti          sti     
 #endif                 
+
+       .macro CFI_STARTPROC32 simple
+       CFI_STARTPROC   \simple
+       CFI_UNDEFINED   r8
+       CFI_UNDEFINED   r9
+       CFI_UNDEFINED   r10
+       CFI_UNDEFINED   r11
+       CFI_UNDEFINED   r12
+       CFI_UNDEFINED   r13
+       CFI_UNDEFINED   r14
+       CFI_UNDEFINED   r15
+       .endm
 
 /*
  * 32bit SYSENTER instruction entry.
@@ -72,7 +84,7 @@
  * with the int 0x80 path.
  */    
 ENTRY(ia32_sysenter_target)
-       CFI_STARTPROC   simple
+       CFI_STARTPROC32 simple
        CFI_DEF_CFA     rsp,0
        CFI_REGISTER    rsp,rbp
        __swapgs 
@@ -110,6 +122,7 @@
        .quad 1b,ia32_badarg
        .previous       
        GET_THREAD_INFO(%r10)
+       orl    $TS_COMPAT,threadinfo_status(%r10)
        testl  
$(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
        CFI_REMEMBER_STATE
        jnz  sysenter_tracesys
@@ -124,6 +137,7 @@
        __cli
        testl   $_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
        jnz     int_ret_from_sys_call
+       andl    $~TS_COMPAT,threadinfo_status(%r10)
        /* clear IF, that popfq doesn't enable interrupts early */
        andl  $~0x200,EFLAGS-R11(%rsp) 
        RESTORE_ARGS 1,24,1,1,1,1
@@ -181,7 +195,7 @@
  * with the int 0x80 path.     
  */    
 ENTRY(ia32_cstar_target)
-       CFI_STARTPROC   simple
+       CFI_STARTPROC32 simple
        CFI_DEF_CFA     rsp,0
        CFI_REGISTER    rip,rcx
        /*CFI_REGISTER  rflags,r11*/
@@ -212,6 +226,7 @@
        .quad 1b,ia32_badarg
        .previous       
        GET_THREAD_INFO(%r10)
+       orl   $TS_COMPAT,threadinfo_status(%r10)
        testl 
$(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
        CFI_REMEMBER_STATE
        jnz   cstar_tracesys
@@ -226,6 +241,7 @@
        __cli
        testl $_TIF_ALLWORK_MASK,threadinfo_flags(%r10)
        jnz  int_ret_from_sys_call
+       andl $~TS_COMPAT,threadinfo_status(%r10)
        RESTORE_ARGS 1,-ARG_SKIP,1,1,1
        movl RIP-ARGOFFSET(%rsp),%ecx
        CFI_REGISTER rip,rcx
@@ -303,6 +319,7 @@
           this could be a problem. */
        SAVE_ARGS 0,0,1
        GET_THREAD_INFO(%r10)
+       orl   $TS_COMPAT,threadinfo_status(%r10)
        testl 
$(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10)
        jnz ia32_tracesys
 ia32_do_syscall:       
@@ -345,7 +362,7 @@
        jmp  ia32_ptregs_common 
        .endm
 
-       CFI_STARTPROC
+       CFI_STARTPROC32
 
        PTREGSCALL stub32_rt_sigreturn, sys32_rt_sigreturn, %rdi
        PTREGSCALL stub32_sigreturn, sys32_sigreturn, %rdi
@@ -360,15 +377,26 @@
 
 ENTRY(ia32_ptregs_common)
        popq %r11
-       CFI_ADJUST_CFA_OFFSET -8
-       CFI_REGISTER rip, r11
+       CFI_ENDPROC
+       CFI_STARTPROC32 simple
+       CFI_DEF_CFA     rsp,SS+8-ARGOFFSET
+       CFI_REL_OFFSET  rax,RAX-ARGOFFSET
+       CFI_REL_OFFSET  rcx,RCX-ARGOFFSET
+       CFI_REL_OFFSET  rdx,RDX-ARGOFFSET
+       CFI_REL_OFFSET  rsi,RSI-ARGOFFSET
+       CFI_REL_OFFSET  rdi,RDI-ARGOFFSET
+       CFI_REL_OFFSET  rip,RIP-ARGOFFSET
+/*     CFI_REL_OFFSET  cs,CS-ARGOFFSET*/
+/*     CFI_REL_OFFSET  rflags,EFLAGS-ARGOFFSET*/
+       CFI_REL_OFFSET  rsp,RSP-ARGOFFSET
+/*     CFI_REL_OFFSET  ss,SS-ARGOFFSET*/
        SAVE_REST
        call *%rax
        RESTORE_REST
        jmp  ia32_sysret        /* misbalances the return cache */
        CFI_ENDPROC
 
-       .data
+       .section .rodata,"a"
        .align 8
        .globl ia32_sys_call_table
 ia32_sys_call_table:
@@ -635,7 +663,7 @@
        .quad sys_epoll_wait
        .quad sys_remap_file_pages
        .quad sys_set_tid_address
-       .quad sys32_timer_create
+       .quad compat_sys_timer_create
        .quad compat_sys_timer_settime  /* 260 */
        .quad compat_sys_timer_gettime
        .quad sys_timer_getoverrun
@@ -670,6 +698,20 @@
        .quad sys_inotify_init
        .quad sys_inotify_add_watch
        .quad sys_inotify_rm_watch
+       .quad sys_migrate_pages
+       .quad compat_sys_openat         /* 295 */
+       .quad sys_mkdirat
+       .quad sys_mknodat
+       .quad sys_fchownat
+       .quad sys_futimesat
+       .quad compat_sys_newfstatat     /* 300 */
+       .quad sys_unlinkat
+       .quad sys_renameat
+       .quad sys_linkat
+       .quad sys_symlinkat
+       .quad sys_readlinkat            /* 305 */
+       .quad sys_fchmodat
+       .quad sys_faccessat
 ia32_syscall_end:              
        .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8
                .quad ni_syscall
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/ia32/vsyscall-int80.S
--- a/linux-2.6-xen-sparse/arch/x86_64/ia32/vsyscall-int80.S    Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/ia32/vsyscall-int80.S    Thu Feb  2 
19:16:38 2006
@@ -9,6 +9,7 @@
 #include <asm/ia32_unistd.h>
 #include <asm/asm-offsets.h>
 
+       .code32
        .text
        .section .text.vsyscall,"ax"
        .globl __kernel_vsyscall
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/ia32/vsyscall-sigreturn.S
--- a/linux-2.6-xen-sparse/arch/x86_64/ia32/vsyscall-sigreturn.S        Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/ia32/vsyscall-sigreturn.S        Thu Feb 
 2 19:16:38 2006
@@ -7,6 +7,7 @@
  * by doing ".balign 32" must match in both versions of the page.
  */
 
+       .code32
        .section .text.sigreturn,"ax"
        .balign 32
        .globl __kernel_sigreturn
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile  Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile  Thu Feb  2 19:16:38 2006
@@ -7,7 +7,8 @@
 obj-y  := process.o signal.o entry.o traps.o irq.o \
                ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \
                x8664_ksyms.o i387.o syscall.o vsyscall.o \
-               setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o
+               setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o \
+               dmi_scan.o pci-dma.o pci-nommu.o
 
 obj-$(CONFIG_X86_MCE)         += mce.o
 obj-$(CONFIG_X86_MCE_INTEL)    += mce_intel.o
@@ -23,15 +24,17 @@
 obj-$(CONFIG_X86_IO_APIC)      += io_apic.o mpparse.o \
                genapic.o genapic_cluster.o genapic_flat.o
 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o crash.o
+obj-$(CONFIG_CRASH_DUMP)       += crash_dump.o
 obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o
 obj-$(CONFIG_ACPI_SLEEP)       += suspend.o
 obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o
 obj-$(CONFIG_CPU_FREQ)         += cpufreq/
 obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
 obj-$(CONFIG_GART_IOMMU)       += pci-gart.o aperture.o
-obj-$(CONFIG_DUMMY_IOMMU)      += pci-nommu.o pci-dma.o
+obj-$(CONFIG_SWIOTLB)          += pci-swiotlb.o
 obj-$(CONFIG_KPROBES)          += kprobes.o
 obj-$(CONFIG_X86_PM_TIMER)     += pmtimer.o
+obj-$(CONFIG_X86_VSMP)         += vsmp.o
 
 obj-$(CONFIG_MODULES)          += module.o
 
@@ -48,6 +51,7 @@
 quirks-y                       += ../../i386/kernel/quirks.o
 i8237-y                                += ../../i386/kernel/i8237.o
 msr-$(subst m,y,$(CONFIG_X86_MSR))  += ../../i386/kernel/msr.o
+dmi_scan-y                     += ../../i386/kernel/dmi_scan.o
 
 ifdef CONFIG_XEN
 time-y                         += ../../i386/kernel/time-xen.o
@@ -55,7 +59,7 @@
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  := 
../../i386/kernel/microcode-xen.o
 quirks-y                       := ../../i386/kernel/quirks-xen.o
 
-n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o
+n-obj-xen := i8259.o reboot.o i8237.o smpboot.o trampoline.o pci-swiotlb.o
 
 include $(srctree)/scripts/Makefile.xen
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/apic-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/apic-xen.c        Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/apic-xen.c        Thu Feb  2 
19:16:38 2006
@@ -25,6 +25,7 @@
 #include <linux/mc146818rtc.h>
 #include <linux/kernel_stat.h>
 #include <linux/sysdev.h>
+#include <linux/module.h>
 
 #include <asm/atomic.h>
 #include <asm/smp.h>
@@ -33,6 +34,7 @@
 #include <asm/desc.h>
 #include <asm/arch_hooks.h>
 #include <asm/hpet.h>
+#include <asm/idle.h>
 
 /*
  * Debug level
@@ -42,35 +44,12 @@
 
 void smp_local_timer_interrupt(struct pt_regs *regs)
 {
-
        profile_tick(CPU_PROFILING, regs);
 #ifndef CONFIG_XEN
-       int cpu = smp_processor_id();
-
-       if (--per_cpu(prof_counter, cpu) <= 0) {
-               /*
-                * The multiplier may have changed since the last time we got
-                * to this point as a result of the user writing to
-                * /proc/profile. In this case we need to adjust the APIC
-                * timer accordingly.
-                *
-                * Interrupts are already masked off at this point.
-                */
-               per_cpu(prof_counter, cpu) = per_cpu(prof_multiplier, cpu);
-               if (per_cpu(prof_counter, cpu) != 
-                   per_cpu(prof_old_multiplier, cpu)) {
-                       __setup_APIC_LVTT(calibration_result/
-                                       per_cpu(prof_counter, cpu));
-                       per_cpu(prof_old_multiplier, cpu) =
-                               per_cpu(prof_counter, cpu);
-               }
-
 #ifdef CONFIG_SMP
                update_process_times(user_mode(regs));
 #endif
-       }
 #endif
-
        /*
         * We take the 'long' return path, and there every subsystem
         * grabs the appropriate locks (kernel lock/ irq lock).
@@ -108,6 +87,7 @@
         * Besides, if we don't timer interrupts ignore the global
         * interrupt lock, which is the WrongThing (tm) to do.
         */
+       exit_idle();
        irq_enter();
        smp_local_timer_interrupt(regs);
        irq_exit();
@@ -119,6 +99,7 @@
 asmlinkage void smp_spurious_interrupt(void)
 {
        unsigned int v;
+       exit_idle();
        irq_enter();
        /*
         * Check if this really is a spurious interrupt and ACK it
@@ -154,6 +135,7 @@
 {
        unsigned int v, v1;
 
+       exit_idle();
        irq_enter();
        /* First tickle the hardware, only then report what went on. -- REW */
        v = apic_read(APIC_ESR);
@@ -182,6 +164,13 @@
         return 0xff;
 }
 
+#ifdef CONFIG_XEN
+void switch_APIC_timer_to_ipi(void *cpumask) { }
+EXPORT_SYMBOL(switch_APIC_timer_to_ipi);
+void switch_ipi_to_APIC_timer(void *cpumask) { }
+EXPORT_SYMBOL(switch_ipi_to_APIC_timer);
+#endif
+
 /*
  * This initializes the IO-APIC and APIC hardware if this is
  * a UP kernel.
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c        Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c        Thu Feb  2 
19:16:38 2006
@@ -276,6 +276,7 @@
                }
        }
 }
+#endif /* CONFIG_XEN */
 
 void __init e820_print_map(char *who)
 {
@@ -303,6 +304,7 @@
        }
 }
 
+#ifndef CONFIG_XEN
 /*
  * Sanitize the BIOS e820 map.
  *
@@ -660,6 +662,27 @@
        xen_override_max_pfn = (unsigned long) end_user_pfn;
 } 
 
+void __init parse_memmapopt(char *p, char **from)
+{
+       unsigned long long start_at, mem_size;
+
+       mem_size = memparse(p, from);
+       p = *from;
+       if (*p == '@') {
+               start_at = memparse(p+1, from);
+               add_memory_region(start_at, mem_size, E820_RAM);
+       } else if (*p == '#') {
+               start_at = memparse(p+1, from);
+               add_memory_region(start_at, mem_size, E820_ACPI);
+       } else if (*p == '$') {
+               start_at = memparse(p+1, from);
+               add_memory_region(start_at, mem_size, E820_RESERVED);
+       } else {
+               end_user_pfn = (mem_size >> PAGE_SHIFT);
+       }
+       p = *from;
+}
+
 /*
  * Search for the biggest gap in the low 32 bits of the e820
  * memory space.  We pass this space to PCI to assign MMIO resources
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/early_printk-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/early_printk-xen.c        Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/early_printk-xen.c        Thu Feb 
 2 19:16:38 2006
@@ -251,7 +251,7 @@
        va_end(ap); 
 } 
 
-static int keep_early; 
+static int __initdata keep_early;
 
 int __init setup_early_printk(char *opt) 
 {  
@@ -260,8 +260,6 @@
 
        if (early_console_initialized)
                return -1;
-
-       opt = strchr(opt, '=') + 1;
 
        strlcpy(buf,opt,sizeof(buf)); 
        space = strchr(buf, ' '); 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Thu Feb  2 
19:16:38 2006
@@ -48,6 +48,7 @@
 #include <asm/unistd.h>
 #include <asm/thread_info.h>
 #include <asm/hw_irq.h>
+#include <asm/page.h>
 #include <asm/errno.h>
 #include <xen/interface/arch-x86_64.h>
 
@@ -334,6 +335,7 @@
        movl threadinfo_flags(%rcx),%edx
        andl %edi,%edx
        jnz   int_careful
+       andl    $~TS_COMPAT,threadinfo_status(%rcx)
        jmp   retint_restore_args
 
        /* Either reschedule or signal or syscall exit tracking needed. */
@@ -679,27 +681,40 @@
        CFI_ENDPROC
        .endm
 
-#if 0
+#if 0 /* not XEN */
        /* error code is on the stack already */
        /* handle NMI like exceptions that can happen everywhere */
-       .macro paranoidentry sym
+       .macro paranoidentry sym, ist=0
         movq (%rsp),%rcx
         movq 8(%rsp),%r11
         addq $0x10,%rsp /* skip rcx and r11 */        
        SAVE_ALL
        cld
+#if 0 /* not XEN */
        movl $1,%ebx
        movl  $MSR_GS_BASE,%ecx
        rdmsr
        testl %edx,%edx
        js    1f
-/*     swapgs */
+       swapgs
        xorl  %ebx,%ebx
-1:     movq %rsp,%rdi
+1:
+#endif
+       .if \ist
+       movq    %gs:pda_data_offset, %rbp
+       .endif
+       movq %rsp,%rdi
        movq ORIG_RAX(%rsp),%rsi
        movq $-1,ORIG_RAX(%rsp)
+       .if \ist
+       subq    $EXCEPTION_STKSZ, per_cpu__init_tss + TSS_ist + (\ist - 1) * 
8(%rbp)
+       .endif
        call \sym
-       cli
+       .if \ist
+       addq    $EXCEPTION_STKSZ, per_cpu__init_tss + TSS_ist + (\ist - 1) * 
8(%rbp)
+       .endif
+/*     cli */
+       XEN_BLOCK_EVENTS(%rsi)          
        .endm
 #endif
        
@@ -1057,7 +1072,12 @@
 #endif        
 
 KPROBE_ENTRY(int3)
-       zeroentry do_int3       
+       INTR_FRAME
+/*     pushq $0
+       CFI_ADJUST_CFA_OFFSET 8 */
+       zeroentry do_int3
+/*     jmp paranoid_exit */
+       CFI_ENDPROC
        .previous .text
 
 ENTRY(overflow)
@@ -1120,24 +1140,18 @@
        CFI_ENDPROC
 #endif
 
-ENTRY(call_debug)
-       zeroentry do_call_debug
-
-
 ENTRY(call_softirq)
        CFI_STARTPROC
        movq %gs:pda_irqstackptr,%rax
-       pushq %r15
-       CFI_ADJUST_CFA_OFFSET 8
-       movq %rsp,%r15
-       CFI_DEF_CFA_REGISTER    r15
+       movq %rsp,%rdx
+       CFI_DEF_CFA_REGISTER    rdx
        incl %gs:pda_irqcount
        cmove %rax,%rsp
+       pushq %rdx
+       /*todo CFI_DEF_CFA_EXPRESSION ...*/
        call __do_softirq
-       movq %r15,%rsp
+       popq %rsp
        CFI_DEF_CFA_REGISTER    rsp
        decl %gs:pda_irqcount
-       popq %r15
-       CFI_ADJUST_CFA_OFFSET -8
        ret
        CFI_ENDPROC
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S        Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S        Thu Feb  2 
19:16:38 2006
@@ -22,7 +22,6 @@
        .ascii  ",HYPERCALL_PAGE=0x10d" /* __pa(hypercall_page) >> 12 */
        .ascii  ",LOADER=generic"
        .byte   0
-                
       
 #include <linux/threads.h>
 #include <linux/init.h>
@@ -93,14 +92,15 @@
 ENTRY(stext)
 ENTRY(_stext)
 
-       /*
-        * This default setting generates an ident mapping at address 0x100000
-        * and a mapping for the kernel that precisely maps virtual address
-        * 0xffffffff80000000 to physical address 0x000000. (always using
-        * 2Mbyte large pages provided by PAE mode)
-        */
-.org 0x1000
-ENTRY(init_level4_pgt)
+       $page = 0
+#define NEXT_PAGE(name) \
+       $page = $page + 1; \
+       .org $page * 0x1000; \
+       phys_/**/name = $page * 0x1000 + __PHYSICAL_START; \
+ENTRY(name)
+
+NEXT_PAGE(init_level4_pgt)
+       /* This gets initialized in x86_64_start_kernel */
        .fill   512,8,0
 
         /*
@@ -110,73 +110,39 @@
          * We also use this page to establish the initiali mapping for
          * vsyscall area.
          */
-.org 0x2000
-ENTRY(init_level4_user_pgt)
+NEXT_PAGE(init_level4_user_pgt)
        .fill   512,8,0
 
        /*
         * In Xen the following pre-initialized pgt entries are re-initialized.
         */
-.org 0x3000
-ENTRY(level3_kernel_pgt)
+NEXT_PAGE(level3_kernel_pgt)
        .fill   510,8,0
        /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */
-       .quad   0x0000000000005007 + __PHYSICAL_START   /* -> level2_kernel_pgt 
*/
+       .quad   phys_level2_kernel_pgt | 0x007
        .fill   1,8,0
 
-.org 0x4000
-ENTRY(level2_ident_pgt)
+NEXT_PAGE(level2_ident_pgt)
        /* 40MB for bootup.     */
-       .quad   0x0000000000000083
-       .quad   0x0000000000200083
-       .quad   0x0000000000400083
-       .quad   0x0000000000600083
-       .quad   0x0000000000800083
-       .quad   0x0000000000A00083
-       .quad   0x0000000000C00083
-       .quad   0x0000000000E00083
-       .quad   0x0000000001000083
-       .quad   0x0000000001200083
-       .quad   0x0000000001400083
-       .quad   0x0000000001600083
-       .quad   0x0000000001800083
-       .quad   0x0000000001A00083
-       .quad   0x0000000001C00083
-       .quad   0x0000000001E00083
-       .quad   0x0000000002000083
-       .quad   0x0000000002200083
-       .quad   0x0000000002400083
-       .quad   0x0000000002600083
+       i = 0
+       .rept 20
+       .quad   i << 21 | 0x083
+       i = i + 1
+       .endr
        /* Temporary mappings for the super early allocator in 
arch/x86_64/mm/init.c */
        .globl temp_boot_pmds
 temp_boot_pmds:
        .fill   492,8,0
 
-.org 0x5000
-ENTRY(level2_kernel_pgt)
+NEXT_PAGE(level2_kernel_pgt)
        /* 40MB kernel mapping. The kernel code cannot be bigger than that.
           When you change this change KERNEL_TEXT_SIZE in page.h too. */
        /* (2^48-(2*1024*1024*1024)-((2^39)*511)-((2^30)*510)) = 0 */
-       .quad   0x0000000000000183
-       .quad   0x0000000000200183
-       .quad   0x0000000000400183
-       .quad   0x0000000000600183
-       .quad   0x0000000000800183
-       .quad   0x0000000000A00183
-       .quad   0x0000000000C00183
-       .quad   0x0000000000E00183
-       .quad   0x0000000001000183
-       .quad   0x0000000001200183
-       .quad   0x0000000001400183
-       .quad   0x0000000001600183
-       .quad   0x0000000001800183
-       .quad   0x0000000001A00183
-       .quad   0x0000000001C00183
-       .quad   0x0000000001E00183
-       .quad   0x0000000002000183
-       .quad   0x0000000002200183
-       .quad   0x0000000002400183
-       .quad   0x0000000002600183
+       i = 0
+       .rept 20
+       .quad   i << 21 | 0x183
+       i = i + 1
+       .endr
        /* Module mapping starts here */
        .fill   492,8,0
        
@@ -184,19 +150,16 @@
          * This is used for vsyscall area mapping as we have a different
          * level4 page table for user.
          */
-.org 0x6000
-ENTRY(level3_user_pgt)
+NEXT_PAGE(level3_user_pgt)
         .fill  512,8,0
 
-.org 0x7000
-ENTRY(cpu_gdt_table)
+NEXT_PAGE(cpu_gdt_table)
 /* The TLS descriptors are currently at a different place compared to i386.
    Hopefully nobody expects them at a fixed place (Wine?) */
        .quad   0x0000000000000000      /* NULL descriptor */
-       .quad   0x008ffa000000ffff      /* __KERNEL_COMPAT32_CS */      
+       .quad   0x0                     /* unused */
        .quad   0x00affa000000ffff      /* __KERNEL_CS */
        .quad   0x00cff2000000ffff      /* __KERNEL_DS */
-       
                .quad   0x00cffa000000ffff      /* __USER32_CS */
        .quad   0x00cff2000000ffff      /* __USER_DS, __USER32_DS  */           
        .quad   0x00affa000000ffff      /* __USER_CS */
@@ -204,47 +167,45 @@
        .quad   0,0                     /* TSS */
        .quad   0,0                     /* LDT */
        .quad   0,0,0                   /* three TLS descriptors */ 
-       .quad   0                       /* unused now?   __KERNEL16_CS - 16bit 
PM for S3 wakeup. */
-
+       .quad   0                       /* unused */
 gdt_end:
 #if 0
        /* asm/segment.h:GDT_ENTRIES must match this */ 
        /* This should be a multiple of the cache line size */
-       /* GDTs of other CPUs: */       
-       .fill (GDT_SIZE * NR_CPUS) - (gdt_end - cpu_gdt_table)
-#endif
-
-.org 0x8000
-ENTRY(empty_zero_page)
-
-.org 0x9000
-ENTRY(empty_bad_page)
-
-.org 0xa000
-ENTRY(empty_bad_pte_table)
-
-.org 0xb000
-ENTRY(empty_bad_pmd_table)
-
-.org 0xc000
-ENTRY(level3_physmem_pgt)
-       .quad   0x0000000000005007 + __PHYSICAL_START   /* -> level2_kernel_pgt 
(so that __va works even before pagetable_init) */
-
-.org 0xd000
-ENTRY(hypercall_page)
-
-.org 0xe000
+       /* GDTs of other CPUs are now dynamically allocated */
+
+       /* zero the remaining page */
+       .fill PAGE_SIZE / 8 - GDT_ENTRIES,8,0
+#endif
+
+NEXT_PAGE(empty_zero_page)
+
+NEXT_PAGE(level3_physmem_pgt)
+       .quad   phys_level2_kernel_pgt | 0x007  /* so that __va works even 
before pagetable_init */
+
+NEXT_PAGE(hypercall_page)
+.if (phys_hypercall_page - 0x10a000)
+       /* cause compiler error if the hypercall_page is at a
+        * different address than expected. */
+       .quad   __adjust_hypercall_page_in_header
+.endif
+
+#undef NEXT_PAGE
+
+       .data
+
+#ifndef CONFIG_XEN
 #ifdef CONFIG_ACPI_SLEEP
+       .align PAGE_SIZE
 ENTRY(wakeup_level4_pgt)
-       .quad   0x0000000000002007 + __PHYSICAL_START   /* -> level3_ident_pgt 
*/
+       .quad   phys_level3_ident_pgt | 0x007
        .fill   255,8,0
-       .quad   0x000000000000a007 + __PHYSICAL_START
+       .quad   phys_level3_physmem_pgt | 0x007
        .fill   254,8,0
        /* (2^48-(2*1024*1024*1024))/(2^39) = 511 */
-       .quad   0x0000000000003007 + __PHYSICAL_START   /* -> level3_kernel_pgt 
*/
-#endif
-
-#ifndef CONFIG_XEN
+       .quad   phys_level3_kernel_pgt | 0x007
+#endif
+
 #ifndef CONFIG_HOTPLUG_CPU
        __INITDATA
 #endif
@@ -256,12 +217,12 @@
         */
        .align PAGE_SIZE
 ENTRY(boot_level4_pgt)
-       .quad   0x0000000000002007 + __PHYSICAL_START   /* -> level3_ident_pgt 
*/
+       .quad   phys_level3_ident_pgt | 0x007
        .fill   255,8,0
-       .quad   0x000000000000a007 + __PHYSICAL_START
+       .quad   phys_level3_physmem_pgt | 0x007
        .fill   254,8,0
        /* (2^48-(2*1024*1024*1024))/(2^39) = 511 */
-       .quad   0x0000000000003007 + __PHYSICAL_START   /* -> level3_kernel_pgt 
*/
+       .quad   phys_level3_kernel_pgt | 0x007
 #endif
 
        .data
@@ -284,10 +245,8 @@
  * Also sysret mandates a special GDT layout 
  */
                                
-#if 0                                  
-.align L1_CACHE_BYTES
-#endif
-       .align  L1_CACHE_BYTES
+.align PAGE_SIZE
+
 ENTRY(idt_table)       
        .rept   256
        .quad   0
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/head64-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/head64-xen.c      Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/head64-xen.c      Thu Feb  2 
19:16:38 2006
@@ -45,9 +45,9 @@
 
 extern char saved_command_line[];
 
-#if 0
 static void __init copy_bootdata(char *real_mode_data)
 {
+#if 0
        int new_data;
        char * command_line;
 
@@ -63,9 +63,17 @@
        }
        command_line = (char *) ((u64)(new_data));
        memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
-       printk("Bootdata ok (command line is %s)\n", saved_command_line);       
+       printk("Bootdata ok (command line is %s)\n", saved_command_line);
+#else
+       int max_cmdline;
+       
+       if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
+               max_cmdline = COMMAND_LINE_SIZE;
+       memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
+       saved_command_line[max_cmdline-1] = '\0';
+       printk("Bootdata ok (command line is %s)\n", saved_command_line);
+#endif
 }
-#endif
 
 static void __init setup_boot_cpu_data(void)
 {
@@ -87,6 +95,7 @@
 
 void __init x86_64_start_kernel(char * real_mode_data)
 {
+       char *s;
        int i;
 
        if (!xen_feature(XENFEAT_auto_translated_physmap)) {
@@ -101,16 +110,18 @@
 #if 0
        asm volatile("lidt %0" :: "m" (idt_descr));
 #endif
+
+       for (i = 0; i < NR_CPUS; i++)
+               cpu_pda(i) = &boot_cpu_pda[i];
+
        pda_init(0);
-        /*     copy_bootdata(real_mode_data); */
+       copy_bootdata(real_mode_data);
 #ifdef CONFIG_SMP
        cpu_set(0, cpu_online_map);
 #endif
-#if 0
        s = strstr(saved_command_line, "earlyprintk=");
        if (s != NULL)
-               setup_early_printk(s);
-#endif
+               setup_early_printk(strchr(s, '=') + 1);
 #ifdef CONFIG_NUMA
        s = strstr(saved_command_line, "numa=");
        if (s != NULL)
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c     Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c     Thu Feb  2 
19:16:38 2006
@@ -37,6 +37,7 @@
 #include <asm/proto.h>
 #include <asm/mach_apic.h>
 #include <asm/acpi.h>
+#include <asm/dma.h>
 
 #define __apicdebuginit  __init
 
@@ -45,6 +46,11 @@
 static int no_timer_check;
 
 int disable_timer_pin_1 __initdata;
+
+#ifndef CONFIG_XEN
+/* Where if anywhere is the i8259 connect in external int mode */
+static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
+#endif
 
 static DEFINE_SPINLOCK(ioapic_lock);
 
@@ -308,9 +314,6 @@
 void __init check_ioapic(void) 
 { 
        int num,slot,func; 
-       if (ioapic_force) 
-               return; 
-
        /* Poor man's PCI discovery */
        for (num = 0; num < 32; num++) { 
                for (slot = 0; slot < 32; slot++) { 
@@ -332,7 +335,7 @@
                                switch (vendor) { 
                                case PCI_VENDOR_ID_VIA:
 #ifdef CONFIG_GART_IOMMU
-                                       if ((end_pfn >= 
(0xffffffff>>PAGE_SHIFT) ||
+                                       if ((end_pfn > MAX_DMA32_PFN ||
                                             force_iommu) &&
                                            !iommu_aperture_allowed) {
                                                printk(KERN_INFO
@@ -412,7 +415,7 @@
 /*
  * Find the pin to which IRQ[irq] (ISA) is connected
  */
-static int find_isa_irq_pin(int irq, int type)
+static int __init find_isa_irq_pin(int irq, int type)
 {
        int i;
 
@@ -427,6 +430,31 @@
 
                        return mp_irqs[i].mpc_dstirq;
        }
+       return -1;
+}
+
+static int __init find_isa_irq_apic(int irq, int type)
+{
+       int i;
+
+       for (i = 0; i < mp_irq_entries; i++) {
+               int lbus = mp_irqs[i].mpc_srcbus;
+
+               if ((mp_bus_id_to_type[lbus] == MP_BUS_ISA ||
+                    mp_bus_id_to_type[lbus] == MP_BUS_EISA ||
+                    mp_bus_id_to_type[lbus] == MP_BUS_MCA) &&
+                   (mp_irqs[i].mpc_irqtype == type) &&
+                   (mp_irqs[i].mpc_srcbusirq == irq))
+                       break;
+       }
+       if (i < mp_irq_entries) {
+               int apic;
+               for(apic = 0; apic < nr_ioapics; apic++) {
+                       if (mp_ioapics[apic].mpc_apicid == 
mp_irqs[i].mpc_dstapic)
+                               return apic;
+               }
+       }
+
        return -1;
 }
 #endif
@@ -926,7 +954,7 @@
  * Set up the 8259A-master output pin as broadcast to all
  * CPUs.
  */
-static void __init setup_ExtINT_IRQ0_pin(unsigned int pin, int vector)
+static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, 
int vector)
 {
        struct IO_APIC_route_entry entry;
        unsigned long flags;
@@ -936,7 +964,7 @@
        disable_8259A_irq(0);
 
        /* mask LVT0 */
-       apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
+       apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
 
        /*
         * We use logical delivery to get the timer IRQ
@@ -960,8 +988,8 @@
         * Add it to the IO-APIC irq-routing table:
         */
        spin_lock_irqsave(&ioapic_lock, flags);
-       io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1));
-       io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0));
+       io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1));
+       io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0));
        spin_unlock_irqrestore(&ioapic_lock, flags);
 
        enable_8259A_irq(0);
@@ -1244,7 +1272,10 @@
 static void __init enable_IO_APIC(void)
 {
        union IO_APIC_reg_01 reg_01;
-       int i;
+#ifndef CONFIG_XEN
+       int i8259_apic, i8259_pin;
+#endif
+       int i, apic;
        unsigned long flags;
 
        for (i = 0; i < PIN_MAP_SIZE; i++) {
@@ -1258,12 +1289,51 @@
        /*
         * The number of IO-APIC IRQ registers (== #pins):
         */
-       for (i = 0; i < nr_ioapics; i++) {
+       for (apic = 0; apic < nr_ioapics; apic++) {
                spin_lock_irqsave(&ioapic_lock, flags);
-               reg_01.raw = io_apic_read(i, 1);
+               reg_01.raw = io_apic_read(apic, 1);
                spin_unlock_irqrestore(&ioapic_lock, flags);
-               nr_ioapic_registers[i] = reg_01.bits.entries+1;
-       }
+               nr_ioapic_registers[apic] = reg_01.bits.entries+1;
+       }
+#ifndef CONFIG_XEN
+       for(apic = 0; apic < nr_ioapics; apic++) {
+               int pin;
+               /* See if any of the pins is in ExtINT mode */
+               for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {
+                       struct IO_APIC_route_entry entry;
+                       spin_lock_irqsave(&ioapic_lock, flags);
+                       *(((int *)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * 
pin);
+                       *(((int *)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * 
pin);
+                       spin_unlock_irqrestore(&ioapic_lock, flags);
+
+
+                       /* If the interrupt line is enabled and in ExtInt mode
+                        * I have found the pin where the i8259 is connected.
+                        */
+                       if ((entry.mask == 0) && (entry.delivery_mode == 
dest_ExtINT)) {
+                               ioapic_i8259.apic = apic;
+                               ioapic_i8259.pin  = pin;
+                               goto found_i8259;
+                       }
+               }
+       }
+ found_i8259:
+       /* Look to see what if the MP table has reported the ExtINT */
+       i8259_pin  = find_isa_irq_pin(0, mp_ExtINT);
+       i8259_apic = find_isa_irq_apic(0, mp_ExtINT);
+       /* Trust the MP table if nothing is setup in the hardware */
+       if ((ioapic_i8259.pin == -1) && (i8259_pin >= 0)) {
+               printk(KERN_WARNING "ExtINT not setup in hardware but reported 
by MP table\n");
+               ioapic_i8259.pin  = i8259_pin;
+               ioapic_i8259.apic = i8259_apic;
+       }
+       /* Complain if the MP table and the hardware disagree */
+       if (((ioapic_i8259.apic != i8259_apic) || (ioapic_i8259.pin != 
i8259_pin)) &&
+               (i8259_pin >= 0) && (ioapic_i8259.pin >= 0))
+       {
+               printk(KERN_WARNING "ExtINT in hardware and MP table differ\n");
+       }
+#endif
 
        /*
         * Do not trust the IO-APIC being empty at bootup
@@ -1276,9 +1346,6 @@
  */
 void disable_IO_APIC(void)
 {
-#ifndef CONFIG_XEN
-       int pin;
-#endif
        /*
         * Clear the IO-APIC before rebooting:
         */
@@ -1290,8 +1357,7 @@
         * Put that IOAPIC in virtual wire mode
         * so legacy interrupts can be delivered.
         */
-       pin = find_isa_irq_pin(0, mp_ExtINT);
-       if (pin != -1) {
+       if (ioapic_i8259.pin != -1) {
                struct IO_APIC_route_entry entry;
                unsigned long flags;
 
@@ -1302,21 +1368,23 @@
                entry.polarity        = 0; /* High */
                entry.delivery_status = 0;
                entry.dest_mode       = 0; /* Physical */
-               entry.delivery_mode   = 7; /* ExtInt */
+               entry.delivery_mode   = dest_ExtINT; /* ExtInt */
                entry.vector          = 0;
-               entry.dest.physical.physical_dest = 0;
-
+               entry.dest.physical.physical_dest =
+                                       GET_APIC_ID(apic_read(APIC_ID));
 
                /*
                 * Add it to the IO-APIC irq-routing table:
                 */
                spin_lock_irqsave(&ioapic_lock, flags);
-               io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1));
-               io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0));
+               io_apic_write(ioapic_i8259.apic, 0x11+2*ioapic_i8259.pin,
+                       *(((int *)&entry)+1));
+               io_apic_write(ioapic_i8259.apic, 0x10+2*ioapic_i8259.pin,
+                       *(((int *)&entry)+0));
                spin_unlock_irqrestore(&ioapic_lock, flags);
        }
 
-       disconnect_bsp_APIC(pin != -1);
+       disconnect_bsp_APIC(ioapic_i8259.pin != -1);
 #endif
 }
 
@@ -1640,7 +1708,7 @@
        unsigned long v;
 
        v = apic_read(APIC_LVT0);
-       apic_write_around(APIC_LVT0, v & ~APIC_LVT_MASKED);
+       apic_write(APIC_LVT0, v & ~APIC_LVT_MASKED);
 }
 
 static void disable_lapic_irq (unsigned int irq)
@@ -1648,7 +1716,7 @@
        unsigned long v;
 
        v = apic_read(APIC_LVT0);
-       apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED);
+       apic_write(APIC_LVT0, v | APIC_LVT_MASKED);
 }
 
 static void ack_lapic_irq (unsigned int irq)
@@ -1695,20 +1763,21 @@
  */
 static inline void unlock_ExtINT_logic(void)
 {
-       int pin, i;
+       int apic, pin, i;
        struct IO_APIC_route_entry entry0, entry1;
        unsigned char save_control, save_freq_select;
        unsigned long flags;
 
-       pin = find_isa_irq_pin(8, mp_INT);
+       pin  = find_isa_irq_pin(8, mp_INT);
+       apic = find_isa_irq_apic(8, mp_INT);
        if (pin == -1)
                return;
 
        spin_lock_irqsave(&ioapic_lock, flags);
-       *(((int *)&entry0) + 1) = io_apic_read(0, 0x11 + 2 * pin);
-       *(((int *)&entry0) + 0) = io_apic_read(0, 0x10 + 2 * pin);
+       *(((int *)&entry0) + 1) = io_apic_read(apic, 0x11 + 2 * pin);
+       *(((int *)&entry0) + 0) = io_apic_read(apic, 0x10 + 2 * pin);
        spin_unlock_irqrestore(&ioapic_lock, flags);
-       clear_IO_APIC_pin(0, pin);
+       clear_IO_APIC_pin(apic, pin);
 
        memset(&entry1, 0, sizeof(entry1));
 
@@ -1721,8 +1790,8 @@
        entry1.vector = 0;
 
        spin_lock_irqsave(&ioapic_lock, flags);
-       io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry1) + 1));
-       io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry1) + 0));
+       io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry1) + 1));
+       io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry1) + 0));
        spin_unlock_irqrestore(&ioapic_lock, flags);
 
        save_control = CMOS_READ(RTC_CONTROL);
@@ -1740,11 +1809,11 @@
 
        CMOS_WRITE(save_control, RTC_CONTROL);
        CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
-       clear_IO_APIC_pin(0, pin);
+       clear_IO_APIC_pin(apic, pin);
 
        spin_lock_irqsave(&ioapic_lock, flags);
-       io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry0) + 1));
-       io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry0) + 0));
+       io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry0) + 1));
+       io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry0) + 0));
        spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
@@ -1756,7 +1825,7 @@
  */
 static inline void check_timer(void)
 {
-       int pin1, pin2;
+       int apic1, pin1, apic2, pin2;
        int vector;
 
        /*
@@ -1773,14 +1842,17 @@
         * the 8259A which implies the virtual wire has to be
         * disabled in the local APIC.
         */
-       apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
+       apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
        init_8259A(1);
        enable_8259A_irq(0);
 
-       pin1 = find_isa_irq_pin(0, mp_INT);
-       pin2 = find_isa_irq_pin(0, mp_ExtINT);
-
-       apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X pin1=%d 
pin2=%d\n", vector, pin1, pin2);
+       pin1  = find_isa_irq_pin(0, mp_INT);
+       apic1 = find_isa_irq_apic(0, mp_INT);
+       pin2  = ioapic_i8259.pin;
+       apic2 = ioapic_i8259.apic;
+
+       apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X apic1=%d 
pin1=%d apic2=%d pin2=%d\n",
+               vector, apic1, pin1, apic2, pin2);
 
        if (pin1 != -1) {
                /*
@@ -1798,17 +1870,20 @@
                                clear_IO_APIC_pin(0, pin1);
                        return;
                }
-               clear_IO_APIC_pin(0, pin1);
-               apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 timer not 
connected to IO-APIC\n");
-       }
-
-       apic_printk(APIC_VERBOSE,KERN_INFO "...trying to set up timer (IRQ0) 
through the 8259A ... ");
+               clear_IO_APIC_pin(apic1, pin1);
+               apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 timer not "
+                               "connected to IO-APIC\n");
+       }
+
+       apic_printk(APIC_VERBOSE,KERN_INFO "...trying to set up timer (IRQ0) "
+                               "through the 8259A ... ");
        if (pin2 != -1) {
-               apic_printk(APIC_VERBOSE,"\n..... (found pin %d) ...", pin2);
+               apic_printk(APIC_VERBOSE,"\n..... (found apic %d pin %d) ...",
+                       apic2, pin2);
                /*
                 * legacy devices should be connected to IO APIC #0
                 */
-               setup_ExtINT_IRQ0_pin(pin2, vector);
+               setup_ExtINT_IRQ0_pin(apic2, pin2, vector);
                if (timer_irq_works()) {
                        printk("works.\n");
                        nmi_watchdog_default();
@@ -1820,7 +1895,7 @@
                /*
                 * Cleanup, just in case ...
                 */
-               clear_IO_APIC_pin(0, pin2);
+               clear_IO_APIC_pin(apic2, pin2);
        }
        printk(" failed.\n");
 
@@ -1833,21 +1908,21 @@
 
        disable_8259A_irq(0);
        irq_desc[0].handler = &lapic_irq_type;
-       apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector);   /* Fixed mode */
+       apic_write(APIC_LVT0, APIC_DM_FIXED | vector);  /* Fixed mode */
        enable_8259A_irq(0);
 
        if (timer_irq_works()) {
                apic_printk(APIC_QUIET, " works.\n");
                return;
        }
-       apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector);
+       apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector);
        apic_printk(APIC_VERBOSE," failed.\n");
 
        apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as 
ExtINT IRQ...");
 
        init_8259A(0);
        make_8259A_irq(0);
-       apic_write_around(APIC_LVT0, APIC_DM_EXTINT);
+       apic_write(APIC_LVT0, APIC_DM_EXTINT);
 
        unlock_ExtINT_logic();
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/ioport-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/ioport-xen.c      Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/ioport-xen.c      Thu Feb  2 
19:16:38 2006
@@ -7,6 +7,7 @@
 
 #include <linux/sched.h>
 #include <linux/kernel.h>
+#include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/ioport.h>
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/irq-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/irq-xen.c Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/irq-xen.c Thu Feb  2 19:16:38 2006
@@ -17,6 +17,7 @@
 #include <linux/delay.h>
 #include <asm/uaccess.h>
 #include <asm/io_apic.h>
+#include <asm/idle.h>
 
 atomic_t irq_err_count;
 #ifdef CONFIG_X86_IO_APIC
@@ -69,13 +70,13 @@
                seq_printf(p, "NMI: ");
                for (j = 0; j < NR_CPUS; j++)
                        if (cpu_online(j))
-                               seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
+                               seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count);
                seq_putc(p, '\n');
 #ifdef CONFIG_X86_LOCAL_APIC
                seq_printf(p, "LOC: ");
                for (j = 0; j < NR_CPUS; j++)
                        if (cpu_online(j))
-                               seq_printf(p, "%10u ", 
cpu_pda[j].apic_timer_irqs);
+                               seq_printf(p, "%10u ", 
cpu_pda(j)->apic_timer_irqs);
                seq_putc(p, '\n');
 #endif
                seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
@@ -98,6 +99,7 @@
        /* high bits used in ret_from_ code  */
         int irq = regs->orig_rax & __IRQ_MASK(HARDIRQ_BITS);
 
+       exit_idle();
        irq_enter();
 
        __do_IRQ(irq, regs);
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/pci-nommu-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/pci-nommu-xen.c   Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/pci-nommu-xen.c   Thu Feb  2 
19:16:38 2006
@@ -6,93 +6,94 @@
 #include <linux/string.h>
 #include <asm/proto.h>
 #include <asm/processor.h>
+#include <asm/dma.h>
 
-int iommu_merge = 0;
-EXPORT_SYMBOL(iommu_merge);
+static int
+check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
+{
+        if (hwdev && bus + size > *hwdev->dma_mask) {
+               printk(KERN_ERR
+                   "nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
+              name, (long long)bus, size, (long long)*hwdev->dma_mask);
+               return 0;
+       }
+       return 1;
+}
 
-dma_addr_t bad_dma_address;
-EXPORT_SYMBOL(bad_dma_address);
+static dma_addr_t
+nommu_map_single(struct device *hwdev, void *ptr, size_t size,
+              int direction)
+{
+       dma_addr_t bus = virt_to_bus(ptr);
+       if (!check_addr("map_single", hwdev, bus, size))
+                               return bad_dma_address;
+       return bus;
+}
 
-int iommu_bio_merge = 0;
-EXPORT_SYMBOL(iommu_bio_merge);
+void nommu_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
+                       int direction)
+{
+}
 
-int iommu_sac_force = 0;
-EXPORT_SYMBOL(iommu_sac_force);
+/* Map a set of buffers described by scatterlist in streaming
+ * mode for DMA.  This is the scatter-gather version of the
+ * above pci_map_single interface.  Here the scatter gather list
+ * elements are each tagged with the appropriate dma address
+ * and length.  They are obtained via sg_dma_{address,length}(SG).
+ *
+ * NOTE: An implementation may be able to use a smaller number of
+ *       DMA address/length pairs than there are SG table elements.
+ *       (for example via virtual mapping capabilities)
+ *       The routine returns the number of addr/length pairs actually
+ *       used, at most nents.
+ *
+ * Device ownership issues as mentioned above for pci_map_single are
+ * the same here.
+ */
+int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
+              int nents, int direction)
+{
+       int i;
 
-#if 0
-/* 
- * Dummy IO MMU functions
+       BUG_ON(direction == DMA_NONE);
+       for (i = 0; i < nents; i++ ) {
+               struct scatterlist *s = &sg[i];
+               BUG_ON(!s->page);
+               s->dma_address = virt_to_bus(page_address(s->page) +s->offset);
+               if (!check_addr("map_sg", hwdev, s->dma_address, s->length))
+                       return 0;
+               s->dma_length = s->length;
+       }
+       return nents;
+}
+
+/* Unmap a set of streaming mode DMA translations.
+ * Again, cpu read rules concerning calls here are the same as for
+ * pci_unmap_single() above.
  */
+void nommu_unmap_sg(struct device *dev, struct scatterlist *sg,
+                 int nents, int dir)
+{
+}
 
-void *dma_alloc_coherent(struct device *hwdev, size_t size,
-                        dma_addr_t *dma_handle, gfp_t gfp)
+struct dma_mapping_ops nommu_dma_ops = {
+       .map_single = nommu_map_single,
+       .unmap_single = nommu_unmap_single,
+       .map_sg = nommu_map_sg,
+       .unmap_sg = nommu_unmap_sg,
+       .is_phys = 1,
+};
+
+void __init no_iommu_init(void)
 {
-       void *ret;
-       u64 mask;
-       int order = get_order(size);
-
-       if (hwdev)
-               mask = hwdev->coherent_dma_mask & *hwdev->dma_mask;
-       else
-               mask = 0xffffffff;
-       for (;;) {
-               ret = (void *)__get_free_pages(gfp, order);
-               if (ret == NULL)
-                       return NULL;
-               *dma_handle = virt_to_bus(ret);
-               if ((*dma_handle & ~mask) == 0)
-                       break;
-               free_pages((unsigned long)ret, order);
-               if (gfp & GFP_DMA)
-                       return NULL;
-               gfp |= GFP_DMA;
+       if (dma_ops)
+               return;
+       printk(KERN_INFO "PCI-DMA: Disabling IOMMU.\n");
+       dma_ops = &nommu_dma_ops;
+       if (end_pfn > MAX_DMA32_PFN) {
+               printk(KERN_ERR
+                      "WARNING more than 4GB of memory but IOMMU not compiled 
in.\n"
+                      KERN_ERR "WARNING 32bit PCI may malfunction.\n"
+                      KERN_ERR "You might want to enable CONFIG_GART_IOMMU\n");
        }
-
-       memset(ret, 0, size);
-       return ret;
 }
-EXPORT_SYMBOL(dma_alloc_coherent);
-
-void dma_free_coherent(struct device *hwdev, size_t size,
-                        void *vaddr, dma_addr_t dma_handle)
-{
-       free_pages((unsigned long)vaddr, get_order(size));
-}
-EXPORT_SYMBOL(dma_free_coherent);
-#endif
-
-#if 0
-int dma_supported(struct device *hwdev, u64 mask)
-{
-        /*
-         * we fall back to GFP_DMA when the mask isn't all 1s,
-         * so we can't guarantee allocations that must be
-         * within a tighter range than GFP_DMA..
-        * RED-PEN this won't work for pci_map_single. Caller has to
-        * use GFP_DMA in the first place.
-         */
-        if (mask < 0x00ffffff)
-                return 0;
-
-       return 1;
-} 
-EXPORT_SYMBOL(dma_supported);
-#endif
-
-int dma_get_cache_alignment(void)
-{
-       return boot_cpu_data.x86_clflush_size;
-}
-EXPORT_SYMBOL(dma_get_cache_alignment);
-
-static int __init check_ram(void) 
-{ 
-       if (end_pfn >= 0xffffffff>>PAGE_SHIFT) { 
-               printk(
-               KERN_ERR "WARNING more than 4GB of memory but IOMMU not 
compiled in.\n"
-               KERN_ERR "WARNING 32bit PCI may malfunction.\n");
-       } 
-       return 0;
-} 
-__initcall(check_ram);
-
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c     Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c     Thu Feb  2 
19:16:38 2006
@@ -39,6 +39,7 @@
 #include <linux/utsname.h>
 #include <linux/random.h>
 #include <linux/kprobes.h>
+#include <linux/notifier.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -56,12 +57,11 @@
 #include <asm/proto.h>
 #include <asm/hardirq.h>
 #include <asm/ia32.h>
+#include <asm/idle.h>
 
 asmlinkage extern void ret_from_fork(void);
 
 unsigned long kernel_thread_flags = CLONE_VM | CLONE_UNTRACED;
-
-static atomic_t hlt_counter = ATOMIC_INIT(0);
 
 unsigned long boot_option_idle_override = 0;
 EXPORT_SYMBOL(boot_option_idle_override);
@@ -72,19 +72,49 @@
 void (*pm_idle)(void);
 static DEFINE_PER_CPU(unsigned int, cpu_idle_state);
 
-void disable_hlt(void)
-{
-       atomic_inc(&hlt_counter);
-}
-
-EXPORT_SYMBOL(disable_hlt);
-
-void enable_hlt(void)
-{
-       atomic_dec(&hlt_counter);
-}
-
-EXPORT_SYMBOL(enable_hlt);
+static struct notifier_block *idle_notifier;
+static DEFINE_SPINLOCK(idle_notifier_lock);
+
+void idle_notifier_register(struct notifier_block *n)
+{
+       unsigned long flags;
+       spin_lock_irqsave(&idle_notifier_lock, flags);
+       notifier_chain_register(&idle_notifier, n);
+       spin_unlock_irqrestore(&idle_notifier_lock, flags);
+}
+EXPORT_SYMBOL_GPL(idle_notifier_register);
+
+void idle_notifier_unregister(struct notifier_block *n)
+{
+       unsigned long flags;
+       spin_lock_irqsave(&idle_notifier_lock, flags);
+       notifier_chain_unregister(&idle_notifier, n);
+       spin_unlock_irqrestore(&idle_notifier_lock, flags);
+}
+EXPORT_SYMBOL(idle_notifier_unregister);
+
+enum idle_state { CPU_IDLE, CPU_NOT_IDLE };
+static DEFINE_PER_CPU(enum idle_state, idle_state) = CPU_NOT_IDLE;
+
+void enter_idle(void)
+{
+       __get_cpu_var(idle_state) = CPU_IDLE;
+       notifier_call_chain(&idle_notifier, IDLE_START, NULL);
+}
+
+static void __exit_idle(void)
+{
+       __get_cpu_var(idle_state) = CPU_NOT_IDLE;
+       notifier_call_chain(&idle_notifier, IDLE_END, NULL);
+}
+
+/* Called from interrupts to signify idle end */
+void exit_idle(void)
+{
+       if (current->pid | read_pda(irqcount))
+               return;
+       __exit_idle();
+}
 
 /* XXX XEN doesn't use default_idle(), poll_idle(). Use xen_idle() instead. */
 extern void stop_hz_timer(void);
@@ -110,7 +140,7 @@
 DECLARE_PER_CPU(int, cpu_state);
 
 #include <asm/nmi.h>
-/* We don't actually take CPU down, just spin without interrupts. */
+/* We halt the CPU with physical CPU hotplug */
 static inline void play_dead(void)
 {
        idle_task_exit();
@@ -157,8 +187,9 @@
                        
                        if (cpu_is_offline(smp_processor_id()))
                                play_dead();
-
+                       enter_idle();
                        xen_idle();
+                       __exit_idle();
                }
 
                preempt_enable_no_resched();
@@ -364,7 +395,7 @@
        struct task_struct *me = current;
 
        childregs = ((struct pt_regs *)
-                       (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
+                       (THREAD_SIZE + task_stack_page(p))) - 1;
        *childregs = *regs;
 
        childregs->rax = 0;
@@ -376,7 +407,7 @@
        p->thread.rsp0 = (unsigned long) (childregs+1);
        p->thread.userrsp = me->thread.userrsp; 
 
-       set_ti_thread_flag(p->thread_info, TIF_FORK);
+       set_tsk_thread_flag(p, TIF_FORK);
 
        p->thread.fs = me->thread.fs;
        p->thread.gs = me->thread.gs;
@@ -534,7 +565,7 @@
        write_pda(oldrsp, next->userrsp); 
        write_pda(pcurrent, next_p); 
        write_pda(kernelstack,
-           (unsigned long)next_p->thread_info + THREAD_SIZE - PDA_STACKOFFSET);
+                 task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET);
 
        /*
         * Now maybe reload the debug registers
@@ -628,7 +659,7 @@
 
        if (!p || p == current || p->state==TASK_RUNNING)
                return 0; 
-       stack = (unsigned long)p->thread_info; 
+       stack = (unsigned long)task_stack_page(p);
        if (p->thread.rsp < stack || p->thread.rsp > stack+THREAD_SIZE)
                return 0;
        fp = *(u64 *)(p->thread.rsp);
@@ -748,8 +779,7 @@
 {
        struct pt_regs *pp, ptregs;
 
-       pp = (struct pt_regs *)(tsk->thread.rsp0);
-       --pp; 
+       pp = task_pt_regs(tsk);
 
        ptregs = *pp; 
        ptregs.cs &= 0xffff;
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Thu Feb  2 
19:16:38 2006
@@ -35,6 +35,7 @@
 #include <asm/processor.h>
 #include <linux/console.h>
 #include <linux/seq_file.h>
+#include <linux/crash_dump.h>
 #include <linux/root_dev.h>
 #include <linux/pci.h>
 #include <linux/acpi.h>
@@ -42,6 +43,9 @@
 #include <linux/edd.h>
 #include <linux/mmzone.h>
 #include <linux/kexec.h>
+#include <linux/cpufreq.h>
+#include <linux/dmi.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/mtrr.h>
 #include <asm/uaccess.h>
@@ -60,7 +64,9 @@
 #include <asm/setup.h>
 #include <asm/mach_apic.h>
 #include <asm/numa.h>
+#include <asm/swiotlb.h>
 #include <asm/sections.h>
+#include <asm/gart-mapping.h>
 #ifdef CONFIG_XEN
 #include <linux/percpu.h>
 #include <xen/interface/physdev.h>
@@ -120,11 +126,6 @@
 int bootloader_type;
 
 unsigned long saved_video_mode;
-
-#ifdef CONFIG_SWIOTLB
-int swiotlb;
-EXPORT_SYMBOL(swiotlb);
-#endif
 
 /*
  * Setup options
@@ -316,19 +317,7 @@
 {
        char c = ' ', *to = command_line, *from = COMMAND_LINE;
        int len = 0;
-
-       /* Save unparsed command line copy for /proc/cmdline */
-#ifdef CONFIG_XEN
-       int max_cmdline;
-       
-       if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE)
-               max_cmdline = COMMAND_LINE_SIZE;
-       memcpy(saved_command_line, xen_start_info->cmd_line, max_cmdline);
-       saved_command_line[max_cmdline-1] = '\0';
-#else
-       memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
-       saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
-#endif
+       int userdef = 0;
 
        for (;;) {
                if (c != ' ') 
@@ -392,10 +381,14 @@
                    !memcmp(from, "disableapic", 11))
                        disable_apic = 1;
 
-               if (!memcmp(from, "noapic", 6)) 
+               /* Don't confuse with noapictimer */
+               if (!memcmp(from, "noapic", 6) &&
+                       (from[6] == ' ' || from[6] == 0))
                        skip_ioapic_setup = 1;
 
-               if (!memcmp(from, "apic", 4)) { 
+               /* Make sure to not confuse with apic= */
+               if (!memcmp(from, "apic", 4) &&
+                       (from[4] == ' ' || from[4] == 0)) {
                        skip_ioapic_setup = 0;
                        ioapic_force = 1;
                }
@@ -404,16 +397,36 @@
                if (!memcmp(from, "mem=", 4))
                        parse_memopt(from+4, &from); 
 
+               if (!memcmp(from, "memmap=", 7)) {
+                       /* exactmap option is for used defined memory */
+                       if (!memcmp(from+7, "exactmap", 8)) {
+#ifdef CONFIG_CRASH_DUMP
+                               /* If we are doing a crash dump, we
+                                * still need to know the real mem
+                                * size before original memory map is
+                                * reset.
+                                */
+                               saved_max_pfn = e820_end_of_ram();
+#endif
+                               from += 8+7;
+                               end_pfn_map = 0;
+                               e820.nr_map = 0;
+                               userdef = 1;
+                       }
+                       else {
+                               parse_memmapopt(from+7, &from);
+                               userdef = 1;
+                       }
+               }
+
 #ifdef CONFIG_NUMA
                if (!memcmp(from, "numa=", 5))
                        numa_setup(from+5); 
 #endif
 
-#ifdef CONFIG_GART_IOMMU 
                if (!memcmp(from,"iommu=",6)) { 
                        iommu_setup(from+6); 
                }
-#endif
 
                if (!memcmp(from,"oops=panic", 10))
                        panic_on_oops = 1;
@@ -442,6 +455,14 @@
                }
 #endif
 
+#ifdef CONFIG_PROC_VMCORE
+               /* elfcorehdr= specifies the location of elf core header
+                * stored by the crashed kernel. This option will be passed
+                * by kexec loader to the capture kernel.
+                */
+               else if(!memcmp(from, "elfcorehdr=", 11))
+                       elfcorehdr_addr = memparse(from+11, &from);
+#endif
        next_char:
                c = *(from++);
                if (!c)
@@ -449,6 +470,10 @@
                if (COMMAND_LINE_SIZE <= ++len)
                        break;
                *(to++) = c;
+       }
+       if (userdef) {
+               printk(KERN_INFO "user-defined physical RAM map:\n");
+               e820_print_map("user");
        }
        *to = '\0';
        *cmdline_p = command_line;
@@ -504,6 +529,8 @@
      k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
 }; 
 
+extern char __vsyscall_0;
+
 /* Replace instructions with better alternatives for this CPU type.
 
    This runs before SMP is initialized to avoid SMP problems with
@@ -515,11 +542,17 @@
        struct alt_instr *a; 
        int diff, i, k;
        for (a = start; (void *)a < end; a++) { 
+               u8 *instr;
+
                if (!boot_cpu_has(a->cpuid))
                        continue;
 
                BUG_ON(a->replacementlen > a->instrlen); 
-               __inline_memcpy(a->instr, a->replacement, a->replacementlen); 
+               instr = a->instr;
+               /* vsyscall code is not mapped yet. resolve it manually. */
+               if (instr >= (u8 *)VSYSCALL_START && instr < (u8*)VSYSCALL_END)
+                       instr -= VSYSCALL_START - (unsigned long)&__vsyscall_0;
+               __inline_memcpy(instr, a->replacement, a->replacementlen);
                diff = a->instrlen - a->replacementlen; 
 
                /* Pad the rest with nops */
@@ -527,7 +560,7 @@
                        k = diff;
                        if (k > ASM_NOP_MAX)
                                k = ASM_NOP_MAX;
-                       __inline_memcpy(a->instr + i, k8_nops[k], k); 
+                       __inline_memcpy(instr + i, k8_nops[k], k);
                } 
        }
 } 
@@ -868,6 +901,8 @@
         */
        acpi_boot_init();
 #endif
+
+       init_cpu_to_node();
 
 #ifdef CONFIG_X86_LOCAL_APIC
        /*
@@ -1074,7 +1109,6 @@
 static int __init init_amd(struct cpuinfo_x86 *c)
 {
        int r;
-       int level;
 
 #ifdef CONFIG_SMP
        unsigned long value;
@@ -1097,11 +1131,6 @@
           3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
        clear_bit(0*32+31, &c->x86_capability);
        
-       /* C-stepping K8? */
-       level = cpuid_eax(1);
-       if ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58)
-               set_bit(X86_FEATURE_K8_C, &c->x86_capability);
-
        r = get_model_name(c);
        if (!r) { 
                switch (c->x86) { 
@@ -1114,6 +1143,10 @@
        } 
        display_cacheinfo(c);
 
+       /* c->x86_power is 8000_0007 edx. Bit 8 is constant TSC */
+       if (c->x86_power & (1<<8))
+               set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
+
        if (c->extended_cpuid_level >= 0x80000008) {
                c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1;
                if (c->x86_max_cores & (c->x86_max_cores - 1))
@@ -1232,8 +1265,10 @@
 
        if (c->x86 == 15)
                c->x86_cache_alignment = c->x86_clflush_size * 2;
-       if (c->x86 >= 15)
+       if ((c->x86 == 0xf && c->x86_model >= 0x03) ||
+           (c->x86 == 0x6 && c->x86_model >= 0x0e))
                set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
+       set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
        c->x86_max_cores = intel_num_cpu_cores(c);
 
        srat_detect_node();
@@ -1432,7 +1467,7 @@
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, "nx", NULL, "mmxext", NULL,
-               NULL, "fxsr_opt", NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
+               NULL, "fxsr_opt", "rdtscp", NULL, NULL, "lm", "3dnowext", 
"3dnow",
 
                /* Transmeta-defined */
                "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
@@ -1460,7 +1495,7 @@
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* AMD-defined (#2) */
-               "lahf_lm", "cmp_legacy", NULL, NULL, NULL, NULL, NULL, NULL,
+               "lahf_lm", "cmp_legacy", "svm", NULL, "cr8_legacy", NULL, NULL, 
NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -1471,7 +1506,9 @@
                "vid",  /* voltage id control */
                "ttp",  /* thermal trip */
                "tm",
-               "stc"
+               "stc",
+               NULL,
+               /* nothing */   /* constant_tsc - moved to flags */
        };
 
 
@@ -1497,8 +1534,11 @@
                seq_printf(m, "stepping\t: unknown\n");
        
        if (cpu_has(c,X86_FEATURE_TSC)) {
+               unsigned int freq = cpufreq_quick_get((unsigned)(c-cpu_data));
+               if (!freq)
+                       freq = cpu_khz;
                seq_printf(m, "cpu MHz\t\t: %u.%03u\n",
-                            cpu_khz / 1000, (cpu_khz % 1000));
+                            freq / 1000, (freq % 1000));
        }
 
        /* Cache size */
@@ -1548,8 +1588,11 @@
                unsigned i;
                for (i = 0; i < 32; i++) 
                        if (c->x86_power & (1 << i)) {
-                               if (i < ARRAY_SIZE(x86_power_flags))
-                                       seq_printf(m, " %s", 
x86_power_flags[i]);
+                               if (i < ARRAY_SIZE(x86_power_flags) &&
+                                       x86_power_flags[i])
+                                       seq_printf(m, "%s%s",
+                                               x86_power_flags[i][0]?" ":"",
+                                               x86_power_flags[i]);
                                else
                                        seq_printf(m, " [%d]", i);
                        }
@@ -1581,3 +1624,11 @@
        .stop = c_stop,
        .show = show_cpuinfo,
 };
+
+static int __init run_dmi_scan(void)
+{
+       dmi_scan_machine();
+       return 0;
+}
+core_initcall(run_dmi_scan);
+
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c     Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c     Thu Feb  2 
19:16:38 2006
@@ -37,14 +37,15 @@
 
 cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
 
-struct x8664_pda cpu_pda[NR_CPUS] __cacheline_aligned; 
+struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly;
+struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned;
 
 struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; 
 
 char boot_cpu_stack[IRQSTACKSIZE] 
__attribute__((section(".bss.page_aligned")));
 
 unsigned long __supported_pte_mask __read_mostly = ~0UL;
-static int do_not_nx __initdata = 0;
+static int do_not_nx __cpuinitdata = 0;
 
 /* noexec=on|off
 Control non executable mappings for 64bit processes.
@@ -117,7 +118,7 @@
                }
                if (!ptr)
                        panic("Cannot allocate cpu data for CPU %d\n", i);
-               cpu_pda[i].data_offset = ptr - __per_cpu_start;
+               cpu_pda(i)->data_offset = ptr - __per_cpu_start;
                memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
        }
 } 
@@ -167,15 +168,14 @@
 
 void pda_init(int cpu)
 { 
-       struct x8664_pda *pda = &cpu_pda[cpu];
+       struct x8664_pda *pda = cpu_pda(cpu);
 
        /* Setup up data that may be needed in __get_free_pages early */
        asm volatile("movl %0,%%fs ; movl %0,%%gs" :: "r" (0)); 
 #ifndef CONFIG_XEN
-       wrmsrl(MSR_GS_BASE, cpu_pda + cpu);
+       wrmsrl(MSR_GS_BASE, pda);
 #else
-       HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL, 
-                                   (unsigned long)(cpu_pda + cpu));
+       HYPERVISOR_set_segment_base(SEGBASE_GS_KERNEL, (unsigned long)pda);
 #endif
        pda->cpunumber = cpu; 
        pda->irqcount = -1;
@@ -203,7 +203,7 @@
        pda->irqstackptr += IRQSTACKSIZE-64;
 } 
 
-char boot_exception_stacks[N_EXCEPTION_STACKS * EXCEPTION_STKSZ] 
+char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + 
DEBUG_STKSZ]
 __attribute__((section(".bss.page_aligned")));
 
 /* May not be marked __init: used by software suspend */
@@ -272,28 +272,18 @@
         * Initialize the per-CPU GDT with the boot GDT,
         * and set up the GDT descriptor:
         */
+       if (cpu)
+               memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE);
+
+       cpu_gdt_descr[cpu].size = GDT_SIZE;
 #ifndef CONFIG_XEN 
-       if (cpu) {
-               memcpy(cpu_gdt_table[cpu], cpu_gdt_table[0], GDT_SIZE);
-       }       
-
-       cpu_gdt_descr[cpu].size = GDT_SIZE;
-       cpu_gdt_descr[cpu].address = (unsigned long)cpu_gdt_table[cpu];
-
-       memcpy(me->thread.tls_array, cpu_gdt_table[cpu], GDT_ENTRY_TLS_ENTRIES 
* 8);
+       asm volatile("lgdt %0" :: "m" (cpu_gdt_descr[cpu]));
+       asm volatile("lidt %0" :: "m" (idt_descr));
 #else
-       memcpy(me->thread.tls_array, &get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN],
-           GDT_ENTRY_TLS_ENTRIES * 8);
-
        cpu_gdt_init(&cpu_gdt_descr[cpu]);
 #endif
-       
-       /*
-        * Delete NT
-        */
-
-       asm volatile("pushfq ; popq %%rax ; btr $14,%%rax ; pushq %%rax ; 
popfq" ::: "eax");
-
+
+       memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8);
        syscall_init();
 
        wrmsrl(MSR_FS_BASE, 0);
@@ -307,13 +297,27 @@
         */
        for (v = 0; v < N_EXCEPTION_STACKS; v++) {
                if (cpu) {
-                       estacks = (char *)__get_free_pages(GFP_ATOMIC, 
-                                                  EXCEPTION_STACK_ORDER);
+                       static const unsigned int order[N_EXCEPTION_STACKS] = {
+                               [0 ... N_EXCEPTION_STACKS - 1] = 
EXCEPTION_STACK_ORDER,
+                               [DEBUG_STACK - 1] = DEBUG_STACK_ORDER
+                       };
+
+                       estacks = (char *)__get_free_pages(GFP_ATOMIC, 
order[v]);
                        if (!estacks)
                                panic("Cannot allocate exception stack %ld 
%d\n",
                                      v, cpu); 
                }
-               estacks += EXCEPTION_STKSZ;
+               switch (v + 1) {
+#if DEBUG_STKSZ > EXCEPTION_STKSZ
+               case DEBUG_STACK:
+                       cpu_pda[cpu].debugstack = (unsigned long)estacks;
+                       estacks += DEBUG_STKSZ;
+                       break;
+#endif
+               default:
+                       estacks += EXCEPTION_STKSZ;
+                       break;
+               }
                t->ist[v] = (unsigned long)estacks;
        }
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/smp-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/smp-xen.c Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/smp-xen.c Thu Feb  2 19:16:38 2006
@@ -27,6 +27,7 @@
 #include <asm/mmu_context.h>
 #include <asm/proto.h>
 #include <asm/apicdef.h>
+#include <asm/idle.h>
 #ifdef CONFIG_XEN
 #include <xen/evtchn.h>
 #endif
@@ -298,11 +299,6 @@
 { xen_tlb_flush_all(); }
 #endif /* Xen */
 
-void smp_kdb_stop(void)
-{
-       send_IPI_allbutself(KDB_VECTOR);
-}
-
 /*
  * this function sends a 'reschedule' IPI to another CPU.
  * it goes straight through and wastes no time serializing
@@ -558,6 +554,7 @@
        /*
         * At this point the info structure may be out of scope unless wait==1
         */
+       exit_idle();
        irq_enter();
        (*func)(info);
        irq_exit();
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c       Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c       Thu Feb  2 
19:16:38 2006
@@ -70,7 +70,6 @@
 asmlinkage void alignment_check(void);
 asmlinkage void machine_check(void);
 asmlinkage void spurious_interrupt_bug(void);
-asmlinkage void call_debug(void);
 
 struct notifier_block *die_chain;
 static DEFINE_SPINLOCK(die_notifier_lock);
@@ -121,19 +120,31 @@
 static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
                                        unsigned *usedp, const char **idp)
 {
-       static const char ids[N_EXCEPTION_STACKS][8] = {
+       static char ids[][8] = {
                [DEBUG_STACK - 1] = "#DB",
                [NMI_STACK - 1] = "NMI",
                [DOUBLEFAULT_STACK - 1] = "#DF",
                [STACKFAULT_STACK - 1] = "#SS",
                [MCE_STACK - 1] = "#MC",
+#if DEBUG_STKSZ > EXCEPTION_STKSZ
+               [N_EXCEPTION_STACKS ... N_EXCEPTION_STACKS + DEBUG_STKSZ / 
EXCEPTION_STKSZ - 2] = "#DB[?]"
+#endif
        };
        unsigned k;
 
        for (k = 0; k < N_EXCEPTION_STACKS; k++) {
                unsigned long end;
 
-               end = per_cpu(init_tss, cpu).ist[k];
+               switch (k + 1) {
+#if DEBUG_STKSZ > EXCEPTION_STKSZ
+               case DEBUG_STACK:
+                       end = cpu_pda(cpu)->debugstack + DEBUG_STKSZ;
+                       break;
+#endif
+               default:
+                       end = per_cpu(init_tss, cpu).ist[k];
+                       break;
+               }
                if (stack >= end)
                        continue;
                if (stack >= end - EXCEPTION_STKSZ) {
@@ -143,6 +154,22 @@
                        *idp = ids[k];
                        return (unsigned long *)end;
                }
+#if DEBUG_STKSZ > EXCEPTION_STKSZ
+               if (k == DEBUG_STACK - 1 && stack >= end - DEBUG_STKSZ) {
+                       unsigned j = N_EXCEPTION_STACKS - 1;
+
+                       do {
+                               ++j;
+                               end -= EXCEPTION_STKSZ;
+                               ids[j][4] = '1' + (j - N_EXCEPTION_STACKS);
+                       } while (stack < end - EXCEPTION_STKSZ);
+                       if (*usedp & (1U << j))
+                               break;
+                       *usedp |= 1U << j;
+                       *idp = ids[j];
+                       return (unsigned long *)end;
+               }
+#endif
        }
        return NULL;
 }
@@ -156,9 +183,8 @@
 
 void show_trace(unsigned long *stack)
 {
-       unsigned long addr;
        const unsigned cpu = safe_smp_processor_id();
-       unsigned long *irqstack_end = (unsigned long *)cpu_pda[cpu].irqstackptr;
+       unsigned long *irqstack_end = (unsigned long 
*)cpu_pda(cpu)->irqstackptr;
        int i;
        unsigned used = 0;
 
@@ -166,8 +192,14 @@
 
 #define HANDLE_STACK(cond) \
        do while (cond) { \
-               addr = *stack++; \
+               unsigned long addr = *stack++; \
                if (kernel_text_address(addr)) { \
+                       if (i > 50) { \
+                               printk("\n       "); \
+                               i = 0; \
+                       } \
+                       else \
+                               i += printk(" "); \
                        /* \
                         * If the address is either in the text segment of the \
                         * kernel, or in the region which contains vmalloc'ed \
@@ -177,25 +209,19 @@
                         * out the call path that was taken. \
                         */ \
                        i += printk_address(addr); \
-                       if (i > 50) { \
-                               printk("\n       "); \
-                               i = 0; \
-                       } \
-                       else \
-                               i += printk(" "); \
                } \
        } while (0)
 
-       for(i = 0; ; ) {
+       for(i = 11; ; ) {
                const char *id;
                unsigned long *estack_end;
                estack_end = in_exception_stack(cpu, (unsigned long)stack,
                                                &used, &id);
 
                if (estack_end) {
-                       i += printk(" <%s> ", id);
+                       i += printk(" <%s>", id);
                        HANDLE_STACK (stack < estack_end);
-                       i += printk(" <EOE> ");
+                       i += printk(" <EOE>");
                        stack = (unsigned long *) estack_end[-2];
                        continue;
                }
@@ -205,11 +231,11 @@
                                (IRQSTACKSIZE - 64) / sizeof(*irqstack);
 
                        if (stack >= irqstack && stack < irqstack_end) {
-                               i += printk(" <IRQ> ");
+                               i += printk(" <IRQ>");
                                HANDLE_STACK (stack < irqstack_end);
                                stack = (unsigned long *) (irqstack_end[-1]);
                                irqstack_end = NULL;
-                               i += printk(" <EOI> ");
+                               i += printk(" <EOI>");
                                continue;
                        }
                }
@@ -226,8 +252,8 @@
        unsigned long *stack;
        int i;
        const int cpu = safe_smp_processor_id();
-       unsigned long *irqstack_end = (unsigned long *) 
(cpu_pda[cpu].irqstackptr);
-       unsigned long *irqstack = (unsigned long *) (cpu_pda[cpu].irqstackptr - 
IRQSTACKSIZE);    
+       unsigned long *irqstack_end = (unsigned long *) 
(cpu_pda(cpu)->irqstackptr);
+       unsigned long *irqstack = (unsigned long *) (cpu_pda(cpu)->irqstackptr 
- IRQSTACKSIZE);
 
        // debugging aid: "show_stack(NULL, NULL);" prints the
        // back trace for this cpu.
@@ -275,14 +301,14 @@
        int in_kernel = !user_mode(regs);
        unsigned long rsp;
        const int cpu = safe_smp_processor_id(); 
-       struct task_struct *cur = cpu_pda[cpu].pcurrent; 
+       struct task_struct *cur = cpu_pda(cpu)->pcurrent;
 
                rsp = regs->rsp;
 
        printk("CPU %d ", cpu);
        __show_regs(regs);
        printk("Process %s (pid: %d, threadinfo %p, task %p)\n",
-               cur->comm, cur->pid, cur->thread_info, cur);
+               cur->comm, cur->pid, task_thread_info(cur), cur);
 
        /*
         * When in-kernel, we also print out the stack and code at the
@@ -314,20 +340,26 @@
 void handle_BUG(struct pt_regs *regs)
 { 
        struct bug_frame f;
-       char tmp;
+       long len;
+       const char *prefix = "";
 
        if (user_mode(regs))
                return; 
-       if (__copy_from_user(&f, (struct bug_frame *) regs->rip, 
+       if (__copy_from_user(&f, (const void __user *) regs->rip,
                             sizeof(struct bug_frame)))
                return; 
        if (f.filename >= 0 ||
            f.ud2[0] != 0x0f || f.ud2[1] != 0x0b) 
                return;
-       if (__get_user(tmp, (char *)(long)f.filename))
+       len = __strnlen_user((char *)(long)f.filename, PATH_MAX) - 1;
+       if (len < 0 || len >= PATH_MAX)
                f.filename = (int)(long)"unmapped filename";
+       else if (len > 50) {
+               f.filename += len - 50;
+               prefix = "...";
+       }
        printk("----------- [cut here ] --------- [please bite here ] 
---------\n");
-       printk(KERN_ALERT "Kernel BUG at %.50s:%d\n", (char *)(long)f.filename, 
f.line);
+       printk(KERN_ALERT "Kernel BUG at %s%.50s:%d\n", prefix, (char 
*)(long)f.filename, f.line);
 } 
 
 #ifdef CONFIG_BUG
@@ -382,7 +414,7 @@
        printk("DEBUG_PAGEALLOC");
 #endif
        printk("\n");
-       notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
+       notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV);
        show_registers(regs);
        /* Executive summary in case the oops scrolled away */
        printk(KERN_ALERT "RIP ");
@@ -398,11 +430,6 @@
        __die(str, regs, err);
        oops_end(flags);
        do_exit(SIGSEGV); 
-}
-static inline void die_if_kernel(const char * str, struct pt_regs * regs, long 
err)
-{
-       if (!(regs->eflags & VM_MASK) && (regs->cs == __KERNEL_CS))
-               die(str, regs, err);
 }
 
 #ifdef CONFIG_X86_LOCAL_APIC
@@ -428,19 +455,20 @@
                              struct pt_regs * regs, long error_code,
                              siginfo_t *info)
 {
+       struct task_struct *tsk = current;
+
        conditional_sti(regs);
 
+       tsk->thread.error_code = error_code;
+       tsk->thread.trap_no = trapnr;
+
        if (user_mode(regs)) {
-               struct task_struct *tsk = current;
-
                if (exception_trace && unhandled_signal(tsk, signr))
                        printk(KERN_INFO
                               "%s[%d] trap %s rip:%lx rsp:%lx error:%lx\n",
                               tsk->comm, tsk->pid, str,
                               regs->rip,regs->rsp,error_code); 
 
-               tsk->thread.error_code = error_code;
-               tsk->thread.trap_no = trapnr;
                if (info)
                        force_sig_info(signr, info, tsk);
                else
@@ -487,7 +515,7 @@
 DO_ERROR_INFO( 0, SIGFPE,  "divide error", divide_error, FPE_INTDIV, regs->rip)
 DO_ERROR( 4, SIGSEGV, "overflow", overflow)
 DO_ERROR( 5, SIGSEGV, "bounds", bounds)
-DO_ERROR_INFO( 6, SIGILL,  "invalid operand", invalid_op, ILL_ILLOPN, 
regs->rip)
+DO_ERROR_INFO( 6, SIGILL,  "invalid opcode", invalid_op, ILL_ILLOPN, regs->rip)
 DO_ERROR( 7, SIGSEGV, "device not available", device_not_available)
 DO_ERROR( 9, SIGFPE,  "coprocessor segment overrun", 
coprocessor_segment_overrun)
 DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
@@ -495,24 +523,41 @@
 DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
 DO_ERROR(18, SIGSEGV, "reserved", reserved)
 DO_ERROR(12, SIGBUS,  "stack segment", stack_segment)
-DO_ERROR( 8, SIGSEGV, "double fault", double_fault)
+
+asmlinkage void do_double_fault(struct pt_regs * regs, long error_code)
+{
+       static const char str[] = "double fault";
+       struct task_struct *tsk = current;
+
+       /* Return not checked because double check cannot be ignored */
+       notify_die(DIE_TRAP, str, regs, error_code, 8, SIGSEGV);
+
+       tsk->thread.error_code = error_code;
+       tsk->thread.trap_no = 8;
+
+       /* This is always a kernel trap and never fixable (and thus must
+          never return). */
+       for (;;)
+               die(str, regs, error_code);
+}
 
 asmlinkage void __kprobes do_general_protection(struct pt_regs * regs,
                                                long error_code)
 {
+       struct task_struct *tsk = current;
+
        conditional_sti(regs);
 
+       tsk->thread.error_code = error_code;
+       tsk->thread.trap_no = 13;
+
        if (user_mode(regs)) {
-               struct task_struct *tsk = current;
-
                if (exception_trace && unhandled_signal(tsk, SIGSEGV))
                        printk(KERN_INFO
                       "%s[%d] general protection rip:%lx rsp:%lx error:%lx\n",
                               tsk->comm, tsk->pid,
                               regs->rip,regs->rsp,error_code); 
 
-               tsk->thread.error_code = error_code;
-               tsk->thread.trap_no = 13;
                force_sig(SIGSEGV, tsk);
                return;
        } 
@@ -579,7 +624,7 @@
                reason = get_nmi_reason();
 
        if (!(reason & 0xc0)) {
-               if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT)
+               if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 2, SIGINT)
                                                                == NOTIFY_STOP)
                        return;
 #ifdef CONFIG_X86_LOCAL_APIC
@@ -595,7 +640,7 @@
                unknown_nmi_error(reason, regs);
                return;
        }
-       if (notify_die(DIE_NMI, "nmi", regs, reason, 0, SIGINT) == NOTIFY_STOP)
+       if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
                return; 
 
        /* AK: following checks seem to be broken on modern chipsets. FIXME */
@@ -606,6 +651,7 @@
                io_check_error(reason, regs);
 }
 
+/* runs on IST stack. */
 asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code)
 {
        if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP) == 
NOTIFY_STOP) {
@@ -626,7 +672,7 @@
                ;
        /* Exception from user space */
        else if (user_mode(eregs))
-               regs = ((struct pt_regs *)current->thread.rsp0) - 1;
+               regs = task_pt_regs(current);
        /* Exception from kernel and interrupts are enabled. Move to
           kernel process stack. */
        else if (eregs->eflags & X86_EFLAGS_IF)
@@ -690,11 +736,9 @@
        info.si_signo = SIGTRAP;
        info.si_errno = 0;
        info.si_code = TRAP_BRKPT;
-       if (!user_mode(regs))
-               goto clear_dr7; 
-
-       info.si_addr = (void __user *)regs->rip;
-       force_sig_info(SIGTRAP, &info, tsk);    
+       info.si_addr = user_mode(regs) ? (void __user *)regs->rip : NULL;
+       force_sig_info(SIGTRAP, &info, tsk);
+
 clear_dr7:
        set_debugreg(0UL, 7);
        return;
@@ -704,7 +748,7 @@
        regs->eflags &= ~TF_MASK;
 }
 
-static int kernel_math_error(struct pt_regs *regs, char *str)
+static int kernel_math_error(struct pt_regs *regs, const char *str, int trapnr)
 {
        const struct exception_table_entry *fixup;
        fixup = search_exception_tables(regs->rip);
@@ -712,8 +756,9 @@
                regs->rip = fixup->fixup;
                return 1;
        }
-       notify_die(DIE_GPF, str, regs, 0, 16, SIGFPE);
+       notify_die(DIE_GPF, str, regs, 0, trapnr, SIGFPE);
        /* Illegal floating point operation in the kernel */
+       current->thread.trap_no = trapnr;
        die(str, regs, 0);
        return 0;
 }
@@ -732,7 +777,7 @@
 
        conditional_sti(regs);
        if (!user_mode(regs) &&
-           kernel_math_error(regs, "kernel x87 math error"))
+           kernel_math_error(regs, "kernel x87 math error", 16))
                return;
 
        /*
@@ -801,7 +846,7 @@
 
        conditional_sti(regs);
        if (!user_mode(regs) &&
-               kernel_math_error(regs, "kernel simd math error"))
+               kernel_math_error(regs, "kernel simd math error", 19))
                return;
 
        /*
@@ -875,12 +920,7 @@
        if (!used_math())
                init_fpu(me);
        restore_fpu_checking(&me->thread.i387.fxsave);
-       me->thread_info->status |= TS_USEDFPU;
-}
-
-void do_call_debug(struct pt_regs *regs) 
-{ 
-       notify_die(DIE_CALL, "debug call", regs, 0, 255, SIGINT); 
+       task_thread_info(me)->status |= TS_USEDFPU;
 }
 
 
@@ -893,7 +933,7 @@
         {  1, 0|4, (__KERNEL_CS|0x3), (unsigned long)debug                     
 },
         {  3, 3|4, (__KERNEL_CS|0x3), (unsigned long)int3                      
 },
         {  4, 3|4, (__KERNEL_CS|0x3), (unsigned long)overflow                  
 },
-        {  5, 3|4, (__KERNEL_CS|0x3), (unsigned long)bounds                    
 },
+        {  5, 0|4, (__KERNEL_CS|0x3), (unsigned long)bounds                    
 },
         {  6, 0|4, (__KERNEL_CS|0x3), (unsigned long)invalid_op                
 },
         {  7, 0|4, (__KERNEL_CS|0x3), (unsigned long)device_not_available      
 },
         {  9, 0|4, (__KERNEL_CS|0x3), (unsigned 
long)coprocessor_segment_overrun},
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/vsyscall-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/vsyscall-xen.c    Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/vsyscall-xen.c    Thu Feb  2 
19:16:38 2006
@@ -35,14 +35,13 @@
 #include <asm/io.h>
 
 #define __vsyscall(nr) __attribute__ ((unused,__section__(".vsyscall_" #nr)))
-#define force_inline __attribute__((always_inline)) inline
 
 int __sysctl_vsyscall __section_sysctl_vsyscall = 1;
 seqlock_t __xtime_lock __section_xtime_lock = SEQLOCK_UNLOCKED;
 
 #include <asm/unistd.h>
 
-static force_inline void timeval_normalize(struct timeval * tv)
+static __always_inline void timeval_normalize(struct timeval * tv)
 {
        time_t __sec;
 
@@ -53,7 +52,7 @@
        }
 }
 
-static force_inline void do_vgettimeofday(struct timeval * tv)
+static __always_inline void do_vgettimeofday(struct timeval * tv)
 {
        long sequence, t;
        unsigned long sec, usec;
@@ -66,8 +65,7 @@
                        (__jiffies - __wall_jiffies) * (1000000 / HZ);
 
                if (__vxtime.mode != VXTIME_HPET) {
-                       sync_core();
-                       rdtscll(t);
+                       t = get_cycles_sync();
                        if (t < __vxtime.last_tsc)
                                t = __vxtime.last_tsc;
                        usec += ((t - __vxtime.last_tsc) *
@@ -84,12 +82,12 @@
 }
 
 /* RED-PEN may want to readd seq locking, but then the variable should be 
write-once. */
-static force_inline void do_get_tz(struct timezone * tz)
+static __always_inline void do_get_tz(struct timezone * tz)
 {
        *tz = __sys_tz;
 }
 
-static force_inline int gettimeofday(struct timeval *tv, struct timezone *tz)
+static __always_inline int gettimeofday(struct timeval *tv, struct timezone 
*tz)
 {
        int ret;
        asm volatile("vsysc2: syscall"
@@ -98,7 +96,7 @@
        return ret;
 }
 
-static force_inline long time_syscall(long *t)
+static __always_inline long time_syscall(long *t)
 {
        long secs;
        asm volatile("vsysc1: syscall"
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/kernel/x8664_ksyms-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/x8664_ksyms-xen.c Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/x8664_ksyms-xen.c Thu Feb  2 
19:16:38 2006
@@ -13,7 +13,6 @@
 #include <linux/string.h>
 #include <linux/syscalls.h>
 #include <linux/tty.h>
-#include <linux/ioctl32.h>
 
 #include <asm/semaphore.h>
 #include <asm/processor.h>
@@ -45,24 +44,17 @@
 EXPORT_SYMBOL(drive_info);
 #endif
 
-extern unsigned long get_cmos_time(void);
-
 /* platform dependent support */
 EXPORT_SYMBOL(boot_cpu_data);
 //EXPORT_SYMBOL(dump_fpu);
 EXPORT_SYMBOL(__ioremap);
 EXPORT_SYMBOL(ioremap_nocache);
 EXPORT_SYMBOL(iounmap);
-EXPORT_SYMBOL(enable_irq);
-EXPORT_SYMBOL(disable_irq);
-EXPORT_SYMBOL(disable_irq_nosync);
-EXPORT_SYMBOL(probe_irq_mask);
 EXPORT_SYMBOL(kernel_thread);
 EXPORT_SYMBOL(pm_idle);
 #ifdef CONFIG_ACPI_BOOT
 EXPORT_SYMBOL(pm_power_off);
 #endif
-EXPORT_SYMBOL(get_cmos_time);
 
 EXPORT_SYMBOL(__down_failed);
 EXPORT_SYMBOL(__down_failed_interruptible);
@@ -86,9 +78,6 @@
 EXPORT_SYMBOL(__put_user_4);
 EXPORT_SYMBOL(__put_user_8);
 
-EXPORT_SYMBOL(strpbrk);
-EXPORT_SYMBOL(strstr);
-
 EXPORT_SYMBOL(strncpy_from_user);
 EXPORT_SYMBOL(__strncpy_from_user);
 EXPORT_SYMBOL(clear_user);
@@ -100,23 +89,17 @@
 EXPORT_SYMBOL(strnlen_user);
 
 #ifdef CONFIG_PCI
-EXPORT_SYMBOL(pci_alloc_consistent);
-EXPORT_SYMBOL(pci_free_consistent);
-#endif
-
-#ifdef CONFIG_PCI
 EXPORT_SYMBOL(pci_mem_start);
 #endif
 
 EXPORT_SYMBOL(copy_page);
 EXPORT_SYMBOL(clear_page);
 
-EXPORT_SYMBOL(cpu_pda);
+EXPORT_SYMBOL(_cpu_pda);
 #ifdef CONFIG_SMP
 EXPORT_SYMBOL(__write_lock_failed);
 EXPORT_SYMBOL(__read_lock_failed);
 
-EXPORT_SYMBOL(synchronize_irq);
 EXPORT_SYMBOL(smp_call_function);
 #endif
 
@@ -138,30 +121,17 @@
 #undef memcpy
 #undef memset
 #undef memmove
-#undef memchr
 #undef strlen
-#undef strncmp
-#undef strncpy
-#undef strchr  
 
 extern void * memset(void *,int,__kernel_size_t);
 extern size_t strlen(const char *);
 extern void * memmove(void * dest,const void *src,size_t count);
-extern void *memchr(const void *s, int c, size_t n);
 extern void * memcpy(void *,const void *,__kernel_size_t);
 extern void * __memcpy(void *,const void *,__kernel_size_t);
 
 EXPORT_SYMBOL(memset);
 EXPORT_SYMBOL(strlen);
 EXPORT_SYMBOL(memmove);
-EXPORT_SYMBOL(strncmp);
-EXPORT_SYMBOL(strncpy);
-EXPORT_SYMBOL(strchr);
-EXPORT_SYMBOL(strncat);
-EXPORT_SYMBOL(memchr);
-EXPORT_SYMBOL(strrchr);
-EXPORT_SYMBOL(strnlen);
-EXPORT_SYMBOL(memscan);
 EXPORT_SYMBOL(memcpy);
 EXPORT_SYMBOL(__memcpy);
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/mm/Makefile
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/Makefile      Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/Makefile      Thu Feb  2 19:16:38 2006
@@ -2,7 +2,7 @@
 # Makefile for the linux x86_64-specific parts of the memory manager.
 #
 
-obj-y   := init.o fault.o ioremap.o extable.o pageattr.o
+obj-y   := init.o fault.o ioremap.o extable.o pageattr.o mmap.o
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 obj-$(CONFIG_NUMA) += numa.o
 obj-$(CONFIG_K8_NUMA) += k8topology.o
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c   Thu Feb  2 19:16:38 2006
@@ -35,6 +35,13 @@
 #include <asm-generic/sections.h>
 #include <asm/kdebug.h>
 
+/* Page fault error code bits */
+#define PF_PROT        (1<<0)          /* or no page found */
+#define PF_WRITE       (1<<1)
+#define PF_USER        (1<<2)
+#define PF_RSVD        (1<<3)
+#define PF_INSTR       (1<<4)
+
 void bust_spinlocks(int yes)
 {
        int loglevel_save = console_loglevel;
@@ -68,7 +75,7 @@
        unsigned char *max_instr;
 
        /* If it was a exec fault ignore */
-       if (error_code & (1<<4))
+       if (error_code & PF_INSTR)
                return 0;
        
        instr = (unsigned char *)convert_rip_to_linear(current, regs);
@@ -223,17 +230,22 @@
                                 unsigned long error_code)
 {
        unsigned long flags = oops_begin();
+       struct task_struct *tsk;
 
        printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
               current->comm, address);
        dump_pagetable(address);
+       tsk = current;
+       tsk->thread.cr2 = address;
+       tsk->thread.trap_no = 14;
+       tsk->thread.error_code = error_code;
        __die("Bad pagetable", regs, error_code);
        oops_end(flags);
        do_exit(SIGKILL);
 }
 
 /*
- * Handle a fault on the vmalloc or module mapping area
+ * Handle a fault on the vmalloc area
  *
  * This assumes no large pages in there.
  */
@@ -284,7 +296,6 @@
           that. */
        if (!pte_present(*pte) || pte_pfn(*pte) != pte_pfn(*pte_ref))
                BUG();
-       __flush_tlb_all();
        return 0;
 }
 
@@ -306,12 +317,6 @@
  * This routine handles page faults.  It determines the address,
  * and the problem, and then passes it off to one of the appropriate
  * routines.
- *
- * error_code:
- *     bit 0 == 0 means no page found, 1 means protection fault
- *     bit 1 == 0 means read, 1 means write
- *     bit 2 == 0 means kernel, 1 means user-mode
- *      bit 3 == 1 means fault was an instruction fetch
  */
 asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
                                        unsigned long error_code)
@@ -358,12 +363,16 @@
         *
         * This verifies that the fault happens in kernel space
         * (error_code & 4) == 0, and that the fault was not a
-        * protection error (error_code & 1) == 0.
+        * protection error (error_code & 9) == 0.
         */
        if (unlikely(address >= TASK_SIZE64)) {
-               if (!(error_code & 5) &&
-                     ((address >= VMALLOC_START && address < VMALLOC_END) ||
-                      (address >= MODULES_VADDR && address < MODULES_END))) {
+               /*
+                * Don't check for the module range here: its PML4
+                * is always initialized because it's shared with the main
+                * kernel text. Only vmalloc may need PML4 syncups.
+                */
+               if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) &&
+                     ((address >= VMALLOC_START && address < VMALLOC_END))) {
                        if (vmalloc_fault(address) < 0)
                                goto bad_area_nosemaphore;
                        return;
@@ -375,7 +384,7 @@
                goto bad_area_nosemaphore;
        }
 
-       if (unlikely(error_code & (1 << 3)))
+       if (unlikely(error_code & PF_RSVD))
                pgtable_bad(address, regs, error_code);
 
        /*
@@ -402,7 +411,7 @@
         * thus avoiding the deadlock.
         */
        if (!down_read_trylock(&mm->mmap_sem)) {
-               if ((error_code & 4) == 0 &&
+               if ((error_code & PF_USER) == 0 &&
                    !search_exception_tables(regs->rip))
                        goto bad_area_nosemaphore;
                down_read(&mm->mmap_sem);
@@ -429,17 +438,17 @@
 good_area:
        info.si_code = SEGV_ACCERR;
        write = 0;
-       switch (error_code & 3) {
+       switch (error_code & (PF_PROT|PF_WRITE)) {
                default:        /* 3: write, present */
                        /* fall through */
-               case 2:         /* write, not present */
+               case PF_WRITE:          /* write, not present */
                        if (!(vma->vm_flags & VM_WRITE))
                                goto bad_area;
                        write++;
                        break;
-               case 1:         /* read, present */
+               case PF_PROT:           /* read, present */
                        goto bad_area;
-               case 0:         /* read, not present */
+               case 0:                 /* read, not present */
                        if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
                                goto bad_area;
        }
@@ -474,7 +483,7 @@
 
 bad_area_nosemaphore:
        /* User mode accesses just cause a SIGSEGV */
-       if (error_code & 4) {
+       if (error_code & PF_USER) {
                if (is_prefetch(regs, address, error_code))
                        return;
 
@@ -542,6 +551,9 @@
        printk_address(regs->rip);
        printk("\n");
        dump_pagetable(address);
+       tsk->thread.cr2 = address;
+       tsk->thread.trap_no = 14;
+       tsk->thread.error_code = error_code;
        __die("Oops", regs, error_code);
        /* Executive summary in case the body of the oops scrolled away */
        printk(KERN_EMERG "CR2: %016lx\n", address);
@@ -567,7 +579,7 @@
        up_read(&mm->mmap_sem);
 
        /* Kernel mode? Handle exceptions or die */
-       if (!(error_code & 4))
+       if (!(error_code & PF_USER))
                goto no_context;
 
        tsk->thread.cr2 = address;
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Thu Feb  2 19:16:38 2006
@@ -26,6 +26,9 @@
 #include <linux/bootmem.h>
 #include <linux/proc_fs.h>
 #include <linux/pci.h>
+#include <linux/dma-mapping.h>
+#include <linux/module.h>
+#include <linux/memory_hotplug.h>
 
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -41,12 +44,17 @@
 #include <asm/proto.h>
 #include <asm/smp.h>
 #include <asm/sections.h>
+#include <asm/dma-mapping.h>
+#include <asm/swiotlb.h>
 
 #include <xen/features.h>
 
 #ifndef Dprintk
 #define Dprintk(x...)
 #endif
+
+struct dma_mapping_ops* dma_ops;
+EXPORT_SYMBOL(dma_ops);
 
 extern unsigned long *contiguous_bitmap;
 
@@ -374,16 +382,24 @@
 
 unsigned long get_machine_pfn(unsigned long addr)
 {
-       pud_t* pud = pud_offset_k(addr);
+       pud_t* pud = pud_offset_k(NULL, addr);
        pmd_t* pmd = pmd_offset(pud, addr);
        pte_t *pte = pte_offset_kernel(pmd, addr);
 
        return pte_mfn(*pte);
 } 
 
-static __init void *alloc_static_page(unsigned long *phys)
+static __meminit void *alloc_static_page(unsigned long *phys)
 {
        unsigned long va = (start_pfn << PAGE_SHIFT) + __START_KERNEL_map;
+
+       if (after_bootmem) {
+               void *adr = (void *)get_zeroed_page(GFP_ATOMIC);
+
+               *phys = __pa(adr);
+               return adr;
+       }
+
        *phys = start_pfn << PAGE_SHIFT;
        start_pfn++;
        memset((void *)va, 0, PAGE_SIZE);
@@ -417,76 +433,85 @@
        return readonly;
 }
 
-static void __init phys_pud_init(pud_t *pud, unsigned long address, unsigned 
long end)
+static void __meminit
+phys_pmd_init(pmd_t *pmd, unsigned long address, unsigned long end)
+{
+       int i, k;
+
+       for (i = 0; i < PTRS_PER_PMD; pmd++, i++) {
+               unsigned long pte_phys;
+               pte_t *pte, *pte_save;
+
+               if (address >= end) {
+                       for (; i < PTRS_PER_PMD; i++, pmd++)
+                               set_pmd(pmd, __pmd(0));
+                       break;
+               }
+               pte = alloc_static_page(&pte_phys);
+               pte_save = pte;
+               for (k = 0; k < PTRS_PER_PTE; pte++, k++, address += PTE_SIZE) {
+                       if ((address >= end) ||
+                           ((address >> PAGE_SHIFT) >=
+                            xen_start_info->nr_pages)) { 
+                               __set_pte(pte, __pte(0)); 
+                               continue;
+                       }
+                       if (make_readonly(address)) {
+                               __set_pte(pte, 
+                                         __pte(address | (_KERNPG_TABLE & 
~_PAGE_RW)));
+                               continue;
+                       }
+                       __set_pte(pte, __pte(address | _KERNPG_TABLE));
+               }
+               pte = pte_save;
+               early_make_page_readonly(pte, XENFEAT_writable_page_tables);
+               xen_pte_pin(pte_phys);
+               set_pmd(pmd, __pmd(pte_phys | _KERNPG_TABLE));
+       }
+}
+
+static void __meminit
+phys_pmd_update(pud_t *pud, unsigned long address, unsigned long end)
+{
+       pmd_t *pmd = pmd_offset(pud, (unsigned long)__va(address));
+
+       if (pmd_none(*pmd)) {
+               spin_lock(&init_mm.page_table_lock);
+               phys_pmd_init(pmd, address, end);
+               spin_unlock(&init_mm.page_table_lock);
+               __flush_tlb_all();
+       }
+}
+
+static void __meminit phys_pud_init(pud_t *pud, unsigned long address, 
unsigned long end)
 { 
-       long i, j, k; 
-       unsigned long paddr;
-
-       i = pud_index(address);
+       long i = pud_index(address);
+
        pud = pud + i;
+
+       if (after_bootmem && pud_val(*pud)) {
+               phys_pmd_update(pud, address, end);
+               return;
+       }
+
        for (; i < PTRS_PER_PUD; pud++, i++) {
-               unsigned long pmd_phys;
+               unsigned long paddr, pmd_phys;
                pmd_t *pmd;
 
-               paddr = address + i*PUD_SIZE;
-               if (paddr >= end) { 
-                       for (; i < PTRS_PER_PUD; i++, pud++) 
-                               set_pud(pud, __pud(0)); 
+               paddr = (address & PGDIR_MASK) + i*PUD_SIZE;
+               if (paddr >= end)
                        break;
-               } 
 
                pmd = alloc_static_page(&pmd_phys);
                early_make_page_readonly(pmd, XENFEAT_writable_page_tables);
                xen_pmd_pin(pmd_phys);
+               spin_lock(&init_mm.page_table_lock);
                set_pud(pud, __pud(pmd_phys | _KERNPG_TABLE));
-               for (j = 0; j < PTRS_PER_PMD; pmd++, j++) {
-                       unsigned long pte_phys;
-                       pte_t *pte, *pte_save;
-
-                       if (paddr >= end) { 
-                               for (; j < PTRS_PER_PMD; j++, pmd++)
-                                       set_pmd(pmd,  __pmd(0)); 
-                               break;
-                       }
-                       pte = alloc_static_page(&pte_phys);
-                       pte_save = pte;
-                       for (k = 0; k < PTRS_PER_PTE; pte++, k++, paddr += 
PTE_SIZE) {
-                               if ((paddr >= end) ||
-                                   ((paddr >> PAGE_SHIFT) >=
-                                    xen_start_info->nr_pages)) { 
-                                       __set_pte(pte, __pte(0)); 
-                                       continue;
-                               }
-                               if (make_readonly(paddr)) {
-                                       __set_pte(pte, 
-                                               __pte(paddr | (_KERNPG_TABLE & 
~_PAGE_RW)));
-                                       continue;
-                               }
-                               __set_pte(pte, __pte(paddr | _KERNPG_TABLE));
-                       }
-                       pte = pte_save;
-                       early_make_page_readonly(
-                               pte, XENFEAT_writable_page_tables);
-                       xen_pte_pin(pte_phys);
-                       set_pmd(pmd, __pmd(pte_phys | _KERNPG_TABLE));
-               }
+               phys_pmd_init(pmd, paddr, end);
+               spin_unlock(&init_mm.page_table_lock);
        }
        __flush_tlb();
 } 
-
-static void __init find_early_table_space(unsigned long end)
-{
-       unsigned long puds, pmds, ptes; 
-
-       puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
-       pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
-       ptes = (end + PTE_SIZE - 1) >> PAGE_SHIFT;
-
-       tables_space =
-               round_up(puds * 8, PAGE_SIZE) + 
-               round_up(pmds * 8, PAGE_SIZE) + 
-               round_up(ptes * 8, PAGE_SIZE); 
-}
 
 void __init xen_init_pt(void)
 {
@@ -586,39 +611,71 @@
        }
 }
 
+static void __init find_early_table_space(unsigned long end)
+{
+       unsigned long puds, pmds, ptes; 
+
+       puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
+       pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
+       ptes = (end + PTE_SIZE - 1) >> PAGE_SHIFT;
+
+       tables_space =
+               round_up(puds * 8, PAGE_SIZE) + 
+               round_up(pmds * 8, PAGE_SIZE) + 
+               round_up(ptes * 8, PAGE_SIZE); 
+
+       extend_init_mapping();
+
+       table_start = start_pfn;
+
+       early_printk("kernel direct mapping tables up to %lx @ %lx-%lx\n",
+               __pa(end), table_start << PAGE_SHIFT, start_pfn << PAGE_SHIFT);
+}
+
 /* Setup the direct mapping of the physical memory at PAGE_OFFSET.
    This runs before bootmem is initialized and gets pages directly from the 
    physical memory. To access them they are temporarily mapped. */
-void __init init_memory_mapping(unsigned long start, unsigned long end)
+void __meminit init_memory_mapping(unsigned long start, unsigned long end)
 { 
        unsigned long next; 
 
        Dprintk("init_memory_mapping\n");
 
-       find_early_table_space(end);
-       extend_init_mapping();
-
-       table_start = start_pfn;
+       /* 
+        * Find space for the kernel direct mapping tables.
+        * Later we should allocate these tables in the local node of the memory
+        * mapped.  Unfortunately this is done currently before the nodes are 
+        * discovered.
+        */
+       if (!after_bootmem)
+               find_early_table_space(end);
 
        start = (unsigned long)__va(start);
        end = (unsigned long)__va(end);
 
        for (; start < end; start = next) {
                unsigned long pud_phys; 
-               pud_t *pud = alloc_static_page(&pud_phys);
-               early_make_page_readonly(pud, XENFEAT_writable_page_tables);
+               pgd_t *pgd = pgd_offset_k(start);
+               pud_t *pud;
+
+               if (after_bootmem) {
+                       pud = pud_offset_k(pgd, __PAGE_OFFSET);
+                       make_page_readonly(pud, XENFEAT_writable_page_tables);
+                       pud_phys = __pa(pud);
+               } else {
+                       pud = alloc_static_page(&pud_phys);
+                       early_make_page_readonly(pud, 
XENFEAT_writable_page_tables);
+               }
                xen_pud_pin(pud_phys);
                next = start + PGDIR_SIZE;
                if (next > end) 
                        next = end; 
                phys_pud_init(pud, __pa(start), __pa(next));
-               set_pgd(pgd_offset_k(start), mk_kernel_pgd(pud_phys));
-       }
-
-       printk("kernel direct mapping tables upto %lx @ %lx-%lx\n",
-              __pa(end), table_start<<PAGE_SHIFT, start_pfn<<PAGE_SHIFT);
-
-       BUG_ON(start_pfn != (table_start + (tables_space >> PAGE_SHIFT)));
+               if (!after_bootmem)
+                       set_pgd(pgd_offset_k(start), mk_kernel_pgd(pud_phys));
+       }
+
+       BUG_ON(!after_bootmem && start_pfn != table_start + (tables_space >> 
PAGE_SHIFT));
 
        __flush_tlb_all();
 }
@@ -696,6 +753,9 @@
 void __init paging_init(void)
 {
        unsigned long zones[MAX_NR_ZONES], holes[MAX_NR_ZONES];
+
+       memory_present(0, 0, end_pfn);
+       sparse_init();
        size_zones(zones, holes, 0, end_pfn);
        free_area_init_node(0, NODE_DATA(0), zones,
                            __pa(PAGE_OFFSET) >> PAGE_SHIFT, holes);
@@ -757,6 +817,50 @@
        __flush_tlb_all();
 } 
 
+/*
+ * Memory hotplug specific functions
+ * These are only for non-NUMA machines right now.
+ */
+#ifdef CONFIG_MEMORY_HOTPLUG
+
+void online_page(struct page *page)
+{
+       ClearPageReserved(page);
+       set_page_count(page, 1);
+       __free_page(page);
+       totalram_pages++;
+       num_physpages++;
+}
+
+int add_memory(u64 start, u64 size)
+{
+       struct pglist_data *pgdat = NODE_DATA(0);
+       struct zone *zone = pgdat->node_zones + MAX_NR_ZONES-2;
+       unsigned long start_pfn = start >> PAGE_SHIFT;
+       unsigned long nr_pages = size >> PAGE_SHIFT;
+       int ret;
+
+       ret = __add_pages(zone, start_pfn, nr_pages);
+       if (ret)
+               goto error;
+
+       init_memory_mapping(start, (start + size -1));
+
+       return ret;
+error:
+       printk("%s: Problem encountered in __add_pages!\n", __func__);
+       return ret;
+}
+EXPORT_SYMBOL_GPL(add_memory);
+
+int remove_memory(u64 start, u64 size)
+{
+       return -EINVAL;
+}
+EXPORT_SYMBOL_GPL(remove_memory);
+
+#endif
+
 static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel, kcore_modules,
                         kcore_vsyscall;
 
@@ -772,6 +876,7 @@
 #if defined(CONFIG_SWIOTLB)
        swiotlb_init(); 
 #endif
+       no_iommu_init();
 
        /* How many end-of-memory variables you have, grandma! */
        max_low_pfn = end_pfn;
@@ -857,10 +962,33 @@
 #endif
 }
 
+#ifdef CONFIG_DEBUG_RODATA
+
+extern char __start_rodata, __end_rodata;
+void mark_rodata_ro(void)
+{
+       unsigned long addr = (unsigned long)&__start_rodata;
+
+       for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE)
+               change_page_attr_addr(addr, 1, PAGE_KERNEL_RO);
+
+       printk ("Write protecting the kernel read-only data: %luk\n",
+                       (&__end_rodata - &__start_rodata) >> 10);
+
+       /*
+        * change_page_attr_addr() requires a global_flush_tlb() call after it.
+        * We do this after the printk so that if something went wrong in the
+        * change, the printk gets out at least to give a better debug hint
+        * of who is the culprit.
+        */
+       global_flush_tlb();
+}
+#endif
+
 #ifdef CONFIG_BLK_DEV_INITRD
 void free_initrd_mem(unsigned long start, unsigned long end)
 {
-       if (start < (unsigned long)&_end)
+       if (start >= end)
                return;
        printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
        for (; start < end; start += PAGE_SIZE) {
@@ -900,7 +1028,7 @@
        if (pgd_none(*pgd))
                return 0;
 
-       pud = pud_offset_k(addr);
+       pud = pud_offset_k(pgd, addr);
        if (pud_none(*pud))
                return 0; 
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c        Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/pageattr-xen.c        Thu Feb  2 
19:16:38 2006
@@ -266,6 +266,7 @@
        pte_t *kpte; 
        struct page *kpte_page;
        unsigned kpte_flags;
+       pgprot_t ref_prot2;
        kpte = lookup_address(address);
        if (!kpte) return 0;
        kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
@@ -278,10 +279,14 @@
                         * split_large_page will take the reference for this 
change_page_attr
                         * on the split page.
                         */
-                       struct page *split = split_large_page(address, prot, 
ref_prot); 
+
+                       struct page *split;
+                       ref_prot2 = 
__pgprot(pgprot_val(pte_pgprot(*lookup_address(address))) & 
~(1<<_PAGE_BIT_PSE));
+
+                       split = split_large_page(address, prot, ref_prot2);
                        if (!split)
                                return -ENOMEM;
-                       set_pte(kpte,mk_pte(split, ref_prot));
+                       set_pte(kpte,mk_pte(split, ref_prot2));
                        kpte_page = split;
                }       
                get_page(kpte_page);
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/Kconfig
--- a/linux-2.6-xen-sparse/drivers/Kconfig      Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/Kconfig      Thu Feb  2 19:16:38 2006
@@ -54,6 +54,8 @@
 
 source "drivers/i2c/Kconfig"
 
+source "drivers/spi/Kconfig"
+
 source "drivers/w1/Kconfig"
 
 source "drivers/hwmon/Kconfig"
@@ -77,4 +79,6 @@
 
 source "drivers/sn/Kconfig"
 
+source "drivers/edac/Kconfig"
+
 endmenu
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/Makefile
--- a/linux-2.6-xen-sparse/drivers/Makefile     Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/Makefile     Thu Feb  2 19:16:38 2006
@@ -13,6 +13,7 @@
 # PnP must come after ACPI since it will eventually need to check if acpi
 # was used and do nothing if so
 obj-$(CONFIG_PNP)              += pnp/
+obj-$(CONFIG_ARM_AMBA)         += amba/
 
 # char/ comes before serial/ etc so that the VT console is the boot-time
 # default.
@@ -41,6 +42,7 @@
 obj-$(CONFIG_IEEE1394)         += ieee1394/
 obj-y                          += cdrom/
 obj-$(CONFIG_MTD)              += mtd/
+obj-$(CONFIG_SPI)              += spi/
 obj-$(CONFIG_PCCARD)           += pcmcia/
 obj-$(CONFIG_DIO)              += dio/
 obj-$(CONFIG_SBUS)             += sbus/
@@ -62,6 +64,7 @@
 obj-$(CONFIG_MD)               += md/
 obj-$(CONFIG_BT)               += bluetooth/
 obj-$(CONFIG_ISDN)             += isdn/
+obj-$(CONFIG_EDAC)             += edac/
 obj-$(CONFIG_MCA)              += mca/
 obj-$(CONFIG_EISA)             += eisa/
 obj-$(CONFIG_CPU_FREQ)         += cpufreq/
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/acpi/Kconfig
--- a/linux-2.6-xen-sparse/drivers/acpi/Kconfig Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/acpi/Kconfig Thu Feb  2 19:16:38 2006
@@ -168,7 +168,6 @@
 config ACPI_ASUS
         tristate "ASUS/Medion Laptop Extras"
        depends on X86
-       default y
         ---help---
           This driver provides support for extra features of ACPI-compatible
           ASUS laptops. As some of Medion laptops are made by ASUS, it may also
@@ -209,7 +208,6 @@
 config ACPI_TOSHIBA
        tristate "Toshiba Laptop Extras"
        depends on X86
-       default y
        ---help---
          This driver adds support for access to certain system settings
          on "legacy free" Toshiba laptops.  These laptops can be recognized by
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/acpi/tables.c
--- a/linux-2.6-xen-sparse/drivers/acpi/tables.c        Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/acpi/tables.c        Thu Feb  2 19:16:38 2006
@@ -37,7 +37,7 @@
 
 #define PREFIX                 "ACPI: "
 
-#define ACPI_MAX_TABLES                256
+#define ACPI_MAX_TABLES                128
 
 static char *acpi_table_signatures[ACPI_TABLE_COUNT] = {
        [ACPI_TABLE_UNKNOWN] = "????",
@@ -74,7 +74,7 @@
 static unsigned long sdt_pa;   /* Physical Address */
 static unsigned long sdt_count;        /* Table count */
 
-static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES];
+static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES] __initdata;
 
 void acpi_table_print(struct acpi_table_header *header, unsigned long 
phys_addr)
 {
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/char/mem.c
--- a/linux-2.6-xen-sparse/drivers/char/mem.c   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/char/mem.c   Thu Feb  2 19:16:38 2006
@@ -101,6 +101,11 @@
 
        return 1;
 }
+
+static inline int valid_mmap_phys_addr_range(unsigned long addr, size_t *size)
+{
+       return 1;
+}
 #endif
 
 #ifndef ARCH_HAS_DEV_MEM
@@ -230,26 +235,36 @@
 }
 #endif
 
+#ifndef __HAVE_PHYS_MEM_ACCESS_PROT
+static pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
+                                    unsigned long size, pgprot_t vma_prot)
+{
+#ifdef pgprot_noncached
+       unsigned long offset = pfn << PAGE_SHIFT;
+
+       if (uncached_access(file, offset))
+               return pgprot_noncached(vma_prot);
+#endif
+       return vma_prot;
+}
+#endif
+
 static int mmap_mem(struct file * file, struct vm_area_struct * vma)
 {
-#if defined(__HAVE_PHYS_MEM_ACCESS_PROT)
+       size_t size = vma->vm_end - vma->vm_start;
+
+       if (!valid_mmap_phys_addr_range(vma->vm_pgoff << PAGE_SHIFT, &size))
+               return -EINVAL;
+
        vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff,
-                                                vma->vm_end - vma->vm_start,
+                                                size,
                                                 vma->vm_page_prot);
-#elif defined(pgprot_noncached)
-       unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
-       int uncached;
-
-       uncached = uncached_access(file, offset);
-       if (uncached)
-               vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-#endif
 
        /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */
        if (remap_pfn_range(vma,
                            vma->vm_start,
                            vma->vm_pgoff,
-                           vma->vm_end-vma->vm_start,
+                           size,
                            vma->vm_page_prot))
                return -EAGAIN;
        return 0;
@@ -521,7 +536,7 @@
        return virtr + wrote;
 }
 
-#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && 
(!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
 static ssize_t read_port(struct file * file, char __user * buf,
                         size_t count, loff_t *ppos)
 {
@@ -728,7 +743,7 @@
 {
        loff_t ret;
 
-       down(&file->f_dentry->d_inode->i_sem);
+       mutex_lock(&file->f_dentry->d_inode->i_mutex);
        switch (orig) {
                case 0:
                        file->f_pos = offset;
@@ -743,7 +758,7 @@
                default:
                        ret = -EINVAL;
        }
-       up(&file->f_dentry->d_inode->i_sem);
+       mutex_unlock(&file->f_dentry->d_inode->i_mutex);
        return ret;
 }
 
@@ -786,7 +801,7 @@
        .write          = write_null,
 };
 
-#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && 
(!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
 static struct file_operations port_fops = {
        .llseek         = memory_lseek,
        .read           = read_port,
@@ -823,7 +838,7 @@
                          size_t count, loff_t *ppos)
 {
        char *tmp;
-       int ret;
+       ssize_t ret;
 
        tmp = kmalloc(count + 1, GFP_KERNEL);
        if (tmp == NULL)
@@ -832,6 +847,9 @@
        if (!copy_from_user(tmp, buf, count)) {
                tmp[count] = 0;
                ret = printk("%s", tmp);
+               if (ret > count)
+                       /* printk can add a prefix */
+                       ret = count;
        }
        kfree(tmp);
        return ret;
@@ -853,7 +871,7 @@
                case 3:
                        filp->f_op = &null_fops;
                        break;
-#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && 
(!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
                case 4:
                        filp->f_op = &port_fops;
                        break;
@@ -900,7 +918,7 @@
        {1, "mem",     S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
        {2, "kmem",    S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
        {3, "null",    S_IRUGO | S_IWUGO,           &null_fops},
-#if (defined(CONFIG_ISA) || !defined(__mc68000__)) && 
(!defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI))
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
        {4, "port",    S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
 #endif
        {5, "zero",    S_IRUGO | S_IWUGO,           &zero_fops},
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/drivers/char/tpm/Makefile
--- a/linux-2.6-xen-sparse/drivers/char/tpm/Makefile    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/char/tpm/Makefile    Thu Feb  2 19:16:38 2006
@@ -2,6 +2,9 @@
 # Makefile for the kernel tpm device drivers.
 #
 obj-$(CONFIG_TCG_TPM) += tpm.o
+ifdef CONFIG_ACPI
+       obj-$(CONFIG_TCG_TPM) += tpm_bios.o
+endif
 obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
 obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
 obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/char/tpm/tpm.c
--- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm.c       Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm.c       Thu Feb  2 19:16:38 2006
@@ -438,6 +438,7 @@
        int ret_size;
        int pos, pending = 0;
 
+       del_singleshot_timer_sync(&chip->user_read_timer);
        flush_scheduled_work();
        ret_size = atomic_read(&chip->data_pending);
        if (ret_size > 0) {     /* relay data */
@@ -488,6 +489,7 @@
        kfree(chip->vendor->miscdev.name);
 
        sysfs_remove_group(&dev->kobj, chip->vendor->attr_group);
+       tpm_bios_log_teardown(chip->bios_dir);
 
        dev_mask[chip->dev_num / TPM_NUM_MASK_ENTRIES ] &=
                ~(1 << (chip->dev_num % TPM_NUM_MASK_ENTRIES));
@@ -621,6 +623,8 @@
 
        sysfs_create_group(&dev->kobj, chip->vendor->attr_group);
 
+       chip->bios_dir = tpm_bios_log_setup(devname);
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(tpm_register_hardware);
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/char/tpm/tpm.h
--- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm.h       Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm.h       Thu Feb  2 19:16:38 2006
@@ -81,6 +81,8 @@
 
        struct tpm_vendor_specific *vendor;
 
+       struct dentry **bios_dir;
+
        struct list_head list;
 };
 
@@ -106,3 +108,16 @@
 extern void tpm_remove_hardware(struct device *);
 extern int tpm_pm_suspend(struct pci_dev *, pm_message_t);
 extern int tpm_pm_resume(struct pci_dev *);
+
+#ifdef CONFIG_ACPI
+extern struct dentry ** tpm_bios_log_setup(char *);
+extern void tpm_bios_log_teardown(struct dentry **);
+#else
+static inline struct dentry* tpm_bios_log_setup(char *name)
+{
+       return NULL;
+}
+static inline void tpm_bios_log_teardown(struct dentry **dir)
+{
+}
+#endif
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/char/tty_io.c
--- a/linux-2.6-xen-sparse/drivers/char/tty_io.c        Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/char/tty_io.c        Thu Feb  2 19:16:38 2006
@@ -168,9 +168,12 @@
        return tty;
 }
 
+static void tty_buffer_free_all(struct tty_struct *);
+
 static inline void free_tty_struct(struct tty_struct *tty)
 {
        kfree(tty->write_buf);
+       tty_buffer_free_all(tty);
        kfree(tty);
 }
 
@@ -233,6 +236,200 @@
 }
 
 /*
+ * Tty buffer allocation management
+ */
+
+static void tty_buffer_free_all(struct tty_struct *tty)
+{
+       struct tty_buffer *thead;
+       while((thead = tty->buf.head) != NULL) {
+               tty->buf.head = thead->next;
+               kfree(thead);
+       }
+       while((thead = tty->buf.free) != NULL) {
+               tty->buf.free = thead->next;
+               kfree(thead);
+       }
+       tty->buf.tail = NULL;
+}
+
+static void tty_buffer_init(struct tty_struct *tty)
+{
+       tty->buf.head = NULL;
+       tty->buf.tail = NULL;
+       tty->buf.free = NULL;
+}
+
+static struct tty_buffer *tty_buffer_alloc(size_t size)
+{
+       struct tty_buffer *p = kmalloc(sizeof(struct tty_buffer) + 2 * size, 
GFP_ATOMIC);
+       if(p == NULL)
+               return NULL;
+       p->used = 0;
+       p->size = size;
+       p->next = NULL;
+       p->char_buf_ptr = (char *)(p->data);
+       p->flag_buf_ptr = (unsigned char *)p->char_buf_ptr + size;
+/*     printk("Flip create %p\n", p); */
+       return p;
+}
+
+/* Must be called with the tty_read lock held. This needs to acquire strategy
+   code to decide if we should kfree or relink a given expired buffer */
+
+static void tty_buffer_free(struct tty_struct *tty, struct tty_buffer *b)
+{
+       /* Dumb strategy for now - should keep some stats */
+/*     printk("Flip dispose %p\n", b); */
+       if(b->size >= 512)
+               kfree(b);
+       else {
+               b->next = tty->buf.free;
+               tty->buf.free = b;
+       }
+}
+
+static struct tty_buffer *tty_buffer_find(struct tty_struct *tty, size_t size)
+{
+       struct tty_buffer **tbh = &tty->buf.free;
+       while((*tbh) != NULL) {
+               struct tty_buffer *t = *tbh;
+               if(t->size >= size) {
+                       *tbh = t->next;
+                       t->next = NULL;
+                       t->used = 0;
+                       /* DEBUG ONLY */
+                       memset(t->data, '*', size);
+/*                     printk("Flip recycle %p\n", t); */
+                       return t;
+               }
+               tbh = &((*tbh)->next);
+       }
+       /* Round the buffer size out */
+       size = (size + 0xFF) & ~ 0xFF;
+       return tty_buffer_alloc(size);
+       /* Should possibly check if this fails for the largest buffer we
+          have queued and recycle that ? */
+}
+
+int tty_buffer_request_room(struct tty_struct *tty, size_t size)
+{
+       struct tty_buffer *b = tty->buf.tail, *n;
+       int left = 0;
+
+       /* OPTIMISATION: We could keep a per tty "zero" sized buffer to
+          remove this conditional if its worth it. This would be invisible
+          to the callers */
+       if(b != NULL)
+               left = b->size - b->used;
+       if(left >= size)
+               return size;
+       /* This is the slow path - looking for new buffers to use */
+       n = tty_buffer_find(tty, size);
+       if(n == NULL)
+               return left;
+       if(b != NULL)
+               b->next = n;
+       else
+               tty->buf.head = n;
+       tty->buf.tail = n;
+       return size;
+}
+
+EXPORT_SYMBOL_GPL(tty_buffer_request_room);
+
+int tty_insert_flip_string(struct tty_struct *tty, unsigned char *chars, 
size_t size)
+{
+       int copied = 0;
+       do {
+               int space = tty_buffer_request_room(tty, size - copied);
+               struct tty_buffer *tb = tty->buf.tail;
+               /* If there is no space then tb may be NULL */
+               if(unlikely(space == 0))
+                       break;
+               memcpy(tb->char_buf_ptr + tb->used, chars, space);
+               memset(tb->flag_buf_ptr + tb->used, TTY_NORMAL, space);
+               tb->used += space;
+               copied += space;
+               chars += space;
+/*             printk("Flip insert %d.\n", space); */
+       }
+       /* There is a small chance that we need to split the data over
+          several buffers. If this is the case we must loop */
+       while (unlikely(size > copied));
+       return copied;
+}
+
+EXPORT_SYMBOL_GPL(tty_insert_flip_string);
+
+int tty_insert_flip_string_flags(struct tty_struct *tty, unsigned char *chars, 
char *flags, size_t size)
+{
+       int copied = 0;
+       do {
+               int space = tty_buffer_request_room(tty, size - copied);
+               struct tty_buffer *tb = tty->buf.tail;
+               /* If there is no space then tb may be NULL */
+               if(unlikely(space == 0))
+                       break;
+               memcpy(tb->char_buf_ptr + tb->used, chars, space);
+               memcpy(tb->flag_buf_ptr + tb->used, flags, space);
+               tb->used += space;
+               copied += space;
+               chars += space;
+               flags += space;
+       }
+       /* There is a small chance that we need to split the data over
+          several buffers. If this is the case we must loop */
+       while (unlikely(size > copied));
+       return copied;
+}
+
+EXPORT_SYMBOL_GPL(tty_insert_flip_string_flags);
+
+
+/*
+ *     Prepare a block of space in the buffer for data. Returns the length
+ *     available and buffer pointer to the space which is now allocated and
+ *     accounted for as ready for normal characters. This is used for drivers
+ *     that need their own block copy routines into the buffer. There is no
+ *     guarantee the buffer is a DMA target!
+ */
+
+int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, 
size_t size)
+{
+       int space = tty_buffer_request_room(tty, size);
+       struct tty_buffer *tb = tty->buf.tail;
+       *chars = tb->char_buf_ptr + tb->used;
+       memset(tb->flag_buf_ptr + tb->used, TTY_NORMAL, space);
+       tb->used += space;
+       return space;
+}
+
+EXPORT_SYMBOL_GPL(tty_prepare_flip_string);
+
+/*
+ *     Prepare a block of space in the buffer for data. Returns the length
+ *     available and buffer pointer to the space which is now allocated and
+ *     accounted for as ready for characters. This is used for drivers
+ *     that need their own block copy routines into the buffer. There is no
+ *     guarantee the buffer is a DMA target!
+ */
+
+int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char 
**chars, char **flags, size_t size)
+{
+       int space = tty_buffer_request_room(tty, size);
+       struct tty_buffer *tb = tty->buf.tail;
+       *chars = tb->char_buf_ptr + tb->used;
+       *flags = tb->flag_buf_ptr + tb->used;
+       tb->used += space;
+       return space;
+}
+
+EXPORT_SYMBOL_GPL(tty_prepare_flip_string_flags);
+
+
+
+/*
  *     This is probably overkill for real world processors but
  *     they are not on hot paths so a little discipline won't do 
  *     any harm.
@@ -493,6 +690,17 @@
        }
        if (ld == NULL)
                return -EINVAL;
+
+       /*
+        *      No more input please, we are switching. The new ldisc
+        *      will update this value in the ldisc open function
+        */
+
+       tty->receive_room = 0;
+
+       /*
+        *      Problem: What do we do if this blocks ?
+        */
 
        tty_wait_until_sent(tty, 0);
 
@@ -562,9 +770,9 @@
         *      we say so later on.
         */
 
-       work = cancel_delayed_work(&tty->flip.work);
+       work = cancel_delayed_work(&tty->buf.work);
        /*
-        * Wait for ->hangup_work and ->flip.work handlers to terminate
+        * Wait for ->hangup_work and ->buf.work handlers to terminate
         */
         
        flush_scheduled_work();
@@ -618,7 +826,7 @@
        /* Restart it in case no characters kick it off. Safe if
           already running */
        if (work)
-               schedule_delayed_work(&tty->flip.work, 1);
+               schedule_delayed_work(&tty->buf.work, 1);
        return retval;
 }
 
@@ -1723,10 +1931,10 @@
         */
        clear_bit(TTY_LDISC, &tty->flags);
        clear_bit(TTY_DONT_FLIP, &tty->flags);
-       cancel_delayed_work(&tty->flip.work);
+       cancel_delayed_work(&tty->buf.work);
 
        /*
-        * Wait for ->hangup_work and ->flip.work handlers to terminate
+        * Wait for ->hangup_work and ->buf.work handlers to terminate
         */
         
        flush_scheduled_work();
@@ -2520,17 +2728,15 @@
 
 /*
  * This routine is called out of the software interrupt to flush data
- * from the flip buffer to the line discipline. 
+ * from the buffer chain to the line discipline.
  */
  
 static void flush_to_ldisc(void *private_)
 {
        struct tty_struct *tty = (struct tty_struct *) private_;
-       unsigned char   *cp;
-       char            *fp;
-       int             count;
        unsigned long   flags;
        struct tty_ldisc *disc;
+       struct tty_buffer *tbuf;
 
        disc = tty_ldisc_ref(tty);
        if (disc == NULL)       /*  !TTY_LDISC */
@@ -2540,28 +2746,23 @@
                /*
                 * Do it after the next timer tick:
                 */
-               schedule_delayed_work(&tty->flip.work, 1);
+               schedule_delayed_work(&tty->buf.work, 1);
                goto out;
        }
        spin_lock_irqsave(&tty->read_lock, flags);
-       if (tty->flip.buf_num) {
-               cp = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
-               fp = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
-               tty->flip.buf_num = 0;
-               tty->flip.char_buf_ptr = tty->flip.char_buf;
-               tty->flip.flag_buf_ptr = tty->flip.flag_buf;
-       } else {
-               cp = tty->flip.char_buf;
-               fp = tty->flip.flag_buf;
-               tty->flip.buf_num = 1;
-               tty->flip.char_buf_ptr = tty->flip.char_buf + TTY_FLIPBUF_SIZE;
-               tty->flip.flag_buf_ptr = tty->flip.flag_buf + TTY_FLIPBUF_SIZE;
-       }
-       count = tty->flip.count;
-       tty->flip.count = 0;
+       while((tbuf = tty->buf.head) != NULL) {
+               tty->buf.head = tbuf->next;
+               if (tty->buf.head == NULL)
+                       tty->buf.tail = NULL;
+               spin_unlock_irqrestore(&tty->read_lock, flags);
+               /* printk("Process buffer %p for %d\n", tbuf, tbuf->used); */
+               disc->receive_buf(tty, tbuf->char_buf_ptr,
+                                      tbuf->flag_buf_ptr,
+                                      tbuf->used);
+               spin_lock_irqsave(&tty->read_lock, flags);
+               tty_buffer_free(tty, tbuf);
+       }
        spin_unlock_irqrestore(&tty->read_lock, flags);
-
-       disc->receive_buf(tty, cp, fp, count);
 out:
        tty_ldisc_deref(disc);
 }
@@ -2656,10 +2857,11 @@
        if (tty->low_latency)
                flush_to_ldisc((void *) tty);
        else
-               schedule_delayed_work(&tty->flip.work, 1);
+               schedule_delayed_work(&tty->buf.work, 1);
 }
 
 EXPORT_SYMBOL(tty_flip_buffer_push);
+
 
 /*
  * This subroutine initializes a tty structure.
@@ -2671,10 +2873,10 @@
        tty_ldisc_assign(tty, tty_ldisc_get(N_TTY));
        tty->pgrp = -1;
        tty->overrun_time = jiffies;
-       tty->flip.char_buf_ptr = tty->flip.char_buf;
-       tty->flip.flag_buf_ptr = tty->flip.flag_buf;
-       INIT_WORK(&tty->flip.work, flush_to_ldisc, tty);
-       init_MUTEX(&tty->flip.pty_sem);
+       tty->buf.head = tty->buf.tail = NULL;
+       tty_buffer_init(tty);
+       INIT_WORK(&tty->buf.work, flush_to_ldisc, tty);
+       init_MUTEX(&tty->buf.pty_sem);
        init_MUTEX(&tty->termios_sem);
        init_waitqueue_head(&tty->write_wait);
        init_waitqueue_head(&tty->read_wait);
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/serial/Kconfig
--- a/linux-2.6-xen-sparse/drivers/serial/Kconfig       Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/serial/Kconfig       Thu Feb  2 19:16:38 2006
@@ -96,6 +96,16 @@
          PCI enumeration and any ports that may be added at run-time
          via hot-plug, or any ISA multi-port serial cards.
 
+config SERIAL_8250_RUNTIME_UARTS
+       int "Number of 8250/16550 serial ports to register at runtime"
+       depends on SERIAL_8250
+       default "4"
+       help
+         Set this to the maximum number of serial ports you want
+         the kernel to register at boot time.  This can be overriden
+         with the module parameter "nr_uarts", or boot-time parameter
+         8250.nr_uarts
+
 config SERIAL_8250_EXTENDED
        bool "Extended 8250/16550 serial driver options"
        depends on SERIAL_8250
@@ -181,7 +191,6 @@
          To compile this driver as a module, choose M here: the module
          will be called 8250_boca.
 
-
 config SERIAL_8250_HUB6
        tristate "Support Hub6 cards"
        depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
@@ -271,6 +280,40 @@
          your boot loader (lilo or loadlin) about how to pass options to the
          kernel at boot time.)
 
+config SERIAL_AT91
+       bool "AT91RM9200 serial port support"
+       depends on ARM && ARCH_AT91RM9200
+       select SERIAL_CORE
+       help
+         This enables the driver for the on-chip UARTs of the AT91RM9200
+         processor.
+
+config SERIAL_AT91_CONSOLE
+       bool "Support for console on AT91RM9200 serial port"
+       depends on SERIAL_AT91=y
+       select SERIAL_CORE_CONSOLE
+       help
+         Say Y here if you wish to use a UART on the AT91RM9200 as the system
+         console (the system console is the device which receives all kernel
+         messages and warnings and which allows logins in single user mode).
+
+config SERIAL_AT91_TTYAT
+       bool "Install as device ttyAT0-4 instead of ttyS0-4"
+       depends on SERIAL_AT91=y
+       help
+         Say Y here if you wish to have the five internal AT91RM9200 UARTs
+         appear as /dev/ttyAT0-4 (major 204, minor 154-158) instead of the
+         normal /dev/ttyS0-4 (major 4, minor 64-68). This is necessary if
+         you also want other UARTs, such as external 8250/16C550 compatible
+         UARTs.
+         The ttySn nodes are legally reserved for the 8250 serial driver
+         but are often misused by other serial drivers.
+
+         To use this, you should create suitable ttyATn device nodes in
+         /dev/, and pass "console=ttyATn" to the kernel.
+
+         Say Y if you have an external 8250/16C550 UART.  If unsure, say N.
+
 config SERIAL_CLPS711X
        tristate "CLPS711X serial port support"
        depends on ARM && ARCH_CLPS711X
@@ -357,29 +400,6 @@
          (/dev/tty0) will still be used as the system console by default, but
          you can alter that using a kernel command line option such as
          "console=ttyFB". (Try "man bootparam" or see the documentation of
-         your boot loader (lilo or loadlin) about how to pass options to the
-         kernel at boot time.)
-
-config SERIAL_UART00
-       bool "Excalibur serial port (uart00) support"
-       depends on ARM && ARCH_CAMELOT
-       select SERIAL_CORE
-       help
-         Say Y here if you want to use the hard logic uart on Excalibur. This
-         driver also supports soft logic implementations of this uart core.
-
-config SERIAL_UART00_CONSOLE
-       bool "Support for console on Excalibur serial port"
-       depends on SERIAL_UART00
-       select SERIAL_CORE_CONSOLE
-       help
-         Say Y here if you want to support a serial console on an Excalibur
-         hard logic uart or uart00 IP core.
-
-         Even if you say Y here, the currently visible virtual console
-         (/dev/tty0) will still be used as the system console by default, but
-         you can alter that using a kernel command line option such as
-         "console=ttyS1". (Try "man bootparam" or see the documentation of
          your boot loader (lilo or loadlin) about how to pass options to the
          kernel at boot time.)
 
@@ -828,7 +848,7 @@
 
 config SERIAL_M32R_PLDSIO
        bool "M32R SIO I/F on a PLD"
-       depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PALT_USRV || 
PLAT_M32700UT)
+       depends on SERIAL_M32R_SIO=y && (PLAT_OPSPUT || PLAT_USRV || 
PLAT_M32700UT)
        default n
        help
          Say Y here if you want to use the M32R serial controller
@@ -874,7 +894,7 @@
 
 config SERIAL_JSM
         tristate "Digi International NEO PCI Support"
-       depends on PCI
+       depends on PCI && BROKEN
         select SERIAL_CORE
         help
           This is a driver for Digi International's Neo series
@@ -897,4 +917,12 @@
                and wish to use the serial ports on this card, say Y.
                Otherwise, say N.
 
+config SERIAL_SGI_IOC3
+       tristate "SGI Altix IOC3 serial support"
+       depends on (IA64_GENERIC || IA64_SGI_SN2) && SGI_IOC3
+       select SERIAL_CORE
+       help
+         If you have an SGI Altix with an IOC3 serial card,
+         say Y or M.  Otherwise, say N.
+
 endmenu
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Thu Feb  2 
19:16:38 2006
@@ -91,15 +91,13 @@
 static DECLARE_WORK(balloon_worker, balloon_process, NULL);
 static struct timer_list balloon_timer;
 
-/* Use the private and mapping fields of struct page as a list. */
-#define PAGE_TO_LIST(p) ((struct list_head *)&p->u.private)
-#define LIST_TO_PAGE(l)                                \
-       (list_entry(((unsigned long *)l), struct page, u.private))
+#define PAGE_TO_LIST(p) (&(p)->ballooned)
+#define LIST_TO_PAGE(l) list_entry((l), struct page, ballooned)
 #define UNLIST_PAGE(p)                         \
        do {                                    \
                list_del(PAGE_TO_LIST(p));      \
-               p->mapping = NULL;              \
-               p->u.private = 0;               \
+               PAGE_TO_LIST(p)->next = NULL;   \
+               PAGE_TO_LIST(p)->prev = NULL;   \
        } while(0)
 
 #define IPRINTK(fmt, args...) \
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Thu Feb  2 
19:16:38 2006
@@ -664,7 +664,8 @@
                                req, (bret->status == BLKIF_RSP_OKAY),
                                req->hard_nr_sectors);
                        BUG_ON(ret);
-                       end_that_request_last(req);
+                       end_that_request_last(
+                               req, (bret->status == BLKIF_RSP_OKAY));
                        break;
                default:
                        BUG();
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/drivers/xen/char/mem.c
--- a/linux-2.6-xen-sparse/drivers/xen/char/mem.c       Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/char/mem.c       Thu Feb  2 19:16:38 2006
@@ -91,11 +91,13 @@
 
 static int mmap_mem(struct file * file, struct vm_area_struct * vma)
 {
+       size_t size = vma->vm_end - vma->vm_start;
+
        if (uncached_access(file))
                vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 
        if (direct_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
-                                  vma->vm_end - vma->vm_start,
+                                  size,
                                   vma->vm_page_prot, DOMID_IO))
                return -EAGAIN;
 
@@ -114,7 +116,7 @@
 {
        loff_t ret;
 
-       down(&file->f_dentry->d_inode->i_sem);
+       mutex_lock(&file->f_dentry->d_inode->i_mutex);
        switch (orig) {
                case 0:
                        file->f_pos = offset;
@@ -129,7 +131,7 @@
                default:
                        ret = -EINVAL;
        }
-       up(&file->f_dentry->d_inode->i_sem);
+       mutex_unlock(&file->f_dentry->d_inode->i_mutex);
        return ret;
 }
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Thu Feb  2 19:16:38 2006
@@ -188,7 +188,7 @@
 
        ctxt.ctrlreg[3] = virt_to_mfn(init_level4_pgt) << PAGE_SHIFT;
 
-       ctxt.gs_base_kernel = (unsigned long)(cpu_pda + vcpu);
+       ctxt.gs_base_kernel = (unsigned long)(cpu_pda(vcpu));
 #endif
 
        BUG_ON(HYPERVISOR_vcpu_op(VCPUOP_initialise, vcpu, &ctxt));
@@ -226,8 +226,8 @@
                        panic("failed fork for CPU %d", cpu);
 
 #ifdef __x86_64__
-               cpu_pda[cpu].pcurrent = idle;
-               cpu_pda[cpu].cpunumber = cpu;
+               cpu_pda(cpu)->pcurrent = idle;
+               cpu_pda(cpu)->cpunumber = cpu;
                per_cpu(init_tss,cpu).rsp0 = idle->thread.rsp;
                clear_ti_thread_flag(idle->thread_info, TIF_FORK);
 #endif
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Thu Feb  2 19:16:38 2006
@@ -112,15 +112,15 @@
  * and vif variables to the environment, for the benefit of the vif-* hotplug
  * scripts.
  */
-static int netback_hotplug(struct xenbus_device *xdev, char **envp,
-                          int num_envp, char *buffer, int buffer_size)
+static int netback_uevent(struct xenbus_device *xdev, char **envp,
+                         int num_envp, char *buffer, int buffer_size)
 {
        struct backend_info *be = xdev->data;
        netif_t *netif = be->netif;
        int i = 0, length = 0;
        char *val;
 
-       DPRINTK("netback_hotplug");
+       DPRINTK("netback_uevent");
 
        val = xenbus_read(XBT_NULL, xdev->nodename, "script", NULL);
        if (IS_ERR(val)) {
@@ -129,15 +129,13 @@
                return err;
        }
        else {
-               add_hotplug_env_var(envp, num_envp, &i,
-                                   buffer, buffer_size, &length,
-                                   "script=%s", val);
+               add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
+                              &length, "script=%s", val);
                kfree(val);
        }
 
-       add_hotplug_env_var(envp, num_envp, &i,
-                           buffer, buffer_size, &length,
-                           "vif=%s", netif->dev->name);
+       add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+                      "vif=%s", netif->dev->name);
 
        envp[i] = NULL;
 
@@ -183,7 +181,7 @@
                        return;
                }
 
-               kobject_hotplug(&dev->dev.kobj, KOBJ_ONLINE);
+               kobject_uevent(&dev->dev.kobj, KOBJ_ONLINE);
 
                maybe_connect(be);
        }
@@ -216,7 +214,7 @@
                break;
 
        case XenbusStateClosed:
-               kobject_hotplug(&dev->dev.kobj, KOBJ_OFFLINE);
+               kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
                device_unregister(&dev->dev);
                break;
 
@@ -307,7 +305,7 @@
        .ids = netback_ids,
        .probe = netback_probe,
        .remove = netback_remove,
-       .hotplug = netback_hotplug,
+       .uevent = netback_uevent,
        .otherend_changed = frontend_changed,
 };
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Thu Feb  2 
19:16:38 2006
@@ -45,6 +45,7 @@
 #include <linux/bitops.h>
 #include <linux/proc_fs.h>
 #include <linux/ethtool.h>
+#include <linux/in.h>
 #include <net/sock.h>
 #include <net/pkt_sched.h>
 #include <net/arp.h>
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Thu Feb  2 
19:16:38 2006
@@ -217,8 +217,8 @@
        return 0;
 }
 
-static int xenbus_hotplug_backend(struct device *dev, char **envp,
-                                 int num_envp, char *buffer, int buffer_size);
+static int xenbus_uevent_backend(struct device *dev, char **envp,
+                                int num_envp, char *buffer, int buffer_size);
 static int xenbus_probe_backend(const char *type, const char *domid);
 static struct xen_bus_type xenbus_backend = {
        .root = "backend",
@@ -228,15 +228,15 @@
        .bus = {
                .name  = "xen-backend",
                .match = xenbus_match,
-               .hotplug = xenbus_hotplug_backend,
+               .uevent = xenbus_uevent_backend,
        },
        .dev = {
                .bus_id = "xen-backend",
        },
 };
 
-static int xenbus_hotplug_backend(struct device *dev, char **envp,
-                                 int num_envp, char *buffer, int buffer_size)
+static int xenbus_uevent_backend(struct device *dev, char **envp,
+                                int num_envp, char *buffer, int buffer_size)
 {
        struct xenbus_device *xdev;
        struct xenbus_driver *drv;
@@ -253,17 +253,14 @@
                return -ENODEV;
 
        /* stuff we want to pass to /sbin/hotplug */
-       add_hotplug_env_var(envp, num_envp, &i,
-                           buffer, buffer_size, &length,
-                           "XENBUS_TYPE=%s", xdev->devicetype);
-
-       add_hotplug_env_var(envp, num_envp, &i,
-                           buffer, buffer_size, &length,
-                           "XENBUS_PATH=%s", xdev->nodename);
-
-       add_hotplug_env_var(envp, num_envp, &i,
-                           buffer, buffer_size, &length,
-                           "XENBUS_BASE_PATH=%s", xenbus_backend.root);
+       add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+                      "XENBUS_TYPE=%s", xdev->devicetype);
+
+       add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+                      "XENBUS_PATH=%s", xdev->nodename);
+
+       add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
+                      "XENBUS_BASE_PATH=%s", xenbus_backend.root);
 
        /* terminate, set to next free slot, shrink available space */
        envp[i] = NULL;
@@ -274,9 +271,9 @@
 
        if (dev->driver) {
                drv = to_xenbus_driver(dev->driver);
-               if (drv && drv->hotplug)
-                       return drv->hotplug(xdev, envp, num_envp, buffer,
-                                           buffer_size);
+               if (drv && drv->uevent)
+                       return drv->uevent(xdev, envp, num_envp, buffer,
+                                          buffer_size);
        }
 
        return 0;
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/fs/Kconfig
--- a/linux-2.6-xen-sparse/fs/Kconfig   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/fs/Kconfig   Thu Feb  2 19:16:38 2006
@@ -70,6 +70,7 @@
 
 config EXT3_FS
        tristate "Ext3 journalling file system support"
+       select JBD
        help
          This is the journaling version of the Second extended file system
          (often called ext3), the de facto standard Linux file system
@@ -138,23 +139,20 @@
          extended attributes for file security labels, say N.
 
 config JBD
-# CONFIG_JBD could be its own option (even modular), but until there are
-# other users than ext3, we will simply make it be the same as CONFIG_EXT3_FS
-# dep_tristate '  Journal Block Device support (JBD for ext3)' CONFIG_JBD 
$CONFIG_EXT3_FS
        tristate
-       default EXT3_FS
        help
          This is a generic journaling layer for block devices.  It is
-         currently used by the ext3 file system, but it could also be used to
-         add journal support to other file systems or block devices such as
-         RAID or LVM.
-
-         If you are using the ext3 file system, you need to say Y here. If
-         you are not using ext3 then you will probably want to say N.
+         currently used by the ext3 and OCFS2 file systems, but it could
+         also be used to add journal support to other file systems or block
+         devices such as RAID or LVM.
+
+         If you are using the ext3 or OCFS2 file systems, you need to
+         say Y here. If you are not using ext3 OCFS2 then you will probably
+         want to say N.
 
          To compile this device as a module, choose M here: the module will be
-         called jbd.  If you are compiling ext3 into the kernel, you cannot
-         compile this code as a module.
+         called jbd.  If you are compiling ext3 or OCFS2 into the kernel,
+         you cannot compile this code as a module.
 
 config JBD_DEBUG
        bool "JBD (ext3) debugging support"
@@ -325,6 +323,38 @@
        default n
 
 source "fs/xfs/Kconfig"
+
+config OCFS2_FS
+       tristate "OCFS2 file system support (EXPERIMENTAL)"
+       depends on NET && EXPERIMENTAL
+       select CONFIGFS_FS
+       select JBD
+       select CRC32
+       select INET
+       help
+         OCFS2 is a general purpose extent based shared disk cluster file
+         system with many similarities to ext3. It supports 64 bit inode
+         numbers, and has automatically extending metadata groups which may
+         also make it attractive for non-clustered use.
+
+         You'll want to install the ocfs2-tools package in order to at least
+         get "mount.ocfs2".
+
+         Project web page:    http://oss.oracle.com/projects/ocfs2
+         Tools web page:      http://oss.oracle.com/projects/ocfs2-tools
+         OCFS2 mailing lists: http://oss.oracle.com/projects/ocfs2/mailman/
+
+         Note: Features which OCFS2 does not support yet:
+                 - extended attributes
+                 - shared writeable mmap
+                 - loopback is supported, but data written will not
+                   be cluster coherent.
+                 - quotas
+                 - cluster aware flock
+                 - Directory change notification (F_NOTIFY)
+                 - Distributed Caching (F_SETLEASE/F_GETLEASE/break_lease)
+                 - POSIX ACLs
+                 - readpages / writepages (not user visible)
 
 config MINIX_FS
        tristate "Minix fs support"
@@ -768,7 +798,7 @@
 
 config PROC_VMCORE
         bool "/proc/vmcore support (EXPERIMENTAL)"
-        depends on PROC_FS && EMBEDDED && EXPERIMENTAL && CRASH_DUMP
+        depends on PROC_FS && EXPERIMENTAL && CRASH_DUMP
         help
         Exports the dump image of crashed kernel in ELF format.
 
@@ -839,6 +869,20 @@
 
          To compile this code as a module, choose M here: the module will be
          called relayfs.
+
+         If unsure, say N.
+
+config CONFIGFS_FS
+       tristate "Userspace-driven configuration filesystem (EXPERIMENTAL)"
+       depends on EXPERIMENTAL
+       help
+         configfs is a ram-based filesystem that provides the converse
+         of sysfs's functionality. Where sysfs is a filesystem-based
+         view of kernel objects, configfs is a filesystem-based manager
+         of kernel objects, or config_items.
+
+         Both sysfs and configfs can and should exist together on the
+         same system. One is not a replacement for the other.
 
          If unsure, say N.
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/atomic.h
--- a/linux-2.6-xen-sparse/include/asm-i386/atomic.h    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/atomic.h    Thu Feb  2 19:16:38 2006
@@ -211,6 +211,7 @@
 }
 
 #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))
+#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
 
 /**
  * atomic_add_unless - add unless the number is a given value
@@ -249,4 +250,5 @@
 #define smp_mb__before_atomic_inc()    barrier()
 #define smp_mb__after_atomic_inc()     barrier()
 
+#include <asm-generic/atomic.h>
 #endif
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/bitops.h
--- a/linux-2.6-xen-sparse/include/asm-i386/bitops.h    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/bitops.h    Thu Feb  2 19:16:38 2006
@@ -38,7 +38,7 @@
 {
        __asm__ __volatile__( LOCK
                "btsl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -55,7 +55,7 @@
 {
        __asm__(
                "btsl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -73,7 +73,7 @@
 {
        __asm__ __volatile__( LOCK
                "btrl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -81,7 +81,7 @@
 {
        __asm__ __volatile__(
                "btrl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 #define smp_mb__before_clear_bit()     barrier()
@@ -100,7 +100,7 @@
 {
        __asm__ __volatile__(
                "btcl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -118,7 +118,7 @@
 {
        __asm__ __volatile__( LOCK
                "btcl %1,%0"
-               :"=m" (ADDR)
+               :"+m" (ADDR)
                :"Ir" (nr));
 }
 
@@ -137,7 +137,7 @@
 
        __asm__ __volatile__( LOCK
                "btsl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr) : "memory");
        return oldbit;
 }
@@ -157,7 +157,7 @@
 
        __asm__(
                "btsl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr));
        return oldbit;
 }
@@ -177,7 +177,7 @@
 
        __asm__ __volatile__( LOCK
                "btrl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr) : "memory");
        return oldbit;
 }
@@ -197,7 +197,7 @@
 
        __asm__(
                "btrl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr));
        return oldbit;
 }
@@ -209,7 +209,7 @@
 
        __asm__ __volatile__(
                "btcl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr) : "memory");
        return oldbit;
 }
@@ -228,7 +228,7 @@
 
        __asm__ __volatile__( LOCK
                "btcl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
+               :"=r" (oldbit),"+m" (ADDR)
                :"Ir" (nr) : "memory");
        return oldbit;
 }
@@ -242,7 +242,7 @@
 static int test_bit(int nr, const volatile void * addr);
 #endif
 
-static inline int constant_test_bit(int nr, const volatile unsigned long *addr)
+static __always_inline int constant_test_bit(int nr, const volatile unsigned 
long *addr)
 {
        return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0;
 }
@@ -327,9 +327,9 @@
  * Returns the bit-number of the first set bit, not the number of the byte
  * containing a bit.
  */
-static inline int find_first_bit(const unsigned long *addr, unsigned size)
-{
-       int x = 0;
+static inline unsigned find_first_bit(const unsigned long *addr, unsigned size)
+{
+       unsigned x = 0;
 
        while (x < size) {
                unsigned long val = *addr++;
@@ -362,11 +362,7 @@
        return word;
 }
 
-/*
- * fls: find last bit set.
- */
-
-#define fls(x) generic_fls(x)
+#define fls64(x)   generic_fls64(x)
 
 #ifdef __KERNEL__
 
@@ -402,6 +398,23 @@
        int r;
 
        __asm__("bsfl %1,%0\n\t"
+               "jnz 1f\n\t"
+               "movl $-1,%0\n"
+               "1:" : "=r" (r) : "rm" (x));
+       return r+1;
+}
+
+/**
+ * fls - find last bit set
+ * @x: the word to search
+ *
+ * This is defined the same way as ffs.
+ */
+static inline int fls(int x)
+{
+       int r;
+
+       __asm__("bsrl %1,%0\n\t"
                "jnz 1f\n\t"
                "movl $-1,%0\n"
                "1:" : "=r" (r) : "rm" (x));
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/futex.h
--- a/linux-2.6-xen-sparse/include/asm-i386/futex.h     Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/futex.h     Thu Feb  2 19:16:38 2006
@@ -61,7 +61,7 @@
        if (op == FUTEX_OP_SET)
                __futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg);
        else {
-#if !defined(CONFIG_X86_BSWAP) && !defined(CONFIG_UML)
+#ifndef CONFIG_X86_BSWAP
                if (boot_cpu_data.x86 == 3)
                        ret = -ENOSYS;
                else
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/desc.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/desc.h Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/desc.h Thu Feb  2 
19:16:38 2006
@@ -15,8 +15,6 @@
 
 extern struct desc_struct cpu_gdt_table[NR_CPUS][GDT_ENTRIES];
 
-#define get_cpu_gdt_table(_cpu) ((struct desc_struct 
*)cpu_gdt_descr[(_cpu)].address)
-
 DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);
 
 struct Xgt_desc_struct {
@@ -26,6 +24,11 @@
 } __attribute__ ((packed));
 
 extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
+
+static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu)
+{
+       return ((struct desc_struct *)cpu_gdt_descr[cpu].address);
+}
 
 #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8))
 #define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8))
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/dma-mapping.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/dma-mapping.h  Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/dma-mapping.h  Thu Feb 
 2 19:16:38 2006
@@ -126,7 +126,7 @@
 {
        /* no easy way to get cache size on all x86, so return the
         * maximum possible, to be safe */
-       return (1 << L1_CACHE_SHIFT_MAX);
+       return (1 << INTERNODE_CACHE_SHIFT);
 }
 #else
 extern int dma_get_cache_alignment(void);
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/io.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/io.h   Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/io.h   Thu Feb  2 
19:16:38 2006
@@ -142,6 +142,11 @@
  */
 extern void *bt_ioremap(unsigned long offset, unsigned long size);
 extern void bt_iounmap(void *addr, unsigned long size);
+
+/* Use early IO mappings for DMI because it's initialized early */
+#define dmi_ioremap bt_ioremap
+#define dmi_iounmap bt_iounmap
+#define dmi_alloc alloc_bootmem
 
 /*
  * ISA I/O bus memory addresses are 1:1 with the physical address.
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h    Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h    Thu Feb 
 2 19:16:38 2006
@@ -62,9 +62,11 @@
        int     x86_cache_size;  /* in KB - valid for CPUS which support this
                                    call  */
        int     x86_cache_alignment;    /* In bytes */
-       int     fdiv_bug;
-       int     f00f_bug;
-       int     coma_bug;
+       char    fdiv_bug;
+       char    f00f_bug;
+       char    coma_bug;
+       char    pad0;
+       int     x86_power;
        unsigned long loops_per_jiffy;
        unsigned char x86_max_cores;    /* cpuid returned max cores value */
        unsigned char booted_cores;     /* number of cores as seen by OS */
@@ -289,9 +291,11 @@
        outb((data), 0x23); \
 } while (0)
 
-static inline void serialize_cpu(void)
-{
-        __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx");
+/* Stop speculative execution */
+static inline void sync_core(void)
+{
+       int tmp;
+       asm volatile("cpuid" : "=a" (tmp) : "0" (1) : 
"ebx","ecx","edx","memory");
 }
 
 static inline void __monitor(const void *eax, unsigned long ecx,
@@ -562,10 +566,20 @@
        (unsigned long)(&__ptr[THREAD_SIZE_LONGS]);                     \
 })
 
+/*
+ * The below -8 is to reserve 8 bytes on top of the ring0 stack.
+ * This is necessary to guarantee that the entire "struct pt_regs"
+ * is accessable even if the CPU haven't stored the SS/ESP registers
+ * on the stack (interrupt gate does not save these registers
+ * when switching to the same priv ring).
+ * Therefore beware: accessing the xss/esp fields of the
+ * "struct pt_regs" is possible, but they may contain the
+ * completely wrong values.
+ */
 #define task_pt_regs(task)                                             \
 ({                                                                     \
        struct pt_regs *__regs__;                                       \
-       __regs__ = (struct pt_regs *)KSTK_TOP((task)->thread_info);     \
+       __regs__ = (struct pt_regs *)(KSTK_TOP(task_stack_page(task))-8); \
        __regs__ - 1;                                                   \
 })
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/ptrace.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/ptrace.h       Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/ptrace.h       Thu Feb 
 2 19:16:38 2006
@@ -54,6 +54,9 @@
 #define PTRACE_GET_THREAD_AREA    25
 #define PTRACE_SET_THREAD_AREA    26
 
+#define PTRACE_SYSEMU            31
+#define PTRACE_SYSEMU_SINGLESTEP  32
+
 #ifdef __KERNEL__
 
 #include <asm/vm86.h>
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/segment.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/segment.h      Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/segment.h      Thu Feb 
 2 19:16:38 2006
@@ -89,6 +89,20 @@
 
 #define __BOOT_DS      FLAT_KERNEL_DS
 
+/* The PnP BIOS entries in the GDT */
+#define GDT_ENTRY_PNPBIOS_CS32         (GDT_ENTRY_PNPBIOS_BASE + 0)
+#define GDT_ENTRY_PNPBIOS_CS16         (GDT_ENTRY_PNPBIOS_BASE + 1)
+#define GDT_ENTRY_PNPBIOS_DS           (GDT_ENTRY_PNPBIOS_BASE + 2)
+#define GDT_ENTRY_PNPBIOS_TS1          (GDT_ENTRY_PNPBIOS_BASE + 3)
+#define GDT_ENTRY_PNPBIOS_TS2          (GDT_ENTRY_PNPBIOS_BASE + 4)
+
+/* The PnP BIOS selectors */
+#define PNP_CS32   (GDT_ENTRY_PNPBIOS_CS32 * 8)        /* segment for calling 
fn */
+#define PNP_CS16   (GDT_ENTRY_PNPBIOS_CS16 * 8)        /* code segment for 
BIOS */
+#define PNP_DS     (GDT_ENTRY_PNPBIOS_DS * 8)  /* data segment for BIOS */
+#define PNP_TS1    (GDT_ENTRY_PNPBIOS_TS1 * 8) /* transfer data segment */
+#define PNP_TS2    (GDT_ENTRY_PNPBIOS_TS2 * 8) /* another data segment */
+
 /*
  * The interrupt descriptor table has room for 256 idt's,
  * the global descriptor table is dependent on the number
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/synch_bitops.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/synch_bitops.h Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/synch_bitops.h Thu Feb 
 2 19:16:38 2006
@@ -15,21 +15,21 @@
 {
     __asm__ __volatile__ ( 
         "lock btsl %1,%0"
-        : "=m" (ADDR) : "Ir" (nr) : "memory" );
+        : "+m" (ADDR) : "Ir" (nr) : "memory" );
 }
 
 static __inline__ void synch_clear_bit(int nr, volatile void * addr)
 {
     __asm__ __volatile__ (
         "lock btrl %1,%0"
-        : "=m" (ADDR) : "Ir" (nr) : "memory" );
+        : "+m" (ADDR) : "Ir" (nr) : "memory" );
 }
 
 static __inline__ void synch_change_bit(int nr, volatile void * addr)
 {
     __asm__ __volatile__ (
         "lock btcl %1,%0"
-        : "=m" (ADDR) : "Ir" (nr) : "memory" );
+        : "+m" (ADDR) : "Ir" (nr) : "memory" );
 }
 
 static __inline__ int synch_test_and_set_bit(int nr, volatile void * addr)
@@ -37,7 +37,7 @@
     int oldbit;
     __asm__ __volatile__ (
         "lock btsl %2,%1\n\tsbbl %0,%0"
-        : "=r" (oldbit), "=m" (ADDR) : "Ir" (nr) : "memory");
+        : "=r" (oldbit), "+m" (ADDR) : "Ir" (nr) : "memory");
     return oldbit;
 }
 
@@ -46,7 +46,7 @@
     int oldbit;
     __asm__ __volatile__ (
         "lock btrl %2,%1\n\tsbbl %0,%0"
-        : "=r" (oldbit), "=m" (ADDR) : "Ir" (nr) : "memory");
+        : "=r" (oldbit), "+m" (ADDR) : "Ir" (nr) : "memory");
     return oldbit;
 }
 
@@ -56,7 +56,7 @@
 
     __asm__ __volatile__ (
         "lock btcl %2,%1\n\tsbbl %0,%0"
-        : "=r" (oldbit), "=m" (ADDR) : "Ir" (nr) : "memory");
+        : "=r" (oldbit), "+m" (ADDR) : "Ir" (nr) : "memory");
     return oldbit;
 }
 
@@ -85,7 +85,7 @@
        case 2:
                __asm__ __volatile__("lock; cmpxchgw %w1,%2"
                                     : "=a"(prev)
-                                    : "q"(new), "m"(*__synch_xg(ptr)),
+                                    : "r"(new), "m"(*__synch_xg(ptr)),
                                       "0"(old)
                                     : "memory");
                return prev;
@@ -93,14 +93,14 @@
        case 4:
                __asm__ __volatile__("lock; cmpxchgl %k1,%2"
                                     : "=a"(prev)
-                                    : "q"(new), "m"(*__synch_xg(ptr)),
+                                    : "r"(new), "m"(*__synch_xg(ptr)),
                                       "0"(old)
                                     : "memory");
                return prev;
        case 8:
                __asm__ __volatile__("lock; cmpxchgq %1,%2"
                                     : "=a"(prev)
-                                    : "q"(new), "m"(*__synch_xg(ptr)),
+                                    : "r"(new), "m"(*__synch_xg(ptr)),
                                       "0"(old)
                                     : "memory");
                return prev;
@@ -108,7 +108,7 @@
        case 4:
                __asm__ __volatile__("lock; cmpxchgl %1,%2"
                                     : "=a"(prev)
-                                    : "q"(new), "m"(*__synch_xg(ptr)),
+                                    : "r"(new), "m"(*__synch_xg(ptr)),
                                       "0"(old)
                                     : "memory");
                return prev;
@@ -117,7 +117,8 @@
        return old;
 }
 
-static __inline__ int synch_const_test_bit(int nr, const volatile void * addr)
+static __always_inline int synch_const_test_bit(int nr,
+                                               const volatile void * addr)
 {
     return ((1UL << (nr & 31)) & 
             (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/system.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/system.h       Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/system.h       Thu Feb 
 2 19:16:38 2006
@@ -63,23 +63,7 @@
         ); } while(0)
 
 #define set_base(ldt,base) _set_base( ((char *)&(ldt)) , (base) )
-#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1)>>12 )
-
-static inline unsigned long _get_base(char * addr)
-{
-       unsigned long __base;
-       __asm__("movb %3,%%dh\n\t"
-               "movb %2,%%dl\n\t"
-               "shll $16,%%edx\n\t"
-               "movw %1,%%dx"
-               :"=&d" (__base)
-               :"m" (*((addr)+2)),
-                "m" (*((addr)+4)),
-                "m" (*((addr)+7)));
-       return __base;
-}
-
-#define get_base(ldt) _get_base( ((char *)&(ldt)) )
+#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1) )
 
 /*
  * Load a segment. Fall back on loading the zero
@@ -146,6 +130,19 @@
                :"=r" (__dummy)); \
        __dummy; \
 })
+
+#define read_cr4_safe() ({                           \
+       unsigned int __dummy;                         \
+       /* This could fault if %cr4 does not exist */ \
+       __asm__("1: movl %%cr4, %0              \n"   \
+               "2:                             \n"   \
+               ".section __ex_table,\"a\"      \n"   \
+               ".long 1b,2b                    \n"   \
+               ".previous                      \n"   \
+               : "=r" (__dummy): "0" (0));           \
+       __dummy;                                      \
+})
+
 #define write_cr4(x) \
        __asm__ __volatile__("movl %0,%%cr4": :"r" (x));
 #define stts() (HYPERVISOR_fpu_taskswitch(1))
@@ -668,6 +665,15 @@
 extern int es7000_plat;
 void cpu_idle_wait(void);
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible:
+ */
+static inline void sched_cacheflush(void)
+{
+       wbinvd();
+}
+
 extern unsigned long arch_align_stack(unsigned long sp);
 
 #endif
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-i386/system.h
--- a/linux-2.6-xen-sparse/include/asm-i386/system.h    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/system.h    Thu Feb  2 19:16:38 2006
@@ -54,23 +54,7 @@
         ); } while(0)
 
 #define set_base(ldt,base) _set_base( ((char *)&(ldt)) , (base) )
-#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1)>>12 )
-
-static inline unsigned long _get_base(char * addr)
-{
-       unsigned long __base;
-       __asm__("movb %3,%%dh\n\t"
-               "movb %2,%%dl\n\t"
-               "shll $16,%%edx\n\t"
-               "movw %1,%%dx"
-               :"=&d" (__base)
-               :"m" (*((addr)+2)),
-                "m" (*((addr)+4)),
-                "m" (*((addr)+7)));
-       return __base;
-}
-
-#define get_base(ldt) _get_base( ((char *)&(ldt)) )
+#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , ((limit)-1) )
 
 /*
  * Load a segment. Fall back on loading the zero
@@ -140,6 +124,19 @@
                :"=r" (__dummy)); \
        __dummy; \
 })
+
+#define read_cr4_safe() ({                           \
+       unsigned int __dummy;                         \
+       /* This could fault if %cr4 does not exist */ \
+       __asm__("1: movl %%cr4, %0              \n"   \
+               "2:                             \n"   \
+               ".section __ex_table,\"a\"      \n"   \
+               ".long 1b,2b                    \n"   \
+               ".previous                      \n"   \
+               : "=r" (__dummy): "0" (0));           \
+       __dummy;                                      \
+})
+
 #define write_cr4(x) \
        __asm__ __volatile__("movl %0,%%cr4": :"r" (x));
 #define stts() write_cr0(8 | read_cr0())
@@ -595,6 +592,15 @@
 extern int es7000_plat;
 void cpu_idle_wait(void);
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible:
+ */
+static inline void sched_cacheflush(void)
+{
+       wbinvd();
+}
+
 extern unsigned long arch_align_stack(unsigned long sp);
 
 #endif
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-ia64/hypercall.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Thu Feb  2 19:16:38 2006
@@ -30,8 +30,8 @@
 #ifndef __HYPERCALL_H__
 #define __HYPERCALL_H__
 
-#include <xen/interface/xen.h>
-#include <xen/interface/sched.h>
+#include <asm-xen/xen-public/xen.h>
+#include <asm-xen/xen-public/sched.h>
 
 /* FIXME: temp place to hold these page related macros */
 #include <asm/page.h>
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h        Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h        Thu Feb  2 
19:16:38 2006
@@ -34,8 +34,8 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/version.h>
-#include <xen/interface/xen.h>
-#include <xen/interface/dom0_ops.h>
+#include <asm-xen/xen-public/xen.h>
+#include <asm-xen/xen-public/dom0_ops.h>
 #include <asm/ptrace.h>
 #include <asm/page.h>
 
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/include/asm-ia64/pal.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/pal.h       Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-ia64/pal.h       Thu Feb  2 19:16:38 2006
@@ -75,8 +75,6 @@
 #define PAL_CACHE_READ         259     /* read tag & data of cacheline for 
diagnostic testing */
 #define PAL_CACHE_WRITE                260     /* write tag & data of 
cacheline for diagnostic testing */
 #define PAL_VM_TR_READ         261     /* read contents of translation 
register */
-#define PAL_GET_PSTATE         262     /* get the current P-state */
-#define PAL_SET_PSTATE         263     /* set the P-state */
 
 #ifndef __ASSEMBLY__
 
@@ -1114,25 +1112,6 @@
        return iprv.status;
 }
 
-/* Get the current P-state information */
-static inline s64
-ia64_pal_get_pstate (u64 *pstate_index)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0);
-       *pstate_index = iprv.v0;
-       return iprv.status;
-}
-
-/* Set the P-state */
-static inline s64
-ia64_pal_set_pstate (u64 pstate_index)
-{
-       struct ia64_pal_retval iprv;
-       PAL_CALL_STK(iprv, PAL_SET_PSTATE, pstate_index, 0, 0);
-       return iprv.status;
-}
-
 /* Cause the processor to enter LIGHT HALT state, where prefetching and 
execution are
  * suspended, but cache and TLB coherency is maintained.
  */
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-ia64/processor.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/processor.h Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-ia64/processor.h Thu Feb  2 19:16:38 2006
@@ -20,6 +20,9 @@
 #include <asm/ptrace.h>
 #include <asm/ustack.h>
 #include <asm/privop.h>
+
+/* Our arch specific arch_init_sched_domain is in arch/ia64/kernel/domain.c */
+#define ARCH_HAS_SCHED_DOMAIN
 
 #define IA64_NUM_DBG_REGS      8
 /*
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-ia64/system.h
--- a/linux-2.6-xen-sparse/include/asm-ia64/system.h    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-ia64/system.h    Thu Feb  2 19:16:38 2006
@@ -19,13 +19,12 @@
 #include <asm/pal.h>
 #include <asm/percpu.h>
 
-#define GATE_ADDR              RGN_BASE(RGN_GATE)
-
+#define GATE_ADDR              __IA64_UL_CONST(0xa000000000000000)
 /*
  * 0xa000000000000000+2*PERCPU_PAGE_SIZE
  * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page)
  */
-#define KERNEL_START            (GATE_ADDR+0x100000000)
+#define KERNEL_START            __IA64_UL_CONST(0xa000000100000000)
 #define PERCPU_ADDR            (-PERCPU_PAGE_SIZE)
 
 #ifndef __ASSEMBLY__
@@ -184,6 +183,8 @@
 
 #ifdef __KERNEL__
 
+#define prepare_to_switch()    do { } while(0)
+
 #ifdef CONFIG_IA32_SUPPORT
 # define IS_IA32_PROCESS(regs) (ia64_psr(regs)->is != 0)
 #else
@@ -273,9 +274,14 @@
  * of that CPU which will not be released, because there we wait for the
  * tasklist_lock to become available.
  */
-#define __ARCH_WANT_UNLOCKED_CTXSW
-
-#define ARCH_HAS_PREFETCH_SWITCH_STACK
+#define prepare_arch_switch(rq, next)          \
+do {                                           \
+       spin_lock(&(next)->switch_lock);        \
+       spin_unlock(&(rq)->lock);               \
+} while (0)
+#define finish_arch_switch(rq, prev)   spin_unlock_irq(&(prev)->switch_lock)
+#define task_running(rq, p)            ((rq)->curr == (p) || 
spin_is_locked(&(p)->switch_lock))
+
 #define ia64_platform_is(x) (strcmp(x, platform_name) == 0)
 
 void cpu_idle_wait(void);
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/desc.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/desc.h       Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/desc.h       Thu Feb 
 2 19:16:38 2006
@@ -67,7 +67,7 @@
 
 extern struct desc_ptr idt_descr, cpu_gdt_descr[NR_CPUS];
 
-extern struct desc_struct cpu_gdt_table[NR_CPUS][GDT_ENTRIES];
+extern struct desc_struct cpu_gdt_table[GDT_ENTRIES];
 
 #define get_cpu_gdt_table(_cpu) ((struct desc_struct 
*)(cpu_gdt_descr[(_cpu)].address))
 
@@ -94,6 +94,9 @@
 extern struct desc_struct default_ldt[];
 extern struct gate_struct idt_table[]; 
 extern struct desc_ptr cpu_gdt_descr[];
+
+/* the cpu gdt accessor */
+#define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address)
 
 static inline void _set_gate(void *adr, unsigned type, unsigned long func, 
unsigned dpl, unsigned ist)  
 {
@@ -130,6 +133,11 @@
        _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, 0); 
 } 
 
+static inline void set_system_gate_ist(int nr, void *func, unsigned ist)
+{
+       _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, ist);
+}
+
 static inline void set_tssldt_descriptor(void *ptr, unsigned long tss, 
unsigned type, 
                                         unsigned size) 
 { 
@@ -155,21 +163,20 @@
         * -1? seg base+limit should be pointing to the address of the
         * last valid byte
         */
-        set_tssldt_descriptor((struct ldttss_desc 
*)&get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS], 
+        set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_TSS], 
                (unsigned long)addr, DESC_TSS,
                IO_BITMAP_OFFSET + IO_BITMAP_BYTES + sizeof(unsigned long) - 1);
 } 
 
 static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
 { 
-       set_tssldt_descriptor((struct ldttss_desc 
*)&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], 
-                              (unsigned long)addr, 
+       set_tssldt_descriptor(&cpu_gdt(cpu)[GDT_ENTRY_LDT], (unsigned long)addr,
                              DESC_LDT, size * 8 - 1);
 }
 
 static inline void set_seg_base(unsigned cpu, int entry, void *base)
 { 
-       struct desc_struct *d = (struct desc_struct 
*)&get_cpu_gdt_table(cpu)[entry];
+       struct desc_struct *d = &cpu_gdt(cpu)[entry];
        u32 addr = (u32)(u64)base;
        BUG_ON((u64)base >> 32); 
        d->base0 = addr & 0xffff;
@@ -212,7 +219,7 @@
 static inline void load_TLS(struct thread_struct *t, unsigned int cpu)
 {
 #if 0
-       u64 *gdt = (u64 *)(cpu_gdt_table[cpu] + GDT_ENTRY_TLS_MIN);
+       u64 *gdt = (u64 *)(cpu_gdt(cpu) + GDT_ENTRY_TLS_MIN);
        gdt[0] = t->tls_array[0];
        gdt[1] = t->tls_array[1];
        gdt[2] = t->tls_array[2];
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/dma-mapping.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/dma-mapping.h        
Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/dma-mapping.h        
Thu Feb  2 19:16:38 2006
@@ -1,1 +1,191 @@
+#ifndef _X8664_DMA_MAPPING_H
+#define _X8664_DMA_MAPPING_H 1
+
+/*
+ * IOMMU interface. See Documentation/DMA-mapping.txt and DMA-API.txt for
+ * documentation.
+ */
+
+#include <linux/config.h>
+
+#include <asm/scatterlist.h>
+#include <asm/io.h>
+#include <asm/swiotlb.h>
+
+struct dma_mapping_ops {
+       int             (*mapping_error)(dma_addr_t dma_addr);
+       void*           (*alloc_coherent)(struct device *dev, size_t size,
+                                dma_addr_t *dma_handle, gfp_t gfp);
+       void            (*free_coherent)(struct device *dev, size_t size,
+                                void *vaddr, dma_addr_t dma_handle);
+       dma_addr_t      (*map_single)(struct device *hwdev, void *ptr,
+                                size_t size, int direction);
+       /* like map_single, but doesn't check the device mask */
+       dma_addr_t      (*map_simple)(struct device *hwdev, char *ptr,
+                                size_t size, int direction);
+       void            (*unmap_single)(struct device *dev, dma_addr_t addr,
+                               size_t size, int direction);
+       void            (*sync_single_for_cpu)(struct device *hwdev,
+                               dma_addr_t dma_handle, size_t size,
+                               int direction);
+       void            (*sync_single_for_device)(struct device *hwdev,
+                                dma_addr_t dma_handle, size_t size,
+                               int direction);
+       void            (*sync_single_range_for_cpu)(struct device *hwdev,
+                                dma_addr_t dma_handle, unsigned long offset,
+                               size_t size, int direction);
+       void            (*sync_single_range_for_device)(struct device *hwdev,
+                               dma_addr_t dma_handle, unsigned long offset,
+                               size_t size, int direction);
+       void            (*sync_sg_for_cpu)(struct device *hwdev,
+                                struct scatterlist *sg, int nelems,
+                               int direction);
+       void            (*sync_sg_for_device)(struct device *hwdev,
+                               struct scatterlist *sg, int nelems,
+                               int direction);
+       int             (*map_sg)(struct device *hwdev, struct scatterlist *sg,
+                               int nents, int direction);
+       void            (*unmap_sg)(struct device *hwdev,
+                               struct scatterlist *sg, int nents,
+                               int direction);
+       int             (*dma_supported)(struct device *hwdev, u64 mask);
+       int             is_phys;
+};
+
+extern dma_addr_t bad_dma_address;
+extern struct dma_mapping_ops* dma_ops;
+extern int iommu_merge;
+
+#if 0
+static inline int dma_mapping_error(dma_addr_t dma_addr)
+{
+       if (dma_ops->mapping_error)
+               return dma_ops->mapping_error(dma_addr);
+
+       return (dma_addr == bad_dma_address);
+}
+
+extern void *dma_alloc_coherent(struct device *dev, size_t size,
+                               dma_addr_t *dma_handle, gfp_t gfp);
+extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
+                             dma_addr_t dma_handle);
+
+static inline dma_addr_t
+dma_map_single(struct device *hwdev, void *ptr, size_t size,
+              int direction)
+{
+       return dma_ops->map_single(hwdev, ptr, size, direction);
+}
+
+static inline void
+dma_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
+                int direction)
+{
+       dma_ops->unmap_single(dev, addr, size, direction);
+}
+
+#define dma_map_page(dev,page,offset,size,dir) \
+       dma_map_single((dev), page_address(page)+(offset), (size), (dir))
+
+#define dma_unmap_page dma_unmap_single
+
+static inline void
+dma_sync_single_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
+                       size_t size, int direction)
+{
+       if (dma_ops->sync_single_for_cpu)
+               dma_ops->sync_single_for_cpu(hwdev, dma_handle, size,
+                                            direction);
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_single_for_device(struct device *hwdev, dma_addr_t dma_handle,
+                          size_t size, int direction)
+{
+       if (dma_ops->sync_single_for_device)
+               dma_ops->sync_single_for_device(hwdev, dma_handle, size,
+                                               direction);
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle,
+                             unsigned long offset, size_t size, int direction)
+{
+       if (dma_ops->sync_single_range_for_cpu) {
+               dma_ops->sync_single_range_for_cpu(hwdev, dma_handle, offset, 
size, direction);
+       }
+
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle,
+                                unsigned long offset, size_t size, int 
direction)
+{
+       if (dma_ops->sync_single_range_for_device)
+               dma_ops->sync_single_range_for_device(hwdev, dma_handle,
+                                                     offset, size, direction);
+
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
+                   int nelems, int direction)
+{
+       if (dma_ops->sync_sg_for_cpu)
+               dma_ops->sync_sg_for_cpu(hwdev, sg, nelems, direction);
+       flush_write_buffers();
+}
+
+static inline void
+dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
+                      int nelems, int direction)
+{
+       if (dma_ops->sync_sg_for_device) {
+               dma_ops->sync_sg_for_device(hwdev, sg, nelems, direction);
+       }
+
+       flush_write_buffers();
+}
+
+static inline int
+dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, int 
direction)
+{
+       return dma_ops->map_sg(hwdev, sg, nents, direction);
+}
+
+static inline void
+dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents,
+            int direction)
+{
+       dma_ops->unmap_sg(hwdev, sg, nents, direction);
+}
+
+extern int dma_supported(struct device *hwdev, u64 mask);
+
+/* same for gart, swiotlb, and nommu */
+static inline int dma_get_cache_alignment(void)
+{
+       return boot_cpu_data.x86_clflush_size;
+}
+
+#define dma_is_consistent(h) 1
+
+extern int dma_set_mask(struct device *dev, u64 mask);
+
+static inline void
+dma_cache_sync(void *vaddr, size_t size, enum dma_data_direction dir)
+{
+       flush_write_buffers();
+}
+
+extern struct device fallback_dev;
+extern int panic_on_overflow;
+#endif
+
+#endif /* _X8664_DMA_MAPPING_H */
+
 #include <asm-i386/mach-xen/asm/dma-mapping.h>
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/fixmap.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/fixmap.h     Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/fixmap.h     Thu Feb 
 2 19:16:38 2006
@@ -93,7 +93,7 @@
  * directly without translation, we catch the bug with a NULL-deference
  * kernel oops. Illegal ranges of incoming indices are caught too.
  */
-static inline unsigned long fix_to_virt(const unsigned int idx)
+static __always_inline unsigned long fix_to_virt(const unsigned int idx)
 {
        /*
         * this branch gets completely eliminated after inlining,
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hw_irq.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hw_irq.h     Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hw_irq.h     Thu Feb 
 2 19:16:38 2006
@@ -46,19 +46,19 @@
  *  some of the following vectors are 'rare', they are merged
  *  into a single vector (CALL_FUNCTION_VECTOR) to save vector space.
  *  TLB, reschedule and local APIC vectors are performance-critical.
- *
- *  Vectors 0xf0-0xf9 are free (reserved for future Linux use).
  */
 #ifndef CONFIG_XEN
 #define SPURIOUS_APIC_VECTOR   0xff
 #define ERROR_APIC_VECTOR      0xfe
 #define RESCHEDULE_VECTOR      0xfd
 #define CALL_FUNCTION_VECTOR   0xfc
-#define KDB_VECTOR             0xfb    /* reserved for KDB */
+/* fb free - please don't readd KDB here because it's useless
+   (hint - think what a NMI bit does to a vector) */
 #define THERMAL_APIC_VECTOR    0xfa
 #define THRESHOLD_APIC_VECTOR   0xf9
-#define INVALIDATE_TLB_VECTOR_END      0xf8
-#define INVALIDATE_TLB_VECTOR_START    0xf0    /* f0-f8 used for TLB flush */
+/* f8 free */
+#define INVALIDATE_TLB_VECTOR_END      0xf7
+#define INVALIDATE_TLB_VECTOR_START    0xf0    /* f0-f7 used for TLB flush */
 
 #define NUM_INVALIDATE_TLB_VECTORS     8
 #endif
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/io.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/io.h Thu Feb  2 
18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/io.h Thu Feb  2 
19:16:38 2006
@@ -157,6 +157,11 @@
  */
 extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long 
size);
 extern void iounmap(volatile void __iomem *addr);
+
+/* Use normal IO mappings for DMI */
+#define dmi_ioremap ioremap
+#define dmi_iounmap(x,l) iounmap(x)
+#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
 
 /*
  * ISA I/O bus memory addresses are 1:1 with the physical address.
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/mmu_context.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/mmu_context.h        
Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/mmu_context.h        
Thu Feb  2 19:16:38 2006
@@ -18,7 +18,7 @@
 
 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct 
*tsk)
 {
-#if 0 /*  XEN: no lazy tlb */
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
        if (read_pda(mmu_state) == TLBSTATE_OK) 
                write_pda(mmu_state, TLBSTATE_LAZY);
 #endif
@@ -78,7 +78,7 @@
 
                /* stop flush ipis for the previous mm */
                clear_bit(cpu, &prev->cpu_vm_mask);
-#if 0  /* XEN: no lazy tlb */
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
                write_pda(mmu_state, TLBSTATE_OK);
                write_pda(active_mm, next);
 #endif
@@ -104,8 +104,7 @@
 
                BUG_ON(HYPERVISOR_mmuext_op(_op, op-_op, NULL, DOMID_SELF));
        }
-
-#if 0 /* XEN: no lazy tlb */
+#if defined(CONFIG_SMP) && !defined(CONFIG_XEN)
        else {
                write_pda(mmu_state, TLBSTATE_OK);
                if (read_pda(active_mm) != next)
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h       Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h       Thu Feb 
 2 19:16:38 2006
@@ -37,12 +37,24 @@
 #define PHYSICAL_PAGE_MASK     (~(PAGE_SIZE-1) & __PHYSICAL_MASK)
 
 #define THREAD_ORDER 1 
-#ifdef __ASSEMBLY__
-#define THREAD_SIZE  (1 << (PAGE_SHIFT + THREAD_ORDER))
-#else
-#define THREAD_SIZE  (1UL << (PAGE_SHIFT + THREAD_ORDER))
-#endif
+#define THREAD_SIZE  (PAGE_SIZE << THREAD_ORDER)
 #define CURRENT_MASK (~(THREAD_SIZE-1))
+
+#define EXCEPTION_STACK_ORDER 0
+#define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
+
+#define DEBUG_STACK_ORDER EXCEPTION_STACK_ORDER
+#define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER)
+
+#define IRQSTACK_ORDER 2
+#define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER)
+
+#define STACKFAULT_STACK 1
+#define DOUBLEFAULT_STACK 2
+#define NMI_STACK 3
+#define DEBUG_STACK 4
+#define MCE_STACK 5
+#define N_EXCEPTION_STACKS 5  /* hw limit: 7 */
 
 #define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
 #define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h        Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h        Thu Feb 
 2 19:16:38 2006
@@ -42,18 +42,20 @@
 #include <asm/scatterlist.h>
 #include <linux/string.h>
 #include <asm/page.h>
+#include <linux/dma-mapping.h> /* for have_iommu */
 
 extern int iommu_setup(char *opt);
 
-#ifdef CONFIG_GART_IOMMU
 /* The PCI address space does equal the physical memory
  * address space.  The networking and block device layers use
  * this boolean for bounce buffer decisions
  *
- * On AMD64 it mostly equals, but we set it to zero to tell some subsystems
- * that an IOMMU is available.
+ * On AMD64 it mostly equals, but we set it to zero if a hardware
+ * IOMMU (gart) of sotware IOMMU (swiotlb) is available.
  */
-#define PCI_DMA_BUS_IS_PHYS    (no_iommu ? 1 : 0)
+#define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
+
+#ifdef CONFIG_GART_IOMMU
 
 /*
  * x86-64 always supports DAC, but sometimes it is useful to force
@@ -78,8 +80,6 @@
 
 #elif defined(CONFIG_SWIOTLB)
 
-#define PCI_DMA_BUS_IS_PHYS    0
-
 #define pci_dac_dma_supported(pci_dev, mask)    1
 
 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)      \
@@ -98,7 +98,6 @@
 #else
 /* No IOMMU */
 
-#define PCI_DMA_BUS_IS_PHYS    1
 #define pci_dac_dma_supported(pci_dev, mask)    1
 
 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h    Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h    Thu Feb 
 2 19:16:38 2006
@@ -159,6 +159,8 @@
 }
 
 #define pte_same(a, b)         ((a).pte == (b).pte)
+
+#define pte_pgprot(a)  (__pgprot((a).pte & ~PHYSICAL_PAGE_MASK))
 
 #define PMD_SIZE       (1UL << PMD_SHIFT)
 #define PMD_MASK       (~(PMD_SIZE-1))
@@ -319,25 +321,25 @@
 
 #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT)
 static inline int pte_user(pte_t pte)          { return __pte_val(pte) & 
_PAGE_USER; }
-extern inline int pte_read(pte_t pte)          { return __pte_val(pte) & 
_PAGE_USER; }
-extern inline int pte_exec(pte_t pte)          { return __pte_val(pte) & 
_PAGE_USER; }
-extern inline int pte_dirty(pte_t pte)         { return __pte_val(pte) & 
_PAGE_DIRTY; }
-extern inline int pte_young(pte_t pte)         { return __pte_val(pte) & 
_PAGE_ACCESSED; }
-extern inline int pte_write(pte_t pte)         { return __pte_val(pte) & 
_PAGE_RW; }
+static inline int pte_read(pte_t pte)          { return __pte_val(pte) & 
_PAGE_USER; }
+static inline int pte_exec(pte_t pte)          { return __pte_val(pte) & 
_PAGE_USER; }
+static inline int pte_dirty(pte_t pte)         { return __pte_val(pte) & 
_PAGE_DIRTY; }
+static inline int pte_young(pte_t pte)         { return __pte_val(pte) & 
_PAGE_ACCESSED; }
+static inline int pte_write(pte_t pte)         { return __pte_val(pte) & 
_PAGE_RW; }
 static inline int pte_file(pte_t pte)          { return __pte_val(pte) & 
_PAGE_FILE; }
 static inline int pte_huge(pte_t pte)          { return (__pte_val(pte) & 
__LARGE_PTE) == __LARGE_PTE; }
 
-extern inline pte_t pte_rdprotect(pte_t pte)   { __pte_val(pte) &= 
~_PAGE_USER; return pte; }
-extern inline pte_t pte_exprotect(pte_t pte)   { __pte_val(pte) &= 
~_PAGE_USER; return pte; }
-extern inline pte_t pte_mkclean(pte_t pte)     { __pte_val(pte) &= 
~_PAGE_DIRTY; return pte; }
-extern inline pte_t pte_mkold(pte_t pte)       { __pte_val(pte) &= 
~_PAGE_ACCESSED; return pte; }
-extern inline pte_t pte_wrprotect(pte_t pte)   { __pte_val(pte) &= ~_PAGE_RW; 
return pte; }
-extern inline pte_t pte_mkread(pte_t pte)      { __pte_val(pte) |= _PAGE_USER; 
return pte; }
-extern inline pte_t pte_mkexec(pte_t pte)      { __pte_val(pte) |= _PAGE_USER; 
return pte; }
-extern inline pte_t pte_mkdirty(pte_t pte)     { __pte_val(pte) |= 
_PAGE_DIRTY; return pte; }
-extern inline pte_t pte_mkyoung(pte_t pte)     { __pte_val(pte) |= 
_PAGE_ACCESSED; return pte; }
-extern inline pte_t pte_mkwrite(pte_t pte)     { __pte_val(pte) |= _PAGE_RW; 
return pte; }
-extern inline pte_t pte_mkhuge(pte_t pte)      { __pte_val(pte) |= 
__LARGE_PTE; return pte; }
+static inline pte_t pte_rdprotect(pte_t pte)   { __pte_val(pte) &= 
~_PAGE_USER; return pte; }
+static inline pte_t pte_exprotect(pte_t pte)   { __pte_val(pte) &= 
~_PAGE_USER; return pte; }
+static inline pte_t pte_mkclean(pte_t pte)     { __pte_val(pte) &= 
~_PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkold(pte_t pte)       { __pte_val(pte) &= 
~_PAGE_ACCESSED; return pte; }
+static inline pte_t pte_wrprotect(pte_t pte)   { __pte_val(pte) &= ~_PAGE_RW; 
return pte; }
+static inline pte_t pte_mkread(pte_t pte)      { __pte_val(pte) |= _PAGE_USER; 
return pte; }
+static inline pte_t pte_mkexec(pte_t pte)      { __pte_val(pte) |= _PAGE_USER; 
return pte; }
+static inline pte_t pte_mkdirty(pte_t pte)     { __pte_val(pte) |= 
_PAGE_DIRTY; return pte; }
+static inline pte_t pte_mkyoung(pte_t pte)     { __pte_val(pte) |= 
_PAGE_ACCESSED; return pte; }
+static inline pte_t pte_mkwrite(pte_t pte)     { __pte_val(pte) |= _PAGE_RW; 
return pte; }
+static inline pte_t pte_mkhuge(pte_t pte)      { __pte_val(pte) |= 
__LARGE_PTE; return pte; }
 
 struct vm_area_struct;
 
@@ -405,7 +407,7 @@
 
 /* This accesses the reference page table of the boot cpu. 
    Other CPUs get synced lazily via the page fault handler. */
-static inline pud_t *pud_offset_k(unsigned long address)
+static inline pud_t *pud_offset_k(pgd_t *pgd, unsigned long address)
 {
        return pud_offset(pgd_offset_k(address), address);
 }
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/processor.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/processor.h  Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/processor.h  Thu Feb 
 2 19:16:38 2006
@@ -245,7 +245,13 @@
 extern struct cpuinfo_x86 boot_cpu_data;
 DECLARE_PER_CPU(struct tss_struct,init_tss);
 
+#ifdef CONFIG_X86_VSMP
+#define ARCH_MIN_TASKALIGN     (1 << INTERNODE_CACHE_SHIFT)
+#define ARCH_MIN_MMSTRUCT_ALIGN        (1 << INTERNODE_CACHE_SHIFT)
+#else
 #define ARCH_MIN_TASKALIGN     16
+#define ARCH_MIN_MMSTRUCT_ALIGN        0
+#endif
 
 struct thread_struct {
        unsigned long   rsp0;
@@ -286,15 +292,6 @@
 #define INIT_MMAP \
 { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, 
NULL }
 
-#define STACKFAULT_STACK 1
-#define DOUBLEFAULT_STACK 2 
-#define NMI_STACK 3 
-#define DEBUG_STACK 4 
-#define MCE_STACK 5
-#define N_EXCEPTION_STACKS 5  /* hw limit: 7 */
-#define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
-#define EXCEPTION_STACK_ORDER 0 
-
 #define start_thread(regs,new_rip,new_rsp) do { \
        asm volatile("movl %0,%%fs; movl %0,%%es; movl %0,%%ds": :"r" (0));     
 \
        load_gs_index(0);                                                       
\
@@ -333,8 +330,8 @@
 #define thread_saved_pc(t) (*(unsigned long *)((t)->thread.rsp - 8))
 
 extern unsigned long get_wchan(struct task_struct *p);
-#define KSTK_EIP(tsk) \
-       (((struct pt_regs *)(tsk->thread.rsp0 - sizeof(struct pt_regs)))->rip)
+#define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.rsp0 - 1)
+#define KSTK_EIP(tsk) (task_pt_regs(tsk)->rip)
 #define KSTK_ESP(tsk) -1 /* sorry. doesn't work for syscall. */
 
 
@@ -496,4 +493,6 @@
 /* Boot loader type from the setup header */
 extern int bootloader_type;
 
+#define HAVE_ARCH_PICK_MMAP_LAYOUT 1
+
 #endif /* __ASM_X86_64_PROCESSOR_H */
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/segment.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/segment.h    Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/segment.h    Thu Feb 
 2 19:16:38 2006
@@ -19,15 +19,13 @@
 #define __USER_DS     0x2b   /* 5*8+3 */ 
 #define __USER_CS     0x33   /* 6*8+3 */ 
 #define __USER32_DS    __USER_DS 
-#define __KERNEL16_CS  (GDT_ENTRY_KERNELCS16 * 8)
-#define __KERNEL_COMPAT32_CS   0x8
 
 #define GDT_ENTRY_TLS 1
 #define GDT_ENTRY_TSS 8        /* needs two entries */
 #define GDT_ENTRY_LDT 10 /* needs two entries */
 #define GDT_ENTRY_TLS_MIN 12
 #define GDT_ENTRY_TLS_MAX 14
-#define GDT_ENTRY_KERNELCS16 15
+/* 15 free */
 
 #define GDT_ENTRY_TLS_ENTRIES 3
 
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/smp.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/smp.h        Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/smp.h        Thu Feb 
 2 19:16:38 2006
@@ -34,6 +34,7 @@
 extern cpumask_t cpu_present_mask;
 extern cpumask_t cpu_possible_map;
 extern cpumask_t cpu_online_map;
+extern cpumask_t cpu_initialized;
 
 /*
  * Private routines/data
diff -r da6297243495 -r 2494b4e00cbb 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h     Thu Feb 
 2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h     Thu Feb 
 2 19:16:38 2006
@@ -29,8 +29,8 @@
 #define __RESTORE(reg,offset) "movq (14-" #offset ")*8(%%rsp),%%" #reg "\n\t"
 
 /* frame pointer must be last for get_wchan */
-#define SAVE_CONTEXT    "pushfq ; pushq %%rbp ; movq %%rsi,%%rbp\n\t"
-#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp ; popfq\n\t" 
+#define SAVE_CONTEXT    "pushq %%rbp ; movq %%rsi,%%rbp\n\t"
+#define RESTORE_CONTEXT "movq %%rbp,%%rsi ; popq %%rbp\n\t"
 
 #define __EXTRA_CLOBBER  \
        ,"rcx","rbx","rdx","r8","r9","r10","r11","r12","r13","r14","r15"
@@ -147,6 +147,21 @@
                      "663:\n\t" newinstr "\n664:\n"   /* replacement */ \
                      ".previous" :: "i" (feature), ##input)
 
+/* Like alternative_input, but with a single output argument */
+#define alternative_io(oldinstr, newinstr, feature, output, input...) \
+       asm volatile ("661:\n\t" oldinstr "\n662:\n"                    \
+                     ".section .altinstructions,\"a\"\n"               \
+                     "  .align 8\n"                                    \
+                     "  .quad 661b\n"            /* label */           \
+                     "  .quad 663f\n"            /* new instruction */ \
+                     "  .byte %c[feat]\n"        /* feature bit */     \
+                     "  .byte 662b-661b\n"       /* sourcelen */       \
+                     "  .byte 664f-663f\n"       /* replacementlen */  \
+                     ".previous\n"                                     \
+                     ".section .altinstr_replacement,\"ax\"\n"         \
+                     "663:\n\t" newinstr "\n664:\n"   /* replacement */ \
+                     ".previous" : output : [feat] "i" (feature), ##input)
+
 /*
  * Clear and set 'TS' bit respectively
  */
@@ -187,6 +202,15 @@
 
 #define wbinvd() \
        __asm__ __volatile__ ("wbinvd": : :"memory");
+
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible.
+ */
+static inline void sched_cacheflush(void)
+{
+       wbinvd();
+}
 
 #endif /* __KERNEL__ */
 
@@ -374,8 +398,6 @@
                preempt_enable_no_resched();                            \
 } while (0)
 
-#define safe_halt()            ((void)0)
-
 #define __save_and_cli(x)                                              \
 do {                                                                   \
        vcpu_info_t *_vcpu;                                             \
@@ -387,8 +409,6 @@
        barrier();                                                      \
 } while (0)
 
-void cpu_idle_wait(void);
-
 #define local_irq_save(x)      __save_and_cli(x)
 #define local_irq_restore(x)   __restore_flags(x)
 #define local_save_flags(x)    __save_flags(x)
@@ -405,12 +425,10 @@
        preempt_enable_no_resched();                                    \
        ___x; })
 
-/*
- * disable hlt during certain critical i/o operations
- */
-#define HAVE_DISABLE_HLT
-void disable_hlt(void);
-void enable_hlt(void);
+#define safe_halt()            ((void)0)
+#define halt()                 ((void)0)
+
+void cpu_idle_wait(void);
 
 extern unsigned long arch_align_stack(unsigned long sp);
 
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/include/linux/gfp.h
--- a/linux-2.6-xen-sparse/include/linux/gfp.h  Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/linux/gfp.h  Thu Feb  2 19:16:38 2006
@@ -57,6 +57,7 @@
                        __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
                        __GFP_NOMEMALLOC|__GFP_HARDWALL)
 
+/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */
 #define GFP_ATOMIC     (__GFP_HIGH)
 #define GFP_NOIO       (__GFP_WAIT)
 #define GFP_NOFS       (__GFP_WAIT | __GFP_IO)
@@ -113,6 +114,10 @@
        if (unlikely(order >= MAX_ORDER))
                return NULL;
 
+       /* Unknown node is current node */
+       if (nid < 0)
+               nid = numa_node_id();
+
        return __alloc_pages(gfp_mask, order,
                NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask));
 }
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/include/linux/irq.h
--- a/linux-2.6-xen-sparse/include/linux/irq.h  Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/linux/irq.h  Thu Feb  2 19:16:38 2006
@@ -12,7 +12,7 @@
 #include <linux/config.h>
 #include <linux/smp.h>
 
-#if !defined(CONFIG_ARCH_S390)
+#if !defined(CONFIG_S390)
 
 #include <linux/linkage.h>
 #include <linux/cache.h>
@@ -224,6 +224,17 @@
 extern int can_request_irq(unsigned int irq, unsigned long irqflags);
 
 extern void init_irq_proc(void);
+
+#ifdef CONFIG_AUTO_IRQ_AFFINITY
+extern int select_smp_affinity(unsigned int irq);
+#else
+static inline int
+select_smp_affinity(unsigned int irq)
+{
+       return 1;
+}
+#endif
+
 #endif
 
 extern hw_irq_controller no_irq_type;  /* needed in every arch ? */
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/include/linux/mm.h
--- a/linux-2.6-xen-sparse/include/linux/mm.h   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/linux/mm.h   Thu Feb  2 19:16:38 2006
@@ -3,6 +3,7 @@
 
 #include <linux/sched.h>
 #include <linux/errno.h>
+#include <linux/capability.h>
 
 #ifdef __KERNEL__
 
@@ -13,6 +14,7 @@
 #include <linux/rbtree.h>
 #include <linux/prio_tree.h>
 #include <linux/fs.h>
+#include <linux/mutex.h>
 
 struct mempolicy;
 struct anon_vma;
@@ -226,24 +228,30 @@
                                         * & limit reverse map searches.
                                         */
        union {
-               unsigned long private;  /* Mapping-private opaque data:
-                                        * usually used for buffer_heads
-                                        * if PagePrivate set; used for
-                                        * swp_entry_t if PageSwapCache
-                                        * When page is free, this indicates
-                                        * order in the buddy system.
-                                        */
+           struct {
+               unsigned long private;          /* Mapping-private opaque data:
+                                                * usually used for buffer_heads
+                                                * if PagePrivate set; used for
+                                                * swp_entry_t if PageSwapCache.
+                                                * When page is free, this
+                                                * indicates order in the buddy
+                                                * system.
+                                                */
+               struct address_space *mapping;  /* If low bit clear, points to
+                                                * inode address_space, or NULL.
+                                                * If page mapped as anonymous
+                                                * memory, low bit is set, and
+                                                * it points to anon_vma object:
+                                                * see PAGE_MAPPING_ANON below.
+                                                */
+           };
 #if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
-               spinlock_t ptl;
-#endif
-       } u;
-       struct address_space *mapping;  /* If low bit clear, points to
-                                        * inode address_space, or NULL.
-                                        * If page mapped as anonymous
-                                        * memory, low bit is set, and
-                                        * it points to anon_vma object:
-                                        * see PAGE_MAPPING_ANON below.
-                                        */
+           spinlock_t ptl;
+#endif
+#ifdef CONFIG_XEN
+           struct list_head ballooned;
+#endif
+       };
        pgoff_t index;                  /* Our offset within mapping. */
        struct list_head lru;           /* Pageout list, eg. active_list
                                         * protected by zone->lru_lock !
@@ -264,8 +272,8 @@
 #endif /* WANT_PAGE_VIRTUAL */
 };
 
-#define page_private(page)             ((page)->u.private)
-#define set_page_private(page, v)      ((page)->u.private = (v))
+#define page_private(page)             ((page)->private)
+#define set_page_private(page, v)      ((page)->private = (v))
 
 /*
  * FIXME: take this include out, include page-flags.h in
@@ -311,7 +319,7 @@
  */
 #define get_page_testone(p)    atomic_inc_and_test(&(p)->_count)
 
-#define set_page_count(p,v)    atomic_set(&(p)->_count, v - 1)
+#define set_page_count(p,v)    atomic_set(&(p)->_count, (v) - 1)
 #define __put_page(p)          atomic_dec(&(p)->_count)
 
 extern void FASTCALL(__page_cache_release(struct page *));
@@ -510,7 +518,7 @@
 extern struct page *mem_map;
 #endif
 
-static inline void *lowmem_page_address(struct page *page)
+static __always_inline void *lowmem_page_address(struct page *page)
 {
        return __va(page_to_pfn(page) << PAGE_SHIFT);
 }
@@ -637,13 +645,37 @@
 int shmem_lock(struct file *file, int lock, struct user_struct *user);
 #else
 #define shmem_nopage filemap_nopage
-#define shmem_lock(a, b, c)    ({0;})  /* always in memory, no need to lock */
-#define shmem_set_policy(a, b) (0)
-#define shmem_get_policy(a, b) (NULL)
+
+static inline int shmem_lock(struct file *file, int lock,
+                            struct user_struct *user)
+{
+       return 0;
+}
+
+static inline int shmem_set_policy(struct vm_area_struct *vma,
+                                  struct mempolicy *new)
+{
+       return 0;
+}
+
+static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
+                                                unsigned long addr)
+{
+       return NULL;
+}
 #endif
 struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
+extern int shmem_mmap(struct file *file, struct vm_area_struct *vma);
 
 int shmem_zero_setup(struct vm_area_struct *);
+
+#ifndef CONFIG_MMU
+extern unsigned long shmem_get_unmapped_area(struct file *file,
+                                            unsigned long addr,
+                                            unsigned long len,
+                                            unsigned long pgoff,
+                                            unsigned long flags);
+#endif
 
 static inline int can_do_mlock(void)
 {
@@ -693,14 +725,31 @@
 }
 
 extern int vmtruncate(struct inode * inode, loff_t offset);
+extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end);
 extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, 
unsigned long addr, struct page *page, pgprot_t prot);
 extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, 
unsigned long addr, unsigned long pgoff, pgprot_t prot);
-extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, 
unsigned long address, int write_access);
-
-static inline int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct 
*vma, unsigned long address, int write_access)
-{
-       return __handle_mm_fault(mm, vma, address, write_access) & 
(~VM_FAULT_WRITE);
-}
+
+#ifdef CONFIG_MMU
+extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma,
+                       unsigned long address, int write_access);
+
+static inline int handle_mm_fault(struct mm_struct *mm,
+                       struct vm_area_struct *vma, unsigned long address,
+                       int write_access)
+{
+       return __handle_mm_fault(mm, vma, address, write_access) &
+                               (~VM_FAULT_WRITE);
+}
+#else
+static inline int handle_mm_fault(struct mm_struct *mm,
+                       struct vm_area_struct *vma, unsigned long address,
+                       int write_access)
+{
+       /* should never happen if there's no MMU */
+       BUG();
+       return VM_FAULT_SIGBUS;
+}
+#endif
 
 extern int make_pages_present(unsigned long addr, unsigned long end);
 extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void 
*buf, int len, int write);
@@ -777,7 +826,7 @@
  * overflow into the next struct page (as it might with DEBUG_SPINLOCK).
  * When freeing, reset page->mapping so free_pages_check won't complain.
  */
-#define __pte_lockptr(page)    &((page)->u.ptl)
+#define __pte_lockptr(page)    &((page)->ptl)
 #define pte_lock_init(_page)   do {                                    \
        spin_lock_init(__pte_lockptr(_page));                           \
 } while (0)
@@ -899,6 +948,8 @@
 /* filemap.c */
 extern unsigned long page_unuse(struct page *);
 extern void truncate_inode_pages(struct address_space *, loff_t);
+extern void truncate_inode_pages_range(struct address_space *,
+                                      loff_t lstart, loff_t lend);
 
 /* generic vm_area_ops exported for stackable file systems */
 extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int 
*);
@@ -988,6 +1039,9 @@
 static inline void
 kernel_map_pages(struct page *page, int numpages, int enable)
 {
+       if (!PageHighMem(page) && !enable)
+               mutex_debug_check_no_locks_freed(page_address(page),
+                                                numpages * PAGE_SIZE);
 }
 #endif
 
@@ -1003,5 +1057,12 @@
 /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */
 #define OOM_DISABLE -17
 
+int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
+                                       void __user *, size_t *, loff_t *);
+int shrink_slab(unsigned long scanned, gfp_t gfp_mask,
+                       unsigned long lru_pages);
+void drop_pagecache(void);
+void drop_slab(void);
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_H */
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/include/linux/skbuff.h
--- a/linux-2.6-xen-sparse/include/linux/skbuff.h       Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/linux/skbuff.h       Thu Feb  2 19:16:38 2006
@@ -32,7 +32,6 @@
 
 #define HAVE_ALLOC_SKB         /* For the drivers to know */
 #define HAVE_ALIGNABLE_SKB     /* Ditto 8)                */
-#define SLAB_SKB               /* Slabified skbuffs       */
 
 #define CHECKSUM_NONE 0
 #define CHECKSUM_HW 1
@@ -134,7 +133,7 @@
  */
 struct skb_shared_info {
        atomic_t        dataref;
-       unsigned int    nr_frags;
+       unsigned short  nr_frags;
        unsigned short  tso_size;
        unsigned short  tso_segs;
        unsigned short  ufo_size;
@@ -254,7 +253,7 @@
         * want to keep them across layers you have to do a skb_clone()
         * first. This is owned by whoever has the skb queued ATM.
         */
-       char                    cb[40];
+       char                    cb[48];
 
        unsigned int            len,
                                data_len,
@@ -936,7 +935,7 @@
  *     Increase the headroom of an empty &sk_buff by reducing the tail
  *     room. This is only allowed for an empty buffer.
  */
-static inline void skb_reserve(struct sk_buff *skb, unsigned int len)
+static inline void skb_reserve(struct sk_buff *skb, int len)
 {
        skb->data += len;
        skb->tail += len;
@@ -1248,6 +1247,8 @@
                                                        int hlen,
                                                        struct iovec *iov);
 extern void           skb_free_datagram(struct sock *sk, struct sk_buff *skb);
+extern void           skb_kill_datagram(struct sock *sk, struct sk_buff *skb,
+                                        unsigned int flags);
 extern unsigned int    skb_checksum(const struct sk_buff *skb, int offset,
                                    int len, unsigned int csum);
 extern int            skb_copy_bits(const struct sk_buff *skb, int offset,
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/include/xen/xenbus.h
--- a/linux-2.6-xen-sparse/include/xen/xenbus.h Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/include/xen/xenbus.h Thu Feb  2 19:16:38 2006
@@ -88,7 +88,7 @@
        int (*remove)(struct xenbus_device *dev);
        int (*suspend)(struct xenbus_device *dev);
        int (*resume)(struct xenbus_device *dev);
-       int (*hotplug)(struct xenbus_device *, char **, int, char *, int);
+       int (*uevent)(struct xenbus_device *, char **, int, char *, int);
        struct device_driver driver;
        int (*read_otherend_details)(struct xenbus_device *dev);
 };
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/kernel/irq/manage.c
--- a/linux-2.6-xen-sparse/kernel/irq/manage.c  Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/kernel/irq/manage.c  Thu Feb  2 19:16:38 2006
@@ -412,6 +412,8 @@
        action->next = NULL;
        action->dev_id = dev_id;
 
+       select_smp_affinity(irq);
+
        retval = setup_irq(irq, action);
        if (retval)
                kfree(action);
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/lib/Kconfig.debug
--- a/linux-2.6-xen-sparse/lib/Kconfig.debug    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/lib/Kconfig.debug    Thu Feb  2 19:16:38 2006
@@ -9,15 +9,9 @@
          in kernel startup.
 
 
-config DEBUG_KERNEL
-       bool "Kernel debugging"
-       help
-         Say Y here if you are developing drivers or trying to debug and
-         identify kernel problems.
-
 config MAGIC_SYSRQ
        bool "Magic SysRq key"
-       depends on DEBUG_KERNEL && !UML
+       depends on !UML
        help
          If you say Y here, you will have some control over the system even
          if the system crashes for example during kernel debugging (e.g., you
@@ -29,10 +23,16 @@
          keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
          unless you really know what this hack does.
 
+config DEBUG_KERNEL
+       bool "Kernel debugging"
+       help
+         Say Y here if you are developing drivers or trying to debug and
+         identify kernel problems.
+
 config LOG_BUF_SHIFT
        int "Kernel log buffer size (16 => 64KB, 17 => 128KB)" if DEBUG_KERNEL
        range 12 21
-       default 17 if ARCH_S390
+       default 17 if S390
        default 16 if X86_NUMAQ || IA64
        default 15 if SMP
        default 14
@@ -79,7 +79,7 @@
 
 config DEBUG_SLAB
        bool "Debug memory allocations"
-       depends on DEBUG_KERNEL
+       depends on DEBUG_KERNEL && SLAB
        help
          Say Y here to have the kernel do limited verification on memory
          allocation as well as poisoning memory on free to catch use of freed
@@ -94,6 +94,14 @@
          commonly used smp_processor_id() function and will print warnings
          if kernel code uses it in a preemption-unsafe way. Also, the kernel
          will detect preemption count underflows.
+
+config DEBUG_MUTEXES
+       bool "Mutex debugging, deadlock detection"
+       default y
+       depends on DEBUG_KERNEL
+       help
+        This allows mutex semantics violations and mutex related deadlocks
+        (lockups) to be detected and reported automatically.
 
 config DEBUG_SPINLOCK
        bool "Spinlock debugging"
@@ -172,7 +180,8 @@
        bool "Debug VM"
        depends on DEBUG_KERNEL
        help
-         Enable this to debug the virtual-memory system.
+         Enable this to turn on extended checks in the virtual-memory system
+          that may impact performance.
 
          If unsure, say N.
 
@@ -186,6 +195,20 @@
          some architectures or if you use external debuggers.
          If you don't debug the kernel, you can say N.
 
+config FORCED_INLINING
+       bool "Force gcc to inline functions marked 'inline'"
+       depends on DEBUG_KERNEL
+       default y
+       help
+         This option determines if the kernel forces gcc to inline the 
functions
+         developers have marked 'inline'. Doing so takes away freedom from gcc 
to
+         do what it thinks is best, which is desirable for the gcc 3.x series 
of
+         compilers. The gcc 4.x series have a rewritten inlining algorithm and
+         disabling this option will generate a smaller kernel there. Hopefully
+         this algorithm is so good that allowing gcc4 to make the decision can
+         become the default in the future, until then this option is there to
+         test gcc for this.
+
 config RCU_TORTURE_TEST
        tristate "torture tests for RCU"
        depends on DEBUG_KERNEL
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/mm/Kconfig
--- a/linux-2.6-xen-sparse/mm/Kconfig   Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/mm/Kconfig   Thu Feb  2 19:16:38 2006
@@ -11,7 +11,7 @@
 
 config FLATMEM_MANUAL
        bool "Flat Memory"
-       depends on !ARCH_DISCONTIGMEM_ENABLE || ARCH_FLATMEM_ENABLE
+       depends on !(ARCH_DISCONTIGMEM_ENABLE || ARCH_SPARSEMEM_ENABLE) || 
ARCH_FLATMEM_ENABLE
        help
          This option allows you to change some of the ways that
          Linux manages its memory internally.  Most users will
@@ -135,3 +135,10 @@
        default "4096" if PARISC && !PA20
        default "4096" if XEN
        default "4"
+
+#
+# support for page migration
+#
+config MIGRATION
+       def_bool y if NUMA || SPARSEMEM || DISCONTIGMEM
+       depends on SWAP
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/mm/memory.c
--- a/linux-2.6-xen-sparse/mm/memory.c  Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/mm/memory.c  Thu Feb  2 19:16:38 2006
@@ -1614,7 +1614,7 @@
                update_mmu_cache(vma, address, entry);
                lazy_mmu_prot_update(entry);
                lru_cache_add_active(new_page);
-               page_add_anon_rmap(new_page, vma, address);
+               page_add_new_anon_rmap(new_page, vma, address);
 
                /* Free the old page.. */
                new_page = old_page;
@@ -1886,8 +1886,31 @@
 out_busy:
        return -ETXTBSY;
 }
-
 EXPORT_SYMBOL(vmtruncate);
+
+int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end)
+{
+       struct address_space *mapping = inode->i_mapping;
+
+       /*
+        * If the underlying filesystem is not going to provide
+        * a way to truncate a range of blocks (punch a hole) -
+        * we should return failure right now.
+        */
+       if (!inode->i_op || !inode->i_op->truncate_range)
+               return -ENOSYS;
+
+       mutex_lock(&inode->i_mutex);
+       down_write(&inode->i_alloc_sem);
+       unmap_mapping_range(mapping, offset, (end - offset), 1);
+       truncate_inode_pages_range(mapping, offset, end);
+       inode->i_op->truncate_range(inode, offset, end);
+       up_write(&inode->i_alloc_sem);
+       mutex_unlock(&inode->i_mutex);
+
+       return 0;
+}
+EXPORT_SYMBOL(vmtruncate_range);
 
 /* 
  * Primitive swap readahead code. We simply read an aligned block of
@@ -2070,8 +2093,7 @@
                        goto release;
                inc_mm_counter(mm, anon_rss);
                lru_cache_add_active(page);
-               SetPageReferenced(page);
-               page_add_anon_rmap(page, vma, address);
+               page_add_new_anon_rmap(page, vma, address);
        } else {
                /* Map the ZERO_PAGE - vm_page_prot is readonly */
                page = ZERO_PAGE(address);
@@ -2202,7 +2224,7 @@
                if (anon) {
                        inc_mm_counter(mm, anon_rss);
                        lru_cache_add_active(new_page);
-                       page_add_anon_rmap(new_page, vma, address);
+                       page_add_new_anon_rmap(new_page, vma, address);
                } else {
                        inc_mm_counter(mm, file_rss);
                        page_add_file_rmap(new_page);
@@ -2360,6 +2382,8 @@
 
        return handle_pte_fault(mm, vma, address, pte, pmd, write_access);
 }
+
+EXPORT_SYMBOL_GPL(__handle_mm_fault);
 
 #ifndef __PAGETABLE_PUD_FOLDED
 /*
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/mm/mmap.c
--- a/linux-2.6-xen-sparse/mm/mmap.c    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/mm/mmap.c    Thu Feb  2 19:16:38 2006
@@ -13,6 +13,7 @@
 #include <linux/pagemap.h>
 #include <linux/swap.h>
 #include <linux/syscalls.h>
+#include <linux/capability.h>
 #include <linux/init.h>
 #include <linux/file.h>
 #include <linux/fs.h>
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/mm/page_alloc.c
--- a/linux-2.6-xen-sparse/mm/page_alloc.c      Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/mm/page_alloc.c      Thu Feb  2 19:16:38 2006
@@ -36,6 +36,7 @@
 #include <linux/memory_hotplug.h>
 #include <linux/nodemask.h>
 #include <linux/vmalloc.h>
+#include <linux/mempolicy.h>
 
 #include <asm/tlbflush.h>
 #include "internal.h"
@@ -52,6 +53,9 @@
 unsigned long totalram_pages __read_mostly;
 unsigned long totalhigh_pages __read_mostly;
 long nr_swap_pages;
+int percpu_pagelist_fraction;
+
+static void fastcall free_hot_cold_page(struct page *page, int cold);
 
 /*
  * results with 256, 32 in the lowmem_reserve sysctl:
@@ -81,6 +85,7 @@
 unsigned long __initdata nr_kernel_pages;
 unsigned long __initdata nr_all_pages;
 
+#ifdef CONFIG_DEBUG_VM
 static int page_outside_zone_boundaries(struct zone *zone, struct page *page)
 {
        int ret = 0;
@@ -122,16 +127,23 @@
        return 0;
 }
 
-static void bad_page(const char *function, struct page *page)
-{
-       printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n",
-               function, current->comm, page);
-       printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
-               (int)(2*sizeof(unsigned long)), (unsigned long)page->flags,
-               page->mapping, page_mapcount(page), page_count(page));
-       printk(KERN_EMERG "Backtrace:\n");
+#else
+static inline int bad_range(struct zone *zone, struct page *page)
+{
+       return 0;
+}
+#endif
+
+static void bad_page(struct page *page)
+{
+       printk(KERN_EMERG "Bad page state in process '%s'\n"
+               KERN_EMERG "page:%p flags:0x%0*lx mapping:%p mapcount:%d 
count:%d\n"
+               KERN_EMERG "Trying to fix it up, but a reboot is needed\n"
+               KERN_EMERG "Backtrace:\n",
+               current->comm, page, (int)(2*sizeof(unsigned long)),
+               (unsigned long)page->flags, page->mapping,
+               page_mapcount(page), page_count(page));
        dump_stack();
-       printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n");
        page->flags &= ~(1 << PG_lru    |
                        1 << PG_private |
                        1 << PG_locked  |
@@ -184,19 +196,15 @@
        int i;
        int nr_pages = 1 << order;
 
-       if (!PageCompound(page))
-               return;
-
-       if (page[1].index != order)
-               bad_page(__FUNCTION__, page);
+       if (unlikely(page[1].index != order))
+               bad_page(page);
 
        for (i = 0; i < nr_pages; i++) {
                struct page *p = page + i;
 
-               if (!PageCompound(p))
-                       bad_page(__FUNCTION__, page);
-               if (page_private(p) != (unsigned long)page)
-                       bad_page(__FUNCTION__, page);
+               if (unlikely(!PageCompound(p) |
+                               (page_private(p) != (unsigned long)page)))
+                       bad_page(page);
                ClearPageCompound(p);
        }
 }
@@ -255,14 +263,20 @@
 /*
  * This function checks whether a page is free && is the buddy
  * we can do coalesce a page and its buddy if
- * (a) the buddy is free &&
- * (b) the buddy is on the buddy system &&
- * (c) a page and its buddy have the same order.
+ * (a) the buddy is not in a hole &&
+ * (b) the buddy is free &&
+ * (c) the buddy is on the buddy system &&
+ * (d) a page and its buddy have the same order.
  * for recording page's order, we use page_private(page) and PG_private.
  *
  */
 static inline int page_is_buddy(struct page *page, int order)
 {
+#ifdef CONFIG_HOLES_IN_ZONE
+       if (!pfn_valid(page_to_pfn(page)))
+               return 0;
+#endif
+
        if (PagePrivate(page)           &&
            (page_order(page) == order) &&
             page_count(page) == 0)
@@ -294,13 +308,13 @@
  * -- wli
  */
 
-static inline void __free_pages_bulk (struct page *page,
+static inline void __free_one_page(struct page *page,
                struct zone *zone, unsigned int order)
 {
        unsigned long page_idx;
        int order_size = 1 << order;
 
-       if (unlikely(order))
+       if (unlikely(PageCompound(page)))
                destroy_compound_page(page, order);
 
        page_idx = page_to_pfn(page) & ((1 << MAX_ORDER) - 1);
@@ -314,17 +328,15 @@
                struct free_area *area;
                struct page *buddy;
 
-               combined_idx = __find_combined_index(page_idx, order);
                buddy = __page_find_buddy(page, page_idx, order);
-
-               if (bad_range(zone, buddy))
-                       break;
                if (!page_is_buddy(buddy, order))
                        break;          /* Move the buddy up one level. */
+
                list_del(&buddy->lru);
                area = zone->free_area + order;
                area->nr_free--;
                rmv_page_order(buddy);
+               combined_idx = __find_combined_index(page_idx, order);
                page = page + (combined_idx - page_idx);
                page_idx = combined_idx;
                order++;
@@ -334,11 +346,11 @@
        zone->free_area[order].nr_free++;
 }
 
-static inline int free_pages_check(const char *function, struct page *page)
-{
-       if (    page_mapcount(page) ||
-               page->mapping != NULL ||
-               page_count(page) != 0 ||
+static inline int free_pages_check(struct page *page)
+{
+       if (unlikely(page_mapcount(page) |
+               (page->mapping != NULL)  |
+               (page_count(page) != 0)  |
                (page->flags & (
                        1 << PG_lru     |
                        1 << PG_private |
@@ -348,8 +360,8 @@
                        1 << PG_slab    |
                        1 << PG_swapcache |
                        1 << PG_writeback |
-                       1 << PG_reserved )))
-               bad_page(function, page);
+                       1 << PG_reserved ))))
+               bad_page(page);
        if (PageDirty(page))
                __ClearPageDirty(page);
        /*
@@ -371,52 +383,91 @@
  * And clear the zone's pages_scanned counter, to hold off the "all pages are
  * pinned" detection logic.
  */
-static int
-free_pages_bulk(struct zone *zone, int count,
-               struct list_head *list, unsigned int order)
-{
-       unsigned long flags;
-       struct page *page = NULL;
-       int ret = 0;
-
-       spin_lock_irqsave(&zone->lock, flags);
+static void free_pages_bulk(struct zone *zone, int count,
+                                       struct list_head *list, int order)
+{
+       spin_lock(&zone->lock);
        zone->all_unreclaimable = 0;
        zone->pages_scanned = 0;
-       while (!list_empty(list) && count--) {
+       while (count--) {
+               struct page *page;
+
+               BUG_ON(list_empty(list));
                page = list_entry(list->prev, struct page, lru);
-               /* have to delete it as __free_pages_bulk list manipulates */
+               /* have to delete it as __free_one_page list manipulates */
                list_del(&page->lru);
-               __free_pages_bulk(page, zone, order);
-               ret++;
-       }
-       spin_unlock_irqrestore(&zone->lock, flags);
-       return ret;
-}
-
-void __free_pages_ok(struct page *page, unsigned int order)
+               __free_one_page(page, zone, order);
+       }
+       spin_unlock(&zone->lock);
+}
+
+static void free_one_page(struct zone *zone, struct page *page, int order)
 {
        LIST_HEAD(list);
+       list_add(&page->lru, &list);
+       free_pages_bulk(zone, 1, &list, order);
+}
+
+static void __free_pages_ok(struct page *page, unsigned int order)
+{
+       unsigned long flags;
        int i;
        int reserved = 0;
 
        if (arch_free_page(page, order))
                return;
+       if (!PageHighMem(page))
+               mutex_debug_check_no_locks_freed(page_address(page),
+                                                PAGE_SIZE<<order);
 
 #ifndef CONFIG_MMU
-       if (order > 0)
-               for (i = 1 ; i < (1 << order) ; ++i)
-                       __put_page(page + i);
+       for (i = 1 ; i < (1 << order) ; ++i)
+               __put_page(page + i);
 #endif
 
        for (i = 0 ; i < (1 << order) ; ++i)
-               reserved += free_pages_check(__FUNCTION__, page + i);
+               reserved += free_pages_check(page + i);
        if (reserved)
                return;
 
-       list_add(&page->lru, &list);
-       mod_page_state(pgfree, 1 << order);
-       kernel_map_pages(page, 1<<order, 0);
-       free_pages_bulk(page_zone(page), 1, &list, order);
+       kernel_map_pages(page, 1 << order, 0);
+       local_irq_save(flags);
+       __mod_page_state(pgfree, 1 << order);
+       free_one_page(page_zone(page), page, order);
+       local_irq_restore(flags);
+}
+
+/*
+ * permit the bootmem allocator to evade page validation on high-order frees
+ */
+void fastcall __init __free_pages_bootmem(struct page *page, unsigned int 
order)
+{
+       if (order == 0) {
+               __ClearPageReserved(page);
+               set_page_count(page, 0);
+
+               free_hot_cold_page(page, 0);
+       } else {
+               LIST_HEAD(list);
+               int loop;
+
+               for (loop = 0; loop < BITS_PER_LONG; loop++) {
+                       struct page *p = &page[loop];
+
+                       if (loop + 16 < BITS_PER_LONG)
+                               prefetchw(p + 16);
+                       __ClearPageReserved(p);
+                       set_page_count(p, 0);
+               }
+
+               arch_free_page(page, order);
+
+               mod_page_state(pgfree, 1 << order);
+
+               list_add(&page->lru, &list);
+               kernel_map_pages(page, 1 << order, 0);
+               free_pages_bulk(page_zone(page), 1, &list, order);
+       }
 }
 
 
@@ -434,8 +485,7 @@
  *
  * -- wli
  */
-static inline struct page *
-expand(struct zone *zone, struct page *page,
+static inline void expand(struct zone *zone, struct page *page,
        int low, int high, struct free_area *area)
 {
        unsigned long size = 1 << high;
@@ -449,24 +499,6 @@
                area->nr_free++;
                set_page_order(&page[size], high);
        }
-       return page;
-}
-
-void set_page_refs(struct page *page, int order)
-{
-#ifdef CONFIG_MMU
-       set_page_count(page, 1);
-#else
-       int i;
-
-       /*
-        * We need to reference all the pages for this order, otherwise if
-        * anyone accesses one of the pages with (get/put) it will be freed.
-        * - eg: access_process_vm()
-        */
-       for (i = 0; i < (1 << order); i++)
-               set_page_count(page + i, 1);
-#endif /* CONFIG_MMU */
 }
 
 /*
@@ -474,9 +506,9 @@
  */
 static int prep_new_page(struct page *page, int order)
 {
-       if (    page_mapcount(page) ||
-               page->mapping != NULL ||
-               page_count(page) != 0 ||
+       if (unlikely(page_mapcount(page) |
+               (page->mapping != NULL)  |
+               (page_count(page) != 0)  |
                (page->flags & (
                        1 << PG_lru     |
                        1 << PG_private |
@@ -487,8 +519,8 @@
                        1 << PG_slab    |
                        1 << PG_swapcache |
                        1 << PG_writeback |
-                       1 << PG_reserved )))
-               bad_page(__FUNCTION__, page);
+                       1 << PG_reserved ))))
+               bad_page(page);
 
        /*
         * For now, we report if PG_reserved was found set, but do not
@@ -526,7 +558,8 @@
                rmv_page_order(page);
                area->nr_free--;
                zone->free_pages -= 1UL << order;
-               return expand(zone, page, order, current_order, area);
+               expand(zone, page, order, current_order, area);
+               return page;
        }
 
        return NULL;
@@ -540,21 +573,17 @@
 static int rmqueue_bulk(struct zone *zone, unsigned int order, 
                        unsigned long count, struct list_head *list)
 {
-       unsigned long flags;
        int i;
-       int allocated = 0;
-       struct page *page;
        
-       spin_lock_irqsave(&zone->lock, flags);
+       spin_lock(&zone->lock);
        for (i = 0; i < count; ++i) {
-               page = __rmqueue(zone, order);
-               if (page == NULL)
+               struct page *page = __rmqueue(zone, order);
+               if (unlikely(page == NULL))
                        break;
-               allocated++;
                list_add_tail(&page->lru, list);
        }
-       spin_unlock_irqrestore(&zone->lock, flags);
-       return allocated;
+       spin_unlock(&zone->lock);
+       return i;
 }
 
 #ifdef CONFIG_NUMA
@@ -573,14 +602,13 @@
                if (zone->zone_pgdat->node_id == numa_node_id())
                        continue;
 
-               pset = zone->pageset[smp_processor_id()];
+               pset = zone_pcp(zone, smp_processor_id());
                for (i = 0; i < ARRAY_SIZE(pset->pcp); i++) {
                        struct per_cpu_pages *pcp;
 
                        pcp = &pset->pcp[i];
-                       if (pcp->count)
-                               pcp->count -= free_pages_bulk(zone, pcp->count,
-                                               &pcp->list, 0);
+                       free_pages_bulk(zone, pcp->count, &pcp->list, 0);
+                       pcp->count = 0;
                }
        }
        local_irq_restore(flags);
@@ -590,6 +618,7 @@
 #if defined(CONFIG_PM) || defined(CONFIG_HOTPLUG_CPU)
 static void __drain_pages(unsigned int cpu)
 {
+       unsigned long flags;
        struct zone *zone;
        int i;
 
@@ -601,8 +630,10 @@
                        struct per_cpu_pages *pcp;
 
                        pcp = &pset->pcp[i];
-                       pcp->count -= free_pages_bulk(zone, pcp->count,
-                                               &pcp->list, 0);
+                       local_irq_save(flags);
+                       free_pages_bulk(zone, pcp->count, &pcp->list, 0);
+                       pcp->count = 0;
+                       local_irq_restore(flags);
                }
        }
 }
@@ -648,18 +679,14 @@
 }
 #endif /* CONFIG_PM */
 
-static void zone_statistics(struct zonelist *zonelist, struct zone *z)
+static void zone_statistics(struct zonelist *zonelist, struct zone *z, int cpu)
 {
 #ifdef CONFIG_NUMA
-       unsigned long flags;
-       int cpu;
        pg_data_t *pg = z->zone_pgdat;
        pg_data_t *orig = zonelist->zones[0]->zone_pgdat;
        struct per_cpu_pageset *p;
 
-       local_irq_save(flags);
-       cpu = smp_processor_id();
-       p = zone_pcp(z,cpu);
+       p = zone_pcp(z, cpu);
        if (pg == orig) {
                p->numa_hit++;
        } else {
@@ -670,14 +697,12 @@
                p->local_node++;
        else
                p->other_node++;
-       local_irq_restore(flags);
 #endif
 }
 
 /*
  * Free a 0-order page
  */
-static void FASTCALL(free_hot_cold_page(struct page *page, int cold));
 static void fastcall free_hot_cold_page(struct page *page, int cold)
 {
        struct zone *zone = page_zone(page);
@@ -689,18 +714,20 @@
 
        if (PageAnon(page))
                page->mapping = NULL;
-       if (free_pages_check(__FUNCTION__, page))
+       if (free_pages_check(page))
                return;
 
-       inc_page_state(pgfree);
        kernel_map_pages(page, 1, 0);
 
        pcp = &zone_pcp(zone, get_cpu())->pcp[cold];
        local_irq_save(flags);
+       __inc_page_state(pgfree);
        list_add(&page->lru, &pcp->list);
        pcp->count++;
-       if (pcp->count >= pcp->high)
-               pcp->count -= free_pages_bulk(zone, pcp->batch, &pcp->list, 0);
+       if (pcp->count >= pcp->high) {
+               free_pages_bulk(zone, pcp->batch, &pcp->list, 0);
+               pcp->count -= pcp->batch;
+       }
        local_irq_restore(flags);
        put_cpu();
 }
@@ -729,49 +756,58 @@
  * we cheat by calling it from here, in the order > 0 path.  Saves a branch
  * or two.
  */
-static struct page *
-buffered_rmqueue(struct zone *zone, int order, gfp_t gfp_flags)
+static struct page *buffered_rmqueue(struct zonelist *zonelist,
+                       struct zone *zone, int order, gfp_t gfp_flags)
 {
        unsigned long flags;
        struct page *page;
        int cold = !!(gfp_flags & __GFP_COLD);
+       int cpu;
 
 again:
-       if (order == 0) {
+       cpu  = get_cpu();
+       if (likely(order == 0)) {
                struct per_cpu_pages *pcp;
 
-               page = NULL;
-               pcp = &zone_pcp(zone, get_cpu())->pcp[cold];
+               pcp = &zone_pcp(zone, cpu)->pcp[cold];
                local_irq_save(flags);
-               if (pcp->count <= pcp->low)
+               if (!pcp->count) {
                        pcp->count += rmqueue_bulk(zone, 0,
                                                pcp->batch, &pcp->list);
-               if (pcp->count) {
-                       page = list_entry(pcp->list.next, struct page, lru);
-                       list_del(&page->lru);
-                       pcp->count--;
+                       if (unlikely(!pcp->count))
+                               goto failed;
                }
-               local_irq_restore(flags);
-               put_cpu();
+               page = list_entry(pcp->list.next, struct page, lru);
+               list_del(&page->lru);
+               pcp->count--;
        } else {
                spin_lock_irqsave(&zone->lock, flags);
                page = __rmqueue(zone, order);
-               spin_unlock_irqrestore(&zone->lock, flags);
-       }
-
-       if (page != NULL) {
-               BUG_ON(bad_range(zone, page));
-               mod_page_state_zone(zone, pgalloc, 1 << order);
-               if (prep_new_page(page, order))
-                       goto again;
-
-               if (gfp_flags & __GFP_ZERO)
-                       prep_zero_page(page, order, gfp_flags);
-
-               if (order && (gfp_flags & __GFP_COMP))
-                       prep_compound_page(page, order);
-       }
+               spin_unlock(&zone->lock);
+               if (!page)
+                       goto failed;
+       }
+
+       __mod_page_state_zone(zone, pgalloc, 1 << order);
+       zone_statistics(zonelist, zone, cpu);
+       local_irq_restore(flags);
+       put_cpu();
+
+       BUG_ON(bad_range(zone, page));
+       if (prep_new_page(page, order))
+               goto again;
+
+       if (gfp_flags & __GFP_ZERO)
+               prep_zero_page(page, order, gfp_flags);
+
+       if (order && (gfp_flags & __GFP_COMP))
+               prep_compound_page(page, order);
        return page;
+
+failed:
+       local_irq_restore(flags);
+       put_cpu();
+       return NULL;
 }
 
 #define ALLOC_NO_WATERMARKS    0x01 /* don't check watermarks at all */
@@ -844,12 +880,13 @@
                                mark = (*z)->pages_high;
                        if (!zone_watermark_ok(*z, order, mark,
                                    classzone_idx, alloc_flags))
-                               continue;
+                               if (!zone_reclaim_mode ||
+                                   !zone_reclaim(*z, gfp_mask, order))
+                                       continue;
                }
 
-               page = buffered_rmqueue(*z, order, gfp_mask);
+               page = buffered_rmqueue(zonelist, *z, order, gfp_mask);
                if (page) {
-                       zone_statistics(zonelist, *z);
                        break;
                }
        } while (*(++z) != NULL);
@@ -898,15 +935,15 @@
         *
         * The caller may dip into page reserves a bit more if the caller
         * cannot run direct reclaim, or if the caller has realtime scheduling
-        * policy.
+        * policy or is asking for __GFP_HIGH memory.  GFP_ATOMIC requests will
+        * set both ALLOC_HARDER (!wait) and ALLOC_HIGH (__GFP_HIGH).
         */
        alloc_flags = ALLOC_WMARK_MIN;
        if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait)
                alloc_flags |= ALLOC_HARDER;
        if (gfp_mask & __GFP_HIGH)
                alloc_flags |= ALLOC_HIGH;
-       if (wait)
-               alloc_flags |= ALLOC_CPUSET;
+       alloc_flags |= ALLOC_CPUSET;
 
        /*
         * Go through the zonelist again. Let __GFP_HIGH and allocations
@@ -928,7 +965,7 @@
 nofail_alloc:
                        /* go through the zonelist yet again, ignoring mins */
                        page = get_page_from_freelist(gfp_mask, order,
-                               zonelist, ALLOC_NO_WATERMARKS|ALLOC_CPUSET);
+                               zonelist, ALLOC_NO_WATERMARKS);
                        if (page)
                                goto got_pg;
                        if (gfp_mask & __GFP_NOFAIL) {
@@ -947,6 +984,7 @@
        cond_resched();
 
        /* We now go into synchronous reclaim */
+       cpuset_memory_pressure_bump();
        p->flags |= PF_MEMALLOC;
        reclaim_state.reclaimed_slab = 0;
        p->reclaim_state = &reclaim_state;
@@ -1173,7 +1211,7 @@
 DEFINE_PER_CPU(long, nr_pagecache_local) = 0;
 #endif
 
-void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask)
+static void __get_page_state(struct page_state *ret, int nr, cpumask_t 
*cpumask)
 {
        int cpu = 0;
 
@@ -1226,7 +1264,7 @@
        __get_page_state(ret, sizeof(*ret) / sizeof(unsigned long), &mask);
 }
 
-unsigned long __read_page_state(unsigned long offset)
+unsigned long read_page_state_offset(unsigned long offset)
 {
        unsigned long ret = 0;
        int cpu;
@@ -1240,18 +1278,26 @@
        return ret;
 }
 
-void __mod_page_state(unsigned long offset, unsigned long delta)
+void __mod_page_state_offset(unsigned long offset, unsigned long delta)
+{
+       void *ptr;
+
+       ptr = &__get_cpu_var(page_states);
+       *(unsigned long *)(ptr + offset) += delta;
+}
+EXPORT_SYMBOL(__mod_page_state_offset);
+
+void mod_page_state_offset(unsigned long offset, unsigned long delta)
 {
        unsigned long flags;
-       void* ptr;
+       void *ptr;
 
        local_irq_save(flags);
        ptr = &__get_cpu_var(page_states);
-       *(unsigned long*)(ptr + offset) += delta;
+       *(unsigned long *)(ptr + offset) += delta;
        local_irq_restore(flags);
 }
-
-EXPORT_SYMBOL(__mod_page_state);
+EXPORT_SYMBOL(mod_page_state_offset);
 
 void __get_zone_counts(unsigned long *active, unsigned long *inactive,
                        unsigned long *free, struct pglist_data *pgdat)
@@ -1337,7 +1383,7 @@
                show_node(zone);
                printk("%s per-cpu:", zone->name);
 
-               if (!zone->present_pages) {
+               if (!populated_zone(zone)) {
                        printk(" empty\n");
                        continue;
                } else
@@ -1349,10 +1395,9 @@
                        pageset = zone_pcp(zone, cpu);
 
                        for (temperature = 0; temperature < 2; temperature++)
-                               printk("cpu %d %s: low %d, high %d, batch %d 
used:%d\n",
+                               printk("cpu %d %s: high %d, batch %d used:%d\n",
                                        cpu,
                                        temperature ? "cold" : "hot",
-                                       pageset->pcp[temperature].low,
                                        pageset->pcp[temperature].high,
                                        pageset->pcp[temperature].batch,
                                        pageset->pcp[temperature].count);
@@ -1415,7 +1460,7 @@
 
                show_node(zone);
                printk("%s: ", zone->name);
-               if (!zone->present_pages) {
+               if (!populated_zone(zone)) {
                        printk("empty\n");
                        continue;
                }
@@ -1435,36 +1480,29 @@
 
 /*
  * Builds allocation fallback zone lists.
- */
-static int __init build_zonelists_node(pg_data_t *pgdat, struct zonelist 
*zonelist, int j, int k)
-{
-       switch (k) {
-               struct zone *zone;
-       default:
-               BUG();
-       case ZONE_HIGHMEM:
-               zone = pgdat->node_zones + ZONE_HIGHMEM;
-               if (zone->present_pages) {
+ *
+ * Add all populated zones of a node to the zonelist.
+ */
+static int __init build_zonelists_node(pg_data_t *pgdat,
+                       struct zonelist *zonelist, int nr_zones, int zone_type)
+{
+       struct zone *zone;
+
+       BUG_ON(zone_type > ZONE_HIGHMEM);
+
+       do {
+               zone = pgdat->node_zones + zone_type;
+               if (populated_zone(zone)) {
 #ifndef CONFIG_HIGHMEM
-                       BUG();
+                       BUG_ON(zone_type > ZONE_NORMAL);
 #endif
-                       zonelist->zones[j++] = zone;
+                       zonelist->zones[nr_zones++] = zone;
+                       check_highest_zone(zone_type);
                }
-       case ZONE_NORMAL:
-               zone = pgdat->node_zones + ZONE_NORMAL;
-               if (zone->present_pages)
-                       zonelist->zones[j++] = zone;
-       case ZONE_DMA32:
-               zone = pgdat->node_zones + ZONE_DMA32;
-               if (zone->present_pages)
-                       zonelist->zones[j++] = zone;
-       case ZONE_DMA:
-               zone = pgdat->node_zones + ZONE_DMA;
-               if (zone->present_pages)
-                       zonelist->zones[j++] = zone;
-       }
-
-       return j;
+               zone_type--;
+
+       } while (zone_type >= 0);
+       return nr_zones;
 }
 
 static inline int highest_zone(int zone_bits)
@@ -1561,13 +1599,22 @@
        prev_node = local_node;
        nodes_clear(used_mask);
        while ((node = find_next_best_node(local_node, &used_mask)) >= 0) {
+               int distance = node_distance(local_node, node);
+
+               /*
+                * If another node is sufficiently far away then it is better
+                * to reclaim pages in a zone before going off node.
+                */
+               if (distance > RECLAIM_DISTANCE)
+                       zone_reclaim_mode = 1;
+
                /*
                 * We don't want to pressure a particular node.
                 * So adding penalty to the first node in same
                 * distance group to make it round-robin.
                 */
-               if (node_distance(local_node, node) !=
-                               node_distance(local_node, prev_node))
+
+               if (distance != node_distance(local_node, prev_node))
                        node_load[node] += load;
                prev_node = node;
                load--;
@@ -1701,17 +1748,15 @@
  * up by free_all_bootmem() once the early boot process is
  * done. Non-atomic initialization, single-pass.
  */
-void __devinit memmap_init_zone(unsigned long size, int nid, unsigned long 
zone,
+void __meminit memmap_init_zone(unsigned long size, int nid, unsigned long 
zone,
                unsigned long start_pfn)
 {
        struct page *page;
        unsigned long end_pfn = start_pfn + size;
        unsigned long pfn;
 
-       for (pfn = start_pfn; pfn < end_pfn; pfn++, page++) {
+       for (pfn = start_pfn; pfn < end_pfn; pfn++) {
                if (!early_pfn_valid(pfn))
-                       continue;
-               if (!early_pfn_in_nid(pfn, nid))
                        continue;
                page = pfn_to_page(pfn);
                set_page_links(page, zone, nid, pfn);
@@ -1756,7 +1801,7 @@
        memmap_init_zone((size), (nid), (zone), (start_pfn))
 #endif
 
-static int __devinit zone_batchsize(struct zone *zone)
+static int __meminit zone_batchsize(struct zone *zone)
 {
        int batch;
 
@@ -1796,18 +1841,34 @@
 
        pcp = &p->pcp[0];               /* hot */
        pcp->count = 0;
-       pcp->low = 0;
        pcp->high = 6 * batch;
        pcp->batch = max(1UL, 1 * batch);
        INIT_LIST_HEAD(&pcp->list);
 
        pcp = &p->pcp[1];               /* cold*/
        pcp->count = 0;
-       pcp->low = 0;
        pcp->high = 2 * batch;
        pcp->batch = max(1UL, batch/2);
        INIT_LIST_HEAD(&pcp->list);
 }
+
+/*
+ * setup_pagelist_highmark() sets the high water mark for hot per_cpu_pagelist
+ * to the value high for the pageset p.
+ */
+
+static void setup_pagelist_highmark(struct per_cpu_pageset *p,
+                               unsigned long high)
+{
+       struct per_cpu_pages *pcp;
+
+       pcp = &p->pcp[0]; /* hot list */
+       pcp->high = high;
+       pcp->batch = max(1UL, high/4);
+       if ((high/4) > (PAGE_SHIFT * 8))
+               pcp->batch = PAGE_SHIFT * 8;
+}
+
 
 #ifdef CONFIG_NUMA
 /*
@@ -1834,18 +1895,22 @@
  * Dynamically allocate memory for the
  * per cpu pageset array in struct zone.
  */
-static int __devinit process_zones(int cpu)
+static int __meminit process_zones(int cpu)
 {
        struct zone *zone, *dzone;
 
        for_each_zone(zone) {
 
-               zone->pageset[cpu] = kmalloc_node(sizeof(struct 
per_cpu_pageset),
+               zone_pcp(zone, cpu) = kmalloc_node(sizeof(struct 
per_cpu_pageset),
                                         GFP_KERNEL, cpu_to_node(cpu));
-               if (!zone->pageset[cpu])
+               if (!zone_pcp(zone, cpu))
                        goto bad;
 
-               setup_pageset(zone->pageset[cpu], zone_batchsize(zone));
+               setup_pageset(zone_pcp(zone, cpu), zone_batchsize(zone));
+
+               if (percpu_pagelist_fraction)
+                       setup_pagelist_highmark(zone_pcp(zone, cpu),
+                               (zone->present_pages / 
percpu_pagelist_fraction));
        }
 
        return 0;
@@ -1853,15 +1918,14 @@
        for_each_zone(dzone) {
                if (dzone == zone)
                        break;
-               kfree(dzone->pageset[cpu]);
-               dzone->pageset[cpu] = NULL;
+               kfree(zone_pcp(dzone, cpu));
+               zone_pcp(dzone, cpu) = NULL;
        }
        return -ENOMEM;
 }
 
 static inline void free_zone_pagesets(int cpu)
 {
-#ifdef CONFIG_NUMA
        struct zone *zone;
 
        for_each_zone(zone) {
@@ -1870,10 +1934,9 @@
                zone_pcp(zone, cpu) = NULL;
                kfree(pset);
        }
-#endif
-}
-
-static int __devinit pageset_cpuup_callback(struct notifier_block *nfb,
+}
+
+static int __meminit pageset_cpuup_callback(struct notifier_block *nfb,
                unsigned long action,
                void *hcpu)
 {
@@ -1913,7 +1976,7 @@
 
 #endif
 
-static __devinit
+static __meminit
 void zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages)
 {
        int i;
@@ -1933,7 +1996,7 @@
                init_waitqueue_head(zone->wait_table + i);
 }
 
-static __devinit void zone_pcp_init(struct zone *zone)
+static __meminit void zone_pcp_init(struct zone *zone)
 {
        int cpu;
        unsigned long batch = zone_batchsize(zone);
@@ -1941,7 +2004,7 @@
        for (cpu = 0; cpu < NR_CPUS; cpu++) {
 #ifdef CONFIG_NUMA
                /* Early boot. Slab allocator not functional yet */
-               zone->pageset[cpu] = &boot_pageset[cpu];
+               zone_pcp(zone, cpu) = &boot_pageset[cpu];
                setup_pageset(&boot_pageset[cpu],0);
 #else
                setup_pageset(zone_pcp(zone,cpu), batch);
@@ -1951,7 +2014,7 @@
                zone->name, zone->present_pages, batch);
 }
 
-static __devinit void init_currently_empty_zone(struct zone *zone,
+static __meminit void init_currently_empty_zone(struct zone *zone,
                unsigned long zone_start_pfn, unsigned long size)
 {
        struct pglist_data *pgdat = zone->zone_pgdat;
@@ -2118,7 +2181,7 @@
        int order;
 
        for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; ++zone) {
-               if (!zone->present_pages)
+               if (!populated_zone(zone))
                        continue;
 
                spin_lock_irqsave(&zone->lock, flags);
@@ -2151,7 +2214,7 @@
        for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; zone++) {
                int i;
 
-               if (!zone->present_pages)
+               if (!populated_zone(zone))
                        continue;
 
                spin_lock_irqsave(&zone->lock, flags);
@@ -2184,7 +2247,7 @@
                seq_printf(m,
                           ")"
                           "\n  pagesets");
-               for (i = 0; i < ARRAY_SIZE(zone->pageset); i++) {
+               for_each_online_cpu(i) {
                        struct per_cpu_pageset *pageset;
                        int j;
 
@@ -2199,12 +2262,10 @@
                                seq_printf(m,
                                           "\n    cpu: %i pcp: %i"
                                           "\n              count: %i"
-                                          "\n              low:   %i"
                                           "\n              high:  %i"
                                           "\n              batch: %i",
                                           i, j,
                                           pageset->pcp[j].count,
-                                          pageset->pcp[j].low,
                                           pageset->pcp[j].high,
                                           pageset->pcp[j].batch);
                        }
@@ -2259,32 +2320,40 @@
        "pgpgout",
        "pswpin",
        "pswpout",
+
        "pgalloc_high",
-
        "pgalloc_normal",
+       "pgalloc_dma32",
        "pgalloc_dma",
+
        "pgfree",
        "pgactivate",
        "pgdeactivate",
 
        "pgfault",
        "pgmajfault",
+
        "pgrefill_high",
        "pgrefill_normal",
+       "pgrefill_dma32",
        "pgrefill_dma",
 
        "pgsteal_high",
        "pgsteal_normal",
+       "pgsteal_dma32",
        "pgsteal_dma",
+
        "pgscan_kswapd_high",
        "pgscan_kswapd_normal",
-
+       "pgscan_kswapd_dma32",
        "pgscan_kswapd_dma",
+
        "pgscan_direct_high",
        "pgscan_direct_normal",
+       "pgscan_direct_dma32",
        "pgscan_direct_dma",
+
        "pginodesteal",
-
        "slabs_scanned",
        "kswapd_steal",
        "kswapd_inodesteal",
@@ -2541,6 +2610,32 @@
        return 0;
 }
 
+/*
+ * percpu_pagelist_fraction - changes the pcp->high for each zone on each
+ * cpu.  It is the fraction of total pages in each zone that a hot per cpu 
pagelist
+ * can have before it gets flushed back to buddy allocator.
+ */
+
+int percpu_pagelist_fraction_sysctl_handler(ctl_table *table, int write,
+       struct file *file, void __user *buffer, size_t *length, loff_t *ppos)
+{
+       struct zone *zone;
+       unsigned int cpu;
+       int ret;
+
+       ret = proc_dointvec_minmax(table, write, file, buffer, length, ppos);
+       if (!write || (ret == -EINVAL))
+               return ret;
+       for_each_zone(zone) {
+               for_each_online_cpu(cpu) {
+                       unsigned long  high;
+                       high = zone->present_pages / percpu_pagelist_fraction;
+                       setup_pagelist_highmark(zone_pcp(zone, cpu), high);
+               }
+       }
+       return 0;
+}
+
 __initdata int hashdist = HASHDIST_DEFAULT;
 
 #ifdef CONFIG_NUMA
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/net/core/dev.c
--- a/linux-2.6-xen-sparse/net/core/dev.c       Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/net/core/dev.c       Thu Feb  2 19:16:38 2006
@@ -75,6 +75,7 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 #include <linux/bitops.h>
+#include <linux/capability.h>
 #include <linux/config.h>
 #include <linux/cpu.h>
 #include <linux/types.h>
@@ -632,7 +633,7 @@
  *     Network device names need to be valid file names to
  *     to allow sysfs to work
  */
-static int dev_valid_name(const char *name)
+int dev_valid_name(const char *name)
 {
        return !(*name == '\0' 
                 || !strcmp(name, ".")
@@ -1098,15 +1099,12 @@
                        goto out;
        }
 
-       if (offset > (int)skb->len)
-               BUG();
+       BUG_ON(offset > (int)skb->len);
        csum = skb_checksum(skb, offset, skb->len-offset, 0);
 
        offset = skb->tail - skb->h.raw;
-       if (offset <= 0)
-               BUG();
-       if (skb->csum + 2 > offset)
-               BUG();
+       BUG_ON(offset <= 0);
+       BUG_ON(skb->csum + 2 > offset);
 
        *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum);
        skb->ip_summed = CHECKSUM_NONE;
@@ -3320,13 +3318,13 @@
 EXPORT_SYMBOL(__dev_get_by_name);
 EXPORT_SYMBOL(__dev_remove_pack);
 EXPORT_SYMBOL(__skb_linearize);
+EXPORT_SYMBOL(dev_valid_name);
 EXPORT_SYMBOL(dev_add_pack);
 EXPORT_SYMBOL(dev_alloc_name);
 EXPORT_SYMBOL(dev_close);
 EXPORT_SYMBOL(dev_get_by_flags);
 EXPORT_SYMBOL(dev_get_by_index);
 EXPORT_SYMBOL(dev_get_by_name);
-EXPORT_SYMBOL(dev_ioctl);
 EXPORT_SYMBOL(dev_open);
 EXPORT_SYMBOL(dev_queue_xmit);
 EXPORT_SYMBOL(dev_remove_pack);
diff -r da6297243495 -r 2494b4e00cbb linux-2.6-xen-sparse/net/core/skbuff.c
--- a/linux-2.6-xen-sparse/net/core/skbuff.c    Thu Feb  2 18:15:22 2006
+++ b/linux-2.6-xen-sparse/net/core/skbuff.c    Thu Feb  2 19:16:38 2006
@@ -136,17 +136,13 @@
 struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
                            int fclone)
 {
+       struct skb_shared_info *shinfo;
        struct sk_buff *skb;
        u8 *data;
 
        /* Get the HEAD */
-       if (fclone)
-               skb = kmem_cache_alloc(skbuff_fclone_cache,
-                                      gfp_mask & ~__GFP_DMA);
-       else
-               skb = kmem_cache_alloc(skbuff_head_cache,
-                                      gfp_mask & ~__GFP_DMA);
-
+       skb = kmem_cache_alloc(fclone ? skbuff_fclone_cache : skbuff_head_cache,
+                               gfp_mask & ~__GFP_DMA);
        if (!skb)
                goto out;
 
@@ -163,6 +159,16 @@
        skb->data = data;
        skb->tail = data;
        skb->end  = data + size;
+       /* make sure we initialize shinfo sequentially */
+       shinfo = skb_shinfo(skb);
+       atomic_set(&shinfo->dataref, 1);
+       shinfo->nr_frags  = 0;
+       shinfo->tso_size = 0;
+       shinfo->tso_segs = 0;
+       shinfo->ufo_size = 0;
+       shinfo->ip6_frag_id = 0;
+       shinfo->frag_list = NULL;
+
        if (fclone) {
                struct sk_buff *child = skb + 1;
                atomic_t *fclone_ref = (atomic_t *) (child + 1);
@@ -172,20 +178,10 @@
 
                child->fclone = SKB_FCLONE_UNAVAILABLE;
        }
-       atomic_set(&(skb_shinfo(skb)->dataref), 1);
-       skb_shinfo(skb)->nr_frags  = 0;
-       skb_shinfo(skb)->tso_size = 0;
-       skb_shinfo(skb)->tso_segs = 0;
-       skb_shinfo(skb)->frag_list = NULL;
-       skb_shinfo(skb)->ufo_size = 0;
-       skb_shinfo(skb)->ip6_frag_id = 0;
 out:
        return skb;
 nodata:
-       if (fclone)
-               kmem_cache_free(skbuff_fclone_cache, skb);
-       else
-               kmem_cache_free(skbuff_head_cache, skb);
+       kmem_cache_free(fclone ? skbuff_fclone_cache : skbuff_head_cache, skb);
        skb = NULL;
        goto out;
 }
@@ -210,17 +206,13 @@
                                     gfp_t gfp_mask,
                                     int fclone)
 {
+       struct skb_shared_info *shinfo;
        struct sk_buff *skb;
        u8 *data;
 
        /* Get the HEAD */
-       if (fclone)
-               skb = kmem_cache_alloc(skbuff_fclone_cache,
-                                      gfp_mask & ~__GFP_DMA);
-       else
-               skb = kmem_cache_alloc(skbuff_head_cache,
-                                      gfp_mask & ~__GFP_DMA);
-
+       skb = kmem_cache_alloc(fclone ? skbuff_fclone_cache : skbuff_head_cache,
+                               gfp_mask & ~__GFP_DMA);
        if (!skb)
                goto out;
 
@@ -237,6 +229,16 @@
        skb->data = data;
        skb->tail = data;
        skb->end  = data + size;
+       /* make sure we initialize shinfo sequentially */
+       shinfo = skb_shinfo(skb);
+       atomic_set(&shinfo->dataref, 1);
+       shinfo->nr_frags  = 0;
+       shinfo->tso_size = 0;
+       shinfo->tso_segs = 0;
+       shinfo->ufo_size = 0;
+       shinfo->ip6_frag_id = 0;
+       shinfo->frag_list = NULL;
+
        if (fclone) {
                struct sk_buff *child = skb + 1;
                atomic_t *fclone_ref = (atomic_t *) (child + 1);
@@ -246,20 +248,10 @@
 
                child->fclone = SKB_FCLONE_UNAVAILABLE;
        }
-       atomic_set(&(skb_shinfo(skb)->dataref), 1);
-       skb_shinfo(skb)->nr_frags  = 0;
-       skb_shinfo(skb)->tso_size = 0;
-       skb_shinfo(skb)->tso_segs = 0;
-       skb_shinfo(skb)->frag_list = NULL;
-       skb_shinfo(skb)->ufo_size = 0;
-       skb_shinfo(skb)->ip6_frag_id = 0;
 out:
        return skb;
 nodata:
-       if (fclone)
-               kmem_cache_free(skbuff_fclone_cache, skb);
-       else
-               kmem_cache_free(skbuff_head_cache, skb);
+       kmem_cache_free(fclone ? skbuff_fclone_cache : skbuff_head_cache, skb);
        skb = NULL;
        goto out;
 }
@@ -820,8 +812,7 @@
                int end = offset + skb_shinfo(skb)->frags[i].size;
                if (end > len) {
                        if (skb_cloned(skb)) {
-                               if (!realloc)
-                                       BUG();
+                               BUG_ON(!realloc);
                                if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
                                        return -ENOMEM;
                        }
@@ -923,8 +914,7 @@
                struct sk_buff *insp = NULL;
 
                do {
-                       if (!list)
-                               BUG();
+                       BUG_ON(!list);
 
                        if (list->len <= eat) {
                                /* Eaten as whole. */
@@ -1228,8 +1218,7 @@
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
 
        return csum;
 }
@@ -1311,8 +1300,7 @@
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
        return csum;
 }
 
@@ -1326,8 +1314,7 @@
        else
                csstart = skb_headlen(skb);
 
-       if (csstart > skb_headlen(skb))
-               BUG();
+       BUG_ON(csstart > skb_headlen(skb));
 
        memcpy(to, skb->data, csstart);
 
diff -r da6297243495 -r 2494b4e00cbb 
patches/linux-2.6.16-rc1-git4/i386-mach-io-check-nmi.patch
--- /dev/null   Thu Feb  2 18:15:22 2006
+++ b/patches/linux-2.6.16-rc1-git4/i386-mach-io-check-nmi.patch        Thu Feb 
 2 19:16:38 2006
@@ -0,0 +1,45 @@
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/traps.c 
./arch/i386/kernel/traps.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/traps.c 2006-02-02 
17:39:29.000000000 +0000
++++ ./arch/i386/kernel/traps.c 2006-02-02 17:43:01.000000000 +0000
+@@ -564,18 +564,11 @@ static void mem_parity_error(unsigned ch
+ 
+ static void io_check_error(unsigned char reason, struct pt_regs * regs)
+ {
+-      unsigned long i;
+-
+       printk(KERN_EMERG "NMI: IOCK error (debug interrupt?)\n");
+       show_registers(regs);
+ 
+       /* Re-enable the IOCK line, wait for a few seconds */
+-      reason = (reason & 0xf) | 8;
+-      outb(reason, 0x61);
+-      i = 2000;
+-      while (--i) udelay(1000);
+-      reason &= ~8;
+-      outb(reason, 0x61);
++      clear_io_check_error(reason);
+ }
+ 
+ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
+diff -pruN 
../pristine-linux-2.6.16-rc1-git4/include/asm-i386/mach-default/mach_traps.h 
./include/asm-i386/mach-default/mach_traps.h
+--- 
../pristine-linux-2.6.16-rc1-git4/include/asm-i386/mach-default/mach_traps.h    
   2006-01-03 03:21:10.000000000 +0000
++++ ./include/asm-i386/mach-default/mach_traps.h       2006-02-02 
17:41:55.000000000 +0000
+@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
+       outb(reason, 0x61);
+ }
+ 
++static inline void clear_io_check_error(unsigned char reason)
++{
++      unsigned long i;
++
++      reason = (reason & 0xf) | 8;
++      outb(reason, 0x61);
++      i = 2000;
++      while (--i) udelay(1000);
++      reason &= ~8;
++      outb(reason, 0x61);
++}
++
+ static inline unsigned char get_nmi_reason(void)
+ {
+       return inb(0x61);
diff -r da6297243495 -r 2494b4e00cbb 
patches/linux-2.6.16-rc1-git4/net-csum.patch
--- /dev/null   Thu Feb  2 18:15:22 2006
+++ b/patches/linux-2.6.16-rc1-git4/net-csum.patch      Thu Feb  2 19:16:38 2006
@@ -0,0 +1,46 @@
+diff -pruN 
../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_tcp.c 
./net/ipv4/netfilter/ip_nat_proto_tcp.c
+--- ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_tcp.c    
2006-02-02 17:39:51.000000000 +0000
++++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c    2006-02-02 17:44:18.000000000 
+0000
+@@ -129,10 +129,16 @@ tcp_manip_pkt(struct sk_buff **pskb,
+       if (hdrsize < sizeof(*hdr))
+               return 1;
+ 
+-      hdr->check = ip_nat_cheat_check(~oldip, newip,
++      if ((*pskb)->proto_csum_blank) {
++              hdr->check = ip_nat_cheat_check(oldip, ~newip,
++                              ip_nat_cheat_check(oldport ^ 0xFFFF,
++                                      newport, hdr->check));
++      } else { 
++              hdr->check = ip_nat_cheat_check(~oldip, newip,
+                                       ip_nat_cheat_check(oldport ^ 0xFFFF,
+                                                          newport,
+                                                          hdr->check));
++      }
+       return 1;
+ }
+ 
+diff -pruN 
../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_udp.c 
./net/ipv4/netfilter/ip_nat_proto_udp.c
+--- ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_udp.c    
2006-02-02 17:39:51.000000000 +0000
++++ ./net/ipv4/netfilter/ip_nat_proto_udp.c    2006-02-02 17:44:18.000000000 
+0000
+@@ -113,11 +113,19 @@ udp_manip_pkt(struct sk_buff **pskb,
+               newport = tuple->dst.u.udp.port;
+               portptr = &hdr->dest;
+       }
+-      if (hdr->check) /* 0 is a special case meaning no checksum */
+-              hdr->check = ip_nat_cheat_check(~oldip, newip,
++      
++      if (hdr->check) { /* 0 is a special case meaning no checksum */
++              if ((*pskb)->proto_csum_blank) {
++                      hdr->check = ip_nat_cheat_check(oldip, ~newip, 
++                                      ip_nat_cheat_check(*portptr ^ 0xFFFF, 
++                                              newport, hdr->check));
++              } else {
++                      hdr->check = ip_nat_cheat_check(~oldip, newip,
+                                       ip_nat_cheat_check(*portptr ^ 0xFFFF,
+                                                          newport,
+                                                          hdr->check));
++              }
++      }
+       *portptr = newport;
+       return 1;
+ }
diff -r da6297243495 -r 2494b4e00cbb 
patches/linux-2.6.16-rc1-git4/pmd-shared.patch
--- /dev/null   Thu Feb  2 18:15:22 2006
+++ b/patches/linux-2.6.16-rc1-git4/pmd-shared.patch    Thu Feb  2 19:16:38 2006
@@ -0,0 +1,111 @@
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/mm/pageattr.c 
./arch/i386/mm/pageattr.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/mm/pageattr.c  2006-02-02 
17:39:29.000000000 +0000
++++ ./arch/i386/mm/pageattr.c  2006-02-02 17:45:14.000000000 +0000
+@@ -78,7 +78,7 @@ static void set_pmd_pte(pte_t *kpte, uns
+       unsigned long flags;
+ 
+       set_pte_atomic(kpte, pte);      /* change init_mm */
+-      if (PTRS_PER_PMD > 1)
++      if (HAVE_SHARED_KERNEL_PMD)
+               return;
+ 
+       spin_lock_irqsave(&pgd_lock, flags);
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/mm/pgtable.c 
./arch/i386/mm/pgtable.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/mm/pgtable.c   2006-01-03 
03:21:10.000000000 +0000
++++ ./arch/i386/mm/pgtable.c   2006-02-02 17:45:14.000000000 +0000
+@@ -215,9 +215,10 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
+               spin_lock_irqsave(&pgd_lock, flags);
+       }
+ 
+-      clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
+-                      swapper_pg_dir + USER_PTRS_PER_PGD,
+-                      KERNEL_PGD_PTRS);
++      if (PTRS_PER_PMD == 1 || HAVE_SHARED_KERNEL_PMD)
++              clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
++                              swapper_pg_dir + USER_PTRS_PER_PGD,
++                              KERNEL_PGD_PTRS);
+       if (PTRS_PER_PMD > 1)
+               return;
+ 
+@@ -249,6 +250,30 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+                       goto out_oom;
+               set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
+       }
++
++      if (!HAVE_SHARED_KERNEL_PMD) {
++              unsigned long flags;
++
++              for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
++                      pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
++                      if (!pmd)
++                              goto out_oom;
++                      set_pgd(&pgd[USER_PTRS_PER_PGD], __pgd(1 + __pa(pmd)));
++              }
++
++              spin_lock_irqsave(&pgd_lock, flags);
++              for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
++                      unsigned long v = (unsigned long)i << PGDIR_SHIFT;
++                      pgd_t *kpgd = pgd_offset_k(v);
++                      pud_t *kpud = pud_offset(kpgd, v);
++                      pmd_t *kpmd = pmd_offset(kpud, v);
++                      pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
++                      memcpy(pmd, kpmd, PAGE_SIZE);
++              }
++              pgd_list_add(pgd);
++              spin_unlock_irqrestore(&pgd_lock, flags);
++      }
++
+       return pgd;
+ 
+ out_oom:
+@@ -263,9 +288,23 @@ void pgd_free(pgd_t *pgd)
+       int i;
+ 
+       /* in the PAE case user pgd entries are overwritten before usage */
+-      if (PTRS_PER_PMD > 1)
+-              for (i = 0; i < USER_PTRS_PER_PGD; ++i)
+-                      kmem_cache_free(pmd_cache, (void 
*)__va(pgd_val(pgd[i])-1));
++      if (PTRS_PER_PMD > 1) {
++              for (i = 0; i < USER_PTRS_PER_PGD; ++i) {
++                      pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
++                      kmem_cache_free(pmd_cache, pmd);
++              }
++              if (!HAVE_SHARED_KERNEL_PMD) {
++                      unsigned long flags;
++                      spin_lock_irqsave(&pgd_lock, flags);
++                      pgd_list_del(pgd);
++                      spin_unlock_irqrestore(&pgd_lock, flags);
++                      for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
++                              pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
++                              memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
++                              kmem_cache_free(pmd_cache, pmd);
++                      }
++              }
++      }
+       /* in the non-PAE case, free_pgtables() clears user pgd entries */
+       kmem_cache_free(pgd_cache, pgd);
+ }
+diff -pruN 
../pristine-linux-2.6.16-rc1-git4/include/asm-i386/pgtable-2level-defs.h 
./include/asm-i386/pgtable-2level-defs.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/pgtable-2level-defs.h   
2006-01-03 03:21:10.000000000 +0000
++++ ./include/asm-i386/pgtable-2level-defs.h   2006-02-02 17:45:14.000000000 
+0000
+@@ -1,6 +1,8 @@
+ #ifndef _I386_PGTABLE_2LEVEL_DEFS_H
+ #define _I386_PGTABLE_2LEVEL_DEFS_H
+ 
++#define HAVE_SHARED_KERNEL_PMD 0
++
+ /*
+  * traditional i386 two-level paging structure:
+  */
+diff -pruN 
../pristine-linux-2.6.16-rc1-git4/include/asm-i386/pgtable-3level-defs.h 
./include/asm-i386/pgtable-3level-defs.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/pgtable-3level-defs.h   
2006-01-03 03:21:10.000000000 +0000
++++ ./include/asm-i386/pgtable-3level-defs.h   2006-02-02 17:45:14.000000000 
+0000
+@@ -1,6 +1,8 @@
+ #ifndef _I386_PGTABLE_3LEVEL_DEFS_H
+ #define _I386_PGTABLE_3LEVEL_DEFS_H
+ 
++#define HAVE_SHARED_KERNEL_PMD 1
++
+ /*
+  * PGDIR_SHIFT determines what a top-level page table entry can map
+  */
diff -r da6297243495 -r 2494b4e00cbb 
patches/linux-2.6.16-rc1-git4/smp-alts.patch
--- /dev/null   Thu Feb  2 18:15:22 2006
+++ b/patches/linux-2.6.16-rc1-git4/smp-alts.patch      Thu Feb  2 19:16:38 2006
@@ -0,0 +1,593 @@
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/Kconfig 
./arch/i386/Kconfig
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/Kconfig        2006-02-02 
17:39:28.000000000 +0000
++++ ./arch/i386/Kconfig        2006-02-02 17:45:59.000000000 +0000
+@@ -211,6 +211,19 @@ config SMP
+ 
+         If you don't know what to do here, say N.
+ 
++config SMP_ALTERNATIVES
++      bool "SMP alternatives support (EXPERIMENTAL)"
++      depends on SMP && EXPERIMENTAL
++      help
++        Try to reduce the overhead of running an SMP kernel on a uniprocessor
++        host slightly by replacing certain key instruction sequences
++        according to whether we currently have more than one CPU available.
++        This should provide a noticeable boost to performance when
++        running SMP kernels on UP machines, and have negligible impact
++        when running on an true SMP host.
++
++          If unsure, say N.
++        
+ config NR_CPUS
+       int "Maximum number of CPUs (2-255)"
+       range 2 255
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/Makefile 
./arch/i386/kernel/Makefile
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/Makefile        
2006-02-02 17:39:28.000000000 +0000
++++ ./arch/i386/kernel/Makefile        2006-02-02 17:45:59.000000000 +0000
+@@ -37,6 +37,7 @@ obj-$(CONFIG_EFI)            += efi.o efi_stub.o
+ obj-$(CONFIG_DOUBLEFAULT)     += doublefault.o
+ obj-$(CONFIG_VM86)            += vm86.o
+ obj-$(CONFIG_EARLY_PRINTK)    += early_printk.o
++obj-$(CONFIG_SMP_ALTERNATIVES)  += smpalts.o
+ 
+ EXTRA_AFLAGS   := -traditional
+ 
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/smpalts.c 
./arch/i386/kernel/smpalts.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/smpalts.c       
1970-01-01 01:00:00.000000000 +0100
++++ ./arch/i386/kernel/smpalts.c       2006-02-02 17:45:59.000000000 +0000
+@@ -0,0 +1,85 @@
++#include <linux/kernel.h>
++#include <asm/system.h>
++#include <asm/smp_alt.h>
++#include <asm/processor.h>
++#include <asm/string.h>
++
++struct smp_replacement_record {
++      unsigned char targ_size;
++      unsigned char smp1_size;
++      unsigned char smp2_size;
++      unsigned char up_size;
++      unsigned char feature;
++      unsigned char data[0];
++};
++
++struct smp_alternative_record {
++      void *targ_start;
++      struct smp_replacement_record *repl;
++};
++
++extern struct smp_alternative_record __start_smp_alternatives_table,
++  __stop_smp_alternatives_table;
++extern unsigned long __init_begin, __init_end;
++
++void prepare_for_smp(void)
++{
++      struct smp_alternative_record *r;
++      printk(KERN_INFO "Enabling SMP...\n");
++      for (r = &__start_smp_alternatives_table;
++           r != &__stop_smp_alternatives_table;
++           r++) {
++              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
++              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
++              BUG_ON(r->repl->targ_size < r->repl->up_size);
++               if (system_state == SYSTEM_RUNNING &&
++                   r->targ_start >= (void *)&__init_begin &&
++                   r->targ_start < (void *)&__init_end)
++                       continue;
++              if (r->repl->feature != (unsigned char)-1 &&
++                  boot_cpu_has(r->repl->feature)) {
++                      memcpy(r->targ_start,
++                             r->repl->data + r->repl->smp1_size,
++                             r->repl->smp2_size);
++                      memset(r->targ_start + r->repl->smp2_size,
++                             0x90,
++                             r->repl->targ_size - r->repl->smp2_size);
++              } else {
++                      memcpy(r->targ_start,
++                             r->repl->data,
++                             r->repl->smp1_size);
++                      memset(r->targ_start + r->repl->smp1_size,
++                             0x90,
++                             r->repl->targ_size - r->repl->smp1_size);
++              }
++      }
++      /* Paranoia */
++      asm volatile ("jmp 1f\n1:");
++      mb();
++}
++
++void unprepare_for_smp(void)
++{
++      struct smp_alternative_record *r;
++      printk(KERN_INFO "Disabling SMP...\n");
++      for (r = &__start_smp_alternatives_table;
++           r != &__stop_smp_alternatives_table;
++           r++) {
++              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
++              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
++              BUG_ON(r->repl->targ_size < r->repl->up_size);
++               if (system_state == SYSTEM_RUNNING &&
++                   r->targ_start >= (void *)&__init_begin &&
++                   r->targ_start < (void *)&__init_end)
++                       continue;
++              memcpy(r->targ_start,
++                     r->repl->data + r->repl->smp1_size + r->repl->smp2_size,
++                     r->repl->up_size);
++              memset(r->targ_start + r->repl->up_size,
++                     0x90,
++                     r->repl->targ_size - r->repl->up_size);
++      }
++      /* Paranoia */
++      asm volatile ("jmp 1f\n1:");
++      mb();
++}
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/smpboot.c 
./arch/i386/kernel/smpboot.c
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/smpboot.c       
2006-02-02 17:39:29.000000000 +0000
++++ ./arch/i386/kernel/smpboot.c       2006-02-02 17:45:59.000000000 +0000
+@@ -1218,6 +1218,11 @@ static void __init smp_boot_cpus(unsigne
+               if (max_cpus <= cpucount+1)
+                       continue;
+ 
++#ifdef CONFIG_SMP_ALTERNATIVES
++              if (kicked == 1)
++                      prepare_for_smp();
++#endif
++
+               if (((cpu = alloc_cpu_id()) <= 0) || do_boot_cpu(apicid, cpu))
+                       printk("CPU #%d not responding - cannot use it.\n",
+                                                               apicid);
+@@ -1396,6 +1401,11 @@ int __devinit __cpu_up(unsigned int cpu)
+               return -EIO;
+       }
+ 
++#ifdef CONFIG_SMP_ALTERNATIVES
++      if (num_online_cpus() == 1)
++              prepare_for_smp();
++#endif
++
+       local_irq_enable();
+       per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
+       /* Unleash the CPU! */
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/vmlinux.lds.S 
./arch/i386/kernel/vmlinux.lds.S
+--- ../pristine-linux-2.6.16-rc1-git4/arch/i386/kernel/vmlinux.lds.S   
2006-01-03 03:21:10.000000000 +0000
++++ ./arch/i386/kernel/vmlinux.lds.S   2006-02-02 17:45:59.000000000 +0000
+@@ -34,6 +34,13 @@ SECTIONS
+   __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) }
+   __stop___ex_table = .;
+ 
++  . = ALIGN(16);
++  __start_smp_alternatives_table = .;
++  __smp_alternatives : { *(__smp_alternatives) }
++  __stop_smp_alternatives_table = .;
++
++  __smp_replacements : { *(__smp_replacements) }
++
+   RODATA
+ 
+   /* writeable */
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/atomic.h 
./include/asm-i386/atomic.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/atomic.h        
2006-02-02 17:39:31.000000000 +0000
++++ ./include/asm-i386/atomic.h        2006-02-02 17:45:59.000000000 +0000
+@@ -4,18 +4,13 @@
+ #include <linux/config.h>
+ #include <linux/compiler.h>
+ #include <asm/processor.h>
++#include <asm/smp_alt.h>
+ 
+ /*
+  * Atomic operations that C can't guarantee us.  Useful for
+  * resource counting etc..
+  */
+ 
+-#ifdef CONFIG_SMP
+-#define LOCK "lock ; "
+-#else
+-#define LOCK ""
+-#endif
+-
+ /*
+  * Make sure gcc doesn't try to be clever and move things around
+  * on us. We need to use _exactly_ the address the user gave us,
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/bitops.h 
./include/asm-i386/bitops.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/bitops.h        
2006-02-02 17:39:31.000000000 +0000
++++ ./include/asm-i386/bitops.h        2006-02-02 17:45:59.000000000 +0000
+@@ -7,6 +7,7 @@
+ 
+ #include <linux/config.h>
+ #include <linux/compiler.h>
++#include <asm/smp_alt.h>
+ 
+ /*
+  * These have to be done with inline assembly: that way the bit-setting
+@@ -16,12 +17,6 @@
+  * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
+  */
+ 
+-#ifdef CONFIG_SMP
+-#define LOCK_PREFIX "lock ; "
+-#else
+-#define LOCK_PREFIX ""
+-#endif
+-
+ #define ADDR (*(volatile long *) addr)
+ 
+ /**
+@@ -41,7 +36,7 @@
+  */
+ static inline void set_bit(int nr, volatile unsigned long * addr)
+ {
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btsl %1,%0"
+               :"+m" (ADDR)
+               :"Ir" (nr));
+@@ -76,7 +71,7 @@ static inline void __set_bit(int nr, vol
+  */
+ static inline void clear_bit(int nr, volatile unsigned long * addr)
+ {
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btrl %1,%0"
+               :"+m" (ADDR)
+               :"Ir" (nr));
+@@ -121,7 +116,7 @@ static inline void __change_bit(int nr, 
+  */
+ static inline void change_bit(int nr, volatile unsigned long * addr)
+ {
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btcl %1,%0"
+               :"+m" (ADDR)
+               :"Ir" (nr));
+@@ -140,7 +135,7 @@ static inline int test_and_set_bit(int n
+ {
+       int oldbit;
+ 
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btsl %2,%1\n\tsbbl %0,%0"
+               :"=r" (oldbit),"+m" (ADDR)
+               :"Ir" (nr) : "memory");
+@@ -180,7 +175,7 @@ static inline int test_and_clear_bit(int
+ {
+       int oldbit;
+ 
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btrl %2,%1\n\tsbbl %0,%0"
+               :"=r" (oldbit),"+m" (ADDR)
+               :"Ir" (nr) : "memory");
+@@ -231,7 +226,7 @@ static inline int test_and_change_bit(in
+ {
+       int oldbit;
+ 
+-      __asm__ __volatile__( LOCK_PREFIX
++      __asm__ __volatile__( LOCK
+               "btcl %2,%1\n\tsbbl %0,%0"
+               :"=r" (oldbit),"+m" (ADDR)
+               :"Ir" (nr) : "memory");
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/futex.h 
./include/asm-i386/futex.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/futex.h 2006-02-02 
17:40:00.000000000 +0000
++++ ./include/asm-i386/futex.h 2006-02-02 17:45:59.000000000 +0000
+@@ -28,7 +28,7 @@
+ "1:   movl    %2, %0\n\
+       movl    %0, %3\n"                                       \
+       insn "\n"                                               \
+-"2:   " LOCK_PREFIX "cmpxchgl %3, %2\n\
++"2:   " LOCK "cmpxchgl %3, %2\n\
+       jnz     1b\n\
+ 3:    .section .fixup,\"ax\"\n\
+ 4:    mov     %5, %1\n\
+@@ -68,7 +68,7 @@ futex_atomic_op_inuser (int encoded_op, 
+ #endif
+               switch (op) {
+               case FUTEX_OP_ADD:
+-                      __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret,
++                      __futex_atomic_op1(LOCK "xaddl %0, %2", ret,
+                                          oldval, uaddr, oparg);
+                       break;
+               case FUTEX_OP_OR:
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/rwsem.h 
./include/asm-i386/rwsem.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/rwsem.h 2006-01-03 
03:21:10.000000000 +0000
++++ ./include/asm-i386/rwsem.h 2006-02-02 17:45:59.000000000 +0000
+@@ -40,6 +40,7 @@
+ 
+ #include <linux/list.h>
+ #include <linux/spinlock.h>
++#include <asm/smp_alt.h>
+ 
+ struct rwsem_waiter;
+ 
+@@ -99,7 +100,7 @@ static inline void __down_read(struct rw
+ {
+       __asm__ __volatile__(
+               "# beginning down_read\n\t"
+-LOCK_PREFIX   "  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old 
value */
++LOCK          "  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old 
value */
+               "  js        2f\n\t" /* jump if we weren't granted the lock */
+               "1:\n\t"
+               LOCK_SECTION_START("")
+@@ -130,7 +131,7 @@ static inline int __down_read_trylock(st
+               "  movl      %1,%2\n\t"
+               "  addl      %3,%2\n\t"
+               "  jle       2f\n\t"
+-LOCK_PREFIX   "  cmpxchgl  %2,%0\n\t"
++LOCK          "  cmpxchgl  %2,%0\n\t"
+               "  jnz       1b\n\t"
+               "2:\n\t"
+               "# ending __down_read_trylock\n\t"
+@@ -150,7 +151,7 @@ static inline void __down_write(struct r
+       tmp = RWSEM_ACTIVE_WRITE_BIAS;
+       __asm__ __volatile__(
+               "# beginning down_write\n\t"
+-LOCK_PREFIX   "  xadd      %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns 
the old value */
++LOCK          "  xadd      %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns 
the old value */
+               "  testl     %%edx,%%edx\n\t" /* was the count 0 before? */
+               "  jnz       2f\n\t" /* jump if we weren't granted the lock */
+               "1:\n\t"
+@@ -188,7 +189,7 @@ static inline void __up_read(struct rw_s
+       __s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
+       __asm__ __volatile__(
+               "# beginning __up_read\n\t"
+-LOCK_PREFIX   "  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old 
value */
++LOCK          "  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old 
value */
+               "  js        2f\n\t" /* jump if the lock is being waited upon */
+               "1:\n\t"
+               LOCK_SECTION_START("")
+@@ -214,7 +215,7 @@ static inline void __up_write(struct rw_
+       __asm__ __volatile__(
+               "# beginning __up_write\n\t"
+               "  movl      %2,%%edx\n\t"
+-LOCK_PREFIX   "  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 
0xffff0001 -> 0x00000000 */
++LOCK          "  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 
0xffff0001 -> 0x00000000 */
+               "  jnz       2f\n\t" /* jump if the lock is being waited upon */
+               "1:\n\t"
+               LOCK_SECTION_START("")
+@@ -239,7 +240,7 @@ static inline void __downgrade_write(str
+ {
+       __asm__ __volatile__(
+               "# beginning __downgrade_write\n\t"
+-LOCK_PREFIX   "  addl      %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 
0xYYYY0001 */
++LOCK          "  addl      %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 
0xYYYY0001 */
+               "  js        2f\n\t" /* jump if the lock is being waited upon */
+               "1:\n\t"
+               LOCK_SECTION_START("")
+@@ -263,7 +264,7 @@ LOCK_PREFIX        "  addl      %2,(%%eax)\n\t"
+ static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
+ {
+       __asm__ __volatile__(
+-LOCK_PREFIX   "addl %1,%0"
++LOCK            "addl %1,%0"
+               : "=m"(sem->count)
+               : "ir"(delta), "m"(sem->count));
+ }
+@@ -276,7 +277,7 @@ static inline int rwsem_atomic_update(in
+       int tmp = delta;
+ 
+       __asm__ __volatile__(
+-LOCK_PREFIX   "xadd %0,(%2)"
++LOCK                    "xadd %0,(%2)"
+               : "+r"(tmp), "=m"(sem->count)
+               : "r"(sem), "m"(sem->count)
+               : "memory");
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/smp_alt.h 
./include/asm-i386/smp_alt.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/smp_alt.h       
1970-01-01 01:00:00.000000000 +0100
++++ ./include/asm-i386/smp_alt.h       2006-02-02 17:45:59.000000000 +0000
+@@ -0,0 +1,32 @@
++#ifndef __ASM_SMP_ALT_H__
++#define __ASM_SMP_ALT_H__
++
++#include <linux/config.h>
++
++#ifdef CONFIG_SMP
++#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE)
++#define LOCK \
++        "6677: nop\n" \
++      ".section __smp_alternatives,\"a\"\n" \
++      ".long 6677b\n" \
++      ".long 6678f\n" \
++      ".previous\n" \
++      ".section __smp_replacements,\"a\"\n" \
++      "6678: .byte 1\n" \
++      ".byte 1\n" \
++      ".byte 0\n" \
++        ".byte 1\n" \
++      ".byte -1\n" \
++      "lock\n" \
++      "nop\n" \
++      ".previous\n"
++void prepare_for_smp(void);
++void unprepare_for_smp(void);
++#else
++#define LOCK "lock ; "
++#endif
++#else
++#define LOCK ""
++#endif
++
++#endif /* __ASM_SMP_ALT_H__ */
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/spinlock.h 
./include/asm-i386/spinlock.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/spinlock.h      
2006-01-03 03:21:10.000000000 +0000
++++ ./include/asm-i386/spinlock.h      2006-02-02 17:45:59.000000000 +0000
+@@ -6,6 +6,7 @@
+ #include <asm/page.h>
+ #include <linux/config.h>
+ #include <linux/compiler.h>
++#include <asm/smp_alt.h>
+ 
+ /*
+  * Your basic SMP spinlocks, allowing only a single CPU anywhere
+@@ -23,7 +24,8 @@
+ 
+ #define __raw_spin_lock_string \
+       "\n1:\t" \
+-      "lock ; decb %0\n\t" \
++      LOCK \
++      "decb %0\n\t" \
+       "jns 3f\n" \
+       "2:\t" \
+       "rep;nop\n\t" \
+@@ -34,7 +36,8 @@
+ 
+ #define __raw_spin_lock_string_flags \
+       "\n1:\t" \
+-      "lock ; decb %0\n\t" \
++      LOCK \
++      "decb %0\n\t" \
+       "jns 4f\n\t" \
+       "2:\t" \
+       "testl $0x200, %1\n\t" \
+@@ -65,10 +68,34 @@ static inline void __raw_spin_lock_flags
+ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
+ {
+       char oldval;
++#ifdef CONFIG_SMP_ALTERNATIVES
+       __asm__ __volatile__(
+-              "xchgb %b0,%1"
++              "1:movb %1,%b0\n"
++              "movb $0,%1\n"
++              "2:"
++              ".section __smp_alternatives,\"a\"\n"
++              ".long 1b\n"
++              ".long 3f\n"
++              ".previous\n"
++              ".section __smp_replacements,\"a\"\n"
++              "3: .byte 2b - 1b\n"
++              ".byte 5f-4f\n"
++              ".byte 0\n"
++              ".byte 6f-5f\n"
++              ".byte -1\n"
++              "4: xchgb %b0,%1\n"
++              "5: movb %1,%b0\n"
++              "movb $0,%1\n"
++              "6:\n"
++              ".previous\n"
+               :"=q" (oldval), "=m" (lock->slock)
+               :"0" (0) : "memory");
++#else
++      __asm__ __volatile__(
++              "xchgb %b0,%1\n"
++              :"=q" (oldval), "=m" (lock->slock)
++              :"0" (0) : "memory");
++#endif
+       return oldval > 0;
+ }
+ 
+@@ -178,12 +205,12 @@ static inline int __raw_write_trylock(ra
+ 
+ static inline void __raw_read_unlock(raw_rwlock_t *rw)
+ {
+-      asm volatile("lock ; incl %0" :"=m" (rw->lock) : : "memory");
++      asm volatile(LOCK "incl %0" :"=m" (rw->lock) : : "memory");
+ }
+ 
+ static inline void __raw_write_unlock(raw_rwlock_t *rw)
+ {
+-      asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ", %0"
++      asm volatile(LOCK "addl $" RW_LOCK_BIAS_STR ", %0"
+                                : "=m" (rw->lock) : : "memory");
+ }
+ 
+diff -pruN ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/system.h 
./include/asm-i386/system.h
+--- ../pristine-linux-2.6.16-rc1-git4/include/asm-i386/system.h        
2006-02-02 17:39:31.000000000 +0000
++++ ./include/asm-i386/system.h        2006-02-02 17:45:59.000000000 +0000
+@@ -5,7 +5,7 @@
+ #include <linux/kernel.h>
+ #include <asm/segment.h>
+ #include <asm/cpufeature.h>
+-#include <linux/bitops.h> /* for LOCK_PREFIX */
++#include <asm/smp_alt.h>
+ 
+ #ifdef __KERNEL__
+ 
+@@ -271,19 +271,19 @@ static inline unsigned long __cmpxchg(vo
+       unsigned long prev;
+       switch (size) {
+       case 1:
+-              __asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2"
++              __asm__ __volatile__(LOCK "cmpxchgb %b1,%2"
+                                    : "=a"(prev)
+                                    : "q"(new), "m"(*__xg(ptr)), "0"(old)
+                                    : "memory");
+               return prev;
+       case 2:
+-              __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2"
++              __asm__ __volatile__(LOCK "cmpxchgw %w1,%2"
+                                    : "=a"(prev)
+                                    : "r"(new), "m"(*__xg(ptr)), "0"(old)
+                                    : "memory");
+               return prev;
+       case 4:
+-              __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2"
++              __asm__ __volatile__(LOCK "cmpxchgl %1,%2"
+                                    : "=a"(prev)
+                                    : "r"(new), "m"(*__xg(ptr)), "0"(old)
+                                    : "memory");
+@@ -336,7 +336,7 @@ static inline unsigned long long __cmpxc
+                                     unsigned long long new)
+ {
+       unsigned long long prev;
+-      __asm__ __volatile__(LOCK_PREFIX "cmpxchg8b %3"
++      __asm__ __volatile__(LOCK "cmpxchg8b %3"
+                            : "=A"(prev)
+                            : "b"((unsigned long)new),
+                              "c"((unsigned long)(new >> 32)),
+@@ -503,11 +503,55 @@ struct alt_instr { 
+ #endif
+ 
+ #ifdef CONFIG_SMP
+-#define smp_mb()      mb()
+-#define smp_rmb()     rmb()
+ #define smp_wmb()     wmb()
+-#define smp_read_barrier_depends()    read_barrier_depends()
++#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE)
++#define smp_alt_mb(instr)                                           \
++__asm__ __volatile__("6667:\nnop\nnop\nnop\nnop\nnop\nnop\n6668:\n" \
++                   ".section __smp_alternatives,\"a\"\n"          \
++                   ".long 6667b\n"                                \
++                     ".long 6673f\n"                                \
++                   ".previous\n"                                  \
++                   ".section __smp_replacements,\"a\"\n"          \
++                   "6673:.byte 6668b-6667b\n"                     \
++                   ".byte 6670f-6669f\n"                          \
++                   ".byte 6671f-6670f\n"                          \
++                     ".byte 0\n"                                    \
++                   ".byte %c0\n"                                  \
++                   "6669:lock;addl $0,0(%%esp)\n"                 \
++                   "6670:" instr "\n"                             \
++                   "6671:\n"                                      \
++                   ".previous\n"                                  \
++                   :                                              \
++                   : "i" (X86_FEATURE_XMM2)                       \
++                   : "memory")
++#define smp_rmb() smp_alt_mb("lfence")
++#define smp_mb()  smp_alt_mb("mfence")
++#define set_mb(var, value) do {                                     \
++unsigned long __set_mb_temp;                                        \
++__asm__ __volatile__("6667:movl %1, %0\n6668:\n"                    \
++                   ".section __smp_alternatives,\"a\"\n"          \
++                   ".long 6667b\n"                                \
++                   ".long 6673f\n"                                \
++                   ".previous\n"                                  \
++                   ".section __smp_replacements,\"a\"\n"          \
++                   "6673: .byte 6668b-6667b\n"                    \
++                   ".byte 6670f-6669f\n"                          \
++                   ".byte 0\n"                                    \
++                   ".byte 6671f-6670f\n"                          \
++                   ".byte -1\n"                                   \
++                   "6669: xchg %1, %0\n"                          \
++                   "6670:movl %1, %0\n"                           \
++                   "6671:\n"                                      \
++                   ".previous\n"                                  \
++                   : "=m" (var), "=r" (__set_mb_temp)             \
++                   : "1" (value)                                  \
++                   : "memory"); } while (0)
++#else
++#define smp_rmb()     rmb()
++#define smp_mb()      mb()
+ #define set_mb(var, value) do { xchg(&var, value); } while (0)
++#endif
++#define smp_read_barrier_depends()    read_barrier_depends()
+ #else
+ #define smp_mb()      barrier()
+ #define smp_rmb()     barrier()
diff -r da6297243495 -r 2494b4e00cbb 
patches/linux-2.6.15/i386-mach-io-check-nmi.patch
--- a/patches/linux-2.6.15/i386-mach-io-check-nmi.patch Thu Feb  2 18:15:22 2006
+++ /dev/null   Thu Feb  2 19:16:38 2006
@@ -1,45 +0,0 @@
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/traps.c 
./arch/i386/kernel/traps.c
---- ../pristine-linux-2.6.15/arch/i386/kernel/traps.c  2006-01-03 
03:21:10.000000000 +0000
-+++ ./arch/i386/kernel/traps.c 2006-02-02 17:14:26.000000000 +0000
-@@ -533,18 +533,11 @@ static void mem_parity_error(unsigned ch
- 
- static void io_check_error(unsigned char reason, struct pt_regs * regs)
- {
--      unsigned long i;
--
-       printk("NMI: IOCK error (debug interrupt?)\n");
-       show_registers(regs);
- 
-       /* Re-enable the IOCK line, wait for a few seconds */
--      reason = (reason & 0xf) | 8;
--      outb(reason, 0x61);
--      i = 2000;
--      while (--i) udelay(1000);
--      reason &= ~8;
--      outb(reason, 0x61);
-+      clear_io_check_error(reason);
- }
- 
- static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/mach-default/mach_traps.h 
./include/asm-i386/mach-default/mach_traps.h
---- ../pristine-linux-2.6.15/include/asm-i386/mach-default/mach_traps.h        
2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/mach-default/mach_traps.h       2006-02-02 
17:14:26.000000000 +0000
-@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
-       outb(reason, 0x61);
- }
- 
-+static inline void clear_io_check_error(unsigned char reason)
-+{
-+      unsigned long i;
-+
-+      reason = (reason & 0xf) | 8;
-+      outb(reason, 0x61);
-+      i = 2000;
-+      while (--i) udelay(1000);
-+      reason &= ~8;
-+      outb(reason, 0x61);
-+}
-+
- static inline unsigned char get_nmi_reason(void)
- {
-       return inb(0x61);
diff -r da6297243495 -r 2494b4e00cbb patches/linux-2.6.15/net-csum.patch
--- a/patches/linux-2.6.15/net-csum.patch       Thu Feb  2 18:15:22 2006
+++ /dev/null   Thu Feb  2 19:16:38 2006
@@ -1,46 +0,0 @@
-diff -pruN ../pristine-linux-2.6.15/net/ipv4/netfilter/ip_nat_proto_tcp.c 
./net/ipv4/netfilter/ip_nat_proto_tcp.c
---- ../pristine-linux-2.6.15/net/ipv4/netfilter/ip_nat_proto_tcp.c     
2006-01-03 03:21:10.000000000 +0000
-+++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c    2006-02-02 17:14:59.000000000 
+0000
-@@ -129,10 +129,16 @@ tcp_manip_pkt(struct sk_buff **pskb,
-       if (hdrsize < sizeof(*hdr))
-               return 1;
- 
--      hdr->check = ip_nat_cheat_check(~oldip, newip,
-+      if ((*pskb)->proto_csum_blank) {
-+              hdr->check = ip_nat_cheat_check(oldip, ~newip,
-+                              ip_nat_cheat_check(oldport ^ 0xFFFF,
-+                                      newport, hdr->check));
-+      } else { 
-+              hdr->check = ip_nat_cheat_check(~oldip, newip,
-                                       ip_nat_cheat_check(oldport ^ 0xFFFF,
-                                                          newport,
-                                                          hdr->check));
-+      }
-       return 1;
- }
- 
-diff -pruN ../pristine-linux-2.6.15/net/ipv4/netfilter/ip_nat_proto_udp.c 
./net/ipv4/netfilter/ip_nat_proto_udp.c
---- ../pristine-linux-2.6.15/net/ipv4/netfilter/ip_nat_proto_udp.c     
2006-01-03 03:21:10.000000000 +0000
-+++ ./net/ipv4/netfilter/ip_nat_proto_udp.c    2006-02-02 17:14:59.000000000 
+0000
-@@ -113,11 +113,19 @@ udp_manip_pkt(struct sk_buff **pskb,
-               newport = tuple->dst.u.udp.port;
-               portptr = &hdr->dest;
-       }
--      if (hdr->check) /* 0 is a special case meaning no checksum */
--              hdr->check = ip_nat_cheat_check(~oldip, newip,
-+      
-+      if (hdr->check) { /* 0 is a special case meaning no checksum */
-+              if ((*pskb)->proto_csum_blank) {
-+                      hdr->check = ip_nat_cheat_check(oldip, ~newip, 
-+                                      ip_nat_cheat_check(*portptr ^ 0xFFFF, 
-+                                              newport, hdr->check));
-+              } else {
-+                      hdr->check = ip_nat_cheat_check(~oldip, newip,
-                                       ip_nat_cheat_check(*portptr ^ 0xFFFF,
-                                                          newport,
-                                                          hdr->check));
-+              }
-+      }
-       *portptr = newport;
-       return 1;
- }
diff -r da6297243495 -r 2494b4e00cbb patches/linux-2.6.15/pmd-shared.patch
--- a/patches/linux-2.6.15/pmd-shared.patch     Thu Feb  2 18:15:22 2006
+++ /dev/null   Thu Feb  2 19:16:38 2006
@@ -1,111 +0,0 @@
-diff -pruN ../pristine-linux-2.6.15/arch/i386/mm/pageattr.c 
./arch/i386/mm/pageattr.c
---- ../pristine-linux-2.6.15/arch/i386/mm/pageattr.c   2006-01-03 
03:21:10.000000000 +0000
-+++ ./arch/i386/mm/pageattr.c  2006-02-02 17:15:14.000000000 +0000
-@@ -76,7 +76,7 @@ static void set_pmd_pte(pte_t *kpte, uns
-       unsigned long flags;
- 
-       set_pte_atomic(kpte, pte);      /* change init_mm */
--      if (PTRS_PER_PMD > 1)
-+      if (HAVE_SHARED_KERNEL_PMD)
-               return;
- 
-       spin_lock_irqsave(&pgd_lock, flags);
-diff -pruN ../pristine-linux-2.6.15/arch/i386/mm/pgtable.c 
./arch/i386/mm/pgtable.c
---- ../pristine-linux-2.6.15/arch/i386/mm/pgtable.c    2006-01-03 
03:21:10.000000000 +0000
-+++ ./arch/i386/mm/pgtable.c   2006-02-02 17:15:14.000000000 +0000
-@@ -215,9 +215,10 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
-               spin_lock_irqsave(&pgd_lock, flags);
-       }
- 
--      clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
--                      swapper_pg_dir + USER_PTRS_PER_PGD,
--                      KERNEL_PGD_PTRS);
-+      if (PTRS_PER_PMD == 1 || HAVE_SHARED_KERNEL_PMD)
-+              clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD,
-+                              swapper_pg_dir + USER_PTRS_PER_PGD,
-+                              KERNEL_PGD_PTRS);
-       if (PTRS_PER_PMD > 1)
-               return;
- 
-@@ -249,6 +250,30 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
-                       goto out_oom;
-               set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
-       }
-+
-+      if (!HAVE_SHARED_KERNEL_PMD) {
-+              unsigned long flags;
-+
-+              for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
-+                      pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
-+                      if (!pmd)
-+                              goto out_oom;
-+                      set_pgd(&pgd[USER_PTRS_PER_PGD], __pgd(1 + __pa(pmd)));
-+              }
-+
-+              spin_lock_irqsave(&pgd_lock, flags);
-+              for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
-+                      unsigned long v = (unsigned long)i << PGDIR_SHIFT;
-+                      pgd_t *kpgd = pgd_offset_k(v);
-+                      pud_t *kpud = pud_offset(kpgd, v);
-+                      pmd_t *kpmd = pmd_offset(kpud, v);
-+                      pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
-+                      memcpy(pmd, kpmd, PAGE_SIZE);
-+              }
-+              pgd_list_add(pgd);
-+              spin_unlock_irqrestore(&pgd_lock, flags);
-+      }
-+
-       return pgd;
- 
- out_oom:
-@@ -263,9 +288,23 @@ void pgd_free(pgd_t *pgd)
-       int i;
- 
-       /* in the PAE case user pgd entries are overwritten before usage */
--      if (PTRS_PER_PMD > 1)
--              for (i = 0; i < USER_PTRS_PER_PGD; ++i)
--                      kmem_cache_free(pmd_cache, (void 
*)__va(pgd_val(pgd[i])-1));
-+      if (PTRS_PER_PMD > 1) {
-+              for (i = 0; i < USER_PTRS_PER_PGD; ++i) {
-+                      pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
-+                      kmem_cache_free(pmd_cache, pmd);
-+              }
-+              if (!HAVE_SHARED_KERNEL_PMD) {
-+                      unsigned long flags;
-+                      spin_lock_irqsave(&pgd_lock, flags);
-+                      pgd_list_del(pgd);
-+                      spin_unlock_irqrestore(&pgd_lock, flags);
-+                      for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++) {
-+                              pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
-+                              memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
-+                              kmem_cache_free(pmd_cache, pmd);
-+                      }
-+              }
-+      }
-       /* in the non-PAE case, free_pgtables() clears user pgd entries */
-       kmem_cache_free(pgd_cache, pgd);
- }
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/pgtable-2level-defs.h 
./include/asm-i386/pgtable-2level-defs.h
---- ../pristine-linux-2.6.15/include/asm-i386/pgtable-2level-defs.h    
2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/pgtable-2level-defs.h   2006-02-02 17:15:14.000000000 
+0000
-@@ -1,6 +1,8 @@
- #ifndef _I386_PGTABLE_2LEVEL_DEFS_H
- #define _I386_PGTABLE_2LEVEL_DEFS_H
- 
-+#define HAVE_SHARED_KERNEL_PMD 0
-+
- /*
-  * traditional i386 two-level paging structure:
-  */
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/pgtable-3level-defs.h 
./include/asm-i386/pgtable-3level-defs.h
---- ../pristine-linux-2.6.15/include/asm-i386/pgtable-3level-defs.h    
2006-01-03 03:21:10.000000000 +0000
-+++ ./include/asm-i386/pgtable-3level-defs.h   2006-02-02 17:15:14.000000000 
+0000
-@@ -1,6 +1,8 @@
- #ifndef _I386_PGTABLE_3LEVEL_DEFS_H
- #define _I386_PGTABLE_3LEVEL_DEFS_H
- 
-+#define HAVE_SHARED_KERNEL_PMD 1
-+
- /*
-  * PGDIR_SHIFT determines what a top-level page table entry can map
-  */
diff -r da6297243495 -r 2494b4e00cbb patches/linux-2.6.15/smp-alts.patch
--- a/patches/linux-2.6.15/smp-alts.patch       Thu Feb  2 18:15:22 2006
+++ /dev/null   Thu Feb  2 19:16:38 2006
@@ -1,593 +0,0 @@
-diff -pruN ../pristine-linux-2.6.15/arch/i386/Kconfig ./arch/i386/Kconfig
---- ../pristine-linux-2.6.15/arch/i386/Kconfig 2006-01-03 03:21:10.000000000 
+0000
-+++ ./arch/i386/Kconfig        2006-02-02 17:09:58.000000000 +0000
-@@ -202,6 +202,19 @@ config SMP
- 
-         If you don't know what to do here, say N.
- 
-+config SMP_ALTERNATIVES
-+      bool "SMP alternatives support (EXPERIMENTAL)"
-+      depends on SMP && EXPERIMENTAL
-+      help
-+        Try to reduce the overhead of running an SMP kernel on a uniprocessor
-+        host slightly by replacing certain key instruction sequences
-+        according to whether we currently have more than one CPU available.
-+        This should provide a noticeable boost to performance when
-+        running SMP kernels on UP machines, and have negligible impact
-+        when running on an true SMP host.
-+
-+          If unsure, say N.
-+        
- config NR_CPUS
-       int "Maximum number of CPUs (2-255)"
-       range 2 255
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/Makefile 
./arch/i386/kernel/Makefile
---- ../pristine-linux-2.6.15/arch/i386/kernel/Makefile 2006-01-03 
03:21:10.000000000 +0000
-+++ ./arch/i386/kernel/Makefile        2006-02-02 17:09:58.000000000 +0000
-@@ -34,6 +34,7 @@ obj-$(CONFIG_ACPI_SRAT)      += srat.o
- obj-$(CONFIG_HPET_TIMER)      += time_hpet.o
- obj-$(CONFIG_EFI)             += efi.o efi_stub.o
- obj-$(CONFIG_EARLY_PRINTK)    += early_printk.o
-+obj-$(CONFIG_SMP_ALTERNATIVES)  += smpalts.o
- 
- EXTRA_AFLAGS   := -traditional
- 
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/smpalts.c 
./arch/i386/kernel/smpalts.c
---- ../pristine-linux-2.6.15/arch/i386/kernel/smpalts.c        1970-01-01 
01:00:00.000000000 +0100
-+++ ./arch/i386/kernel/smpalts.c       2006-02-02 17:09:58.000000000 +0000
-@@ -0,0 +1,85 @@
-+#include <linux/kernel.h>
-+#include <asm/system.h>
-+#include <asm/smp_alt.h>
-+#include <asm/processor.h>
-+#include <asm/string.h>
-+
-+struct smp_replacement_record {
-+      unsigned char targ_size;
-+      unsigned char smp1_size;
-+      unsigned char smp2_size;
-+      unsigned char up_size;
-+      unsigned char feature;
-+      unsigned char data[0];
-+};
-+
-+struct smp_alternative_record {
-+      void *targ_start;
-+      struct smp_replacement_record *repl;
-+};
-+
-+extern struct smp_alternative_record __start_smp_alternatives_table,
-+  __stop_smp_alternatives_table;
-+extern unsigned long __init_begin, __init_end;
-+
-+void prepare_for_smp(void)
-+{
-+      struct smp_alternative_record *r;
-+      printk(KERN_INFO "Enabling SMP...\n");
-+      for (r = &__start_smp_alternatives_table;
-+           r != &__stop_smp_alternatives_table;
-+           r++) {
-+              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
-+              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
-+              BUG_ON(r->repl->targ_size < r->repl->up_size);
-+               if (system_state == SYSTEM_RUNNING &&
-+                   r->targ_start >= (void *)&__init_begin &&
-+                   r->targ_start < (void *)&__init_end)
-+                       continue;
-+              if (r->repl->feature != (unsigned char)-1 &&
-+                  boot_cpu_has(r->repl->feature)) {
-+                      memcpy(r->targ_start,
-+                             r->repl->data + r->repl->smp1_size,
-+                             r->repl->smp2_size);
-+                      memset(r->targ_start + r->repl->smp2_size,
-+                             0x90,
-+                             r->repl->targ_size - r->repl->smp2_size);
-+              } else {
-+                      memcpy(r->targ_start,
-+                             r->repl->data,
-+                             r->repl->smp1_size);
-+                      memset(r->targ_start + r->repl->smp1_size,
-+                             0x90,
-+                             r->repl->targ_size - r->repl->smp1_size);
-+              }
-+      }
-+      /* Paranoia */
-+      asm volatile ("jmp 1f\n1:");
-+      mb();
-+}
-+
-+void unprepare_for_smp(void)
-+{
-+      struct smp_alternative_record *r;
-+      printk(KERN_INFO "Disabling SMP...\n");
-+      for (r = &__start_smp_alternatives_table;
-+           r != &__stop_smp_alternatives_table;
-+           r++) {
-+              BUG_ON(r->repl->targ_size < r->repl->smp1_size);
-+              BUG_ON(r->repl->targ_size < r->repl->smp2_size);
-+              BUG_ON(r->repl->targ_size < r->repl->up_size);
-+               if (system_state == SYSTEM_RUNNING &&
-+                   r->targ_start >= (void *)&__init_begin &&
-+                   r->targ_start < (void *)&__init_end)
-+                       continue;
-+              memcpy(r->targ_start,
-+                     r->repl->data + r->repl->smp1_size + r->repl->smp2_size,
-+                     r->repl->up_size);
-+              memset(r->targ_start + r->repl->up_size,
-+                     0x90,
-+                     r->repl->targ_size - r->repl->up_size);
-+      }
-+      /* Paranoia */
-+      asm volatile ("jmp 1f\n1:");
-+      mb();
-+}
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/smpboot.c 
./arch/i386/kernel/smpboot.c
---- ../pristine-linux-2.6.15/arch/i386/kernel/smpboot.c        2006-01-03 
03:21:10.000000000 +0000
-+++ ./arch/i386/kernel/smpboot.c       2006-02-02 17:09:58.000000000 +0000
-@@ -1212,6 +1212,11 @@ static void __init smp_boot_cpus(unsigne
-               if (max_cpus <= cpucount+1)
-                       continue;
- 
-+#ifdef CONFIG_SMP_ALTERNATIVES
-+              if (kicked == 1)
-+                      prepare_for_smp();
-+#endif
-+
-               if (((cpu = alloc_cpu_id()) <= 0) || do_boot_cpu(apicid, cpu))
-                       printk("CPU #%d not responding - cannot use it.\n",
-                                                               apicid);
-@@ -1390,6 +1395,11 @@ int __devinit __cpu_up(unsigned int cpu)
-               return -EIO;
-       }
- 
-+#ifdef CONFIG_SMP_ALTERNATIVES
-+      if (num_online_cpus() == 1)
-+              prepare_for_smp();
-+#endif
-+
-       local_irq_enable();
-       per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
-       /* Unleash the CPU! */
-diff -pruN ../pristine-linux-2.6.15/arch/i386/kernel/vmlinux.lds.S 
./arch/i386/kernel/vmlinux.lds.S
---- ../pristine-linux-2.6.15/arch/i386/kernel/vmlinux.lds.S    2006-01-03 
03:21:10.000000000 +0000
-+++ ./arch/i386/kernel/vmlinux.lds.S   2006-02-02 17:09:58.000000000 +0000
-@@ -34,6 +34,13 @@ SECTIONS
-   __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) { *(__ex_table) }
-   __stop___ex_table = .;
- 
-+  . = ALIGN(16);
-+  __start_smp_alternatives_table = .;
-+  __smp_alternatives : { *(__smp_alternatives) }
-+  __stop_smp_alternatives_table = .;
-+
-+  __smp_replacements : { *(__smp_replacements) }
-+
-   RODATA
- 
-   /* writeable */
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/atomic.h 
./include/asm-i386/atomic.h
---- ../pristine-linux-2.6.15/include/asm-i386/atomic.h 2006-01-03 
03:21:10.000000000 +0000
-+++ ./include/asm-i386/atomic.h        2006-02-02 17:09:58.000000000 +0000
-@@ -4,18 +4,13 @@
- #include <linux/config.h>
- #include <linux/compiler.h>
- #include <asm/processor.h>
-+#include <asm/smp_alt.h>
- 
- /*
-  * Atomic operations that C can't guarantee us.  Useful for
-  * resource counting etc..
-  */
- 
--#ifdef CONFIG_SMP
--#define LOCK "lock ; "
--#else
--#define LOCK ""
--#endif
--
- /*
-  * Make sure gcc doesn't try to be clever and move things around
-  * on us. We need to use _exactly_ the address the user gave us,
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/bitops.h 
./include/asm-i386/bitops.h
---- ../pristine-linux-2.6.15/include/asm-i386/bitops.h 2006-01-03 
03:21:10.000000000 +0000
-+++ ./include/asm-i386/bitops.h        2006-02-02 17:09:58.000000000 +0000
-@@ -7,6 +7,7 @@
- 
- #include <linux/config.h>
- #include <linux/compiler.h>
-+#include <asm/smp_alt.h>
- 
- /*
-  * These have to be done with inline assembly: that way the bit-setting
-@@ -16,12 +17,6 @@
-  * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
-  */
- 
--#ifdef CONFIG_SMP
--#define LOCK_PREFIX "lock ; "
--#else
--#define LOCK_PREFIX ""
--#endif
--
- #define ADDR (*(volatile long *) addr)
- 
- /**
-@@ -41,7 +36,7 @@
-  */
- static inline void set_bit(int nr, volatile unsigned long * addr)
- {
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btsl %1,%0"
-               :"=m" (ADDR)
-               :"Ir" (nr));
-@@ -76,7 +71,7 @@ static inline void __set_bit(int nr, vol
-  */
- static inline void clear_bit(int nr, volatile unsigned long * addr)
- {
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btrl %1,%0"
-               :"=m" (ADDR)
-               :"Ir" (nr));
-@@ -121,7 +116,7 @@ static inline void __change_bit(int nr, 
-  */
- static inline void change_bit(int nr, volatile unsigned long * addr)
- {
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btcl %1,%0"
-               :"=m" (ADDR)
-               :"Ir" (nr));
-@@ -140,7 +135,7 @@ static inline int test_and_set_bit(int n
- {
-       int oldbit;
- 
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btsl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
-               :"Ir" (nr) : "memory");
-@@ -180,7 +175,7 @@ static inline int test_and_clear_bit(int
- {
-       int oldbit;
- 
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btrl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
-               :"Ir" (nr) : "memory");
-@@ -231,7 +226,7 @@ static inline int test_and_change_bit(in
- {
-       int oldbit;
- 
--      __asm__ __volatile__( LOCK_PREFIX
-+      __asm__ __volatile__( LOCK
-               "btcl %2,%1\n\tsbbl %0,%0"
-               :"=r" (oldbit),"=m" (ADDR)
-               :"Ir" (nr) : "memory");
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/futex.h 
./include/asm-i386/futex.h
---- ../pristine-linux-2.6.15/include/asm-i386/futex.h  2006-01-03 
03:21:10.000000000 +0000
-+++ ./include/asm-i386/futex.h 2006-02-02 17:12:29.000000000 +0000
-@@ -28,7 +28,7 @@
- "1:   movl    %2, %0\n\
-       movl    %0, %3\n"                                       \
-       insn "\n"                                               \
--"2:   " LOCK_PREFIX "cmpxchgl %3, %2\n\
-+"2:   " LOCK "cmpxchgl %3, %2\n\
-       jnz     1b\n\
- 3:    .section .fixup,\"ax\"\n\
- 4:    mov     %5, %1\n\
-@@ -68,7 +68,7 @@ futex_atomic_op_inuser (int encoded_op, 
- #endif
-               switch (op) {
-               case FUTEX_OP_ADD:
--                      __futex_atomic_op1(LOCK_PREFIX "xaddl %0, %2", ret,
-+                      __futex_atomic_op1(LOCK "xaddl %0, %2", ret,
-                                          oldval, uaddr, oparg);
-                       break;
-               case FUTEX_OP_OR:
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/rwsem.h 
./include/asm-i386/rwsem.h
---- ../pristine-linux-2.6.15/include/asm-i386/rwsem.h  2006-01-03 
03:21:10.000000000 +0000
-+++ ./include/asm-i386/rwsem.h 2006-02-02 17:09:58.000000000 +0000
-@@ -40,6 +40,7 @@
- 
- #include <linux/list.h>
- #include <linux/spinlock.h>
-+#include <asm/smp_alt.h>
- 
- struct rwsem_waiter;
- 
-@@ -99,7 +100,7 @@ static inline void __down_read(struct rw
- {
-       __asm__ __volatile__(
-               "# beginning down_read\n\t"
--LOCK_PREFIX   "  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old 
value */
-+LOCK          "  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old 
value */
-               "  js        2f\n\t" /* jump if we weren't granted the lock */
-               "1:\n\t"
-               LOCK_SECTION_START("")
-@@ -130,7 +131,7 @@ static inline int __down_read_trylock(st
-               "  movl      %1,%2\n\t"
-               "  addl      %3,%2\n\t"
-               "  jle       2f\n\t"
--LOCK_PREFIX   "  cmpxchgl  %2,%0\n\t"
-+LOCK          "  cmpxchgl  %2,%0\n\t"
-               "  jnz       1b\n\t"
-               "2:\n\t"
-               "# ending __down_read_trylock\n\t"
-@@ -150,7 +151,7 @@ static inline void __down_write(struct r
-       tmp = RWSEM_ACTIVE_WRITE_BIAS;
-       __asm__ __volatile__(
-               "# beginning down_write\n\t"
--LOCK_PREFIX   "  xadd      %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns 
the old value */
-+LOCK          "  xadd      %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns 
the old value */
-               "  testl     %%edx,%%edx\n\t" /* was the count 0 before? */
-               "  jnz       2f\n\t" /* jump if we weren't granted the lock */
-               "1:\n\t"
-@@ -188,7 +189,7 @@ static inline void __up_read(struct rw_s
-       __s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
-       __asm__ __volatile__(
-               "# beginning __up_read\n\t"
--LOCK_PREFIX   "  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old 
value */
-+LOCK          "  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old 
value */
-               "  js        2f\n\t" /* jump if the lock is being waited upon */
-               "1:\n\t"
-               LOCK_SECTION_START("")
-@@ -214,7 +215,7 @@ static inline void __up_write(struct rw_
-       __asm__ __volatile__(
-               "# beginning __up_write\n\t"
-               "  movl      %2,%%edx\n\t"
--LOCK_PREFIX   "  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 
0xffff0001 -> 0x00000000 */
-+LOCK          "  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 
0xffff0001 -> 0x00000000 */
-               "  jnz       2f\n\t" /* jump if the lock is being waited upon */
-               "1:\n\t"
-               LOCK_SECTION_START("")
-@@ -239,7 +240,7 @@ static inline void __downgrade_write(str
- {
-       __asm__ __volatile__(
-               "# beginning __downgrade_write\n\t"
--LOCK_PREFIX   "  addl      %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 
0xYYYY0001 */
-+LOCK          "  addl      %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 
0xYYYY0001 */
-               "  js        2f\n\t" /* jump if the lock is being waited upon */
-               "1:\n\t"
-               LOCK_SECTION_START("")
-@@ -263,7 +264,7 @@ LOCK_PREFIX        "  addl      %2,(%%eax)\n\t"
- static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
- {
-       __asm__ __volatile__(
--LOCK_PREFIX   "addl %1,%0"
-+LOCK            "addl %1,%0"
-               : "=m"(sem->count)
-               : "ir"(delta), "m"(sem->count));
- }
-@@ -276,7 +277,7 @@ static inline int rwsem_atomic_update(in
-       int tmp = delta;
- 
-       __asm__ __volatile__(
--LOCK_PREFIX   "xadd %0,(%2)"
-+LOCK                    "xadd %0,(%2)"
-               : "+r"(tmp), "=m"(sem->count)
-               : "r"(sem), "m"(sem->count)
-               : "memory");
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/smp_alt.h 
./include/asm-i386/smp_alt.h
---- ../pristine-linux-2.6.15/include/asm-i386/smp_alt.h        1970-01-01 
01:00:00.000000000 +0100
-+++ ./include/asm-i386/smp_alt.h       2006-02-02 17:09:58.000000000 +0000
-@@ -0,0 +1,32 @@
-+#ifndef __ASM_SMP_ALT_H__
-+#define __ASM_SMP_ALT_H__
-+
-+#include <linux/config.h>
-+
-+#ifdef CONFIG_SMP
-+#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE)
-+#define LOCK \
-+        "6677: nop\n" \
-+      ".section __smp_alternatives,\"a\"\n" \
-+      ".long 6677b\n" \
-+      ".long 6678f\n" \
-+      ".previous\n" \
-+      ".section __smp_replacements,\"a\"\n" \
-+      "6678: .byte 1\n" \
-+      ".byte 1\n" \
-+      ".byte 0\n" \
-+        ".byte 1\n" \
-+      ".byte -1\n" \
-+      "lock\n" \
-+      "nop\n" \
-+      ".previous\n"
-+void prepare_for_smp(void);
-+void unprepare_for_smp(void);
-+#else
-+#define LOCK "lock ; "
-+#endif
-+#else
-+#define LOCK ""
-+#endif
-+
-+#endif /* __ASM_SMP_ALT_H__ */
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/spinlock.h 
./include/asm-i386/spinlock.h
---- ../pristine-linux-2.6.15/include/asm-i386/spinlock.h       2006-01-03 
03:21:10.000000000 +0000
-+++ ./include/asm-i386/spinlock.h      2006-02-02 17:09:58.000000000 +0000
-@@ -6,6 +6,7 @@
- #include <asm/page.h>
- #include <linux/config.h>
- #include <linux/compiler.h>
-+#include <asm/smp_alt.h>
- 
- /*
-  * Your basic SMP spinlocks, allowing only a single CPU anywhere
-@@ -23,7 +24,8 @@
- 
- #define __raw_spin_lock_string \
-       "\n1:\t" \
--      "lock ; decb %0\n\t" \
-+      LOCK \
-+      "decb %0\n\t" \
-       "jns 3f\n" \
-       "2:\t" \
-       "rep;nop\n\t" \
-@@ -34,7 +36,8 @@
- 
- #define __raw_spin_lock_string_flags \
-       "\n1:\t" \
--      "lock ; decb %0\n\t" \
-+      LOCK \
-+      "decb %0\n\t" \
-       "jns 4f\n\t" \
-       "2:\t" \
-       "testl $0x200, %1\n\t" \
-@@ -65,10 +68,34 @@ static inline void __raw_spin_lock_flags
- static inline int __raw_spin_trylock(raw_spinlock_t *lock)
- {
-       char oldval;
-+#ifdef CONFIG_SMP_ALTERNATIVES
-       __asm__ __volatile__(
--              "xchgb %b0,%1"
-+              "1:movb %1,%b0\n"
-+              "movb $0,%1\n"
-+              "2:"
-+              ".section __smp_alternatives,\"a\"\n"
-+              ".long 1b\n"
-+              ".long 3f\n"
-+              ".previous\n"
-+              ".section __smp_replacements,\"a\"\n"
-+              "3: .byte 2b - 1b\n"
-+              ".byte 5f-4f\n"
-+              ".byte 0\n"
-+              ".byte 6f-5f\n"
-+              ".byte -1\n"
-+              "4: xchgb %b0,%1\n"
-+              "5: movb %1,%b0\n"
-+              "movb $0,%1\n"
-+              "6:\n"
-+              ".previous\n"
-               :"=q" (oldval), "=m" (lock->slock)
-               :"0" (0) : "memory");
-+#else
-+      __asm__ __volatile__(
-+              "xchgb %b0,%1\n"
-+              :"=q" (oldval), "=m" (lock->slock)
-+              :"0" (0) : "memory");
-+#endif
-       return oldval > 0;
- }
- 
-@@ -178,12 +205,12 @@ static inline int __raw_write_trylock(ra
- 
- static inline void __raw_read_unlock(raw_rwlock_t *rw)
- {
--      asm volatile("lock ; incl %0" :"=m" (rw->lock) : : "memory");
-+      asm volatile(LOCK "incl %0" :"=m" (rw->lock) : : "memory");
- }
- 
- static inline void __raw_write_unlock(raw_rwlock_t *rw)
- {
--      asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ", %0"
-+      asm volatile(LOCK "addl $" RW_LOCK_BIAS_STR ", %0"
-                                : "=m" (rw->lock) : : "memory");
- }
- 
-diff -pruN ../pristine-linux-2.6.15/include/asm-i386/system.h 
./include/asm-i386/system.h
---- ../pristine-linux-2.6.15/include/asm-i386/system.h 2006-01-03 
03:21:10.000000000 +0000
-+++ ./include/asm-i386/system.h        2006-02-02 17:10:47.000000000 +0000
-@@ -5,7 +5,7 @@
- #include <linux/kernel.h>
- #include <asm/segment.h>
- #include <asm/cpufeature.h>
--#include <linux/bitops.h> /* for LOCK_PREFIX */
-+#include <asm/smp_alt.h>
- 
- #ifdef __KERNEL__
- 
-@@ -274,19 +274,19 @@ static inline unsigned long __cmpxchg(vo
-       unsigned long prev;
-       switch (size) {
-       case 1:
--              __asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2"
-+              __asm__ __volatile__(LOCK "cmpxchgb %b1,%2"
-                                    : "=a"(prev)
-                                    : "q"(new), "m"(*__xg(ptr)), "0"(old)
-                                    : "memory");
-               return prev;
-       case 2:
--              __asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2"
-+              __asm__ __volatile__(LOCK "cmpxchgw %w1,%2"
-                                    : "=a"(prev)
-                                    : "r"(new), "m"(*__xg(ptr)), "0"(old)
-                                    : "memory");
-               return prev;
-       case 4:
--              __asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2"
-+              __asm__ __volatile__(LOCK "cmpxchgl %1,%2"
-                                    : "=a"(prev)
-                                    : "r"(new), "m"(*__xg(ptr)), "0"(old)
-                                    : "memory");
-@@ -339,7 +339,7 @@ static inline unsigned long long __cmpxc
-                                     unsigned long long new)
- {
-       unsigned long long prev;
--      __asm__ __volatile__(LOCK_PREFIX "cmpxchg8b %3"
-+      __asm__ __volatile__(LOCK "cmpxchg8b %3"
-                            : "=A"(prev)
-                            : "b"((unsigned long)new),
-                              "c"((unsigned long)(new >> 32)),
-@@ -506,11 +506,55 @@ struct alt_instr { 
- #endif
- 
- #ifdef CONFIG_SMP
--#define smp_mb()      mb()
--#define smp_rmb()     rmb()
- #define smp_wmb()     wmb()
--#define smp_read_barrier_depends()    read_barrier_depends()
-+#if defined(CONFIG_SMP_ALTERNATIVES) && !defined(MODULE)
-+#define smp_alt_mb(instr)                                           \
-+__asm__ __volatile__("6667:\nnop\nnop\nnop\nnop\nnop\nnop\n6668:\n" \
-+                   ".section __smp_alternatives,\"a\"\n"          \
-+                   ".long 6667b\n"                                \
-+                     ".long 6673f\n"                                \
-+                   ".previous\n"                                  \
-+                   ".section __smp_replacements,\"a\"\n"          \
-+                   "6673:.byte 6668b-6667b\n"                     \
-+                   ".byte 6670f-6669f\n"                          \
-+                   ".byte 6671f-6670f\n"                          \
-+                     ".byte 0\n"                                    \
-+                   ".byte %c0\n"                                  \
-+                   "6669:lock;addl $0,0(%%esp)\n"                 \
-+                   "6670:" instr "\n"                             \
-+                   "6671:\n"                                      \
-+                   ".previous\n"                                  \
-+                   :                                              \
-+                   : "i" (X86_FEATURE_XMM2)                       \
-+                   : "memory")
-+#define smp_rmb() smp_alt_mb("lfence")
-+#define smp_mb()  smp_alt_mb("mfence")
-+#define set_mb(var, value) do {                                     \
-+unsigned long __set_mb_temp;                                        \
-+__asm__ __volatile__("6667:movl %1, %0\n6668:\n"                    \
-+                   ".section __smp_alternatives,\"a\"\n"          \
-+                   ".long 6667b\n"                                \
-+                   ".long 6673f\n"                                \
-+                   ".previous\n"                                  \
-+                   ".section __smp_replacements,\"a\"\n"          \
-+                   "6673: .byte 6668b-6667b\n"                    \
-+                   ".byte 6670f-6669f\n"                          \
-+                   ".byte 0\n"                                    \
-+                   ".byte 6671f-6670f\n"                          \
-+                   ".byte -1\n"                                   \
-+                   "6669: xchg %1, %0\n"                          \
-+                   "6670:movl %1, %0\n"                           \
-+                   "6671:\n"                                      \
-+                   ".previous\n"                                  \
-+                   : "=m" (var), "=r" (__set_mb_temp)             \
-+                   : "1" (value)                                  \
-+                   : "memory"); } while (0)
-+#else
-+#define smp_rmb()     rmb()
-+#define smp_mb()      mb()
- #define set_mb(var, value) do { xchg(&var, value); } while (0)
-+#endif
-+#define smp_read_barrier_depends()    read_barrier_depends()
- #else
- #define smp_mb()      barrier()
- #define smp_rmb()     barrier()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Update to Linux 2.6.16-rc1-git4., Xen patchbot -unstable <=