direct-io.hg
changeset 6510:29aab159846c
Merge.
line diff
1.1 --- a/.hgignore Fri Aug 12 09:35:15 2005 -0800 1.2 +++ b/.hgignore Mon Aug 15 10:32:29 2005 -0800 1.3 @@ -69,19 +69,19 @@ 1.4 ^tools/blktap/blkdump$ 1.5 ^tools/blktap/blkgnbd$ 1.6 ^tools/blktap/blkimg$ 1.7 -^tools/blktap/blockstore\.dat$ 1.8 -^tools/blktap/blockstored$ 1.9 ^tools/blktap/bstest$ 1.10 -^tools/blktap/parallax$ 1.11 ^tools/blktap/vdi\.dot$ 1.12 ^tools/blktap/vdi\.ps$ 1.13 -^tools/blktap/vdi_create$ 1.14 -^tools/blktap/vdi_fill$ 1.15 -^tools/blktap/vdi_list$ 1.16 -^tools/blktap/vdi_snap$ 1.17 -^tools/blktap/vdi_snap_list$ 1.18 -^tools/blktap/vdi_tree$ 1.19 -^tools/blktap/vdi_validate$ 1.20 +^tools/blktap/parallax/vdi_create$ 1.21 +^tools/blktap/parallax/vdi_fill$ 1.22 +^tools/blktap/parallax/vdi_list$ 1.23 +^tools/blktap/parallax/vdi_snap$ 1.24 +^tools/blktap/parallax/vdi_snap_list$ 1.25 +^tools/blktap/parallax/vdi_snap_delete$ 1.26 +^tools/blktap/parallax/vdi_tree$ 1.27 +^tools/blktap/parallax/vdi_validate$ 1.28 +^tools/blktap/parallax/parallax$ 1.29 +^tools/blktap/parallax/blockstored$ 1.30 ^tools/blktap/xen/.*$ 1.31 ^tools/check/\..*$ 1.32 ^tools/cmdline/.*$
4.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32 Fri Aug 12 09:35:15 2005 -0800 4.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32 Mon Aug 15 10:32:29 2005 -0800 4.3 @@ -18,8 +18,8 @@ CONFIG_XEN_BLKDEV_GRANT=y 4.4 CONFIG_XEN_NETDEV_BACKEND=y 4.5 CONFIG_XEN_BLKDEV_FRONTEND=y 4.6 CONFIG_XEN_NETDEV_FRONTEND=y 4.7 -# CONFIG_XEN_NETDEV_GRANT_TX is not set 4.8 -# CONFIG_XEN_NETDEV_GRANT_RX is not set 4.9 +CONFIG_XEN_NETDEV_GRANT_TX=y 4.10 +CONFIG_XEN_NETDEV_GRANT_RX=y 4.11 # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set 4.12 # CONFIG_XEN_BLKDEV_TAP is not set 4.13 # CONFIG_XEN_SHADOW_MODE is not set
5.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64 Fri Aug 12 09:35:15 2005 -0800 5.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64 Mon Aug 15 10:32:29 2005 -0800 5.3 @@ -1,7 +1,7 @@ 5.4 # 5.5 # Automatically generated make config: don't edit 5.6 -# Linux kernel version: 2.6.12-xen0 5.7 -# Tue Aug 2 23:55:35 2005 5.8 +# Linux kernel version: 2.6.12.3-xen0 5.9 +# Mon Aug 15 11:36:25 2005 5.10 # 5.11 CONFIG_XEN=y 5.12 CONFIG_ARCH_XEN=y 5.13 @@ -18,8 +18,8 @@ CONFIG_XEN_BLKDEV_GRANT=y 5.14 CONFIG_XEN_NETDEV_BACKEND=y 5.15 CONFIG_XEN_BLKDEV_FRONTEND=y 5.16 CONFIG_XEN_NETDEV_FRONTEND=y 5.17 -# CONFIG_XEN_NETDEV_GRANT_TX is not set 5.18 -# CONFIG_XEN_NETDEV_GRANT_RX is not set 5.19 +CONFIG_XEN_NETDEV_GRANT_TX=y 5.20 +CONFIG_XEN_NETDEV_GRANT_RX=y 5.21 # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set 5.22 # CONFIG_XEN_BLKDEV_TAP is not set 5.23 # CONFIG_XEN_SHADOW_MODE is not set 5.24 @@ -118,6 +118,7 @@ CONFIG_EARLY_PRINTK=y 5.25 CONFIG_GENERIC_CPU=y 5.26 CONFIG_X86_L1_CACHE_BYTES=128 5.27 # CONFIG_X86_TSC is not set 5.28 +CONFIG_X86_XEN_GENAPIC=y 5.29 # CONFIG_X86_MSR is not set 5.30 # CONFIG_GART_IOMMU is not set 5.31 CONFIG_DUMMY_IOMMU=y 5.32 @@ -371,7 +372,23 @@ CONFIG_SCSI_QLA2XXX=y 5.33 # 5.34 # Multi-device support (RAID and LVM) 5.35 # 5.36 -# CONFIG_MD is not set 5.37 +CONFIG_MD=y 5.38 +CONFIG_BLK_DEV_MD=y 5.39 +CONFIG_MD_LINEAR=y 5.40 +CONFIG_MD_RAID0=y 5.41 +CONFIG_MD_RAID1=y 5.42 +# CONFIG_MD_RAID10 is not set 5.43 +# CONFIG_MD_RAID5 is not set 5.44 +# CONFIG_MD_RAID6 is not set 5.45 +CONFIG_MD_MULTIPATH=y 5.46 +# CONFIG_MD_FAULTY is not set 5.47 +CONFIG_BLK_DEV_DM=y 5.48 +CONFIG_DM_CRYPT=y 5.49 +CONFIG_DM_SNAPSHOT=y 5.50 +CONFIG_DM_MIRROR=y 5.51 +# CONFIG_DM_ZERO is not set 5.52 +CONFIG_DM_MULTIPATH=y 5.53 +CONFIG_DM_MULTIPATH_EMC=y 5.54 5.55 # 5.56 # Fusion MPT device support 5.57 @@ -803,7 +820,12 @@ CONFIG_USB_ARCH_HAS_OHCI=y 5.58 # 5.59 # InfiniBand support 5.60 # 5.61 -# CONFIG_INFINIBAND is not set 5.62 +CONFIG_INFINIBAND=y 5.63 +CONFIG_INFINIBAND_MTHCA=y 5.64 +CONFIG_INFINIBAND_MTHCA_DEBUG=y 5.65 +CONFIG_INFINIBAND_IPOIB=y 5.66 +CONFIG_INFINIBAND_IPOIB_DEBUG=y 5.67 +CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y 5.68 5.69 # 5.70 # Power management options
6.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 Fri Aug 12 09:35:15 2005 -0800 6.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 Mon Aug 15 10:32:29 2005 -0800 6.3 @@ -15,8 +15,8 @@ CONFIG_NO_IDLE_HZ=y 6.4 CONFIG_XEN_BLKDEV_GRANT=y 6.5 CONFIG_XEN_BLKDEV_FRONTEND=y 6.6 CONFIG_XEN_NETDEV_FRONTEND=y 6.7 -# CONFIG_XEN_NETDEV_GRANT_TX is not set 6.8 -# CONFIG_XEN_NETDEV_GRANT_RX is not set 6.9 +CONFIG_XEN_NETDEV_GRANT_TX=y 6.10 +CONFIG_XEN_NETDEV_GRANT_RX=y 6.11 # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set 6.12 # CONFIG_XEN_BLKDEV_TAP is not set 6.13 # CONFIG_XEN_SHADOW_MODE is not set
7.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 Fri Aug 12 09:35:15 2005 -0800 7.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 Mon Aug 15 10:32:29 2005 -0800 7.3 @@ -15,8 +15,8 @@ CONFIG_NO_IDLE_HZ=y 7.4 CONFIG_XEN_BLKDEV_GRANT=y 7.5 CONFIG_XEN_BLKDEV_FRONTEND=y 7.6 CONFIG_XEN_NETDEV_FRONTEND=y 7.7 -# CONFIG_XEN_NETDEV_GRANT_TX is not set 7.8 -# CONFIG_XEN_NETDEV_GRANT_RX is not set 7.9 +CONFIG_XEN_NETDEV_GRANT_TX=y 7.10 +CONFIG_XEN_NETDEV_GRANT_RX=y 7.11 # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set 7.12 # CONFIG_XEN_BLKDEV_TAP is not set 7.13 # CONFIG_XEN_SHADOW_MODE is not set
8.1 --- a/linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_64 Fri Aug 12 09:35:15 2005 -0800 8.2 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_64 Mon Aug 15 10:32:29 2005 -0800 8.3 @@ -1,7 +1,7 @@ 8.4 # 8.5 # Automatically generated make config: don't edit 8.6 -# Linux kernel version: 2.6.12-xen 8.7 -# Fri Jul 15 00:34:21 2005 8.8 +# Linux kernel version: 2.6.12.3-xen0 8.9 +# Mon Aug 15 19:46:39 2005 8.10 # 8.11 CONFIG_XEN=y 8.12 CONFIG_ARCH_XEN=y 8.13 @@ -18,6 +18,8 @@ CONFIG_XEN_BLKDEV_GRANT=y 8.14 CONFIG_XEN_NETDEV_BACKEND=y 8.15 CONFIG_XEN_BLKDEV_FRONTEND=y 8.16 CONFIG_XEN_NETDEV_FRONTEND=y 8.17 +CONFIG_XEN_NETDEV_GRANT_TX=y 8.18 +CONFIG_XEN_NETDEV_GRANT_RX=y 8.19 # CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set 8.20 # CONFIG_XEN_BLKDEV_TAP is not set 8.21 # CONFIG_XEN_SHADOW_MODE is not set 8.22 @@ -50,8 +52,7 @@ CONFIG_KOBJECT_UEVENT=y 8.23 # CONFIG_IKCONFIG is not set 8.24 # CONFIG_EMBEDDED is not set 8.25 CONFIG_KALLSYMS=y 8.26 -# CONFIG_KALLSYMS_ALL is not set 8.27 -# CONFIG_KALLSYMS_EXTRA_PASS is not set 8.28 +CONFIG_KALLSYMS_EXTRA_PASS=y 8.29 CONFIG_PRINTK=y 8.30 CONFIG_BUG=y 8.31 CONFIG_BASE_FULL=y 8.32 @@ -73,7 +74,7 @@ CONFIG_MODULE_UNLOAD=y 8.33 # CONFIG_MODULE_FORCE_UNLOAD is not set 8.34 CONFIG_OBSOLETE_MODPARM=y 8.35 # CONFIG_MODVERSIONS is not set 8.36 -# CONFIG_MODULE_SRCVERSION_ALL is not set 8.37 +CONFIG_MODULE_SRCVERSION_ALL=y 8.38 CONFIG_KMOD=y 8.39 CONFIG_XENARCH="x86_64" 8.40 CONFIG_X86=y 8.41 @@ -108,7 +109,7 @@ CONFIG_SECCOMP=y 8.42 # 8.43 CONFIG_X86_64=y 8.44 CONFIG_64BIT=y 8.45 -# CONFIG_EARLY_PRINTK is not set 8.46 +CONFIG_EARLY_PRINTK=y 8.47 8.48 # 8.49 # Processor type and features 8.50 @@ -117,6 +118,7 @@ CONFIG_64BIT=y 8.51 CONFIG_GENERIC_CPU=y 8.52 CONFIG_X86_L1_CACHE_BYTES=128 8.53 # CONFIG_X86_TSC is not set 8.54 +CONFIG_X86_XEN_GENAPIC=y 8.55 # CONFIG_X86_MSR is not set 8.56 # CONFIG_GART_IOMMU is not set 8.57 CONFIG_DUMMY_IOMMU=y 8.58 @@ -149,7 +151,7 @@ CONFIG_SYSVIPC_COMPAT=y 8.59 # Executable file formats 8.60 # 8.61 CONFIG_BINFMT_ELF=y 8.62 -CONFIG_BINFMT_MISC=m 8.63 +CONFIG_BINFMT_MISC=y 8.64 8.65 # 8.66 # Device Drivers 8.67 @@ -160,8 +162,7 @@ CONFIG_BINFMT_MISC=m 8.68 # 8.69 CONFIG_STANDALONE=y 8.70 CONFIG_PREVENT_FIRMWARE_BUILD=y 8.71 -CONFIG_FW_LOADER=m 8.72 -# CONFIG_DEBUG_DRIVER is not set 8.73 +CONFIG_FW_LOADER=y 8.74 8.75 # 8.76 # Memory Technology Devices (MTD) 8.77 @@ -174,7 +175,7 @@ CONFIG_MTD_REDBOOT_PARTS=m 8.78 CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 8.79 # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set 8.80 # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set 8.81 -# CONFIG_MTD_CMDLINE_PARTS is not set 8.82 +CONFIG_MTD_CMDLINE_PARTS=y 8.83 8.84 # 8.85 # User Modules And Translation Layers 8.86 @@ -206,7 +207,7 @@ CONFIG_MTD_CFI_I2=y 8.87 # CONFIG_MTD_CFI_I8 is not set 8.88 CONFIG_MTD_CFI_INTELEXT=m 8.89 CONFIG_MTD_CFI_AMDSTD=m 8.90 -CONFIG_MTD_CFI_AMDSTD_RETRY=0 8.91 +CONFIG_MTD_CFI_AMDSTD_RETRY=3 8.92 CONFIG_MTD_CFI_STAA=m 8.93 CONFIG_MTD_CFI_UTIL=m 8.94 CONFIG_MTD_RAM=m 8.95 @@ -219,11 +220,8 @@ CONFIG_MTD_ABSENT=m 8.96 # Mapping drivers for chip access 8.97 # 8.98 CONFIG_MTD_COMPLEX_MAPPINGS=y 8.99 -CONFIG_MTD_PHYSMAP=m 8.100 -CONFIG_MTD_PHYSMAP_START=0x8000000 8.101 -CONFIG_MTD_PHYSMAP_LEN=0x4000000 8.102 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 8.103 -CONFIG_MTD_PNC2000=m 8.104 +# CONFIG_MTD_PHYSMAP is not set 8.105 +# CONFIG_MTD_PNC2000 is not set 8.106 CONFIG_MTD_SC520CDP=m 8.107 CONFIG_MTD_NETSC520=m 8.108 CONFIG_MTD_TS5500=m 8.109 @@ -231,10 +229,9 @@ CONFIG_MTD_SBC_GXX=m 8.110 CONFIG_MTD_ELAN_104NC=m 8.111 # CONFIG_MTD_AMD76XROM is not set 8.112 # CONFIG_MTD_ICHXROM is not set 8.113 -# CONFIG_MTD_SCB2_FLASH is not set 8.114 -CONFIG_MTD_NETtel=m 8.115 -CONFIG_MTD_DILNETPC=m 8.116 -CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000 8.117 +CONFIG_MTD_SCB2_FLASH=m 8.118 +# CONFIG_MTD_NETtel is not set 8.119 +# CONFIG_MTD_DILNETPC is not set 8.120 # CONFIG_MTD_L440GX is not set 8.121 CONFIG_MTD_PCI=m 8.122 8.123 @@ -244,19 +241,19 @@ CONFIG_MTD_PCI=m 8.124 CONFIG_MTD_PMC551=m 8.125 # CONFIG_MTD_PMC551_BUGFIX is not set 8.126 # CONFIG_MTD_PMC551_DEBUG is not set 8.127 -CONFIG_MTD_SLRAM=m 8.128 -CONFIG_MTD_PHRAM=m 8.129 +# CONFIG_MTD_SLRAM is not set 8.130 +# CONFIG_MTD_PHRAM is not set 8.131 CONFIG_MTD_MTDRAM=m 8.132 CONFIG_MTDRAM_TOTAL_SIZE=4096 8.133 CONFIG_MTDRAM_ERASE_SIZE=128 8.134 -CONFIG_MTD_BLKMTD=m 8.135 -# CONFIG_MTD_BLOCK2MTD is not set 8.136 +# CONFIG_MTD_BLKMTD is not set 8.137 +CONFIG_MTD_BLOCK2MTD=m 8.138 8.139 # 8.140 # Disk-On-Chip Device Drivers 8.141 # 8.142 CONFIG_MTD_DOC2000=m 8.143 -CONFIG_MTD_DOC2001=m 8.144 +# CONFIG_MTD_DOC2001 is not set 8.145 CONFIG_MTD_DOC2001PLUS=m 8.146 CONFIG_MTD_DOCPROBE=m 8.147 CONFIG_MTD_DOCECC=m 8.148 @@ -269,10 +266,7 @@ CONFIG_MTD_DOCPROBE_ADDRESS=0 8.149 CONFIG_MTD_NAND=m 8.150 # CONFIG_MTD_NAND_VERIFY_WRITE is not set 8.151 CONFIG_MTD_NAND_IDS=m 8.152 -CONFIG_MTD_NAND_DISKONCHIP=m 8.153 -# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set 8.154 -CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 8.155 -# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set 8.156 +# CONFIG_MTD_NAND_DISKONCHIP is not set 8.157 # CONFIG_MTD_NAND_NANDSIM is not set 8.158 8.159 # 8.160 @@ -280,8 +274,7 @@ CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS 8.161 # 8.162 CONFIG_PARPORT=m 8.163 CONFIG_PARPORT_PC=m 8.164 -CONFIG_PARPORT_SERIAL=m 8.165 -CONFIG_PARPORT_PC_FIFO=y 8.166 +# CONFIG_PARPORT_PC_FIFO is not set 8.167 # CONFIG_PARPORT_PC_SUPERIO is not set 8.168 CONFIG_PARPORT_NOT_PC=y 8.169 # CONFIG_PARPORT_GSC is not set 8.170 @@ -290,13 +283,7 @@ CONFIG_PARPORT_1284=y 8.171 # 8.172 # Plug and Play support 8.173 # 8.174 -CONFIG_PNP=y 8.175 -# CONFIG_PNP_DEBUG is not set 8.176 - 8.177 -# 8.178 -# Protocols 8.179 -# 8.180 -CONFIG_PNPACPI=y 8.181 +# CONFIG_PNP is not set 8.182 8.183 # 8.184 # Block devices 8.185 @@ -324,7 +311,7 @@ CONFIG_PARIDE_DSTR=m 8.186 CONFIG_PARIDE_FIT2=m 8.187 CONFIG_PARIDE_FIT3=m 8.188 CONFIG_PARIDE_EPAT=m 8.189 -# CONFIG_PARIDE_EPATC8 is not set 8.190 +CONFIG_PARIDE_EPATC8=y 8.191 CONFIG_PARIDE_EPIA=m 8.192 CONFIG_PARIDE_FRIQ=m 8.193 CONFIG_PARIDE_FRPW=m 8.194 @@ -345,7 +332,7 @@ CONFIG_BLK_DEV_SX8=m 8.195 # CONFIG_BLK_DEV_UB is not set 8.196 CONFIG_BLK_DEV_RAM=y 8.197 CONFIG_BLK_DEV_RAM_COUNT=16 8.198 -CONFIG_BLK_DEV_RAM_SIZE=8192 8.199 +CONFIG_BLK_DEV_RAM_SIZE=16384 8.200 CONFIG_BLK_DEV_INITRD=y 8.201 CONFIG_INITRAMFS_SOURCE="" 8.202 CONFIG_LBD=y 8.203 @@ -360,70 +347,69 @@ CONFIG_IOSCHED_NOOP=y 8.204 CONFIG_IOSCHED_AS=y 8.205 CONFIG_IOSCHED_DEADLINE=y 8.206 CONFIG_IOSCHED_CFQ=y 8.207 -# CONFIG_ATA_OVER_ETH is not set 8.208 +CONFIG_ATA_OVER_ETH=m 8.209 8.210 # 8.211 # ATA/ATAPI/MFM/RLL support 8.212 # 8.213 -CONFIG_IDE=m 8.214 -CONFIG_BLK_DEV_IDE=m 8.215 +CONFIG_IDE=y 8.216 +CONFIG_BLK_DEV_IDE=y 8.217 8.218 # 8.219 # Please see Documentation/ide.txt for help/info on IDE drives 8.220 # 8.221 # CONFIG_BLK_DEV_IDE_SATA is not set 8.222 # CONFIG_BLK_DEV_HD_IDE is not set 8.223 -CONFIG_BLK_DEV_IDEDISK=m 8.224 -# CONFIG_IDEDISK_MULTI_MODE is not set 8.225 -CONFIG_BLK_DEV_IDECD=m 8.226 -CONFIG_BLK_DEV_IDETAPE=m 8.227 -CONFIG_BLK_DEV_IDEFLOPPY=m 8.228 +CONFIG_BLK_DEV_IDEDISK=y 8.229 +CONFIG_IDEDISK_MULTI_MODE=y 8.230 +CONFIG_BLK_DEV_IDECD=y 8.231 +# CONFIG_BLK_DEV_IDETAPE is not set 8.232 +CONFIG_BLK_DEV_IDEFLOPPY=y 8.233 CONFIG_BLK_DEV_IDESCSI=m 8.234 # CONFIG_IDE_TASK_IOCTL is not set 8.235 8.236 # 8.237 # IDE chipset support/bugfixes 8.238 # 8.239 -CONFIG_IDE_GENERIC=m 8.240 +CONFIG_IDE_GENERIC=y 8.241 CONFIG_BLK_DEV_CMD640=y 8.242 -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set 8.243 -# CONFIG_BLK_DEV_IDEPNP is not set 8.244 +CONFIG_BLK_DEV_CMD640_ENHANCED=y 8.245 CONFIG_BLK_DEV_IDEPCI=y 8.246 CONFIG_IDEPCI_SHARE_IRQ=y 8.247 # CONFIG_BLK_DEV_OFFBOARD is not set 8.248 -CONFIG_BLK_DEV_GENERIC=m 8.249 -CONFIG_BLK_DEV_OPTI621=m 8.250 -CONFIG_BLK_DEV_RZ1000=m 8.251 +CONFIG_BLK_DEV_GENERIC=y 8.252 +# CONFIG_BLK_DEV_OPTI621 is not set 8.253 +CONFIG_BLK_DEV_RZ1000=y 8.254 CONFIG_BLK_DEV_IDEDMA_PCI=y 8.255 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set 8.256 CONFIG_IDEDMA_PCI_AUTO=y 8.257 # CONFIG_IDEDMA_ONLYDISK is not set 8.258 -CONFIG_BLK_DEV_AEC62XX=m 8.259 -CONFIG_BLK_DEV_ALI15X3=m 8.260 +CONFIG_BLK_DEV_AEC62XX=y 8.261 +CONFIG_BLK_DEV_ALI15X3=y 8.262 # CONFIG_WDC_ALI15X3 is not set 8.263 -CONFIG_BLK_DEV_AMD74XX=m 8.264 -CONFIG_BLK_DEV_ATIIXP=m 8.265 -CONFIG_BLK_DEV_CMD64X=m 8.266 -CONFIG_BLK_DEV_TRIFLEX=m 8.267 -CONFIG_BLK_DEV_CY82C693=m 8.268 -CONFIG_BLK_DEV_CS5520=m 8.269 -CONFIG_BLK_DEV_CS5530=m 8.270 -CONFIG_BLK_DEV_HPT34X=m 8.271 +CONFIG_BLK_DEV_AMD74XX=y 8.272 +CONFIG_BLK_DEV_ATIIXP=y 8.273 +CONFIG_BLK_DEV_CMD64X=y 8.274 +CONFIG_BLK_DEV_TRIFLEX=y 8.275 +CONFIG_BLK_DEV_CY82C693=y 8.276 +CONFIG_BLK_DEV_CS5520=y 8.277 +CONFIG_BLK_DEV_CS5530=y 8.278 +CONFIG_BLK_DEV_HPT34X=y 8.279 # CONFIG_HPT34X_AUTODMA is not set 8.280 -CONFIG_BLK_DEV_HPT366=m 8.281 -CONFIG_BLK_DEV_SC1200=m 8.282 -CONFIG_BLK_DEV_PIIX=m 8.283 -CONFIG_BLK_DEV_NS87415=m 8.284 -CONFIG_BLK_DEV_PDC202XX_OLD=m 8.285 -CONFIG_PDC202XX_BURST=y 8.286 -CONFIG_BLK_DEV_PDC202XX_NEW=m 8.287 +CONFIG_BLK_DEV_HPT366=y 8.288 +# CONFIG_BLK_DEV_SC1200 is not set 8.289 +CONFIG_BLK_DEV_PIIX=y 8.290 +# CONFIG_BLK_DEV_NS87415 is not set 8.291 +CONFIG_BLK_DEV_PDC202XX_OLD=y 8.292 +# CONFIG_PDC202XX_BURST is not set 8.293 +CONFIG_BLK_DEV_PDC202XX_NEW=y 8.294 CONFIG_PDC202XX_FORCE=y 8.295 -CONFIG_BLK_DEV_SVWKS=m 8.296 -CONFIG_BLK_DEV_SIIMAGE=m 8.297 -CONFIG_BLK_DEV_SIS5513=m 8.298 -CONFIG_BLK_DEV_SLC90E66=m 8.299 -CONFIG_BLK_DEV_TRM290=m 8.300 -CONFIG_BLK_DEV_VIA82CXXX=m 8.301 +CONFIG_BLK_DEV_SVWKS=y 8.302 +CONFIG_BLK_DEV_SIIMAGE=y 8.303 +CONFIG_BLK_DEV_SIS5513=y 8.304 +CONFIG_BLK_DEV_SLC90E66=y 8.305 +# CONFIG_BLK_DEV_TRM290 is not set 8.306 +CONFIG_BLK_DEV_VIA82CXXX=y 8.307 # CONFIG_IDE_ARM is not set 8.308 CONFIG_BLK_DEV_IDEDMA=y 8.309 # CONFIG_IDEDMA_IVB is not set 8.310 @@ -433,17 +419,17 @@ CONFIG_IDEDMA_AUTO=y 8.311 # 8.312 # SCSI device support 8.313 # 8.314 -CONFIG_SCSI=m 8.315 +CONFIG_SCSI=y 8.316 CONFIG_SCSI_PROC_FS=y 8.317 8.318 # 8.319 # SCSI support type (disk, tape, CD-ROM) 8.320 # 8.321 -CONFIG_BLK_DEV_SD=m 8.322 +CONFIG_BLK_DEV_SD=y 8.323 CONFIG_CHR_DEV_ST=m 8.324 CONFIG_CHR_DEV_OSST=m 8.325 CONFIG_BLK_DEV_SR=m 8.326 -# CONFIG_BLK_DEV_SR_VENDOR is not set 8.327 +CONFIG_BLK_DEV_SR_VENDOR=y 8.328 CONFIG_CHR_DEV_SG=m 8.329 8.330 # 8.331 @@ -458,7 +444,7 @@ CONFIG_SCSI_LOGGING=y 8.332 # 8.333 CONFIG_SCSI_SPI_ATTRS=m 8.334 CONFIG_SCSI_FC_ATTRS=m 8.335 -# CONFIG_SCSI_ISCSI_ATTRS is not set 8.336 +CONFIG_SCSI_ISCSI_ATTRS=m 8.337 8.338 # 8.339 # SCSI low-level drivers 8.340 @@ -468,29 +454,30 @@ CONFIG_SCSI_3W_9XXX=m 8.341 CONFIG_SCSI_ACARD=m 8.342 CONFIG_SCSI_AACRAID=m 8.343 CONFIG_SCSI_AIC7XXX=m 8.344 -CONFIG_AIC7XXX_CMDS_PER_DEVICE=8 8.345 +CONFIG_AIC7XXX_CMDS_PER_DEVICE=4 8.346 CONFIG_AIC7XXX_RESET_DELAY_MS=15000 8.347 -CONFIG_AIC7XXX_DEBUG_ENABLE=y 8.348 +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set 8.349 CONFIG_AIC7XXX_DEBUG_MASK=0 8.350 -CONFIG_AIC7XXX_REG_PRETTY_PRINT=y 8.351 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set 8.352 CONFIG_SCSI_AIC7XXX_OLD=m 8.353 CONFIG_SCSI_AIC79XX=m 8.354 -CONFIG_AIC79XX_CMDS_PER_DEVICE=32 8.355 +CONFIG_AIC79XX_CMDS_PER_DEVICE=4 8.356 CONFIG_AIC79XX_RESET_DELAY_MS=15000 8.357 -CONFIG_AIC79XX_ENABLE_RD_STRM=y 8.358 -CONFIG_AIC79XX_DEBUG_ENABLE=y 8.359 +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set 8.360 +# CONFIG_AIC79XX_DEBUG_ENABLE is not set 8.361 CONFIG_AIC79XX_DEBUG_MASK=0 8.362 -CONFIG_AIC79XX_REG_PRETTY_PRINT=y 8.363 -CONFIG_SCSI_ADVANSYS=m 8.364 -# CONFIG_MEGARAID_NEWGEN is not set 8.365 -CONFIG_MEGARAID_LEGACY=m 8.366 +# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set 8.367 +# CONFIG_SCSI_ADVANSYS is not set 8.368 +CONFIG_MEGARAID_NEWGEN=y 8.369 +CONFIG_MEGARAID_MM=m 8.370 +CONFIG_MEGARAID_MAILBOX=m 8.371 CONFIG_SCSI_SATA=y 8.372 CONFIG_SCSI_SATA_AHCI=m 8.373 CONFIG_SCSI_SATA_SVW=m 8.374 -CONFIG_SCSI_ATA_PIIX=m 8.375 +CONFIG_SCSI_ATA_PIIX=y 8.376 CONFIG_SCSI_SATA_NV=m 8.377 CONFIG_SCSI_SATA_PROMISE=m 8.378 -# CONFIG_SCSI_SATA_QSTOR is not set 8.379 +CONFIG_SCSI_SATA_QSTOR=m 8.380 CONFIG_SCSI_SATA_SX4=m 8.381 CONFIG_SCSI_SATA_SIL=m 8.382 CONFIG_SCSI_SATA_SIS=m 8.383 @@ -500,17 +487,14 @@ CONFIG_SCSI_SATA_VITESSE=m 8.384 CONFIG_SCSI_BUSLOGIC=m 8.385 # CONFIG_SCSI_OMIT_FLASHPOINT is not set 8.386 # CONFIG_SCSI_CPQFCTS is not set 8.387 -CONFIG_SCSI_DMX3191D=m 8.388 -CONFIG_SCSI_EATA=m 8.389 -CONFIG_SCSI_EATA_TAGGED_QUEUE=y 8.390 -CONFIG_SCSI_EATA_LINKED_COMMANDS=y 8.391 -CONFIG_SCSI_EATA_MAX_TAGS=16 8.392 -CONFIG_SCSI_EATA_PIO=m 8.393 -CONFIG_SCSI_FUTURE_DOMAIN=m 8.394 +# CONFIG_SCSI_DMX3191D is not set 8.395 +# CONFIG_SCSI_EATA is not set 8.396 +# CONFIG_SCSI_EATA_PIO is not set 8.397 +# CONFIG_SCSI_FUTURE_DOMAIN is not set 8.398 CONFIG_SCSI_GDTH=m 8.399 CONFIG_SCSI_IPS=m 8.400 -# CONFIG_SCSI_INITIO is not set 8.401 -# CONFIG_SCSI_INIA100 is not set 8.402 +CONFIG_SCSI_INITIO=m 8.403 +CONFIG_SCSI_INIA100=m 8.404 CONFIG_SCSI_PPA=m 8.405 CONFIG_SCSI_IMM=m 8.406 # CONFIG_SCSI_IZIP_EPP16 is not set 8.407 @@ -520,32 +504,29 @@ CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MOD 8.408 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 8.409 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 8.410 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set 8.411 -CONFIG_SCSI_IPR=m 8.412 -# CONFIG_SCSI_IPR_TRACE is not set 8.413 -# CONFIG_SCSI_IPR_DUMP is not set 8.414 +# CONFIG_SCSI_IPR is not set 8.415 # CONFIG_SCSI_PCI2000 is not set 8.416 # CONFIG_SCSI_PCI2220I is not set 8.417 -CONFIG_SCSI_QLOGIC_ISP=m 8.418 -CONFIG_SCSI_QLOGIC_FC=m 8.419 -CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y 8.420 +# CONFIG_SCSI_QLOGIC_ISP is not set 8.421 +# CONFIG_SCSI_QLOGIC_FC is not set 8.422 CONFIG_SCSI_QLOGIC_1280=m 8.423 CONFIG_SCSI_QLOGIC_1280_1040=y 8.424 -CONFIG_SCSI_QLA2XXX=m 8.425 -# CONFIG_SCSI_QLA21XX is not set 8.426 -# CONFIG_SCSI_QLA22XX is not set 8.427 -# CONFIG_SCSI_QLA2300 is not set 8.428 -# CONFIG_SCSI_QLA2322 is not set 8.429 -# CONFIG_SCSI_QLA6312 is not set 8.430 +CONFIG_SCSI_QLA2XXX=y 8.431 +CONFIG_SCSI_QLA21XX=m 8.432 +CONFIG_SCSI_QLA22XX=m 8.433 +CONFIG_SCSI_QLA2300=m 8.434 +CONFIG_SCSI_QLA2322=m 8.435 +CONFIG_SCSI_QLA6312=m 8.436 CONFIG_SCSI_LPFC=m 8.437 CONFIG_SCSI_DC395x=m 8.438 CONFIG_SCSI_DC390T=m 8.439 -CONFIG_SCSI_DEBUG=m 8.440 +# CONFIG_SCSI_DEBUG is not set 8.441 8.442 # 8.443 # Multi-device support (RAID and LVM) 8.444 # 8.445 CONFIG_MD=y 8.446 -CONFIG_BLK_DEV_MD=m 8.447 +CONFIG_BLK_DEV_MD=y 8.448 CONFIG_MD_LINEAR=m 8.449 CONFIG_MD_RAID0=m 8.450 CONFIG_MD_RAID1=m 8.451 @@ -579,7 +560,7 @@ CONFIG_IEEE1394=m 8.452 # Subsystem Options 8.453 # 8.454 # CONFIG_IEEE1394_VERBOSEDEBUG is not set 8.455 -# CONFIG_IEEE1394_OUI_DB is not set 8.456 +CONFIG_IEEE1394_OUI_DB=y 8.457 CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y 8.458 CONFIG_IEEE1394_CONFIG_ROM_IP1394=y 8.459 8.460 @@ -618,9 +599,9 @@ CONFIG_NET=y 8.461 # 8.462 # Networking options 8.463 # 8.464 -CONFIG_PACKET=m 8.465 +CONFIG_PACKET=y 8.466 CONFIG_PACKET_MMAP=y 8.467 -CONFIG_UNIX=m 8.468 +CONFIG_UNIX=y 8.469 CONFIG_NET_KEY=m 8.470 CONFIG_INET=y 8.471 CONFIG_IP_MULTICAST=y 8.472 @@ -784,11 +765,6 @@ CONFIG_IP6_NF_TARGET_MARK=m 8.473 CONFIG_IP6_NF_RAW=m 8.474 8.475 # 8.476 -# DECnet: Netfilter Configuration 8.477 -# 8.478 -CONFIG_DECNET_NF_GRABULATOR=m 8.479 - 8.480 -# 8.481 # Bridge: Netfilter Configuration 8.482 # 8.483 CONFIG_BRIDGE_NF_EBTABLES=m 8.484 @@ -810,9 +786,9 @@ CONFIG_BRIDGE_EBT_MARK_T=m 8.485 CONFIG_BRIDGE_EBT_REDIRECT=m 8.486 CONFIG_BRIDGE_EBT_SNAT=m 8.487 CONFIG_BRIDGE_EBT_LOG=m 8.488 -# CONFIG_BRIDGE_EBT_ULOG is not set 8.489 +CONFIG_BRIDGE_EBT_ULOG=m 8.490 CONFIG_XFRM=y 8.491 -CONFIG_XFRM_USER=m 8.492 +CONFIG_XFRM_USER=y 8.493 8.494 # 8.495 # SCTP Configuration (EXPERIMENTAL) 8.496 @@ -823,19 +799,18 @@ CONFIG_IP_SCTP=m 8.497 # CONFIG_SCTP_HMAC_NONE is not set 8.498 # CONFIG_SCTP_HMAC_SHA1 is not set 8.499 CONFIG_SCTP_HMAC_MD5=y 8.500 -CONFIG_ATM=y 8.501 -CONFIG_ATM_CLIP=y 8.502 +CONFIG_ATM=m 8.503 +CONFIG_ATM_CLIP=m 8.504 # CONFIG_ATM_CLIP_NO_ICMP is not set 8.505 CONFIG_ATM_LANE=m 8.506 -CONFIG_ATM_MPOA=m 8.507 +# CONFIG_ATM_MPOA is not set 8.508 CONFIG_ATM_BR2684=m 8.509 # CONFIG_ATM_BR2684_IPFILTER is not set 8.510 CONFIG_BRIDGE=m 8.511 CONFIG_VLAN_8021Q=m 8.512 -CONFIG_DECNET=m 8.513 -# CONFIG_DECNET_ROUTER is not set 8.514 +# CONFIG_DECNET is not set 8.515 CONFIG_LLC=y 8.516 -CONFIG_LLC2=m 8.517 +# CONFIG_LLC2 is not set 8.518 CONFIG_IPX=m 8.519 # CONFIG_IPX_INTERN is not set 8.520 CONFIG_ATALK=m 8.521 @@ -843,12 +818,10 @@ CONFIG_DEV_APPLETALK=y 8.522 CONFIG_IPDDP=m 8.523 CONFIG_IPDDP_ENCAP=y 8.524 CONFIG_IPDDP_DECAP=y 8.525 -CONFIG_X25=m 8.526 -CONFIG_LAPB=m 8.527 -# CONFIG_NET_DIVERT is not set 8.528 -CONFIG_ECONET=m 8.529 -CONFIG_ECONET_AUNUDP=y 8.530 -CONFIG_ECONET_NATIVE=y 8.531 +# CONFIG_X25 is not set 8.532 +# CONFIG_LAPB is not set 8.533 +CONFIG_NET_DIVERT=y 8.534 +# CONFIG_ECONET is not set 8.535 CONFIG_WAN_ROUTER=m 8.536 8.537 # 8.538 @@ -880,9 +853,9 @@ CONFIG_NET_CLS_ROUTE4=m 8.539 CONFIG_NET_CLS_ROUTE=y 8.540 CONFIG_NET_CLS_FW=m 8.541 CONFIG_NET_CLS_U32=m 8.542 -# CONFIG_CLS_U32_PERF is not set 8.543 -# CONFIG_NET_CLS_IND is not set 8.544 -# CONFIG_CLS_U32_MARK is not set 8.545 +CONFIG_CLS_U32_PERF=y 8.546 +CONFIG_NET_CLS_IND=y 8.547 +CONFIG_CLS_U32_MARK=y 8.548 CONFIG_NET_CLS_RSVP=m 8.549 CONFIG_NET_CLS_RSVP6=m 8.550 CONFIG_NET_EMATCH=y 8.551 @@ -897,31 +870,12 @@ CONFIG_NET_CLS_POLICE=y 8.552 # 8.553 # Network testing 8.554 # 8.555 -CONFIG_NET_PKTGEN=m 8.556 +# CONFIG_NET_PKTGEN is not set 8.557 CONFIG_NETPOLL=y 8.558 # CONFIG_NETPOLL_RX is not set 8.559 -# CONFIG_NETPOLL_TRAP is not set 8.560 +CONFIG_NETPOLL_TRAP=y 8.561 CONFIG_NET_POLL_CONTROLLER=y 8.562 -CONFIG_HAMRADIO=y 8.563 - 8.564 -# 8.565 -# Packet Radio protocols 8.566 -# 8.567 -CONFIG_AX25=m 8.568 -# CONFIG_AX25_DAMA_SLAVE is not set 8.569 -CONFIG_NETROM=m 8.570 -CONFIG_ROSE=m 8.571 - 8.572 -# 8.573 -# AX.25 network device drivers 8.574 -# 8.575 -CONFIG_MKISS=m 8.576 -CONFIG_6PACK=m 8.577 -CONFIG_BPQETHER=m 8.578 -CONFIG_BAYCOM_SER_FDX=m 8.579 -CONFIG_BAYCOM_SER_HDX=m 8.580 -CONFIG_BAYCOM_PAR=m 8.581 -CONFIG_YAM=m 8.582 +# CONFIG_HAMRADIO is not set 8.583 CONFIG_IRDA=m 8.584 8.585 # 8.586 @@ -937,7 +891,7 @@ CONFIG_IRCOMM=m 8.587 # 8.588 CONFIG_IRDA_CACHE_LAST_LSAP=y 8.589 CONFIG_IRDA_FAST_RR=y 8.590 -CONFIG_IRDA_DEBUG=y 8.591 +# CONFIG_IRDA_DEBUG is not set 8.592 8.593 # 8.594 # Infrared-port device drivers 8.595 @@ -1002,9 +956,9 @@ CONFIG_BT_HCIUSB_SCO=y 8.596 CONFIG_BT_HCIUART=m 8.597 CONFIG_BT_HCIUART_H4=y 8.598 CONFIG_BT_HCIUART_BCSP=y 8.599 -# CONFIG_BT_HCIUART_BCSP_TXCRC is not set 8.600 +CONFIG_BT_HCIUART_BCSP_TXCRC=y 8.601 CONFIG_BT_HCIBCM203X=m 8.602 -# CONFIG_BT_HCIBPA10X is not set 8.603 +CONFIG_BT_HCIBPA10X=m 8.604 CONFIG_BT_HCIBFUSB=m 8.605 CONFIG_BT_HCIVHCI=m 8.606 CONFIG_NETDEVICES=y 8.607 @@ -1012,21 +966,11 @@ CONFIG_DUMMY=m 8.608 CONFIG_BONDING=m 8.609 CONFIG_EQUALIZER=m 8.610 CONFIG_TUN=m 8.611 -CONFIG_NET_SB1000=m 8.612 8.613 # 8.614 # ARCnet devices 8.615 # 8.616 -CONFIG_ARCNET=m 8.617 -CONFIG_ARCNET_1201=m 8.618 -CONFIG_ARCNET_1051=m 8.619 -CONFIG_ARCNET_RAW=m 8.620 -# CONFIG_ARCNET_CAP is not set 8.621 -CONFIG_ARCNET_COM90xx=m 8.622 -CONFIG_ARCNET_COM90xxIO=m 8.623 -CONFIG_ARCNET_RIM_I=m 8.624 -CONFIG_ARCNET_COM20020=m 8.625 -CONFIG_ARCNET_COM20020_PCI=m 8.626 +# CONFIG_ARCNET is not set 8.627 8.628 # 8.629 # Ethernet (10 or 100Mbit) 8.630 @@ -1046,21 +990,21 @@ CONFIG_NET_TULIP=y 8.631 CONFIG_DE2104X=m 8.632 CONFIG_TULIP=m 8.633 # CONFIG_TULIP_MWI is not set 8.634 -# CONFIG_TULIP_MMIO is not set 8.635 +CONFIG_TULIP_MMIO=y 8.636 # CONFIG_TULIP_NAPI is not set 8.637 CONFIG_DE4X5=m 8.638 CONFIG_WINBOND_840=m 8.639 CONFIG_DM9102=m 8.640 -CONFIG_HP100=m 8.641 +# CONFIG_HP100 is not set 8.642 CONFIG_NET_PCI=y 8.643 CONFIG_PCNET32=m 8.644 CONFIG_AMD8111_ETH=m 8.645 -# CONFIG_AMD8111E_NAPI is not set 8.646 +CONFIG_AMD8111E_NAPI=y 8.647 CONFIG_ADAPTEC_STARFIRE=m 8.648 -# CONFIG_ADAPTEC_STARFIRE_NAPI is not set 8.649 +CONFIG_ADAPTEC_STARFIRE_NAPI=y 8.650 CONFIG_B44=m 8.651 CONFIG_FORCEDETH=m 8.652 -# CONFIG_DGRS is not set 8.653 +CONFIG_DGRS=m 8.654 CONFIG_EEPRO100=m 8.655 CONFIG_E100=m 8.656 CONFIG_FEALNX=m 8.657 @@ -1069,7 +1013,7 @@ CONFIG_NE2K_PCI=m 8.658 CONFIG_8139CP=m 8.659 CONFIG_8139TOO=m 8.660 CONFIG_8139TOO_PIO=y 8.661 -CONFIG_8139TOO_TUNE_TWISTER=y 8.662 +# CONFIG_8139TOO_TUNE_TWISTER is not set 8.663 CONFIG_8139TOO_8129=y 8.664 # CONFIG_8139_OLD_RX_RESET is not set 8.665 CONFIG_SIS900=m 8.666 @@ -1077,21 +1021,22 @@ CONFIG_EPIC100=m 8.667 CONFIG_SUNDANCE=m 8.668 # CONFIG_SUNDANCE_MMIO is not set 8.669 CONFIG_VIA_RHINE=m 8.670 -# CONFIG_VIA_RHINE_MMIO is not set 8.671 +CONFIG_VIA_RHINE_MMIO=y 8.672 8.673 # 8.674 # Ethernet (1000 Mbit) 8.675 # 8.676 -# CONFIG_ACENIC is not set 8.677 +CONFIG_ACENIC=m 8.678 +# CONFIG_ACENIC_OMIT_TIGON_I is not set 8.679 CONFIG_DL2K=m 8.680 CONFIG_E1000=m 8.681 -# CONFIG_E1000_NAPI is not set 8.682 +CONFIG_E1000_NAPI=y 8.683 CONFIG_NS83820=m 8.684 CONFIG_HAMACHI=m 8.685 CONFIG_YELLOWFIN=m 8.686 CONFIG_R8169=m 8.687 -# CONFIG_R8169_NAPI is not set 8.688 -# CONFIG_R8169_VLAN is not set 8.689 +CONFIG_R8169_NAPI=y 8.690 +CONFIG_R8169_VLAN=y 8.691 CONFIG_SK98LIN=m 8.692 CONFIG_VIA_VELOCITY=m 8.693 CONFIG_TIGON3=m 8.694 @@ -1101,9 +1046,9 @@ CONFIG_BNX2=m 8.695 # Ethernet (10000 Mbit) 8.696 # 8.697 CONFIG_IXGB=m 8.698 -# CONFIG_IXGB_NAPI is not set 8.699 +CONFIG_IXGB_NAPI=y 8.700 CONFIG_S2IO=m 8.701 -# CONFIG_S2IO_NAPI is not set 8.702 +CONFIG_S2IO_NAPI=y 8.703 # CONFIG_2BUFF_MODE is not set 8.704 8.705 # 8.706 @@ -1124,7 +1069,7 @@ CONFIG_NET_RADIO=y 8.707 # 8.708 # Obsolete Wireless cards support (pre-802.11) 8.709 # 8.710 -CONFIG_STRIP=m 8.711 +# CONFIG_STRIP is not set 8.712 8.713 # 8.714 # Wireless 802.11b ISA/PCI cards support 8.715 @@ -1145,35 +1090,7 @@ CONFIG_NET_WIRELESS=y 8.716 # 8.717 # Wan interfaces 8.718 # 8.719 -CONFIG_WAN=y 8.720 -CONFIG_DSCC4=m 8.721 -CONFIG_DSCC4_PCISYNC=y 8.722 -CONFIG_DSCC4_PCI_RST=y 8.723 -CONFIG_LANMEDIA=m 8.724 -CONFIG_SYNCLINK_SYNCPPP=m 8.725 -CONFIG_HDLC=m 8.726 -CONFIG_HDLC_RAW=y 8.727 -CONFIG_HDLC_RAW_ETH=y 8.728 -CONFIG_HDLC_CISCO=y 8.729 -CONFIG_HDLC_FR=y 8.730 -CONFIG_HDLC_PPP=y 8.731 -CONFIG_HDLC_X25=y 8.732 -CONFIG_PCI200SYN=m 8.733 -CONFIG_WANXL=m 8.734 -CONFIG_PC300=m 8.735 -CONFIG_PC300_MLPPP=y 8.736 -CONFIG_FARSYNC=m 8.737 -CONFIG_DLCI=m 8.738 -CONFIG_DLCI_COUNT=24 8.739 -CONFIG_DLCI_MAX=8 8.740 -CONFIG_WAN_ROUTER_DRIVERS=y 8.741 -# CONFIG_VENDOR_SANGOMA is not set 8.742 -CONFIG_CYCLADES_SYNC=m 8.743 -CONFIG_CYCLOMX_X25=y 8.744 -CONFIG_LAPBETHER=m 8.745 -CONFIG_X25_ASY=m 8.746 -CONFIG_SBNI=m 8.747 -# CONFIG_SBNI_MULTILINE is not set 8.748 +# CONFIG_WAN is not set 8.749 8.750 # 8.751 # ATM drivers 8.752 @@ -1184,8 +1101,7 @@ CONFIG_ATM_ENI=m 8.753 # CONFIG_ATM_ENI_DEBUG is not set 8.754 # CONFIG_ATM_ENI_TUNE_BURST is not set 8.755 CONFIG_ATM_FIRESTREAM=m 8.756 -CONFIG_ATM_ZATM=m 8.757 -# CONFIG_ATM_ZATM_DEBUG is not set 8.758 +# CONFIG_ATM_ZATM is not set 8.759 CONFIG_ATM_IDT77252=m 8.760 # CONFIG_ATM_IDT77252_DEBUG is not set 8.761 # CONFIG_ATM_IDT77252_RCV_ALL is not set 8.762 @@ -1195,20 +1111,13 @@ CONFIG_ATM_AMBASSADOR=m 8.763 CONFIG_ATM_HORIZON=m 8.764 # CONFIG_ATM_HORIZON_DEBUG is not set 8.765 CONFIG_ATM_FORE200E_MAYBE=m 8.766 -CONFIG_ATM_FORE200E_PCA=y 8.767 -CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y 8.768 -# CONFIG_ATM_FORE200E_USE_TASKLET is not set 8.769 -CONFIG_ATM_FORE200E_TX_RETRY=16 8.770 -CONFIG_ATM_FORE200E_DEBUG=0 8.771 -CONFIG_ATM_FORE200E=m 8.772 +# CONFIG_ATM_FORE200E_PCA is not set 8.773 CONFIG_ATM_HE=m 8.774 -CONFIG_ATM_HE_USE_SUNI=y 8.775 +# CONFIG_ATM_HE_USE_SUNI is not set 8.776 CONFIG_FDDI=y 8.777 -CONFIG_DEFXX=m 8.778 +# CONFIG_DEFXX is not set 8.779 CONFIG_SKFP=m 8.780 -CONFIG_HIPPI=y 8.781 -CONFIG_ROADRUNNER=m 8.782 -# CONFIG_ROADRUNNER_LARGE_RINGS is not set 8.783 +# CONFIG_HIPPI is not set 8.784 CONFIG_PLIP=m 8.785 CONFIG_PPP=m 8.786 CONFIG_PPP_MULTILINK=y 8.787 @@ -1216,15 +1125,15 @@ CONFIG_PPP_FILTER=y 8.788 CONFIG_PPP_ASYNC=m 8.789 CONFIG_PPP_SYNC_TTY=m 8.790 CONFIG_PPP_DEFLATE=m 8.791 -CONFIG_PPP_BSDCOMP=m 8.792 +# CONFIG_PPP_BSDCOMP is not set 8.793 CONFIG_PPPOE=m 8.794 CONFIG_PPPOATM=m 8.795 CONFIG_SLIP=m 8.796 CONFIG_SLIP_COMPRESSED=y 8.797 CONFIG_SLIP_SMART=y 8.798 -CONFIG_SLIP_MODE_SLIP6=y 8.799 +# CONFIG_SLIP_MODE_SLIP6 is not set 8.800 CONFIG_NET_FC=y 8.801 -CONFIG_SHAPER=m 8.802 +# CONFIG_SHAPER is not set 8.803 CONFIG_NETCONSOLE=m 8.804 8.805 # 8.806 @@ -1240,16 +1149,15 @@ CONFIG_ISDN_PPP=y 8.807 CONFIG_ISDN_PPP_VJ=y 8.808 CONFIG_ISDN_MPP=y 8.809 CONFIG_IPPP_FILTER=y 8.810 -CONFIG_ISDN_PPP_BSDCOMP=m 8.811 +# CONFIG_ISDN_PPP_BSDCOMP is not set 8.812 CONFIG_ISDN_AUDIO=y 8.813 CONFIG_ISDN_TTY_FAX=y 8.814 -CONFIG_ISDN_X25=y 8.815 8.816 # 8.817 # ISDN feature submodules 8.818 # 8.819 CONFIG_ISDN_DRV_LOOP=m 8.820 -# CONFIG_ISDN_DIVERSION is not set 8.821 +CONFIG_ISDN_DIVERSION=m 8.822 8.823 # 8.824 # ISDN4Linux hardware drivers 8.825 @@ -1265,9 +1173,9 @@ CONFIG_ISDN_DRV_HISAX=m 8.826 # 8.827 CONFIG_HISAX_EURO=y 8.828 CONFIG_DE_AOC=y 8.829 -# CONFIG_HISAX_NO_SENDCOMPLETE is not set 8.830 -# CONFIG_HISAX_NO_LLC is not set 8.831 -# CONFIG_HISAX_NO_KEYPAD is not set 8.832 +CONFIG_HISAX_NO_SENDCOMPLETE=y 8.833 +CONFIG_HISAX_NO_LLC=y 8.834 +CONFIG_HISAX_NO_KEYPAD=y 8.835 CONFIG_HISAX_1TR6=y 8.836 CONFIG_HISAX_NI1=y 8.837 CONFIG_HISAX_MAX_CARDS=8 8.838 @@ -1342,19 +1250,12 @@ CONFIG_ISDN_DRV_AVMB1_C4=m 8.839 # 8.840 # Active Eicon DIVA Server cards 8.841 # 8.842 -CONFIG_CAPI_EICON=y 8.843 -CONFIG_ISDN_DIVAS=m 8.844 -CONFIG_ISDN_DIVAS_BRIPCI=y 8.845 -CONFIG_ISDN_DIVAS_PRIPCI=y 8.846 -CONFIG_ISDN_DIVAS_DIVACAPI=m 8.847 -CONFIG_ISDN_DIVAS_USERIDI=m 8.848 -CONFIG_ISDN_DIVAS_MAINT=m 8.849 +# CONFIG_CAPI_EICON is not set 8.850 8.851 # 8.852 # Telephony Support 8.853 # 8.854 -CONFIG_PHONE=m 8.855 -CONFIG_PHONE_IXJ=m 8.856 +# CONFIG_PHONE is not set 8.857 8.858 # 8.859 # Input device support 8.860 @@ -1365,27 +1266,25 @@ CONFIG_INPUT=y 8.861 # Userland interfaces 8.862 # 8.863 CONFIG_INPUT_MOUSEDEV=y 8.864 -CONFIG_INPUT_MOUSEDEV_PSAUX=y 8.865 +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 8.866 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 8.867 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 8.868 CONFIG_INPUT_JOYDEV=m 8.869 -CONFIG_INPUT_TSDEV=m 8.870 -CONFIG_INPUT_TSDEV_SCREEN_X=240 8.871 -CONFIG_INPUT_TSDEV_SCREEN_Y=320 8.872 -CONFIG_INPUT_EVDEV=m 8.873 -CONFIG_INPUT_EVBUG=m 8.874 +# CONFIG_INPUT_TSDEV is not set 8.875 +CONFIG_INPUT_EVDEV=y 8.876 +# CONFIG_INPUT_EVBUG is not set 8.877 8.878 # 8.879 # Input Device Drivers 8.880 # 8.881 CONFIG_INPUT_KEYBOARD=y 8.882 CONFIG_KEYBOARD_ATKBD=y 8.883 -CONFIG_KEYBOARD_SUNKBD=m 8.884 -CONFIG_KEYBOARD_LKKBD=m 8.885 -CONFIG_KEYBOARD_XTKBD=m 8.886 -CONFIG_KEYBOARD_NEWTON=m 8.887 +# CONFIG_KEYBOARD_SUNKBD is not set 8.888 +# CONFIG_KEYBOARD_LKKBD is not set 8.889 +# CONFIG_KEYBOARD_XTKBD is not set 8.890 +# CONFIG_KEYBOARD_NEWTON is not set 8.891 CONFIG_INPUT_MOUSE=y 8.892 -CONFIG_MOUSE_PS2=m 8.893 +CONFIG_MOUSE_PS2=y 8.894 CONFIG_MOUSE_SERIAL=m 8.895 CONFIG_MOUSE_VSXXXAA=m 8.896 CONFIG_INPUT_JOYSTICK=y 8.897 @@ -1427,19 +1326,19 @@ CONFIG_INPUT_UINPUT=m 8.898 # 8.899 CONFIG_SERIO=y 8.900 CONFIG_SERIO_I8042=y 8.901 -CONFIG_SERIO_SERPORT=m 8.902 -CONFIG_SERIO_CT82C710=m 8.903 -CONFIG_SERIO_PARKBD=m 8.904 -CONFIG_SERIO_PCIPS2=m 8.905 +CONFIG_SERIO_SERPORT=y 8.906 +# CONFIG_SERIO_CT82C710 is not set 8.907 +# CONFIG_SERIO_PARKBD is not set 8.908 +# CONFIG_SERIO_PCIPS2 is not set 8.909 CONFIG_SERIO_LIBPS2=y 8.910 -CONFIG_SERIO_RAW=m 8.911 +# CONFIG_SERIO_RAW is not set 8.912 CONFIG_GAMEPORT=m 8.913 CONFIG_GAMEPORT_NS558=m 8.914 CONFIG_GAMEPORT_L4=m 8.915 CONFIG_GAMEPORT_EMU10K1=m 8.916 CONFIG_GAMEPORT_VORTEX=m 8.917 CONFIG_GAMEPORT_FM801=m 8.918 -# CONFIG_GAMEPORT_CS461X is not set 8.919 +CONFIG_GAMEPORT_CS461X=m 8.920 8.921 # 8.922 # Character devices 8.923 @@ -1452,21 +1351,16 @@ CONFIG_HW_CONSOLE=y 8.924 # 8.925 # Serial drivers 8.926 # 8.927 -CONFIG_SERIAL_8250=m 8.928 -# CONFIG_SERIAL_8250_ACPI is not set 8.929 -CONFIG_SERIAL_8250_NR_UARTS=4 8.930 -# CONFIG_SERIAL_8250_EXTENDED is not set 8.931 +# CONFIG_SERIAL_8250 is not set 8.932 8.933 # 8.934 # Non-8250 serial port support 8.935 # 8.936 -CONFIG_SERIAL_CORE=m 8.937 -CONFIG_SERIAL_JSM=m 8.938 +# CONFIG_SERIAL_JSM is not set 8.939 CONFIG_UNIX98_PTYS=y 8.940 -CONFIG_LEGACY_PTYS=y 8.941 -CONFIG_LEGACY_PTY_COUNT=256 8.942 +# CONFIG_LEGACY_PTYS is not set 8.943 CONFIG_PRINTER=m 8.944 -# CONFIG_LP_CONSOLE is not set 8.945 +CONFIG_LP_CONSOLE=y 8.946 CONFIG_PPDEV=m 8.947 CONFIG_TIPAR=m 8.948 8.949 @@ -1500,7 +1394,7 @@ CONFIG_IB700_WDT=m 8.950 CONFIG_WAFER_WDT=m 8.951 CONFIG_I8XX_TCO=m 8.952 CONFIG_SC1200_WDT=m 8.953 -CONFIG_60XX_WDT=m 8.954 +# CONFIG_60XX_WDT is not set 8.955 CONFIG_CPU5_WDT=m 8.956 CONFIG_W83627HF_WDT=m 8.957 CONFIG_W83877F_WDT=m 8.958 @@ -1518,67 +1412,31 @@ CONFIG_WDT_501_PCI=y 8.959 # 8.960 CONFIG_USBPCWATCHDOG=m 8.961 CONFIG_HW_RANDOM=m 8.962 -CONFIG_NVRAM=m 8.963 -CONFIG_RTC=m 8.964 -CONFIG_GEN_RTC=m 8.965 -CONFIG_GEN_RTC_X=y 8.966 +# CONFIG_NVRAM is not set 8.967 +CONFIG_RTC=y 8.968 CONFIG_DTLK=m 8.969 CONFIG_R3964=m 8.970 -CONFIG_APPLICOM=m 8.971 +# CONFIG_APPLICOM is not set 8.972 8.973 # 8.974 # Ftape, the floppy tape device driver 8.975 # 8.976 -CONFIG_FTAPE=m 8.977 -CONFIG_ZFTAPE=m 8.978 -CONFIG_ZFT_DFLT_BLK_SZ=10240 8.979 - 8.980 -# 8.981 -# The compressor will be built as a module only! 8.982 -# 8.983 -CONFIG_ZFT_COMPRESSOR=m 8.984 -CONFIG_FT_NR_BUFFERS=3 8.985 -CONFIG_FT_PROC_FS=y 8.986 -CONFIG_FT_NORMAL_DEBUG=y 8.987 -# CONFIG_FT_FULL_DEBUG is not set 8.988 -# CONFIG_FT_NO_TRACE is not set 8.989 -# CONFIG_FT_NO_TRACE_AT_ALL is not set 8.990 - 8.991 -# 8.992 -# Hardware configuration 8.993 -# 8.994 -CONFIG_FT_STD_FDC=y 8.995 -# CONFIG_FT_MACH2 is not set 8.996 -# CONFIG_FT_PROBE_FC10 is not set 8.997 -# CONFIG_FT_ALT_FDC is not set 8.998 -CONFIG_FT_FDC_THR=8 8.999 -CONFIG_FT_FDC_MAX_RATE=2000 8.1000 -CONFIG_FT_ALPHA_CLOCK=0 8.1001 -CONFIG_AGP=m 8.1002 -CONFIG_AGP_AMD64=m 8.1003 -CONFIG_AGP_INTEL=m 8.1004 +# CONFIG_FTAPE is not set 8.1005 +# CONFIG_AGP is not set 8.1006 CONFIG_DRM=m 8.1007 CONFIG_DRM_TDFX=m 8.1008 # CONFIG_DRM_GAMMA is not set 8.1009 CONFIG_DRM_R128=m 8.1010 CONFIG_DRM_RADEON=m 8.1011 -CONFIG_DRM_I810=m 8.1012 -CONFIG_DRM_I830=m 8.1013 -CONFIG_DRM_I915=m 8.1014 -CONFIG_DRM_MGA=m 8.1015 -CONFIG_DRM_SIS=m 8.1016 -CONFIG_MWAVE=m 8.1017 -CONFIG_RAW_DRIVER=m 8.1018 +# CONFIG_MWAVE is not set 8.1019 +# CONFIG_RAW_DRIVER is not set 8.1020 # CONFIG_HPET is not set 8.1021 -CONFIG_MAX_RAW_DEVS=256 8.1022 CONFIG_HANGCHECK_TIMER=m 8.1023 8.1024 # 8.1025 # TPM devices 8.1026 # 8.1027 -CONFIG_TCG_TPM=m 8.1028 -CONFIG_TCG_NSC=m 8.1029 -CONFIG_TCG_ATMEL=m 8.1030 +# CONFIG_TCG_TPM is not set 8.1031 8.1032 # 8.1033 # I2C support 8.1034 @@ -1596,24 +1454,24 @@ CONFIG_I2C_ALGOPCA=m 8.1035 # 8.1036 # I2C Hardware Bus support 8.1037 # 8.1038 -CONFIG_I2C_ALI1535=m 8.1039 -CONFIG_I2C_ALI1563=m 8.1040 -CONFIG_I2C_ALI15X3=m 8.1041 +# CONFIG_I2C_ALI1535 is not set 8.1042 +# CONFIG_I2C_ALI1563 is not set 8.1043 +# CONFIG_I2C_ALI15X3 is not set 8.1044 CONFIG_I2C_AMD756=m 8.1045 CONFIG_I2C_AMD756_S4882=m 8.1046 CONFIG_I2C_AMD8111=m 8.1047 -CONFIG_I2C_I801=m 8.1048 -CONFIG_I2C_I810=m 8.1049 -CONFIG_I2C_PIIX4=m 8.1050 +# CONFIG_I2C_I801 is not set 8.1051 +# CONFIG_I2C_I810 is not set 8.1052 +# CONFIG_I2C_PIIX4 is not set 8.1053 CONFIG_I2C_ISA=m 8.1054 CONFIG_I2C_NFORCE2=m 8.1055 -CONFIG_I2C_PARPORT=m 8.1056 -CONFIG_I2C_PARPORT_LIGHT=m 8.1057 +# CONFIG_I2C_PARPORT is not set 8.1058 +# CONFIG_I2C_PARPORT_LIGHT is not set 8.1059 CONFIG_I2C_PROSAVAGE=m 8.1060 CONFIG_I2C_SAVAGE4=m 8.1061 -CONFIG_SCx200_ACB=m 8.1062 -CONFIG_I2C_SIS5595=m 8.1063 -CONFIG_I2C_SIS630=m 8.1064 +# CONFIG_SCx200_ACB is not set 8.1065 +# CONFIG_I2C_SIS5595 is not set 8.1066 +# CONFIG_I2C_SIS630 is not set 8.1067 CONFIG_I2C_SIS96X=m 8.1068 CONFIG_I2C_STUB=m 8.1069 CONFIG_I2C_VIA=m 8.1070 @@ -1648,7 +1506,7 @@ CONFIG_SENSORS_LM90=m 8.1071 CONFIG_SENSORS_LM92=m 8.1072 CONFIG_SENSORS_MAX1619=m 8.1073 CONFIG_SENSORS_PC87360=m 8.1074 -# CONFIG_SENSORS_SMSC47B397 is not set 8.1075 +CONFIG_SENSORS_SMSC47B397=m 8.1076 CONFIG_SENSORS_SIS5595=m 8.1077 CONFIG_SENSORS_SMSC47M1=m 8.1078 CONFIG_SENSORS_VIA686A=m 8.1079 @@ -1682,7 +1540,7 @@ CONFIG_W1_SMEM=m 8.1080 # 8.1081 # Misc devices 8.1082 # 8.1083 -CONFIG_IBM_ASM=m 8.1084 +# CONFIG_IBM_ASM is not set 8.1085 8.1086 # 8.1087 # Multimedia devices 8.1088 @@ -1714,13 +1572,14 @@ CONFIG_VIDEO_ZORAN_DC30=m 8.1089 CONFIG_VIDEO_ZORAN_LML33=m 8.1090 CONFIG_VIDEO_ZORAN_LML33R10=m 8.1091 # CONFIG_VIDEO_ZR36120 is not set 8.1092 -# CONFIG_VIDEO_SAA7134 is not set 8.1093 +CONFIG_VIDEO_SAA7134=m 8.1094 +CONFIG_VIDEO_SAA7134_DVB=m 8.1095 CONFIG_VIDEO_MXB=m 8.1096 CONFIG_VIDEO_DPC=m 8.1097 CONFIG_VIDEO_HEXIUM_ORION=m 8.1098 CONFIG_VIDEO_HEXIUM_GEMINI=m 8.1099 CONFIG_VIDEO_CX88=m 8.1100 -# CONFIG_VIDEO_CX88_DVB is not set 8.1101 +CONFIG_VIDEO_CX88_DVB=m 8.1102 CONFIG_VIDEO_OVCAMCHIP=m 8.1103 8.1104 # 8.1105 @@ -1740,7 +1599,7 @@ CONFIG_DVB_CORE=m 8.1106 # Supported SAA7146 based PCI Adapters 8.1107 # 8.1108 CONFIG_DVB_AV7110=m 8.1109 -# CONFIG_DVB_AV7110_OSD is not set 8.1110 +CONFIG_DVB_AV7110_OSD=y 8.1111 CONFIG_DVB_BUDGET=m 8.1112 CONFIG_DVB_BUDGET_CI=m 8.1113 CONFIG_DVB_BUDGET_AV=m 8.1114 @@ -1755,7 +1614,12 @@ CONFIG_DVB_DIBUSB=m 8.1115 CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES=y 8.1116 # CONFIG_DVB_DIBCOM_DEBUG is not set 8.1117 CONFIG_DVB_CINERGYT2=m 8.1118 -# CONFIG_DVB_CINERGYT2_TUNING is not set 8.1119 +CONFIG_DVB_CINERGYT2_TUNING=y 8.1120 +CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32 8.1121 +CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512 8.1122 +CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250 8.1123 +CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y 8.1124 +CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100 8.1125 8.1126 # 8.1127 # Supported FlexCopII (B2C2) Adapters 8.1128 @@ -1822,6 +1686,7 @@ CONFIG_VIDEO_SAA7146_VV=m 8.1129 CONFIG_VIDEO_VIDEOBUF=m 8.1130 CONFIG_VIDEO_TUNER=m 8.1131 CONFIG_VIDEO_BUF=m 8.1132 +CONFIG_VIDEO_BUF_DVB=m 8.1133 CONFIG_VIDEO_BTCX=m 8.1134 CONFIG_VIDEO_IR=m 8.1135 CONFIG_VIDEO_TVEEPROM=m 8.1136 @@ -1830,36 +1695,34 @@ CONFIG_VIDEO_TVEEPROM=m 8.1137 # Graphics support 8.1138 # 8.1139 CONFIG_FB=y 8.1140 -CONFIG_FB_CFB_FILLRECT=m 8.1141 -CONFIG_FB_CFB_COPYAREA=m 8.1142 -CONFIG_FB_CFB_IMAGEBLIT=m 8.1143 -CONFIG_FB_SOFT_CURSOR=m 8.1144 +CONFIG_FB_CFB_FILLRECT=y 8.1145 +CONFIG_FB_CFB_COPYAREA=y 8.1146 +CONFIG_FB_CFB_IMAGEBLIT=y 8.1147 +CONFIG_FB_SOFT_CURSOR=y 8.1148 # CONFIG_FB_MACMODES is not set 8.1149 CONFIG_FB_MODE_HELPERS=y 8.1150 CONFIG_FB_TILEBLITTING=y 8.1151 CONFIG_FB_CIRRUS=m 8.1152 -CONFIG_FB_PM2=m 8.1153 -CONFIG_FB_PM2_FIFO_DISCONNECT=y 8.1154 -CONFIG_FB_CYBER2000=m 8.1155 +# CONFIG_FB_PM2 is not set 8.1156 +# CONFIG_FB_CYBER2000 is not set 8.1157 # CONFIG_FB_ASILIANT is not set 8.1158 # CONFIG_FB_IMSTT is not set 8.1159 CONFIG_FB_VGA16=m 8.1160 -# CONFIG_FB_VESA is not set 8.1161 +CONFIG_FB_VESA=y 8.1162 CONFIG_VIDEO_SELECT=y 8.1163 -CONFIG_FB_HGA=m 8.1164 -# CONFIG_FB_HGA_ACCEL is not set 8.1165 -CONFIG_FB_NVIDIA=m 8.1166 -CONFIG_FB_NVIDIA_I2C=y 8.1167 +# CONFIG_FB_HGA is not set 8.1168 +# CONFIG_FB_NVIDIA is not set 8.1169 CONFIG_FB_RIVA=m 8.1170 -CONFIG_FB_RIVA_I2C=y 8.1171 -CONFIG_FB_RIVA_DEBUG=y 8.1172 +# CONFIG_FB_RIVA_I2C is not set 8.1173 +# CONFIG_FB_RIVA_DEBUG is not set 8.1174 CONFIG_FB_MATROX=m 8.1175 CONFIG_FB_MATROX_MILLENIUM=y 8.1176 CONFIG_FB_MATROX_MYSTIQUE=y 8.1177 -# CONFIG_FB_MATROX_G is not set 8.1178 +CONFIG_FB_MATROX_G=y 8.1179 CONFIG_FB_MATROX_I2C=m 8.1180 +CONFIG_FB_MATROX_MAVEN=m 8.1181 CONFIG_FB_MATROX_MULTIHEAD=y 8.1182 -CONFIG_FB_RADEON_OLD=m 8.1183 +# CONFIG_FB_RADEON_OLD is not set 8.1184 CONFIG_FB_RADEON=m 8.1185 CONFIG_FB_RADEON_I2C=y 8.1186 # CONFIG_FB_RADEON_DEBUG is not set 8.1187 @@ -1867,33 +1730,30 @@ CONFIG_FB_ATY128=m 8.1188 CONFIG_FB_ATY=m 8.1189 CONFIG_FB_ATY_CT=y 8.1190 CONFIG_FB_ATY_GENERIC_LCD=y 8.1191 -CONFIG_FB_ATY_XL_INIT=y 8.1192 +# CONFIG_FB_ATY_XL_INIT is not set 8.1193 CONFIG_FB_ATY_GX=y 8.1194 CONFIG_FB_SAVAGE=m 8.1195 CONFIG_FB_SAVAGE_I2C=y 8.1196 CONFIG_FB_SAVAGE_ACCEL=y 8.1197 -CONFIG_FB_SIS=m 8.1198 -CONFIG_FB_SIS_300=y 8.1199 -CONFIG_FB_SIS_315=y 8.1200 +# CONFIG_FB_SIS is not set 8.1201 CONFIG_FB_NEOMAGIC=m 8.1202 CONFIG_FB_KYRO=m 8.1203 CONFIG_FB_3DFX=m 8.1204 -# CONFIG_FB_3DFX_ACCEL is not set 8.1205 +CONFIG_FB_3DFX_ACCEL=y 8.1206 CONFIG_FB_VOODOO1=m 8.1207 CONFIG_FB_TRIDENT=m 8.1208 -# CONFIG_FB_TRIDENT_ACCEL is not set 8.1209 +CONFIG_FB_TRIDENT_ACCEL=y 8.1210 # CONFIG_FB_PM3 is not set 8.1211 -CONFIG_FB_GEODE=y 8.1212 -CONFIG_FB_GEODE_GX1=m 8.1213 -CONFIG_FB_S1D13XXX=m 8.1214 -CONFIG_FB_VIRTUAL=m 8.1215 +# CONFIG_FB_GEODE is not set 8.1216 +# CONFIG_FB_S1D13XXX is not set 8.1217 +# CONFIG_FB_VIRTUAL is not set 8.1218 8.1219 # 8.1220 # Console display driver support 8.1221 # 8.1222 CONFIG_VGA_CONSOLE=y 8.1223 CONFIG_DUMMY_CONSOLE=y 8.1224 -CONFIG_FRAMEBUFFER_CONSOLE=m 8.1225 +CONFIG_FRAMEBUFFER_CONSOLE=y 8.1226 # CONFIG_FONTS is not set 8.1227 CONFIG_FONT_8x8=y 8.1228 CONFIG_FONT_8x16=y 8.1229 @@ -1901,8 +1761,15 @@ CONFIG_FONT_8x16=y 8.1230 # 8.1231 # Logo configuration 8.1232 # 8.1233 -# CONFIG_LOGO is not set 8.1234 -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 8.1235 +CONFIG_LOGO=y 8.1236 +# CONFIG_LOGO_LINUX_MONO is not set 8.1237 +# CONFIG_LOGO_LINUX_VGA16 is not set 8.1238 +CONFIG_LOGO_LINUX_CLUT224=y 8.1239 +CONFIG_BACKLIGHT_LCD_SUPPORT=y 8.1240 +CONFIG_BACKLIGHT_CLASS_DEVICE=m 8.1241 +CONFIG_BACKLIGHT_DEVICE=y 8.1242 +CONFIG_LCD_CLASS_DEVICE=m 8.1243 +CONFIG_LCD_DEVICE=y 8.1244 8.1245 # 8.1246 # Sound 8.1247 @@ -1936,7 +1803,7 @@ CONFIG_SND_VX_LIB=m 8.1248 CONFIG_SND_DUMMY=m 8.1249 CONFIG_SND_VIRMIDI=m 8.1250 CONFIG_SND_MTPAV=m 8.1251 -CONFIG_SND_SERIAL_U16550=m 8.1252 +# CONFIG_SND_SERIAL_U16550 is not set 8.1253 CONFIG_SND_MPU401=m 8.1254 8.1255 # 8.1256 @@ -1956,8 +1823,8 @@ CONFIG_SND_CS46XX=m 8.1257 CONFIG_SND_CS46XX_NEW_DSP=y 8.1258 CONFIG_SND_CS4281=m 8.1259 CONFIG_SND_EMU10K1=m 8.1260 -# CONFIG_SND_EMU10K1X is not set 8.1261 -# CONFIG_SND_CA0106 is not set 8.1262 +CONFIG_SND_EMU10K1X=m 8.1263 +CONFIG_SND_CA0106=m 8.1264 CONFIG_SND_KORG1212=m 8.1265 CONFIG_SND_MIXART=m 8.1266 CONFIG_SND_NM256=m 8.1267 @@ -1982,7 +1849,7 @@ CONFIG_SND_INTEL8X0=m 8.1268 CONFIG_SND_INTEL8X0M=m 8.1269 CONFIG_SND_SONICVIBES=m 8.1270 CONFIG_SND_VIA82XX=m 8.1271 -# CONFIG_SND_VIA82XX_MODEM is not set 8.1272 +CONFIG_SND_VIA82XX_MODEM=m 8.1273 CONFIG_SND_VX222=m 8.1274 CONFIG_SND_HDA_INTEL=m 8.1275 8.1276 @@ -1995,75 +1862,7 @@ CONFIG_SND_USB_USX2Y=m 8.1277 # 8.1278 # Open Sound System 8.1279 # 8.1280 -CONFIG_SOUND_PRIME=m 8.1281 -CONFIG_SOUND_BT878=m 8.1282 -CONFIG_SOUND_CMPCI=m 8.1283 -# CONFIG_SOUND_CMPCI_FM is not set 8.1284 -# CONFIG_SOUND_CMPCI_MIDI is not set 8.1285 -CONFIG_SOUND_CMPCI_JOYSTICK=y 8.1286 -CONFIG_SOUND_EMU10K1=m 8.1287 -CONFIG_MIDI_EMU10K1=y 8.1288 -CONFIG_SOUND_FUSION=m 8.1289 -CONFIG_SOUND_CS4281=m 8.1290 -CONFIG_SOUND_ES1370=m 8.1291 -CONFIG_SOUND_ES1371=m 8.1292 -CONFIG_SOUND_ESSSOLO1=m 8.1293 -CONFIG_SOUND_MAESTRO=m 8.1294 -CONFIG_SOUND_MAESTRO3=m 8.1295 -CONFIG_SOUND_ICH=m 8.1296 -CONFIG_SOUND_SONICVIBES=m 8.1297 -CONFIG_SOUND_TRIDENT=m 8.1298 -# CONFIG_SOUND_MSNDCLAS is not set 8.1299 -# CONFIG_SOUND_MSNDPIN is not set 8.1300 -CONFIG_SOUND_VIA82CXXX=m 8.1301 -CONFIG_MIDI_VIA82CXXX=y 8.1302 -CONFIG_SOUND_OSS=m 8.1303 -# CONFIG_SOUND_TRACEINIT is not set 8.1304 -# CONFIG_SOUND_DMAP is not set 8.1305 -# CONFIG_SOUND_AD1816 is not set 8.1306 -CONFIG_SOUND_AD1889=m 8.1307 -CONFIG_SOUND_SGALAXY=m 8.1308 -CONFIG_SOUND_ADLIB=m 8.1309 -CONFIG_SOUND_ACI_MIXER=m 8.1310 -CONFIG_SOUND_CS4232=m 8.1311 -CONFIG_SOUND_SSCAPE=m 8.1312 -CONFIG_SOUND_GUS=m 8.1313 -CONFIG_SOUND_GUS16=y 8.1314 -CONFIG_SOUND_GUSMAX=y 8.1315 -CONFIG_SOUND_VMIDI=m 8.1316 -CONFIG_SOUND_TRIX=m 8.1317 -CONFIG_SOUND_MSS=m 8.1318 -CONFIG_SOUND_MPU401=m 8.1319 -CONFIG_SOUND_NM256=m 8.1320 -CONFIG_SOUND_MAD16=m 8.1321 -CONFIG_MAD16_OLDCARD=y 8.1322 -CONFIG_SOUND_PAS=m 8.1323 -CONFIG_SOUND_PSS=m 8.1324 -CONFIG_PSS_MIXER=y 8.1325 -CONFIG_SOUND_SB=m 8.1326 -# CONFIG_SOUND_AWE32_SYNTH is not set 8.1327 -CONFIG_SOUND_WAVEFRONT=m 8.1328 -CONFIG_SOUND_MAUI=m 8.1329 -CONFIG_SOUND_YM3812=m 8.1330 -CONFIG_SOUND_OPL3SA1=m 8.1331 -CONFIG_SOUND_OPL3SA2=m 8.1332 -CONFIG_SOUND_YMFPCI=m 8.1333 -# CONFIG_SOUND_YMFPCI_LEGACY is not set 8.1334 -CONFIG_SOUND_UART6850=m 8.1335 -CONFIG_SOUND_AEDSP16=m 8.1336 -CONFIG_SC6600=y 8.1337 -CONFIG_SC6600_JOY=y 8.1338 -CONFIG_SC6600_CDROM=4 8.1339 -CONFIG_SC6600_CDROMBASE=0x0 8.1340 -# CONFIG_AEDSP16_MSS is not set 8.1341 -# CONFIG_AEDSP16_SBPRO is not set 8.1342 -# CONFIG_AEDSP16_MPU401 is not set 8.1343 -CONFIG_SOUND_TVMIXER=m 8.1344 -CONFIG_SOUND_KAHLUA=m 8.1345 -CONFIG_SOUND_ALI5455=m 8.1346 -CONFIG_SOUND_FORTE=m 8.1347 -CONFIG_SOUND_RME96XX=m 8.1348 -CONFIG_SOUND_AD1980=m 8.1349 +# CONFIG_SOUND_PRIME is not set 8.1350 8.1351 # 8.1352 # USB support 8.1353 @@ -2077,14 +1876,14 @@ CONFIG_USB=y 8.1354 # Miscellaneous USB options 8.1355 # 8.1356 CONFIG_USB_DEVICEFS=y 8.1357 -CONFIG_USB_BANDWIDTH=y 8.1358 +# CONFIG_USB_BANDWIDTH is not set 8.1359 # CONFIG_USB_DYNAMIC_MINORS is not set 8.1360 # CONFIG_USB_OTG is not set 8.1361 8.1362 # 8.1363 # USB Host Controller Drivers 8.1364 # 8.1365 -CONFIG_USB_EHCI_HCD=y 8.1366 +CONFIG_USB_EHCI_HCD=m 8.1367 CONFIG_USB_EHCI_SPLIT_ISO=y 8.1368 CONFIG_USB_EHCI_ROOT_HUB_TT=y 8.1369 CONFIG_USB_OHCI_HCD=m 8.1370 @@ -2096,7 +1895,7 @@ CONFIG_USB_SL811_HCD=m 8.1371 # 8.1372 # USB Device Class drivers 8.1373 # 8.1374 -CONFIG_USB_AUDIO=m 8.1375 +# CONFIG_USB_AUDIO is not set 8.1376 8.1377 # 8.1378 # USB Bluetooth TTY can only be used with disabled Bluetooth subsystem 8.1379 @@ -2122,16 +1921,13 @@ CONFIG_USB_STORAGE_JUMPSHOT=y 8.1380 # 8.1381 # USB Input Devices 8.1382 # 8.1383 -CONFIG_USB_HID=m 8.1384 +CONFIG_USB_HID=y 8.1385 CONFIG_USB_HIDINPUT=y 8.1386 -# CONFIG_HID_FF is not set 8.1387 +CONFIG_HID_FF=y 8.1388 +CONFIG_HID_PID=y 8.1389 +CONFIG_LOGITECH_FF=y 8.1390 +CONFIG_THRUSTMASTER_FF=y 8.1391 CONFIG_USB_HIDDEV=y 8.1392 - 8.1393 -# 8.1394 -# USB HID Boot Protocol drivers 8.1395 -# 8.1396 -CONFIG_USB_KBD=y 8.1397 -CONFIG_USB_MOUSE=y 8.1398 CONFIG_USB_AIPTEK=m 8.1399 CONFIG_USB_WACOM=m 8.1400 CONFIG_USB_KBTAB=m 8.1401 @@ -2150,7 +1946,7 @@ CONFIG_USB_MICROTEK=m 8.1402 # 8.1403 # USB Multimedia devices 8.1404 # 8.1405 -# CONFIG_USB_DABUSB is not set 8.1406 +CONFIG_USB_DABUSB=m 8.1407 CONFIG_USB_VICAM=m 8.1408 CONFIG_USB_DSBR=m 8.1409 CONFIG_USB_IBMCAM=m 8.1410 @@ -2220,30 +2016,30 @@ CONFIG_USB_SERIAL_IPAQ=m 8.1411 CONFIG_USB_SERIAL_IR=m 8.1412 CONFIG_USB_SERIAL_EDGEPORT=m 8.1413 CONFIG_USB_SERIAL_EDGEPORT_TI=m 8.1414 -# CONFIG_USB_SERIAL_GARMIN is not set 8.1415 +CONFIG_USB_SERIAL_GARMIN=m 8.1416 CONFIG_USB_SERIAL_IPW=m 8.1417 CONFIG_USB_SERIAL_KEYSPAN_PDA=m 8.1418 CONFIG_USB_SERIAL_KEYSPAN=m 8.1419 -# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set 8.1420 -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set 8.1421 -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set 8.1422 -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set 8.1423 -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set 8.1424 -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set 8.1425 -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set 8.1426 -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set 8.1427 -# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set 8.1428 -# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set 8.1429 -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set 8.1430 -# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set 8.1431 +CONFIG_USB_SERIAL_KEYSPAN_MPR=y 8.1432 +CONFIG_USB_SERIAL_KEYSPAN_USA28=y 8.1433 +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y 8.1434 +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y 8.1435 +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y 8.1436 +CONFIG_USB_SERIAL_KEYSPAN_USA19=y 8.1437 +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y 8.1438 +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y 8.1439 +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y 8.1440 +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y 8.1441 +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y 8.1442 +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y 8.1443 CONFIG_USB_SERIAL_KLSI=m 8.1444 CONFIG_USB_SERIAL_KOBIL_SCT=m 8.1445 CONFIG_USB_SERIAL_MCT_U232=m 8.1446 CONFIG_USB_SERIAL_PL2303=m 8.1447 CONFIG_USB_SERIAL_HP4X=m 8.1448 CONFIG_USB_SERIAL_SAFE=m 8.1449 -# CONFIG_USB_SERIAL_SAFE_PADDED is not set 8.1450 -# CONFIG_USB_SERIAL_TI is not set 8.1451 +CONFIG_USB_SERIAL_SAFE_PADDED=y 8.1452 +CONFIG_USB_SERIAL_TI=m 8.1453 CONFIG_USB_SERIAL_CYBERJACK=m 8.1454 CONFIG_USB_SERIAL_XIRCOM=m 8.1455 CONFIG_USB_SERIAL_OMNINET=m 8.1456 @@ -2252,17 +2048,17 @@ CONFIG_USB_EZUSB=y 8.1457 # 8.1458 # USB Miscellaneous drivers 8.1459 # 8.1460 -# CONFIG_USB_EMI62 is not set 8.1461 +CONFIG_USB_EMI62=m 8.1462 # CONFIG_USB_EMI26 is not set 8.1463 CONFIG_USB_AUERSWALD=m 8.1464 CONFIG_USB_RIO500=m 8.1465 CONFIG_USB_LEGOTOWER=m 8.1466 CONFIG_USB_LCD=m 8.1467 CONFIG_USB_LED=m 8.1468 -CONFIG_USB_CYTHERM=m 8.1469 +# CONFIG_USB_CYTHERM is not set 8.1470 CONFIG_USB_PHIDGETKIT=m 8.1471 CONFIG_USB_PHIDGETSERVO=m 8.1472 -# CONFIG_USB_IDMOUSE is not set 8.1473 +CONFIG_USB_IDMOUSE=m 8.1474 CONFIG_USB_SISUSBVGA=m 8.1475 CONFIG_USB_TEST=m 8.1476 8.1477 @@ -2275,33 +2071,24 @@ CONFIG_USB_SPEEDTOUCH=m 8.1478 # 8.1479 # USB Gadget Support 8.1480 # 8.1481 -CONFIG_USB_GADGET=m 8.1482 -# CONFIG_USB_GADGET_DEBUG_FILES is not set 8.1483 -CONFIG_USB_GADGET_NET2280=y 8.1484 -CONFIG_USB_NET2280=m 8.1485 -# CONFIG_USB_GADGET_PXA2XX is not set 8.1486 -# CONFIG_USB_GADGET_GOKU is not set 8.1487 -# CONFIG_USB_GADGET_LH7A40X is not set 8.1488 -# CONFIG_USB_GADGET_OMAP is not set 8.1489 -# CONFIG_USB_GADGET_DUMMY_HCD is not set 8.1490 -CONFIG_USB_GADGET_DUALSPEED=y 8.1491 -CONFIG_USB_ZERO=m 8.1492 -CONFIG_USB_ETH=m 8.1493 -CONFIG_USB_ETH_RNDIS=y 8.1494 -CONFIG_USB_GADGETFS=m 8.1495 -CONFIG_USB_FILE_STORAGE=m 8.1496 -# CONFIG_USB_FILE_STORAGE_TEST is not set 8.1497 -CONFIG_USB_G_SERIAL=m 8.1498 +# CONFIG_USB_GADGET is not set 8.1499 8.1500 # 8.1501 # MMC/SD Card support 8.1502 # 8.1503 -# CONFIG_MMC is not set 8.1504 +CONFIG_MMC=m 8.1505 +# CONFIG_MMC_DEBUG is not set 8.1506 +CONFIG_MMC_BLOCK=m 8.1507 +CONFIG_MMC_WBSD=m 8.1508 8.1509 # 8.1510 # InfiniBand support 8.1511 # 8.1512 -# CONFIG_INFINIBAND is not set 8.1513 +CONFIG_INFINIBAND=m 8.1514 +CONFIG_INFINIBAND_MTHCA=m 8.1515 +# CONFIG_INFINIBAND_MTHCA_DEBUG is not set 8.1516 +CONFIG_INFINIBAND_IPOIB=m 8.1517 +# CONFIG_INFINIBAND_IPOIB_DEBUG is not set 8.1518 8.1519 # 8.1520 # Power management options 8.1521 @@ -2335,7 +2122,7 @@ CONFIG_ACPI_SYSTEM=y 8.1522 # 8.1523 # File systems 8.1524 # 8.1525 -CONFIG_EXT2_FS=m 8.1526 +CONFIG_EXT2_FS=y 8.1527 CONFIG_EXT2_FS_XATTR=y 8.1528 CONFIG_EXT2_FS_POSIX_ACL=y 8.1529 CONFIG_EXT2_FS_SECURITY=y 8.1530 @@ -2345,16 +2132,18 @@ CONFIG_EXT3_FS_POSIX_ACL=y 8.1531 CONFIG_EXT3_FS_SECURITY=y 8.1532 CONFIG_JBD=m 8.1533 # CONFIG_JBD_DEBUG is not set 8.1534 -CONFIG_FS_MBCACHE=m 8.1535 +CONFIG_FS_MBCACHE=y 8.1536 CONFIG_REISERFS_FS=m 8.1537 # CONFIG_REISERFS_CHECK is not set 8.1538 -# CONFIG_REISERFS_PROC_INFO is not set 8.1539 -# CONFIG_REISERFS_FS_XATTR is not set 8.1540 +CONFIG_REISERFS_PROC_INFO=y 8.1541 +CONFIG_REISERFS_FS_XATTR=y 8.1542 +CONFIG_REISERFS_FS_POSIX_ACL=y 8.1543 +CONFIG_REISERFS_FS_SECURITY=y 8.1544 CONFIG_JFS_FS=m 8.1545 CONFIG_JFS_POSIX_ACL=y 8.1546 -# CONFIG_JFS_SECURITY is not set 8.1547 +CONFIG_JFS_SECURITY=y 8.1548 # CONFIG_JFS_DEBUG is not set 8.1549 -CONFIG_JFS_STATISTICS=y 8.1550 +# CONFIG_JFS_STATISTICS is not set 8.1551 CONFIG_FS_POSIX_ACL=y 8.1552 8.1553 # 8.1554 @@ -2362,15 +2151,15 @@ CONFIG_FS_POSIX_ACL=y 8.1555 # 8.1556 CONFIG_XFS_FS=m 8.1557 CONFIG_XFS_EXPORT=y 8.1558 -CONFIG_XFS_RT=y 8.1559 +# CONFIG_XFS_RT is not set 8.1560 CONFIG_XFS_QUOTA=y 8.1561 CONFIG_XFS_SECURITY=y 8.1562 CONFIG_XFS_POSIX_ACL=y 8.1563 CONFIG_MINIX_FS=m 8.1564 CONFIG_ROMFS_FS=m 8.1565 CONFIG_QUOTA=y 8.1566 -CONFIG_QFMT_V1=m 8.1567 -CONFIG_QFMT_V2=m 8.1568 +# CONFIG_QFMT_V1 is not set 8.1569 +CONFIG_QFMT_V2=y 8.1570 CONFIG_QUOTACTL=y 8.1571 CONFIG_DNOTIFY=y 8.1572 CONFIG_AUTOFS_FS=m 8.1573 @@ -2379,10 +2168,10 @@ CONFIG_AUTOFS4_FS=m 8.1574 # 8.1575 # CD-ROM/DVD Filesystems 8.1576 # 8.1577 -CONFIG_ISO9660_FS=m 8.1578 +CONFIG_ISO9660_FS=y 8.1579 CONFIG_JOLIET=y 8.1580 CONFIG_ZISOFS=y 8.1581 -CONFIG_ZISOFS_FS=m 8.1582 +CONFIG_ZISOFS_FS=y 8.1583 CONFIG_UDF_FS=m 8.1584 CONFIG_UDF_NLS=y 8.1585 8.1586 @@ -2393,10 +2182,8 @@ CONFIG_FAT_FS=m 8.1587 CONFIG_MSDOS_FS=m 8.1588 CONFIG_VFAT_FS=m 8.1589 CONFIG_FAT_DEFAULT_CODEPAGE=437 8.1590 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" 8.1591 -CONFIG_NTFS_FS=m 8.1592 -# CONFIG_NTFS_DEBUG is not set 8.1593 -# CONFIG_NTFS_RW is not set 8.1594 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" 8.1595 +# CONFIG_NTFS_FS is not set 8.1596 8.1597 # 8.1598 # Pseudo filesystems 8.1599 @@ -2404,9 +2191,7 @@ CONFIG_NTFS_FS=m 8.1600 CONFIG_PROC_FS=y 8.1601 CONFIG_PROC_KCORE=y 8.1602 CONFIG_SYSFS=y 8.1603 -CONFIG_DEVFS_FS=y 8.1604 -# CONFIG_DEVFS_MOUNT is not set 8.1605 -# CONFIG_DEVFS_DEBUG is not set 8.1606 +# CONFIG_DEVFS_FS is not set 8.1607 CONFIG_DEVPTS_FS_XATTR=y 8.1608 CONFIG_DEVPTS_FS_SECURITY=y 8.1609 CONFIG_TMPFS=y 8.1610 @@ -2419,8 +2204,7 @@ CONFIG_RAMFS=y 8.1611 # 8.1612 # Miscellaneous filesystems 8.1613 # 8.1614 -CONFIG_ADFS_FS=m 8.1615 -# CONFIG_ADFS_FS_RW is not set 8.1616 +# CONFIG_ADFS_FS is not set 8.1617 CONFIG_AFFS_FS=m 8.1618 CONFIG_HFS_FS=m 8.1619 CONFIG_HFSPLUS_FS=m 8.1620 @@ -2428,20 +2212,18 @@ CONFIG_BEFS_FS=m 8.1621 # CONFIG_BEFS_DEBUG is not set 8.1622 CONFIG_BFS_FS=m 8.1623 CONFIG_EFS_FS=m 8.1624 -CONFIG_JFFS_FS=m 8.1625 -CONFIG_JFFS_FS_VERBOSE=0 8.1626 -CONFIG_JFFS_PROC_FS=y 8.1627 +# CONFIG_JFFS_FS is not set 8.1628 CONFIG_JFFS2_FS=m 8.1629 CONFIG_JFFS2_FS_DEBUG=0 8.1630 -# CONFIG_JFFS2_FS_NAND is not set 8.1631 +CONFIG_JFFS2_FS_NAND=y 8.1632 # CONFIG_JFFS2_FS_NOR_ECC is not set 8.1633 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 8.1634 CONFIG_JFFS2_ZLIB=y 8.1635 CONFIG_JFFS2_RTIME=y 8.1636 # CONFIG_JFFS2_RUBIN is not set 8.1637 -CONFIG_CRAMFS=y 8.1638 +CONFIG_CRAMFS=m 8.1639 CONFIG_VXFS_FS=m 8.1640 -CONFIG_HPFS_FS=m 8.1641 +# CONFIG_HPFS_FS is not set 8.1642 CONFIG_QNX4FS_FS=m 8.1643 # CONFIG_QNX4FS_RW is not set 8.1644 CONFIG_SYSV_FS=m 8.1645 @@ -2470,7 +2252,8 @@ CONFIG_SMB_FS=m 8.1646 # CONFIG_SMB_NLS_DEFAULT is not set 8.1647 CONFIG_CIFS=m 8.1648 # CONFIG_CIFS_STATS is not set 8.1649 -# CONFIG_CIFS_XATTR is not set 8.1650 +CONFIG_CIFS_XATTR=y 8.1651 +CONFIG_CIFS_POSIX=y 8.1652 # CONFIG_CIFS_EXPERIMENTAL is not set 8.1653 CONFIG_NCP_FS=m 8.1654 CONFIG_NCPFS_PACKET_SIGNING=y 8.1655 @@ -2478,38 +2261,29 @@ CONFIG_NCPFS_IOCTL_LOCKING=y 8.1656 CONFIG_NCPFS_STRONG=y 8.1657 CONFIG_NCPFS_NFS_NS=y 8.1658 CONFIG_NCPFS_OS2_NS=y 8.1659 -# CONFIG_NCPFS_SMALLDOS is not set 8.1660 +CONFIG_NCPFS_SMALLDOS=y 8.1661 CONFIG_NCPFS_NLS=y 8.1662 CONFIG_NCPFS_EXTRAS=y 8.1663 -CONFIG_CODA_FS=m 8.1664 -# CONFIG_CODA_FS_OLD_API is not set 8.1665 -CONFIG_AFS_FS=m 8.1666 -CONFIG_RXRPC=m 8.1667 +# CONFIG_CODA_FS is not set 8.1668 +# CONFIG_AFS_FS is not set 8.1669 8.1670 # 8.1671 # Partition Types 8.1672 # 8.1673 CONFIG_PARTITION_ADVANCED=y 8.1674 -CONFIG_ACORN_PARTITION=y 8.1675 -CONFIG_ACORN_PARTITION_CUMANA=y 8.1676 -# CONFIG_ACORN_PARTITION_EESOX is not set 8.1677 -CONFIG_ACORN_PARTITION_ICS=y 8.1678 -# CONFIG_ACORN_PARTITION_ADFS is not set 8.1679 -# CONFIG_ACORN_PARTITION_POWERTEC is not set 8.1680 -CONFIG_ACORN_PARTITION_RISCIX=y 8.1681 +# CONFIG_ACORN_PARTITION is not set 8.1682 CONFIG_OSF_PARTITION=y 8.1683 CONFIG_AMIGA_PARTITION=y 8.1684 -CONFIG_ATARI_PARTITION=y 8.1685 +# CONFIG_ATARI_PARTITION is not set 8.1686 CONFIG_MAC_PARTITION=y 8.1687 CONFIG_MSDOS_PARTITION=y 8.1688 CONFIG_BSD_DISKLABEL=y 8.1689 CONFIG_MINIX_SUBPARTITION=y 8.1690 CONFIG_SOLARIS_X86_PARTITION=y 8.1691 CONFIG_UNIXWARE_DISKLABEL=y 8.1692 -CONFIG_LDM_PARTITION=y 8.1693 -# CONFIG_LDM_DEBUG is not set 8.1694 +# CONFIG_LDM_PARTITION is not set 8.1695 CONFIG_SGI_PARTITION=y 8.1696 -CONFIG_ULTRIX_PARTITION=y 8.1697 +# CONFIG_ULTRIX_PARTITION is not set 8.1698 CONFIG_SUN_PARTITION=y 8.1699 CONFIG_EFI_PARTITION=y 8.1700 8.1701 @@ -2517,8 +2291,8 @@ CONFIG_EFI_PARTITION=y 8.1702 # Native Language Support 8.1703 # 8.1704 CONFIG_NLS=y 8.1705 -CONFIG_NLS_DEFAULT="cp437" 8.1706 -CONFIG_NLS_CODEPAGE_437=m 8.1707 +CONFIG_NLS_DEFAULT="utf8" 8.1708 +CONFIG_NLS_CODEPAGE_437=y 8.1709 CONFIG_NLS_CODEPAGE_737=m 8.1710 CONFIG_NLS_CODEPAGE_775=m 8.1711 CONFIG_NLS_CODEPAGE_850=m 8.1712 @@ -2541,7 +2315,7 @@ CONFIG_NLS_CODEPAGE_874=m 8.1713 CONFIG_NLS_ISO8859_8=m 8.1714 CONFIG_NLS_CODEPAGE_1250=m 8.1715 CONFIG_NLS_CODEPAGE_1251=m 8.1716 -CONFIG_NLS_ASCII=m 8.1717 +CONFIG_NLS_ASCII=y 8.1718 CONFIG_NLS_ISO8859_1=m 8.1719 CONFIG_NLS_ISO8859_2=m 8.1720 CONFIG_NLS_ISO8859_3=m 8.1721 @@ -2561,15 +2335,15 @@ CONFIG_NLS_UTF8=m 8.1722 # Security options 8.1723 # 8.1724 CONFIG_KEYS=y 8.1725 -# CONFIG_KEYS_DEBUG_PROC_KEYS is not set 8.1726 +CONFIG_KEYS_DEBUG_PROC_KEYS=y 8.1727 CONFIG_SECURITY=y 8.1728 -# CONFIG_SECURITY_NETWORK is not set 8.1729 -CONFIG_SECURITY_CAPABILITIES=m 8.1730 -CONFIG_SECURITY_ROOTPLUG=m 8.1731 -CONFIG_SECURITY_SECLVL=m 8.1732 +CONFIG_SECURITY_NETWORK=y 8.1733 +CONFIG_SECURITY_CAPABILITIES=y 8.1734 +# CONFIG_SECURITY_ROOTPLUG is not set 8.1735 +# CONFIG_SECURITY_SECLVL is not set 8.1736 CONFIG_SECURITY_SELINUX=y 8.1737 CONFIG_SECURITY_SELINUX_BOOTPARAM=y 8.1738 -CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0 8.1739 +CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 8.1740 CONFIG_SECURITY_SELINUX_DISABLE=y 8.1741 CONFIG_SECURITY_SELINUX_DEVELOP=y 8.1742 CONFIG_SECURITY_SELINUX_AVC_STATS=y 8.1743 @@ -2582,8 +2356,8 @@ CONFIG_CRYPTO=y 8.1744 CONFIG_CRYPTO_HMAC=y 8.1745 CONFIG_CRYPTO_NULL=m 8.1746 CONFIG_CRYPTO_MD4=m 8.1747 -CONFIG_CRYPTO_MD5=y 8.1748 -CONFIG_CRYPTO_SHA1=m 8.1749 +CONFIG_CRYPTO_MD5=m 8.1750 +CONFIG_CRYPTO_SHA1=y 8.1751 CONFIG_CRYPTO_SHA256=m 8.1752 CONFIG_CRYPTO_SHA512=m 8.1753 CONFIG_CRYPTO_WP512=m 8.1754 @@ -2602,7 +2376,7 @@ CONFIG_CRYPTO_ANUBIS=m 8.1755 CONFIG_CRYPTO_DEFLATE=m 8.1756 CONFIG_CRYPTO_MICHAEL_MIC=m 8.1757 CONFIG_CRYPTO_CRC32C=m 8.1758 -CONFIG_CRYPTO_TEST=m 8.1759 +# CONFIG_CRYPTO_TEST is not set 8.1760 8.1761 # 8.1762 # Hardware crypto devices 8.1763 @@ -2616,29 +2390,12 @@ CONFIG_CRC32=y 8.1764 CONFIG_LIBCRC32C=m 8.1765 CONFIG_ZLIB_INFLATE=y 8.1766 CONFIG_ZLIB_DEFLATE=m 8.1767 -CONFIG_REED_SOLOMON=m 8.1768 -CONFIG_REED_SOLOMON_DEC16=y 8.1769 8.1770 # 8.1771 # Kernel hacking 8.1772 # 8.1773 # CONFIG_PRINTK_TIME is not set 8.1774 -CONFIG_DEBUG_KERNEL=y 8.1775 -CONFIG_MAGIC_SYSRQ=y 8.1776 +# CONFIG_DEBUG_KERNEL is not set 8.1777 CONFIG_LOG_BUF_SHIFT=14 8.1778 -# CONFIG_SCHEDSTATS is not set 8.1779 -# CONFIG_DEBUG_SLAB is not set 8.1780 -# CONFIG_DEBUG_SPINLOCK is not set 8.1781 -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 8.1782 -# CONFIG_DEBUG_KOBJECT is not set 8.1783 -# CONFIG_DEBUG_INFO is not set 8.1784 -# CONFIG_DEBUG_FS is not set 8.1785 -# CONFIG_DEBUG_STACKOVERFLOW is not set 8.1786 -# CONFIG_KPROBES is not set 8.1787 -# CONFIG_DEBUG_STACK_USAGE is not set 8.1788 -# CONFIG_DEBUG_PAGEALLOC is not set 8.1789 -# CONFIG_4KSTACKS is not set 8.1790 CONFIG_X86_FIND_SMP_CONFIG=y 8.1791 CONFIG_X86_MPPARSE=y 8.1792 -# CONFIG_CHECKING is not set 8.1793 -# CONFIG_INIT_DEBUG is not set
11.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c Fri Aug 12 09:35:15 2005 -0800 11.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c Mon Aug 15 10:32:29 2005 -0800 11.3 @@ -206,9 +206,9 @@ void init_cpu_khz(void) 11.4 struct vcpu_time_info *info = &HYPERVISOR_shared_info->vcpu_time[0]; 11.5 do_div(__cpu_khz, info->tsc_to_system_mul); 11.6 if ( info->tsc_shift < 0 ) 11.7 - cpu_khz = __cpu_khz >> -info->tsc_shift; 11.8 + cpu_khz = __cpu_khz << -info->tsc_shift; 11.9 else 11.10 - cpu_khz = __cpu_khz << info->tsc_shift; 11.11 + cpu_khz = __cpu_khz >> info->tsc_shift; 11.12 } 11.13 11.14 static u64 get_nsec_offset(struct shadow_time_info *shadow) 11.15 @@ -231,32 +231,18 @@ static void __update_wallclock(time_t se 11.16 { 11.17 long wtm_nsec, xtime_nsec; 11.18 time_t wtm_sec, xtime_sec; 11.19 - s64 tmp, wc_nsec; 11.20 + u64 tmp, wc_nsec; 11.21 11.22 /* Adjust wall-clock time base based on wall_jiffies ticks. */ 11.23 wc_nsec = processed_system_time; 11.24 - wc_nsec += (sec * 1000000000LL) + nsec; 11.25 + wc_nsec += (u64)sec * 1000000000ULL; 11.26 + wc_nsec += (u64)nsec; 11.27 wc_nsec -= (jiffies - wall_jiffies) * (u64)(NSEC_PER_SEC / HZ); 11.28 11.29 /* Split wallclock base into seconds and nanoseconds. */ 11.30 - if ( (tmp = wc_nsec) < 0 ) 11.31 - { 11.32 - /* -ve UTC offset => -ve seconds, +ve nanoseconds. */ 11.33 - tmp = -tmp; 11.34 - xtime_nsec = do_div(tmp, 1000000000); 11.35 - tmp = -tmp; 11.36 - if ( xtime_nsec != 0 ) 11.37 - { 11.38 - xtime_nsec = 1000000000 - xtime_nsec; 11.39 - tmp--; 11.40 - } 11.41 - } 11.42 - else 11.43 - { 11.44 - /* +ve UTC offset => +ve seconds, +ve nanoseconds. */ 11.45 - xtime_nsec = do_div(tmp, 1000000000); 11.46 - } 11.47 - xtime_sec = (time_t)tmp; 11.48 + tmp = wc_nsec; 11.49 + xtime_nsec = do_div(tmp, 1000000000); 11.50 + xtime_sec = (time_t)tmp; 11.51 11.52 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - xtime_sec); 11.53 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - xtime_nsec);
12.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c Fri Aug 12 09:35:15 2005 -0800 12.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c Mon Aug 15 10:32:29 2005 -0800 12.3 @@ -41,8 +41,7 @@ static void *__kmap_atomic(struct page * 12.4 if (!pte_none(*(kmap_pte-idx))) 12.5 BUG(); 12.6 #endif 12.7 - set_pte(kmap_pte-idx, mk_pte(page, prot)); 12.8 - __flush_tlb_one(vaddr); 12.9 + set_pte_at_sync(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot)); 12.10 12.11 return (void*) vaddr; 12.12 }
13.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c Fri Aug 12 09:35:15 2005 -0800 13.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c Mon Aug 15 10:32:29 2005 -0800 13.3 @@ -286,8 +286,8 @@ void xen_contig_memory(unsigned long vst 13.4 pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE))); 13.5 pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE))); 13.6 mfn = pte_mfn(*pte); 13.7 - HYPERVISOR_update_va_mapping( 13.8 - vstart + (i*PAGE_SIZE), __pte_ma(0), 0); 13.9 + BUG_ON(HYPERVISOR_update_va_mapping( 13.10 + vstart + (i*PAGE_SIZE), __pte_ma(0), 0)); 13.11 phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = 13.12 INVALID_P2M_ENTRY; 13.13 BUG_ON(HYPERVISOR_dom_mem_op( 13.14 @@ -300,9 +300,9 @@ void xen_contig_memory(unsigned long vst 13.15 13.16 /* 3. Map the new extent in place of old pages. */ 13.17 for (i = 0; i < (1<<order); i++) { 13.18 - HYPERVISOR_update_va_mapping( 13.19 + BUG_ON(HYPERVISOR_update_va_mapping( 13.20 vstart + (i*PAGE_SIZE), 13.21 - __pte_ma(((mfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL), 0); 13.22 + __pte_ma(((mfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL), 0)); 13.23 xen_machphys_update(mfn+i, (__pa(vstart)>>PAGE_SHIFT)+i); 13.24 phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = mfn+i; 13.25 } 13.26 @@ -345,7 +345,8 @@ unsigned long allocate_empty_lowmem_regi 13.27 #ifdef CONFIG_X86_64 13.28 xen_l1_entry_update(pte, __pte(0)); 13.29 #else 13.30 - HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE), __pte_ma(0), 0); 13.31 + BUG_ON(HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE), 13.32 + __pte_ma(0), 0)); 13.33 #endif 13.34 phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = 13.35 INVALID_P2M_ENTRY;
14.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c Fri Aug 12 09:35:15 2005 -0800 14.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c Mon Aug 15 10:32:29 2005 -0800 14.3 @@ -298,91 +298,21 @@ void __init bt_iounmap(void *addr, unsig 14.4 #define direct_mk_pte_phys(physpage, pgprot) \ 14.5 __direct_mk_pte((physpage) >> PAGE_SHIFT, pgprot) 14.6 14.7 -static inline void direct_remap_area_pte(pte_t *pte, 14.8 - unsigned long address, 14.9 - unsigned long size, 14.10 - mmu_update_t **v) 14.11 -{ 14.12 - unsigned long end; 14.13 - 14.14 - address &= ~PMD_MASK; 14.15 - end = address + size; 14.16 - if (end > PMD_SIZE) 14.17 - end = PMD_SIZE; 14.18 - if (address >= end) 14.19 - BUG(); 14.20 - 14.21 - do { 14.22 - (*v)->ptr = virt_to_machine(pte); 14.23 - (*v)++; 14.24 - address += PAGE_SIZE; 14.25 - pte++; 14.26 - } while (address && (address < end)); 14.27 -} 14.28 - 14.29 -static inline int direct_remap_area_pmd(struct mm_struct *mm, 14.30 - pmd_t *pmd, 14.31 - unsigned long address, 14.32 - unsigned long size, 14.33 - mmu_update_t **v) 14.34 -{ 14.35 - unsigned long end; 14.36 14.37 - address &= ~PGDIR_MASK; 14.38 - end = address + size; 14.39 - if (end > PGDIR_SIZE) 14.40 - end = PGDIR_SIZE; 14.41 - if (address >= end) 14.42 - BUG(); 14.43 - do { 14.44 - pte_t *pte = (mm == &init_mm) ? 14.45 - pte_alloc_kernel(mm, pmd, address) : 14.46 - pte_alloc_map(mm, pmd, address); 14.47 - if (!pte) 14.48 - return -ENOMEM; 14.49 - direct_remap_area_pte(pte, address, end - address, v); 14.50 - pte_unmap(pte); 14.51 - address = (address + PMD_SIZE) & PMD_MASK; 14.52 - pmd++; 14.53 - } while (address && (address < end)); 14.54 - return 0; 14.55 -} 14.56 - 14.57 -int __direct_remap_area_pages(struct mm_struct *mm, 14.58 - unsigned long address, 14.59 - unsigned long size, 14.60 - mmu_update_t *v) 14.61 +static int direct_remap_area_pte_fn(pte_t *pte, 14.62 + struct page *pte_page, 14.63 + unsigned long address, 14.64 + void *data) 14.65 { 14.66 - pgd_t * dir; 14.67 - unsigned long end = address + size; 14.68 - int error; 14.69 - 14.70 - dir = pgd_offset(mm, address); 14.71 - if (address >= end) 14.72 - BUG(); 14.73 - spin_lock(&mm->page_table_lock); 14.74 - do { 14.75 - pud_t *pud; 14.76 - pmd_t *pmd; 14.77 + mmu_update_t **v = (mmu_update_t **)data; 14.78 14.79 - error = -ENOMEM; 14.80 - pud = pud_alloc(mm, dir, address); 14.81 - if (!pud) 14.82 - break; 14.83 - pmd = pmd_alloc(mm, pud, address); 14.84 - if (!pmd) 14.85 - break; 14.86 - error = 0; 14.87 - direct_remap_area_pmd(mm, pmd, address, end - address, &v); 14.88 - address = (address + PGDIR_SIZE) & PGDIR_MASK; 14.89 - dir++; 14.90 + (*v)->ptr = (pfn_to_mfn(page_to_pfn(pte_page)) << PAGE_SHIFT) 14.91 + | ((unsigned long)pte & ~PAGE_MASK); 14.92 + (*v)++; 14.93 14.94 - } while (address && (address < end)); 14.95 - spin_unlock(&mm->page_table_lock); 14.96 - return error; 14.97 + return 0; 14.98 } 14.99 14.100 - 14.101 int direct_remap_area_pages(struct mm_struct *mm, 14.102 unsigned long address, 14.103 unsigned long machine_addr, 14.104 @@ -393,7 +323,7 @@ int direct_remap_area_pages(struct mm_st 14.105 int i; 14.106 unsigned long start_address; 14.107 #define MAX_DIRECTMAP_MMU_QUEUE 130 14.108 - mmu_update_t u[MAX_DIRECTMAP_MMU_QUEUE], *v = u; 14.109 + mmu_update_t u[MAX_DIRECTMAP_MMU_QUEUE], *v = u, *w = u; 14.110 14.111 start_address = address; 14.112 14.113 @@ -402,10 +332,9 @@ int direct_remap_area_pages(struct mm_st 14.114 for (i = 0; i < size; i += PAGE_SIZE) { 14.115 if ((v - u) == MAX_DIRECTMAP_MMU_QUEUE) { 14.116 /* Fill in the PTE pointers. */ 14.117 - __direct_remap_area_pages(mm, 14.118 - start_address, 14.119 - address-start_address, 14.120 - u); 14.121 + generic_page_range(mm, start_address, 14.122 + address-start_address, 14.123 + direct_remap_area_pte_fn, &w); 14.124 14.125 if (HYPERVISOR_mmu_update(u, v - u, NULL, domid) < 0) 14.126 return -EFAULT; 14.127 @@ -426,10 +355,9 @@ int direct_remap_area_pages(struct mm_st 14.128 14.129 if (v != u) { 14.130 /* get the ptep's filled in */ 14.131 - __direct_remap_area_pages(mm, 14.132 - start_address, 14.133 - address-start_address, 14.134 - u); 14.135 + generic_page_range(mm, start_address, 14.136 + address-start_address, 14.137 + direct_remap_area_pte_fn, &w); 14.138 if (unlikely(HYPERVISOR_mmu_update(u, v - u, NULL, domid) < 0)) 14.139 return -EFAULT; 14.140 } 14.141 @@ -440,3 +368,34 @@ int direct_remap_area_pages(struct mm_st 14.142 } 14.143 14.144 EXPORT_SYMBOL(direct_remap_area_pages); 14.145 + 14.146 +int create_lookup_pte_addr(struct mm_struct *mm, 14.147 + unsigned long address, 14.148 + unsigned long *ptep) 14.149 +{ 14.150 + int f(pte_t *pte, struct page *pte_page, unsigned long addr, void *data) 14.151 + { 14.152 + unsigned long *ptep = (unsigned long *)data; 14.153 + if (ptep) *ptep = (pfn_to_mfn(page_to_pfn(pte_page)) << PAGE_SHIFT) 14.154 + | ((unsigned long)pte & ~PAGE_MASK); 14.155 + return 0; 14.156 + } 14.157 + 14.158 + return generic_page_range(mm, address, PAGE_SIZE, f, ptep); 14.159 +} 14.160 + 14.161 +EXPORT_SYMBOL(create_lookup_pte_addr); 14.162 + 14.163 +int touch_pte_range(struct mm_struct *mm, 14.164 + unsigned long address, 14.165 + unsigned long size) 14.166 +{ 14.167 + int f(pte_t *pte, struct page *pte_page, unsigned long addr, void *data) 14.168 + { 14.169 + return 0; 14.170 + } 14.171 + 14.172 + return generic_page_range(mm, address, size, f, NULL); 14.173 +} 14.174 + 14.175 +EXPORT_SYMBOL(touch_pte_range);
15.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c Fri Aug 12 09:35:15 2005 -0800 15.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c Mon Aug 15 10:32:29 2005 -0800 15.3 @@ -222,8 +222,8 @@ void pte_free(struct page *pte) 15.4 unsigned long va = (unsigned long)__va(page_to_pfn(pte)<<PAGE_SHIFT); 15.5 15.6 if (!pte_write(*virt_to_ptep(va))) 15.7 - HYPERVISOR_update_va_mapping( 15.8 - va, pfn_pte(page_to_pfn(pte), PAGE_KERNEL), 0); 15.9 + BUG_ON(HYPERVISOR_update_va_mapping( 15.10 + va, pfn_pte(page_to_pfn(pte), PAGE_KERNEL), 0)); 15.11 15.12 ClearPageForeign(pte); 15.13 set_page_count(pte, 1); 15.14 @@ -355,10 +355,10 @@ void pgd_free(pgd_t *pgd) 15.15 15.16 if (!pte_write(*ptep)) { 15.17 xen_pgd_unpin(__pa(pgd)); 15.18 - HYPERVISOR_update_va_mapping( 15.19 + BUG_ON(HYPERVISOR_update_va_mapping( 15.20 (unsigned long)pgd, 15.21 pfn_pte(virt_to_phys(pgd)>>PAGE_SHIFT, PAGE_KERNEL), 15.22 - 0); 15.23 + 0)); 15.24 } 15.25 15.26 /* in the PAE case user pgd entries are overwritten before usage */ 15.27 @@ -451,9 +451,9 @@ static inline void mm_walk_set_prot(void 15.28 15.29 if (PageHighMem(page)) 15.30 return; 15.31 - HYPERVISOR_update_va_mapping( 15.32 + BUG_ON(HYPERVISOR_update_va_mapping( 15.33 (unsigned long)__va(pfn << PAGE_SHIFT), 15.34 - pfn_pte(pfn, flags), 0); 15.35 + pfn_pte(pfn, flags), 0)); 15.36 } 15.37 15.38 static void mm_walk(struct mm_struct *mm, pgprot_t flags) 15.39 @@ -492,10 +492,10 @@ void mm_pin(struct mm_struct *mm) 15.40 spin_lock(&mm->page_table_lock); 15.41 15.42 mm_walk(mm, PAGE_KERNEL_RO); 15.43 - HYPERVISOR_update_va_mapping( 15.44 + BUG_ON(HYPERVISOR_update_va_mapping( 15.45 (unsigned long)mm->pgd, 15.46 pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL_RO), 15.47 - UVMF_TLB_FLUSH); 15.48 + UVMF_TLB_FLUSH)); 15.49 xen_pgd_pin(__pa(mm->pgd)); 15.50 mm->context.pinned = 1; 15.51 spin_lock(&mm_unpinned_lock); 15.52 @@ -510,9 +510,9 @@ void mm_unpin(struct mm_struct *mm) 15.53 spin_lock(&mm->page_table_lock); 15.54 15.55 xen_pgd_unpin(__pa(mm->pgd)); 15.56 - HYPERVISOR_update_va_mapping( 15.57 + BUG_ON(HYPERVISOR_update_va_mapping( 15.58 (unsigned long)mm->pgd, 15.59 - pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL), 0); 15.60 + pfn_pte(virt_to_phys(mm->pgd)>>PAGE_SHIFT, PAGE_KERNEL), 0)); 15.61 mm_walk(mm, PAGE_KERNEL); 15.62 xen_tlb_flush(); 15.63 mm->context.pinned = 0;
16.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c Fri Aug 12 09:35:15 2005 -0800 16.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c Mon Aug 15 10:32:29 2005 -0800 16.3 @@ -15,6 +15,7 @@ 16.4 #include <asm-xen/linux-public/suspend.h> 16.5 #include <asm-xen/queues.h> 16.6 #include <asm-xen/xenbus.h> 16.7 +#include <asm-xen/ctrl_if.h> 16.8 16.9 #define SHUTDOWN_INVALID -1 16.10 #define SHUTDOWN_POWEROFF 0
18.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/Makefile Fri Aug 12 09:35:15 2005 -0800 18.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/Makefile Mon Aug 15 10:32:29 2005 -0800 18.3 @@ -79,14 +79,15 @@ xenflags-y += -Iinclude/asm-xen/asm-x86_ 18.4 CFLAGS += $(xenflags-y) 18.5 AFLAGS += $(xenflags-y) 18.6 18.7 -prepare: include/asm-$(XENARCH)/asm_offset.h 18.8 -CLEAN_FILES += include/asm-$(XENARCH)/asm_offset.h 18.9 +prepare: include/asm-$(XENARCH)/asm_offsets.h 18.10 +CLEAN_FILES += include/asm-$(XENARCH)/asm_offsets.h 18.11 18.12 arch/$(XENARCH)/kernel/asm-offsets.s: include/asm include/.asm-ignore \ 18.13 include/linux/version.h include/config/MARKER 18.14 18.15 - 18.16 -include/asm-$(XENARCH)/asm_offset.h: arch/xen/x86_64/kernel/asm-offsets.s 18.17 +include/asm-$(XENARCH)/offset.h: arch/$(XENARCH)/kernel/asm-offsets.s 18.18 $(call filechk,gen-asm-offsets) 18.19 - ln -fsn asm_offset.h include/asm-$(XENARCH)/offset.h 18.20 18.21 +include/asm-$(XENARCH)/asm_offsets.h: include/asm-$(XENARCH)/offset.h 18.22 + ln -fsn offset.h include/asm-$(XENARCH)/asm_offsets.h 18.23 + ln -fsn offset.h include/asm-$(XENARCH)/asm_offset.h
20.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/apic.c Fri Aug 12 09:35:15 2005 -0800 20.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/apic.c Mon Aug 15 10:32:29 2005 -0800 20.3 @@ -45,10 +45,11 @@ int disable_apic; 20.4 20.5 void smp_local_timer_interrupt(struct pt_regs *regs) 20.6 { 20.7 - int cpu = smp_processor_id(); 20.8 20.9 profile_tick(CPU_PROFILING, regs); 20.10 #ifndef CONFIG_XEN 20.11 + int cpu = smp_processor_id(); 20.12 + 20.13 if (--per_cpu(prof_counter, cpu) <= 0) { 20.14 /* 20.15 * The multiplier may have changed since the last time we got
21.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/asm-offsets.c Fri Aug 12 09:35:15 2005 -0800 21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 21.3 @@ -1,70 +0,0 @@ 21.4 -/* 21.5 - * Generate definitions needed by assembly language modules. 21.6 - * This code generates raw asm output which is post-processed to extract 21.7 - * and format the required data. 21.8 - */ 21.9 - 21.10 -#include <linux/sched.h> 21.11 -#include <linux/stddef.h> 21.12 -#include <linux/errno.h> 21.13 -#include <linux/hardirq.h> 21.14 -#include <linux/suspend.h> 21.15 -#include <asm/pda.h> 21.16 -#include <asm/processor.h> 21.17 -#include <asm/segment.h> 21.18 -#include <asm/thread_info.h> 21.19 -#include <asm/ia32.h> 21.20 - 21.21 -#define DEFINE(sym, val) \ 21.22 - asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 21.23 - 21.24 -#define BLANK() asm volatile("\n->" : : ) 21.25 - 21.26 -int main(void) 21.27 -{ 21.28 -#define ENTRY(entry) DEFINE(tsk_ ## entry, offsetof(struct task_struct, entry)) 21.29 - ENTRY(state); 21.30 - ENTRY(flags); 21.31 - ENTRY(thread); 21.32 - ENTRY(pid); 21.33 - BLANK(); 21.34 -#undef ENTRY 21.35 -#define ENTRY(entry) DEFINE(threadinfo_ ## entry, offsetof(struct thread_info, entry)) 21.36 - ENTRY(flags); 21.37 - ENTRY(addr_limit); 21.38 - ENTRY(preempt_count); 21.39 - BLANK(); 21.40 -#undef ENTRY 21.41 -#define ENTRY(entry) DEFINE(pda_ ## entry, offsetof(struct x8664_pda, entry)) 21.42 - ENTRY(kernelstack); 21.43 - ENTRY(oldrsp); 21.44 - ENTRY(pcurrent); 21.45 - ENTRY(irqrsp); 21.46 - ENTRY(irqcount); 21.47 - ENTRY(cpunumber); 21.48 - ENTRY(irqstackptr); 21.49 - ENTRY(kernel_mode); 21.50 - BLANK(); 21.51 -#undef ENTRY 21.52 -#ifdef CONFIG_IA32_EMULATION 21.53 -#define ENTRY(entry) DEFINE(IA32_SIGCONTEXT_ ## entry, offsetof(struct sigcontext_ia32, entry)) 21.54 - ENTRY(eax); 21.55 - ENTRY(ebx); 21.56 - ENTRY(ecx); 21.57 - ENTRY(edx); 21.58 - ENTRY(esi); 21.59 - ENTRY(edi); 21.60 - ENTRY(ebp); 21.61 - ENTRY(esp); 21.62 - ENTRY(eip); 21.63 - BLANK(); 21.64 -#undef ENTRY 21.65 - DEFINE(IA32_RT_SIGFRAME_sigcontext, 21.66 - offsetof (struct rt_sigframe32, uc.uc_mcontext)); 21.67 - BLANK(); 21.68 -#endif 21.69 - DEFINE(pbe_address, offsetof(struct pbe, address)); 21.70 - DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address)); 21.71 - DEFINE(pbe_next, offsetof(struct pbe, next)); 21.72 - return 0; 21.73 -}
22.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c Fri Aug 12 09:35:15 2005 -0800 22.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c Mon Aug 15 10:32:29 2005 -0800 22.3 @@ -46,7 +46,7 @@ void __init add_memory_region(unsigned l 22.4 e820.nr_map++; 22.5 } 22.6 22.7 -#if 0 22.8 +#ifndef CONFIG_XEN 22.9 extern char _end[]; 22.10 22.11 /* 22.12 @@ -235,7 +235,6 @@ void __init e820_reserve_resources(void) 22.13 } 22.14 } 22.15 22.16 - 22.17 void __init e820_print_map(char *who) 22.18 { 22.19 int i; 22.20 @@ -516,9 +515,31 @@ void __init setup_memory_region(void) 22.21 printk(KERN_INFO "BIOS-provided physical RAM map:\n"); 22.22 e820_print_map(who); 22.23 } 22.24 -#endif 22.25 + 22.26 +#else /* CONFIX_XEN */ 22.27 +extern unsigned long xen_override_max_pfn; 22.28 +extern union xen_start_info_union xen_start_info_union; 22.29 +/* 22.30 + * Guest physical starts from 0. 22.31 + */ 22.32 +unsigned long __init e820_end_of_ram(void) 22.33 +{ 22.34 + unsigned long max_end_pfn = xen_start_info.nr_pages; 22.35 22.36 -extern unsigned long xen_override_max_pfn; 22.37 + if ( xen_override_max_pfn < max_end_pfn) 22.38 + xen_override_max_pfn = max_end_pfn; 22.39 + 22.40 + return xen_override_max_pfn; 22.41 +} 22.42 + 22.43 + 22.44 + 22.45 +void __init e820_reserve_resources(void) 22.46 +{ 22.47 + return; /* Xen won't have reserved entries */ 22.48 +} 22.49 + 22.50 +#endif 22.51 22.52 void __init parse_memopt(char *p, char **from) 22.53 {
23.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S Fri Aug 12 09:35:15 2005 -0800 23.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S Mon Aug 15 10:32:29 2005 -0800 23.3 @@ -128,7 +128,6 @@ 23.4 * #define VGCF_IN_SYSCALL (1<<8) 23.5 */ 23.6 .macro SWITCH_TO_USER flag 23.7 - movl $0,%gs:pda_kernel_mode # change to user mode 23.8 subq $8*4,%rsp # reuse rip, cs, rflags, rsp, ss in the stack 23.9 movq %rax,(%rsp) 23.10 movq %r11,1*8(%rsp) 23.11 @@ -139,7 +138,6 @@ 23.12 .endm 23.13 23.14 .macro SWITCH_TO_KERNEL ssoff,adjust=0 23.15 - btsq $0,%gs:pda_kernel_mode 23.16 jc 1f 23.17 orb $1,\ssoff-\adjust+4(%rsp) 23.18 1:
29.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c Fri Aug 12 09:35:15 2005 -0800 29.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c Mon Aug 15 10:32:29 2005 -0800 29.3 @@ -148,7 +148,6 @@ void cpu_idle (void) 29.4 if (cpu_is_offline(cpu)) 29.5 play_dead(); 29.6 29.7 - __IRQ_STAT(cpu,idle_timestamp) = jiffies; 29.8 xen_idle(); 29.9 } 29.10
30.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c Fri Aug 12 09:35:15 2005 -0800 30.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c Mon Aug 15 10:32:29 2005 -0800 30.3 @@ -40,7 +40,6 @@ 30.4 #include <linux/acpi.h> 30.5 #include <linux/kallsyms.h> 30.6 #include <linux/edd.h> 30.7 -#include <linux/percpu.h> 30.8 #include <asm/mtrr.h> 30.9 #include <asm/uaccess.h> 30.10 #include <asm/system.h> 30.11 @@ -58,27 +57,36 @@ 30.12 #include <asm/setup.h> 30.13 #include <asm/mach_apic.h> 30.14 #include <asm/numa.h> 30.15 +#ifdef CONFIG_XEN 30.16 +#include <linux/percpu.h> 30.17 #include <asm-xen/xen-public/physdev.h> 30.18 #include "setup_arch_pre.h" 30.19 #include <asm-xen/hypervisor.h> 30.20 - 30.21 #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) 30.22 #define PFN_PHYS(x) ((x) << PAGE_SHIFT) 30.23 - 30.24 +#define end_pfn_map end_pfn 30.25 #include <asm/mach-xen/setup_arch_post.h> 30.26 30.27 extern unsigned long start_pfn; 30.28 +extern struct edid_info edid_info; 30.29 30.30 -#if 0 30.31 -struct edid_info { 30.32 - unsigned char dummy[128]; 30.33 -}; 30.34 -#endif 30.35 - 30.36 -extern struct edid_info edid_info; 30.37 +shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page; 30.38 +EXPORT_SYMBOL(HYPERVISOR_shared_info); 30.39 30.40 /* Allows setting of maximum possible memory size */ 30.41 unsigned long xen_override_max_pfn; 30.42 + 30.43 +u32 *phys_to_machine_mapping, *pfn_to_mfn_frame_list; 30.44 + 30.45 +EXPORT_SYMBOL(phys_to_machine_mapping); 30.46 + 30.47 +DEFINE_PER_CPU(multicall_entry_t, multicall_list[8]); 30.48 +DEFINE_PER_CPU(int, nr_multicall_ents); 30.49 + 30.50 +/* Raw start-of-day parameters from the hypervisor. */ 30.51 +union xen_start_info_union xen_start_info_union; 30.52 +#endif 30.53 + 30.54 /* 30.55 * Machine setup.. 30.56 */ 30.57 @@ -166,7 +174,7 @@ struct resource code_resource = { 30.58 30.59 #define IORESOURCE_ROM (IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM) 30.60 30.61 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST 30.62 +#if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN) 30.63 static struct resource system_rom_resource = { 30.64 .name = "System ROM", 30.65 .start = 0xf0000, 30.66 @@ -200,7 +208,7 @@ static struct resource adapter_rom_resou 30.67 #define ADAPTER_ROM_RESOURCES \ 30.68 (sizeof adapter_rom_resources / sizeof adapter_rom_resources[0]) 30.69 30.70 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST 30.71 +#if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN) 30.72 static struct resource video_rom_resource = { 30.73 .name = "Video ROM", 30.74 .start = 0xc0000, 30.75 @@ -216,7 +224,7 @@ static struct resource video_ram_resourc 30.76 .flags = IORESOURCE_RAM, 30.77 }; 30.78 30.79 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST 30.80 +#if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN) 30.81 #define romsignature(x) (*(unsigned short *)(x) == 0xaa55) 30.82 30.83 static int __init romchecksum(unsigned char *rom, unsigned long length) 30.84 @@ -294,33 +302,24 @@ static void __init probe_roms(void) 30.85 } 30.86 #endif 30.87 30.88 -/* 30.89 - * Point at the empty zero page to start with. We map the real shared_info 30.90 - * page as soon as fixmap is up and running. 30.91 - */ 30.92 -shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page; 30.93 -EXPORT_SYMBOL(HYPERVISOR_shared_info); 30.94 - 30.95 -u32 *phys_to_machine_mapping, *pfn_to_mfn_frame_list; 30.96 - 30.97 -EXPORT_SYMBOL(phys_to_machine_mapping); 30.98 - 30.99 -DEFINE_PER_CPU(multicall_entry_t, multicall_list[8]); 30.100 -DEFINE_PER_CPU(int, nr_multicall_ents); 30.101 - 30.102 -/* Raw start-of-day parameters from the hypervisor. */ 30.103 -union xen_start_info_union xen_start_info_union; 30.104 30.105 static __init void parse_cmdline_early (char ** cmdline_p) 30.106 { 30.107 char c = ' ', *to = command_line, *from = COMMAND_LINE; 30.108 - int len = 0, max_cmdline; 30.109 + int len = 0; 30.110 30.111 + /* Save unparsed command line copy for /proc/cmdline */ 30.112 +#ifdef CONFIG_XEN 30.113 + int max_cmdline; 30.114 + 30.115 if ((max_cmdline = MAX_GUEST_CMDLINE) > COMMAND_LINE_SIZE) 30.116 max_cmdline = COMMAND_LINE_SIZE; 30.117 memcpy(saved_command_line, xen_start_info.cmd_line, max_cmdline); 30.118 - /* Save unparsed command line copy for /proc/cmdline */ 30.119 saved_command_line[max_cmdline-1] = '\0'; 30.120 +#else 30.121 + memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); 30.122 + saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; 30.123 +#endif 30.124 30.125 for (;;) { 30.126 if (c != ' ') 30.127 @@ -378,8 +377,7 @@ static __init void parse_cmdline_early ( 30.128 acpi_skip_timer_override = 1; 30.129 #endif 30.130 #endif 30.131 - 30.132 -#if 0 30.133 +#ifndef CONFIG_XEN 30.134 if (!memcmp(from, "nolapic", 7) || 30.135 !memcmp(from, "disableapic", 11)) 30.136 disable_apic = 1; 30.137 @@ -391,8 +389,7 @@ static __init void parse_cmdline_early ( 30.138 skip_ioapic_setup = 0; 30.139 ioapic_force = 1; 30.140 } 30.141 -#endif 30.142 - 30.143 +#endif 30.144 if (!memcmp(from, "mem=", 4)) 30.145 parse_memopt(from+4, &from); 30.146 30.147 @@ -426,34 +423,33 @@ static __init void parse_cmdline_early ( 30.148 } 30.149 30.150 #ifndef CONFIG_DISCONTIGMEM 30.151 +#ifdef CONFIG_XEN 30.152 static void __init contig_initmem_init(void) 30.153 { 30.154 unsigned long bootmap_size, bootmap; 30.155 30.156 - /* 30.157 - * partially used pages are not usable - thus 30.158 - * we are rounding upwards: 30.159 - */ 30.160 - 30.161 bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT; 30.162 bootmap = start_pfn; 30.163 bootmap_size = init_bootmem(bootmap, end_pfn); 30.164 reserve_bootmem(bootmap, bootmap_size); 30.165 30.166 free_bootmem(start_pfn << PAGE_SHIFT, (end_pfn - start_pfn) << PAGE_SHIFT); 30.167 - printk("Registering memory for bootmem: from %lx, size = %lx\n", 30.168 - start_pfn << PAGE_SHIFT, (end_pfn - start_pfn) << PAGE_SHIFT); 30.169 - /* 30.170 - * This should cover kernel_end 30.171 - */ 30.172 -#if 0 30.173 - reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(start_pfn) + 30.174 - bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY)); 30.175 -#endif 30.176 reserve_bootmem(0, (PFN_PHYS(start_pfn) + 30.177 bootmap_size + PAGE_SIZE-1)); 30.178 - 30.179 +} 30.180 +#else 30.181 +static void __init contig_initmem_init(void) 30.182 +{ 30.183 + unsigned long bootmap_size, bootmap; 30.184 + bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT; 30.185 + bootmap = find_e820_area(0, end_pfn<<PAGE_SHIFT, bootmap_size); 30.186 + if (bootmap == -1L) 30.187 + panic("Cannot find bootmem map of size %ld\n",bootmap_size); 30.188 + bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, end_pfn); 30.189 + e820_bootmem_free(&contig_page_data, 0, end_pfn << PAGE_SHIFT); 30.190 + reserve_bootmem(bootmap, bootmap_size); 30.191 } 30.192 +#endif /* !CONFIG_XEN */ 30.193 #endif 30.194 30.195 /* Use inline assembly to define this because the nops are defined 30.196 @@ -545,35 +541,8 @@ static inline void copy_edd(void) 30.197 } 30.198 #endif 30.199 30.200 -#if 0 30.201 -#define EBDA_ADDR_POINTER 0x40E 30.202 -static void __init reserve_ebda_region(void) 30.203 -{ 30.204 - unsigned int addr; 30.205 - /** 30.206 - * there is a real-mode segmented pointer pointing to the 30.207 - * 4K EBDA area at 0x40E 30.208 - */ 30.209 - addr = *(unsigned short *)phys_to_virt(EBDA_ADDR_POINTER); 30.210 - addr <<= 4; 30.211 - if (addr) 30.212 - reserve_bootmem_generic(addr, PAGE_SIZE); 30.213 -} 30.214 -#endif 30.215 - 30.216 -/* 30.217 - * Guest physical starts from 0. 30.218 - */ 30.219 - 30.220 -unsigned long __init xen_end_of_ram(void) 30.221 -{ 30.222 - unsigned long max_end_pfn = xen_start_info.nr_pages; 30.223 - 30.224 - if ( xen_override_max_pfn < max_end_pfn) 30.225 - xen_override_max_pfn = max_end_pfn; 30.226 - 30.227 - return xen_override_max_pfn; 30.228 -} 30.229 +#ifdef CONFIG_XEN 30.230 +#define reserve_ebda_region() void(0) 30.231 30.232 static void __init print_memory_map(char *who) 30.233 { 30.234 @@ -601,7 +570,6 @@ static void __init print_memory_map(char 30.235 } 30.236 } 30.237 30.238 -#ifdef CONFIG_XEN 30.239 void __init smp_alloc_memory(void) 30.240 { 30.241 int cpu; 30.242 @@ -612,22 +580,42 @@ void __init smp_alloc_memory(void) 30.243 /* XXX free unused pages later */ 30.244 } 30.245 } 30.246 + 30.247 + 30.248 +#else 30.249 +#define EBDA_ADDR_POINTER 0x40E 30.250 +static void __init reserve_ebda_region(void) 30.251 +{ 30.252 + unsigned int addr; 30.253 + /** 30.254 + * there is a real-mode segmented pointer pointing to the 30.255 + * 4K EBDA area at 0x40E 30.256 + */ 30.257 + addr = *(unsigned short *)phys_to_virt(EBDA_ADDR_POINTER); 30.258 + addr <<= 4; 30.259 + if (addr) 30.260 + reserve_bootmem_generic(addr, PAGE_SIZE); 30.261 +} 30.262 #endif 30.263 30.264 void __init setup_arch(char **cmdline_p) 30.265 { 30.266 - int i, j; 30.267 - physdev_op_t op; 30.268 + unsigned long kernel_end; 30.269 30.270 -#if 0 30.271 - ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 30.272 -#else 30.273 +#ifdef CONFIG_XEN 30.274 ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); 30.275 -#endif 30.276 drive_info = DRIVE_INFO; 30.277 - 30.278 + kernel_end = 0; /* dummy */ 30.279 #ifdef CONFIG_XEN_PHYSDEV_ACCESS 30.280 screen_info = SCREEN_INFO; 30.281 + 30.282 + /* This is drawn from a dump from vgacon:startup in standard Linux. */ 30.283 + screen_info.orig_video_mode = 3; 30.284 + screen_info.orig_video_isVGA = 1; 30.285 + screen_info.orig_video_lines = 25; 30.286 + screen_info.orig_video_cols = 80; 30.287 + screen_info.orig_video_ega_bx = 3; 30.288 + screen_info.orig_video_points = 16; 30.289 #endif 30.290 edid_info = EDID_INFO; 30.291 saved_video_mode = SAVED_VIDEO_MODE; 30.292 @@ -637,40 +625,48 @@ void __init setup_arch(char **cmdline_p) 30.293 rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; 30.294 rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); 30.295 rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); 30.296 + 30.297 + 30.298 +#endif 30.299 + 30.300 + HYPERVISOR_vm_assist(VMASST_CMD_enable, 30.301 + VMASST_TYPE_writable_pagetables); 30.302 + 30.303 + ARCH_SETUP 30.304 + print_memory_map(machine_specific_memory_setup()); 30.305 +#else 30.306 + ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); 30.307 + drive_info = DRIVE_INFO; 30.308 + screen_info = SCREEN_INFO; 30.309 + edid_info = EDID_INFO; 30.310 + saved_video_mode = SAVED_VIDEO_MODE; 30.311 + bootloader_type = LOADER_TYPE; 30.312 + 30.313 +#ifdef CONFIG_BLK_DEV_RAM 30.314 + rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; 30.315 + rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); 30.316 + rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); 30.317 #endif 30.318 - 30.319 - HYPERVISOR_vm_assist(VMASST_CMD_enable, 30.320 - VMASST_TYPE_writable_pagetables); 30.321 - 30.322 -#ifdef CONFIG_XEN_PHYSDEV_ACCESS 30.323 - /* This is drawn from a dump from vgacon:startup in standard Linux. */ 30.324 - screen_info.orig_video_mode = 3; 30.325 - screen_info.orig_video_isVGA = 1; 30.326 - screen_info.orig_video_lines = 25; 30.327 - screen_info.orig_video_cols = 80; 30.328 - screen_info.orig_video_ega_bx = 3; 30.329 - screen_info.orig_video_points = 16; 30.330 -#endif 30.331 - ARCH_SETUP 30.332 - print_memory_map(machine_specific_memory_setup()); 30.333 - 30.334 - /* copy_edd(); */ 30.335 + setup_memory_region(); 30.336 + copy_edd(); 30.337 +#endif /* !CONFIG_XEN */ 30.338 30.339 if (!MOUNT_ROOT_RDONLY) 30.340 root_mountflags &= ~MS_RDONLY; 30.341 init_mm.start_code = (unsigned long) &_text; 30.342 init_mm.end_code = (unsigned long) &_etext; 30.343 init_mm.end_data = (unsigned long) &_edata; 30.344 -/* init_mm.brk = (unsigned long) &_end; */ 30.345 +#ifdef CONFIG_XEN 30.346 init_mm.brk = start_pfn << PAGE_SHIFT; 30.347 +#else 30.348 + init_mm.brk = (unsigned long) &_end; 30.349 30.350 - 30.351 -#if 0 /* XEN: This is nonsense: kernel may not even be contiguous in RAM. */ 30.352 code_resource.start = virt_to_phys(&_text); 30.353 code_resource.end = virt_to_phys(&_etext)-1; 30.354 data_resource.start = virt_to_phys(&_etext); 30.355 data_resource.end = virt_to_phys(&_edata)-1; 30.356 #endif 30.357 + 30.358 parse_cmdline_early(cmdline_p); 30.359 30.360 early_identify_cpu(&boot_cpu_data); 30.361 @@ -679,15 +675,11 @@ void __init setup_arch(char **cmdline_p) 30.362 * partially used pages are not usable - thus 30.363 * we are rounding upwards: 30.364 */ 30.365 -#if 0 30.366 end_pfn = e820_end_of_ram(); 30.367 -#else 30.368 - end_pfn = xen_end_of_ram(); 30.369 -#endif 30.370 30.371 check_efer(); 30.372 30.373 - init_memory_mapping(0, (end_pfn << PAGE_SHIFT)); 30.374 + init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT)); 30.375 30.376 #ifdef CONFIG_ACPI_NUMA 30.377 /* 30.378 @@ -702,24 +694,25 @@ void __init setup_arch(char **cmdline_p) 30.379 contig_initmem_init(); 30.380 #endif 30.381 30.382 - /* Reserve direct mapping and shared info etc. */ 30.383 -// reserve_bootmem_generic(table_start << PAGE_SHIFT, (table_end + 1 - table_start) << PAGE_SHIFT); 30.384 - 30.385 -// reserve_bootmem_generic(0, (table_end + 1) << PAGE_SHIFT); 30.386 +#ifndef CONFIG_XEN 30.387 + /* Reserve direct mapping */ 30.388 + reserve_bootmem_generic(table_start << PAGE_SHIFT, 30.389 + (table_end - table_start) << PAGE_SHIFT); 30.390 30.391 /* reserve kernel */ 30.392 -// kernel_end = round_up(__pa_symbol(&_end),PAGE_SIZE); 30.393 + kernel_end = round_up(__pa_symbol(&_end),PAGE_SIZE); 30.394 + reserve_bootmem_generic(HIGH_MEMORY, kernel_end - HIGH_MEMORY); 30.395 30.396 -#if 0 30.397 /* 30.398 * reserve physical page 0 - it's a special BIOS page on many boxes, 30.399 * enabling clean reboots, SMP operation, laptop functions. 30.400 */ 30.401 reserve_bootmem_generic(0, PAGE_SIZE); 30.402 + 30.403 + /* reserve ebda region */ 30.404 + reserve_ebda_region(); 30.405 #endif 30.406 30.407 - /* reserve ebda region */ 30.408 -/* reserve_ebda_region(); */ 30.409 30.410 #ifdef CONFIG_SMP 30.411 /* 30.412 @@ -739,6 +732,7 @@ void __init setup_arch(char **cmdline_p) 30.413 */ 30.414 acpi_reserve_bootmem(); 30.415 #endif 30.416 +#ifdef CONFIG_XEN 30.417 #ifdef CONFIG_BLK_DEV_INITRD 30.418 if (xen_start_info.mod_start) { 30.419 if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) { 30.420 @@ -756,10 +750,27 @@ void __init setup_arch(char **cmdline_p) 30.421 } 30.422 #endif 30.423 #ifdef CONFIG_SMP 30.424 -#ifdef CONFIG_XEN 30.425 smp_alloc_memory(); 30.426 #endif 30.427 +#else /* CONFIG_XEN */ 30.428 +#ifdef CONFIG_BLK_DEV_INITRD 30.429 + if (LOADER_TYPE && INITRD_START) { 30.430 + if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) { 30.431 + reserve_bootmem_generic(INITRD_START, INITRD_SIZE); 30.432 + initrd_start = 30.433 + INITRD_START ? INITRD_START + PAGE_OFFSET : 0; 30.434 + initrd_end = initrd_start+INITRD_SIZE; 30.435 + } 30.436 + else { 30.437 + printk(KERN_ERR "initrd extends beyond end of memory " 30.438 + "(0x%08lx > 0x%08lx)\ndisabling initrd\n", 30.439 + (unsigned long)(INITRD_START + INITRD_SIZE), 30.440 + (unsigned long)(end_pfn << PAGE_SHIFT)); 30.441 + initrd_start = 0; 30.442 + } 30.443 + } 30.444 #endif 30.445 +#endif /* !CONFIG_XEN */ 30.446 paging_init(); 30.447 #ifdef CONFIG_X86_LOCAL_APIC 30.448 /* 30.449 @@ -767,30 +778,36 @@ void __init setup_arch(char **cmdline_p) 30.450 */ 30.451 find_smp_config(); 30.452 #endif 30.453 - /* Make sure we have a large enough P->M table. */ 30.454 - if (end_pfn > xen_start_info.nr_pages) { 30.455 - phys_to_machine_mapping = alloc_bootmem( 30.456 - max_pfn * sizeof(unsigned long)); 30.457 - memset(phys_to_machine_mapping, ~0, 30.458 - max_pfn * sizeof(unsigned long)); 30.459 - memcpy(phys_to_machine_mapping, 30.460 - (unsigned long *)xen_start_info.mfn_list, 30.461 - xen_start_info.nr_pages * sizeof(unsigned long)); 30.462 - free_bootmem( 30.463 - __pa(xen_start_info.mfn_list), 30.464 - PFN_PHYS(PFN_UP(xen_start_info.nr_pages * 30.465 - sizeof(unsigned long)))); 30.466 +#ifdef CONFIG_XEN 30.467 + { 30.468 + int i, j; 30.469 + /* Make sure we have a large enough P->M table. */ 30.470 + if (end_pfn > xen_start_info.nr_pages) { 30.471 + phys_to_machine_mapping = alloc_bootmem( 30.472 + max_pfn * sizeof(unsigned long)); 30.473 + memset(phys_to_machine_mapping, ~0, 30.474 + max_pfn * sizeof(unsigned long)); 30.475 + memcpy(phys_to_machine_mapping, 30.476 + (unsigned long *)xen_start_info.mfn_list, 30.477 + xen_start_info.nr_pages * sizeof(unsigned long)); 30.478 + free_bootmem( 30.479 + __pa(xen_start_info.mfn_list), 30.480 + PFN_PHYS(PFN_UP(xen_start_info.nr_pages * 30.481 + sizeof(unsigned long)))); 30.482 + } 30.483 + 30.484 + pfn_to_mfn_frame_list = alloc_bootmem(PAGE_SIZE); 30.485 + 30.486 + for ( i=0, j=0; i < end_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ ) 30.487 + { 30.488 + pfn_to_mfn_frame_list[j] = 30.489 + virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT; 30.490 + } 30.491 + 30.492 } 30.493 - 30.494 - pfn_to_mfn_frame_list = alloc_bootmem(PAGE_SIZE); 30.495 +#endif 30.496 30.497 - for ( i=0, j=0; i < end_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ ) 30.498 - { 30.499 - pfn_to_mfn_frame_list[j] = 30.500 - virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT; 30.501 - } 30.502 - 30.503 -#if 0 30.504 +#ifndef CONFIG_XEN 30.505 check_ioapic(); 30.506 #endif 30.507 30.508 @@ -806,6 +823,7 @@ void __init setup_arch(char **cmdline_p) 30.509 */ 30.510 acpi_boot_init(); 30.511 #endif 30.512 + 30.513 #ifdef CONFIG_X86_LOCAL_APIC 30.514 /* 30.515 * get boot-time SMP configuration: 30.516 @@ -817,18 +835,14 @@ void __init setup_arch(char **cmdline_p) 30.517 #endif 30.518 #endif 30.519 30.520 - /* XXX Disable irqdebug until we have a way to avoid interrupt 30.521 - * conflicts. */ 30.522 -/* noirqdebug_setup(""); */ 30.523 - 30.524 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST 30.525 +#if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN) 30.526 /* 30.527 * Request address space for all standard RAM and ROM resources 30.528 * and also for regions reported as reserved by the e820. 30.529 */ 30.530 probe_roms(); 30.531 + e820_reserve_resources(); 30.532 #endif 30.533 -/* e820_reserve_resources(); */ 30.534 30.535 request_resource(&iomem_resource, &video_ram_resource); 30.536 30.537 @@ -845,14 +859,40 @@ void __init setup_arch(char **cmdline_p) 30.538 iommu_hole_init(); 30.539 #endif 30.540 30.541 - op.cmd = PHYSDEVOP_SET_IOPL; 30.542 - op.u.set_iopl.iopl = 1; 30.543 - HYPERVISOR_physdev_op(&op); 30.544 +#ifdef CONFIG_XEN 30.545 + { 30.546 + physdev_op_t op; 30.547 + 30.548 + op.cmd = PHYSDEVOP_SET_IOPL; 30.549 + op.u.set_iopl.iopl = 1; 30.550 + HYPERVISOR_physdev_op(&op); 30.551 30.552 - if (xen_start_info.flags & SIF_INITDOMAIN) { 30.553 - if (!(xen_start_info.flags & SIF_PRIVILEGED)) 30.554 - panic("Xen granted us console access " 30.555 - "but not privileged status"); 30.556 + if (xen_start_info.flags & SIF_INITDOMAIN) { 30.557 + if (!(xen_start_info.flags & SIF_PRIVILEGED)) 30.558 + panic("Xen granted us console access " 30.559 + "but not privileged status"); 30.560 + 30.561 +#ifdef CONFIG_VT 30.562 +#if defined(CONFIG_VGA_CONSOLE) 30.563 + conswitchp = &vga_con; 30.564 +#elif defined(CONFIG_DUMMY_CONSOLE) 30.565 + conswitchp = &dummy_con; 30.566 +#endif 30.567 +#endif 30.568 + } else { 30.569 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST 30.570 + extern const struct consw xennull_con; 30.571 + extern int console_use_vt; 30.572 +#if defined(CONFIG_VGA_CONSOLE) 30.573 + /* disable VGA driver */ 30.574 + ORIG_VIDEO_ISVGA = VIDEO_TYPE_VLFB; 30.575 +#endif 30.576 + conswitchp = &xennull_con; 30.577 + console_use_vt = 0; 30.578 +#endif 30.579 + } 30.580 + } 30.581 +#else /* CONFIG_XEN */ 30.582 30.583 #ifdef CONFIG_VT 30.584 #if defined(CONFIG_VGA_CONSOLE) 30.585 @@ -861,18 +901,8 @@ void __init setup_arch(char **cmdline_p) 30.586 conswitchp = &dummy_con; 30.587 #endif 30.588 #endif 30.589 - } else { 30.590 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST 30.591 - extern const struct consw xennull_con; 30.592 - extern int console_use_vt; 30.593 -#if defined(CONFIG_VGA_CONSOLE) 30.594 - /* disable VGA driver */ 30.595 - ORIG_VIDEO_ISVGA = VIDEO_TYPE_VLFB; 30.596 -#endif 30.597 - conswitchp = &xennull_con; 30.598 - console_use_vt = 0; 30.599 -#endif 30.600 - } 30.601 + 30.602 +#endif /* !CONFIG_XEN */ 30.603 } 30.604 30.605 static int __init get_model_name(struct cpuinfo_x86 *c)
36.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c Fri Aug 12 09:35:15 2005 -0800 36.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c Mon Aug 15 10:32:29 2005 -0800 36.3 @@ -557,8 +557,6 @@ static void xen_copy_pt(void) 36.4 36.5 void __init xen_init_pt(void) 36.6 { 36.7 - pgd_t *old_level4 = (pgd_t *)xen_start_info.pt_base; 36.8 - 36.9 memcpy((void *)init_level4_pgt, 36.10 (void *)xen_start_info.pt_base, PAGE_SIZE); 36.11
37.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/ioremap.c Fri Aug 12 09:35:15 2005 -0800 37.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/ioremap.c Mon Aug 15 10:32:29 2005 -0800 37.3 @@ -464,3 +464,34 @@ int direct_remap_area_pages(struct mm_st 37.4 } 37.5 37.6 EXPORT_SYMBOL(direct_remap_area_pages); 37.7 + 37.8 +int create_lookup_pte_addr(struct mm_struct *mm, 37.9 + unsigned long address, 37.10 + unsigned long *ptep) 37.11 +{ 37.12 + int f(pte_t *pte, struct page *pte_page, unsigned long addr, void *data) 37.13 + { 37.14 + unsigned long *ptep = (unsigned long *)data; 37.15 + if (ptep) *ptep = (pfn_to_mfn(page_to_pfn(pte_page)) << PAGE_SHIFT) 37.16 + | ((unsigned long)pte & ~PAGE_MASK); 37.17 + return 0; 37.18 + } 37.19 + 37.20 + return generic_page_range(mm, address, PAGE_SIZE, f, ptep); 37.21 +} 37.22 + 37.23 +EXPORT_SYMBOL(create_lookup_pte_addr); 37.24 + 37.25 +int touch_pte_range(struct mm_struct *mm, 37.26 + unsigned long address, 37.27 + unsigned long size) 37.28 +{ 37.29 + int f(pte_t *pte, struct page *pte_page, unsigned long addr, void *data) 37.30 + { 37.31 + return 0; 37.32 + } 37.33 + 37.34 + return generic_page_range(mm, address, size, f, NULL); 37.35 +} 37.36 + 37.37 +EXPORT_SYMBOL(touch_pte_range);
38.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Fri Aug 12 09:35:15 2005 -0800 38.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Mon Aug 15 10:32:29 2005 -0800 38.3 @@ -211,11 +211,11 @@ static void balloon_process(void *unused 38.4 /* Link back into the page tables if it's not a highmem page. */ 38.5 if ( pfn < max_low_pfn ) 38.6 { 38.7 - HYPERVISOR_update_va_mapping( 38.8 + BUG_ON(HYPERVISOR_update_va_mapping( 38.9 (unsigned long)__va(pfn << PAGE_SHIFT), 38.10 __pte_ma((mfn_list[i] << PAGE_SHIFT) | 38.11 pgprot_val(PAGE_KERNEL)), 38.12 - 0); 38.13 + 0)); 38.14 } 38.15 38.16 /* Finally, relinquish the memory back to the system allocator. */ 38.17 @@ -249,8 +249,8 @@ static void balloon_process(void *unused 38.18 { 38.19 v = phys_to_virt(pfn << PAGE_SHIFT); 38.20 scrub_pages(v, 1); 38.21 - HYPERVISOR_update_va_mapping( 38.22 - (unsigned long)v, __pte_ma(0), 0); 38.23 + BUG_ON(HYPERVISOR_update_va_mapping( 38.24 + (unsigned long)v, __pte_ma(0), 0)); 38.25 } 38.26 #ifdef CONFIG_XEN_SCRUB_PAGES 38.27 else
40.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c Fri Aug 12 09:35:15 2005 -0800 40.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c Mon Aug 15 10:32:29 2005 -0800 40.3 @@ -120,10 +120,10 @@ static void fast_flush_area(int idx, int 40.4 { 40.5 if ( BLKBACK_INVALID_HANDLE != ( handle = pending_handle(idx, i) ) ) 40.6 { 40.7 - unmap[i].host_virt_addr = MMAP_VADDR(idx, i); 40.8 + unmap[i].host_addr = MMAP_VADDR(idx, i); 40.9 unmap[i].dev_bus_addr = 0; 40.10 unmap[i].handle = handle; 40.11 - pending_handle(idx, i) = BLKBACK_INVALID_HANDLE; 40.12 + pending_handle(idx, i) = BLKBACK_INVALID_HANDLE; 40.13 invcount++; 40.14 } 40.15 } 40.16 @@ -383,7 +383,7 @@ static void dispatch_probe(blkif_t *blki 40.17 { 40.18 struct gnttab_map_grant_ref map; 40.19 40.20 - map.host_virt_addr = MMAP_VADDR(pending_idx, 0); 40.21 + map.host_addr = MMAP_VADDR(pending_idx, 0); 40.22 map.flags = GNTMAP_host_map; 40.23 map.ref = blkif_gref_from_fas(req->frame_and_sects[0]); 40.24 map.dom = blkif->domid; 40.25 @@ -480,7 +480,7 @@ static void dispatch_rw_block_io(blkif_t 40.26 goto bad_descriptor; 40.27 preq.nr_sects += seg[i].nsec; 40.28 40.29 - map[i].host_virt_addr = MMAP_VADDR(pending_idx, i); 40.30 + map[i].host_addr = MMAP_VADDR(pending_idx, i); 40.31 map[i].dom = blkif->domid; 40.32 map[i].ref = blkif_gref_from_fas(fas); 40.33 map[i].flags = GNTMAP_host_map;
42.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/interface.c Fri Aug 12 09:35:15 2005 -0800 42.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/interface.c Mon Aug 15 10:32:29 2005 -0800 42.3 @@ -42,7 +42,7 @@ static void __blkif_disconnect_complete( 42.4 * must still be notified to the remote driver. 42.5 */ 42.6 #ifdef CONFIG_XEN_BLKDEV_GRANT 42.7 - op.host_virt_addr = blkif->shmem_vaddr; 42.8 + op.host_addr = blkif->shmem_vaddr; 42.9 op.handle = blkif->shmem_handle; 42.10 op.dev_bus_addr = 0; 42.11 BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, &op, 1)); 42.12 @@ -204,7 +204,7 @@ void blkif_connect(blkif_be_connect_t *c 42.13 #else 42.14 { /* Map: Use the Grant table reference */ 42.15 struct gnttab_map_grant_ref op; 42.16 - op.host_virt_addr = VMALLOC_VMADDR(vma->addr); 42.17 + op.host_addr = VMALLOC_VMADDR(vma->addr); 42.18 op.flags = GNTMAP_host_map; 42.19 op.ref = ref; 42.20 op.dom = domid;
44.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h Fri Aug 12 09:35:15 2005 -0800 44.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h Mon Aug 15 10:32:29 2005 -0800 44.3 @@ -20,6 +20,13 @@ 44.4 #include <asm/io.h> 44.5 #include <asm/pgalloc.h> 44.6 44.7 +#if defined(CONFIG_XEN_NETDEV_GRANT_TX) || defined(CONFIG_XEN_NETDEV_GRANT_RX) 44.8 +#include <asm-xen/xen-public/grant_table.h> 44.9 +#include <asm-xen/gnttab.h> 44.10 +#endif 44.11 + 44.12 + 44.13 + 44.14 #if 0 44.15 #define ASSERT(_p) \ 44.16 if ( !(_p) ) { printk("Assertion '%s' failed, line %d, file %s", #_p , \ 44.17 @@ -40,7 +47,17 @@ typedef struct netif_st { 44.18 44.19 /* Physical parameters of the comms window. */ 44.20 unsigned long tx_shmem_frame; 44.21 +#ifdef CONFIG_XEN_NETDEV_GRANT_TX 44.22 + u16 tx_shmem_handle; 44.23 + memory_t tx_shmem_vaddr; 44.24 + grant_ref_t tx_shmem_ref; 44.25 +#endif 44.26 unsigned long rx_shmem_frame; 44.27 +#ifdef CONFIG_XEN_NETDEV_GRANT_RX 44.28 + u16 rx_shmem_handle; 44.29 + memory_t rx_shmem_vaddr; 44.30 + grant_ref_t rx_shmem_ref; 44.31 +#endif 44.32 unsigned int evtchn; 44.33 44.34 /* The shared rings and indexes. */
45.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/interface.c Fri Aug 12 09:35:15 2005 -0800 45.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/interface.c Mon Aug 15 10:32:29 2005 -0800 45.3 @@ -71,12 +71,31 @@ static void __netif_disconnect_complete( 45.4 netif_t *netif = (netif_t *)arg; 45.5 ctrl_msg_t cmsg; 45.6 netif_be_disconnect_t disc; 45.7 +#if defined(CONFIG_XEN_NETDEV_GRANT_RX) || defined(CONFIG_XEN_NETDEV_GRANT_TX) 45.8 + struct gnttab_unmap_grant_ref op; 45.9 +#endif 45.10 45.11 /* 45.12 * These can't be done in netif_disconnect() because at that point there 45.13 * may be outstanding requests in the network stack whose asynchronous 45.14 * responses must still be notified to the remote driver. 45.15 */ 45.16 + 45.17 +#ifdef CONFIG_XEN_NETDEV_GRANT_TX 45.18 + op.host_addr = netif->tx_shmem_vaddr; 45.19 + op.handle = netif->tx_shmem_handle; 45.20 + op.dev_bus_addr = 0; 45.21 + BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, &op, 1)); 45.22 +#endif 45.23 + 45.24 +#ifdef CONFIG_XEN_NETDEV_GRANT_RX 45.25 + op.host_addr = netif->rx_shmem_vaddr; 45.26 + op.handle = netif->rx_shmem_handle; 45.27 + op.dev_bus_addr = 0; 45.28 + BUG_ON(HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, &op, 1)); 45.29 +#endif 45.30 + 45.31 + 45.32 vfree(netif->tx); /* Frees netif->rx as well. */ 45.33 45.34 /* Construct the deferred response message. */ 45.35 @@ -275,37 +294,101 @@ void netif_connect(netif_be_connect_t *c 45.36 unsigned long tx_shmem_frame = connect->tx_shmem_frame; 45.37 unsigned long rx_shmem_frame = connect->rx_shmem_frame; 45.38 struct vm_struct *vma; 45.39 - pgprot_t prot; 45.40 +#if !defined(CONFIG_XEN_NETDEV_GRANT_TX)||!defined(CONFIG_XEN_NETDEV_GRANT_RX) 45.41 + pgprot_t prot = __pgprot(_KERNPG_TABLE); 45.42 int error; 45.43 +#endif 45.44 netif_t *netif; 45.45 45.46 netif = netif_find_by_handle(domid, handle); 45.47 - if ( unlikely(netif == NULL) ) 45.48 - { 45.49 + if ( unlikely(netif == NULL) ) { 45.50 DPRINTK("netif_connect attempted for non-existent netif (%u,%u)\n", 45.51 connect->domid, connect->netif_handle); 45.52 connect->status = NETIF_BE_STATUS_INTERFACE_NOT_FOUND; 45.53 return; 45.54 } 45.55 45.56 - if ( netif->status != DISCONNECTED ) 45.57 - { 45.58 + if ( netif->status != DISCONNECTED ) { 45.59 connect->status = NETIF_BE_STATUS_INTERFACE_CONNECTED; 45.60 return; 45.61 } 45.62 45.63 - if ( (vma = get_vm_area(2*PAGE_SIZE, VM_IOREMAP)) == NULL ) 45.64 - { 45.65 + if ( (vma = get_vm_area(2*PAGE_SIZE, VM_IOREMAP)) == NULL ) { 45.66 connect->status = NETIF_BE_STATUS_OUT_OF_MEMORY; 45.67 return; 45.68 } 45.69 45.70 - prot = __pgprot(_KERNPG_TABLE); 45.71 - error = direct_remap_area_pages(&init_mm, 45.72 - VMALLOC_VMADDR(vma->addr), 45.73 - tx_shmem_frame<<PAGE_SHIFT, PAGE_SIZE, 45.74 - prot, domid); 45.75 - error |= direct_remap_area_pages(&init_mm, 45.76 + 45.77 +#if defined(CONFIG_XEN_NETDEV_GRANT_TX) 45.78 + { 45.79 + struct gnttab_map_grant_ref op; 45.80 + int tx_ref = connect->tx_shmem_ref; 45.81 + 45.82 + /* Map: Use the Grant table reference */ 45.83 + op.host_addr = VMALLOC_VMADDR(vma->addr); 45.84 + op.flags = GNTMAP_host_map; 45.85 + op.ref = tx_ref; 45.86 + op.dom = domid; 45.87 + 45.88 + if ((HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op, 1) < 0) || 45.89 + (op.handle < 0)) { 45.90 + DPRINTK(" Grant table operation failure !\n"); 45.91 + connect->status = NETIF_BE_STATUS_MAPPING_ERROR; 45.92 + vfree(vma->addr); 45.93 + return; 45.94 + } 45.95 + 45.96 + netif->tx_shmem_ref = tx_ref; 45.97 + netif->tx_shmem_handle = op.handle; 45.98 + netif->tx_shmem_vaddr = VMALLOC_VMADDR(vma->addr); 45.99 + } 45.100 + 45.101 + 45.102 +#else 45.103 + error = direct_remap_area_pages(&init_mm, 45.104 + VMALLOC_VMADDR(vma->addr), 45.105 + tx_shmem_frame<<PAGE_SHIFT, PAGE_SIZE, 45.106 + prot, domid); 45.107 + if ( error != 0 ) 45.108 + { 45.109 + if ( error == -ENOMEM ) 45.110 + connect->status = NETIF_BE_STATUS_OUT_OF_MEMORY; 45.111 + else if ( error == -EFAULT ) 45.112 + connect->status = NETIF_BE_STATUS_MAPPING_ERROR; 45.113 + else 45.114 + connect->status = NETIF_BE_STATUS_ERROR; 45.115 + vfree(vma->addr); 45.116 + return; 45.117 + } 45.118 +#endif 45.119 + 45.120 + 45.121 +#if defined(CONFIG_XEN_NETDEV_GRANT_RX) 45.122 + { 45.123 + struct gnttab_map_grant_ref op; 45.124 + int rx_ref = connect->rx_shmem_ref; 45.125 + 45.126 + 45.127 + /* Map: Use the Grant table reference */ 45.128 + op.host_addr = VMALLOC_VMADDR(vma->addr) + PAGE_SIZE; 45.129 + op.flags = GNTMAP_host_map; 45.130 + op.ref = rx_ref; 45.131 + op.dom = domid; 45.132 + 45.133 + if ((HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op, 1) < 0) || 45.134 + (op.handle < 0)) { 45.135 + DPRINTK(" Grant table operation failure !\n"); 45.136 + connect->status = NETIF_BE_STATUS_MAPPING_ERROR; 45.137 + vfree(vma->addr); 45.138 + return; 45.139 + } 45.140 + 45.141 + netif->rx_shmem_ref = rx_ref; 45.142 + netif->rx_shmem_handle = handle; 45.143 + netif->rx_shmem_vaddr = VMALLOC_VMADDR(vma->addr) + PAGE_SIZE; 45.144 + } 45.145 +#else 45.146 + error = direct_remap_area_pages(&init_mm, 45.147 VMALLOC_VMADDR(vma->addr) + PAGE_SIZE, 45.148 rx_shmem_frame<<PAGE_SHIFT, PAGE_SIZE, 45.149 prot, domid); 45.150 @@ -321,6 +404,8 @@ void netif_connect(netif_be_connect_t *c 45.151 return; 45.152 } 45.153 45.154 +#endif 45.155 + 45.156 netif->evtchn = evtchn; 45.157 netif->tx_shmem_frame = tx_shmem_frame; 45.158 netif->rx_shmem_frame = rx_shmem_frame;
46.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Fri Aug 12 09:35:15 2005 -0800 46.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c Mon Aug 15 10:32:29 2005 -0800 46.3 @@ -55,10 +55,14 @@ static DECLARE_TASKLET(net_rx_tasklet, n 46.4 46.5 static struct timer_list net_timer; 46.6 46.7 +#define MAX_PENDING_REQS 256 46.8 + 46.9 static struct sk_buff_head rx_queue; 46.10 static multicall_entry_t rx_mcl[NETIF_RX_RING_SIZE*2+1]; 46.11 static mmu_update_t rx_mmu[NETIF_RX_RING_SIZE]; 46.12 -#ifndef CONFIG_XEN_NETDEV_GRANT_RX 46.13 +#ifdef CONFIG_XEN_NETDEV_GRANT_RX 46.14 +static gnttab_donate_t grant_rx_op[MAX_PENDING_REQS]; 46.15 +#else 46.16 static struct mmuext_op rx_mmuext[NETIF_RX_RING_SIZE]; 46.17 #endif 46.18 static unsigned char rx_notify[NR_EVENT_CHANNELS]; 46.19 @@ -66,7 +70,6 @@ static unsigned char rx_notify[NR_EVENT_ 46.20 /* Don't currently gate addition of an interface to the tx scheduling list. */ 46.21 #define tx_work_exists(_if) (1) 46.22 46.23 -#define MAX_PENDING_REQS 256 46.24 static unsigned long mmap_vstart; 46.25 #define MMAP_VADDR(_req) (mmap_vstart + ((_req) * PAGE_SIZE)) 46.26 46.27 @@ -90,11 +93,9 @@ static struct sk_buff_head tx_queue; 46.28 46.29 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 46.30 static u16 grant_tx_ref[MAX_PENDING_REQS]; 46.31 -#endif 46.32 -#ifdef CONFIG_XEN_NETDEV_GRANT_RX 46.33 -static gnttab_donate_t grant_rx_op[MAX_PENDING_REQS]; 46.34 -#endif 46.35 -#ifndef CONFIG_XEN_NETDEV_GRANT_TX 46.36 +static gnttab_unmap_grant_ref_t tx_unmap_ops[MAX_PENDING_REQS]; 46.37 +static gnttab_map_grant_ref_t tx_map_ops[MAX_PENDING_REQS]; 46.38 +#else 46.39 static multicall_entry_t tx_mcl[MAX_PENDING_REQS]; 46.40 #endif 46.41 46.42 @@ -492,7 +493,6 @@ static void tx_credit_callback(unsigned 46.43 inline static void net_tx_action_dealloc(void) 46.44 { 46.45 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 46.46 - gnttab_unmap_grant_ref_t unmap_ops[MAX_PENDING_REQS]; 46.47 gnttab_unmap_grant_ref_t *gop; 46.48 #else 46.49 multicall_entry_t *mcl; 46.50 @@ -508,19 +508,18 @@ inline static void net_tx_action_dealloc 46.51 /* 46.52 * Free up any grants we have finished using 46.53 */ 46.54 - gop = unmap_ops; 46.55 - while (dc != dp) { 46.56 + gop = tx_unmap_ops; 46.57 + while ( dc != dp ) 46.58 + { 46.59 pending_idx = dealloc_ring[MASK_PEND_IDX(dc++)]; 46.60 - gop->host_virt_addr = MMAP_VADDR(pending_idx); 46.61 + gop->host_addr = MMAP_VADDR(pending_idx); 46.62 gop->dev_bus_addr = 0; 46.63 - gop->handle = grant_tx_ref[pending_idx]; 46.64 + gop->handle = grant_tx_ref[pending_idx]; 46.65 grant_tx_ref[pending_idx] = GRANT_INVALID_REF; 46.66 gop++; 46.67 } 46.68 - if (unlikely(HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref, 46.69 - unmap_ops, gop - unmap_ops))) { 46.70 - BUG(); 46.71 - } 46.72 + BUG_ON(HYPERVISOR_grant_table_op( 46.73 + GNTTABOP_unmap_grant_ref, tx_unmap_ops, gop - tx_unmap_ops)); 46.74 #else 46.75 mcl = tx_mcl; 46.76 while ( dc != dp ) 46.77 @@ -583,7 +582,6 @@ static void net_tx_action(unsigned long 46.78 u16 pending_idx; 46.79 NETIF_RING_IDX i; 46.80 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 46.81 - gnttab_map_grant_ref_t map_ops[MAX_PENDING_REQS]; 46.82 gnttab_map_grant_ref_t *mop; 46.83 #else 46.84 multicall_entry_t *mcl; 46.85 @@ -594,7 +592,7 @@ static void net_tx_action(unsigned long 46.86 net_tx_action_dealloc(); 46.87 46.88 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 46.89 - mop = map_ops; 46.90 + mop = tx_map_ops; 46.91 #else 46.92 mcl = tx_mcl; 46.93 #endif 46.94 @@ -699,10 +697,10 @@ static void net_tx_action(unsigned long 46.95 /* Packets passed to netif_rx() must have some headroom. */ 46.96 skb_reserve(skb, 16); 46.97 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 46.98 - mop->host_virt_addr = MMAP_VADDR(pending_idx); 46.99 - mop->dom = netif->domid; 46.100 - mop->ref = txreq.addr >> PAGE_SHIFT; 46.101 - mop->flags = GNTMAP_host_map | GNTMAP_readonly; 46.102 + mop->host_addr = MMAP_VADDR(pending_idx); 46.103 + mop->dom = netif->domid; 46.104 + mop->ref = txreq.addr >> PAGE_SHIFT; 46.105 + mop->flags = GNTMAP_host_map | GNTMAP_readonly; 46.106 mop++; 46.107 #else 46.108 MULTI_update_va_mapping_otherdomain( 46.109 @@ -722,7 +720,7 @@ static void net_tx_action(unsigned long 46.110 pending_cons++; 46.111 46.112 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 46.113 - if ((mop - map_ops) >= ARRAY_SIZE(map_ops)) 46.114 + if ( (mop - tx_map_ops) >= ARRAY_SIZE(tx_map_ops) ) 46.115 break; 46.116 #else 46.117 /* Filled the batch queue? */ 46.118 @@ -732,20 +730,18 @@ static void net_tx_action(unsigned long 46.119 } 46.120 46.121 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 46.122 - if (mop == map_ops) { 46.123 + if ( mop == tx_map_ops ) 46.124 return; 46.125 - } 46.126 - if (unlikely(HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, 46.127 - map_ops, mop - map_ops))) { 46.128 - BUG(); 46.129 - } 46.130 - mop = map_ops; 46.131 + 46.132 + BUG_ON(HYPERVISOR_grant_table_op( 46.133 + GNTTABOP_map_grant_ref, tx_map_ops, mop - tx_map_ops)); 46.134 + 46.135 + mop = tx_map_ops; 46.136 #else 46.137 if ( mcl == tx_mcl ) 46.138 return; 46.139 46.140 - if ( unlikely(HYPERVISOR_multicall(tx_mcl, mcl - tx_mcl) != 0) ) 46.141 - BUG(); 46.142 + BUG_ON(HYPERVISOR_multicall(tx_mcl, mcl - tx_mcl) != 0); 46.143 46.144 mcl = tx_mcl; 46.145 #endif 46.146 @@ -757,7 +753,13 @@ static void net_tx_action(unsigned long 46.147 46.148 /* Check the remap error code. */ 46.149 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 46.150 - if (unlikely(mop->dev_bus_addr == 0)) { 46.151 + /* 46.152 + XXX SMH: error returns from grant operations are pretty poorly 46.153 + specified/thought out, but the below at least conforms with 46.154 + what the rest of the code uses. 46.155 + */ 46.156 + if ( unlikely(mop->handle < 0) ) 46.157 + { 46.158 printk(KERN_ALERT "#### netback grant fails\n"); 46.159 make_tx_response(netif, txreq.id, NETIF_RSP_ERROR); 46.160 netif_put(netif);
47.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Fri Aug 12 09:35:15 2005 -0800 47.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Mon Aug 15 10:32:29 2005 -0800 47.3 @@ -59,7 +59,7 @@ 47.4 #include <asm-xen/gnttab.h> 47.5 #ifdef GRANT_DEBUG 47.6 static void 47.7 -dump_packet(int tag, u32 addr, u32 ap) 47.8 +dump_packet(int tag, void *addr, u32 ap) 47.9 { 47.10 unsigned char *p = (unsigned char *)ap; 47.11 int i; 47.12 @@ -200,7 +200,7 @@ static char *be_state_name[] = { 47.13 [BEST_CONNECTED] = "connected", 47.14 }; 47.15 47.16 -#if DEBUG 47.17 +#ifdef DEBUG 47.18 #define DPRINTK(fmt, args...) \ 47.19 printk(KERN_ALERT "xen_net (%s:%d) " fmt, __FUNCTION__, __LINE__, ##args) 47.20 #else 47.21 @@ -356,8 +356,12 @@ static void network_tx_buf_gc(struct net 47.22 id = np->tx->ring[MASK_NETIF_TX_IDX(i)].resp.id; 47.23 skb = np->tx_skbs[id]; 47.24 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 47.25 - if (gnttab_query_foreign_access(grant_tx_ref[id]) != 0) { 47.26 - printk(KERN_ALERT "netfront: query foreign access\n"); 47.27 + if (unlikely(gnttab_query_foreign_access(grant_tx_ref[id]) != 0)) { 47.28 + /* other domain is still using this grant - shouldn't happen 47.29 + but if it does, we'll try to reclaim the grant later */ 47.30 + printk(KERN_ALERT "network_tx_buf_gc: warning -- grant " 47.31 + "still in use by backend domain.\n"); 47.32 + goto out; 47.33 } 47.34 gnttab_end_foreign_access(grant_tx_ref[id], GNTMAP_readonly); 47.35 gnttab_release_grant_reference(&gref_tx_head, grant_tx_ref[id]); 47.36 @@ -382,6 +386,10 @@ static void network_tx_buf_gc(struct net 47.37 mb(); 47.38 } while (prod != np->tx->resp_prod); 47.39 47.40 +#ifdef CONFIG_XEN_NETDEV_GRANT_TX 47.41 + out: 47.42 +#endif 47.43 + 47.44 if (np->tx_full && ((np->tx->req_prod - prod) < NETIF_TX_RING_SIZE)) { 47.45 np->tx_full = 0; 47.46 if (np->user_state == UST_OPEN) 47.47 @@ -433,13 +441,15 @@ static void network_alloc_rx_buffers(str 47.48 47.49 np->rx->ring[MASK_NETIF_RX_IDX(req_prod + i)].req.id = id; 47.50 #ifdef CONFIG_XEN_NETDEV_GRANT_RX 47.51 - if ((ref = gnttab_claim_grant_reference(&gref_rx_head, gref_rx_terminal)) < 0) { 47.52 + if (unlikely((ref = gnttab_claim_grant_reference(&gref_rx_head, 47.53 + gref_rx_terminal)) < 0)) { 47.54 printk(KERN_ALERT "#### netfront can't claim rx reference\n"); 47.55 BUG(); 47.56 } 47.57 grant_rx_ref[id] = ref; 47.58 gnttab_grant_foreign_transfer_ref(ref, rdomid, 47.59 - virt_to_machine(skb->head) >> PAGE_SHIFT); 47.60 + virt_to_machine( 47.61 + skb->head) >> PAGE_SHIFT); 47.62 np->rx->ring[MASK_NETIF_RX_IDX(req_prod + i)].req.gref = ref; 47.63 #endif 47.64 rx_pfn_array[i] = virt_to_machine(skb->head) >> PAGE_SHIFT; 47.65 @@ -528,7 +538,8 @@ static int network_start_xmit(struct sk_ 47.66 47.67 tx->id = id; 47.68 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 47.69 - if ((ref = gnttab_claim_grant_reference(&gref_tx_head, gref_tx_terminal)) < 0) { 47.70 + if (unlikely((ref = gnttab_claim_grant_reference(&gref_tx_head, 47.71 + gref_tx_terminal)) < 0)) { 47.72 printk(KERN_ALERT "#### netfront can't claim tx grant reference\n"); 47.73 BUG(); 47.74 } 47.75 @@ -638,7 +649,6 @@ static int netif_poll(struct net_device 47.76 #ifdef CONFIG_XEN_NETDEV_GRANT_RX 47.77 ref = grant_rx_ref[rx->id]; 47.78 grant_rx_ref[rx->id] = GRANT_INVALID_REF; 47.79 - 47.80 mfn = gnttab_end_foreign_transfer(ref); 47.81 gnttab_release_grant_reference(&gref_rx_head, ref); 47.82 #endif 47.83 @@ -674,18 +684,20 @@ static int netif_poll(struct net_device 47.84 pfn_pte_ma(mfn, PAGE_KERNEL), 0); 47.85 #else 47.86 MULTI_update_va_mapping(mcl, (unsigned long)skb->head, 47.87 - pfn_pte_ma(rx->addr >> PAGE_SHIFT, PAGE_KERNEL), 0); 47.88 + pfn_pte_ma(rx->addr >> PAGE_SHIFT, 47.89 + PAGE_KERNEL), 0); 47.90 #endif 47.91 mcl++; 47.92 47.93 +#ifdef CONFIG_XEN_NETDEV_GRANT_RX 47.94 + phys_to_machine_mapping[__pa(skb->head) >> PAGE_SHIFT] = mfn; 47.95 +#else 47.96 phys_to_machine_mapping[__pa(skb->head) >> PAGE_SHIFT] = 47.97 -#ifdef CONFIG_XEN_NETDEV_GRANT_RX 47.98 - mfn; 47.99 -#else 47.100 rx->addr >> PAGE_SHIFT; 47.101 #endif 47.102 + 47.103 #ifdef GRANT_DEBUG 47.104 - printk(KERN_ALERT "#### rx_poll enqueue vdata=%08x mfn=%08x ref=%04x\n", 47.105 + printk(KERN_ALERT "#### rx_poll enqueue vdata=%p mfn=%lu ref=%x\n", 47.106 skb->data, mfn, ref); 47.107 #endif 47.108 __skb_queue_tail(&rxq, skb); 47.109 @@ -707,9 +719,9 @@ static int netif_poll(struct net_device 47.110 47.111 while ((skb = __skb_dequeue(&rxq)) != NULL) { 47.112 #ifdef GRANT_DEBUG 47.113 - printk(KERN_ALERT "#### rx_poll dequeue vdata=%08x mfn=%08x\n", 47.114 - skb->data, virt_to_machine(skb->data)>>PAGE_SHIFT); 47.115 - dump_packet('d', skb->data, (unsigned long)skb->data); 47.116 + printk(KERN_ALERT "#### rx_poll dequeue vdata=%p mfn=%lu\n", 47.117 + skb->data, virt_to_machine(skb->data)>>PAGE_SHIFT); 47.118 + dump_packet('d', skb->data, (unsigned long)skb->data); 47.119 #endif 47.120 /* 47.121 * Enough room in skbuff for the data we were passed? Also, Linux 47.122 @@ -884,7 +896,7 @@ static void network_connect(struct net_d 47.123 47.124 static void vif_show(struct net_private *np) 47.125 { 47.126 -#if DEBUG 47.127 +#ifdef DEBUG 47.128 if (np) { 47.129 IPRINTK("<vif handle=%u %s(%s) evtchn=%u tx=%p rx=%p>\n", 47.130 np->handle, 47.131 @@ -911,8 +923,29 @@ static void send_interface_connect(struc 47.132 47.133 msg->handle = np->handle; 47.134 msg->tx_shmem_frame = (virt_to_machine(np->tx) >> PAGE_SHIFT); 47.135 +#ifdef CONFIG_XEN_NETDEV_GRANT_TX 47.136 + msg->tx_shmem_ref = (u32)gnttab_claim_grant_reference(&gref_tx_head, 47.137 + gref_tx_terminal); 47.138 + if(msg->tx_shmem_ref < 0) { 47.139 + printk(KERN_ALERT "#### netfront can't claim tx_shmem reference\n"); 47.140 + BUG(); 47.141 + } 47.142 + gnttab_grant_foreign_access_ref (msg->tx_shmem_ref, rdomid, 47.143 + msg->tx_shmem_frame, 0); 47.144 +#endif 47.145 + 47.146 msg->rx_shmem_frame = (virt_to_machine(np->rx) >> PAGE_SHIFT); 47.147 - 47.148 +#ifdef CONFIG_XEN_NETDEV_GRANT_RX 47.149 + msg->rx_shmem_ref = (u32)gnttab_claim_grant_reference(&gref_rx_head, 47.150 + gref_rx_terminal); 47.151 + if(msg->rx_shmem_ref < 0) { 47.152 + printk(KERN_ALERT "#### netfront can't claim rx_shmem reference\n"); 47.153 + BUG(); 47.154 + } 47.155 + gnttab_grant_foreign_access_ref (msg->rx_shmem_ref, rdomid, 47.156 + msg->rx_shmem_frame, 0); 47.157 +#endif 47.158 + 47.159 ctrl_if_send_message_block(&cmsg, NULL, 0, TASK_UNINTERRUPTIBLE); 47.160 } 47.161 47.162 @@ -1380,20 +1413,22 @@ static int __init netif_init(void) 47.163 if (xen_start_info.flags & SIF_INITDOMAIN) 47.164 return 0; 47.165 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 47.166 - if (gnttab_alloc_grant_references(NETIF_TX_RING_SIZE, 47.167 + /* A grant for every ring slot, plus one for the ring itself */ 47.168 + if (gnttab_alloc_grant_references(NETIF_TX_RING_SIZE + 1, 47.169 &gref_tx_head, &gref_tx_terminal) < 0) { 47.170 printk(KERN_ALERT "#### netfront can't alloc tx grant refs\n"); 47.171 return 1; 47.172 } 47.173 - printk(KERN_ALERT "#### netfront tx using grant tables\n"); 47.174 + printk(KERN_ALERT "Netdev frontend (TX) is using grant tables.\n"); 47.175 #endif 47.176 #ifdef CONFIG_XEN_NETDEV_GRANT_RX 47.177 - if (gnttab_alloc_grant_references(NETIF_RX_RING_SIZE, 47.178 + /* A grant for every ring slot, plus one for the ring itself */ 47.179 + if (gnttab_alloc_grant_references(NETIF_RX_RING_SIZE + 1, 47.180 &gref_rx_head, &gref_rx_terminal) < 0) { 47.181 printk(KERN_ALERT "#### netfront can't alloc rx grant refs\n"); 47.182 return 1; 47.183 } 47.184 - printk(KERN_ALERT "#### netfront rx using grant tables\n"); 47.185 + printk(KERN_ALERT "Netdev frontend (RX) is using grant tables.\n"); 47.186 #endif 47.187 47.188 if ((err = xennet_proc_init()) != 0) 47.189 @@ -1417,10 +1452,10 @@ static int __init netif_init(void) 47.190 static void netif_exit(void) 47.191 { 47.192 #ifdef CONFIG_XEN_NETDEV_GRANT_TX 47.193 - gnttab_free_grant_references(NETIF_TX_RING_SIZE, gref_tx_head); 47.194 + gnttab_free_grant_references(NETIF_TX_RING_SIZE + 1, gref_tx_head); 47.195 #endif 47.196 #ifdef CONFIG_XEN_NETDEV_GRANT_RX 47.197 - gnttab_free_grant_references(NETIF_RX_RING_SIZE, gref_rx_head); 47.198 + gnttab_free_grant_references(NETIF_RX_RING_SIZE + 1, gref_rx_head); 47.199 #endif 47.200 } 47.201
48.1 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c Fri Aug 12 09:35:15 2005 -0800 48.2 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c Mon Aug 15 10:32:29 2005 -0800 48.3 @@ -139,7 +139,7 @@ static int privcmd_ioctl(struct inode *i 48.4 privcmd_mmapbatch_t m; 48.5 struct vm_area_struct *vma = NULL; 48.6 unsigned long *p, addr; 48.7 - unsigned long mfn; 48.8 + unsigned long mfn, ptep; 48.9 int i; 48.10 48.11 if ( copy_from_user(&m, (void *)data, sizeof(m)) ) 48.12 @@ -163,12 +163,12 @@ static int privcmd_ioctl(struct inode *i 48.13 if ( get_user(mfn, p) ) 48.14 return -EFAULT; 48.15 48.16 - u.val = (mfn << PAGE_SHIFT) | pgprot_val(vma->vm_page_prot); 48.17 + ret = create_lookup_pte_addr(vma->vm_mm, addr, &ptep); 48.18 + if (ret) 48.19 + goto batch_err; 48.20 48.21 - __direct_remap_area_pages(vma->vm_mm, 48.22 - addr, 48.23 - PAGE_SIZE, 48.24 - &u); 48.25 + u.val = (mfn << PAGE_SHIFT) | pgprot_val(vma->vm_page_prot); 48.26 + u.ptr = ptep; 48.27 48.28 if ( unlikely(HYPERVISOR_mmu_update(&u, 1, NULL, m.dom) < 0) ) 48.29 put_user(0xF0000000 | mfn, p);
52.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h Fri Aug 12 09:35:15 2005 -0800 52.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h Mon Aug 15 10:32:29 2005 -0800 52.3 @@ -386,13 +386,6 @@ HYPERVISOR_update_va_mapping( 52.4 "4" (flags) 52.5 : "memory" ); 52.6 52.7 - if ( unlikely(ret < 0) ) 52.8 - { 52.9 - printk(KERN_ALERT "Failed update VA mapping: %08lx, %08lx, %08lx\n", 52.10 - va, (new_val).pte_low, flags); 52.11 - BUG(); 52.12 - } 52.13 - 52.14 return ret; 52.15 } 52.16
53.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h Fri Aug 12 09:35:15 2005 -0800 53.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h Mon Aug 15 10:32:29 2005 -0800 53.3 @@ -34,10 +34,10 @@ static inline void __prepare_arch_switch 53.4 * are always kernel segments while inside the kernel. Must 53.5 * happen before reload of cr3/ldt (i.e., not in __switch_to). 53.6 */ 53.7 - __asm__ __volatile__ ( "mov %%fs,%0 ; mov %%gs,%1" 53.8 + asm volatile ( "mov %%fs,%0 ; mov %%gs,%1" 53.9 : "=m" (*(int *)¤t->thread.fs), 53.10 "=m" (*(int *)¤t->thread.gs)); 53.11 - __asm__ __volatile__ ( "mov %0,%%fs ; mov %0,%%gs" 53.12 + asm volatile ( "mov %0,%%fs ; mov %0,%%gs" 53.13 : : "r" (0) ); 53.14 } 53.15 53.16 @@ -100,7 +100,7 @@ static inline void switch_mm(struct mm_s 53.17 } 53.18 53.19 #define deactivate_mm(tsk, mm) \ 53.20 - asm("mov %0,%%fs ; mov %0,%%gs": :"r" (0)) 53.21 + asm("movl %0,%%fs ; movl %0,%%gs": :"r" (0)) 53.22 53.23 #define activate_mm(prev, next) \ 53.24 switch_mm((prev),(next),NULL)
54.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h Fri Aug 12 09:35:15 2005 -0800 54.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h Mon Aug 15 10:32:29 2005 -0800 54.3 @@ -63,15 +63,20 @@ 54.4 extern unsigned int *phys_to_machine_mapping; 54.5 #define pfn_to_mfn(_pfn) ((unsigned long)(phys_to_machine_mapping[(_pfn)])) 54.6 #define mfn_to_pfn(_mfn) ((unsigned long)(machine_to_phys_mapping[(_mfn)])) 54.7 -static inline unsigned long phys_to_machine(unsigned long phys) 54.8 +#ifdef CONFIG_X86_PAE 54.9 +typedef unsigned long long physaddr_t; 54.10 +#else 54.11 +typedef unsigned long physaddr_t; 54.12 +#endif 54.13 +static inline physaddr_t phys_to_machine(physaddr_t phys) 54.14 { 54.15 - unsigned long machine = pfn_to_mfn(phys >> PAGE_SHIFT); 54.16 + physaddr_t machine = pfn_to_mfn(phys >> PAGE_SHIFT); 54.17 machine = (machine << PAGE_SHIFT) | (phys & ~PAGE_MASK); 54.18 return machine; 54.19 } 54.20 -static inline unsigned long machine_to_phys(unsigned long machine) 54.21 +static inline physaddr_t machine_to_phys(physaddr_t machine) 54.22 { 54.23 - unsigned long phys = mfn_to_pfn(machine >> PAGE_SHIFT); 54.24 + physaddr_t phys = mfn_to_pfn(machine >> PAGE_SHIFT); 54.25 phys = (phys << PAGE_SHIFT) | (machine & ~PAGE_MASK); 54.26 return phys; 54.27 } 54.28 @@ -86,8 +91,9 @@ typedef struct { unsigned long pte_low, 54.29 typedef struct { unsigned long long pmd; } pmd_t; 54.30 typedef struct { unsigned long long pgd; } pgd_t; 54.31 typedef struct { unsigned long long pgprot; } pgprot_t; 54.32 -#define __pte(x) ({ unsigned long long _x = (x); \ 54.33 - (((_x)&1) ? ((pte_t) {phys_to_machine(_x)}) : ((pte_t) {(_x)})); }) 54.34 +#define __pte(x) ({ unsigned long long _x = (x); \ 54.35 + if (_x & 1) _x = phys_to_machine(_x); \ 54.36 + ((pte_t) {(unsigned long)(_x), (unsigned long)(_x>>32)}); }) 54.37 #define __pgd(x) ({ unsigned long long _x = (x); \ 54.38 (((_x)&1) ? ((pgd_t) {phys_to_machine(_x)}) : ((pgd_t) {(_x)})); }) 54.39 #define __pmd(x) ({ unsigned long long _x = (x); \
55.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h Fri Aug 12 09:35:15 2005 -0800 55.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h Mon Aug 15 10:32:29 2005 -0800 55.3 @@ -14,9 +14,9 @@ 55.4 do { \ 55.5 if (unlikely((mm)->context.pinned)) { \ 55.6 if (!PageHighMem(pte)) \ 55.7 - HYPERVISOR_update_va_mapping( \ 55.8 + BUG_ON(HYPERVISOR_update_va_mapping( \ 55.9 (unsigned long)__va(page_to_pfn(pte)<<PAGE_SHIFT),\ 55.10 - pfn_pte(page_to_pfn(pte), PAGE_KERNEL_RO), 0);\ 55.11 + pfn_pte(page_to_pfn(pte), PAGE_KERNEL_RO), 0));\ 55.12 set_pmd(pmd, __pmd(_PAGE_TABLE + \ 55.13 ((unsigned long long)page_to_pfn(pte) << \ 55.14 (unsigned long long) PAGE_SHIFT))); \
56.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h Fri Aug 12 09:35:15 2005 -0800 56.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h Mon Aug 15 10:32:29 2005 -0800 56.3 @@ -14,7 +14,28 @@ 56.4 * hook is made available. 56.5 */ 56.6 #define set_pte(pteptr, pteval) (*(pteptr) = pteval) 56.7 -#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 56.8 + 56.9 +inline static void set_pte_at(struct mm_struct *mm, unsigned long addr, 56.10 + pte_t *ptep, pte_t val ) 56.11 +{ 56.12 + if ( ((mm != current->mm) && (mm != &init_mm)) || 56.13 + HYPERVISOR_update_va_mapping( (addr), (val), 0 ) ) 56.14 + { 56.15 + set_pte(ptep, val); 56.16 + } 56.17 +} 56.18 + 56.19 +inline static void set_pte_at_sync(struct mm_struct *mm, unsigned long addr, 56.20 + pte_t *ptep, pte_t val ) 56.21 +{ 56.22 + if ( ((mm != current->mm) && (mm != &init_mm)) || 56.23 + HYPERVISOR_update_va_mapping( (addr), (val), UVMF_INVLPG ) ) 56.24 + { 56.25 + set_pte(ptep, val); 56.26 + xen_invlpg(addr); 56.27 + } 56.28 +} 56.29 + 56.30 #define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval) 56.31 56.32 #ifndef CONFIG_XEN_SHADOW_MODE
57.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h Fri Aug 12 09:35:15 2005 -0800 57.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h Mon Aug 15 10:32:29 2005 -0800 57.3 @@ -68,7 +68,27 @@ static inline void set_pte(pte_t *ptep, 57.4 xen_l1_entry_update((pteptr), (pteval)) 57.5 # define set_pte_atomic(pteptr,pteval) set_pte(pteptr,pteval) 57.6 #endif 57.7 -#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 57.8 + 57.9 +inline static void set_pte_at(struct mm_struct *mm, unsigned long addr, 57.10 + pte_t *ptep, pte_t val ) 57.11 +{ 57.12 + if ( ((mm != current->mm) && (mm != &init_mm)) || 57.13 + HYPERVISOR_update_va_mapping( (addr), (val), 0 ) ) 57.14 + { 57.15 + set_pte(ptep, val); 57.16 + } 57.17 +} 57.18 + 57.19 +inline static void set_pte_at_sync(struct mm_struct *mm, unsigned long addr, 57.20 + pte_t *ptep, pte_t val ) 57.21 +{ 57.22 + if ( ((mm != current->mm) && (mm != &init_mm)) || 57.23 + HYPERVISOR_update_va_mapping( (addr), (val), UVMF_INVLPG ) ) 57.24 + { 57.25 + set_pte(ptep, val); 57.26 + xen_invlpg(addr); 57.27 + } 57.28 +} 57.29 57.30 #ifdef CONFIG_XEN_SHADOW_MODE 57.31 # define set_pmd(pmdptr,pmdval) \
58.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h Fri Aug 12 09:35:15 2005 -0800 58.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h Mon Aug 15 10:32:29 2005 -0800 58.3 @@ -398,7 +398,7 @@ extern void noexec_setup(const char *str 58.4 do { \ 58.5 if (__dirty) { \ 58.6 if ( likely((__vma)->vm_mm == current->mm) ) { \ 58.7 - HYPERVISOR_update_va_mapping((__address), (__entry), UVMF_INVLPG|UVMF_MULTI|(unsigned long)((__vma)->vm_mm->cpu_vm_mask.bits)); \ 58.8 + BUG_ON(HYPERVISOR_update_va_mapping((__address), (__entry), UVMF_INVLPG|UVMF_MULTI|(unsigned long)((__vma)->vm_mm->cpu_vm_mask.bits))); \ 58.9 } else { \ 58.10 xen_l1_entry_update((__ptep), (__entry)); \ 58.11 flush_tlb_page((__vma), (__address)); \ 58.12 @@ -416,8 +416,8 @@ do { \ 58.13 #define ptep_establish_new(__vma, __address, __ptep, __entry) \ 58.14 do { \ 58.15 if (likely((__vma)->vm_mm == current->mm)) { \ 58.16 - HYPERVISOR_update_va_mapping((__address), \ 58.17 - __entry, 0); \ 58.18 + BUG_ON(HYPERVISOR_update_va_mapping((__address), \ 58.19 + __entry, 0)); \ 58.20 } else { \ 58.21 xen_l1_entry_update((__ptep), (__entry)); \ 58.22 } \ 58.23 @@ -466,10 +466,12 @@ int direct_remap_area_pages(struct mm_st 58.24 unsigned long size, 58.25 pgprot_t prot, 58.26 domid_t domid); 58.27 -int __direct_remap_area_pages(struct mm_struct *mm, 58.28 - unsigned long address, 58.29 - unsigned long size, 58.30 - mmu_update_t *v); 58.31 +int create_lookup_pte_addr(struct mm_struct *mm, 58.32 + unsigned long address, 58.33 + unsigned long *ptep); 58.34 +int touch_pte_range(struct mm_struct *mm, 58.35 + unsigned long address, 58.36 + unsigned long size); 58.37 58.38 #define io_remap_page_range(vma,from,phys,size,prot) \ 58.39 direct_remap_area_pages(vma->vm_mm,from,phys,size,prot,DOMID_IO)
59.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pda.h Fri Aug 12 09:35:15 2005 -0800 59.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 59.3 @@ -1,85 +0,0 @@ 59.4 -#ifndef X86_64_PDA_H 59.5 -#define X86_64_PDA_H 59.6 - 59.7 -#ifndef __ASSEMBLY__ 59.8 -#include <linux/stddef.h> 59.9 -#include <linux/types.h> 59.10 -#include <linux/cache.h> 59.11 - 59.12 -/* Per processor datastructure. %gs points to it while the kernel runs */ 59.13 -struct x8664_pda { 59.14 - struct task_struct *pcurrent; /* Current process */ 59.15 - unsigned long data_offset; /* Per cpu data offset from linker address */ 59.16 - struct x8664_pda *me; /* Pointer to itself */ 59.17 - unsigned long kernelstack; /* top of kernel stack for current */ 59.18 - unsigned long oldrsp; /* user rsp for system call */ 59.19 - unsigned long irqrsp; /* Old rsp for interrupts. */ 59.20 - int irqcount; /* Irq nesting counter. Starts with -1 */ 59.21 - int cpunumber; /* Logical CPU number */ 59.22 - char *irqstackptr; /* top of irqstack */ 59.23 - unsigned int __softirq_pending; 59.24 - unsigned int __nmi_count; /* number of NMI on this CPUs */ 59.25 - unsigned long idle_timestamp; 59.26 - struct mm_struct *active_mm; 59.27 - int mmu_state; 59.28 - unsigned apic_timer_irqs; 59.29 - int kernel_mode; /* kernel or user mode */ 59.30 -} ____cacheline_aligned; 59.31 - 59.32 - 59.33 -#define IRQSTACK_ORDER 2 59.34 -#define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER) 59.35 - 59.36 -extern struct x8664_pda cpu_pda[]; 59.37 - 59.38 -/* 59.39 - * There is no fast way to get the base address of the PDA, all the accesses 59.40 - * have to mention %fs/%gs. So it needs to be done this Torvaldian way. 59.41 - */ 59.42 -#define sizeof_field(type,field) (sizeof(((type *)0)->field)) 59.43 -#define typeof_field(type,field) typeof(((type *)0)->field) 59.44 - 59.45 -extern void __bad_pda_field(void); 59.46 - 59.47 -#define pda_offset(field) offsetof(struct x8664_pda, field) 59.48 - 59.49 -#define pda_to_op(op,field,val) do { \ 59.50 - switch (sizeof_field(struct x8664_pda, field)) { \ 59.51 -case 2: \ 59.52 -asm volatile(op "w %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ 59.53 -case 4: \ 59.54 -asm volatile(op "l %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ 59.55 -case 8: \ 59.56 -asm volatile(op "q %0,%%gs:%P1"::"r" (val),"i"(pda_offset(field)):"memory"); break; \ 59.57 - default: __bad_pda_field(); \ 59.58 - } \ 59.59 - } while (0) 59.60 - 59.61 -/* 59.62 - * AK: PDA read accesses should be neither volatile nor have an memory clobber. 59.63 - * Unfortunately removing them causes all hell to break lose currently. 59.64 - */ 59.65 -#define pda_from_op(op,field) ({ \ 59.66 - typedef typeof_field(struct x8664_pda, field) T__; T__ ret__; \ 59.67 - switch (sizeof_field(struct x8664_pda, field)) { \ 59.68 -case 2: \ 59.69 -asm volatile(op "w %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ 59.70 -case 4: \ 59.71 -asm volatile(op "l %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ 59.72 -case 8: \ 59.73 -asm volatile(op "q %%gs:%P1,%0":"=r" (ret__):"i"(pda_offset(field)):"memory"); break;\ 59.74 - default: __bad_pda_field(); \ 59.75 - } \ 59.76 - ret__; }) 59.77 - 59.78 - 59.79 -#define read_pda(field) pda_from_op("mov",field) 59.80 -#define write_pda(field,val) pda_to_op("mov",field,val) 59.81 -#define add_pda(field,val) pda_to_op("add",field,val) 59.82 -#define sub_pda(field,val) pda_to_op("sub",field,val) 59.83 - 59.84 -#endif 59.85 - 59.86 -#define PDA_STACKOFFSET (5*8) 59.87 - 59.88 -#endif
60.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h Fri Aug 12 09:35:15 2005 -0800 60.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h Mon Aug 15 10:32:29 2005 -0800 60.3 @@ -9,6 +9,7 @@ 60.4 #include <asm/fixmap.h> 60.5 #include <asm/bitops.h> 60.6 #include <linux/threads.h> 60.7 +#include <linux/sched.h> 60.8 #include <asm/pda.h> 60.9 #ifdef CONFIG_XEN 60.10 #include <asm-xen/hypervisor.h> 60.11 @@ -265,7 +266,16 @@ static inline unsigned long pud_bad(pud_ 60.12 val &= ~(_PAGE_USER | _PAGE_DIRTY); 60.13 return val & ~(_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED); 60.14 } 60.15 -#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) 60.16 + 60.17 +inline static void set_pte_at(struct mm_struct *mm, unsigned long addr, 60.18 + pte_t *ptep, pte_t val ) 60.19 +{ 60.20 + if ( ((mm != current->mm) && (mm != &init_mm)) || 60.21 + HYPERVISOR_update_va_mapping( (addr), (val), 0 ) ) 60.22 + { 60.23 + set_pte(ptep, val); 60.24 + } 60.25 +} 60.26 60.27 #define pte_none(x) (!(x).pte) 60.28 #define pte_present(x) ((x).pte & (_PAGE_PRESENT | _PAGE_PROTNONE)) 60.29 @@ -497,7 +507,7 @@ extern inline pte_t pte_modify(pte_t pte 60.30 do { \ 60.31 if (__dirty) { \ 60.32 if ( likely((__vma)->vm_mm == current->mm) ) { \ 60.33 - HYPERVISOR_update_va_mapping((__address), (__entry), UVMF_INVLPG|UVMF_MULTI|(unsigned long)((__vma)->vm_mm->cpu_vm_mask.bits)); \ 60.34 + BUG_ON(HYPERVISOR_update_va_mapping((__address), (__entry), UVMF_INVLPG|UVMF_MULTI|(unsigned long)((__vma)->vm_mm->cpu_vm_mask.bits))); \ 60.35 } else { \ 60.36 xen_l1_entry_update((__ptep), (__entry)); \ 60.37 flush_tlb_page((__vma), (__address)); \ 60.38 @@ -528,6 +538,12 @@ int __direct_remap_area_pages(struct mm_ 60.39 unsigned long address, 60.40 unsigned long size, 60.41 mmu_update_t *v); 60.42 +int create_lookup_pte_addr(struct mm_struct *mm, 60.43 + unsigned long address, 60.44 + unsigned long *ptep); 60.45 +int touch_pte_range(struct mm_struct *mm, 60.46 + unsigned long address, 60.47 + unsigned long size); 60.48 60.49 #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ 60.50 direct_remap_area_pages((vma)->vm_mm,vaddr,paddr,size,prot,DOMID_IO)
63.1 --- a/linux-2.6-xen-sparse/include/linux/mm.h Fri Aug 12 09:35:15 2005 -0800 63.2 +++ b/linux-2.6-xen-sparse/include/linux/mm.h Mon Aug 15 10:32:29 2005 -0800 63.3 @@ -817,6 +817,12 @@ extern int check_user_page_readable(stru 63.4 int remap_pfn_range(struct vm_area_struct *, unsigned long, 63.5 unsigned long, unsigned long, pgprot_t); 63.6 63.7 +typedef int (*pte_fn_t)(pte_t *pte, struct page *pte_page, unsigned long addr, 63.8 + void *data); 63.9 +extern int generic_page_range(struct mm_struct *mm, unsigned long address, 63.10 + unsigned long size, pte_fn_t fn, void *data); 63.11 + 63.12 + 63.13 #ifdef CONFIG_PROC_FS 63.14 void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); 63.15 #else
66.1 --- a/linux-2.6-xen-sparse/mm/memory.c Fri Aug 12 09:35:15 2005 -0800 66.2 +++ b/linux-2.6-xen-sparse/mm/memory.c Mon Aug 15 10:32:29 2005 -0800 66.3 @@ -954,8 +954,10 @@ int get_user_pages(struct task_struct *t 66.4 i++; 66.5 start += PAGE_SIZE; 66.6 len--; 66.7 +printk(KERN_ALERT "HIT 0x%lx\n", start); 66.8 continue; 66.9 - } 66.10 + } 66.11 +else printk(KERN_ALERT "MISS 0x%lx\n", start); 66.12 } 66.13 66.14 if (!vma || (vma->vm_flags & VM_IO) 66.15 @@ -1213,6 +1215,104 @@ int remap_pfn_range(struct vm_area_struc 66.16 } 66.17 EXPORT_SYMBOL(remap_pfn_range); 66.18 66.19 +static inline int generic_pte_range(struct mm_struct *mm, 66.20 + pmd_t *pmd, 66.21 + unsigned long addr, 66.22 + unsigned long end, 66.23 + pte_fn_t fn, void *data) 66.24 +{ 66.25 + pte_t *pte; 66.26 + int err; 66.27 + struct page *pte_page; 66.28 + 66.29 + pte = (mm == &init_mm) ? 66.30 + pte_alloc_kernel(mm, pmd, addr) : 66.31 + pte_alloc_map(mm, pmd, addr); 66.32 + if (!pte) 66.33 + return -ENOMEM; 66.34 + 66.35 + pte_page = pmd_page(*pmd); 66.36 + 66.37 + do { 66.38 + err = fn(pte, pte_page, addr, data); 66.39 + if (err) 66.40 + break; 66.41 + } while (pte++, addr += PAGE_SIZE, addr != end); 66.42 + 66.43 + if (mm != &init_mm) 66.44 + pte_unmap(pte-1); 66.45 + return err; 66.46 + 66.47 +} 66.48 + 66.49 +static inline int generic_pmd_range(struct mm_struct *mm, 66.50 + pud_t *pud, 66.51 + unsigned long addr, 66.52 + unsigned long end, 66.53 + pte_fn_t fn, void *data) 66.54 +{ 66.55 + pmd_t *pmd; 66.56 + unsigned long next; 66.57 + int err; 66.58 + 66.59 + pmd = pmd_alloc(mm, pud, addr); 66.60 + if (!pmd) 66.61 + return -ENOMEM; 66.62 + do { 66.63 + next = pmd_addr_end(addr, end); 66.64 + err = generic_pte_range(mm, pmd, addr, next, fn, data); 66.65 + if (err) 66.66 + break; 66.67 + } while (pmd++, addr = next, addr != end); 66.68 + return err; 66.69 +} 66.70 + 66.71 +static inline int generic_pud_range(struct mm_struct *mm, pgd_t *pgd, 66.72 + unsigned long addr, 66.73 + unsigned long end, 66.74 + pte_fn_t fn, void *data) 66.75 +{ 66.76 + pud_t *pud; 66.77 + unsigned long next; 66.78 + int err; 66.79 + 66.80 + pud = pud_alloc(mm, pgd, addr); 66.81 + if (!pud) 66.82 + return -ENOMEM; 66.83 + do { 66.84 + next = pud_addr_end(addr, end); 66.85 + err = generic_pmd_range(mm, pud, addr, next, fn, data); 66.86 + if (err) 66.87 + break; 66.88 + } while (pud++, addr = next, addr != end); 66.89 + return err; 66.90 +} 66.91 + 66.92 +/* 66.93 + * Scan a region of virtual memory, filling in page tables as necessary 66.94 + * and calling a provided function on each leaf page table. 66.95 + */ 66.96 +int generic_page_range(struct mm_struct *mm, unsigned long addr, 66.97 + unsigned long size, pte_fn_t fn, void *data) 66.98 +{ 66.99 + pgd_t *pgd; 66.100 + unsigned long next; 66.101 + unsigned long end = addr + size; 66.102 + int err; 66.103 + 66.104 + BUG_ON(addr >= end); 66.105 + pgd = pgd_offset(mm, addr); 66.106 + spin_lock(&mm->page_table_lock); 66.107 + do { 66.108 + next = pgd_addr_end(addr, end); 66.109 + err = generic_pud_range(mm, pgd, addr, next, fn, data); 66.110 + if (err) 66.111 + break; 66.112 + } while (pgd++, addr = next, addr != end); 66.113 + spin_unlock(&mm->page_table_lock); 66.114 + return err; 66.115 +} 66.116 + 66.117 /* 66.118 * Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when 66.119 * servicing faults for write access. In the normal case, do always want
67.1 --- a/patches/linux-2.6.12/linux-2.6.12.3.patch Fri Aug 12 09:35:15 2005 -0800 67.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 67.3 @@ -1,1047 +0,0 @@ 67.4 -diff --git a/Makefile b/Makefile 67.5 ---- a/Makefile 67.6 -+++ b/Makefile 67.7 -@@ -1,7 +1,7 @@ 67.8 - VERSION = 2 67.9 - PATCHLEVEL = 6 67.10 - SUBLEVEL = 12 67.11 --EXTRAVERSION = 67.12 -+EXTRAVERSION = .3 67.13 - NAME=Woozy Numbat 67.14 - 67.15 - # *DOCUMENTATION* 67.16 -diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c 67.17 ---- a/arch/ia64/kernel/ptrace.c 67.18 -+++ b/arch/ia64/kernel/ptrace.c 67.19 -@@ -945,6 +945,13 @@ access_uarea (struct task_struct *child, 67.20 - *data = (pt->cr_ipsr & IPSR_MASK); 67.21 - return 0; 67.22 - 67.23 -+ case PT_AR_RSC: 67.24 -+ if (write_access) 67.25 -+ pt->ar_rsc = *data | (3 << 2); /* force PL3 */ 67.26 -+ else 67.27 -+ *data = pt->ar_rsc; 67.28 -+ return 0; 67.29 -+ 67.30 - case PT_AR_RNAT: 67.31 - urbs_end = ia64_get_user_rbs_end(child, pt, NULL); 67.32 - rnat_addr = (long) ia64_rse_rnat_addr((long *) 67.33 -@@ -996,9 +1003,6 @@ access_uarea (struct task_struct *child, 67.34 - case PT_AR_BSPSTORE: 67.35 - ptr = pt_reg_addr(pt, ar_bspstore); 67.36 - break; 67.37 -- case PT_AR_RSC: 67.38 -- ptr = pt_reg_addr(pt, ar_rsc); 67.39 -- break; 67.40 - case PT_AR_UNAT: 67.41 - ptr = pt_reg_addr(pt, ar_unat); 67.42 - break; 67.43 -@@ -1234,7 +1238,7 @@ ptrace_getregs (struct task_struct *chil 67.44 - static long 67.45 - ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr) 67.46 - { 67.47 -- unsigned long psr, ec, lc, rnat, bsp, cfm, nat_bits, val = 0; 67.48 -+ unsigned long psr, rsc, ec, lc, rnat, bsp, cfm, nat_bits, val = 0; 67.49 - struct unw_frame_info info; 67.50 - struct switch_stack *sw; 67.51 - struct ia64_fpreg fpval; 67.52 -@@ -1267,7 +1271,7 @@ ptrace_setregs (struct task_struct *chil 67.53 - /* app regs */ 67.54 - 67.55 - retval |= __get_user(pt->ar_pfs, &ppr->ar[PT_AUR_PFS]); 67.56 -- retval |= __get_user(pt->ar_rsc, &ppr->ar[PT_AUR_RSC]); 67.57 -+ retval |= __get_user(rsc, &ppr->ar[PT_AUR_RSC]); 67.58 - retval |= __get_user(pt->ar_bspstore, &ppr->ar[PT_AUR_BSPSTORE]); 67.59 - retval |= __get_user(pt->ar_unat, &ppr->ar[PT_AUR_UNAT]); 67.60 - retval |= __get_user(pt->ar_ccv, &ppr->ar[PT_AUR_CCV]); 67.61 -@@ -1365,6 +1369,7 @@ ptrace_setregs (struct task_struct *chil 67.62 - retval |= __get_user(nat_bits, &ppr->nat); 67.63 - 67.64 - retval |= access_uarea(child, PT_CR_IPSR, &psr, 1); 67.65 -+ retval |= access_uarea(child, PT_AR_RSC, &rsc, 1); 67.66 - retval |= access_uarea(child, PT_AR_EC, &ec, 1); 67.67 - retval |= access_uarea(child, PT_AR_LC, &lc, 1); 67.68 - retval |= access_uarea(child, PT_AR_RNAT, &rnat, 1); 67.69 -diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c 67.70 ---- a/arch/ia64/kernel/signal.c 67.71 -+++ b/arch/ia64/kernel/signal.c 67.72 -@@ -94,7 +94,7 @@ sys_sigaltstack (const stack_t __user *u 67.73 - static long 67.74 - restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) 67.75 - { 67.76 -- unsigned long ip, flags, nat, um, cfm; 67.77 -+ unsigned long ip, flags, nat, um, cfm, rsc; 67.78 - long err; 67.79 - 67.80 - /* Always make any pending restarted system calls return -EINTR */ 67.81 -@@ -106,7 +106,7 @@ restore_sigcontext (struct sigcontext __ 67.82 - err |= __get_user(ip, &sc->sc_ip); /* instruction pointer */ 67.83 - err |= __get_user(cfm, &sc->sc_cfm); 67.84 - err |= __get_user(um, &sc->sc_um); /* user mask */ 67.85 -- err |= __get_user(scr->pt.ar_rsc, &sc->sc_ar_rsc); 67.86 -+ err |= __get_user(rsc, &sc->sc_ar_rsc); 67.87 - err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat); 67.88 - err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr); 67.89 - err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs); 67.90 -@@ -119,6 +119,7 @@ restore_sigcontext (struct sigcontext __ 67.91 - err |= __copy_from_user(&scr->pt.r15, &sc->sc_gr[15], 8); /* r15 */ 67.92 - 67.93 - scr->pt.cr_ifs = cfm | (1UL << 63); 67.94 -+ scr->pt.ar_rsc = rsc | (3 << 2); /* force PL3 */ 67.95 - 67.96 - /* establish new instruction pointer: */ 67.97 - scr->pt.cr_iip = ip & ~0x3UL; 67.98 -diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c 67.99 ---- a/arch/ppc/kernel/time.c 67.100 -+++ b/arch/ppc/kernel/time.c 67.101 -@@ -89,6 +89,9 @@ unsigned long tb_to_ns_scale; 67.102 - 67.103 - extern unsigned long wall_jiffies; 67.104 - 67.105 -+/* used for timezone offset */ 67.106 -+static long timezone_offset; 67.107 -+ 67.108 - DEFINE_SPINLOCK(rtc_lock); 67.109 - 67.110 - EXPORT_SYMBOL(rtc_lock); 67.111 -@@ -170,7 +173,7 @@ void timer_interrupt(struct pt_regs * re 67.112 - xtime.tv_sec - last_rtc_update >= 659 && 67.113 - abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ && 67.114 - jiffies - wall_jiffies == 1) { 67.115 -- if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0) 67.116 -+ if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0) 67.117 - last_rtc_update = xtime.tv_sec+1; 67.118 - else 67.119 - /* Try again one minute later */ 67.120 -@@ -286,7 +289,7 @@ void __init time_init(void) 67.121 - unsigned old_stamp, stamp, elapsed; 67.122 - 67.123 - if (ppc_md.time_init != NULL) 67.124 -- time_offset = ppc_md.time_init(); 67.125 -+ timezone_offset = ppc_md.time_init(); 67.126 - 67.127 - if (__USE_RTC()) { 67.128 - /* 601 processor: dec counts down by 128 every 128ns */ 67.129 -@@ -331,10 +334,10 @@ void __init time_init(void) 67.130 - set_dec(tb_ticks_per_jiffy); 67.131 - 67.132 - /* If platform provided a timezone (pmac), we correct the time */ 67.133 -- if (time_offset) { 67.134 -- sys_tz.tz_minuteswest = -time_offset / 60; 67.135 -+ if (timezone_offset) { 67.136 -+ sys_tz.tz_minuteswest = -timezone_offset / 60; 67.137 - sys_tz.tz_dsttime = 0; 67.138 -- xtime.tv_sec -= time_offset; 67.139 -+ xtime.tv_sec -= timezone_offset; 67.140 - } 67.141 - set_normalized_timespec(&wall_to_monotonic, 67.142 - -xtime.tv_sec, -xtime.tv_nsec); 67.143 -diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c 67.144 ---- a/arch/um/kernel/process.c 67.145 -+++ b/arch/um/kernel/process.c 67.146 -@@ -130,7 +130,7 @@ int start_fork_tramp(void *thread_arg, u 67.147 - return(arg.pid); 67.148 - } 67.149 - 67.150 --static int ptrace_child(void) 67.151 -+static int ptrace_child(void *arg) 67.152 - { 67.153 - int ret; 67.154 - int pid = os_getpid(), ppid = getppid(); 67.155 -@@ -159,16 +159,20 @@ static int ptrace_child(void) 67.156 - _exit(ret); 67.157 - } 67.158 - 67.159 --static int start_ptraced_child(void) 67.160 -+static int start_ptraced_child(void **stack_out) 67.161 - { 67.162 -+ void *stack; 67.163 -+ unsigned long sp; 67.164 - int pid, n, status; 67.165 - 67.166 -- pid = fork(); 67.167 -- if(pid == 0) 67.168 -- ptrace_child(); 67.169 -- 67.170 -+ stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, 67.171 -+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 67.172 -+ if(stack == MAP_FAILED) 67.173 -+ panic("check_ptrace : mmap failed, errno = %d", errno); 67.174 -+ sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); 67.175 -+ pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); 67.176 - if(pid < 0) 67.177 -- panic("check_ptrace : fork failed, errno = %d", errno); 67.178 -+ panic("check_ptrace : clone failed, errno = %d", errno); 67.179 - CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); 67.180 - if(n < 0) 67.181 - panic("check_ptrace : wait failed, errno = %d", errno); 67.182 -@@ -176,6 +180,7 @@ static int start_ptraced_child(void) 67.183 - panic("check_ptrace : expected SIGSTOP, got status = %d", 67.184 - status); 67.185 - 67.186 -+ *stack_out = stack; 67.187 - return(pid); 67.188 - } 67.189 - 67.190 -@@ -183,12 +188,12 @@ static int start_ptraced_child(void) 67.191 - * just avoid using sysemu, not panic, but only if SYSEMU features are broken. 67.192 - * So only for SYSEMU features we test mustpanic, while normal host features 67.193 - * must work anyway!*/ 67.194 --static int stop_ptraced_child(int pid, int exitcode, int mustexit) 67.195 -+static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic) 67.196 - { 67.197 - int status, n, ret = 0; 67.198 - 67.199 - if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) 67.200 -- panic("stop_ptraced_child : ptrace failed, errno = %d", errno); 67.201 -+ panic("check_ptrace : ptrace failed, errno = %d", errno); 67.202 - CATCH_EINTR(n = waitpid(pid, &status, 0)); 67.203 - if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { 67.204 - int exit_with = WEXITSTATUS(status); 67.205 -@@ -199,13 +204,15 @@ static int stop_ptraced_child(int pid, i 67.206 - printk("check_ptrace : child exited with exitcode %d, while " 67.207 - "expecting %d; status 0x%x", exit_with, 67.208 - exitcode, status); 67.209 -- if (mustexit) 67.210 -+ if (mustpanic) 67.211 - panic("\n"); 67.212 - else 67.213 - printk("\n"); 67.214 - ret = -1; 67.215 - } 67.216 - 67.217 -+ if(munmap(stack, PAGE_SIZE) < 0) 67.218 -+ panic("check_ptrace : munmap failed, errno = %d", errno); 67.219 - return ret; 67.220 - } 67.221 - 67.222 -@@ -227,11 +234,12 @@ __uml_setup("nosysemu", nosysemu_cmd_par 67.223 - 67.224 - static void __init check_sysemu(void) 67.225 - { 67.226 -+ void *stack; 67.227 - int pid, syscall, n, status, count=0; 67.228 - 67.229 - printk("Checking syscall emulation patch for ptrace..."); 67.230 - sysemu_supported = 0; 67.231 -- pid = start_ptraced_child(); 67.232 -+ pid = start_ptraced_child(&stack); 67.233 - 67.234 - if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0) 67.235 - goto fail; 67.236 -@@ -249,7 +257,7 @@ static void __init check_sysemu(void) 67.237 - panic("check_sysemu : failed to modify system " 67.238 - "call return, errno = %d", errno); 67.239 - 67.240 -- if (stop_ptraced_child(pid, 0, 0) < 0) 67.241 -+ if (stop_ptraced_child(pid, stack, 0, 0) < 0) 67.242 - goto fail_stopped; 67.243 - 67.244 - sysemu_supported = 1; 67.245 -@@ -257,7 +265,7 @@ static void __init check_sysemu(void) 67.246 - set_using_sysemu(!force_sysemu_disabled); 67.247 - 67.248 - printk("Checking advanced syscall emulation patch for ptrace..."); 67.249 -- pid = start_ptraced_child(); 67.250 -+ pid = start_ptraced_child(&stack); 67.251 - while(1){ 67.252 - count++; 67.253 - if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0) 67.254 -@@ -282,7 +290,7 @@ static void __init check_sysemu(void) 67.255 - break; 67.256 - } 67.257 - } 67.258 -- if (stop_ptraced_child(pid, 0, 0) < 0) 67.259 -+ if (stop_ptraced_child(pid, stack, 0, 0) < 0) 67.260 - goto fail_stopped; 67.261 - 67.262 - sysemu_supported = 2; 67.263 -@@ -293,17 +301,18 @@ static void __init check_sysemu(void) 67.264 - return; 67.265 - 67.266 - fail: 67.267 -- stop_ptraced_child(pid, 1, 0); 67.268 -+ stop_ptraced_child(pid, stack, 1, 0); 67.269 - fail_stopped: 67.270 - printk("missing\n"); 67.271 - } 67.272 - 67.273 - void __init check_ptrace(void) 67.274 - { 67.275 -+ void *stack; 67.276 - int pid, syscall, n, status; 67.277 - 67.278 - printk("Checking that ptrace can change system call numbers..."); 67.279 -- pid = start_ptraced_child(); 67.280 -+ pid = start_ptraced_child(&stack); 67.281 - 67.282 - if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) 67.283 - panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno); 67.284 -@@ -330,7 +339,7 @@ void __init check_ptrace(void) 67.285 - break; 67.286 - } 67.287 - } 67.288 -- stop_ptraced_child(pid, 0, 1); 67.289 -+ stop_ptraced_child(pid, stack, 0, 1); 67.290 - printk("OK\n"); 67.291 - check_sysemu(); 67.292 - } 67.293 -@@ -362,10 +371,11 @@ void forward_pending_sigio(int target) 67.294 - static inline int check_skas3_ptrace_support(void) 67.295 - { 67.296 - struct ptrace_faultinfo fi; 67.297 -+ void *stack; 67.298 - int pid, n, ret = 1; 67.299 - 67.300 - printf("Checking for the skas3 patch in the host..."); 67.301 -- pid = start_ptraced_child(); 67.302 -+ pid = start_ptraced_child(&stack); 67.303 - 67.304 - n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi); 67.305 - if (n < 0) { 67.306 -@@ -380,7 +390,7 @@ static inline int check_skas3_ptrace_sup 67.307 - } 67.308 - 67.309 - init_registers(pid); 67.310 -- stop_ptraced_child(pid, 1, 1); 67.311 -+ stop_ptraced_child(pid, stack, 1, 1); 67.312 - 67.313 - return(ret); 67.314 - } 67.315 -diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c 67.316 ---- a/drivers/acpi/pci_irq.c 67.317 -+++ b/drivers/acpi/pci_irq.c 67.318 -@@ -433,8 +433,9 @@ acpi_pci_irq_enable ( 67.319 - printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: no GSI", 67.320 - pci_name(dev), ('A' + pin)); 67.321 - /* Interrupt Line values above 0xF are forbidden */ 67.322 -- if (dev->irq >= 0 && (dev->irq <= 0xF)) { 67.323 -+ if (dev->irq > 0 && (dev->irq <= 0xF)) { 67.324 - printk(" - using IRQ %d\n", dev->irq); 67.325 -+ acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW); 67.326 - return_VALUE(0); 67.327 - } 67.328 - else { 67.329 -diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c 67.330 ---- a/drivers/char/tpm/tpm.c 67.331 -+++ b/drivers/char/tpm/tpm.c 67.332 -@@ -32,12 +32,6 @@ 67.333 - 67.334 - #define TPM_BUFSIZE 2048 67.335 - 67.336 --/* PCI configuration addresses */ 67.337 --#define PCI_GEN_PMCON_1 0xA0 67.338 --#define PCI_GEN1_DEC 0xE4 67.339 --#define PCI_LPC_EN 0xE6 67.340 --#define PCI_GEN2_DEC 0xEC 67.341 -- 67.342 - static LIST_HEAD(tpm_chip_list); 67.343 - static DEFINE_SPINLOCK(driver_lock); 67.344 - static int dev_mask[32]; 67.345 -@@ -61,72 +55,6 @@ void tpm_time_expired(unsigned long ptr) 67.346 - EXPORT_SYMBOL_GPL(tpm_time_expired); 67.347 - 67.348 - /* 67.349 -- * Initialize the LPC bus and enable the TPM ports 67.350 -- */ 67.351 --int tpm_lpc_bus_init(struct pci_dev *pci_dev, u16 base) 67.352 --{ 67.353 -- u32 lpcenable, tmp; 67.354 -- int is_lpcm = 0; 67.355 -- 67.356 -- switch (pci_dev->vendor) { 67.357 -- case PCI_VENDOR_ID_INTEL: 67.358 -- switch (pci_dev->device) { 67.359 -- case PCI_DEVICE_ID_INTEL_82801CA_12: 67.360 -- case PCI_DEVICE_ID_INTEL_82801DB_12: 67.361 -- is_lpcm = 1; 67.362 -- break; 67.363 -- } 67.364 -- /* init ICH (enable LPC) */ 67.365 -- pci_read_config_dword(pci_dev, PCI_GEN1_DEC, &lpcenable); 67.366 -- lpcenable |= 0x20000000; 67.367 -- pci_write_config_dword(pci_dev, PCI_GEN1_DEC, lpcenable); 67.368 -- 67.369 -- if (is_lpcm) { 67.370 -- pci_read_config_dword(pci_dev, PCI_GEN1_DEC, 67.371 -- &lpcenable); 67.372 -- if ((lpcenable & 0x20000000) == 0) { 67.373 -- dev_err(&pci_dev->dev, 67.374 -- "cannot enable LPC\n"); 67.375 -- return -ENODEV; 67.376 -- } 67.377 -- } 67.378 -- 67.379 -- /* initialize TPM registers */ 67.380 -- pci_read_config_dword(pci_dev, PCI_GEN2_DEC, &tmp); 67.381 -- 67.382 -- if (!is_lpcm) 67.383 -- tmp = (tmp & 0xFFFF0000) | (base & 0xFFF0); 67.384 -- else 67.385 -- tmp = 67.386 -- (tmp & 0xFFFF0000) | (base & 0xFFF0) | 67.387 -- 0x00000001; 67.388 -- 67.389 -- pci_write_config_dword(pci_dev, PCI_GEN2_DEC, tmp); 67.390 -- 67.391 -- if (is_lpcm) { 67.392 -- pci_read_config_dword(pci_dev, PCI_GEN_PMCON_1, 67.393 -- &tmp); 67.394 -- tmp |= 0x00000004; /* enable CLKRUN */ 67.395 -- pci_write_config_dword(pci_dev, PCI_GEN_PMCON_1, 67.396 -- tmp); 67.397 -- } 67.398 -- tpm_write_index(0x0D, 0x55); /* unlock 4F */ 67.399 -- tpm_write_index(0x0A, 0x00); /* int disable */ 67.400 -- tpm_write_index(0x08, base); /* base addr lo */ 67.401 -- tpm_write_index(0x09, (base & 0xFF00) >> 8); /* base addr hi */ 67.402 -- tpm_write_index(0x0D, 0xAA); /* lock 4F */ 67.403 -- break; 67.404 -- case PCI_VENDOR_ID_AMD: 67.405 -- /* nothing yet */ 67.406 -- break; 67.407 -- } 67.408 -- 67.409 -- return 0; 67.410 --} 67.411 -- 67.412 --EXPORT_SYMBOL_GPL(tpm_lpc_bus_init); 67.413 -- 67.414 --/* 67.415 - * Internal kernel interface to transmit TPM commands 67.416 - */ 67.417 - static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf, 67.418 -@@ -590,10 +518,6 @@ int tpm_pm_resume(struct pci_dev *pci_de 67.419 - if (chip == NULL) 67.420 - return -ENODEV; 67.421 - 67.422 -- spin_lock(&driver_lock); 67.423 -- tpm_lpc_bus_init(pci_dev, chip->vendor->base); 67.424 -- spin_unlock(&driver_lock); 67.425 -- 67.426 - return 0; 67.427 - } 67.428 - 67.429 -diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h 67.430 ---- a/drivers/char/tpm/tpm.h 67.431 -+++ b/drivers/char/tpm/tpm.h 67.432 -@@ -79,8 +79,6 @@ static inline void tpm_write_index(int i 67.433 - } 67.434 - 67.435 - extern void tpm_time_expired(unsigned long); 67.436 --extern int tpm_lpc_bus_init(struct pci_dev *, u16); 67.437 -- 67.438 - extern int tpm_register_hardware(struct pci_dev *, 67.439 - struct tpm_vendor_specific *); 67.440 - extern int tpm_open(struct inode *, struct file *); 67.441 -diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c 67.442 ---- a/drivers/char/tpm/tpm_atmel.c 67.443 -+++ b/drivers/char/tpm/tpm_atmel.c 67.444 -@@ -22,7 +22,10 @@ 67.445 - #include "tpm.h" 67.446 - 67.447 - /* Atmel definitions */ 67.448 --#define TPM_ATML_BASE 0x400 67.449 -+enum tpm_atmel_addr { 67.450 -+ TPM_ATMEL_BASE_ADDR_LO = 0x08, 67.451 -+ TPM_ATMEL_BASE_ADDR_HI = 0x09 67.452 -+}; 67.453 - 67.454 - /* write status bits */ 67.455 - #define ATML_STATUS_ABORT 0x01 67.456 -@@ -127,7 +130,6 @@ static struct tpm_vendor_specific tpm_at 67.457 - .cancel = tpm_atml_cancel, 67.458 - .req_complete_mask = ATML_STATUS_BUSY | ATML_STATUS_DATA_AVAIL, 67.459 - .req_complete_val = ATML_STATUS_DATA_AVAIL, 67.460 -- .base = TPM_ATML_BASE, 67.461 - .miscdev = { .fops = &atmel_ops, }, 67.462 - }; 67.463 - 67.464 -@@ -136,14 +138,16 @@ static int __devinit tpm_atml_init(struc 67.465 - { 67.466 - u8 version[4]; 67.467 - int rc = 0; 67.468 -+ int lo, hi; 67.469 - 67.470 - if (pci_enable_device(pci_dev)) 67.471 - return -EIO; 67.472 - 67.473 -- if (tpm_lpc_bus_init(pci_dev, TPM_ATML_BASE)) { 67.474 -- rc = -ENODEV; 67.475 -- goto out_err; 67.476 -- } 67.477 -+ lo = tpm_read_index( TPM_ATMEL_BASE_ADDR_LO ); 67.478 -+ hi = tpm_read_index( TPM_ATMEL_BASE_ADDR_HI ); 67.479 -+ 67.480 -+ tpm_atmel.base = (hi<<8)|lo; 67.481 -+ dev_dbg( &pci_dev->dev, "Operating with base: 0x%x\n", tpm_atmel.base); 67.482 - 67.483 - /* verify that it is an Atmel part */ 67.484 - if (tpm_read_index(4) != 'A' || tpm_read_index(5) != 'T' 67.485 -diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c 67.486 ---- a/drivers/char/tpm/tpm_nsc.c 67.487 -+++ b/drivers/char/tpm/tpm_nsc.c 67.488 -@@ -24,6 +24,10 @@ 67.489 - /* National definitions */ 67.490 - #define TPM_NSC_BASE 0x360 67.491 - #define TPM_NSC_IRQ 0x07 67.492 -+#define TPM_NSC_BASE0_HI 0x60 67.493 -+#define TPM_NSC_BASE0_LO 0x61 67.494 -+#define TPM_NSC_BASE1_HI 0x62 67.495 -+#define TPM_NSC_BASE1_LO 0x63 67.496 - 67.497 - #define NSC_LDN_INDEX 0x07 67.498 - #define NSC_SID_INDEX 0x20 67.499 -@@ -234,7 +238,6 @@ static struct tpm_vendor_specific tpm_ns 67.500 - .cancel = tpm_nsc_cancel, 67.501 - .req_complete_mask = NSC_STATUS_OBF, 67.502 - .req_complete_val = NSC_STATUS_OBF, 67.503 -- .base = TPM_NSC_BASE, 67.504 - .miscdev = { .fops = &nsc_ops, }, 67.505 - 67.506 - }; 67.507 -@@ -243,15 +246,16 @@ static int __devinit tpm_nsc_init(struct 67.508 - const struct pci_device_id *pci_id) 67.509 - { 67.510 - int rc = 0; 67.511 -+ int lo, hi; 67.512 -+ 67.513 -+ hi = tpm_read_index(TPM_NSC_BASE0_HI); 67.514 -+ lo = tpm_read_index(TPM_NSC_BASE0_LO); 67.515 -+ 67.516 -+ tpm_nsc.base = (hi<<8) | lo; 67.517 - 67.518 - if (pci_enable_device(pci_dev)) 67.519 - return -EIO; 67.520 - 67.521 -- if (tpm_lpc_bus_init(pci_dev, TPM_NSC_BASE)) { 67.522 -- rc = -ENODEV; 67.523 -- goto out_err; 67.524 -- } 67.525 -- 67.526 - /* verify that it is a National part (SID) */ 67.527 - if (tpm_read_index(NSC_SID_INDEX) != 0xEF) { 67.528 - rc = -ENODEV; 67.529 -diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c 67.530 ---- a/drivers/char/tty_ioctl.c 67.531 -+++ b/drivers/char/tty_ioctl.c 67.532 -@@ -476,11 +476,11 @@ int n_tty_ioctl(struct tty_struct * tty, 67.533 - ld = tty_ldisc_ref(tty); 67.534 - switch (arg) { 67.535 - case TCIFLUSH: 67.536 -- if (ld->flush_buffer) 67.537 -+ if (ld && ld->flush_buffer) 67.538 - ld->flush_buffer(tty); 67.539 - break; 67.540 - case TCIOFLUSH: 67.541 -- if (ld->flush_buffer) 67.542 -+ if (ld && ld->flush_buffer) 67.543 - ld->flush_buffer(tty); 67.544 - /* fall through */ 67.545 - case TCOFLUSH: 67.546 -diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c 67.547 ---- a/drivers/media/video/cx88/cx88-video.c 67.548 -+++ b/drivers/media/video/cx88/cx88-video.c 67.549 -@@ -261,7 +261,7 @@ static struct cx88_ctrl cx8800_ctls[] = 67.550 - .default_value = 0, 67.551 - .type = V4L2_CTRL_TYPE_INTEGER, 67.552 - }, 67.553 -- .off = 0, 67.554 -+ .off = 128, 67.555 - .reg = MO_HUE, 67.556 - .mask = 0x00ff, 67.557 - .shift = 0, 67.558 -diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c 67.559 ---- a/drivers/net/e1000/e1000_main.c 67.560 -+++ b/drivers/net/e1000/e1000_main.c 67.561 -@@ -2307,6 +2307,7 @@ e1000_xmit_frame(struct sk_buff *skb, st 67.562 - tso = e1000_tso(adapter, skb); 67.563 - if (tso < 0) { 67.564 - dev_kfree_skb_any(skb); 67.565 -+ spin_unlock_irqrestore(&adapter->tx_lock, flags); 67.566 - return NETDEV_TX_OK; 67.567 - } 67.568 - 67.569 -diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig 67.570 ---- a/drivers/net/hamradio/Kconfig 67.571 -+++ b/drivers/net/hamradio/Kconfig 67.572 -@@ -17,7 +17,7 @@ config MKISS 67.573 - 67.574 - config 6PACK 67.575 - tristate "Serial port 6PACK driver" 67.576 -- depends on AX25 && BROKEN_ON_SMP 67.577 -+ depends on AX25 67.578 - ---help--- 67.579 - 6pack is a transmission protocol for the data exchange between your 67.580 - PC and your TNC (the Terminal Node Controller acts as a kind of 67.581 -diff --git a/drivers/net/shaper.c b/drivers/net/shaper.c 67.582 ---- a/drivers/net/shaper.c 67.583 -+++ b/drivers/net/shaper.c 67.584 -@@ -135,10 +135,8 @@ static int shaper_start_xmit(struct sk_b 67.585 - { 67.586 - struct shaper *shaper = dev->priv; 67.587 - struct sk_buff *ptr; 67.588 -- 67.589 -- if (down_trylock(&shaper->sem)) 67.590 -- return -1; 67.591 - 67.592 -+ spin_lock(&shaper->lock); 67.593 - ptr=shaper->sendq.prev; 67.594 - 67.595 - /* 67.596 -@@ -232,7 +230,7 @@ static int shaper_start_xmit(struct sk_b 67.597 - shaper->stats.collisions++; 67.598 - } 67.599 - shaper_kick(shaper); 67.600 -- up(&shaper->sem); 67.601 -+ spin_unlock(&shaper->lock); 67.602 - return 0; 67.603 - } 67.604 - 67.605 -@@ -271,11 +269,9 @@ static void shaper_timer(unsigned long d 67.606 - { 67.607 - struct shaper *shaper = (struct shaper *)data; 67.608 - 67.609 -- if (!down_trylock(&shaper->sem)) { 67.610 -- shaper_kick(shaper); 67.611 -- up(&shaper->sem); 67.612 -- } else 67.613 -- mod_timer(&shaper->timer, jiffies); 67.614 -+ spin_lock(&shaper->lock); 67.615 -+ shaper_kick(shaper); 67.616 -+ spin_unlock(&shaper->lock); 67.617 - } 67.618 - 67.619 - /* 67.620 -@@ -332,21 +328,6 @@ static void shaper_kick(struct shaper *s 67.621 - 67.622 - 67.623 - /* 67.624 -- * Flush the shaper queues on a closedown 67.625 -- */ 67.626 -- 67.627 --static void shaper_flush(struct shaper *shaper) 67.628 --{ 67.629 -- struct sk_buff *skb; 67.630 -- 67.631 -- down(&shaper->sem); 67.632 -- while((skb=skb_dequeue(&shaper->sendq))!=NULL) 67.633 -- dev_kfree_skb(skb); 67.634 -- shaper_kick(shaper); 67.635 -- up(&shaper->sem); 67.636 --} 67.637 -- 67.638 --/* 67.639 - * Bring the interface up. We just disallow this until a 67.640 - * bind. 67.641 - */ 67.642 -@@ -375,7 +356,15 @@ static int shaper_open(struct net_device 67.643 - static int shaper_close(struct net_device *dev) 67.644 - { 67.645 - struct shaper *shaper=dev->priv; 67.646 -- shaper_flush(shaper); 67.647 -+ struct sk_buff *skb; 67.648 -+ 67.649 -+ while ((skb = skb_dequeue(&shaper->sendq)) != NULL) 67.650 -+ dev_kfree_skb(skb); 67.651 -+ 67.652 -+ spin_lock_bh(&shaper->lock); 67.653 -+ shaper_kick(shaper); 67.654 -+ spin_unlock_bh(&shaper->lock); 67.655 -+ 67.656 - del_timer_sync(&shaper->timer); 67.657 - return 0; 67.658 - } 67.659 -@@ -576,6 +565,7 @@ static void shaper_init_priv(struct net_ 67.660 - init_timer(&sh->timer); 67.661 - sh->timer.function=shaper_timer; 67.662 - sh->timer.data=(unsigned long)sh; 67.663 -+ spin_lock_init(&sh->lock); 67.664 - } 67.665 - 67.666 - /* 67.667 -diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c 67.668 ---- a/drivers/pci/pci-driver.c 67.669 -+++ b/drivers/pci/pci-driver.c 67.670 -@@ -396,7 +396,7 @@ int pci_register_driver(struct pci_drive 67.671 - /* FIXME, once all of the existing PCI drivers have been fixed to set 67.672 - * the pci shutdown function, this test can go away. */ 67.673 - if (!drv->driver.shutdown) 67.674 -- drv->driver.shutdown = pci_device_shutdown, 67.675 -+ drv->driver.shutdown = pci_device_shutdown; 67.676 - drv->driver.owner = drv->owner; 67.677 - drv->driver.kobj.ktype = &pci_driver_kobj_type; 67.678 - pci_init_dynids(&drv->dynids); 67.679 -diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c 67.680 ---- a/drivers/scsi/qla2xxx/qla_os.c 67.681 -+++ b/drivers/scsi/qla2xxx/qla_os.c 67.682 -@@ -1150,7 +1150,7 @@ iospace_error_exit: 67.683 - */ 67.684 - int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) 67.685 - { 67.686 -- int ret; 67.687 -+ int ret = -ENODEV; 67.688 - device_reg_t __iomem *reg; 67.689 - struct Scsi_Host *host; 67.690 - scsi_qla_host_t *ha; 67.691 -@@ -1161,7 +1161,7 @@ int qla2x00_probe_one(struct pci_dev *pd 67.692 - fc_port_t *fcport; 67.693 - 67.694 - if (pci_enable_device(pdev)) 67.695 -- return -1; 67.696 -+ goto probe_out; 67.697 - 67.698 - host = scsi_host_alloc(&qla2x00_driver_template, 67.699 - sizeof(scsi_qla_host_t)); 67.700 -@@ -1183,9 +1183,8 @@ int qla2x00_probe_one(struct pci_dev *pd 67.701 - 67.702 - /* Configure PCI I/O space */ 67.703 - ret = qla2x00_iospace_config(ha); 67.704 -- if (ret != 0) { 67.705 -- goto probe_alloc_failed; 67.706 -- } 67.707 -+ if (ret) 67.708 -+ goto probe_failed; 67.709 - 67.710 - /* Sanitize the information from PCI BIOS. */ 67.711 - host->irq = pdev->irq; 67.712 -@@ -1258,23 +1257,10 @@ int qla2x00_probe_one(struct pci_dev *pd 67.713 - qla_printk(KERN_WARNING, ha, 67.714 - "[ERROR] Failed to allocate memory for adapter\n"); 67.715 - 67.716 -- goto probe_alloc_failed; 67.717 -+ ret = -ENOMEM; 67.718 -+ goto probe_failed; 67.719 - } 67.720 - 67.721 -- pci_set_drvdata(pdev, ha); 67.722 -- host->this_id = 255; 67.723 -- host->cmd_per_lun = 3; 67.724 -- host->unique_id = ha->instance; 67.725 -- host->max_cmd_len = MAX_CMDSZ; 67.726 -- host->max_channel = ha->ports - 1; 67.727 -- host->max_id = ha->max_targets; 67.728 -- host->max_lun = ha->max_luns; 67.729 -- host->transportt = qla2xxx_transport_template; 67.730 -- if (scsi_add_host(host, &pdev->dev)) 67.731 -- goto probe_alloc_failed; 67.732 -- 67.733 -- qla2x00_alloc_sysfs_attr(ha); 67.734 -- 67.735 - if (qla2x00_initialize_adapter(ha) && 67.736 - !(ha->device_flags & DFLG_NO_CABLE)) { 67.737 - 67.738 -@@ -1285,11 +1271,10 @@ int qla2x00_probe_one(struct pci_dev *pd 67.739 - "Adapter flags %x.\n", 67.740 - ha->host_no, ha->device_flags)); 67.741 - 67.742 -+ ret = -ENODEV; 67.743 - goto probe_failed; 67.744 - } 67.745 - 67.746 -- qla2x00_init_host_attr(ha); 67.747 -- 67.748 - /* 67.749 - * Startup the kernel thread for this host adapter 67.750 - */ 67.751 -@@ -1299,17 +1284,26 @@ int qla2x00_probe_one(struct pci_dev *pd 67.752 - qla_printk(KERN_WARNING, ha, 67.753 - "Unable to start DPC thread!\n"); 67.754 - 67.755 -+ ret = -ENODEV; 67.756 - goto probe_failed; 67.757 - } 67.758 - wait_for_completion(&ha->dpc_inited); 67.759 - 67.760 -+ host->this_id = 255; 67.761 -+ host->cmd_per_lun = 3; 67.762 -+ host->unique_id = ha->instance; 67.763 -+ host->max_cmd_len = MAX_CMDSZ; 67.764 -+ host->max_channel = ha->ports - 1; 67.765 -+ host->max_lun = MAX_LUNS; 67.766 -+ host->transportt = qla2xxx_transport_template; 67.767 -+ 67.768 - if (IS_QLA2100(ha) || IS_QLA2200(ha)) 67.769 - ret = request_irq(host->irq, qla2100_intr_handler, 67.770 - SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha); 67.771 - else 67.772 - ret = request_irq(host->irq, qla2300_intr_handler, 67.773 - SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha); 67.774 -- if (ret != 0) { 67.775 -+ if (ret) { 67.776 - qla_printk(KERN_WARNING, ha, 67.777 - "Failed to reserve interrupt %d already in use.\n", 67.778 - host->irq); 67.779 -@@ -1363,9 +1357,18 @@ int qla2x00_probe_one(struct pci_dev *pd 67.780 - msleep(10); 67.781 - } 67.782 - 67.783 -+ pci_set_drvdata(pdev, ha); 67.784 - ha->flags.init_done = 1; 67.785 - num_hosts++; 67.786 - 67.787 -+ ret = scsi_add_host(host, &pdev->dev); 67.788 -+ if (ret) 67.789 -+ goto probe_failed; 67.790 -+ 67.791 -+ qla2x00_alloc_sysfs_attr(ha); 67.792 -+ 67.793 -+ qla2x00_init_host_attr(ha); 67.794 -+ 67.795 - qla_printk(KERN_INFO, ha, "\n" 67.796 - " QLogic Fibre Channel HBA Driver: %s\n" 67.797 - " QLogic %s - %s\n" 67.798 -@@ -1384,9 +1387,6 @@ int qla2x00_probe_one(struct pci_dev *pd 67.799 - probe_failed: 67.800 - fc_remove_host(ha->host); 67.801 - 67.802 -- scsi_remove_host(host); 67.803 -- 67.804 --probe_alloc_failed: 67.805 - qla2x00_free_device(ha); 67.806 - 67.807 - scsi_host_put(host); 67.808 -@@ -1394,7 +1394,8 @@ probe_alloc_failed: 67.809 - probe_disable_device: 67.810 - pci_disable_device(pdev); 67.811 - 67.812 -- return -1; 67.813 -+probe_out: 67.814 -+ return ret; 67.815 - } 67.816 - EXPORT_SYMBOL_GPL(qla2x00_probe_one); 67.817 - 67.818 -diff --git a/fs/char_dev.c b/fs/char_dev.c 67.819 ---- a/fs/char_dev.c 67.820 -+++ b/fs/char_dev.c 67.821 -@@ -139,7 +139,7 @@ __unregister_chrdev_region(unsigned majo 67.822 - struct char_device_struct *cd = NULL, **cp; 67.823 - int i = major_to_index(major); 67.824 - 67.825 -- up(&chrdevs_lock); 67.826 -+ down(&chrdevs_lock); 67.827 - for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next) 67.828 - if ((*cp)->major == major && 67.829 - (*cp)->baseminor == baseminor && 67.830 -diff --git a/fs/exec.c b/fs/exec.c 67.831 ---- a/fs/exec.c 67.832 -+++ b/fs/exec.c 67.833 -@@ -649,6 +649,7 @@ static inline int de_thread(struct task_ 67.834 - } 67.835 - sig->group_exit_task = NULL; 67.836 - sig->notify_count = 0; 67.837 -+ sig->real_timer.data = (unsigned long)current; 67.838 - spin_unlock_irq(lock); 67.839 - 67.840 - /* 67.841 -diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h 67.842 ---- a/include/asm-i386/string.h 67.843 -+++ b/include/asm-i386/string.h 67.844 -@@ -116,7 +116,8 @@ __asm__ __volatile__( 67.845 - "orb $1,%%al\n" 67.846 - "3:" 67.847 - :"=a" (__res), "=&S" (d0), "=&D" (d1) 67.848 -- :"1" (cs),"2" (ct)); 67.849 -+ :"1" (cs),"2" (ct) 67.850 -+ :"memory"); 67.851 - return __res; 67.852 - } 67.853 - 67.854 -@@ -138,8 +139,9 @@ __asm__ __volatile__( 67.855 - "3:\tsbbl %%eax,%%eax\n\t" 67.856 - "orb $1,%%al\n" 67.857 - "4:" 67.858 -- :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) 67.859 -- :"1" (cs),"2" (ct),"3" (count)); 67.860 -+ :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) 67.861 -+ :"1" (cs),"2" (ct),"3" (count) 67.862 -+ :"memory"); 67.863 - return __res; 67.864 - } 67.865 - 67.866 -@@ -158,7 +160,9 @@ __asm__ __volatile__( 67.867 - "movl $1,%1\n" 67.868 - "2:\tmovl %1,%0\n\t" 67.869 - "decl %0" 67.870 -- :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c)); 67.871 -+ :"=a" (__res), "=&S" (d0) 67.872 -+ :"1" (s),"0" (c) 67.873 -+ :"memory"); 67.874 - return __res; 67.875 - } 67.876 - 67.877 -@@ -175,7 +179,9 @@ __asm__ __volatile__( 67.878 - "leal -1(%%esi),%0\n" 67.879 - "2:\ttestb %%al,%%al\n\t" 67.880 - "jne 1b" 67.881 -- :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); 67.882 -+ :"=g" (__res), "=&S" (d0), "=&a" (d1) 67.883 -+ :"0" (0),"1" (s),"2" (c) 67.884 -+ :"memory"); 67.885 - return __res; 67.886 - } 67.887 - 67.888 -@@ -189,7 +195,9 @@ __asm__ __volatile__( 67.889 - "scasb\n\t" 67.890 - "notl %0\n\t" 67.891 - "decl %0" 67.892 -- :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffffu)); 67.893 -+ :"=c" (__res), "=&D" (d0) 67.894 -+ :"1" (s),"a" (0), "0" (0xffffffffu) 67.895 -+ :"memory"); 67.896 - return __res; 67.897 - } 67.898 - 67.899 -@@ -333,7 +341,9 @@ __asm__ __volatile__( 67.900 - "je 1f\n\t" 67.901 - "movl $1,%0\n" 67.902 - "1:\tdecl %0" 67.903 -- :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count)); 67.904 -+ :"=D" (__res), "=&c" (d0) 67.905 -+ :"a" (c),"0" (cs),"1" (count) 67.906 -+ :"memory"); 67.907 - return __res; 67.908 - } 67.909 - 67.910 -@@ -369,7 +379,7 @@ __asm__ __volatile__( 67.911 - "je 2f\n\t" 67.912 - "stosb\n" 67.913 - "2:" 67.914 -- : "=&c" (d0), "=&D" (d1) 67.915 -+ :"=&c" (d0), "=&D" (d1) 67.916 - :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) 67.917 - :"memory"); 67.918 - return (s); 67.919 -@@ -392,7 +402,8 @@ __asm__ __volatile__( 67.920 - "jne 1b\n" 67.921 - "3:\tsubl %2,%0" 67.922 - :"=a" (__res), "=&d" (d0) 67.923 -- :"c" (s),"1" (count)); 67.924 -+ :"c" (s),"1" (count) 67.925 -+ :"memory"); 67.926 - return __res; 67.927 - } 67.928 - /* end of additional stuff */ 67.929 -@@ -473,7 +484,8 @@ static inline void * memscan(void * addr 67.930 - "dec %%edi\n" 67.931 - "1:" 67.932 - : "=D" (addr), "=c" (size) 67.933 -- : "0" (addr), "1" (size), "a" (c)); 67.934 -+ : "0" (addr), "1" (size), "a" (c) 67.935 -+ : "memory"); 67.936 - return addr; 67.937 - } 67.938 - 67.939 -diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h 67.940 ---- a/include/linux/if_shaper.h 67.941 -+++ b/include/linux/if_shaper.h 67.942 -@@ -23,7 +23,7 @@ struct shaper 67.943 - __u32 shapeclock; 67.944 - unsigned long recovery; /* Time we can next clock a packet out on 67.945 - an empty queue */ 67.946 -- struct semaphore sem; 67.947 -+ spinlock_t lock; 67.948 - struct net_device_stats stats; 67.949 - struct net_device *dev; 67.950 - int (*hard_start_xmit) (struct sk_buff *skb, 67.951 -diff --git a/mm/memory.c b/mm/memory.c 67.952 ---- a/mm/memory.c 67.953 -+++ b/mm/memory.c 67.954 -@@ -1164,7 +1164,7 @@ int remap_pfn_range(struct vm_area_struc 67.955 - { 67.956 - pgd_t *pgd; 67.957 - unsigned long next; 67.958 -- unsigned long end = addr + size; 67.959 -+ unsigned long end = addr + PAGE_ALIGN(size); 67.960 - struct mm_struct *mm = vma->vm_mm; 67.961 - int err; 67.962 - 67.963 -diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c 67.964 ---- a/net/ipv4/ip_output.c 67.965 -+++ b/net/ipv4/ip_output.c 67.966 -@@ -111,7 +111,6 @@ static int ip_dev_loopback_xmit(struct s 67.967 - #ifdef CONFIG_NETFILTER_DEBUG 67.968 - nf_debug_ip_loopback_xmit(newskb); 67.969 - #endif 67.970 -- nf_reset(newskb); 67.971 - netif_rx(newskb); 67.972 - return 0; 67.973 - } 67.974 -@@ -196,8 +195,6 @@ static inline int ip_finish_output2(stru 67.975 - nf_debug_ip_finish_output2(skb); 67.976 - #endif /*CONFIG_NETFILTER_DEBUG*/ 67.977 - 67.978 -- nf_reset(skb); 67.979 -- 67.980 - if (hh) { 67.981 - int hh_alen; 67.982 - 67.983 -diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c 67.984 ---- a/net/ipv4/netfilter/ip_conntrack_standalone.c 67.985 -+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 67.986 -@@ -432,6 +432,13 @@ static unsigned int ip_conntrack_defrag( 67.987 - const struct net_device *out, 67.988 - int (*okfn)(struct sk_buff *)) 67.989 - { 67.990 -+#if !defined(CONFIG_IP_NF_NAT) && !defined(CONFIG_IP_NF_NAT_MODULE) 67.991 -+ /* Previously seen (loopback)? Ignore. Do this before 67.992 -+ fragment check. */ 67.993 -+ if ((*pskb)->nfct) 67.994 -+ return NF_ACCEPT; 67.995 -+#endif 67.996 -+ 67.997 - /* Gather fragments. */ 67.998 - if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) { 67.999 - *pskb = ip_ct_gather_frags(*pskb, 67.1000 -diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c 67.1001 ---- a/net/netlink/af_netlink.c 67.1002 -+++ b/net/netlink/af_netlink.c 67.1003 -@@ -315,8 +315,8 @@ err: 67.1004 - static void netlink_remove(struct sock *sk) 67.1005 - { 67.1006 - netlink_table_grab(); 67.1007 -- nl_table[sk->sk_protocol].hash.entries--; 67.1008 -- sk_del_node_init(sk); 67.1009 -+ if (sk_del_node_init(sk)) 67.1010 -+ nl_table[sk->sk_protocol].hash.entries--; 67.1011 - if (nlk_sk(sk)->groups) 67.1012 - __sk_del_bind_node(sk); 67.1013 - netlink_table_ungrab(); 67.1014 -@@ -429,7 +429,12 @@ retry: 67.1015 - err = netlink_insert(sk, pid); 67.1016 - if (err == -EADDRINUSE) 67.1017 - goto retry; 67.1018 -- return 0; 67.1019 -+ 67.1020 -+ /* If 2 threads race to autobind, that is fine. */ 67.1021 -+ if (err == -EBUSY) 67.1022 -+ err = 0; 67.1023 -+ 67.1024 -+ return err; 67.1025 - } 67.1026 - 67.1027 - static inline int netlink_capable(struct socket *sock, unsigned int flag) 67.1028 -diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c 67.1029 ---- a/net/packet/af_packet.c 67.1030 -+++ b/net/packet/af_packet.c 67.1031 -@@ -274,6 +274,9 @@ static int packet_rcv_spkt(struct sk_buf 67.1032 - dst_release(skb->dst); 67.1033 - skb->dst = NULL; 67.1034 - 67.1035 -+ /* drop conntrack reference */ 67.1036 -+ nf_reset(skb); 67.1037 -+ 67.1038 - spkt = (struct sockaddr_pkt*)skb->cb; 67.1039 - 67.1040 - skb_push(skb, skb->data-skb->mac.raw); 67.1041 -@@ -517,6 +520,9 @@ static int packet_rcv(struct sk_buff *sk 67.1042 - dst_release(skb->dst); 67.1043 - skb->dst = NULL; 67.1044 - 67.1045 -+ /* drop conntrack reference */ 67.1046 -+ nf_reset(skb); 67.1047 -+ 67.1048 - spin_lock(&sk->sk_receive_queue.lock); 67.1049 - po->stats.tp_packets++; 67.1050 - __skb_queue_tail(&sk->sk_receive_queue, skb);
68.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 68.2 +++ b/patches/linux-2.6.12/patch-2.6.12.5 Mon Aug 15 10:32:29 2005 -0800 68.3 @@ -0,0 +1,1614 @@ 68.4 +diff --git a/Makefile b/Makefile 68.5 +--- a/Makefile 68.6 ++++ b/Makefile 68.7 +@@ -1,7 +1,7 @@ 68.8 + VERSION = 2 68.9 + PATCHLEVEL = 6 68.10 + SUBLEVEL = 12 68.11 +-EXTRAVERSION = 68.12 ++EXTRAVERSION = .5 68.13 + NAME=Woozy Numbat 68.14 + 68.15 + # *DOCUMENTATION* 68.16 +@@ -1149,7 +1149,7 @@ endif # KBUILD_EXTMOD 68.17 + #(which is the most common case IMHO) to avoid unneeded clutter in the big tags file. 68.18 + #Adding $(srctree) adds about 20M on i386 to the size of the output file! 68.19 + 68.20 +-ifeq ($(KBUILD_OUTPUT),) 68.21 ++ifeq ($(src),$(obj)) 68.22 + __srctree = 68.23 + else 68.24 + __srctree = $(srctree)/ 68.25 +diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 68.26 +--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 68.27 ++++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 68.28 +@@ -44,7 +44,7 @@ 68.29 + 68.30 + #define PFX "powernow-k8: " 68.31 + #define BFX PFX "BIOS error: " 68.32 +-#define VERSION "version 1.40.2" 68.33 ++#define VERSION "version 1.40.4" 68.34 + #include "powernow-k8.h" 68.35 + 68.36 + /* serialize freq changes */ 68.37 +@@ -978,7 +978,7 @@ static int __init powernowk8_cpu_init(st 68.38 + { 68.39 + struct powernow_k8_data *data; 68.40 + cpumask_t oldmask = CPU_MASK_ALL; 68.41 +- int rc; 68.42 ++ int rc, i; 68.43 + 68.44 + if (!check_supported_cpu(pol->cpu)) 68.45 + return -ENODEV; 68.46 +@@ -1064,7 +1064,9 @@ static int __init powernowk8_cpu_init(st 68.47 + printk("cpu_init done, current fid 0x%x, vid 0x%x\n", 68.48 + data->currfid, data->currvid); 68.49 + 68.50 +- powernow_data[pol->cpu] = data; 68.51 ++ for_each_cpu_mask(i, cpu_core_map[pol->cpu]) { 68.52 ++ powernow_data[i] = data; 68.53 ++ } 68.54 + 68.55 + return 0; 68.56 + 68.57 +diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c 68.58 +--- a/arch/i386/kernel/process.c 68.59 ++++ b/arch/i386/kernel/process.c 68.60 +@@ -827,6 +827,8 @@ asmlinkage int sys_get_thread_area(struc 68.61 + if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX) 68.62 + return -EINVAL; 68.63 + 68.64 ++ memset(&info, 0, sizeof(info)); 68.65 ++ 68.66 + desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; 68.67 + 68.68 + info.entry_number = idx; 68.69 +diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c 68.70 +--- a/arch/ia64/kernel/ptrace.c 68.71 ++++ b/arch/ia64/kernel/ptrace.c 68.72 +@@ -945,6 +945,13 @@ access_uarea (struct task_struct *child, 68.73 + *data = (pt->cr_ipsr & IPSR_MASK); 68.74 + return 0; 68.75 + 68.76 ++ case PT_AR_RSC: 68.77 ++ if (write_access) 68.78 ++ pt->ar_rsc = *data | (3 << 2); /* force PL3 */ 68.79 ++ else 68.80 ++ *data = pt->ar_rsc; 68.81 ++ return 0; 68.82 ++ 68.83 + case PT_AR_RNAT: 68.84 + urbs_end = ia64_get_user_rbs_end(child, pt, NULL); 68.85 + rnat_addr = (long) ia64_rse_rnat_addr((long *) 68.86 +@@ -996,9 +1003,6 @@ access_uarea (struct task_struct *child, 68.87 + case PT_AR_BSPSTORE: 68.88 + ptr = pt_reg_addr(pt, ar_bspstore); 68.89 + break; 68.90 +- case PT_AR_RSC: 68.91 +- ptr = pt_reg_addr(pt, ar_rsc); 68.92 +- break; 68.93 + case PT_AR_UNAT: 68.94 + ptr = pt_reg_addr(pt, ar_unat); 68.95 + break; 68.96 +@@ -1234,7 +1238,7 @@ ptrace_getregs (struct task_struct *chil 68.97 + static long 68.98 + ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr) 68.99 + { 68.100 +- unsigned long psr, ec, lc, rnat, bsp, cfm, nat_bits, val = 0; 68.101 ++ unsigned long psr, rsc, ec, lc, rnat, bsp, cfm, nat_bits, val = 0; 68.102 + struct unw_frame_info info; 68.103 + struct switch_stack *sw; 68.104 + struct ia64_fpreg fpval; 68.105 +@@ -1267,7 +1271,7 @@ ptrace_setregs (struct task_struct *chil 68.106 + /* app regs */ 68.107 + 68.108 + retval |= __get_user(pt->ar_pfs, &ppr->ar[PT_AUR_PFS]); 68.109 +- retval |= __get_user(pt->ar_rsc, &ppr->ar[PT_AUR_RSC]); 68.110 ++ retval |= __get_user(rsc, &ppr->ar[PT_AUR_RSC]); 68.111 + retval |= __get_user(pt->ar_bspstore, &ppr->ar[PT_AUR_BSPSTORE]); 68.112 + retval |= __get_user(pt->ar_unat, &ppr->ar[PT_AUR_UNAT]); 68.113 + retval |= __get_user(pt->ar_ccv, &ppr->ar[PT_AUR_CCV]); 68.114 +@@ -1365,6 +1369,7 @@ ptrace_setregs (struct task_struct *chil 68.115 + retval |= __get_user(nat_bits, &ppr->nat); 68.116 + 68.117 + retval |= access_uarea(child, PT_CR_IPSR, &psr, 1); 68.118 ++ retval |= access_uarea(child, PT_AR_RSC, &rsc, 1); 68.119 + retval |= access_uarea(child, PT_AR_EC, &ec, 1); 68.120 + retval |= access_uarea(child, PT_AR_LC, &lc, 1); 68.121 + retval |= access_uarea(child, PT_AR_RNAT, &rnat, 1); 68.122 +diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c 68.123 +--- a/arch/ia64/kernel/signal.c 68.124 ++++ b/arch/ia64/kernel/signal.c 68.125 +@@ -94,7 +94,7 @@ sys_sigaltstack (const stack_t __user *u 68.126 + static long 68.127 + restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) 68.128 + { 68.129 +- unsigned long ip, flags, nat, um, cfm; 68.130 ++ unsigned long ip, flags, nat, um, cfm, rsc; 68.131 + long err; 68.132 + 68.133 + /* Always make any pending restarted system calls return -EINTR */ 68.134 +@@ -106,7 +106,7 @@ restore_sigcontext (struct sigcontext __ 68.135 + err |= __get_user(ip, &sc->sc_ip); /* instruction pointer */ 68.136 + err |= __get_user(cfm, &sc->sc_cfm); 68.137 + err |= __get_user(um, &sc->sc_um); /* user mask */ 68.138 +- err |= __get_user(scr->pt.ar_rsc, &sc->sc_ar_rsc); 68.139 ++ err |= __get_user(rsc, &sc->sc_ar_rsc); 68.140 + err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat); 68.141 + err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr); 68.142 + err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs); 68.143 +@@ -119,6 +119,7 @@ restore_sigcontext (struct sigcontext __ 68.144 + err |= __copy_from_user(&scr->pt.r15, &sc->sc_gr[15], 8); /* r15 */ 68.145 + 68.146 + scr->pt.cr_ifs = cfm | (1UL << 63); 68.147 ++ scr->pt.ar_rsc = rsc | (3 << 2); /* force PL3 */ 68.148 + 68.149 + /* establish new instruction pointer: */ 68.150 + scr->pt.cr_iip = ip & ~0x3UL; 68.151 +diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c 68.152 +--- a/arch/ppc/kernel/time.c 68.153 ++++ b/arch/ppc/kernel/time.c 68.154 +@@ -89,6 +89,9 @@ unsigned long tb_to_ns_scale; 68.155 + 68.156 + extern unsigned long wall_jiffies; 68.157 + 68.158 ++/* used for timezone offset */ 68.159 ++static long timezone_offset; 68.160 ++ 68.161 + DEFINE_SPINLOCK(rtc_lock); 68.162 + 68.163 + EXPORT_SYMBOL(rtc_lock); 68.164 +@@ -170,7 +173,7 @@ void timer_interrupt(struct pt_regs * re 68.165 + xtime.tv_sec - last_rtc_update >= 659 && 68.166 + abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ && 68.167 + jiffies - wall_jiffies == 1) { 68.168 +- if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0) 68.169 ++ if (ppc_md.set_rtc_time(xtime.tv_sec+1 + timezone_offset) == 0) 68.170 + last_rtc_update = xtime.tv_sec+1; 68.171 + else 68.172 + /* Try again one minute later */ 68.173 +@@ -286,7 +289,7 @@ void __init time_init(void) 68.174 + unsigned old_stamp, stamp, elapsed; 68.175 + 68.176 + if (ppc_md.time_init != NULL) 68.177 +- time_offset = ppc_md.time_init(); 68.178 ++ timezone_offset = ppc_md.time_init(); 68.179 + 68.180 + if (__USE_RTC()) { 68.181 + /* 601 processor: dec counts down by 128 every 128ns */ 68.182 +@@ -331,10 +334,10 @@ void __init time_init(void) 68.183 + set_dec(tb_ticks_per_jiffy); 68.184 + 68.185 + /* If platform provided a timezone (pmac), we correct the time */ 68.186 +- if (time_offset) { 68.187 +- sys_tz.tz_minuteswest = -time_offset / 60; 68.188 ++ if (timezone_offset) { 68.189 ++ sys_tz.tz_minuteswest = -timezone_offset / 60; 68.190 + sys_tz.tz_dsttime = 0; 68.191 +- xtime.tv_sec -= time_offset; 68.192 ++ xtime.tv_sec -= timezone_offset; 68.193 + } 68.194 + set_normalized_timespec(&wall_to_monotonic, 68.195 + -xtime.tv_sec, -xtime.tv_nsec); 68.196 +diff --git a/arch/ppc64/boot/zlib.c b/arch/ppc64/boot/zlib.c 68.197 +--- a/arch/ppc64/boot/zlib.c 68.198 ++++ b/arch/ppc64/boot/zlib.c 68.199 +@@ -1307,7 +1307,7 @@ local int huft_build( 68.200 + { 68.201 + *t = (inflate_huft *)Z_NULL; 68.202 + *m = 0; 68.203 +- return Z_OK; 68.204 ++ return Z_DATA_ERROR; 68.205 + } 68.206 + 68.207 + 68.208 +@@ -1351,6 +1351,7 @@ local int huft_build( 68.209 + if ((j = *p++) != 0) 68.210 + v[x[j]++] = i; 68.211 + } while (++i < n); 68.212 ++ n = x[g]; /* set n to length of v */ 68.213 + 68.214 + 68.215 + /* Generate the Huffman codes and for each, make the table entries */ 68.216 +diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c 68.217 +--- a/arch/um/kernel/process.c 68.218 ++++ b/arch/um/kernel/process.c 68.219 +@@ -130,7 +130,7 @@ int start_fork_tramp(void *thread_arg, u 68.220 + return(arg.pid); 68.221 + } 68.222 + 68.223 +-static int ptrace_child(void) 68.224 ++static int ptrace_child(void *arg) 68.225 + { 68.226 + int ret; 68.227 + int pid = os_getpid(), ppid = getppid(); 68.228 +@@ -159,16 +159,20 @@ static int ptrace_child(void) 68.229 + _exit(ret); 68.230 + } 68.231 + 68.232 +-static int start_ptraced_child(void) 68.233 ++static int start_ptraced_child(void **stack_out) 68.234 + { 68.235 ++ void *stack; 68.236 ++ unsigned long sp; 68.237 + int pid, n, status; 68.238 + 68.239 +- pid = fork(); 68.240 +- if(pid == 0) 68.241 +- ptrace_child(); 68.242 +- 68.243 ++ stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, 68.244 ++ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); 68.245 ++ if(stack == MAP_FAILED) 68.246 ++ panic("check_ptrace : mmap failed, errno = %d", errno); 68.247 ++ sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); 68.248 ++ pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); 68.249 + if(pid < 0) 68.250 +- panic("check_ptrace : fork failed, errno = %d", errno); 68.251 ++ panic("check_ptrace : clone failed, errno = %d", errno); 68.252 + CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); 68.253 + if(n < 0) 68.254 + panic("check_ptrace : wait failed, errno = %d", errno); 68.255 +@@ -176,6 +180,7 @@ static int start_ptraced_child(void) 68.256 + panic("check_ptrace : expected SIGSTOP, got status = %d", 68.257 + status); 68.258 + 68.259 ++ *stack_out = stack; 68.260 + return(pid); 68.261 + } 68.262 + 68.263 +@@ -183,12 +188,12 @@ static int start_ptraced_child(void) 68.264 + * just avoid using sysemu, not panic, but only if SYSEMU features are broken. 68.265 + * So only for SYSEMU features we test mustpanic, while normal host features 68.266 + * must work anyway!*/ 68.267 +-static int stop_ptraced_child(int pid, int exitcode, int mustexit) 68.268 ++static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic) 68.269 + { 68.270 + int status, n, ret = 0; 68.271 + 68.272 + if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) 68.273 +- panic("stop_ptraced_child : ptrace failed, errno = %d", errno); 68.274 ++ panic("check_ptrace : ptrace failed, errno = %d", errno); 68.275 + CATCH_EINTR(n = waitpid(pid, &status, 0)); 68.276 + if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { 68.277 + int exit_with = WEXITSTATUS(status); 68.278 +@@ -199,13 +204,15 @@ static int stop_ptraced_child(int pid, i 68.279 + printk("check_ptrace : child exited with exitcode %d, while " 68.280 + "expecting %d; status 0x%x", exit_with, 68.281 + exitcode, status); 68.282 +- if (mustexit) 68.283 ++ if (mustpanic) 68.284 + panic("\n"); 68.285 + else 68.286 + printk("\n"); 68.287 + ret = -1; 68.288 + } 68.289 + 68.290 ++ if(munmap(stack, PAGE_SIZE) < 0) 68.291 ++ panic("check_ptrace : munmap failed, errno = %d", errno); 68.292 + return ret; 68.293 + } 68.294 + 68.295 +@@ -227,11 +234,12 @@ __uml_setup("nosysemu", nosysemu_cmd_par 68.296 + 68.297 + static void __init check_sysemu(void) 68.298 + { 68.299 ++ void *stack; 68.300 + int pid, syscall, n, status, count=0; 68.301 + 68.302 + printk("Checking syscall emulation patch for ptrace..."); 68.303 + sysemu_supported = 0; 68.304 +- pid = start_ptraced_child(); 68.305 ++ pid = start_ptraced_child(&stack); 68.306 + 68.307 + if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0) 68.308 + goto fail; 68.309 +@@ -249,7 +257,7 @@ static void __init check_sysemu(void) 68.310 + panic("check_sysemu : failed to modify system " 68.311 + "call return, errno = %d", errno); 68.312 + 68.313 +- if (stop_ptraced_child(pid, 0, 0) < 0) 68.314 ++ if (stop_ptraced_child(pid, stack, 0, 0) < 0) 68.315 + goto fail_stopped; 68.316 + 68.317 + sysemu_supported = 1; 68.318 +@@ -257,7 +265,7 @@ static void __init check_sysemu(void) 68.319 + set_using_sysemu(!force_sysemu_disabled); 68.320 + 68.321 + printk("Checking advanced syscall emulation patch for ptrace..."); 68.322 +- pid = start_ptraced_child(); 68.323 ++ pid = start_ptraced_child(&stack); 68.324 + while(1){ 68.325 + count++; 68.326 + if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0) 68.327 +@@ -282,7 +290,7 @@ static void __init check_sysemu(void) 68.328 + break; 68.329 + } 68.330 + } 68.331 +- if (stop_ptraced_child(pid, 0, 0) < 0) 68.332 ++ if (stop_ptraced_child(pid, stack, 0, 0) < 0) 68.333 + goto fail_stopped; 68.334 + 68.335 + sysemu_supported = 2; 68.336 +@@ -293,17 +301,18 @@ static void __init check_sysemu(void) 68.337 + return; 68.338 + 68.339 + fail: 68.340 +- stop_ptraced_child(pid, 1, 0); 68.341 ++ stop_ptraced_child(pid, stack, 1, 0); 68.342 + fail_stopped: 68.343 + printk("missing\n"); 68.344 + } 68.345 + 68.346 + void __init check_ptrace(void) 68.347 + { 68.348 ++ void *stack; 68.349 + int pid, syscall, n, status; 68.350 + 68.351 + printk("Checking that ptrace can change system call numbers..."); 68.352 +- pid = start_ptraced_child(); 68.353 ++ pid = start_ptraced_child(&stack); 68.354 + 68.355 + if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) 68.356 + panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno); 68.357 +@@ -330,7 +339,7 @@ void __init check_ptrace(void) 68.358 + break; 68.359 + } 68.360 + } 68.361 +- stop_ptraced_child(pid, 0, 1); 68.362 ++ stop_ptraced_child(pid, stack, 0, 1); 68.363 + printk("OK\n"); 68.364 + check_sysemu(); 68.365 + } 68.366 +@@ -362,10 +371,11 @@ void forward_pending_sigio(int target) 68.367 + static inline int check_skas3_ptrace_support(void) 68.368 + { 68.369 + struct ptrace_faultinfo fi; 68.370 ++ void *stack; 68.371 + int pid, n, ret = 1; 68.372 + 68.373 + printf("Checking for the skas3 patch in the host..."); 68.374 +- pid = start_ptraced_child(); 68.375 ++ pid = start_ptraced_child(&stack); 68.376 + 68.377 + n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi); 68.378 + if (n < 0) { 68.379 +@@ -380,7 +390,7 @@ static inline int check_skas3_ptrace_sup 68.380 + } 68.381 + 68.382 + init_registers(pid); 68.383 +- stop_ptraced_child(pid, 1, 1); 68.384 ++ stop_ptraced_child(pid, stack, 1, 1); 68.385 + 68.386 + return(ret); 68.387 + } 68.388 +diff --git a/arch/x86_64/ia32/syscall32.c b/arch/x86_64/ia32/syscall32.c 68.389 +--- a/arch/x86_64/ia32/syscall32.c 68.390 ++++ b/arch/x86_64/ia32/syscall32.c 68.391 +@@ -57,6 +57,7 @@ int syscall32_setup_pages(struct linux_b 68.392 + int npages = (VSYSCALL32_END - VSYSCALL32_BASE) >> PAGE_SHIFT; 68.393 + struct vm_area_struct *vma; 68.394 + struct mm_struct *mm = current->mm; 68.395 ++ int ret; 68.396 + 68.397 + vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); 68.398 + if (!vma) 68.399 +@@ -78,7 +79,11 @@ int syscall32_setup_pages(struct linux_b 68.400 + vma->vm_mm = mm; 68.401 + 68.402 + down_write(&mm->mmap_sem); 68.403 +- insert_vm_struct(mm, vma); 68.404 ++ if ((ret = insert_vm_struct(mm, vma))) { 68.405 ++ up_write(&mm->mmap_sem); 68.406 ++ kmem_cache_free(vm_area_cachep, vma); 68.407 ++ return ret; 68.408 ++ } 68.409 + mm->total_vm += npages; 68.410 + up_write(&mm->mmap_sem); 68.411 + return 0; 68.412 +diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c 68.413 +--- a/arch/x86_64/kernel/setup.c 68.414 ++++ b/arch/x86_64/kernel/setup.c 68.415 +@@ -729,8 +729,6 @@ static void __init amd_detect_cmp(struct 68.416 + int cpu = smp_processor_id(); 68.417 + int node = 0; 68.418 + unsigned bits; 68.419 +- if (c->x86_num_cores == 1) 68.420 +- return; 68.421 + 68.422 + bits = 0; 68.423 + while ((1 << bits) < c->x86_num_cores) 68.424 +diff --git a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c 68.425 +--- a/arch/x86_64/kernel/smp.c 68.426 ++++ b/arch/x86_64/kernel/smp.c 68.427 +@@ -284,6 +284,71 @@ struct call_data_struct { 68.428 + static struct call_data_struct * call_data; 68.429 + 68.430 + /* 68.431 ++ * this function sends a 'generic call function' IPI to one other CPU 68.432 ++ * in the system. 68.433 ++ */ 68.434 ++static void __smp_call_function_single (int cpu, void (*func) (void *info), void *info, 68.435 ++ int nonatomic, int wait) 68.436 ++{ 68.437 ++ struct call_data_struct data; 68.438 ++ int cpus = 1; 68.439 ++ 68.440 ++ data.func = func; 68.441 ++ data.info = info; 68.442 ++ atomic_set(&data.started, 0); 68.443 ++ data.wait = wait; 68.444 ++ if (wait) 68.445 ++ atomic_set(&data.finished, 0); 68.446 ++ 68.447 ++ call_data = &data; 68.448 ++ wmb(); 68.449 ++ /* Send a message to all other CPUs and wait for them to respond */ 68.450 ++ send_IPI_mask(cpumask_of_cpu(cpu), CALL_FUNCTION_VECTOR); 68.451 ++ 68.452 ++ /* Wait for response */ 68.453 ++ while (atomic_read(&data.started) != cpus) 68.454 ++ cpu_relax(); 68.455 ++ 68.456 ++ if (!wait) 68.457 ++ return; 68.458 ++ 68.459 ++ while (atomic_read(&data.finished) != cpus) 68.460 ++ cpu_relax(); 68.461 ++} 68.462 ++ 68.463 ++/* 68.464 ++ * Run a function on another CPU 68.465 ++ * <func> The function to run. This must be fast and non-blocking. 68.466 ++ * <info> An arbitrary pointer to pass to the function. 68.467 ++ * <nonatomic> Currently unused. 68.468 ++ * <wait> If true, wait until function has completed on other CPUs. 68.469 ++ * [RETURNS] 0 on success, else a negative status code. 68.470 ++ * 68.471 ++ * Does not return until the remote CPU is nearly ready to execute <func> 68.472 ++ * or is or has executed. 68.473 ++ */ 68.474 ++ 68.475 ++int smp_call_function_single (int cpu, void (*func) (void *info), void *info, 68.476 ++ int nonatomic, int wait) 68.477 ++{ 68.478 ++ 68.479 ++ int me = get_cpu(); /* prevent preemption and reschedule on another processor */ 68.480 ++ 68.481 ++ if (cpu == me) { 68.482 ++ printk("%s: trying to call self\n", __func__); 68.483 ++ put_cpu(); 68.484 ++ return -EBUSY; 68.485 ++ } 68.486 ++ spin_lock_bh(&call_lock); 68.487 ++ 68.488 ++ __smp_call_function_single(cpu, func,info,nonatomic,wait); 68.489 ++ 68.490 ++ spin_unlock_bh(&call_lock); 68.491 ++ put_cpu(); 68.492 ++ return 0; 68.493 ++} 68.494 ++ 68.495 ++/* 68.496 + * this function sends a 'generic call function' IPI to all other CPUs 68.497 + * in the system. 68.498 + */ 68.499 +diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c 68.500 +--- a/arch/x86_64/kernel/smpboot.c 68.501 ++++ b/arch/x86_64/kernel/smpboot.c 68.502 +@@ -202,9 +202,6 @@ static __cpuinit void sync_master(void * 68.503 + { 68.504 + unsigned long flags, i; 68.505 + 68.506 +- if (smp_processor_id() != boot_cpu_id) 68.507 +- return; 68.508 +- 68.509 + go[MASTER] = 0; 68.510 + 68.511 + local_irq_save(flags); 68.512 +@@ -253,7 +250,7 @@ get_delta(long *rt, long *master) 68.513 + return tcenter - best_tm; 68.514 + } 68.515 + 68.516 +-static __cpuinit void sync_tsc(void) 68.517 ++static __cpuinit void sync_tsc(unsigned int master) 68.518 + { 68.519 + int i, done = 0; 68.520 + long delta, adj, adjust_latency = 0; 68.521 +@@ -267,9 +264,17 @@ static __cpuinit void sync_tsc(void) 68.522 + } t[NUM_ROUNDS] __cpuinitdata; 68.523 + #endif 68.524 + 68.525 ++ printk(KERN_INFO "CPU %d: Syncing TSC to CPU %u.\n", 68.526 ++ smp_processor_id(), master); 68.527 ++ 68.528 + go[MASTER] = 1; 68.529 + 68.530 +- smp_call_function(sync_master, NULL, 1, 0); 68.531 ++ /* It is dangerous to broadcast IPI as cpus are coming up, 68.532 ++ * as they may not be ready to accept them. So since 68.533 ++ * we only need to send the ipi to the boot cpu direct 68.534 ++ * the message, and avoid the race. 68.535 ++ */ 68.536 ++ smp_call_function_single(master, sync_master, NULL, 1, 0); 68.537 + 68.538 + while (go[MASTER]) /* wait for master to be ready */ 68.539 + no_cpu_relax(); 68.540 +@@ -313,16 +318,14 @@ static __cpuinit void sync_tsc(void) 68.541 + printk(KERN_INFO 68.542 + "CPU %d: synchronized TSC with CPU %u (last diff %ld cycles, " 68.543 + "maxerr %lu cycles)\n", 68.544 +- smp_processor_id(), boot_cpu_id, delta, rt); 68.545 ++ smp_processor_id(), master, delta, rt); 68.546 + } 68.547 + 68.548 + static void __cpuinit tsc_sync_wait(void) 68.549 + { 68.550 + if (notscsync || !cpu_has_tsc) 68.551 + return; 68.552 +- printk(KERN_INFO "CPU %d: Syncing TSC to CPU %u.\n", smp_processor_id(), 68.553 +- boot_cpu_id); 68.554 +- sync_tsc(); 68.555 ++ sync_tsc(0); 68.556 + } 68.557 + 68.558 + static __init int notscsync_setup(char *s) 68.559 +diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c 68.560 +--- a/drivers/acpi/pci_irq.c 68.561 ++++ b/drivers/acpi/pci_irq.c 68.562 +@@ -433,8 +433,9 @@ acpi_pci_irq_enable ( 68.563 + printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: no GSI", 68.564 + pci_name(dev), ('A' + pin)); 68.565 + /* Interrupt Line values above 0xF are forbidden */ 68.566 +- if (dev->irq >= 0 && (dev->irq <= 0xF)) { 68.567 ++ if (dev->irq > 0 && (dev->irq <= 0xF)) { 68.568 + printk(" - using IRQ %d\n", dev->irq); 68.569 ++ acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW); 68.570 + return_VALUE(0); 68.571 + } 68.572 + else { 68.573 +diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c 68.574 +--- a/drivers/char/rocket.c 68.575 ++++ b/drivers/char/rocket.c 68.576 +@@ -277,7 +277,7 @@ static void rp_do_receive(struct r_port 68.577 + ToRecv = space; 68.578 + 68.579 + if (ToRecv <= 0) 68.580 +- return; 68.581 ++ goto done; 68.582 + 68.583 + /* 68.584 + * if status indicates there are errored characters in the 68.585 +@@ -359,6 +359,7 @@ static void rp_do_receive(struct r_port 68.586 + } 68.587 + /* Push the data up to the tty layer */ 68.588 + ld->receive_buf(tty, tty->flip.char_buf, tty->flip.flag_buf, count); 68.589 ++done: 68.590 + tty_ldisc_deref(ld); 68.591 + } 68.592 + 68.593 +diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c 68.594 +--- a/drivers/char/tpm/tpm.c 68.595 ++++ b/drivers/char/tpm/tpm.c 68.596 +@@ -32,12 +32,6 @@ 68.597 + 68.598 + #define TPM_BUFSIZE 2048 68.599 + 68.600 +-/* PCI configuration addresses */ 68.601 +-#define PCI_GEN_PMCON_1 0xA0 68.602 +-#define PCI_GEN1_DEC 0xE4 68.603 +-#define PCI_LPC_EN 0xE6 68.604 +-#define PCI_GEN2_DEC 0xEC 68.605 +- 68.606 + static LIST_HEAD(tpm_chip_list); 68.607 + static DEFINE_SPINLOCK(driver_lock); 68.608 + static int dev_mask[32]; 68.609 +@@ -61,72 +55,6 @@ void tpm_time_expired(unsigned long ptr) 68.610 + EXPORT_SYMBOL_GPL(tpm_time_expired); 68.611 + 68.612 + /* 68.613 +- * Initialize the LPC bus and enable the TPM ports 68.614 +- */ 68.615 +-int tpm_lpc_bus_init(struct pci_dev *pci_dev, u16 base) 68.616 +-{ 68.617 +- u32 lpcenable, tmp; 68.618 +- int is_lpcm = 0; 68.619 +- 68.620 +- switch (pci_dev->vendor) { 68.621 +- case PCI_VENDOR_ID_INTEL: 68.622 +- switch (pci_dev->device) { 68.623 +- case PCI_DEVICE_ID_INTEL_82801CA_12: 68.624 +- case PCI_DEVICE_ID_INTEL_82801DB_12: 68.625 +- is_lpcm = 1; 68.626 +- break; 68.627 +- } 68.628 +- /* init ICH (enable LPC) */ 68.629 +- pci_read_config_dword(pci_dev, PCI_GEN1_DEC, &lpcenable); 68.630 +- lpcenable |= 0x20000000; 68.631 +- pci_write_config_dword(pci_dev, PCI_GEN1_DEC, lpcenable); 68.632 +- 68.633 +- if (is_lpcm) { 68.634 +- pci_read_config_dword(pci_dev, PCI_GEN1_DEC, 68.635 +- &lpcenable); 68.636 +- if ((lpcenable & 0x20000000) == 0) { 68.637 +- dev_err(&pci_dev->dev, 68.638 +- "cannot enable LPC\n"); 68.639 +- return -ENODEV; 68.640 +- } 68.641 +- } 68.642 +- 68.643 +- /* initialize TPM registers */ 68.644 +- pci_read_config_dword(pci_dev, PCI_GEN2_DEC, &tmp); 68.645 +- 68.646 +- if (!is_lpcm) 68.647 +- tmp = (tmp & 0xFFFF0000) | (base & 0xFFF0); 68.648 +- else 68.649 +- tmp = 68.650 +- (tmp & 0xFFFF0000) | (base & 0xFFF0) | 68.651 +- 0x00000001; 68.652 +- 68.653 +- pci_write_config_dword(pci_dev, PCI_GEN2_DEC, tmp); 68.654 +- 68.655 +- if (is_lpcm) { 68.656 +- pci_read_config_dword(pci_dev, PCI_GEN_PMCON_1, 68.657 +- &tmp); 68.658 +- tmp |= 0x00000004; /* enable CLKRUN */ 68.659 +- pci_write_config_dword(pci_dev, PCI_GEN_PMCON_1, 68.660 +- tmp); 68.661 +- } 68.662 +- tpm_write_index(0x0D, 0x55); /* unlock 4F */ 68.663 +- tpm_write_index(0x0A, 0x00); /* int disable */ 68.664 +- tpm_write_index(0x08, base); /* base addr lo */ 68.665 +- tpm_write_index(0x09, (base & 0xFF00) >> 8); /* base addr hi */ 68.666 +- tpm_write_index(0x0D, 0xAA); /* lock 4F */ 68.667 +- break; 68.668 +- case PCI_VENDOR_ID_AMD: 68.669 +- /* nothing yet */ 68.670 +- break; 68.671 +- } 68.672 +- 68.673 +- return 0; 68.674 +-} 68.675 +- 68.676 +-EXPORT_SYMBOL_GPL(tpm_lpc_bus_init); 68.677 +- 68.678 +-/* 68.679 + * Internal kernel interface to transmit TPM commands 68.680 + */ 68.681 + static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf, 68.682 +@@ -590,10 +518,6 @@ int tpm_pm_resume(struct pci_dev *pci_de 68.683 + if (chip == NULL) 68.684 + return -ENODEV; 68.685 + 68.686 +- spin_lock(&driver_lock); 68.687 +- tpm_lpc_bus_init(pci_dev, chip->vendor->base); 68.688 +- spin_unlock(&driver_lock); 68.689 +- 68.690 + return 0; 68.691 + } 68.692 + 68.693 +diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h 68.694 +--- a/drivers/char/tpm/tpm.h 68.695 ++++ b/drivers/char/tpm/tpm.h 68.696 +@@ -79,8 +79,6 @@ static inline void tpm_write_index(int i 68.697 + } 68.698 + 68.699 + extern void tpm_time_expired(unsigned long); 68.700 +-extern int tpm_lpc_bus_init(struct pci_dev *, u16); 68.701 +- 68.702 + extern int tpm_register_hardware(struct pci_dev *, 68.703 + struct tpm_vendor_specific *); 68.704 + extern int tpm_open(struct inode *, struct file *); 68.705 +diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c 68.706 +--- a/drivers/char/tpm/tpm_atmel.c 68.707 ++++ b/drivers/char/tpm/tpm_atmel.c 68.708 +@@ -22,7 +22,10 @@ 68.709 + #include "tpm.h" 68.710 + 68.711 + /* Atmel definitions */ 68.712 +-#define TPM_ATML_BASE 0x400 68.713 ++enum tpm_atmel_addr { 68.714 ++ TPM_ATMEL_BASE_ADDR_LO = 0x08, 68.715 ++ TPM_ATMEL_BASE_ADDR_HI = 0x09 68.716 ++}; 68.717 + 68.718 + /* write status bits */ 68.719 + #define ATML_STATUS_ABORT 0x01 68.720 +@@ -127,7 +130,6 @@ static struct tpm_vendor_specific tpm_at 68.721 + .cancel = tpm_atml_cancel, 68.722 + .req_complete_mask = ATML_STATUS_BUSY | ATML_STATUS_DATA_AVAIL, 68.723 + .req_complete_val = ATML_STATUS_DATA_AVAIL, 68.724 +- .base = TPM_ATML_BASE, 68.725 + .miscdev = { .fops = &atmel_ops, }, 68.726 + }; 68.727 + 68.728 +@@ -136,14 +138,16 @@ static int __devinit tpm_atml_init(struc 68.729 + { 68.730 + u8 version[4]; 68.731 + int rc = 0; 68.732 ++ int lo, hi; 68.733 + 68.734 + if (pci_enable_device(pci_dev)) 68.735 + return -EIO; 68.736 + 68.737 +- if (tpm_lpc_bus_init(pci_dev, TPM_ATML_BASE)) { 68.738 +- rc = -ENODEV; 68.739 +- goto out_err; 68.740 +- } 68.741 ++ lo = tpm_read_index( TPM_ATMEL_BASE_ADDR_LO ); 68.742 ++ hi = tpm_read_index( TPM_ATMEL_BASE_ADDR_HI ); 68.743 ++ 68.744 ++ tpm_atmel.base = (hi<<8)|lo; 68.745 ++ dev_dbg( &pci_dev->dev, "Operating with base: 0x%x\n", tpm_atmel.base); 68.746 + 68.747 + /* verify that it is an Atmel part */ 68.748 + if (tpm_read_index(4) != 'A' || tpm_read_index(5) != 'T' 68.749 +diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c 68.750 +--- a/drivers/char/tpm/tpm_nsc.c 68.751 ++++ b/drivers/char/tpm/tpm_nsc.c 68.752 +@@ -24,6 +24,10 @@ 68.753 + /* National definitions */ 68.754 + #define TPM_NSC_BASE 0x360 68.755 + #define TPM_NSC_IRQ 0x07 68.756 ++#define TPM_NSC_BASE0_HI 0x60 68.757 ++#define TPM_NSC_BASE0_LO 0x61 68.758 ++#define TPM_NSC_BASE1_HI 0x62 68.759 ++#define TPM_NSC_BASE1_LO 0x63 68.760 + 68.761 + #define NSC_LDN_INDEX 0x07 68.762 + #define NSC_SID_INDEX 0x20 68.763 +@@ -234,7 +238,6 @@ static struct tpm_vendor_specific tpm_ns 68.764 + .cancel = tpm_nsc_cancel, 68.765 + .req_complete_mask = NSC_STATUS_OBF, 68.766 + .req_complete_val = NSC_STATUS_OBF, 68.767 +- .base = TPM_NSC_BASE, 68.768 + .miscdev = { .fops = &nsc_ops, }, 68.769 + 68.770 + }; 68.771 +@@ -243,15 +246,16 @@ static int __devinit tpm_nsc_init(struct 68.772 + const struct pci_device_id *pci_id) 68.773 + { 68.774 + int rc = 0; 68.775 ++ int lo, hi; 68.776 ++ 68.777 ++ hi = tpm_read_index(TPM_NSC_BASE0_HI); 68.778 ++ lo = tpm_read_index(TPM_NSC_BASE0_LO); 68.779 ++ 68.780 ++ tpm_nsc.base = (hi<<8) | lo; 68.781 + 68.782 + if (pci_enable_device(pci_dev)) 68.783 + return -EIO; 68.784 + 68.785 +- if (tpm_lpc_bus_init(pci_dev, TPM_NSC_BASE)) { 68.786 +- rc = -ENODEV; 68.787 +- goto out_err; 68.788 +- } 68.789 +- 68.790 + /* verify that it is a National part (SID) */ 68.791 + if (tpm_read_index(NSC_SID_INDEX) != 0xEF) { 68.792 + rc = -ENODEV; 68.793 +diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c 68.794 +--- a/drivers/char/tty_ioctl.c 68.795 ++++ b/drivers/char/tty_ioctl.c 68.796 +@@ -476,11 +476,11 @@ int n_tty_ioctl(struct tty_struct * tty, 68.797 + ld = tty_ldisc_ref(tty); 68.798 + switch (arg) { 68.799 + case TCIFLUSH: 68.800 +- if (ld->flush_buffer) 68.801 ++ if (ld && ld->flush_buffer) 68.802 + ld->flush_buffer(tty); 68.803 + break; 68.804 + case TCIOFLUSH: 68.805 +- if (ld->flush_buffer) 68.806 ++ if (ld && ld->flush_buffer) 68.807 + ld->flush_buffer(tty); 68.808 + /* fall through */ 68.809 + case TCOFLUSH: 68.810 +diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c 68.811 +--- a/drivers/media/video/cx88/cx88-video.c 68.812 ++++ b/drivers/media/video/cx88/cx88-video.c 68.813 +@@ -261,7 +261,7 @@ static struct cx88_ctrl cx8800_ctls[] = 68.814 + .default_value = 0, 68.815 + .type = V4L2_CTRL_TYPE_INTEGER, 68.816 + }, 68.817 +- .off = 0, 68.818 ++ .off = 128, 68.819 + .reg = MO_HUE, 68.820 + .mask = 0x00ff, 68.821 + .shift = 0, 68.822 +diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c 68.823 +--- a/drivers/net/e1000/e1000_main.c 68.824 ++++ b/drivers/net/e1000/e1000_main.c 68.825 +@@ -2307,6 +2307,7 @@ e1000_xmit_frame(struct sk_buff *skb, st 68.826 + tso = e1000_tso(adapter, skb); 68.827 + if (tso < 0) { 68.828 + dev_kfree_skb_any(skb); 68.829 ++ spin_unlock_irqrestore(&adapter->tx_lock, flags); 68.830 + return NETDEV_TX_OK; 68.831 + } 68.832 + 68.833 +diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig 68.834 +--- a/drivers/net/hamradio/Kconfig 68.835 ++++ b/drivers/net/hamradio/Kconfig 68.836 +@@ -17,7 +17,7 @@ config MKISS 68.837 + 68.838 + config 6PACK 68.839 + tristate "Serial port 6PACK driver" 68.840 +- depends on AX25 && BROKEN_ON_SMP 68.841 ++ depends on AX25 68.842 + ---help--- 68.843 + 6pack is a transmission protocol for the data exchange between your 68.844 + PC and your TNC (the Terminal Node Controller acts as a kind of 68.845 +diff --git a/drivers/net/shaper.c b/drivers/net/shaper.c 68.846 +--- a/drivers/net/shaper.c 68.847 ++++ b/drivers/net/shaper.c 68.848 +@@ -135,10 +135,8 @@ static int shaper_start_xmit(struct sk_b 68.849 + { 68.850 + struct shaper *shaper = dev->priv; 68.851 + struct sk_buff *ptr; 68.852 +- 68.853 +- if (down_trylock(&shaper->sem)) 68.854 +- return -1; 68.855 + 68.856 ++ spin_lock(&shaper->lock); 68.857 + ptr=shaper->sendq.prev; 68.858 + 68.859 + /* 68.860 +@@ -232,7 +230,7 @@ static int shaper_start_xmit(struct sk_b 68.861 + shaper->stats.collisions++; 68.862 + } 68.863 + shaper_kick(shaper); 68.864 +- up(&shaper->sem); 68.865 ++ spin_unlock(&shaper->lock); 68.866 + return 0; 68.867 + } 68.868 + 68.869 +@@ -271,11 +269,9 @@ static void shaper_timer(unsigned long d 68.870 + { 68.871 + struct shaper *shaper = (struct shaper *)data; 68.872 + 68.873 +- if (!down_trylock(&shaper->sem)) { 68.874 +- shaper_kick(shaper); 68.875 +- up(&shaper->sem); 68.876 +- } else 68.877 +- mod_timer(&shaper->timer, jiffies); 68.878 ++ spin_lock(&shaper->lock); 68.879 ++ shaper_kick(shaper); 68.880 ++ spin_unlock(&shaper->lock); 68.881 + } 68.882 + 68.883 + /* 68.884 +@@ -332,21 +328,6 @@ static void shaper_kick(struct shaper *s 68.885 + 68.886 + 68.887 + /* 68.888 +- * Flush the shaper queues on a closedown 68.889 +- */ 68.890 +- 68.891 +-static void shaper_flush(struct shaper *shaper) 68.892 +-{ 68.893 +- struct sk_buff *skb; 68.894 +- 68.895 +- down(&shaper->sem); 68.896 +- while((skb=skb_dequeue(&shaper->sendq))!=NULL) 68.897 +- dev_kfree_skb(skb); 68.898 +- shaper_kick(shaper); 68.899 +- up(&shaper->sem); 68.900 +-} 68.901 +- 68.902 +-/* 68.903 + * Bring the interface up. We just disallow this until a 68.904 + * bind. 68.905 + */ 68.906 +@@ -375,7 +356,15 @@ static int shaper_open(struct net_device 68.907 + static int shaper_close(struct net_device *dev) 68.908 + { 68.909 + struct shaper *shaper=dev->priv; 68.910 +- shaper_flush(shaper); 68.911 ++ struct sk_buff *skb; 68.912 ++ 68.913 ++ while ((skb = skb_dequeue(&shaper->sendq)) != NULL) 68.914 ++ dev_kfree_skb(skb); 68.915 ++ 68.916 ++ spin_lock_bh(&shaper->lock); 68.917 ++ shaper_kick(shaper); 68.918 ++ spin_unlock_bh(&shaper->lock); 68.919 ++ 68.920 + del_timer_sync(&shaper->timer); 68.921 + return 0; 68.922 + } 68.923 +@@ -576,6 +565,7 @@ static void shaper_init_priv(struct net_ 68.924 + init_timer(&sh->timer); 68.925 + sh->timer.function=shaper_timer; 68.926 + sh->timer.data=(unsigned long)sh; 68.927 ++ spin_lock_init(&sh->lock); 68.928 + } 68.929 + 68.930 + /* 68.931 +diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c 68.932 +--- a/drivers/pci/pci-driver.c 68.933 ++++ b/drivers/pci/pci-driver.c 68.934 +@@ -396,7 +396,7 @@ int pci_register_driver(struct pci_drive 68.935 + /* FIXME, once all of the existing PCI drivers have been fixed to set 68.936 + * the pci shutdown function, this test can go away. */ 68.937 + if (!drv->driver.shutdown) 68.938 +- drv->driver.shutdown = pci_device_shutdown, 68.939 ++ drv->driver.shutdown = pci_device_shutdown; 68.940 + drv->driver.owner = drv->owner; 68.941 + drv->driver.kobj.ktype = &pci_driver_kobj_type; 68.942 + pci_init_dynids(&drv->dynids); 68.943 +diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c 68.944 +--- a/drivers/scsi/qla2xxx/qla_init.c 68.945 ++++ b/drivers/scsi/qla2xxx/qla_init.c 68.946 +@@ -1914,9 +1914,11 @@ qla2x00_reg_remote_port(scsi_qla_host_t 68.947 + rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET; 68.948 + 68.949 + fcport->rport = rport = fc_remote_port_add(ha->host, 0, &rport_ids); 68.950 +- if (!rport) 68.951 ++ if (!rport) { 68.952 + qla_printk(KERN_WARNING, ha, 68.953 + "Unable to allocate fc remote port!\n"); 68.954 ++ return; 68.955 ++ } 68.956 + 68.957 + if (rport->scsi_target_id != -1 && rport->scsi_target_id < MAX_TARGETS) 68.958 + fcport->os_target_id = rport->scsi_target_id; 68.959 +diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c 68.960 +--- a/drivers/scsi/qla2xxx/qla_os.c 68.961 ++++ b/drivers/scsi/qla2xxx/qla_os.c 68.962 +@@ -1150,7 +1150,7 @@ iospace_error_exit: 68.963 + */ 68.964 + int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) 68.965 + { 68.966 +- int ret; 68.967 ++ int ret = -ENODEV; 68.968 + device_reg_t __iomem *reg; 68.969 + struct Scsi_Host *host; 68.970 + scsi_qla_host_t *ha; 68.971 +@@ -1161,7 +1161,7 @@ int qla2x00_probe_one(struct pci_dev *pd 68.972 + fc_port_t *fcport; 68.973 + 68.974 + if (pci_enable_device(pdev)) 68.975 +- return -1; 68.976 ++ goto probe_out; 68.977 + 68.978 + host = scsi_host_alloc(&qla2x00_driver_template, 68.979 + sizeof(scsi_qla_host_t)); 68.980 +@@ -1183,9 +1183,8 @@ int qla2x00_probe_one(struct pci_dev *pd 68.981 + 68.982 + /* Configure PCI I/O space */ 68.983 + ret = qla2x00_iospace_config(ha); 68.984 +- if (ret != 0) { 68.985 +- goto probe_alloc_failed; 68.986 +- } 68.987 ++ if (ret) 68.988 ++ goto probe_failed; 68.989 + 68.990 + /* Sanitize the information from PCI BIOS. */ 68.991 + host->irq = pdev->irq; 68.992 +@@ -1258,23 +1257,10 @@ int qla2x00_probe_one(struct pci_dev *pd 68.993 + qla_printk(KERN_WARNING, ha, 68.994 + "[ERROR] Failed to allocate memory for adapter\n"); 68.995 + 68.996 +- goto probe_alloc_failed; 68.997 ++ ret = -ENOMEM; 68.998 ++ goto probe_failed; 68.999 + } 68.1000 + 68.1001 +- pci_set_drvdata(pdev, ha); 68.1002 +- host->this_id = 255; 68.1003 +- host->cmd_per_lun = 3; 68.1004 +- host->unique_id = ha->instance; 68.1005 +- host->max_cmd_len = MAX_CMDSZ; 68.1006 +- host->max_channel = ha->ports - 1; 68.1007 +- host->max_id = ha->max_targets; 68.1008 +- host->max_lun = ha->max_luns; 68.1009 +- host->transportt = qla2xxx_transport_template; 68.1010 +- if (scsi_add_host(host, &pdev->dev)) 68.1011 +- goto probe_alloc_failed; 68.1012 +- 68.1013 +- qla2x00_alloc_sysfs_attr(ha); 68.1014 +- 68.1015 + if (qla2x00_initialize_adapter(ha) && 68.1016 + !(ha->device_flags & DFLG_NO_CABLE)) { 68.1017 + 68.1018 +@@ -1285,11 +1271,10 @@ int qla2x00_probe_one(struct pci_dev *pd 68.1019 + "Adapter flags %x.\n", 68.1020 + ha->host_no, ha->device_flags)); 68.1021 + 68.1022 ++ ret = -ENODEV; 68.1023 + goto probe_failed; 68.1024 + } 68.1025 + 68.1026 +- qla2x00_init_host_attr(ha); 68.1027 +- 68.1028 + /* 68.1029 + * Startup the kernel thread for this host adapter 68.1030 + */ 68.1031 +@@ -1299,17 +1284,26 @@ int qla2x00_probe_one(struct pci_dev *pd 68.1032 + qla_printk(KERN_WARNING, ha, 68.1033 + "Unable to start DPC thread!\n"); 68.1034 + 68.1035 ++ ret = -ENODEV; 68.1036 + goto probe_failed; 68.1037 + } 68.1038 + wait_for_completion(&ha->dpc_inited); 68.1039 + 68.1040 ++ host->this_id = 255; 68.1041 ++ host->cmd_per_lun = 3; 68.1042 ++ host->unique_id = ha->instance; 68.1043 ++ host->max_cmd_len = MAX_CMDSZ; 68.1044 ++ host->max_channel = ha->ports - 1; 68.1045 ++ host->max_lun = MAX_LUNS; 68.1046 ++ host->transportt = qla2xxx_transport_template; 68.1047 ++ 68.1048 + if (IS_QLA2100(ha) || IS_QLA2200(ha)) 68.1049 + ret = request_irq(host->irq, qla2100_intr_handler, 68.1050 + SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha); 68.1051 + else 68.1052 + ret = request_irq(host->irq, qla2300_intr_handler, 68.1053 + SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha); 68.1054 +- if (ret != 0) { 68.1055 ++ if (ret) { 68.1056 + qla_printk(KERN_WARNING, ha, 68.1057 + "Failed to reserve interrupt %d already in use.\n", 68.1058 + host->irq); 68.1059 +@@ -1363,9 +1357,18 @@ int qla2x00_probe_one(struct pci_dev *pd 68.1060 + msleep(10); 68.1061 + } 68.1062 + 68.1063 ++ pci_set_drvdata(pdev, ha); 68.1064 + ha->flags.init_done = 1; 68.1065 + num_hosts++; 68.1066 + 68.1067 ++ ret = scsi_add_host(host, &pdev->dev); 68.1068 ++ if (ret) 68.1069 ++ goto probe_failed; 68.1070 ++ 68.1071 ++ qla2x00_alloc_sysfs_attr(ha); 68.1072 ++ 68.1073 ++ qla2x00_init_host_attr(ha); 68.1074 ++ 68.1075 + qla_printk(KERN_INFO, ha, "\n" 68.1076 + " QLogic Fibre Channel HBA Driver: %s\n" 68.1077 + " QLogic %s - %s\n" 68.1078 +@@ -1384,9 +1387,6 @@ int qla2x00_probe_one(struct pci_dev *pd 68.1079 + probe_failed: 68.1080 + fc_remove_host(ha->host); 68.1081 + 68.1082 +- scsi_remove_host(host); 68.1083 +- 68.1084 +-probe_alloc_failed: 68.1085 + qla2x00_free_device(ha); 68.1086 + 68.1087 + scsi_host_put(host); 68.1088 +@@ -1394,7 +1394,8 @@ probe_alloc_failed: 68.1089 + probe_disable_device: 68.1090 + pci_disable_device(pdev); 68.1091 + 68.1092 +- return -1; 68.1093 ++probe_out: 68.1094 ++ return ret; 68.1095 + } 68.1096 + EXPORT_SYMBOL_GPL(qla2x00_probe_one); 68.1097 + 68.1098 +diff --git a/fs/bio.c b/fs/bio.c 68.1099 +--- a/fs/bio.c 68.1100 ++++ b/fs/bio.c 68.1101 +@@ -261,6 +261,7 @@ inline void __bio_clone(struct bio *bio, 68.1102 + */ 68.1103 + bio->bi_vcnt = bio_src->bi_vcnt; 68.1104 + bio->bi_size = bio_src->bi_size; 68.1105 ++ bio->bi_idx = bio_src->bi_idx; 68.1106 + bio_phys_segments(q, bio); 68.1107 + bio_hw_segments(q, bio); 68.1108 + } 68.1109 +diff --git a/fs/char_dev.c b/fs/char_dev.c 68.1110 +--- a/fs/char_dev.c 68.1111 ++++ b/fs/char_dev.c 68.1112 +@@ -139,7 +139,7 @@ __unregister_chrdev_region(unsigned majo 68.1113 + struct char_device_struct *cd = NULL, **cp; 68.1114 + int i = major_to_index(major); 68.1115 + 68.1116 +- up(&chrdevs_lock); 68.1117 ++ down(&chrdevs_lock); 68.1118 + for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next) 68.1119 + if ((*cp)->major == major && 68.1120 + (*cp)->baseminor == baseminor && 68.1121 +diff --git a/fs/exec.c b/fs/exec.c 68.1122 +--- a/fs/exec.c 68.1123 ++++ b/fs/exec.c 68.1124 +@@ -649,6 +649,7 @@ static inline int de_thread(struct task_ 68.1125 + } 68.1126 + sig->group_exit_task = NULL; 68.1127 + sig->notify_count = 0; 68.1128 ++ sig->real_timer.data = (unsigned long)current; 68.1129 + spin_unlock_irq(lock); 68.1130 + 68.1131 + /* 68.1132 +diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c 68.1133 +--- a/fs/isofs/compress.c 68.1134 ++++ b/fs/isofs/compress.c 68.1135 +@@ -129,8 +129,14 @@ static int zisofs_readpage(struct file * 68.1136 + cend = le32_to_cpu(*(__le32 *)(bh->b_data + (blockendptr & bufmask))); 68.1137 + brelse(bh); 68.1138 + 68.1139 ++ if (cstart > cend) 68.1140 ++ goto eio; 68.1141 ++ 68.1142 + csize = cend-cstart; 68.1143 + 68.1144 ++ if (csize > deflateBound(1UL << zisofs_block_shift)) 68.1145 ++ goto eio; 68.1146 ++ 68.1147 + /* Now page[] contains an array of pages, any of which can be NULL, 68.1148 + and the locks on which we hold. We should now read the data and 68.1149 + release the pages. If the pages are NULL the decompressed data 68.1150 +diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h 68.1151 +--- a/include/asm-i386/string.h 68.1152 ++++ b/include/asm-i386/string.h 68.1153 +@@ -116,7 +116,8 @@ __asm__ __volatile__( 68.1154 + "orb $1,%%al\n" 68.1155 + "3:" 68.1156 + :"=a" (__res), "=&S" (d0), "=&D" (d1) 68.1157 +- :"1" (cs),"2" (ct)); 68.1158 ++ :"1" (cs),"2" (ct) 68.1159 ++ :"memory"); 68.1160 + return __res; 68.1161 + } 68.1162 + 68.1163 +@@ -138,8 +139,9 @@ __asm__ __volatile__( 68.1164 + "3:\tsbbl %%eax,%%eax\n\t" 68.1165 + "orb $1,%%al\n" 68.1166 + "4:" 68.1167 +- :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) 68.1168 +- :"1" (cs),"2" (ct),"3" (count)); 68.1169 ++ :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) 68.1170 ++ :"1" (cs),"2" (ct),"3" (count) 68.1171 ++ :"memory"); 68.1172 + return __res; 68.1173 + } 68.1174 + 68.1175 +@@ -158,7 +160,9 @@ __asm__ __volatile__( 68.1176 + "movl $1,%1\n" 68.1177 + "2:\tmovl %1,%0\n\t" 68.1178 + "decl %0" 68.1179 +- :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c)); 68.1180 ++ :"=a" (__res), "=&S" (d0) 68.1181 ++ :"1" (s),"0" (c) 68.1182 ++ :"memory"); 68.1183 + return __res; 68.1184 + } 68.1185 + 68.1186 +@@ -175,7 +179,9 @@ __asm__ __volatile__( 68.1187 + "leal -1(%%esi),%0\n" 68.1188 + "2:\ttestb %%al,%%al\n\t" 68.1189 + "jne 1b" 68.1190 +- :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); 68.1191 ++ :"=g" (__res), "=&S" (d0), "=&a" (d1) 68.1192 ++ :"0" (0),"1" (s),"2" (c) 68.1193 ++ :"memory"); 68.1194 + return __res; 68.1195 + } 68.1196 + 68.1197 +@@ -189,7 +195,9 @@ __asm__ __volatile__( 68.1198 + "scasb\n\t" 68.1199 + "notl %0\n\t" 68.1200 + "decl %0" 68.1201 +- :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffffu)); 68.1202 ++ :"=c" (__res), "=&D" (d0) 68.1203 ++ :"1" (s),"a" (0), "0" (0xffffffffu) 68.1204 ++ :"memory"); 68.1205 + return __res; 68.1206 + } 68.1207 + 68.1208 +@@ -333,7 +341,9 @@ __asm__ __volatile__( 68.1209 + "je 1f\n\t" 68.1210 + "movl $1,%0\n" 68.1211 + "1:\tdecl %0" 68.1212 +- :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count)); 68.1213 ++ :"=D" (__res), "=&c" (d0) 68.1214 ++ :"a" (c),"0" (cs),"1" (count) 68.1215 ++ :"memory"); 68.1216 + return __res; 68.1217 + } 68.1218 + 68.1219 +@@ -369,7 +379,7 @@ __asm__ __volatile__( 68.1220 + "je 2f\n\t" 68.1221 + "stosb\n" 68.1222 + "2:" 68.1223 +- : "=&c" (d0), "=&D" (d1) 68.1224 ++ :"=&c" (d0), "=&D" (d1) 68.1225 + :"a" (c), "q" (count), "0" (count/4), "1" ((long) s) 68.1226 + :"memory"); 68.1227 + return (s); 68.1228 +@@ -392,7 +402,8 @@ __asm__ __volatile__( 68.1229 + "jne 1b\n" 68.1230 + "3:\tsubl %2,%0" 68.1231 + :"=a" (__res), "=&d" (d0) 68.1232 +- :"c" (s),"1" (count)); 68.1233 ++ :"c" (s),"1" (count) 68.1234 ++ :"memory"); 68.1235 + return __res; 68.1236 + } 68.1237 + /* end of additional stuff */ 68.1238 +@@ -473,7 +484,8 @@ static inline void * memscan(void * addr 68.1239 + "dec %%edi\n" 68.1240 + "1:" 68.1241 + : "=D" (addr), "=c" (size) 68.1242 +- : "0" (addr), "1" (size), "a" (c)); 68.1243 ++ : "0" (addr), "1" (size), "a" (c) 68.1244 ++ : "memory"); 68.1245 + return addr; 68.1246 + } 68.1247 + 68.1248 +diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h 68.1249 +--- a/include/asm-x86_64/smp.h 68.1250 ++++ b/include/asm-x86_64/smp.h 68.1251 +@@ -46,6 +46,8 @@ extern int pic_mode; 68.1252 + extern int smp_num_siblings; 68.1253 + extern void smp_flush_tlb(void); 68.1254 + extern void smp_message_irq(int cpl, void *dev_id, struct pt_regs *regs); 68.1255 ++extern int smp_call_function_single (int cpuid, void (*func) (void *info), void *info, 68.1256 ++ int retry, int wait); 68.1257 + extern void smp_send_reschedule(int cpu); 68.1258 + extern void smp_invalidate_rcv(void); /* Process an NMI */ 68.1259 + extern void zap_low_mappings(void); 68.1260 +diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h 68.1261 +--- a/include/linux/if_shaper.h 68.1262 ++++ b/include/linux/if_shaper.h 68.1263 +@@ -23,7 +23,7 @@ struct shaper 68.1264 + __u32 shapeclock; 68.1265 + unsigned long recovery; /* Time we can next clock a packet out on 68.1266 + an empty queue */ 68.1267 +- struct semaphore sem; 68.1268 ++ spinlock_t lock; 68.1269 + struct net_device_stats stats; 68.1270 + struct net_device *dev; 68.1271 + int (*hard_start_xmit) (struct sk_buff *skb, 68.1272 +diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h 68.1273 +--- a/include/linux/skbuff.h 68.1274 ++++ b/include/linux/skbuff.h 68.1275 +@@ -1192,7 +1192,7 @@ static inline void *skb_header_pointer(c 68.1276 + { 68.1277 + int hlen = skb_headlen(skb); 68.1278 + 68.1279 +- if (offset + len <= hlen) 68.1280 ++ if (hlen - offset >= len) 68.1281 + return skb->data + offset; 68.1282 + 68.1283 + if (skb_copy_bits(skb, offset, buffer, len) < 0) 68.1284 +diff --git a/include/linux/zlib.h b/include/linux/zlib.h 68.1285 +--- a/include/linux/zlib.h 68.1286 ++++ b/include/linux/zlib.h 68.1287 +@@ -506,6 +506,11 @@ extern int zlib_deflateReset (z_streamp 68.1288 + stream state was inconsistent (such as zalloc or state being NULL). 68.1289 + */ 68.1290 + 68.1291 ++static inline unsigned long deflateBound(unsigned long s) 68.1292 ++{ 68.1293 ++ return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11; 68.1294 ++} 68.1295 ++ 68.1296 + extern int zlib_deflateParams (z_streamp strm, int level, int strategy); 68.1297 + /* 68.1298 + Dynamically update the compression level and compression strategy. The 68.1299 +diff --git a/kernel/module.c b/kernel/module.c 68.1300 +--- a/kernel/module.c 68.1301 ++++ b/kernel/module.c 68.1302 +@@ -249,13 +249,18 @@ static inline unsigned int block_size(in 68.1303 + /* Created by linker magic */ 68.1304 + extern char __per_cpu_start[], __per_cpu_end[]; 68.1305 + 68.1306 +-static void *percpu_modalloc(unsigned long size, unsigned long align) 68.1307 ++static void *percpu_modalloc(unsigned long size, unsigned long align, 68.1308 ++ const char *name) 68.1309 + { 68.1310 + unsigned long extra; 68.1311 + unsigned int i; 68.1312 + void *ptr; 68.1313 + 68.1314 +- BUG_ON(align > SMP_CACHE_BYTES); 68.1315 ++ if (align > SMP_CACHE_BYTES) { 68.1316 ++ printk(KERN_WARNING "%s: per-cpu alignment %li > %i\n", 68.1317 ++ name, align, SMP_CACHE_BYTES); 68.1318 ++ align = SMP_CACHE_BYTES; 68.1319 ++ } 68.1320 + 68.1321 + ptr = __per_cpu_start; 68.1322 + for (i = 0; i < pcpu_num_used; ptr += block_size(pcpu_size[i]), i++) { 68.1323 +@@ -347,7 +352,8 @@ static int percpu_modinit(void) 68.1324 + } 68.1325 + __initcall(percpu_modinit); 68.1326 + #else /* ... !CONFIG_SMP */ 68.1327 +-static inline void *percpu_modalloc(unsigned long size, unsigned long align) 68.1328 ++static inline void *percpu_modalloc(unsigned long size, unsigned long align, 68.1329 ++ const char *name) 68.1330 + { 68.1331 + return NULL; 68.1332 + } 68.1333 +@@ -1554,7 +1560,8 @@ static struct module *load_module(void _ 68.1334 + if (pcpuindex) { 68.1335 + /* We have a special allocation for this section. */ 68.1336 + percpu = percpu_modalloc(sechdrs[pcpuindex].sh_size, 68.1337 +- sechdrs[pcpuindex].sh_addralign); 68.1338 ++ sechdrs[pcpuindex].sh_addralign, 68.1339 ++ mod->name); 68.1340 + if (!percpu) { 68.1341 + err = -ENOMEM; 68.1342 + goto free_mod; 68.1343 +diff --git a/lib/inflate.c b/lib/inflate.c 68.1344 +--- a/lib/inflate.c 68.1345 ++++ b/lib/inflate.c 68.1346 +@@ -326,7 +326,7 @@ DEBG("huft1 "); 68.1347 + { 68.1348 + *t = (struct huft *)NULL; 68.1349 + *m = 0; 68.1350 +- return 0; 68.1351 ++ return 2; 68.1352 + } 68.1353 + 68.1354 + DEBG("huft2 "); 68.1355 +@@ -374,6 +374,7 @@ DEBG("huft5 "); 68.1356 + if ((j = *p++) != 0) 68.1357 + v[x[j]++] = i; 68.1358 + } while (++i < n); 68.1359 ++ n = x[g]; /* set n to length of v */ 68.1360 + 68.1361 + DEBG("h6 "); 68.1362 + 68.1363 +@@ -410,12 +411,13 @@ DEBG1("1 "); 68.1364 + DEBG1("2 "); 68.1365 + f -= a + 1; /* deduct codes from patterns left */ 68.1366 + xp = c + k; 68.1367 +- while (++j < z) /* try smaller tables up to z bits */ 68.1368 +- { 68.1369 +- if ((f <<= 1) <= *++xp) 68.1370 +- break; /* enough codes to use up j bits */ 68.1371 +- f -= *xp; /* else deduct codes from patterns */ 68.1372 +- } 68.1373 ++ if (j < z) 68.1374 ++ while (++j < z) /* try smaller tables up to z bits */ 68.1375 ++ { 68.1376 ++ if ((f <<= 1) <= *++xp) 68.1377 ++ break; /* enough codes to use up j bits */ 68.1378 ++ f -= *xp; /* else deduct codes from patterns */ 68.1379 ++ } 68.1380 + } 68.1381 + DEBG1("3 "); 68.1382 + z = 1 << j; /* table entries for j-bit table */ 68.1383 +diff --git a/lib/zlib_inflate/inftrees.c b/lib/zlib_inflate/inftrees.c 68.1384 +--- a/lib/zlib_inflate/inftrees.c 68.1385 ++++ b/lib/zlib_inflate/inftrees.c 68.1386 +@@ -141,7 +141,7 @@ static int huft_build( 68.1387 + { 68.1388 + *t = NULL; 68.1389 + *m = 0; 68.1390 +- return Z_OK; 68.1391 ++ return Z_DATA_ERROR; 68.1392 + } 68.1393 + 68.1394 + 68.1395 +diff --git a/mm/memory.c b/mm/memory.c 68.1396 +--- a/mm/memory.c 68.1397 ++++ b/mm/memory.c 68.1398 +@@ -1164,7 +1164,7 @@ int remap_pfn_range(struct vm_area_struc 68.1399 + { 68.1400 + pgd_t *pgd; 68.1401 + unsigned long next; 68.1402 +- unsigned long end = addr + size; 68.1403 ++ unsigned long end = addr + PAGE_ALIGN(size); 68.1404 + struct mm_struct *mm = vma->vm_mm; 68.1405 + int err; 68.1406 + 68.1407 +diff --git a/mm/mempolicy.c b/mm/mempolicy.c 68.1408 +--- a/mm/mempolicy.c 68.1409 ++++ b/mm/mempolicy.c 68.1410 +@@ -409,7 +409,7 @@ asmlinkage long sys_set_mempolicy(int mo 68.1411 + struct mempolicy *new; 68.1412 + DECLARE_BITMAP(nodes, MAX_NUMNODES); 68.1413 + 68.1414 +- if (mode > MPOL_MAX) 68.1415 ++ if (mode < 0 || mode > MPOL_MAX) 68.1416 + return -EINVAL; 68.1417 + err = get_nodes(nodes, nmask, maxnode, mode); 68.1418 + if (err) 68.1419 +diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c 68.1420 +--- a/net/8021q/vlan.c 68.1421 ++++ b/net/8021q/vlan.c 68.1422 +@@ -578,6 +578,14 @@ static int vlan_device_event(struct noti 68.1423 + if (!vlandev) 68.1424 + continue; 68.1425 + 68.1426 ++ if (netif_carrier_ok(dev)) { 68.1427 ++ if (!netif_carrier_ok(vlandev)) 68.1428 ++ netif_carrier_on(vlandev); 68.1429 ++ } else { 68.1430 ++ if (netif_carrier_ok(vlandev)) 68.1431 ++ netif_carrier_off(vlandev); 68.1432 ++ } 68.1433 ++ 68.1434 + if ((vlandev->state & VLAN_LINK_STATE_MASK) != flgs) { 68.1435 + vlandev->state = (vlandev->state &~ VLAN_LINK_STATE_MASK) 68.1436 + | flgs; 68.1437 +diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c 68.1438 +--- a/net/ipv4/ip_output.c 68.1439 ++++ b/net/ipv4/ip_output.c 68.1440 +@@ -111,7 +111,6 @@ static int ip_dev_loopback_xmit(struct s 68.1441 + #ifdef CONFIG_NETFILTER_DEBUG 68.1442 + nf_debug_ip_loopback_xmit(newskb); 68.1443 + #endif 68.1444 +- nf_reset(newskb); 68.1445 + netif_rx(newskb); 68.1446 + return 0; 68.1447 + } 68.1448 +@@ -196,8 +195,6 @@ static inline int ip_finish_output2(stru 68.1449 + nf_debug_ip_finish_output2(skb); 68.1450 + #endif /*CONFIG_NETFILTER_DEBUG*/ 68.1451 + 68.1452 +- nf_reset(skb); 68.1453 +- 68.1454 + if (hh) { 68.1455 + int hh_alen; 68.1456 + 68.1457 +diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c 68.1458 +--- a/net/ipv4/netfilter/ip_conntrack_core.c 68.1459 ++++ b/net/ipv4/netfilter/ip_conntrack_core.c 68.1460 +@@ -1124,6 +1124,9 @@ void ip_conntrack_cleanup(void) 68.1461 + schedule(); 68.1462 + goto i_see_dead_people; 68.1463 + } 68.1464 ++ /* wait until all references to ip_conntrack_untracked are dropped */ 68.1465 ++ while (atomic_read(&ip_conntrack_untracked.ct_general.use) > 1) 68.1466 ++ schedule(); 68.1467 + 68.1468 + kmem_cache_destroy(ip_conntrack_cachep); 68.1469 + kmem_cache_destroy(ip_conntrack_expect_cachep); 68.1470 +diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c 68.1471 +--- a/net/ipv4/netfilter/ip_conntrack_standalone.c 68.1472 ++++ b/net/ipv4/netfilter/ip_conntrack_standalone.c 68.1473 +@@ -432,6 +432,13 @@ static unsigned int ip_conntrack_defrag( 68.1474 + const struct net_device *out, 68.1475 + int (*okfn)(struct sk_buff *)) 68.1476 + { 68.1477 ++#if !defined(CONFIG_IP_NF_NAT) && !defined(CONFIG_IP_NF_NAT_MODULE) 68.1478 ++ /* Previously seen (loopback)? Ignore. Do this before 68.1479 ++ fragment check. */ 68.1480 ++ if ((*pskb)->nfct) 68.1481 ++ return NF_ACCEPT; 68.1482 ++#endif 68.1483 ++ 68.1484 + /* Gather fragments. */ 68.1485 + if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) { 68.1486 + *pskb = ip_ct_gather_frags(*pskb, 68.1487 +diff --git a/net/ipv4/netfilter/ip_nat_proto_tcp.c b/net/ipv4/netfilter/ip_nat_proto_tcp.c 68.1488 +--- a/net/ipv4/netfilter/ip_nat_proto_tcp.c 68.1489 ++++ b/net/ipv4/netfilter/ip_nat_proto_tcp.c 68.1490 +@@ -40,7 +40,8 @@ tcp_unique_tuple(struct ip_conntrack_tup 68.1491 + enum ip_nat_manip_type maniptype, 68.1492 + const struct ip_conntrack *conntrack) 68.1493 + { 68.1494 +- static u_int16_t port, *portptr; 68.1495 ++ static u_int16_t port; 68.1496 ++ u_int16_t *portptr; 68.1497 + unsigned int range_size, min, i; 68.1498 + 68.1499 + if (maniptype == IP_NAT_MANIP_SRC) 68.1500 +diff --git a/net/ipv4/netfilter/ip_nat_proto_udp.c b/net/ipv4/netfilter/ip_nat_proto_udp.c 68.1501 +--- a/net/ipv4/netfilter/ip_nat_proto_udp.c 68.1502 ++++ b/net/ipv4/netfilter/ip_nat_proto_udp.c 68.1503 +@@ -41,7 +41,8 @@ udp_unique_tuple(struct ip_conntrack_tup 68.1504 + enum ip_nat_manip_type maniptype, 68.1505 + const struct ip_conntrack *conntrack) 68.1506 + { 68.1507 +- static u_int16_t port, *portptr; 68.1508 ++ static u_int16_t port; 68.1509 ++ u_int16_t *portptr; 68.1510 + unsigned int range_size, min, i; 68.1511 + 68.1512 + if (maniptype == IP_NAT_MANIP_SRC) 68.1513 +diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c 68.1514 +--- a/net/ipv6/netfilter/ip6_queue.c 68.1515 ++++ b/net/ipv6/netfilter/ip6_queue.c 68.1516 +@@ -76,7 +76,9 @@ static DECLARE_MUTEX(ipqnl_sem); 68.1517 + static void 68.1518 + ipq_issue_verdict(struct ipq_queue_entry *entry, int verdict) 68.1519 + { 68.1520 ++ local_bh_disable(); 68.1521 + nf_reinject(entry->skb, entry->info, verdict); 68.1522 ++ local_bh_enable(); 68.1523 + kfree(entry); 68.1524 + } 68.1525 + 68.1526 +diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c 68.1527 +--- a/net/netlink/af_netlink.c 68.1528 ++++ b/net/netlink/af_netlink.c 68.1529 +@@ -315,8 +315,8 @@ err: 68.1530 + static void netlink_remove(struct sock *sk) 68.1531 + { 68.1532 + netlink_table_grab(); 68.1533 +- nl_table[sk->sk_protocol].hash.entries--; 68.1534 +- sk_del_node_init(sk); 68.1535 ++ if (sk_del_node_init(sk)) 68.1536 ++ nl_table[sk->sk_protocol].hash.entries--; 68.1537 + if (nlk_sk(sk)->groups) 68.1538 + __sk_del_bind_node(sk); 68.1539 + netlink_table_ungrab(); 68.1540 +@@ -429,7 +429,12 @@ retry: 68.1541 + err = netlink_insert(sk, pid); 68.1542 + if (err == -EADDRINUSE) 68.1543 + goto retry; 68.1544 +- return 0; 68.1545 ++ 68.1546 ++ /* If 2 threads race to autobind, that is fine. */ 68.1547 ++ if (err == -EBUSY) 68.1548 ++ err = 0; 68.1549 ++ 68.1550 ++ return err; 68.1551 + } 68.1552 + 68.1553 + static inline int netlink_capable(struct socket *sock, unsigned int flag) 68.1554 +diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c 68.1555 +--- a/net/packet/af_packet.c 68.1556 ++++ b/net/packet/af_packet.c 68.1557 +@@ -274,6 +274,9 @@ static int packet_rcv_spkt(struct sk_buf 68.1558 + dst_release(skb->dst); 68.1559 + skb->dst = NULL; 68.1560 + 68.1561 ++ /* drop conntrack reference */ 68.1562 ++ nf_reset(skb); 68.1563 ++ 68.1564 + spkt = (struct sockaddr_pkt*)skb->cb; 68.1565 + 68.1566 + skb_push(skb, skb->data-skb->mac.raw); 68.1567 +@@ -517,6 +520,9 @@ static int packet_rcv(struct sk_buff *sk 68.1568 + dst_release(skb->dst); 68.1569 + skb->dst = NULL; 68.1570 + 68.1571 ++ /* drop conntrack reference */ 68.1572 ++ nf_reset(skb); 68.1573 ++ 68.1574 + spin_lock(&sk->sk_receive_queue.lock); 68.1575 + po->stats.tp_packets++; 68.1576 + __skb_queue_tail(&sk->sk_receive_queue, skb); 68.1577 +diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c 68.1578 +--- a/net/xfrm/xfrm_user.c 68.1579 ++++ b/net/xfrm/xfrm_user.c 68.1580 +@@ -1180,6 +1180,9 @@ static struct xfrm_policy *xfrm_compile_ 68.1581 + if (nr > XFRM_MAX_DEPTH) 68.1582 + return NULL; 68.1583 + 68.1584 ++ if (p->dir > XFRM_POLICY_OUT) 68.1585 ++ return NULL; 68.1586 ++ 68.1587 + xp = xfrm_policy_alloc(GFP_KERNEL); 68.1588 + if (xp == NULL) { 68.1589 + *dir = -ENOBUFS; 68.1590 +diff --git a/security/keys/keyring.c b/security/keys/keyring.c 68.1591 +--- a/security/keys/keyring.c 68.1592 ++++ b/security/keys/keyring.c 68.1593 +@@ -188,7 +188,11 @@ static void keyring_destroy(struct key * 68.1594 + 68.1595 + if (keyring->description) { 68.1596 + write_lock(&keyring_name_lock); 68.1597 +- list_del(&keyring->type_data.link); 68.1598 ++ 68.1599 ++ if (keyring->type_data.link.next != NULL && 68.1600 ++ !list_empty(&keyring->type_data.link)) 68.1601 ++ list_del(&keyring->type_data.link); 68.1602 ++ 68.1603 + write_unlock(&keyring_name_lock); 68.1604 + } 68.1605 + 68.1606 +diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c 68.1607 +--- a/security/keys/process_keys.c 68.1608 ++++ b/security/keys/process_keys.c 68.1609 +@@ -641,7 +641,7 @@ long join_session_keyring(const char *na 68.1610 + keyring = keyring_alloc(name, tsk->uid, tsk->gid, 0, NULL); 68.1611 + if (IS_ERR(keyring)) { 68.1612 + ret = PTR_ERR(keyring); 68.1613 +- goto error; 68.1614 ++ goto error2; 68.1615 + } 68.1616 + } 68.1617 + else if (IS_ERR(keyring)) {
72.1 --- a/tools/examples/Makefile Fri Aug 12 09:35:15 2005 -0800 72.2 +++ b/tools/examples/Makefile Mon Aug 15 10:32:29 2005 -0800 72.3 @@ -16,7 +16,7 @@ XEN_CONFIGS += xmexample.vmx 72.4 72.5 # Xen script dir and scripts to go there. 72.6 XEN_SCRIPT_DIR = /etc/xen/scripts 72.7 -XEN_SCRIPTS = network vif-bridge 72.8 +XEN_SCRIPTS = network-bridge vif-bridge 72.9 XEN_SCRIPTS += network-route vif-route 72.10 XEN_SCRIPTS += block-file 72.11 XEN_SCRIPTS += block-enbd
73.1 --- a/tools/examples/network Fri Aug 12 09:35:15 2005 -0800 73.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 73.3 @@ -1,246 +0,0 @@ 73.4 -#!/bin/sh 73.5 -#============================================================================ 73.6 -# Default Xen network start/stop script. 73.7 -# Xend calls a network script when it starts. 73.8 -# The script name to use is defined in /etc/xen/xend-config.sxp 73.9 -# in the network-script field. 73.10 -# 73.11 -# This script creates a bridge (default xen-br0), adds a device 73.12 -# (default eth0) to it, copies the IP addresses from the device 73.13 -# to the bridge and adjusts the routes accordingly. 73.14 -# 73.15 -# If all goes well, this should ensure that networking stays up. 73.16 -# However, some configurations are upset by this, especially 73.17 -# NFS roots. If the bridged setup does not meet your needs, 73.18 -# configure a different script, for example using routing instead. 73.19 -# 73.20 -# Usage: 73.21 -# 73.22 -# network (start|stop|status) {VAR=VAL}* 73.23 -# 73.24 -# Vars: 73.25 -# 73.26 -# bridge The bridge to use (default xen-br0). 73.27 -# netdev The interface to add to the bridge (default eth0). 73.28 -# antispoof Whether to use iptables to prevent spoofing (default yes). 73.29 -# 73.30 -# start: 73.31 -# Creates the bridge and enslaves netdev to it. 73.32 -# Copies the IP addresses from netdev to the bridge. 73.33 -# Deletes the routes to netdev and adds them on bridge. 73.34 -# 73.35 -# stop: 73.36 -# Removes netdev from the bridge. 73.37 -# Deletes the routes to bridge and adds them to netdev. 73.38 -# 73.39 -# status: 73.40 -# Print ifconfig for netdev and bridge. 73.41 -# Print routes. 73.42 -# 73.43 -#============================================================================ 73.44 - 73.45 -# Exit if anything goes wrong. 73.46 -set -e 73.47 - 73.48 -# First arg is the operation. 73.49 -OP=$1 73.50 -shift 73.51 - 73.52 -# Pull variables in args in to environment. 73.53 -for arg ; do export "${arg}" ; done 73.54 - 73.55 -bridge=${bridge:-xen-br0} 73.56 -netdev=${netdev:-eth0} 73.57 -antispoof=${antispoof:-yes} 73.58 - 73.59 -echo "*network $OP bridge=$bridge netdev=$netdev antispoof=$antispoof" >&2 73.60 - 73.61 -# Usage: transfer_addrs src dst 73.62 -# Copy all IP addresses (including aliases) from device $src to device $dst. 73.63 -transfer_addrs () { 73.64 - local src=$1 73.65 - local dst=$2 73.66 - # Don't bother if $dst already has IP addresses. 73.67 - if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then 73.68 - return 73.69 - fi 73.70 - # Address lines start with 'inet' and have the device in them. 73.71 - # Replace 'inet' with 'ip addr add' and change the device name $src 73.72 - # to 'dev $src'. 73.73 - ip addr show dev ${src} | egrep '^ *inet ' | sed -e " 73.74 -s/inet/ip addr add/ 73.75 -s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@ 73.76 -s/${src}/dev ${dst}/ 73.77 -" | sh -e 73.78 - # Remove automatic routes on destionation device 73.79 - ip route list | sed -ne " 73.80 -/dev ${dst}\( \|$\)/ { 73.81 - s/^/ip route del / 73.82 - p 73.83 -}" | sh -e 73.84 -} 73.85 - 73.86 -# Usage: del_addrs src 73.87 -del_addrs () { 73.88 - local src=$1 73.89 - ip addr show dev ${src} | egrep '^ *inet ' | sed -e " 73.90 -s/inet/ip addr del/ 73.91 -s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@ 73.92 -s/${src}/dev ${src}/ 73.93 -" | sh -e 73.94 -} 73.95 - 73.96 -# Usage: transfer_routes src dst 73.97 -# Get all IP routes to device $src, delete them, and 73.98 -# add the same routes to device $dst. 73.99 -# The original routes have to be deleted, otherwise adding them 73.100 -# for $dst fails (duplicate routes). 73.101 -transfer_routes () { 73.102 - local src=$1 73.103 - local dst=$2 73.104 - # List all routes and grep the ones with $src in. 73.105 - # Stick 'ip route del' on the front to delete. 73.106 - # Change $src to $dst and use 'ip route add' to add. 73.107 - ip route list | sed -ne " 73.108 -/dev ${src}\( \|$\)/ { 73.109 - h 73.110 - s/^/ip route del / 73.111 - P 73.112 - g 73.113 - s/${src}/${dst}/ 73.114 - s/^/ip route add / 73.115 - P 73.116 - d 73.117 -}" | sh -e 73.118 -} 73.119 - 73.120 -# Usage: create_bridge bridge 73.121 -create_bridge () { 73.122 - local bridge=$1 73.123 - 73.124 - # Don't create the bridge if it already exists. 73.125 - if ! brctl show | grep -q ${bridge} ; then 73.126 - brctl addbr ${bridge} 73.127 - brctl stp ${bridge} off 73.128 - brctl setfd ${bridge} 0 73.129 - fi 73.130 - ifconfig ${bridge} up 73.131 -} 73.132 - 73.133 -# Usage: add_to_bridge bridge dev 73.134 -add_to_bridge () { 73.135 - local bridge=$1 73.136 - local dev=$2 73.137 - # Don't add $dev to $bridge if it's already on a bridge. 73.138 - if ! brctl show | grep -q ${dev} ; then 73.139 - brctl addif ${bridge} ${dev} 73.140 - fi 73.141 -} 73.142 - 73.143 -# Usage: antispoofing dev bridge 73.144 -# Set the default forwarding policy for $dev to drop. 73.145 -# Allow forwarding to the bridge. 73.146 -antispoofing () { 73.147 - local dev=$1 73.148 - local bridge=$2 73.149 - 73.150 - iptables -P FORWARD DROP 73.151 - iptables -A FORWARD -m physdev --physdev-in ${dev} -j ACCEPT 73.152 -} 73.153 - 73.154 -# Usage: show_status dev bridge 73.155 -# Print ifconfig and routes. 73.156 -show_status () { 73.157 - local dev=$1 73.158 - local bridge=$2 73.159 - 73.160 - echo '============================================================' 73.161 - ifconfig ${dev} 73.162 - ifconfig ${bridge} 73.163 - echo ' ' 73.164 - ip route list 73.165 - echo ' ' 73.166 - route -n 73.167 - echo '============================================================' 73.168 -} 73.169 - 73.170 -op_start () { 73.171 - if [ "${bridge}" == "null" ] ; then 73.172 - return 73.173 - fi 73.174 - 73.175 - create_bridge ${bridge} 73.176 - 73.177 - if ifconfig 2>/dev/null | grep -q veth0 ; then 73.178 - return 73.179 - fi 73.180 - 73.181 - if ifconfig veth0 2>/dev/null | grep -q veth0 ; then 73.182 - # Propagate MAC address and ARP responsibilities to virtual interface. 73.183 - mac=`ifconfig ${netdev} | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'` 73.184 - ifconfig veth0 down 73.185 - ifconfig veth0 hw ether ${mac} 73.186 - ifconfig veth0 arp up 73.187 - transfer_addrs ${netdev} veth0 73.188 - transfer_routes ${netdev} veth0 73.189 - del_addrs ${netdev} 73.190 - ifconfig ${netdev} -arp down 73.191 - ifconfig ${netdev} hw ether fe:ff:ff:ff:ff:ff up 73.192 - # Bring up second half of virtual device and attach it to the bridge. 73.193 - ifconfig vif0.0 up 73.194 - add_to_bridge ${bridge} vif0.0 73.195 - else 73.196 - transfer_addrs ${netdev} ${bridge} 73.197 - transfer_routes ${netdev} ${bridge} 73.198 - fi 73.199 - 73.200 - # Attach the real interface to the bridge. 73.201 - add_to_bridge ${bridge} ${netdev} 73.202 - 73.203 - if [ ${antispoof} == 'yes' ] ; then 73.204 - antispoofing ${netdev} ${bridge} 73.205 - fi 73.206 -} 73.207 - 73.208 -op_stop () { 73.209 - if [ "${bridge}" == "null" ] ; then 73.210 - return 73.211 - fi 73.212 - 73.213 - brctl delif ${bridge} ${netdev} 73.214 - 73.215 - if ifconfig veth0 2>/dev/null | grep -q veth0 ; then 73.216 - brctl delif ${bridge} vif0.0 73.217 - ifconfig vif0.0 down 73.218 - mac=`ifconfig veth0 | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'` 73.219 - ifconfig ${netdev} down 73.220 - ifconfig ${netdev} hw ether ${mac} 73.221 - ifconfig ${netdev} arp up 73.222 - transfer_addrs veth0 ${netdev} 73.223 - transfer_routes veth0 ${netdev} 73.224 - del_addrs veth0 73.225 - ifconfig veth0 -arp down 73.226 - ifconfig veth0 hw ether 00:00:00:00:00:00 73.227 - else 73.228 - transfer_routes ${bridge} ${netdev} 73.229 - fi 73.230 -} 73.231 - 73.232 -case ${OP} in 73.233 - start) 73.234 - op_start 73.235 - ;; 73.236 - 73.237 - stop) 73.238 - op_stop 73.239 - ;; 73.240 - 73.241 - status) 73.242 - show_status ${netdev} ${bridge} 73.243 - ;; 73.244 - 73.245 - *) 73.246 - echo 'Unknown command: ' ${OP} >&2 73.247 - echo 'Valid commands are: start, stop, status' >&2 73.248 - exit 1 73.249 -esac
74.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 74.2 +++ b/tools/examples/network-bridge Mon Aug 15 10:32:29 2005 -0800 74.3 @@ -0,0 +1,260 @@ 74.4 +#!/bin/sh -x 74.5 +#============================================================================ 74.6 +# Default Xen network start/stop script. 74.7 +# Xend calls a network script when it starts. 74.8 +# The script name to use is defined in /etc/xen/xend-config.sxp 74.9 +# in the network-script field. 74.10 +# 74.11 +# This script creates a bridge (default xen-br0), adds a device 74.12 +# (default eth0) to it, copies the IP addresses from the device 74.13 +# to the bridge and adjusts the routes accordingly. 74.14 +# 74.15 +# If all goes well, this should ensure that networking stays up. 74.16 +# However, some configurations are upset by this, especially 74.17 +# NFS roots. If the bridged setup does not meet your needs, 74.18 +# configure a different script, for example using routing instead. 74.19 +# 74.20 +# Usage: 74.21 +# 74.22 +# network (start|stop|status) {VAR=VAL}* 74.23 +# 74.24 +# Vars: 74.25 +# 74.26 +# bridge The bridge to use (default xen-br0). 74.27 +# netdev The interface to add to the bridge (default eth0). 74.28 +# antispoof Whether to use iptables to prevent spoofing (default yes). 74.29 +# 74.30 +# start: 74.31 +# Creates the bridge and enslaves netdev to it. 74.32 +# Copies the IP addresses from netdev to the bridge. 74.33 +# Deletes the routes to netdev and adds them on bridge. 74.34 +# 74.35 +# stop: 74.36 +# Removes netdev from the bridge. 74.37 +# Deletes the routes to bridge and adds them to netdev. 74.38 +# 74.39 +# status: 74.40 +# Print ifconfig for netdev and bridge. 74.41 +# Print routes. 74.42 +# 74.43 +#============================================================================ 74.44 + 74.45 +# Exit if anything goes wrong. 74.46 +set -e 74.47 + 74.48 +# First arg is the operation. 74.49 +OP=$1 74.50 +shift 74.51 + 74.52 +# Pull variables in args in to environment. 74.53 +for arg ; do export "${arg}" ; done 74.54 + 74.55 +bridge=${bridge:-xen-br0} 74.56 +netdev=${netdev:-eth0} 74.57 +antispoof=${antispoof:-yes} 74.58 + 74.59 +echo "*network $OP bridge=$bridge netdev=$netdev antispoof=$antispoof" >&2 74.60 + 74.61 +# Usage: transfer_addrs src dst 74.62 +# Copy all IP addresses (including aliases) from device $src to device $dst. 74.63 +transfer_addrs () { 74.64 + local src=$1 74.65 + local dst=$2 74.66 + # Don't bother if $dst already has IP addresses. 74.67 + if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then 74.68 + return 74.69 + fi 74.70 + # Address lines start with 'inet' and have the device in them. 74.71 + # Replace 'inet' with 'ip addr add' and change the device name $src 74.72 + # to 'dev $src'. 74.73 + ip addr show dev ${src} | egrep '^ *inet ' | sed -e " 74.74 +s/inet/ip addr add/ 74.75 +s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@ 74.76 +s/${src}/dev ${dst}/ 74.77 +" | sh -e 74.78 + # Remove automatic routes on destionation device 74.79 + ip route list | sed -ne " 74.80 +/dev ${dst}\( \|$\)/ { 74.81 + s/^/ip route del / 74.82 + p 74.83 +}" | sh -e 74.84 +} 74.85 + 74.86 +# Usage: del_addrs src 74.87 +del_addrs () { 74.88 + local src=$1 74.89 + ip addr show dev ${src} | egrep '^ *inet ' | sed -e " 74.90 +s/inet/ip addr del/ 74.91 +s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@ 74.92 +s/${src}/dev ${src}/ 74.93 +" | sh -e 74.94 +} 74.95 + 74.96 +# Usage: transfer_routes src dst 74.97 +# Get all IP routes to device $src, delete them, and 74.98 +# add the same routes to device $dst. 74.99 +# The original routes have to be deleted, otherwise adding them 74.100 +# for $dst fails (duplicate routes). 74.101 +transfer_routes () { 74.102 + local src=$1 74.103 + local dst=$2 74.104 + # List all routes and grep the ones with $src in. 74.105 + # Stick 'ip route del' on the front to delete. 74.106 + # Change $src to $dst and use 'ip route add' to add. 74.107 + ip route list | sed -ne " 74.108 +/dev ${src}\( \|$\)/ { 74.109 + h 74.110 + s/^/ip route del / 74.111 + P 74.112 + g 74.113 + s/${src}/${dst}/ 74.114 + s/^/ip route add / 74.115 + P 74.116 + d 74.117 +}" | sh -e 74.118 +} 74.119 + 74.120 +# Usage: create_bridge bridge 74.121 +create_bridge () { 74.122 + local bridge=$1 74.123 + 74.124 + # Don't create the bridge if it already exists. 74.125 + if ! brctl show | grep -q ${bridge} ; then 74.126 + brctl addbr ${bridge} 74.127 + brctl stp ${bridge} off 74.128 + brctl setfd ${bridge} 0 74.129 + fi 74.130 + ifconfig ${bridge} up 74.131 +} 74.132 + 74.133 +# Usage: add_to_bridge bridge dev 74.134 +add_to_bridge () { 74.135 + local bridge=$1 74.136 + local dev=$2 74.137 + # Don't add $dev to $bridge if it's already on a bridge. 74.138 + if ! brctl show | grep -q ${dev} ; then 74.139 + brctl addif ${bridge} ${dev} 74.140 + fi 74.141 +} 74.142 + 74.143 +# Usage: antispoofing dev bridge 74.144 +# Set the default forwarding policy for $dev to drop. 74.145 +# Allow forwarding to the bridge. 74.146 +antispoofing () { 74.147 + local dev=$1 74.148 + local bridge=$2 74.149 + 74.150 + iptables -P FORWARD DROP 74.151 + iptables -A FORWARD -m physdev --physdev-in ${dev} -j ACCEPT 74.152 +} 74.153 + 74.154 +# Usage: show_status dev bridge 74.155 +# Print ifconfig and routes. 74.156 +show_status () { 74.157 + local dev=$1 74.158 + local bridge=$2 74.159 + 74.160 + echo '============================================================' 74.161 + ifconfig ${dev} 74.162 + ifconfig ${bridge} 74.163 + echo ' ' 74.164 + ip route list 74.165 + echo ' ' 74.166 + route -n 74.167 + echo '============================================================' 74.168 +} 74.169 + 74.170 +op_start () { 74.171 + if [ "${bridge}" == "null" ] ; then 74.172 + return 74.173 + fi 74.174 + 74.175 + create_bridge ${bridge} 74.176 + 74.177 + if ifconfig 2>/dev/null | grep -q veth0 ; then 74.178 + return 74.179 + fi 74.180 + 74.181 + if ifconfig veth0 2>/dev/null | grep -q veth0 ; then 74.182 + mac=`ifconfig ${netdev} | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'` 74.183 + if ! ifdown ${netdev} ; then 74.184 + # if ifup didn't work, see if we have an ip= on cmd line 74.185 + if egrep 'ip=[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:' /proc/cmdline ; 74.186 + then 74.187 + kip=`sed -e 's!.*ip=\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\):.*!\1!' /proc/cmdline` 74.188 + kmask=`sed -e 's!.*ip=[^:]*:[^:]*:[^:]*:\([^:]*\):.*!\1!' /proc/cmdline` 74.189 + kgate=`sed -e 's!.*ip=[^:]*:[^:]*:\([^:]*\):.*!\1!' /proc/cmdline` 74.190 + ifconfig ${netdev} 0.0.0.0 down 74.191 + fi 74.192 + fi 74.193 + ip link set ${netdev} name p${netdev} 74.194 + ip link set veth0 name eth0 74.195 + ifconfig p${netdev} -arp down 74.196 + ifconfig p${netdev} hw ether fe:ff:ff:ff:ff:ff 74.197 + ifconfig ${netdev} hw ether ${mac} 74.198 + add_to_bridge ${bridge} vif0.0 74.199 + add_to_bridge ${bridge} p${netdev} 74.200 + ip link set vif0.0 up 74.201 + ip link set p${netdev} up 74.202 + if ! ifup ${netdev} ; then 74.203 + if [ ${kip} ] ; then 74.204 + # use the addresses we grocked from /proc/cmdline 74.205 + ifconfig ${netdev} ${kip} 74.206 + [ ${kmask} ] && ifconfig ${netdev} netmask ${kmask} 74.207 + ifconfig ${netdev} up 74.208 + [ ${kgate} ] && ip route add default via ${kgate} 74.209 + fi 74.210 + fi 74.211 + else 74.212 + # old style without veth0 74.213 + transfer_addrs ${netdev} ${bridge} 74.214 + transfer_routes ${netdev} ${bridge} 74.215 + fi 74.216 + 74.217 + if [ ${antispoof} == 'yes' ] ; then 74.218 + antispoofing ${netdev} ${bridge} 74.219 + fi 74.220 +} 74.221 + 74.222 +op_stop () { 74.223 + if [ "${bridge}" == "null" ] ; then 74.224 + return 74.225 + fi 74.226 + 74.227 + brctl delif ${bridge} ${netdev} 74.228 + 74.229 + if ifconfig veth0 2>/dev/null | grep -q veth0 ; then 74.230 + brctl delif ${bridge} vif0.0 74.231 + ifconfig vif0.0 down 74.232 + mac=`ifconfig veth0 | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'` 74.233 + ifconfig ${netdev} down 74.234 + ifconfig ${netdev} hw ether ${mac} 74.235 + ifconfig ${netdev} arp up 74.236 + transfer_addrs veth0 ${netdev} 74.237 + transfer_routes veth0 ${netdev} 74.238 + del_addrs veth0 74.239 + ifconfig veth0 -arp down 74.240 + ifconfig veth0 hw ether 00:00:00:00:00:00 74.241 + else 74.242 + transfer_routes ${bridge} ${netdev} 74.243 + fi 74.244 +} 74.245 + 74.246 +case ${OP} in 74.247 + start) 74.248 + op_start 74.249 + ;; 74.250 + 74.251 + stop) 74.252 + op_stop 74.253 + ;; 74.254 + 74.255 + status) 74.256 + show_status ${netdev} ${bridge} 74.257 + ;; 74.258 + 74.259 + *) 74.260 + echo 'Unknown command: ' ${OP} >&2 74.261 + echo 'Valid commands are: start, stop, status' >&2 74.262 + exit 1 74.263 +esac
75.1 --- a/tools/examples/xend-config.sxp Fri Aug 12 09:35:15 2005 -0800 75.2 +++ b/tools/examples/xend-config.sxp Mon Aug 15 10:32:29 2005 -0800 75.3 @@ -28,7 +28,7 @@ 75.4 75.5 ## Use the following if VIF traffic is bridged. 75.6 # The script used to start/stop networking for xend. 75.7 -(network-script network) 75.8 +(network-script network-bridge) 75.9 # The default bridge that virtual interfaces should be connected to. 75.10 (vif-bridge xen-br0) 75.11 # The default script used to control virtual interfaces.
85.1 --- a/tools/libxc/xc_gnttab.c Fri Aug 12 09:35:15 2005 -0800 85.2 +++ b/tools/libxc/xc_gnttab.c Mon Aug 15 10:32:29 2005 -0800 85.3 @@ -50,7 +50,7 @@ int xc_gnttab_map_grant_ref(int 85.4 struct gnttab_map_grant_ref op; 85.5 int rc; 85.6 85.7 - op.host_virt_addr = host_virt_addr; 85.8 + op.host_addr = host_virt_addr; 85.9 op.dom = (domid_t)dom; 85.10 op.ref = ref; 85.11 op.flags = flags; 85.12 @@ -75,7 +75,7 @@ int xc_gnttab_unmap_grant_ref(int 85.13 struct gnttab_unmap_grant_ref op; 85.14 int rc; 85.15 85.16 - op.host_virt_addr = host_virt_addr; 85.17 + op.host_addr = host_virt_addr; 85.18 op.dev_bus_addr = dev_bus_addr; 85.19 op.handle = handle; 85.20
93.1 --- a/tools/python/setup.py Fri Aug 12 09:35:15 2005 -0800 93.2 +++ b/tools/python/setup.py Mon Aug 15 10:32:29 2005 -0800 93.3 @@ -17,7 +17,7 @@ library_dirs = [ XEN_ROOT + "/tools/libx 93.4 XEN_ROOT + "/tools/xenstore", 93.5 ] 93.6 93.7 -libraries = [ "xc", "xenstore" ] 93.8 +libraries = [ "xc", "xenstore-pic" ] 93.9 93.10 xc = Extension("xc", 93.11 extra_compile_args = extra_compile_args,
94.1 --- a/tools/python/xen/lowlevel/xu/xu.c Fri Aug 12 09:35:15 2005 -0800 94.2 +++ b/tools/python/xen/lowlevel/xu/xu.c Mon Aug 15 10:32:29 2005 -0800 94.3 @@ -655,7 +655,9 @@ static PyObject *xu_message_get_payload( 94.4 case TYPE(CMSG_NETIF_FE, CMSG_NETIF_FE_INTERFACE_CONNECT): 94.5 C2P(netif_fe_interface_connect_t, handle, Int, Long); 94.6 C2P(netif_fe_interface_connect_t, tx_shmem_frame, Int, Long); 94.7 + C2P(netif_fe_interface_connect_t, tx_shmem_ref, Int, Long); 94.8 C2P(netif_fe_interface_connect_t, rx_shmem_frame, Int, Long); 94.9 + C2P(netif_fe_interface_connect_t, rx_shmem_ref, Int, Long); 94.10 return dict; 94.11 case TYPE(CMSG_NETIF_FE, CMSG_NETIF_FE_INTERFACE_DISCONNECT): 94.12 C2P(netif_fe_interface_disconnect_t, handle, Int, Long); 94.13 @@ -681,7 +683,9 @@ static PyObject *xu_message_get_payload( 94.14 C2P(netif_be_connect_t, domid, Int, Long); 94.15 C2P(netif_be_connect_t, netif_handle, Int, Long); 94.16 C2P(netif_be_connect_t, tx_shmem_frame, Int, Long); 94.17 + C2P(netif_be_connect_t, tx_shmem_ref, Int, Long); 94.18 C2P(netif_be_connect_t, rx_shmem_frame, Int, Long); 94.19 + C2P(netif_be_connect_t, rx_shmem_ref, Int, Long); 94.20 C2P(netif_be_connect_t, evtchn, Int, Long); 94.21 C2P(netif_be_connect_t, status, Int, Long); 94.22 return dict; 94.23 @@ -903,8 +907,10 @@ static PyObject *xu_message_new(PyObject 94.24 P2C(netif_be_connect_t, domid, u32); 94.25 P2C(netif_be_connect_t, netif_handle, u32); 94.26 P2C(netif_be_connect_t, tx_shmem_frame, memory_t); 94.27 + P2C(netif_be_connect_t, tx_shmem_ref, u32); 94.28 P2C(netif_be_connect_t, rx_shmem_frame, memory_t); 94.29 - P2C(netif_be_connect_t, evtchn, u16); 94.30 + P2C(netif_be_connect_t, rx_shmem_ref, u32); 94.31 + P2C(netif_be_connect_t, evtchn, u16); 94.32 break; 94.33 case TYPE(CMSG_NETIF_BE, CMSG_NETIF_BE_DISCONNECT): 94.34 P2C(netif_be_disconnect_t, domid, u32);
98.1 --- a/tools/python/xen/xend/XendDomainInfo.py Fri Aug 12 09:35:15 2005 -0800 98.2 +++ b/tools/python/xen/xend/XendDomainInfo.py Mon Aug 15 10:32:29 2005 -0800 98.3 @@ -138,7 +138,7 @@ def dom_get(dom): 98.4 if domlist and dom == domlist[0]['dom']: 98.5 return domlist[0] 98.6 return None 98.7 - 98.8 + 98.9 class XendDomainInfo: 98.10 """Virtual machine object.""" 98.11 98.12 @@ -593,7 +593,7 @@ class XendDomainInfo: 98.13 def delete(self): 98.14 """Delete the vm's db. 98.15 """ 98.16 - if self.dom_get(self.id): 98.17 + if dom_get(self.id): 98.18 return 98.19 self.id = None 98.20 self.saveToDB(sync=True) 98.21 @@ -753,7 +753,7 @@ class XendDomainInfo: 98.22 @param dev_config: device configuration 98.23 """ 98.24 dev_type = sxp.name(dev_config) 98.25 - dev = self.createDevice(self, dev_config, change=True) 98.26 + dev = self.createDevice(dev_type, dev_config, change=True) 98.27 self.config.append(['device', dev.getConfig()]) 98.28 return dev.sxpr() 98.29
99.1 --- a/tools/python/xen/xend/XendRoot.py Fri Aug 12 09:35:15 2005 -0800 99.2 +++ b/tools/python/xen/xend/XendRoot.py Mon Aug 15 10:32:29 2005 -0800 99.3 @@ -315,7 +315,7 @@ class XendRoot: 99.4 return self.get_config_value('block-%s' % type, '') 99.5 99.6 def get_network_script(self): 99.7 - return self.get_config_value('network-script', 'network') 99.8 + return self.get_config_value('network-script', '') 99.9 99.10 def get_enable_dump(self): 99.11 return self.get_config_bool('enable-dump', 'no')
102.1 --- a/tools/python/xen/xend/server/controller.py Fri Aug 12 09:35:15 2005 -0800 102.2 +++ b/tools/python/xen/xend/server/controller.py Mon Aug 15 10:32:29 2005 -0800 102.3 @@ -142,7 +142,7 @@ class DevControllerTable: 102.4 def createDevController(self, type, vm, recreate=False): 102.5 cls = self.getDevControllerClass(type) 102.6 if not cls: 102.7 - raise XendError("unknown device type: " + type) 102.8 + raise XendError("unknown device type: " + str(type)) 102.9 return cls.createDevController(vm, recreate=recreate) 102.10 102.11 def getDevControllerTable(): 102.12 @@ -283,6 +283,8 @@ class DevController: 102.13 dev.attach(recreate=recreate, change=change) 102.14 dev.exportToDB() 102.15 102.16 + return dev 102.17 + 102.18 def configureDevice(self, id, config, change=False): 102.19 """Reconfigure an existing device. 102.20 May be defined in subclass.""" 102.21 @@ -323,9 +325,9 @@ class DevController: 102.22 return self.destroyed 102.23 102.24 def getDevice(self, id, error=False): 102.25 - dev = self.devices.get(id) 102.26 + dev = self.devices.get(int(id)) 102.27 if error and not dev: 102.28 - raise XendError("invalid device id: " + id) 102.29 + raise XendError("invalid device id: " + str(id)) 102.30 return dev 102.31 102.32 def getDeviceIds(self):
103.1 --- a/tools/python/xen/xend/server/netif.py Fri Aug 12 09:35:15 2005 -0800 103.2 +++ b/tools/python/xen/xend/server/netif.py Mon Aug 15 10:32:29 2005 -0800 103.3 @@ -421,7 +421,9 @@ class NetDev(Dev): 103.4 'netif_handle' : self.vif, 103.5 'evtchn' : self.getEventChannelBackend(), 103.6 'tx_shmem_frame' : val['tx_shmem_frame'], 103.7 - 'rx_shmem_frame' : val['rx_shmem_frame'] }) 103.8 + 'tx_shmem_ref' : val['tx_shmem_ref'], 103.9 + 'rx_shmem_frame' : val['rx_shmem_frame'], 103.10 + 'rx_shmem_ref' : val['rx_shmem_ref'] }) 103.11 msg = self.backendChannel.requestResponse(msg) 103.12 #todo: check return status 103.13 self.status = NETIF_INTERFACE_STATUS_CONNECTED
106.1 --- a/tools/python/xen/xm/main.py Fri Aug 12 09:35:15 2005 -0800 106.2 +++ b/tools/python/xen/xm/main.py Mon Aug 15 10:32:29 2005 -0800 106.3 @@ -221,8 +221,9 @@ def xm_list(args): 106.4 domsinfo.append(parse_doms_info(info)) 106.5 106.6 if use_long: 106.7 - # this actually seems like a bad idea, as it just dumps sexp out 106.8 - PrettyPrint.prettyprint(info) 106.9 + for dom in doms: 106.10 + info = server.xend_domain(dom) 106.11 + PrettyPrint.prettyprint(info) 106.12 elif show_vcpus: 106.13 xm_show_vcpus(domsinfo) 106.14 else:
108.1 --- a/tools/xenstore/Makefile Fri Aug 12 09:35:15 2005 -0800 108.2 +++ b/tools/xenstore/Makefile Mon Aug 15 10:32:29 2005 -0800 108.3 @@ -24,7 +24,7 @@ TESTDIR = `pwd`/testsuite/tmp 108.4 TESTFLAGS= -DTESTING 108.5 TESTENV = XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR) 108.6 108.7 -all: xen xenstored libxenstore.so 108.8 +all: xen xenstored libxenstore.a libxenstore-pic.a 108.9 108.10 testcode: xen xs_test xenstored_test xs_random xs_dom0_test 108.11 108.12 @@ -53,14 +53,20 @@ xs_test_lib.o: xs.c 108.13 talloc_test.o: talloc.c 108.14 $(COMPILE.c) -o $@ $< 108.15 108.16 -libxenstore.so: xs.opic xs_lib.opic 108.17 - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so -shared -o $@ $^ 108.18 +LIB_OBJS := xs.o xs_lib.o 108.19 + 108.20 +LIB_OBJS_A := $(patsubst %.o,libxenstore.a(%.o),$(LIB_OBJS)) 108.21 +LIB_OBJS_PIC := $(patsubst %.o,libxenstore-pic.a(%.opic),$(LIB_OBJS)) 108.22 + 108.23 +libxenstore.a: $(LIB_OBJS_A) 108.24 + 108.25 +libxenstore-pic.a: $(LIB_OBJS_PIC) 108.26 108.27 clean: testsuite-clean 108.28 - rm -f *.o *.opic *.so 108.29 + rm -f *.o *.opic *.a 108.30 rm -f xen xenstored xs_random xs_stress xs_crashme 108.31 rm -f xs_test xenstored_test xs_dom0_test 108.32 - $(RM) $(PROG_DEP) 108.33 + -$(RM) $(PROG_DEP) 108.34 108.35 print-dir: 108.36 @echo -n tools/xenstore: 108.37 @@ -111,14 +117,15 @@ TAGS: 108.38 tarball: clean 108.39 cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/ 108.40 108.41 -install: xenstored libxenstore.so 108.42 +install: xenstored libxenstore.a libxenstore-pic.a 108.43 $(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored 108.44 $(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored 108.45 $(INSTALL_DIR) -p $(DESTDIR)/usr/sbin 108.46 $(INSTALL_DIR) -p $(DESTDIR)/usr/include 108.47 $(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin 108.48 $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR) 108.49 - $(INSTALL_DATA) libxenstore.so $(DESTDIR)/usr/$(LIBDIR) 108.50 + $(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR) 108.51 + $(INSTALL_DATA) libxenstore-pic.a $(DESTDIR)/usr/$(LIBDIR) 108.52 $(INSTALL_DATA) xs.h $(DESTDIR)/usr/include 108.53 $(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include 108.54
113.1 --- a/xen/Rules.mk Fri Aug 12 09:35:15 2005 -0800 113.2 +++ b/xen/Rules.mk Mon Aug 15 10:32:29 2005 -0800 113.3 @@ -2,7 +2,7 @@ 113.4 # If you change any of these configuration options then you must 113.5 # 'make clean' before rebuilding. 113.6 # 113.7 -verbose ?= n 113.8 +verbose ?= y 113.9 debug ?= n 113.10 perfc ?= n 113.11 perfc_arrays?= n
115.1 --- a/xen/arch/ia64/grant_table.c Fri Aug 12 09:35:15 2005 -0800 115.2 +++ b/xen/arch/ia64/grant_table.c Mon Aug 15 10:32:29 2005 -0800 115.3 @@ -355,7 +355,7 @@ static int 115.4 /* Bitwise-OR avoids short-circuiting which screws control flow. */ 115.5 if ( unlikely(__get_user(dom, &uop->dom) | 115.6 __get_user(ref, &uop->ref) | 115.7 - __get_user(host_virt_addr, &uop->host_virt_addr) | 115.8 + __get_user(host_virt_addr, &uop->host_addr) | 115.9 __get_user(dev_hst_ro_flags, &uop->flags)) ) 115.10 { 115.11 DPRINTK("Fault while reading gnttab_map_grant_ref_t.\n"); 115.12 @@ -500,7 +500,7 @@ static int 115.13 ld = current->domain; 115.14 115.15 /* Bitwise-OR avoids short-circuiting which screws control flow. */ 115.16 - if ( unlikely(__get_user(virt, &uop->host_virt_addr) | 115.17 + if ( unlikely(__get_user(virt, &uop->host_addr) | 115.18 __get_user(frame, &uop->dev_bus_addr) | 115.19 __get_user(handle, &uop->handle)) ) 115.20 {
117.1 --- a/xen/arch/ia64/xentime.c Fri Aug 12 09:35:15 2005 -0800 117.2 +++ b/xen/arch/ia64/xentime.c Mon Aug 15 10:32:29 2005 -0800 117.3 @@ -103,7 +103,7 @@ void update_dom_time(struct vcpu *v) 117.4 } 117.5 117.6 /* Set clock to <secs,usecs> after 00:00:00 UTC, 1 January, 1970. */ 117.7 -void do_settime(s64 secs, u32 nsecs, u64 system_time_base) 117.8 +void do_settime(unsigned long secs, unsigned long nsecs, u64 system_time_base) 117.9 { 117.10 #ifdef CONFIG_VTI 117.11 u64 _nsecs;
121.1 --- a/xen/arch/x86/mm.c Fri Aug 12 09:35:15 2005 -0800 121.2 +++ b/xen/arch/x86/mm.c Mon Aug 15 10:32:29 2005 -0800 121.3 @@ -736,7 +736,7 @@ static int create_pae_xen_mappings(l3_pg 121.4 pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + i] = 121.5 (l3e_get_flags(pl3e[i]) & _PAGE_PRESENT) ? 121.6 l2e_from_pfn(l3e_get_pfn(pl3e[i]), __PAGE_HYPERVISOR) : 121.7 - l2e_empty(); 121.8 + l2e_empty(); 121.9 unmap_domain_page(pl2e); 121.10 121.11 return 1; 121.12 @@ -764,7 +764,7 @@ static inline int l1_backptr( 121.13 unsigned long l2_backptr = l2_type & PGT_va_mask; 121.14 BUG_ON(l2_backptr == PGT_va_unknown); 121.15 121.16 - *backptr = ((l2_backptr >> PGT_va_shift) << L3_PAGETABLE_SHIFT) | 121.17 + *backptr = ((l2_backptr >> PGT_va_shift) << L3_PAGETABLE_SHIFT) | 121.18 (offset_in_l2 << L2_PAGETABLE_SHIFT); 121.19 return 1; 121.20 } 121.21 @@ -872,7 +872,7 @@ static int alloc_l3_table(struct pfn_inf 121.22 if ( !l2_backptr(&vaddr, i, type) ) 121.23 goto fail; 121.24 #else 121.25 - vaddr = (unsigned long)i << L3_PAGETABLE_SHIFT; 121.26 + vaddr = (unsigned long)i << L3_PAGETABLE_SHIFT; 121.27 #endif 121.28 if ( is_guest_l3_slot(i) && 121.29 unlikely(!get_page_from_l3e(pl3e[i], pfn, d, vaddr)) ) 121.30 @@ -1246,7 +1246,7 @@ static int mod_l4_entry(l4_pgentry_t *pl 121.31 if (!l4e_has_changed(ol4e, nl4e, _PAGE_PRESENT)) 121.32 return UPDATE_ENTRY(l4, pl4e, ol4e, nl4e); 121.33 121.34 - if ( unlikely(!l3_backptr(&vaddr, pgentry_ptr_to_slot(pl4e), type)) || 121.35 + if ( unlikely(!l3_backptr(&vaddr, pgentry_ptr_to_slot(pl4e), type)) || 121.36 unlikely(!get_page_from_l4e(nl4e, pfn, current->domain, vaddr)) ) 121.37 return 0; 121.38 121.39 @@ -2268,55 +2268,175 @@ int do_mmu_update( 121.40 return rc; 121.41 } 121.42 121.43 -/* This function assumes the caller is holding the domain's BIGLOCK 121.44 - * and is running in a shadow mode 121.45 - */ 121.46 -int update_grant_va_mapping(unsigned long va, 121.47 - l1_pgentry_t _nl1e, 121.48 - struct domain *d, 121.49 - struct vcpu *v) 121.50 + 121.51 +int update_grant_pte_mapping( 121.52 + unsigned long pte_addr, l1_pgentry_t _nl1e, 121.53 + struct domain *d, struct vcpu *v) 121.54 +{ 121.55 + int rc = GNTST_okay; 121.56 + void *va; 121.57 + unsigned long gpfn, mfn; 121.58 + struct pfn_info *page; 121.59 + u32 type_info; 121.60 + l1_pgentry_t ol1e; 121.61 + 121.62 + ASSERT(spin_is_locked(&d->big_lock)); 121.63 + ASSERT(!shadow_mode_refcounts(d)); 121.64 + ASSERT((l1e_get_flags(_nl1e) & L1_DISALLOW_MASK) == 0); 121.65 + 121.66 + gpfn = pte_addr >> PAGE_SHIFT; 121.67 + mfn = __gpfn_to_mfn(d, gpfn); 121.68 + 121.69 + if ( unlikely(!get_page_from_pagenr(mfn, current->domain)) ) 121.70 + { 121.71 + MEM_LOG("Could not get page for normal update"); 121.72 + return GNTST_general_error; 121.73 + } 121.74 + 121.75 + va = map_domain_page(mfn); 121.76 + va = (void *)((unsigned long)va + (pte_addr & ~PAGE_MASK)); 121.77 + page = pfn_to_page(mfn); 121.78 + 121.79 + type_info = page->u.inuse.type_info; 121.80 + if ( ((type_info & PGT_type_mask) != PGT_l1_page_table) || 121.81 + !get_page_type(page, type_info & (PGT_type_mask|PGT_va_mask)) ) 121.82 + { 121.83 + DPRINTK("Grant map attempted to update a non-L1 page\n"); 121.84 + rc = GNTST_general_error; 121.85 + goto failed; 121.86 + } 121.87 + 121.88 + if ( __copy_from_user(&ol1e, (l1_pgentry_t *)va, sizeof(ol1e)) || 121.89 + !update_l1e(va, ol1e, _nl1e) ) 121.90 + { 121.91 + put_page_type(page); 121.92 + rc = GNTST_general_error; 121.93 + goto failed; 121.94 + } 121.95 + 121.96 + put_page_from_l1e(ol1e, d); 121.97 + 121.98 + rc = (l1e_get_flags(ol1e) & _PAGE_PRESENT) ? GNTST_flush_all : GNTST_okay; 121.99 + 121.100 + if ( unlikely(shadow_mode_enabled(d)) ) 121.101 + { 121.102 + struct domain_mmap_cache sh_mapcache; 121.103 + domain_mmap_cache_init(&sh_mapcache); 121.104 + shadow_l1_normal_pt_update(d, pte_addr, _nl1e, &sh_mapcache); 121.105 + domain_mmap_cache_destroy(&sh_mapcache); 121.106 + } 121.107 + 121.108 + put_page_type(page); 121.109 + 121.110 + failed: 121.111 + unmap_domain_page(va); 121.112 + put_page(page); 121.113 + return rc; 121.114 +} 121.115 + 121.116 +int clear_grant_pte_mapping( 121.117 + unsigned long addr, unsigned long frame, struct domain *d) 121.118 { 121.119 - /* Caller must: 121.120 - * . own d's BIGLOCK 121.121 - * . already have 'get_page' correctly on the to-be-installed nl1e 121.122 - * . be responsible for flushing the TLB 121.123 - * . check PTE being installed isn't DISALLOWED 121.124 + int rc = GNTST_okay; 121.125 + void *va; 121.126 + unsigned long gpfn, mfn; 121.127 + struct pfn_info *page; 121.128 + u32 type_info; 121.129 + l1_pgentry_t ol1e; 121.130 + 121.131 + ASSERT(!shadow_mode_refcounts(d)); 121.132 + 121.133 + gpfn = addr >> PAGE_SHIFT; 121.134 + mfn = __gpfn_to_mfn(d, gpfn); 121.135 + 121.136 + if ( unlikely(!get_page_from_pagenr(mfn, current->domain)) ) 121.137 + { 121.138 + MEM_LOG("Could not get page for normal update"); 121.139 + return GNTST_general_error; 121.140 + } 121.141 + 121.142 + va = map_domain_page(mfn); 121.143 + va = (void *)((unsigned long)va + (addr & ~PAGE_MASK)); 121.144 + page = pfn_to_page(mfn); 121.145 + 121.146 + type_info = page->u.inuse.type_info; 121.147 + if ( ((type_info & PGT_type_mask) != PGT_l1_page_table) || 121.148 + !get_page_type(page, type_info & (PGT_type_mask|PGT_va_mask)) ) 121.149 + { 121.150 + DPRINTK("Grant map attempted to update a non-L1 page\n"); 121.151 + rc = GNTST_general_error; 121.152 + goto failed; 121.153 + } 121.154 + 121.155 + if ( __copy_from_user(&ol1e, (l1_pgentry_t *)va, sizeof(ol1e)) ) 121.156 + { 121.157 + put_page_type(page); 121.158 + rc = GNTST_general_error; 121.159 + goto failed; 121.160 + } 121.161 + 121.162 + /* Check that the virtual address supplied is actually mapped to frame. */ 121.163 + if ( unlikely((l1e_get_intpte(ol1e) >> PAGE_SHIFT) != frame) ) 121.164 + { 121.165 + DPRINTK("PTE entry %lx for address %lx doesn't match frame %lx\n", 121.166 + (unsigned long)l1e_get_intpte(ol1e), addr, frame); 121.167 + put_page_type(page); 121.168 + rc = GNTST_general_error; 121.169 + goto failed; 121.170 + } 121.171 + 121.172 + /* Delete pagetable entry. */ 121.173 + if ( unlikely(__put_user(0, (unsigned long *)va))) 121.174 + { 121.175 + DPRINTK("Cannot delete PTE entry at %p.\n", va); 121.176 + put_page_type(page); 121.177 + rc = GNTST_general_error; 121.178 + goto failed; 121.179 + } 121.180 + 121.181 + if ( unlikely(shadow_mode_enabled(d)) ) 121.182 + { 121.183 + struct domain_mmap_cache sh_mapcache; 121.184 + domain_mmap_cache_init(&sh_mapcache); 121.185 + shadow_l1_normal_pt_update(d, addr, l1e_empty(), &sh_mapcache); 121.186 + domain_mmap_cache_destroy(&sh_mapcache); 121.187 + } 121.188 + 121.189 + put_page_type(page); 121.190 + 121.191 + failed: 121.192 + unmap_domain_page(va); 121.193 + put_page(page); 121.194 + return rc; 121.195 +} 121.196 + 121.197 + 121.198 +int update_grant_va_mapping( 121.199 + unsigned long va, l1_pgentry_t _nl1e, struct domain *d, struct vcpu *v) 121.200 +{ 121.201 + int rc = GNTST_okay; 121.202 + l1_pgentry_t *pl1e, ol1e; 121.203 + 121.204 + ASSERT(spin_is_locked(&d->big_lock)); 121.205 + ASSERT(!shadow_mode_refcounts(d)); 121.206 + ASSERT((l1e_get_flags(_nl1e) & L1_DISALLOW_MASK) == 0); 121.207 + 121.208 + /* 121.209 + * This is actually overkill - we don't need to sync the L1 itself, 121.210 + * just everything involved in getting to this L1 (i.e. we need 121.211 + * linear_pg_table[l1_linear_offset(va)] to be in sync)... 121.212 */ 121.213 - 121.214 - int rc = 0; 121.215 - l1_pgentry_t *pl1e; 121.216 - l1_pgentry_t ol1e; 121.217 - 121.218 - cleanup_writable_pagetable(d); 121.219 - 121.220 - // This is actually overkill - we don't need to sync the L1 itself, 121.221 - // just everything involved in getting to this L1 (i.e. we need 121.222 - // linear_pg_table[l1_linear_offset(va)] to be in sync)... 121.223 - // 121.224 __shadow_sync_va(v, va); 121.225 121.226 pl1e = &linear_pg_table[l1_linear_offset(va)]; 121.227 121.228 - if ( unlikely(__copy_from_user(&ol1e, pl1e, sizeof(ol1e)) != 0) ) 121.229 - rc = -EINVAL; 121.230 - else if ( !shadow_mode_refcounts(d) ) 121.231 - { 121.232 - if ( update_l1e(pl1e, ol1e, _nl1e) ) 121.233 - { 121.234 - put_page_from_l1e(ol1e, d); 121.235 - if ( l1e_get_flags(ol1e) & _PAGE_PRESENT ) 121.236 - rc = 0; /* Caller needs to invalidate TLB entry */ 121.237 - else 121.238 - rc = 1; /* Caller need not invalidate TLB entry */ 121.239 - } 121.240 - else 121.241 - rc = -EINVAL; 121.242 - } 121.243 - else 121.244 - { 121.245 - printk("grant tables and shadow mode currently don't work together\n"); 121.246 - BUG(); 121.247 - } 121.248 + if ( unlikely(__copy_from_user(&ol1e, pl1e, sizeof(ol1e)) != 0) || 121.249 + !update_l1e(pl1e, ol1e, _nl1e) ) 121.250 + return GNTST_general_error; 121.251 + 121.252 + put_page_from_l1e(ol1e, d); 121.253 + 121.254 + rc = (l1e_get_flags(ol1e) & _PAGE_PRESENT) ? GNTST_flush_one : GNTST_okay; 121.255 121.256 if ( unlikely(shadow_mode_enabled(d)) ) 121.257 shadow_do_update_va_mapping(va, _nl1e, v); 121.258 @@ -2324,6 +2444,40 @@ int update_grant_va_mapping(unsigned lon 121.259 return rc; 121.260 } 121.261 121.262 +int clear_grant_va_mapping(unsigned long addr, unsigned long frame) 121.263 +{ 121.264 + l1_pgentry_t *pl1e; 121.265 + unsigned long _ol1e; 121.266 + 121.267 + pl1e = &linear_pg_table[l1_linear_offset(addr)]; 121.268 + 121.269 + if ( unlikely(__get_user(_ol1e, (unsigned long *)pl1e) != 0) ) 121.270 + { 121.271 + DPRINTK("Could not find PTE entry for address %lx\n", addr); 121.272 + return GNTST_general_error; 121.273 + } 121.274 + 121.275 + /* 121.276 + * Check that the virtual address supplied is actually mapped to 121.277 + * frame. 121.278 + */ 121.279 + if ( unlikely((_ol1e >> PAGE_SHIFT) != frame )) 121.280 + { 121.281 + DPRINTK("PTE entry %lx for address %lx doesn't match frame %lx\n", 121.282 + _ol1e, addr, frame); 121.283 + return GNTST_general_error; 121.284 + } 121.285 + 121.286 + /* Delete pagetable entry. */ 121.287 + if ( unlikely(__put_user(0, (unsigned long *)pl1e))) 121.288 + { 121.289 + DPRINTK("Cannot delete PTE entry at %p.\n", (unsigned long *)pl1e); 121.290 + return GNTST_general_error; 121.291 + } 121.292 + 121.293 + return 0; 121.294 +} 121.295 + 121.296 121.297 int do_update_va_mapping(unsigned long va, u64 val64, 121.298 unsigned long flags) 121.299 @@ -2358,10 +2512,11 @@ int do_update_va_mapping(unsigned long v 121.300 (shadow_mode_translate(d) || 121.301 shadow_mode_translate(percpu_info[cpu].foreign))) ) 121.302 { 121.303 - // The foreign domain's pfn's are in a different namespace. 121.304 - // There's not enough information in just a gpte to figure out 121.305 - // how to (re-)shadow this entry. 121.306 - // 121.307 + /* 121.308 + * The foreign domain's pfn's are in a different namespace. There's 121.309 + * not enough information in just a gpte to figure out how to 121.310 + * (re-)shadow this entry. 121.311 + */ 121.312 domain_crash(); 121.313 } 121.314 121.315 @@ -2616,7 +2771,7 @@ long do_update_descriptor(unsigned long 121.316 * Writable Pagetables 121.317 */ 121.318 121.319 -#ifdef VERBOSE 121.320 +#ifdef VVERBOSE 121.321 int ptwr_debug = 0x0; 121.322 #define PTWR_PRINTK(_f, _a...) \ 121.323 do { if ( unlikely(ptwr_debug) ) printk( _f , ## _a ); } while ( 0 ) 121.324 @@ -2625,6 +2780,122 @@ int ptwr_debug = 0x0; 121.325 #define PTWR_PRINTK(_f, _a...) ((void)0) 121.326 #endif 121.327 121.328 + 121.329 +#ifdef PERF_ARRAYS 121.330 + 121.331 +/**************** writeable pagetables profiling functions *****************/ 121.332 + 121.333 +#define ptwr_eip_buckets 256 121.334 + 121.335 +int ptwr_eip_stat_threshold[] = {1, 10, 50, 100, L1_PAGETABLE_ENTRIES}; 121.336 + 121.337 +#define ptwr_eip_stat_thresholdN (sizeof(ptwr_eip_stat_threshold)/sizeof(int)) 121.338 + 121.339 +struct { 121.340 + unsigned long eip; 121.341 + domid_t id; 121.342 + u32 val[ptwr_eip_stat_thresholdN]; 121.343 +} typedef ptwr_eip_stat_t; 121.344 + 121.345 +ptwr_eip_stat_t ptwr_eip_stats[ptwr_eip_buckets]; 121.346 + 121.347 +static inline unsigned int ptwr_eip_stat_hash( unsigned long eip, domid_t id ) 121.348 +{ 121.349 + return (((unsigned long) id) ^ eip ^ (eip>>8) ^ (eip>>16) ^ (eip>24)) % 121.350 + ptwr_eip_buckets; 121.351 +} 121.352 + 121.353 +static void ptwr_eip_stat_inc(u32 *n) 121.354 +{ 121.355 + int i, j; 121.356 + 121.357 + if ( ++(*n) != 0 ) 121.358 + return; 121.359 + 121.360 + *n = ~0; 121.361 + 121.362 + /* Re-scale all buckets. */ 121.363 + for ( i = 0; i <ptwr_eip_buckets; i++ ) 121.364 + for ( j = 0; j < ptwr_eip_stat_thresholdN; j++ ) 121.365 + ptwr_eip_stats[i].val[j] >>= 1; 121.366 +} 121.367 + 121.368 +static void ptwr_eip_stat_update(unsigned long eip, domid_t id, int modified) 121.369 +{ 121.370 + int i, j, b; 121.371 + 121.372 + i = b = ptwr_eip_stat_hash(eip, id); 121.373 + 121.374 + do 121.375 + { 121.376 + if ( !ptwr_eip_stats[i].eip ) 121.377 + { 121.378 + /* doesn't exist */ 121.379 + ptwr_eip_stats[i].eip = eip; 121.380 + ptwr_eip_stats[i].id = id; 121.381 + memset(ptwr_eip_stats[i].val,0, sizeof(ptwr_eip_stats[i].val)); 121.382 + } 121.383 + 121.384 + if ( ptwr_eip_stats[i].eip == eip ) 121.385 + { 121.386 + for ( j = 0; j < ptwr_eip_stat_thresholdN; j++ ) 121.387 + if ( modified <= ptwr_eip_stat_threshold[j] ) 121.388 + break; 121.389 + BUG_ON(j >= ptwr_eip_stat_thresholdN); 121.390 + ptwr_eip_stat_inc(&ptwr_eip_stats[i].val[j]); 121.391 + return; 121.392 + } 121.393 + 121.394 + i = (i+1) % ptwr_eip_buckets; 121.395 + } 121.396 + while ( i != b ); 121.397 + 121.398 + printk("ptwr_eip_stat: too many EIPs in use!\n"); 121.399 + 121.400 + ptwr_eip_stat_print(); 121.401 + ptwr_eip_stat_reset(); 121.402 +} 121.403 + 121.404 +void ptwr_eip_stat_reset(void) 121.405 +{ 121.406 + memset(ptwr_eip_stats, 0, sizeof(ptwr_eip_stats)); 121.407 +} 121.408 + 121.409 +void ptwr_eip_stat_print(void) 121.410 +{ 121.411 + struct domain *e; 121.412 + domid_t d; 121.413 + int i, j; 121.414 + 121.415 + for_each_domain( e ) 121.416 + { 121.417 + d = e->domain_id; 121.418 + 121.419 + for ( i = 0; i < ptwr_eip_buckets; i++ ) 121.420 + { 121.421 + if ( ptwr_eip_stats[i].eip && ptwr_eip_stats[i].id != d ) 121.422 + continue; 121.423 + 121.424 + printk("D %d eip %08lx ", 121.425 + ptwr_eip_stats[i].id, ptwr_eip_stats[i].eip); 121.426 + 121.427 + for ( j = 0; j < ptwr_eip_stat_thresholdN; j++ ) 121.428 + printk("<=%u %4u \t", 121.429 + ptwr_eip_stat_threshold[j], 121.430 + ptwr_eip_stats[i].val[j]); 121.431 + printk("\n"); 121.432 + } 121.433 + } 121.434 +} 121.435 + 121.436 +#else /* PERF_ARRAYS */ 121.437 + 121.438 +#define ptwr_eip_stat_update(eip, id, modified) ((void)0) 121.439 + 121.440 +#endif 121.441 + 121.442 +/*******************************************************************/ 121.443 + 121.444 /* Re-validate a given p.t. page, given its prior snapshot */ 121.445 int revalidate_l1( 121.446 struct domain *d, l1_pgentry_t *l1page, l1_pgentry_t *snapshot) 121.447 @@ -2677,8 +2948,8 @@ int revalidate_l1( 121.448 /* Flush the given writable p.t. page and write-protect it again. */ 121.449 void ptwr_flush(struct domain *d, const int which) 121.450 { 121.451 - unsigned long pte, *ptep, l1va; 121.452 - l1_pgentry_t *pl1e; 121.453 + unsigned long l1va; 121.454 + l1_pgentry_t *pl1e, pte, *ptep; 121.455 l2_pgentry_t *pl2e; 121.456 unsigned int modified; 121.457 121.458 @@ -2698,13 +2969,13 @@ void ptwr_flush(struct domain *d, const 121.459 TOGGLE_MODE(); 121.460 121.461 l1va = d->arch.ptwr[which].l1va; 121.462 - ptep = (unsigned long *)&linear_pg_table[l1_linear_offset(l1va)]; 121.463 + ptep = (l1_pgentry_t *)&linear_pg_table[l1_linear_offset(l1va)]; 121.464 121.465 /* 121.466 * STEP 1. Write-protect the p.t. page so no more updates can occur. 121.467 */ 121.468 121.469 - if ( unlikely(__get_user(pte, ptep)) ) 121.470 + if ( unlikely(__get_user(pte.l1, &ptep->l1)) ) 121.471 { 121.472 MEM_LOG("ptwr: Could not read pte at %p", ptep); 121.473 /* 121.474 @@ -2713,9 +2984,9 @@ void ptwr_flush(struct domain *d, const 121.475 */ 121.476 BUG(); 121.477 } 121.478 - PTWR_PRINTK("[%c] disconnected_l1va at %p is %lx\n", 121.479 - PTWR_PRINT_WHICH, ptep, pte); 121.480 - pte &= ~_PAGE_RW; 121.481 + PTWR_PRINTK("[%c] disconnected_l1va at %p is %"PRIpte"\n", 121.482 + PTWR_PRINT_WHICH, ptep, pte.l1); 121.483 + l1e_remove_flags(pte, _PAGE_RW); 121.484 121.485 /* Write-protect the p.t. page in the guest page table. */ 121.486 if ( unlikely(__put_user(pte, ptep)) ) 121.487 @@ -2731,8 +3002,8 @@ void ptwr_flush(struct domain *d, const 121.488 /* Ensure that there are no stale writable mappings in any TLB. */ 121.489 /* NB. INVLPG is a serialising instruction: flushes pending updates. */ 121.490 flush_tlb_one_mask(d->cpumask, l1va); 121.491 - PTWR_PRINTK("[%c] disconnected_l1va at %p now %lx\n", 121.492 - PTWR_PRINT_WHICH, ptep, pte); 121.493 + PTWR_PRINTK("[%c] disconnected_l1va at %p now %"PRIpte"\n", 121.494 + PTWR_PRINT_WHICH, ptep, pte.l1); 121.495 121.496 /* 121.497 * STEP 2. Validate any modified PTEs. 121.498 @@ -2742,6 +3013,7 @@ void ptwr_flush(struct domain *d, const 121.499 modified = revalidate_l1(d, pl1e, d->arch.ptwr[which].page); 121.500 unmap_domain_page(pl1e); 121.501 perfc_incr_histo(wpt_updates, modified, PT_UPDATES); 121.502 + ptwr_eip_stat_update( d->arch.ptwr[which].eip, d->domain_id, modified); 121.503 d->arch.ptwr[which].prev_nr_updates = modified; 121.504 121.505 /* 121.506 @@ -2897,7 +3169,8 @@ static struct x86_mem_emulator ptwr_mem_ 121.507 }; 121.508 121.509 /* Write page fault handler: check if guest is trying to modify a PTE. */ 121.510 -int ptwr_do_page_fault(struct domain *d, unsigned long addr) 121.511 +int ptwr_do_page_fault(struct domain *d, unsigned long addr, 121.512 + struct cpu_user_regs *regs) 121.513 { 121.514 unsigned long pfn; 121.515 struct pfn_info *page; 121.516 @@ -2933,6 +3206,10 @@ int ptwr_do_page_fault(struct domain *d, 121.517 return 0; 121.518 } 121.519 121.520 +#if 0 /* Leave this in as useful for debugging */ 121.521 + goto emulate; 121.522 +#endif 121.523 + 121.524 /* Get the L2 index at which this L1 p.t. is always mapped. */ 121.525 l2_idx = page->u.inuse.type_info & PGT_va_mask; 121.526 if ( unlikely(l2_idx >= PGT_va_unknown) ) 121.527 @@ -3002,7 +3279,11 @@ int ptwr_do_page_fault(struct domain *d, 121.528 d->arch.ptwr[which].l1va = addr | 1; 121.529 d->arch.ptwr[which].l2_idx = l2_idx; 121.530 d->arch.ptwr[which].vcpu = current; 121.531 - 121.532 + 121.533 +#ifdef PERF_ARRAYS 121.534 + d->arch.ptwr[which].eip = regs->eip; 121.535 +#endif 121.536 + 121.537 /* For safety, disconnect the L1 p.t. page from current space. */ 121.538 if ( which == PTWR_PT_ACTIVE ) 121.539 {
123.1 --- a/xen/arch/x86/shadow.c Fri Aug 12 09:35:15 2005 -0800 123.2 +++ b/xen/arch/x86/shadow.c Mon Aug 15 10:32:29 2005 -0800 123.3 @@ -1578,7 +1578,7 @@ static inline int l1pte_write_fault( 123.4 123.5 if ( unlikely(!VALID_MFN(gmfn)) ) 123.6 { 123.7 - SH_LOG("l1pte_write_fault: invalid gpfn=%lx", gpfn); 123.8 + SH_VLOG("l1pte_write_fault: invalid gpfn=%lx", gpfn); 123.9 *spte_p = l1e_empty(); 123.10 return 0; 123.11 } 123.12 @@ -1612,7 +1612,7 @@ static inline int l1pte_read_fault( 123.13 123.14 if ( unlikely(!VALID_MFN(mfn)) ) 123.15 { 123.16 - SH_LOG("l1pte_read_fault: invalid gpfn=%lx", pfn); 123.17 + SH_VLOG("l1pte_read_fault: invalid gpfn=%lx", pfn); 123.18 *spte_p = l1e_empty(); 123.19 return 0; 123.20 }
124.1 --- a/xen/arch/x86/shadow32.c Fri Aug 12 09:35:15 2005 -0800 124.2 +++ b/xen/arch/x86/shadow32.c Mon Aug 15 10:32:29 2005 -0800 124.3 @@ -665,7 +665,7 @@ static void free_shadow_pages(struct dom 124.4 124.5 shadow_audit(d, 0); 124.6 124.7 - SH_LOG("Free shadow table."); 124.8 + SH_VLOG("Free shadow table."); 124.9 } 124.10 124.11 void shadow_mode_init(void) 124.12 @@ -1137,7 +1137,7 @@ static void free_shadow_ht_entries(struc 124.13 d->arch.shadow_ht_free = NULL; 124.14 124.15 ASSERT(d->arch.shadow_extras_count == 0); 124.16 - SH_LOG("freed extras, now %d", d->arch.shadow_extras_count); 124.17 + SH_VLOG("freed extras, now %d", d->arch.shadow_extras_count); 124.18 124.19 if ( d->arch.shadow_dirty_bitmap != NULL ) 124.20 {
125.1 --- a/xen/arch/x86/time.c Fri Aug 12 09:35:15 2005 -0800 125.2 +++ b/xen/arch/x86/time.c Mon Aug 15 10:32:29 2005 -0800 125.3 @@ -43,10 +43,7 @@ unsigned long hpet_address; 125.4 spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; 125.5 int timer_ack = 0; 125.6 unsigned long volatile jiffies; 125.7 - 125.8 -/* UTC time at system boot. */ 125.9 -static s64 wc_sec; 125.10 -static u32 wc_nsec; 125.11 +static u32 wc_sec, wc_nsec; /* UTC time at last 'time update'. */ 125.12 static spinlock_t wc_lock = SPIN_LOCK_UNLOCKED; 125.13 125.14 struct time_scale { 125.15 @@ -696,33 +693,18 @@ void update_dom_time(struct vcpu *v) 125.16 } 125.17 125.18 /* Set clock to <secs,usecs> after 00:00:00 UTC, 1 January, 1970. */ 125.19 -void do_settime(s64 secs, u32 nsecs, u64 system_time_base) 125.20 +void do_settime(unsigned long secs, unsigned long nsecs, u64 system_time_base) 125.21 { 125.22 - s64 x; 125.23 - u32 y; 125.24 + u64 x; 125.25 + u32 y, _wc_sec, _wc_nsec; 125.26 struct domain *d; 125.27 shared_info_t *s; 125.28 125.29 - x = (secs * 1000000000LL) + (u64)nsecs - system_time_base; 125.30 - if ( x < 0 ) 125.31 - { 125.32 - /* -ve UTC offset => -ve seconds, +ve nanoseconds. */ 125.33 - x = -x; 125.34 - y = do_div(x, 1000000000); 125.35 - x = -x; 125.36 - if ( y != 0 ) 125.37 - { 125.38 - y = 1000000000 - y; 125.39 - x--; 125.40 - } 125.41 - } 125.42 - else 125.43 - { 125.44 - y = do_div(x, 1000000000); 125.45 - } 125.46 + x = (secs * 1000000000ULL) + (u64)nsecs - system_time_base; 125.47 + y = do_div(x, 1000000000); 125.48 125.49 - wc_sec = x; 125.50 - wc_nsec = y; 125.51 + wc_sec = _wc_sec = (u32)x; 125.52 + wc_nsec = _wc_nsec = (u32)y; 125.53 125.54 read_lock(&domlist_lock); 125.55 spin_lock(&wc_lock); 125.56 @@ -731,8 +713,8 @@ void do_settime(s64 secs, u32 nsecs, u64 125.57 { 125.58 s = d->shared_info; 125.59 version_update_begin(&s->wc_version); 125.60 - s->wc_sec = x; 125.61 - s->wc_nsec = y; 125.62 + s->wc_sec = _wc_sec; 125.63 + s->wc_nsec = _wc_nsec; 125.64 version_update_end(&s->wc_version); 125.65 } 125.66
126.1 --- a/xen/arch/x86/traps.c Fri Aug 12 09:35:15 2005 -0800 126.2 +++ b/xen/arch/x86/traps.c Mon Aug 15 10:32:29 2005 -0800 126.3 @@ -438,7 +438,7 @@ asmlinkage int do_page_fault(struct cpu_ 126.4 && 126.5 KERNEL_MODE(v, regs) && 126.6 ((regs->error_code & 3) == 3) && /* write-protection fault */ 126.7 - ptwr_do_page_fault(d, addr) ) 126.8 + ptwr_do_page_fault(d, addr, regs) ) 126.9 { 126.10 UNLOCK_BIGLOCK(d); 126.11 return EXCRET_fault_fixed; 126.12 @@ -471,8 +471,6 @@ asmlinkage int do_page_fault(struct cpu_ 126.13 if ( likely((fixup = search_exception_table(regs->eip)) != 0) ) 126.14 { 126.15 perfc_incrc(copy_user_faults); 126.16 - if ( !shadow_mode_enabled(d) ) 126.17 - DPRINTK("Page fault: %p -> %p\n", _p(regs->eip), _p(fixup)); 126.18 regs->eip = fixup; 126.19 return 0; 126.20 }
133.1 --- a/xen/common/grant_table.c Fri Aug 12 09:35:15 2005 -0800 133.2 +++ b/xen/common/grant_table.c Mon Aug 15 10:32:29 2005 -0800 133.3 @@ -6,6 +6,8 @@ 133.4 * 133.5 * Copyright (c) 2005 Christopher Clark 133.6 * Copyright (c) 2004 K A Fraser 133.7 + * Copyright (c) 2005 Andrew Warfield 133.8 + * Modifications by Geoffrey Lefebvre are (c) Intel Research Cambridge 133.9 * 133.10 * This program is free software; you can redistribute it and/or modify 133.11 * it under the terms of the GNU General Public License as published by 133.12 @@ -50,7 +52,7 @@ get_maptrack_handle( 133.13 grant_table_t *t) 133.14 { 133.15 unsigned int h; 133.16 - if ( unlikely((h = t->maptrack_head) == t->maptrack_limit) ) 133.17 + if ( unlikely((h = t->maptrack_head) == (t->maptrack_limit - 1)) ) 133.18 return -1; 133.19 t->maptrack_head = t->maptrack[h].ref_and_flags >> MAPTRACK_REF_SHIFT; 133.20 t->map_count++; 133.21 @@ -73,7 +75,7 @@ static int 133.22 struct domain *granting_d, 133.23 grant_ref_t ref, 133.24 u16 dev_hst_ro_flags, 133.25 - unsigned long host_virt_addr, 133.26 + unsigned long addr, 133.27 unsigned long *pframe ) /* OUT */ 133.28 { 133.29 domid_t sdom; 133.30 @@ -95,7 +97,7 @@ static int 133.31 * Returns: 133.32 * . -ve: error 133.33 * . 1: ok 133.34 - * . 0: ok and TLB invalidate of host_virt_addr needed. 133.35 + * . 0: ok and TLB invalidate of host_addr needed. 133.36 * 133.37 * On success, *pframe contains mfn. 133.38 */ 133.39 @@ -121,6 +123,10 @@ static int 133.40 sflags = sha->flags; 133.41 sdom = sha->domid; 133.42 133.43 + /* This loop attempts to set the access (reading/writing) flags 133.44 + * in the grant table entry. It tries a cmpxchg on the field 133.45 + * up to five times, and then fails under the assumption that 133.46 + * the guest is misbehaving. */ 133.47 for ( ; ; ) 133.48 { 133.49 u32 scombo, prev_scombo, new_scombo; 133.50 @@ -253,28 +259,32 @@ static int 133.51 133.52 /* 133.53 * At this point: 133.54 - * act->pin updated to reflect mapping. 133.55 + * act->pin updated to reference count mappings. 133.56 * sha->flags updated to indicate to granting domain mapping done. 133.57 * frame contains the mfn. 133.58 */ 133.59 133.60 spin_unlock(&granting_d->grant_table->lock); 133.61 133.62 - if ( (host_virt_addr != 0) && (dev_hst_ro_flags & GNTMAP_host_map) ) 133.63 + if ( (addr != 0) && (dev_hst_ro_flags & GNTMAP_host_map) ) 133.64 { 133.65 /* Write update into the pagetable. */ 133.66 l1_pgentry_t pte; 133.67 pte = l1e_from_pfn(frame, GRANT_PTE_FLAGS); 133.68 + 133.69 + if ( (dev_hst_ro_flags & GNTMAP_application_map) ) 133.70 + l1e_add_flags(pte,_PAGE_USER); 133.71 if ( !(dev_hst_ro_flags & GNTMAP_readonly) ) 133.72 l1e_add_flags(pte,_PAGE_RW); 133.73 - rc = update_grant_va_mapping( host_virt_addr, pte, 133.74 - mapping_d, mapping_ed ); 133.75 133.76 - /* 133.77 - * IMPORTANT: (rc == 0) => must flush / invalidate entry in TLB. 133.78 - * This is done in the outer gnttab_map_grant_ref. 133.79 - */ 133.80 + if ( dev_hst_ro_flags & GNTMAP_contains_pte ) 133.81 + rc = update_grant_pte_mapping(addr, pte, mapping_d, mapping_ed); 133.82 + else 133.83 + rc = update_grant_va_mapping(addr, pte, mapping_d, mapping_ed); 133.84 133.85 + /* IMPORTANT: rc indicates the degree of TLB flush that is required. 133.86 + * GNTST_flush_one (1) or GNTST_flush_all (2). This is done in the 133.87 + * outer gnttab_map_grant_ref. */ 133.88 if ( rc < 0 ) 133.89 { 133.90 /* Failure: undo and abort. */ 133.91 @@ -317,6 +327,9 @@ static int 133.92 /* 133.93 * Returns 0 if TLB flush / invalidate required by caller. 133.94 * va will indicate the address to be invalidated. 133.95 + * 133.96 + * addr is _either_ a host virtual address, or the address of the pte to 133.97 + * update, as indicated by the GNTMAP_contains_pte flag. 133.98 */ 133.99 static int 133.100 __gnttab_map_grant_ref( 133.101 @@ -326,10 +339,10 @@ static int 133.102 domid_t dom; 133.103 grant_ref_t ref; 133.104 struct domain *ld, *rd; 133.105 - struct vcpu *led; 133.106 + struct vcpu *led; 133.107 u16 dev_hst_ro_flags; 133.108 int handle; 133.109 - unsigned long frame = 0, host_virt_addr; 133.110 + unsigned long frame = 0, addr; 133.111 int rc; 133.112 133.113 led = current; 133.114 @@ -338,19 +351,20 @@ static int 133.115 /* Bitwise-OR avoids short-circuiting which screws control flow. */ 133.116 if ( unlikely(__get_user(dom, &uop->dom) | 133.117 __get_user(ref, &uop->ref) | 133.118 - __get_user(host_virt_addr, &uop->host_virt_addr) | 133.119 + __get_user(addr, &uop->host_addr) | 133.120 __get_user(dev_hst_ro_flags, &uop->flags)) ) 133.121 { 133.122 DPRINTK("Fault while reading gnttab_map_grant_ref_t.\n"); 133.123 return -EFAULT; /* don't set status */ 133.124 } 133.125 133.126 - 133.127 - if ( ((host_virt_addr != 0) || (dev_hst_ro_flags & GNTMAP_host_map)) && 133.128 - unlikely(!__addr_ok(host_virt_addr))) 133.129 + if ( (dev_hst_ro_flags & GNTMAP_host_map) && 133.130 + ( (addr == 0) || 133.131 + (!(dev_hst_ro_flags & GNTMAP_contains_pte) && 133.132 + unlikely(!__addr_ok(addr))) ) ) 133.133 { 133.134 DPRINTK("Bad virtual address (%lx) or flags (%x).\n", 133.135 - host_virt_addr, dev_hst_ro_flags); 133.136 + addr, dev_hst_ro_flags); 133.137 (void)__put_user(GNTST_bad_virt_addr, &uop->handle); 133.138 return GNTST_bad_gntref; 133.139 } 133.140 @@ -386,12 +400,20 @@ static int 133.141 grant_mapping_t *new_mt; 133.142 grant_table_t *lgt = ld->grant_table; 133.143 133.144 + if ( (lgt->maptrack_limit << 1) > MAPTRACK_MAX_ENTRIES ) 133.145 + { 133.146 + put_domain(rd); 133.147 + DPRINTK("Maptrack table is at maximum size.\n"); 133.148 + (void)__put_user(GNTST_no_device_space, &uop->handle); 133.149 + return GNTST_no_device_space; 133.150 + } 133.151 + 133.152 /* Grow the maptrack table. */ 133.153 new_mt = alloc_xenheap_pages(lgt->maptrack_order + 1); 133.154 if ( new_mt == NULL ) 133.155 { 133.156 put_domain(rd); 133.157 - DPRINTK("No more map handles available\n"); 133.158 + DPRINTK("No more map handles available.\n"); 133.159 (void)__put_user(GNTST_no_device_space, &uop->handle); 133.160 return GNTST_no_device_space; 133.161 } 133.162 @@ -405,7 +427,7 @@ static int 133.163 lgt->maptrack_order += 1; 133.164 lgt->maptrack_limit <<= 1; 133.165 133.166 - printk("Doubled maptrack size\n"); 133.167 + DPRINTK("Doubled maptrack size\n"); 133.168 handle = get_maptrack_handle(ld->grant_table); 133.169 } 133.170 133.171 @@ -416,7 +438,7 @@ static int 133.172 133.173 if ( 0 <= ( rc = __gnttab_activate_grant_ref( ld, led, rd, ref, 133.174 dev_hst_ro_flags, 133.175 - host_virt_addr, &frame))) 133.176 + addr, &frame))) 133.177 { 133.178 /* 133.179 * Only make the maptrack live _after_ writing the pte, in case we 133.180 @@ -430,8 +452,9 @@ static int 133.181 133.182 (void)__put_user(frame, &uop->dev_bus_addr); 133.183 133.184 - if ( dev_hst_ro_flags & GNTMAP_host_map ) 133.185 - *va = host_virt_addr; 133.186 + if ( ( dev_hst_ro_flags & GNTMAP_host_map ) && 133.187 + !( dev_hst_ro_flags & GNTMAP_contains_pte) ) 133.188 + *va = addr; 133.189 133.190 (void)__put_user(handle, &uop->handle); 133.191 } 133.192 @@ -449,12 +472,12 @@ static long 133.193 gnttab_map_grant_ref( 133.194 gnttab_map_grant_ref_t *uop, unsigned int count) 133.195 { 133.196 - int i, flush = 0; 133.197 + int i, rc, flush = 0; 133.198 unsigned long va = 0; 133.199 133.200 for ( i = 0; i < count; i++ ) 133.201 - if ( __gnttab_map_grant_ref(&uop[i], &va) == 0 ) 133.202 - flush++; 133.203 + if ( (rc =__gnttab_map_grant_ref(&uop[i], &va)) >= 0 ) 133.204 + flush += rc; 133.205 133.206 if ( flush == 1 ) 133.207 flush_tlb_one_mask(current->domain->cpumask, va); 133.208 @@ -479,12 +502,12 @@ static int 133.209 grant_mapping_t *map; 133.210 u16 flags; 133.211 s16 rc = 1; 133.212 - unsigned long frame, virt; 133.213 + unsigned long frame, addr; 133.214 133.215 ld = current->domain; 133.216 133.217 /* Bitwise-OR avoids short-circuiting which screws control flow. */ 133.218 - if ( unlikely(__get_user(virt, &uop->host_virt_addr) | 133.219 + if ( unlikely(__get_user(addr, &uop->host_addr) | 133.220 __get_user(frame, &uop->dev_bus_addr) | 133.221 __get_user(handle, &uop->handle)) ) 133.222 { 133.223 @@ -554,41 +577,19 @@ static int 133.224 /* Frame is now unmapped for device access. */ 133.225 } 133.226 133.227 - if ( (virt != 0) && 133.228 + if ( (addr != 0) && 133.229 (flags & GNTMAP_host_map) && 133.230 ((act->pin & (GNTPIN_hstw_mask | GNTPIN_hstr_mask)) > 0)) 133.231 { 133.232 - l1_pgentry_t *pl1e; 133.233 - unsigned long _ol1e; 133.234 - 133.235 - pl1e = &linear_pg_table[l1_linear_offset(virt)]; 133.236 - 133.237 - if ( unlikely(__get_user(_ol1e, (unsigned long *)pl1e) != 0) ) 133.238 + if ( flags & GNTMAP_contains_pte ) 133.239 { 133.240 - DPRINTK("Could not find PTE entry for address %lx\n", virt); 133.241 - rc = -EINVAL; 133.242 - goto unmap_out; 133.243 + if ( (rc = clear_grant_pte_mapping(addr, frame, ld)) < 0 ) 133.244 + goto unmap_out; 133.245 } 133.246 - 133.247 - /* 133.248 - * Check that the virtual address supplied is actually mapped to 133.249 - * act->frame. 133.250 - */ 133.251 - if ( unlikely((_ol1e >> PAGE_SHIFT) != frame )) 133.252 + else 133.253 { 133.254 - DPRINTK("PTE entry %lx for address %lx doesn't match frame %lx\n", 133.255 - _ol1e, virt, frame); 133.256 - rc = -EINVAL; 133.257 - goto unmap_out; 133.258 - } 133.259 - 133.260 - /* Delete pagetable entry. */ 133.261 - if ( unlikely(__put_user(0, (unsigned long *)pl1e))) 133.262 - { 133.263 - DPRINTK("Cannot delete PTE entry at %p for virtual address %lx\n", 133.264 - pl1e, virt); 133.265 - rc = -EINVAL; 133.266 - goto unmap_out; 133.267 + if ( (rc = clear_grant_va_mapping(addr, frame)) < 0 ) 133.268 + goto unmap_out; 133.269 } 133.270 133.271 map->ref_and_flags &= ~GNTMAP_host_map; 133.272 @@ -606,7 +607,8 @@ static int 133.273 } 133.274 133.275 rc = 0; 133.276 - *va = virt; 133.277 + if ( !( flags & GNTMAP_contains_pte) ) 133.278 + *va = addr; 133.279 } 133.280 133.281 if ( (map->ref_and_flags & (GNTMAP_device_map|GNTMAP_host_map)) == 0) 133.282 @@ -630,6 +632,7 @@ static int 133.283 133.284 if ( act->pin == 0 ) 133.285 { 133.286 + act->frame = 0xdeadbeef; 133.287 clear_bit(_GTF_reading, &sha->flags); 133.288 put_page(&frame_table[frame]); 133.289 } 133.290 @@ -768,7 +771,7 @@ gnttab_dump_table(gnttab_dump_table_t *u 133.291 if ( sha_copy.flags ) 133.292 { 133.293 DPRINTK("Grant: dom (%hu) SHARED (%d) flags:(%hx) " 133.294 - "dom:(%hu) frame:(%lx)\n", 133.295 + "dom:(%hu) frame:(%x)\n", 133.296 op.dom, i, sha_copy.flags, sha_copy.domid, sha_copy.frame); 133.297 } 133.298 } 133.299 @@ -822,18 +825,20 @@ gnttab_donate(gnttab_donate_t *uop, unsi 133.300 for (i = 0; i < count; i++) { 133.301 gnttab_donate_t *gop = &uop[i]; 133.302 #if GRANT_DEBUG 133.303 - printk("gnttab_donate: i=%d mfn=%08x domid=%d gref=%08x\n", 133.304 + printk("gnttab_donate: i=%d mfn=%lx domid=%d gref=%08x\n", 133.305 i, gop->mfn, gop->domid, gop->handle); 133.306 #endif 133.307 page = &frame_table[gop->mfn]; 133.308 - 133.309 + 133.310 if (unlikely(IS_XEN_HEAP_FRAME(page))) { 133.311 - printk("gnttab_donate: xen heap frame mfn=%lx\n", (unsigned long) gop->mfn); 133.312 + printk("gnttab_donate: xen heap frame mfn=%lx\n", 133.313 + (unsigned long) gop->mfn); 133.314 gop->status = GNTST_bad_virt_addr; 133.315 continue; 133.316 } 133.317 if (unlikely(!pfn_valid(page_to_pfn(page)))) { 133.318 - printk("gnttab_donate: invalid pfn for mfn=%lx\n", (unsigned long) gop->mfn); 133.319 + printk("gnttab_donate: invalid pfn for mfn=%lx\n", 133.320 + (unsigned long) gop->mfn); 133.321 gop->status = GNTST_bad_virt_addr; 133.322 continue; 133.323 } 133.324 @@ -859,7 +864,8 @@ gnttab_donate(gnttab_donate_t *uop, unsi 133.325 if (unlikely((x & (PGC_count_mask|PGC_allocated)) != 133.326 (1 | PGC_allocated)) || unlikely(_nd != _d)) { 133.327 printk("gnttab_donate: Bad page values %p: ed=%p(%u), sd=%p," 133.328 - " caf=%08x, taf=%" PRtype_info "\n", (void *) page_to_pfn(page), 133.329 + " caf=%08x, taf=%" PRtype_info "\n", 133.330 + (void *) page_to_pfn(page), 133.331 d, d->domain_id, unpickle_domptr(_nd), x, 133.332 page->u.inuse.type_info); 133.333 spin_unlock(&d->page_alloc_lock); 133.334 @@ -918,9 +924,9 @@ gnttab_donate(gnttab_donate_t *uop, unsi 133.335 if (unlikely(test_bit(DOMFLAGS_DYING, &e->domain_flags)) || 133.336 unlikely(e->tot_pages == e->max_pages) || 133.337 unlikely(!gnttab_prepare_for_transfer(e, d, gop->handle))) { 133.338 - printk("gnttab_donate: Transferee has no reservation headroom (%d,%d), or " 133.339 - "provided a bad grant ref (%08x), or is dying (%p).\n", 133.340 - e->tot_pages, e->max_pages, gop->handle, e->d_flags); 133.341 + printk("gnttab_donate: Transferee has no reservation headroom (%d," 133.342 + "%d) or provided a bad grant ref (%08x) or is dying (%p)\n", 133.343 + e->tot_pages, e->max_pages, gop->handle, e->d_flags); 133.344 spin_unlock(&e->page_alloc_lock); 133.345 put_domain(e); 133.346 result = GNTST_general_error; 133.347 @@ -933,9 +939,9 @@ gnttab_donate(gnttab_donate_t *uop, unsi 133.348 } 133.349 list_add_tail(&page->list, &e->page_list); 133.350 page_set_owner(page, e); 133.351 - 133.352 + 133.353 spin_unlock(&e->page_alloc_lock); 133.354 - 133.355 + 133.356 /* 133.357 * Transfer is all done: tell the guest about its new page 133.358 * frame. 133.359 @@ -943,7 +949,7 @@ gnttab_donate(gnttab_donate_t *uop, unsi 133.360 gnttab_notify_transfer(e, d, gop->handle, gop->mfn); 133.361 133.362 put_domain(e); 133.363 - 133.364 + 133.365 gop->status = GNTST_okay; 133.366 } 133.367 return result; 133.368 @@ -954,48 +960,53 @@ do_grant_table_op( 133.369 unsigned int cmd, void *uop, unsigned int count) 133.370 { 133.371 long rc; 133.372 - 133.373 + struct domain *d = current->domain; 133.374 + 133.375 if ( count > 512 ) 133.376 return -EINVAL; 133.377 - 133.378 - LOCK_BIGLOCK(current->domain); 133.379 - 133.380 + 133.381 + LOCK_BIGLOCK(d); 133.382 + 133.383 + sync_pagetable_state(d); 133.384 + 133.385 rc = -EFAULT; 133.386 switch ( cmd ) 133.387 - { 133.388 - case GNTTABOP_map_grant_ref: 133.389 - if ( unlikely(!array_access_ok( 133.390 - uop, count, sizeof(gnttab_map_grant_ref_t))) ) 133.391 - goto out; 133.392 - rc = gnttab_map_grant_ref((gnttab_map_grant_ref_t *)uop, count); 133.393 - break; 133.394 - case GNTTABOP_unmap_grant_ref: 133.395 - if ( unlikely(!array_access_ok( 133.396 - uop, count, sizeof(gnttab_unmap_grant_ref_t))) ) 133.397 - goto out; 133.398 - rc = gnttab_unmap_grant_ref((gnttab_unmap_grant_ref_t *)uop, count); 133.399 - break; 133.400 - case GNTTABOP_setup_table: 133.401 - rc = gnttab_setup_table((gnttab_setup_table_t *)uop, count); 133.402 - break; 133.403 + { 133.404 + case GNTTABOP_map_grant_ref: 133.405 + if ( unlikely(!array_access_ok( 133.406 + uop, count, sizeof(gnttab_map_grant_ref_t))) ) 133.407 + goto out; 133.408 + rc = gnttab_map_grant_ref((gnttab_map_grant_ref_t *)uop, count); 133.409 + break; 133.410 + case GNTTABOP_unmap_grant_ref: 133.411 + if ( unlikely(!array_access_ok( 133.412 + uop, count, sizeof(gnttab_unmap_grant_ref_t))) ) 133.413 + goto out; 133.414 + rc = gnttab_unmap_grant_ref((gnttab_unmap_grant_ref_t *)uop, 133.415 + count); 133.416 + break; 133.417 + case GNTTABOP_setup_table: 133.418 + rc = gnttab_setup_table((gnttab_setup_table_t *)uop, count); 133.419 + break; 133.420 #if GRANT_DEBUG 133.421 - case GNTTABOP_dump_table: 133.422 - rc = gnttab_dump_table((gnttab_dump_table_t *)uop); 133.423 - break; 133.424 + case GNTTABOP_dump_table: 133.425 + rc = gnttab_dump_table((gnttab_dump_table_t *)uop); 133.426 + break; 133.427 #endif 133.428 - case GNTTABOP_donate: 133.429 - if (unlikely(!array_access_ok(uop, count, sizeof(gnttab_donate_t)))) 133.430 - goto out; 133.431 - rc = gnttab_donate(uop, count); 133.432 - break; 133.433 - default: 133.434 - rc = -ENOSYS; 133.435 - break; 133.436 - } 133.437 - 133.438 -out: 133.439 - UNLOCK_BIGLOCK(current->domain); 133.440 - 133.441 + case GNTTABOP_donate: 133.442 + if (unlikely(!array_access_ok(uop, count, 133.443 + sizeof(gnttab_donate_t)))) 133.444 + goto out; 133.445 + rc = gnttab_donate(uop, count); 133.446 + break; 133.447 + default: 133.448 + rc = -ENOSYS; 133.449 + break; 133.450 + } 133.451 + 133.452 + out: 133.453 + UNLOCK_BIGLOCK(d); 133.454 + 133.455 return rc; 133.456 } 133.457 133.458 @@ -1009,106 +1020,101 @@ gnttab_check_unmap( 133.459 * Called a _lot_ at domain creation because pages mapped by priv domains 133.460 * also traverse this. 133.461 */ 133.462 - 133.463 + 133.464 /* Note: If the same frame is mapped multiple times, and then one of 133.465 * the ptes is overwritten, which maptrack handle gets invalidated? 133.466 * Advice: Don't do it. Explicitly unmap. 133.467 */ 133.468 - 133.469 + 133.470 unsigned int handle, ref, refcount; 133.471 grant_table_t *lgt, *rgt; 133.472 active_grant_entry_t *act; 133.473 grant_mapping_t *map; 133.474 int found = 0; 133.475 - 133.476 + 133.477 lgt = ld->grant_table; 133.478 - 133.479 + 133.480 #if GRANT_DEBUG_VERBOSE 133.481 - if ( ld->domain_id != 0 ) 133.482 - { 133.483 - DPRINTK("Foreign unref rd(%d) ld(%d) frm(%x) flgs(%x).\n", 133.484 - rd->domain_id, ld->domain_id, frame, readonly); 133.485 - } 133.486 + if ( ld->domain_ id != 0 ) { 133.487 + DPRINTK("Foreign unref rd(%d) ld(%d) frm(%lx) flgs(%x).\n", 133.488 + rd->domain_id, ld->domain_id, frame, readonly); 133.489 + } 133.490 #endif 133.491 - 133.492 + 133.493 /* Fast exit if we're not mapping anything using grant tables */ 133.494 if ( lgt->map_count == 0 ) 133.495 return 0; 133.496 - 133.497 - if ( get_domain(rd) == 0 ) 133.498 - { 133.499 + 133.500 + if ( get_domain(rd) == 0 ) { 133.501 DPRINTK("gnttab_check_unmap: couldn't get_domain rd(%d)\n", 133.502 rd->domain_id); 133.503 return 0; 133.504 } 133.505 - 133.506 + 133.507 rgt = rd->grant_table; 133.508 + 133.509 + for ( handle = 0; handle < lgt->maptrack_limit; handle++ ) { 133.510 133.511 - for ( handle = 0; handle < lgt->maptrack_limit; handle++ ) 133.512 - { 133.513 map = &lgt->maptrack[handle]; 133.514 - 133.515 + 133.516 if ( map->domid != rd->domain_id ) 133.517 continue; 133.518 - 133.519 + 133.520 if ( ( map->ref_and_flags & MAPTRACK_GNTMAP_MASK ) && 133.521 - ( readonly ? 1 : (!(map->ref_and_flags & GNTMAP_readonly)))) 133.522 - { 133.523 + ( readonly ? 1 : (!(map->ref_and_flags & GNTMAP_readonly)))) { 133.524 + 133.525 ref = (map->ref_and_flags >> MAPTRACK_REF_SHIFT); 133.526 act = &rgt->active[ref]; 133.527 - 133.528 + 133.529 spin_lock(&rgt->lock); 133.530 - 133.531 - if ( act->frame != frame ) 133.532 - { 133.533 + 133.534 + if ( act->frame != frame ) { 133.535 spin_unlock(&rgt->lock); 133.536 continue; 133.537 } 133.538 - 133.539 + 133.540 refcount = act->pin & ( readonly ? GNTPIN_hstr_mask 133.541 - : GNTPIN_hstw_mask ); 133.542 - if ( refcount == 0 ) 133.543 - { 133.544 + : GNTPIN_hstw_mask ); 133.545 + 133.546 + if ( refcount == 0 ) { 133.547 spin_unlock(&rgt->lock); 133.548 continue; 133.549 } 133.550 - 133.551 + 133.552 /* gotcha */ 133.553 DPRINTK("Grant unref rd(%d) ld(%d) frm(%lx) flgs(%x).\n", 133.554 rd->domain_id, ld->domain_id, frame, readonly); 133.555 - 133.556 + 133.557 if ( readonly ) 133.558 act->pin -= GNTPIN_hstr_inc; 133.559 - else 133.560 - { 133.561 + else { 133.562 act->pin -= GNTPIN_hstw_inc; 133.563 - 133.564 + 133.565 /* any more granted writable mappings? */ 133.566 - if ( (act->pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) == 0 ) 133.567 - { 133.568 + if ( (act->pin & (GNTPIN_hstw_mask|GNTPIN_devw_mask)) == 0 ) { 133.569 clear_bit(_GTF_writing, &rgt->shared[ref].flags); 133.570 put_page_type(&frame_table[frame]); 133.571 } 133.572 } 133.573 - 133.574 - if ( act->pin == 0 ) 133.575 - { 133.576 + 133.577 + if ( act->pin == 0 ) { 133.578 clear_bit(_GTF_reading, &rgt->shared[ref].flags); 133.579 put_page(&frame_table[frame]); 133.580 } 133.581 + 133.582 spin_unlock(&rgt->lock); 133.583 - 133.584 + 133.585 clear_bit(GNTMAP_host_map, &map->ref_and_flags); 133.586 - 133.587 + 133.588 if ( !(map->ref_and_flags & GNTMAP_device_map) ) 133.589 put_maptrack_handle(lgt, handle); 133.590 - 133.591 + 133.592 found = 1; 133.593 break; 133.594 } 133.595 } 133.596 put_domain(rd); 133.597 - 133.598 + 133.599 return found; 133.600 } 133.601 133.602 @@ -1124,8 +1130,10 @@ gnttab_prepare_for_transfer( 133.603 int retries = 0; 133.604 unsigned long target_pfn; 133.605 133.606 +#if GRANT_DEBUG_VERBOSE 133.607 DPRINTK("gnttab_prepare_for_transfer rd(%hu) ld(%hu) ref(%hu).\n", 133.608 rd->domain_id, ld->domain_id, ref); 133.609 +#endif 133.610 133.611 if ( unlikely((rgt = rd->grant_table) == NULL) || 133.612 unlikely(ref >= NR_GRANT_ENTRIES) ) 133.613 @@ -1203,8 +1211,10 @@ gnttab_notify_transfer( 133.614 grant_entry_t *sha; 133.615 unsigned long pfn; 133.616 133.617 +#if GRANT_DEBUG_VERBOSE 133.618 DPRINTK("gnttab_notify_transfer rd(%hu) ld(%hu) ref(%hu).\n", 133.619 rd->domain_id, ld->domain_id, ref); 133.620 +#endif 133.621 133.622 sha = &rd->grant_table->shared[ref]; 133.623
135.1 --- a/xen/common/perfc.c Fri Aug 12 09:35:15 2005 -0800 135.2 +++ b/xen/common/perfc.c Mon Aug 15 10:32:29 2005 -0800 135.3 @@ -7,6 +7,7 @@ 135.4 #include <xen/spinlock.h> 135.5 #include <public/dom0_ops.h> 135.6 #include <asm/uaccess.h> 135.7 +#include <xen/mm.h> 135.8 135.9 #undef PERFCOUNTER 135.10 #undef PERFCOUNTER_CPU 135.11 @@ -81,6 +82,10 @@ void perfc_printall(unsigned char key) 135.12 } 135.13 printk("\n"); 135.14 } 135.15 + 135.16 +#ifdef PERF_ARRAYS 135.17 + ptwr_eip_stat_print(); 135.18 +#endif 135.19 } 135.20 135.21 void perfc_reset(unsigned char key) 135.22 @@ -118,6 +123,10 @@ void perfc_reset(unsigned char key) 135.23 break; 135.24 } 135.25 } 135.26 + 135.27 +#ifdef PERF_ARRAYS 135.28 + ptwr_eip_stat_reset(); 135.29 +#endif 135.30 } 135.31 135.32 static dom0_perfc_desc_t perfc_d[NR_PERFCTRS];
137.1 --- a/xen/include/asm-x86/mm.h Fri Aug 12 09:35:15 2005 -0800 137.2 +++ b/xen/include/asm-x86/mm.h Mon Aug 15 10:32:29 2005 -0800 137.3 @@ -90,12 +90,9 @@ struct pfn_info 137.4 #define PGT_va_shift 32 137.5 #define PGT_va_mask ((unsigned long)((1U<<28)-1)<<PGT_va_shift) 137.6 /* Is the back pointer still mutable (i.e. not fixed yet)? */ 137.7 - /* Use PML4 slot for HYPERVISOR_VIRT_START. 137.8 - 18 = L4_PAGETABLE_SHIFT - L2_PAGETABLE_SHIFT */ 137.9 -#define PGT_va_mutable ((unsigned long)(256U<<18)<<PGT_va_shift) 137.10 +#define PGT_va_mutable ((unsigned long)((1U<<28)-1)<<PGT_va_shift) 137.11 /* Is the back pointer unknown (e.g., p.t. is mapped at multiple VAs)? */ 137.12 - /* Use PML4 slot for HYPERVISOR_VIRT_START + 1 */ 137.13 -#define PGT_va_unknown ((unsigned long)(257U<<18)<<PGT_va_shift) 137.14 +#define PGT_va_unknown ((unsigned long)((1U<<28)-2)<<PGT_va_shift) 137.15 #endif 137.16 137.17 /* 16-bit count of uses of this frame as its current type. */ 137.18 @@ -316,6 +313,9 @@ struct ptwr_info { 137.19 unsigned int prev_nr_updates; 137.20 /* Exec domain which created writable mapping. */ 137.21 struct vcpu *vcpu; 137.22 + /* EIP of the address which took the original write fault 137.23 + used for stats collection only */ 137.24 + unsigned long eip; 137.25 }; 137.26 137.27 #define PTWR_PT_ACTIVE 0 137.28 @@ -327,7 +327,8 @@ struct ptwr_info { 137.29 int ptwr_init(struct domain *); 137.30 void ptwr_destroy(struct domain *); 137.31 void ptwr_flush(struct domain *, const int); 137.32 -int ptwr_do_page_fault(struct domain *, unsigned long); 137.33 +int ptwr_do_page_fault(struct domain *, unsigned long, 137.34 + struct cpu_user_regs *); 137.35 int revalidate_l1(struct domain *, l1_pgentry_t *, l1_pgentry_t *); 137.36 137.37 void cleanup_writable_pagetable(struct domain *d); 137.38 @@ -353,6 +354,18 @@ void audit_domains(void); 137.39 137.40 #endif 137.41 137.42 +#ifdef PERF_ARRAYS 137.43 + 137.44 +void ptwr_eip_stat_reset(); 137.45 +void ptwr_eip_stat_print(); 137.46 + 137.47 +#else 137.48 + 137.49 +#define ptwr_eip_stat_reset() ((void)0) 137.50 +#define ptwr_eip_stat_print() ((void)0) 137.51 + 137.52 +#endif 137.53 + 137.54 int new_guest_cr3(unsigned long pfn); 137.55 137.56 void propagate_page_fault(unsigned long addr, u16 error_code); 137.57 @@ -361,8 +374,14 @@ void propagate_page_fault(unsigned long 137.58 * Caller must own d's BIGLOCK, is responsible for flushing the TLB, and must 137.59 * hold a reference to the page. 137.60 */ 137.61 -int update_grant_va_mapping(unsigned long va, 137.62 - l1_pgentry_t _nl1e, 137.63 - struct domain *d, 137.64 - struct vcpu *v); 137.65 +int update_grant_va_mapping( 137.66 + unsigned long va, l1_pgentry_t _nl1e, 137.67 + struct domain *d, struct vcpu *v); 137.68 +int update_grant_pte_mapping( 137.69 + unsigned long pte_addr, l1_pgentry_t _nl1e, 137.70 + struct domain *d, struct vcpu *v); 137.71 +int clear_grant_va_mapping(unsigned long addr, unsigned long frame); 137.72 +int clear_grant_pte_mapping( 137.73 + unsigned long addr, unsigned long frame, struct domain *d); 137.74 + 137.75 #endif /* __ASM_X86_MM_H__ */
139.1 --- a/xen/include/asm-x86/shadow.h Fri Aug 12 09:35:15 2005 -0800 139.2 +++ b/xen/include/asm-x86/shadow.h Mon Aug 15 10:32:29 2005 -0800 139.3 @@ -483,9 +483,9 @@ static inline int __mark_dirty(struct do 139.4 #ifndef NDEBUG 139.5 else if ( mfn < max_page ) 139.6 { 139.7 - SH_LOG("mark_dirty OOR! mfn=%x pfn=%lx max=%x (dom %p)", 139.8 + SH_VLOG("mark_dirty OOR! mfn=%x pfn=%lx max=%x (dom %p)", 139.9 mfn, pfn, d->arch.shadow_dirty_bitmap_size, d); 139.10 - SH_LOG("dom=%p caf=%08x taf=%" PRtype_info, 139.11 + SH_VLOG("dom=%p caf=%08x taf=%" PRtype_info, 139.12 page_get_owner(&frame_table[mfn]), 139.13 frame_table[mfn].count_info, 139.14 frame_table[mfn].u.inuse.type_info ); 139.15 @@ -736,7 +736,7 @@ static inline int l1pte_write_fault( 139.16 139.17 if ( unlikely(!VALID_MFN(gmfn)) ) 139.18 { 139.19 - SH_LOG("l1pte_write_fault: invalid gpfn=%lx", gpfn); 139.20 + SH_VLOG("l1pte_write_fault: invalid gpfn=%lx", gpfn); 139.21 *spte_p = l1e_empty(); 139.22 return 0; 139.23 } 139.24 @@ -770,7 +770,7 @@ static inline int l1pte_read_fault( 139.25 139.26 if ( unlikely(!VALID_MFN(mfn)) ) 139.27 { 139.28 - SH_LOG("l1pte_read_fault: invalid gpfn=%lx", pfn); 139.29 + SH_VLOG("l1pte_read_fault: invalid gpfn=%lx", pfn); 139.30 *spte_p = l1e_empty(); 139.31 return 0; 139.32 } 139.33 @@ -1472,7 +1472,7 @@ static inline void set_shadow_status( 139.34 /* We need to allocate a new node. Ensure the quicklist is non-empty. */ 139.35 if ( unlikely(d->arch.shadow_ht_free == NULL) ) 139.36 { 139.37 - SH_LOG("Allocate more shadow hashtable blocks."); 139.38 + SH_VLOG("Allocate more shadow hashtable blocks."); 139.39 139.40 extra = xmalloc_bytes( 139.41 sizeof(void *) + (shadow_ht_extra_size * sizeof(*x)));
144.1 --- a/xen/include/public/dom0_ops.h Fri Aug 12 09:35:15 2005 -0800 144.2 +++ b/xen/include/public/dom0_ops.h Mon Aug 15 10:32:29 2005 -0800 144.3 @@ -133,12 +133,11 @@ typedef struct { 144.4 /* 144.5 * Set clock such that it would read <secs,nsecs> after 00:00:00 UTC, 144.6 * 1 January, 1970 if the current system time was <system_time>. 144.7 - * NB. <secs> can be negative, but <nsecs> must always be non-negative. 144.8 */ 144.9 #define DOM0_SETTIME 17 144.10 typedef struct { 144.11 /* IN variables. */ 144.12 - s64 secs; 144.13 + u32 secs; 144.14 u32 nsecs; 144.15 u64 system_time; 144.16 } dom0_settime_t;
145.1 --- a/xen/include/public/grant_table.h Fri Aug 12 09:35:15 2005 -0800 145.2 +++ b/xen/include/public/grant_table.h Mon Aug 15 10:32:29 2005 -0800 145.3 @@ -142,7 +142,10 @@ typedef u16 grant_ref_t; 145.4 * 1. If GNTPIN_map_for_dev is specified then <dev_bus_addr> is the address 145.5 * via which I/O devices may access the granted frame. 145.6 * 2. If GNTPIN_map_for_host is specified then a mapping will be added at 145.7 - * virtual address <host_virt_addr> in the current address space. 145.8 + * either a host virtual address in the current address space, or at 145.9 + * a PTE at the specified machine address. The type of mapping to 145.10 + * perform is selected through the GNTMAP_contains_pte flag, and the 145.11 + * address is specified in <host_addr>. 145.12 * 3. Mappings should only be destroyed via GNTTABOP_unmap_grant_ref. If a 145.13 * host mapping is destroyed by other means then it is *NOT* guaranteed 145.14 * to be accounted to the correct grant reference! 145.15 @@ -150,7 +153,7 @@ typedef u16 grant_ref_t; 145.16 #define GNTTABOP_map_grant_ref 0 145.17 typedef struct gnttab_map_grant_ref { 145.18 /* IN parameters. */ 145.19 - memory_t host_virt_addr; 145.20 + memory_t host_addr; 145.21 domid_t dom; 145.22 grant_ref_t ref; 145.23 u16 flags; /* GNTMAP_* */ 145.24 @@ -161,7 +164,7 @@ typedef struct gnttab_map_grant_ref { 145.25 145.26 /* 145.27 * GNTTABOP_unmap_grant_ref: Destroy one or more grant-reference mappings 145.28 - * tracked by <handle>. If <host_virt_addr> or <dev_bus_addr> is zero, that 145.29 + * tracked by <handle>. If <host_addr> or <dev_bus_addr> is zero, that 145.30 * field is ignored. If non-zero, they must refer to a device/host mapping 145.31 * that is tracked by <handle> 145.32 * NOTES: 145.33 @@ -173,7 +176,7 @@ typedef struct gnttab_map_grant_ref { 145.34 #define GNTTABOP_unmap_grant_ref 1 145.35 typedef struct gnttab_unmap_grant_ref { 145.36 /* IN parameters. */ 145.37 - memory_t host_virt_addr; 145.38 + memory_t host_addr; 145.39 memory_t dev_bus_addr; 145.40 u16 handle; 145.41 /* OUT parameters. */ 145.42 @@ -247,10 +250,18 @@ typedef struct { 145.43 #define _GNTMAP_application_map (3) 145.44 #define GNTMAP_application_map (1<<_GNTMAP_application_map) 145.45 145.46 + /* 145.47 + * GNTMAP_contains_pte subflag: 145.48 + * 0 => This map request contains a host virtual address. 145.49 + * 1 => This map request contains the machine addess of the PTE to update. 145.50 + */ 145.51 +#define _GNTMAP_contains_pte (4) 145.52 +#define GNTMAP_contains_pte (1<<_GNTMAP_contains_pte) 145.53 + 145.54 /* 145.55 * Values for error status returns. All errors are -ve. 145.56 */ 145.57 -#define GNTST_okay (0) 145.58 +#define GNTST_okay (0) /* Normal return. */ 145.59 #define GNTST_general_error (-1) /* General undefined error. */ 145.60 #define GNTST_bad_domain (-2) /* Unrecognsed domain id. */ 145.61 #define GNTST_bad_gntref (-3) /* Unrecognised or inappropriate gntref. */
146.1 --- a/xen/include/public/io/domain_controller.h Fri Aug 12 09:35:15 2005 -0800 146.2 +++ b/xen/include/public/io/domain_controller.h Mon Aug 15 10:32:29 2005 -0800 146.3 @@ -365,8 +365,10 @@ typedef struct netif_fe_driver_status { 146.4 */ 146.5 typedef struct netif_fe_interface_connect { 146.6 u32 handle; 146.7 - memory_t tx_shmem_frame; 146.8 + memory_t tx_shmem_frame; 146.9 + int tx_shmem_ref; 146.10 memory_t rx_shmem_frame; 146.11 + int rx_shmem_ref; 146.12 } netif_fe_interface_connect_t; 146.13 146.14 /* 146.15 @@ -487,7 +489,9 @@ typedef struct netif_be_connect { 146.16 domid_t domid; /* Domain attached to new interface. */ 146.17 u32 netif_handle; /* Domain-specific interface handle. */ 146.18 memory_t tx_shmem_frame; /* Page cont. tx shared comms window. */ 146.19 + int tx_shmem_ref; /* Grant reference for above */ 146.20 memory_t rx_shmem_frame; /* Page cont. rx shared comms window. */ 146.21 + int rx_shmem_ref; /* Grant reference for above */ 146.22 u16 evtchn; /* Event channel for notifications. */ 146.23 /* OUT */ 146.24 u32 status;
148.1 --- a/xen/include/public/xen.h Fri Aug 12 09:35:15 2005 -0800 148.2 +++ b/xen/include/public/xen.h Mon Aug 15 10:32:29 2005 -0800 148.3 @@ -399,12 +399,11 @@ typedef struct shared_info { 148.4 148.5 /* 148.6 * Wallclock time: updated only by control software. Guests should base 148.7 - * their gettimeofday() syscall on this wallclock-base value, which 148.8 - * indicates UTC when system_time == 0 (i.e., at boot). 148.9 + * their gettimeofday() syscall on this wallclock-base value. 148.10 */ 148.11 u32 wc_version; /* Version counter: see vcpu_time_info_t. */ 148.12 - u32 wc_nsec; /* Nsecs since 00:00:00 UTC, Jan 1, 1970. */ 148.13 - s64 wc_sec; /* Secs since 00:00:00 UTC, Jan 1, 1970. */ 148.14 + u32 wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */ 148.15 + u32 wc_nsec; /* Nsecs 00:00:00 UTC, Jan 1, 1970. */ 148.16 148.17 arch_shared_info_t arch; 148.18
151.1 --- a/xen/include/xen/grant_table.h Fri Aug 12 09:35:15 2005 -0800 151.2 +++ b/xen/include/xen/grant_table.h Mon Aug 15 10:32:29 2005 -0800 151.3 @@ -53,19 +53,20 @@ typedef struct { 151.4 151.5 #define ORDER_GRANT_FRAMES 2 151.6 #define NR_GRANT_FRAMES (1U << ORDER_GRANT_FRAMES) 151.7 -#define NR_GRANT_ENTRIES (NR_GRANT_FRAMES * PAGE_SIZE / sizeof(grant_entry_t)) 151.8 - 151.9 +#define NR_GRANT_ENTRIES \ 151.10 + ((NR_GRANT_FRAMES << PAGE_SHIFT) / sizeof(grant_entry_t)) 151.11 151.12 /* 151.13 * Tracks a mapping of another domain's grant reference. Each domain has a 151.14 * table of these, indexes into which are returned as a 'mapping handle'. 151.15 */ 151.16 typedef struct { 151.17 - u16 ref_and_flags; /* 0-2: GNTMAP_* ; 3-15: grant ref */ 151.18 + u16 ref_and_flags; /* 0-4: GNTMAP_* ; 5-15: grant ref */ 151.19 domid_t domid; /* granting domain */ 151.20 } grant_mapping_t; 151.21 -#define MAPTRACK_GNTMAP_MASK 7 151.22 -#define MAPTRACK_REF_SHIFT 3 151.23 +#define MAPTRACK_GNTMAP_MASK 0x1f 151.24 +#define MAPTRACK_REF_SHIFT 5 151.25 +#define MAPTRACK_MAX_ENTRIES (1 << (16 - MAPTRACK_REF_SHIFT)) 151.26 151.27 /* Per-domain grant information. */ 151.28 typedef struct { 151.29 @@ -108,10 +109,15 @@ gnttab_prepare_for_transfer( 151.30 /* Notify 'rd' of a completed transfer via an already-locked grant entry. */ 151.31 void 151.32 gnttab_notify_transfer( 151.33 - struct domain *rd, struct domain *ld, grant_ref_t ref, unsigned long frame); 151.34 + struct domain *rd, struct domain *ld, 151.35 + grant_ref_t ref, unsigned long frame); 151.36 151.37 -/* Pre-domain destruction release of granted device mappings of other domains.*/ 151.38 +/* Domain death release of granted device mappings of other domains.*/ 151.39 void 151.40 gnttab_release_dev_mappings(grant_table_t *gt); 151.41 151.42 +/* Extra GNTST_ values, for internal use only. */ 151.43 +#define GNTST_flush_all (2) /* Success, need to flush entire TLB. */ 151.44 +#define GNTST_flush_one (1) /* Success, need to flush a vaddr. */ 151.45 + 151.46 #endif /* __XEN_GRANT_H__ */
153.1 --- a/xen/include/xen/time.h Fri Aug 12 09:35:15 2005 -0800 153.2 +++ b/xen/include/xen/time.h Mon Aug 15 10:32:29 2005 -0800 153.3 @@ -56,7 +56,8 @@ s_time_t get_s_time(void); 153.4 #define MICROSECS(_us) ((s_time_t)((_us) * 1000ULL)) 153.5 153.6 extern void update_dom_time(struct vcpu *v); 153.7 -extern void do_settime(s64 secs, u32 nsecs, u64 system_time_base); 153.8 +extern void do_settime( 153.9 + unsigned long secs, unsigned long nsecs, u64 system_time_base); 153.10 153.11 #endif /* __XEN_TIME_H__ */ 153.12