ia64/xen-unstable
changeset 8729:5a63f675107c
Update to Linux 2.6.15.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
line diff
1.1 --- a/buildconfigs/linux-defconfig_xen0_x86_32 Wed Feb 01 17:06:16 2006 +0000 1.2 +++ b/buildconfigs/linux-defconfig_xen0_x86_32 Wed Feb 01 18:00:19 2006 +0000 1.3 @@ -1,10 +1,11 @@ 1.4 # 1.5 # Automatically generated make config: don't edit 1.6 -# Linux kernel version: 2.6.14-xen0 1.7 -# Tue Jan 31 18:56:38 2006 1.8 +# Linux kernel version: 2.6.15-xen0 1.9 +# Wed Feb 1 15:54:13 2006 1.10 # 1.11 +CONFIG_X86_32=y 1.12 +CONFIG_SEMAPHORE_SLEEPERS=y 1.13 CONFIG_X86=y 1.14 -CONFIG_SEMAPHORE_SLEEPERS=y 1.15 CONFIG_MMU=y 1.16 CONFIG_UID16=y 1.17 CONFIG_GENERIC_ISA_DMA=y 1.18 @@ -35,6 +36,7 @@ CONFIG_HOTPLUG=y 1.19 CONFIG_KOBJECT_UEVENT=y 1.20 # CONFIG_IKCONFIG is not set 1.21 CONFIG_INITRAMFS_SOURCE="" 1.22 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 1.23 # CONFIG_EMBEDDED is not set 1.24 CONFIG_KALLSYMS=y 1.25 # CONFIG_KALLSYMS_ALL is not set 1.26 @@ -64,6 +66,24 @@ CONFIG_OBSOLETE_MODPARM=y 1.27 CONFIG_KMOD=y 1.28 1.29 # 1.30 +# Block layer 1.31 +# 1.32 +# CONFIG_LBD is not set 1.33 + 1.34 +# 1.35 +# IO Schedulers 1.36 +# 1.37 +CONFIG_IOSCHED_NOOP=y 1.38 +CONFIG_IOSCHED_AS=y 1.39 +CONFIG_IOSCHED_DEADLINE=y 1.40 +CONFIG_IOSCHED_CFQ=y 1.41 +CONFIG_DEFAULT_AS=y 1.42 +# CONFIG_DEFAULT_DEADLINE is not set 1.43 +# CONFIG_DEFAULT_CFQ is not set 1.44 +# CONFIG_DEFAULT_NOOP is not set 1.45 +CONFIG_DEFAULT_IOSCHED="anticipatory" 1.46 + 1.47 +# 1.48 # Processor type and features 1.49 # 1.50 # CONFIG_X86_PC is not set 1.51 @@ -108,8 +128,10 @@ CONFIG_X86_WP_WORKS_OK=y 1.52 CONFIG_X86_INVLPG=y 1.53 CONFIG_X86_BSWAP=y 1.54 CONFIG_X86_POPAD_OK=y 1.55 +CONFIG_X86_CMPXCHG64=y 1.56 CONFIG_X86_GOOD_APIC=y 1.57 CONFIG_X86_USE_PPRO_CHECKSUM=y 1.58 +CONFIG_X86_TSC=y 1.59 # CONFIG_SMP is not set 1.60 CONFIG_PREEMPT_NONE=y 1.61 # CONFIG_PREEMPT_VOLUNTARY is not set 1.62 @@ -142,6 +164,7 @@ CONFIG_FLATMEM_MANUAL=y 1.63 CONFIG_FLATMEM=y 1.64 CONFIG_FLAT_NODE_MEM_MAP=y 1.65 # CONFIG_SPARSEMEM_STATIC is not set 1.66 +CONFIG_SPLIT_PTLOCK_CPUS=4096 1.67 CONFIG_MTRR=y 1.68 # CONFIG_REGPARM is not set 1.69 CONFIG_SECCOMP=y 1.70 @@ -257,6 +280,10 @@ CONFIG_TCP_CONG_BIC=y 1.71 CONFIG_NETFILTER=y 1.72 # CONFIG_NETFILTER_DEBUG is not set 1.73 CONFIG_BRIDGE_NETFILTER=y 1.74 + 1.75 +# 1.76 +# Core Netfilter Configuration 1.77 +# 1.78 # CONFIG_NETFILTER_NETLINK is not set 1.79 1.80 # 1.81 @@ -346,8 +373,11 @@ CONFIG_BRIDGE=y 1.82 # CONFIG_NET_DIVERT is not set 1.83 # CONFIG_ECONET is not set 1.84 # CONFIG_WAN_ROUTER is not set 1.85 + 1.86 +# 1.87 +# QoS and/or fair queueing 1.88 +# 1.89 # CONFIG_NET_SCHED is not set 1.90 -# CONFIG_NET_CLS_ROUTE is not set 1.91 1.92 # 1.93 # Network testing 1.94 @@ -409,16 +439,7 @@ CONFIG_BLK_DEV_RAM=y 1.95 CONFIG_BLK_DEV_RAM_COUNT=16 1.96 CONFIG_BLK_DEV_RAM_SIZE=4096 1.97 CONFIG_BLK_DEV_INITRD=y 1.98 -# CONFIG_LBD is not set 1.99 # CONFIG_CDROM_PKTCDVD is not set 1.100 - 1.101 -# 1.102 -# IO Schedulers 1.103 -# 1.104 -CONFIG_IOSCHED_NOOP=y 1.105 -CONFIG_IOSCHED_AS=y 1.106 -CONFIG_IOSCHED_DEADLINE=y 1.107 -CONFIG_IOSCHED_CFQ=y 1.108 # CONFIG_ATA_OVER_ETH is not set 1.109 1.110 # 1.111 @@ -464,6 +485,7 @@ CONFIG_IDEDMA_PCI_AUTO=y 1.112 # CONFIG_BLK_DEV_CY82C693 is not set 1.113 # CONFIG_BLK_DEV_CS5520 is not set 1.114 # CONFIG_BLK_DEV_CS5530 is not set 1.115 +# CONFIG_BLK_DEV_CS5535 is not set 1.116 # CONFIG_BLK_DEV_HPT34X is not set 1.117 # CONFIG_BLK_DEV_HPT366 is not set 1.118 # CONFIG_BLK_DEV_SC1200 is not set 1.119 @@ -519,6 +541,7 @@ CONFIG_SCSI_SPI_ATTRS=y 1.120 # 1.121 # SCSI low-level drivers 1.122 # 1.123 +# CONFIG_ISCSI_TCP is not set 1.124 CONFIG_BLK_DEV_3W_XXXX_RAID=y 1.125 # CONFIG_SCSI_3W_9XXX is not set 1.126 # CONFIG_SCSI_ACARD is not set 1.127 @@ -548,16 +571,17 @@ CONFIG_SCSI_SATA=y 1.128 CONFIG_SCSI_ATA_PIIX=y 1.129 # CONFIG_SCSI_SATA_MV is not set 1.130 # CONFIG_SCSI_SATA_NV is not set 1.131 +# CONFIG_SCSI_PDC_ADMA is not set 1.132 +# CONFIG_SCSI_SATA_QSTOR is not set 1.133 CONFIG_SCSI_SATA_PROMISE=y 1.134 -# CONFIG_SCSI_SATA_QSTOR is not set 1.135 CONFIG_SCSI_SATA_SX4=y 1.136 CONFIG_SCSI_SATA_SIL=y 1.137 +CONFIG_SCSI_SATA_SIL24=y 1.138 # CONFIG_SCSI_SATA_SIS is not set 1.139 # CONFIG_SCSI_SATA_ULI is not set 1.140 # CONFIG_SCSI_SATA_VIA is not set 1.141 # CONFIG_SCSI_SATA_VITESSE is not set 1.142 CONFIG_SCSI_SATA_INTEL_COMBINED=y 1.143 -# CONFIG_SCSI_CPQFCTS is not set 1.144 # CONFIG_SCSI_DMX3191D is not set 1.145 # CONFIG_SCSI_EATA_PIO is not set 1.146 # CONFIG_SCSI_FUTURE_DOMAIN is not set 1.147 @@ -566,7 +590,6 @@ CONFIG_SCSI_SATA_INTEL_COMBINED=y 1.148 # CONFIG_SCSI_INIA100 is not set 1.149 # CONFIG_SCSI_SYM53C8XX_2 is not set 1.150 # CONFIG_SCSI_IPR is not set 1.151 -# CONFIG_SCSI_QLOGIC_ISP is not set 1.152 # CONFIG_SCSI_QLOGIC_FC is not set 1.153 # CONFIG_SCSI_QLOGIC_1280 is not set 1.154 CONFIG_SCSI_QLA2XXX=y 1.155 @@ -807,7 +830,6 @@ CONFIG_HW_CONSOLE=y 1.156 # 1.157 # Serial drivers 1.158 # 1.159 -# CONFIG_SERIAL_8250 is not set 1.160 1.161 # 1.162 # Non-8250 serial port support 1.163 @@ -870,6 +892,7 @@ CONFIG_DRM_SIS=m 1.164 # TPM devices 1.165 # 1.166 # CONFIG_TCG_TPM is not set 1.167 +# CONFIG_TELCLOCK is not set 1.168 1.169 # 1.170 # I2C support 1.171 @@ -954,12 +977,15 @@ CONFIG_USB_UHCI_HCD=y 1.172 # 1.173 # USB Device Class drivers 1.174 # 1.175 -# CONFIG_USB_BLUETOOTH_TTY is not set 1.176 # CONFIG_USB_ACM is not set 1.177 # CONFIG_USB_PRINTER is not set 1.178 1.179 # 1.180 -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information 1.181 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1.182 +# 1.183 + 1.184 +# 1.185 +# may also be needed; see USB_STORAGE Help for more information 1.186 # 1.187 # CONFIG_USB_STORAGE is not set 1.188 1.189 @@ -1212,6 +1238,11 @@ CONFIG_NLS_ISO8859_1=y 1.190 # CONFIG_NLS_UTF8 is not set 1.191 1.192 # 1.193 +# Instrumentation Support 1.194 +# 1.195 +# CONFIG_KPROBES is not set 1.196 + 1.197 +# 1.198 # Kernel hacking 1.199 # 1.200 # CONFIG_PRINTK_TIME is not set 1.201 @@ -1228,10 +1259,11 @@ CONFIG_DETECT_SOFTLOCKUP=y 1.202 CONFIG_DEBUG_BUGVERBOSE=y 1.203 # CONFIG_DEBUG_INFO is not set 1.204 # CONFIG_DEBUG_FS is not set 1.205 +# CONFIG_DEBUG_VM is not set 1.206 CONFIG_FRAME_POINTER=y 1.207 +# CONFIG_RCU_TORTURE_TEST is not set 1.208 CONFIG_EARLY_PRINTK=y 1.209 # CONFIG_DEBUG_STACKOVERFLOW is not set 1.210 -# CONFIG_KPROBES is not set 1.211 # CONFIG_DEBUG_STACK_USAGE is not set 1.212 # CONFIG_DEBUG_PAGEALLOC is not set 1.213 # CONFIG_4KSTACKS is not set 1.214 @@ -1312,4 +1344,3 @@ CONFIG_ZLIB_INFLATE=y 1.215 CONFIG_GENERIC_HARDIRQS=y 1.216 CONFIG_GENERIC_IRQ_PROBE=y 1.217 CONFIG_X86_BIOS_REBOOT=y 1.218 -CONFIG_PC=y
2.1 --- a/buildconfigs/linux-defconfig_xen0_x86_64 Wed Feb 01 17:06:16 2006 +0000 2.2 +++ b/buildconfigs/linux-defconfig_xen0_x86_64 Wed Feb 01 18:00:19 2006 +0000 2.3 @@ -1,7 +1,7 @@ 2.4 # 2.5 # Automatically generated make config: don't edit 2.6 -# Linux kernel version: 2.6.14-xen0 2.7 -# Tue Jan 31 16:21:00 2006 2.8 +# Linux kernel version: 2.6.15-xen0 2.9 +# Wed Feb 1 15:50:08 2006 2.10 # 2.11 CONFIG_X86_64=y 2.12 CONFIG_64BIT=y 2.13 @@ -40,6 +40,7 @@ CONFIG_HOTPLUG=y 2.14 CONFIG_KOBJECT_UEVENT=y 2.15 # CONFIG_IKCONFIG is not set 2.16 CONFIG_INITRAMFS_SOURCE="" 2.17 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 2.18 # CONFIG_EMBEDDED is not set 2.19 CONFIG_KALLSYMS=y 2.20 # CONFIG_KALLSYMS_ALL is not set 2.21 @@ -69,6 +70,24 @@ CONFIG_OBSOLETE_MODPARM=y 2.22 CONFIG_KMOD=y 2.23 2.24 # 2.25 +# Block layer 2.26 +# 2.27 +# CONFIG_LBD is not set 2.28 + 2.29 +# 2.30 +# IO Schedulers 2.31 +# 2.32 +CONFIG_IOSCHED_NOOP=y 2.33 +CONFIG_IOSCHED_AS=y 2.34 +CONFIG_IOSCHED_DEADLINE=y 2.35 +CONFIG_IOSCHED_CFQ=y 2.36 +CONFIG_DEFAULT_AS=y 2.37 +# CONFIG_DEFAULT_DEADLINE is not set 2.38 +# CONFIG_DEFAULT_CFQ is not set 2.39 +# CONFIG_DEFAULT_NOOP is not set 2.40 +CONFIG_DEFAULT_IOSCHED="anticipatory" 2.41 + 2.42 +# 2.43 # Processor type and features 2.44 # 2.45 # CONFIG_MK8 is not set 2.46 @@ -88,7 +107,6 @@ CONFIG_X86_LOCAL_APIC=y 2.47 CONFIG_PREEMPT_NONE=y 2.48 # CONFIG_PREEMPT_VOLUNTARY is not set 2.49 # CONFIG_PREEMPT is not set 2.50 -# CONFIG_NUMA is not set 2.51 CONFIG_ARCH_FLATMEM_ENABLE=y 2.52 CONFIG_SELECT_MEMORY_MODEL=y 2.53 CONFIG_FLATMEM_MANUAL=y 2.54 @@ -97,6 +115,7 @@ CONFIG_FLATMEM_MANUAL=y 2.55 CONFIG_FLATMEM=y 2.56 CONFIG_FLAT_NODE_MEM_MAP=y 2.57 # CONFIG_SPARSEMEM_STATIC is not set 2.58 +CONFIG_SPLIT_PTLOCK_CPUS=4096 2.59 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 2.60 CONFIG_SWIOTLB=y 2.61 CONFIG_DUMMY_IOMMU=y 2.62 @@ -196,6 +215,10 @@ CONFIG_TCP_CONG_BIC=y 2.63 CONFIG_NETFILTER=y 2.64 # CONFIG_NETFILTER_DEBUG is not set 2.65 CONFIG_BRIDGE_NETFILTER=y 2.66 + 2.67 +# 2.68 +# Core Netfilter Configuration 2.69 +# 2.70 # CONFIG_NETFILTER_NETLINK is not set 2.71 2.72 # 2.73 @@ -285,8 +308,11 @@ CONFIG_BRIDGE=y 2.74 # CONFIG_NET_DIVERT is not set 2.75 # CONFIG_ECONET is not set 2.76 # CONFIG_WAN_ROUTER is not set 2.77 + 2.78 +# 2.79 +# QoS and/or fair queueing 2.80 +# 2.81 # CONFIG_NET_SCHED is not set 2.82 -# CONFIG_NET_CLS_ROUTE is not set 2.83 2.84 # 2.85 # Network testing 2.86 @@ -348,16 +374,7 @@ CONFIG_BLK_DEV_RAM=y 2.87 CONFIG_BLK_DEV_RAM_COUNT=16 2.88 CONFIG_BLK_DEV_RAM_SIZE=16384 2.89 CONFIG_BLK_DEV_INITRD=y 2.90 -# CONFIG_LBD is not set 2.91 # CONFIG_CDROM_PKTCDVD is not set 2.92 - 2.93 -# 2.94 -# IO Schedulers 2.95 -# 2.96 -CONFIG_IOSCHED_NOOP=y 2.97 -CONFIG_IOSCHED_AS=y 2.98 -CONFIG_IOSCHED_DEADLINE=y 2.99 -CONFIG_IOSCHED_CFQ=y 2.100 # CONFIG_ATA_OVER_ETH is not set 2.101 2.102 # 2.103 @@ -458,6 +475,7 @@ CONFIG_SCSI_SPI_ATTRS=y 2.104 # 2.105 # SCSI low-level drivers 2.106 # 2.107 +# CONFIG_ISCSI_TCP is not set 2.108 CONFIG_BLK_DEV_3W_XXXX_RAID=y 2.109 # CONFIG_SCSI_3W_9XXX is not set 2.110 # CONFIG_SCSI_ACARD is not set 2.111 @@ -488,10 +506,12 @@ CONFIG_SCSI_SATA=y 2.112 CONFIG_SCSI_ATA_PIIX=y 2.113 # CONFIG_SCSI_SATA_MV is not set 2.114 # CONFIG_SCSI_SATA_NV is not set 2.115 +# CONFIG_SCSI_PDC_ADMA is not set 2.116 +# CONFIG_SCSI_SATA_QSTOR is not set 2.117 CONFIG_SCSI_SATA_PROMISE=y 2.118 -# CONFIG_SCSI_SATA_QSTOR is not set 2.119 CONFIG_SCSI_SATA_SX4=y 2.120 CONFIG_SCSI_SATA_SIL=y 2.121 +CONFIG_SCSI_SATA_SIL24=y 2.122 # CONFIG_SCSI_SATA_SIS is not set 2.123 # CONFIG_SCSI_SATA_ULI is not set 2.124 # CONFIG_SCSI_SATA_VIA is not set 2.125 @@ -499,7 +519,6 @@ CONFIG_SCSI_SATA_SIL=y 2.126 CONFIG_SCSI_SATA_INTEL_COMBINED=y 2.127 CONFIG_SCSI_BUSLOGIC=y 2.128 # CONFIG_SCSI_OMIT_FLASHPOINT is not set 2.129 -# CONFIG_SCSI_CPQFCTS is not set 2.130 # CONFIG_SCSI_DMX3191D is not set 2.131 # CONFIG_SCSI_EATA is not set 2.132 # CONFIG_SCSI_EATA_PIO is not set 2.133 @@ -510,7 +529,6 @@ CONFIG_SCSI_BUSLOGIC=y 2.134 # CONFIG_SCSI_INIA100 is not set 2.135 # CONFIG_SCSI_SYM53C8XX_2 is not set 2.136 # CONFIG_SCSI_IPR is not set 2.137 -# CONFIG_SCSI_QLOGIC_ISP is not set 2.138 # CONFIG_SCSI_QLOGIC_FC is not set 2.139 # CONFIG_SCSI_QLOGIC_1280 is not set 2.140 CONFIG_SCSI_QLA2XXX=y 2.141 @@ -750,7 +768,6 @@ CONFIG_HW_CONSOLE=y 2.142 # 2.143 # Serial drivers 2.144 # 2.145 -# CONFIG_SERIAL_8250 is not set 2.146 2.147 # 2.148 # Non-8250 serial port support 2.149 @@ -800,6 +817,7 @@ CONFIG_DRM_SIS=m 2.150 # TPM devices 2.151 # 2.152 # CONFIG_TCG_TPM is not set 2.153 +# CONFIG_TELCLOCK is not set 2.154 2.155 # 2.156 # I2C support 2.157 @@ -884,12 +902,15 @@ CONFIG_USB_UHCI_HCD=y 2.158 # 2.159 # USB Device Class drivers 2.160 # 2.161 -# CONFIG_USB_BLUETOOTH_TTY is not set 2.162 # CONFIG_USB_ACM is not set 2.163 # CONFIG_USB_PRINTER is not set 2.164 2.165 # 2.166 -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information 2.167 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 2.168 +# 2.169 + 2.170 +# 2.171 +# may also be needed; see USB_STORAGE Help for more information 2.172 # 2.173 # CONFIG_USB_STORAGE is not set 2.174 2.175 @@ -989,6 +1010,7 @@ CONFIG_INFINIBAND_MTHCA_DEBUG=y 2.176 CONFIG_INFINIBAND_IPOIB=y 2.177 CONFIG_INFINIBAND_IPOIB_DEBUG=y 2.178 CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y 2.179 +CONFIG_INFINIBAND_SRP=y 2.180 2.181 # 2.182 # SN Devices 2.183 @@ -1155,9 +1177,10 @@ CONFIG_NLS_ISO8859_1=y 2.184 # CONFIG_NLS_UTF8 is not set 2.185 2.186 # 2.187 -# Profiling support 2.188 +# Instrumentation Support 2.189 # 2.190 # CONFIG_PROFILING is not set 2.191 +# CONFIG_KPROBES is not set 2.192 2.193 # 2.194 # Kernel hacking 2.195 @@ -1173,10 +1196,10 @@ CONFIG_DETECT_SOFTLOCKUP=y 2.196 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 2.197 # CONFIG_DEBUG_KOBJECT is not set 2.198 # CONFIG_DEBUG_FS is not set 2.199 +# CONFIG_DEBUG_VM is not set 2.200 CONFIG_FRAME_POINTER=y 2.201 -# CONFIG_CHECKING is not set 2.202 +# CONFIG_RCU_TORTURE_TEST is not set 2.203 # CONFIG_INIT_DEBUG is not set 2.204 -# CONFIG_KPROBES is not set 2.205 2.206 # 2.207 # Security options
3.1 --- a/buildconfigs/linux-defconfig_xenU_x86_32 Wed Feb 01 17:06:16 2006 +0000 3.2 +++ b/buildconfigs/linux-defconfig_xenU_x86_32 Wed Feb 01 18:00:19 2006 +0000 3.3 @@ -1,10 +1,11 @@ 3.4 # 3.5 # Automatically generated make config: don't edit 3.6 -# Linux kernel version: 2.6.14-xenU 3.7 -# Tue Jan 31 18:57:16 2006 3.8 +# Linux kernel version: 2.6.15-xenU 3.9 +# Wed Feb 1 17:28:35 2006 3.10 # 3.11 +CONFIG_X86_32=y 3.12 +CONFIG_SEMAPHORE_SLEEPERS=y 3.13 CONFIG_X86=y 3.14 -CONFIG_SEMAPHORE_SLEEPERS=y 3.15 CONFIG_MMU=y 3.16 CONFIG_UID16=y 3.17 CONFIG_GENERIC_ISA_DMA=y 3.18 @@ -35,6 +36,7 @@ CONFIG_KOBJECT_UEVENT=y 3.19 # CONFIG_IKCONFIG is not set 3.20 # CONFIG_CPUSETS is not set 3.21 CONFIG_INITRAMFS_SOURCE="" 3.22 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 3.23 # CONFIG_EMBEDDED is not set 3.24 CONFIG_KALLSYMS=y 3.25 # CONFIG_KALLSYMS_ALL is not set 3.26 @@ -65,6 +67,24 @@ CONFIG_KMOD=y 3.27 CONFIG_STOP_MACHINE=y 3.28 3.29 # 3.30 +# Block layer 3.31 +# 3.32 +# CONFIG_LBD is not set 3.33 + 3.34 +# 3.35 +# IO Schedulers 3.36 +# 3.37 +CONFIG_IOSCHED_NOOP=y 3.38 +CONFIG_IOSCHED_AS=y 3.39 +CONFIG_IOSCHED_DEADLINE=y 3.40 +CONFIG_IOSCHED_CFQ=y 3.41 +CONFIG_DEFAULT_AS=y 3.42 +# CONFIG_DEFAULT_DEADLINE is not set 3.43 +# CONFIG_DEFAULT_CFQ is not set 3.44 +# CONFIG_DEFAULT_NOOP is not set 3.45 +CONFIG_DEFAULT_IOSCHED="anticipatory" 3.46 + 3.47 +# 3.48 # Processor type and features 3.49 # 3.50 # CONFIG_X86_PC is not set 3.51 @@ -109,8 +129,10 @@ CONFIG_X86_WP_WORKS_OK=y 3.52 CONFIG_X86_INVLPG=y 3.53 CONFIG_X86_BSWAP=y 3.54 CONFIG_X86_POPAD_OK=y 3.55 +CONFIG_X86_CMPXCHG64=y 3.56 CONFIG_X86_GOOD_APIC=y 3.57 CONFIG_X86_USE_PPRO_CHECKSUM=y 3.58 +CONFIG_X86_TSC=y 3.59 CONFIG_SMP=y 3.60 CONFIG_SMP_ALTERNATIVES=y 3.61 CONFIG_NR_CPUS=8 3.62 @@ -141,6 +163,7 @@ CONFIG_FLATMEM_MANUAL=y 3.63 CONFIG_FLATMEM=y 3.64 CONFIG_FLAT_NODE_MEM_MAP=y 3.65 # CONFIG_SPARSEMEM_STATIC is not set 3.66 +CONFIG_SPLIT_PTLOCK_CPUS=4096 3.67 # CONFIG_REGPARM is not set 3.68 CONFIG_SECCOMP=y 3.69 # CONFIG_HZ_100 is not set 3.70 @@ -212,8 +235,11 @@ CONFIG_TCP_CONG_BIC=y 3.71 # CONFIG_NET_DIVERT is not set 3.72 # CONFIG_ECONET is not set 3.73 # CONFIG_WAN_ROUTER is not set 3.74 + 3.75 +# 3.76 +# QoS and/or fair queueing 3.77 +# 3.78 # CONFIG_NET_SCHED is not set 3.79 -# CONFIG_NET_CLS_ROUTE is not set 3.80 3.81 # 3.82 # Network testing 3.83 @@ -248,16 +274,7 @@ CONFIG_BLK_DEV_RAM=y 3.84 CONFIG_BLK_DEV_RAM_COUNT=16 3.85 CONFIG_BLK_DEV_RAM_SIZE=4096 3.86 CONFIG_BLK_DEV_INITRD=y 3.87 -# CONFIG_LBD is not set 3.88 # CONFIG_CDROM_PKTCDVD is not set 3.89 - 3.90 -# 3.91 -# IO Schedulers 3.92 -# 3.93 -CONFIG_IOSCHED_NOOP=y 3.94 -CONFIG_IOSCHED_AS=y 3.95 -CONFIG_IOSCHED_DEADLINE=y 3.96 -CONFIG_IOSCHED_CFQ=y 3.97 # CONFIG_ATA_OVER_ETH is not set 3.98 3.99 # 3.100 @@ -295,6 +312,7 @@ CONFIG_BLK_DEV_SD=m 3.101 # 3.102 # SCSI low-level drivers 3.103 # 3.104 +# CONFIG_ISCSI_TCP is not set 3.105 # CONFIG_SCSI_SATA is not set 3.106 # CONFIG_SCSI_DEBUG is not set 3.107 3.108 @@ -503,6 +521,11 @@ CONFIG_NLS_ISO8859_1=y 3.109 # CONFIG_NLS_UTF8 is not set 3.110 3.111 # 3.112 +# Instrumentation Support 3.113 +# 3.114 +# CONFIG_KPROBES is not set 3.115 + 3.116 +# 3.117 # Kernel hacking 3.118 # 3.119 # CONFIG_PRINTK_TIME is not set 3.120 @@ -519,10 +542,11 @@ CONFIG_DETECT_SOFTLOCKUP=y 3.121 CONFIG_DEBUG_BUGVERBOSE=y 3.122 # CONFIG_DEBUG_INFO is not set 3.123 # CONFIG_DEBUG_FS is not set 3.124 +# CONFIG_DEBUG_VM is not set 3.125 CONFIG_FRAME_POINTER=y 3.126 +# CONFIG_RCU_TORTURE_TEST is not set 3.127 CONFIG_EARLY_PRINTK=y 3.128 # CONFIG_DEBUG_STACKOVERFLOW is not set 3.129 -# CONFIG_KPROBES is not set 3.130 # CONFIG_DEBUG_STACK_USAGE is not set 3.131 # CONFIG_DEBUG_PAGEALLOC is not set 3.132 # CONFIG_4KSTACKS is not set 3.133 @@ -598,4 +622,3 @@ CONFIG_GENERIC_PENDING_IRQ=y 3.134 CONFIG_X86_SMP=y 3.135 CONFIG_X86_BIOS_REBOOT=y 3.136 CONFIG_X86_TRAMPOLINE=y 3.137 -CONFIG_PC=y
4.1 --- a/buildconfigs/linux-defconfig_xenU_x86_64 Wed Feb 01 17:06:16 2006 +0000 4.2 +++ b/buildconfigs/linux-defconfig_xenU_x86_64 Wed Feb 01 18:00:19 2006 +0000 4.3 @@ -1,7 +1,7 @@ 4.4 # 4.5 # Automatically generated make config: don't edit 4.6 -# Linux kernel version: 2.6.14-xenU 4.7 -# Tue Jan 31 19:51:18 2006 4.8 +# Linux kernel version: 2.6.15-xenU 4.9 +# Wed Feb 1 15:49:27 2006 4.10 # 4.11 CONFIG_X86_64=y 4.12 CONFIG_64BIT=y 4.13 @@ -42,6 +42,7 @@ CONFIG_KOBJECT_UEVENT=y 4.14 # CONFIG_IKCONFIG is not set 4.15 # CONFIG_CPUSETS is not set 4.16 CONFIG_INITRAMFS_SOURCE="" 4.17 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 4.18 # CONFIG_EMBEDDED is not set 4.19 CONFIG_KALLSYMS=y 4.20 # CONFIG_KALLSYMS_ALL is not set 4.21 @@ -72,6 +73,24 @@ CONFIG_KMOD=y 4.22 CONFIG_STOP_MACHINE=y 4.23 4.24 # 4.25 +# Block layer 4.26 +# 4.27 +CONFIG_LBD=y 4.28 + 4.29 +# 4.30 +# IO Schedulers 4.31 +# 4.32 +CONFIG_IOSCHED_NOOP=y 4.33 +CONFIG_IOSCHED_AS=y 4.34 +CONFIG_IOSCHED_DEADLINE=y 4.35 +CONFIG_IOSCHED_CFQ=y 4.36 +CONFIG_DEFAULT_AS=y 4.37 +# CONFIG_DEFAULT_DEADLINE is not set 4.38 +# CONFIG_DEFAULT_CFQ is not set 4.39 +# CONFIG_DEFAULT_NOOP is not set 4.40 +CONFIG_DEFAULT_IOSCHED="anticipatory" 4.41 + 4.42 +# 4.43 # Processor type and features 4.44 # 4.45 # CONFIG_MK8 is not set 4.46 @@ -90,7 +109,6 @@ CONFIG_PREEMPT_NONE=y 4.47 # CONFIG_PREEMPT_VOLUNTARY is not set 4.48 # CONFIG_PREEMPT is not set 4.49 CONFIG_PREEMPT_BKL=y 4.50 -# CONFIG_NUMA is not set 4.51 CONFIG_ARCH_FLATMEM_ENABLE=y 4.52 CONFIG_SELECT_MEMORY_MODEL=y 4.53 CONFIG_FLATMEM_MANUAL=y 4.54 @@ -99,6 +117,7 @@ CONFIG_FLATMEM_MANUAL=y 4.55 CONFIG_FLATMEM=y 4.56 CONFIG_FLAT_NODE_MEM_MAP=y 4.57 # CONFIG_SPARSEMEM_STATIC is not set 4.58 +CONFIG_SPLIT_PTLOCK_CPUS=4096 4.59 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 4.60 CONFIG_NR_CPUS=8 4.61 # CONFIG_HOTPLUG_CPU is not set 4.62 @@ -219,6 +238,10 @@ CONFIG_IPV6_TUNNEL=m 4.63 CONFIG_NETFILTER=y 4.64 # CONFIG_NETFILTER_DEBUG is not set 4.65 CONFIG_BRIDGE_NETFILTER=y 4.66 + 4.67 +# 4.68 +# Core Netfilter Configuration 4.69 +# 4.70 # CONFIG_NETFILTER_NETLINK is not set 4.71 4.72 # 4.73 @@ -384,10 +407,18 @@ CONFIG_IPDDP_DECAP=y 4.74 CONFIG_NET_DIVERT=y 4.75 # CONFIG_ECONET is not set 4.76 CONFIG_WAN_ROUTER=m 4.77 + 4.78 +# 4.79 +# QoS and/or fair queueing 4.80 +# 4.81 CONFIG_NET_SCHED=y 4.82 CONFIG_NET_SCH_CLK_JIFFIES=y 4.83 # CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set 4.84 # CONFIG_NET_SCH_CLK_CPU is not set 4.85 + 4.86 +# 4.87 +# Queueing/Scheduling 4.88 +# 4.89 CONFIG_NET_SCH_CBQ=m 4.90 CONFIG_NET_SCH_HTB=m 4.91 CONFIG_NET_SCH_HFSC=m 4.92 @@ -401,8 +432,10 @@ CONFIG_NET_SCH_GRED=m 4.93 CONFIG_NET_SCH_DSMARK=m 4.94 CONFIG_NET_SCH_NETEM=m 4.95 CONFIG_NET_SCH_INGRESS=m 4.96 -CONFIG_NET_QOS=y 4.97 -CONFIG_NET_ESTIMATOR=y 4.98 + 4.99 +# 4.100 +# Classification 4.101 +# 4.102 CONFIG_NET_CLS=y 4.103 # CONFIG_NET_CLS_BASIC is not set 4.104 CONFIG_NET_CLS_TCINDEX=m 4.105 @@ -411,13 +444,14 @@ CONFIG_NET_CLS_ROUTE=y 4.106 CONFIG_NET_CLS_FW=m 4.107 CONFIG_NET_CLS_U32=m 4.108 CONFIG_CLS_U32_PERF=y 4.109 -CONFIG_NET_CLS_IND=y 4.110 # CONFIG_CLS_U32_MARK is not set 4.111 CONFIG_NET_CLS_RSVP=m 4.112 CONFIG_NET_CLS_RSVP6=m 4.113 # CONFIG_NET_EMATCH is not set 4.114 # CONFIG_NET_CLS_ACT is not set 4.115 CONFIG_NET_CLS_POLICE=y 4.116 +CONFIG_NET_CLS_IND=y 4.117 +CONFIG_NET_ESTIMATOR=y 4.118 4.119 # 4.120 # Network testing 4.121 @@ -496,7 +530,6 @@ CONFIG_BT_HIDP=m 4.122 CONFIG_BT_HCIUART=m 4.123 CONFIG_BT_HCIUART_H4=y 4.124 CONFIG_BT_HCIUART_BCSP=y 4.125 -CONFIG_BT_HCIUART_BCSP_TXCRC=y 4.126 CONFIG_BT_HCIVHCI=m 4.127 # CONFIG_IEEE80211 is not set 4.128 4.129 @@ -524,16 +557,7 @@ CONFIG_BLK_DEV_RAM=y 4.130 CONFIG_BLK_DEV_RAM_COUNT=16 4.131 CONFIG_BLK_DEV_RAM_SIZE=16384 4.132 CONFIG_BLK_DEV_INITRD=y 4.133 -CONFIG_LBD=y 4.134 # CONFIG_CDROM_PKTCDVD is not set 4.135 - 4.136 -# 4.137 -# IO Schedulers 4.138 -# 4.139 -CONFIG_IOSCHED_NOOP=y 4.140 -CONFIG_IOSCHED_AS=y 4.141 -CONFIG_IOSCHED_DEADLINE=y 4.142 -CONFIG_IOSCHED_CFQ=y 4.143 # CONFIG_ATA_OVER_ETH is not set 4.144 4.145 # 4.146 @@ -572,6 +596,7 @@ CONFIG_SCSI_FC_ATTRS=m 4.147 # 4.148 # SCSI low-level drivers 4.149 # 4.150 +# CONFIG_ISCSI_TCP is not set 4.151 CONFIG_SCSI_SATA=m 4.152 # CONFIG_SCSI_DEBUG is not set 4.153 4.154 @@ -647,6 +672,7 @@ CONFIG_ATMEL=m 4.155 # 4.156 # ATM drivers 4.157 # 4.158 +# CONFIG_ATM_DUMMY is not set 4.159 CONFIG_ATM_TCP=m 4.160 CONFIG_PPP=m 4.161 CONFIG_PPP_MULTILINK=y 4.162 @@ -655,6 +681,7 @@ CONFIG_PPP_ASYNC=m 4.163 CONFIG_PPP_SYNC_TTY=m 4.164 CONFIG_PPP_DEFLATE=m 4.165 # CONFIG_PPP_BSDCOMP is not set 4.166 +# CONFIG_PPP_MPPE is not set 4.167 CONFIG_PPPOE=m 4.168 CONFIG_PPPOATM=m 4.169 # CONFIG_SLIP is not set 4.170 @@ -705,7 +732,7 @@ CONFIG_JFS_POSIX_ACL=y 4.171 CONFIG_FS_POSIX_ACL=y 4.172 CONFIG_XFS_FS=m 4.173 CONFIG_XFS_EXPORT=y 4.174 -CONFIG_XFS_QUOTA=m 4.175 +# CONFIG_XFS_QUOTA is not set 4.176 CONFIG_XFS_SECURITY=y 4.177 CONFIG_XFS_POSIX_ACL=y 4.178 # CONFIG_XFS_RT is not set 4.179 @@ -877,9 +904,10 @@ CONFIG_NLS_KOI8_U=m 4.180 CONFIG_NLS_UTF8=m 4.181 4.182 # 4.183 -# Profiling support 4.184 +# Instrumentation Support 4.185 # 4.186 # CONFIG_PROFILING is not set 4.187 +# CONFIG_KPROBES is not set 4.188 4.189 # 4.190 # Kernel hacking 4.191 @@ -895,9 +923,10 @@ CONFIG_DETECT_SOFTLOCKUP=y 4.192 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 4.193 # CONFIG_DEBUG_KOBJECT is not set 4.194 # CONFIG_DEBUG_FS is not set 4.195 +# CONFIG_DEBUG_VM is not set 4.196 CONFIG_FRAME_POINTER=y 4.197 +# CONFIG_RCU_TORTURE_TEST is not set 4.198 # CONFIG_INIT_DEBUG is not set 4.199 -# CONFIG_KPROBES is not set 4.200 4.201 # 4.202 # Security options
5.1 --- a/buildconfigs/linux-defconfig_xen_x86_32 Wed Feb 01 17:06:16 2006 +0000 5.2 +++ b/buildconfigs/linux-defconfig_xen_x86_32 Wed Feb 01 18:00:19 2006 +0000 5.3 @@ -1,10 +1,11 @@ 5.4 # 5.5 # Automatically generated make config: don't edit 5.6 -# Linux kernel version: 2.6.14-xen 5.7 -# Tue Jan 31 19:01:58 2006 5.8 -# 5.9 +# Linux kernel version: 2.6.15-xen 5.10 +# Wed Feb 1 17:28:24 2006 5.11 +# 5.12 +CONFIG_X86_32=y 5.13 +CONFIG_SEMAPHORE_SLEEPERS=y 5.14 CONFIG_X86=y 5.15 -CONFIG_SEMAPHORE_SLEEPERS=y 5.16 CONFIG_MMU=y 5.17 CONFIG_UID16=y 5.18 CONFIG_GENERIC_ISA_DMA=y 5.19 @@ -38,6 +39,7 @@ CONFIG_KOBJECT_UEVENT=y 5.20 # CONFIG_IKCONFIG is not set 5.21 # CONFIG_CPUSETS is not set 5.22 CONFIG_INITRAMFS_SOURCE="" 5.23 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 5.24 CONFIG_EMBEDDED=y 5.25 CONFIG_KALLSYMS=y 5.26 # CONFIG_KALLSYMS_ALL is not set 5.27 @@ -47,7 +49,6 @@ CONFIG_BUG=y 5.28 CONFIG_BASE_FULL=y 5.29 CONFIG_FUTEX=y 5.30 CONFIG_EPOLL=y 5.31 -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 5.32 CONFIG_SHMEM=y 5.33 CONFIG_CC_ALIGN_FUNCTIONS=0 5.34 CONFIG_CC_ALIGN_LABELS=0 5.35 @@ -69,6 +70,24 @@ CONFIG_KMOD=y 5.36 CONFIG_STOP_MACHINE=y 5.37 5.38 # 5.39 +# Block layer 5.40 +# 5.41 +CONFIG_LBD=y 5.42 + 5.43 +# 5.44 +# IO Schedulers 5.45 +# 5.46 +CONFIG_IOSCHED_NOOP=y 5.47 +CONFIG_IOSCHED_AS=y 5.48 +CONFIG_IOSCHED_DEADLINE=y 5.49 +CONFIG_IOSCHED_CFQ=y 5.50 +CONFIG_DEFAULT_AS=y 5.51 +# CONFIG_DEFAULT_DEADLINE is not set 5.52 +# CONFIG_DEFAULT_CFQ is not set 5.53 +# CONFIG_DEFAULT_NOOP is not set 5.54 +CONFIG_DEFAULT_IOSCHED="anticipatory" 5.55 + 5.56 +# 5.57 # Processor type and features 5.58 # 5.59 # CONFIG_X86_PC is not set 5.60 @@ -113,8 +132,10 @@ CONFIG_X86_WP_WORKS_OK=y 5.61 CONFIG_X86_INVLPG=y 5.62 CONFIG_X86_BSWAP=y 5.63 CONFIG_X86_POPAD_OK=y 5.64 +CONFIG_X86_CMPXCHG64=y 5.65 CONFIG_X86_GOOD_APIC=y 5.66 CONFIG_X86_USE_PPRO_CHECKSUM=y 5.67 +CONFIG_X86_TSC=y 5.68 CONFIG_SMP=y 5.69 CONFIG_SMP_ALTERNATIVES=y 5.70 CONFIG_NR_CPUS=8 5.71 @@ -148,6 +169,7 @@ CONFIG_FLATMEM_MANUAL=y 5.72 CONFIG_FLATMEM=y 5.73 CONFIG_FLAT_NODE_MEM_MAP=y 5.74 # CONFIG_SPARSEMEM_STATIC is not set 5.75 +CONFIG_SPLIT_PTLOCK_CPUS=4096 5.76 CONFIG_MTRR=y 5.77 # CONFIG_REGPARM is not set 5.78 CONFIG_SECCOMP=y 5.79 @@ -156,8 +178,8 @@ CONFIG_HZ_250=y 5.80 # CONFIG_HZ_1000 is not set 5.81 CONFIG_HZ=250 5.82 CONFIG_PHYSICAL_START=0x100000 5.83 +# CONFIG_CRASH_DUMP is not set 5.84 CONFIG_HOTPLUG_CPU=y 5.85 -# CONFIG_CRASH_DUMP is not set 5.86 5.87 # 5.88 # Power management options (ACPI, APM) 5.89 @@ -175,6 +197,7 @@ CONFIG_ACPI_VIDEO=m 5.90 CONFIG_ACPI_HOTKEY=m 5.91 CONFIG_ACPI_FAN=m 5.92 CONFIG_ACPI_PROCESSOR=m 5.93 +CONFIG_ACPI_HOTPLUG_CPU=y 5.94 CONFIG_ACPI_THERMAL=m 5.95 CONFIG_ACPI_ASUS=m 5.96 CONFIG_ACPI_IBM=m 5.97 @@ -185,7 +208,7 @@ CONFIG_ACPI_EC=y 5.98 CONFIG_ACPI_POWER=y 5.99 CONFIG_ACPI_SYSTEM=y 5.100 # CONFIG_X86_PM_TIMER is not set 5.101 -# CONFIG_ACPI_CONTAINER is not set 5.102 +CONFIG_ACPI_CONTAINER=m 5.103 5.104 # 5.105 # CPU Frequency scaling 5.106 @@ -206,7 +229,6 @@ CONFIG_PCI_MMCONFIG=y 5.107 # CONFIG_PCI_LEGACY_PROC is not set 5.108 # CONFIG_PCI_DEBUG is not set 5.109 CONFIG_SCx200=m 5.110 -# CONFIG_HOTPLUG_CPU is not set 5.111 5.112 # 5.113 # PCCARD (PCMCIA/CardBus) support 5.114 @@ -341,6 +363,10 @@ CONFIG_IPV6_TUNNEL=m 5.115 CONFIG_NETFILTER=y 5.116 # CONFIG_NETFILTER_DEBUG is not set 5.117 CONFIG_BRIDGE_NETFILTER=y 5.118 + 5.119 +# 5.120 +# Core Netfilter Configuration 5.121 +# 5.122 CONFIG_NETFILTER_NETLINK=m 5.123 CONFIG_NETFILTER_NETLINK_QUEUE=m 5.124 CONFIG_NETFILTER_NETLINK_LOG=m 5.125 @@ -534,10 +560,18 @@ CONFIG_ECONET=m 5.126 CONFIG_ECONET_AUNUDP=y 5.127 CONFIG_ECONET_NATIVE=y 5.128 CONFIG_WAN_ROUTER=m 5.129 + 5.130 +# 5.131 +# QoS and/or fair queueing 5.132 +# 5.133 CONFIG_NET_SCHED=y 5.134 CONFIG_NET_SCH_CLK_JIFFIES=y 5.135 # CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set 5.136 # CONFIG_NET_SCH_CLK_CPU is not set 5.137 + 5.138 +# 5.139 +# Queueing/Scheduling 5.140 +# 5.141 CONFIG_NET_SCH_CBQ=m 5.142 CONFIG_NET_SCH_HTB=m 5.143 CONFIG_NET_SCH_HFSC=m 5.144 @@ -551,8 +585,10 @@ CONFIG_NET_SCH_GRED=m 5.145 CONFIG_NET_SCH_DSMARK=m 5.146 CONFIG_NET_SCH_NETEM=m 5.147 CONFIG_NET_SCH_INGRESS=m 5.148 -CONFIG_NET_QOS=y 5.149 -CONFIG_NET_ESTIMATOR=y 5.150 + 5.151 +# 5.152 +# Classification 5.153 +# 5.154 CONFIG_NET_CLS=y 5.155 CONFIG_NET_CLS_BASIC=m 5.156 CONFIG_NET_CLS_TCINDEX=m 5.157 @@ -561,7 +597,6 @@ CONFIG_NET_CLS_ROUTE=y 5.158 CONFIG_NET_CLS_FW=m 5.159 CONFIG_NET_CLS_U32=m 5.160 # CONFIG_CLS_U32_PERF is not set 5.161 -# CONFIG_NET_CLS_IND is not set 5.162 # CONFIG_CLS_U32_MARK is not set 5.163 CONFIG_NET_CLS_RSVP=m 5.164 CONFIG_NET_CLS_RSVP6=m 5.165 @@ -574,6 +609,8 @@ CONFIG_NET_EMATCH_META=m 5.166 CONFIG_NET_EMATCH_TEXT=m 5.167 # CONFIG_NET_CLS_ACT is not set 5.168 CONFIG_NET_CLS_POLICE=y 5.169 +# CONFIG_NET_CLS_IND is not set 5.170 +CONFIG_NET_ESTIMATOR=y 5.171 5.172 # 5.173 # Network testing 5.174 @@ -676,7 +713,6 @@ CONFIG_BT_HCIUSB_SCO=y 5.175 CONFIG_BT_HCIUART=m 5.176 CONFIG_BT_HCIUART_H4=y 5.177 CONFIG_BT_HCIUART_BCSP=y 5.178 -# CONFIG_BT_HCIUART_BCSP_TXCRC is not set 5.179 CONFIG_BT_HCIBCM203X=m 5.180 # CONFIG_BT_HCIBPA10X is not set 5.181 CONFIG_BT_HCIBFUSB=m 5.182 @@ -731,6 +767,7 @@ CONFIG_FTL=m 5.183 CONFIG_NFTL=m 5.184 CONFIG_NFTL_RW=y 5.185 CONFIG_INFTL=m 5.186 +CONFIG_RFD_FTL=m 5.187 5.188 # 5.189 # RAM/ROM/Flash chip drivers 5.190 @@ -823,6 +860,12 @@ CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS 5.191 # CONFIG_MTD_NAND_NANDSIM is not set 5.192 5.193 # 5.194 +# OneNAND Flash Device Drivers 5.195 +# 5.196 +CONFIG_MTD_ONENAND=m 5.197 +# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set 5.198 + 5.199 +# 5.200 # Parallel port support 5.201 # 5.202 CONFIG_PARPORT=m 5.203 @@ -896,18 +939,9 @@ CONFIG_BLK_DEV_RAM=y 5.204 CONFIG_BLK_DEV_RAM_COUNT=16 5.205 CONFIG_BLK_DEV_RAM_SIZE=16384 5.206 CONFIG_BLK_DEV_INITRD=y 5.207 -CONFIG_LBD=y 5.208 CONFIG_CDROM_PKTCDVD=m 5.209 CONFIG_CDROM_PKTCDVD_BUFFERS=8 5.210 # CONFIG_CDROM_PKTCDVD_WCACHE is not set 5.211 - 5.212 -# 5.213 -# IO Schedulers 5.214 -# 5.215 -CONFIG_IOSCHED_NOOP=y 5.216 -CONFIG_IOSCHED_AS=y 5.217 -CONFIG_IOSCHED_DEADLINE=y 5.218 -CONFIG_IOSCHED_CFQ=y 5.219 CONFIG_ATA_OVER_ETH=m 5.220 5.221 # 5.222 @@ -957,6 +991,7 @@ CONFIG_BLK_DEV_TRIFLEX=y 5.223 CONFIG_BLK_DEV_CY82C693=y 5.224 CONFIG_BLK_DEV_CS5520=y 5.225 CONFIG_BLK_DEV_CS5530=y 5.226 +CONFIG_BLK_DEV_CS5535=m 5.227 CONFIG_BLK_DEV_HPT34X=y 5.228 # CONFIG_HPT34X_AUTODMA is not set 5.229 CONFIG_BLK_DEV_HPT366=y 5.230 @@ -1010,12 +1045,13 @@ CONFIG_SCSI_LOGGING=y 5.231 # 5.232 CONFIG_SCSI_SPI_ATTRS=m 5.233 CONFIG_SCSI_FC_ATTRS=m 5.234 -# CONFIG_SCSI_ISCSI_ATTRS is not set 5.235 +CONFIG_SCSI_ISCSI_ATTRS=m 5.236 CONFIG_SCSI_SAS_ATTRS=m 5.237 5.238 # 5.239 # SCSI low-level drivers 5.240 # 5.241 +CONFIG_ISCSI_TCP=m 5.242 CONFIG_BLK_DEV_3W_XXXX_RAID=m 5.243 CONFIG_SCSI_3W_9XXX=m 5.244 CONFIG_SCSI_ACARD=m 5.245 @@ -1046,16 +1082,17 @@ CONFIG_SCSI_SATA_SVW=m 5.246 CONFIG_SCSI_ATA_PIIX=m 5.247 CONFIG_SCSI_SATA_MV=m 5.248 CONFIG_SCSI_SATA_NV=m 5.249 +CONFIG_SCSI_PDC_ADMA=m 5.250 +# CONFIG_SCSI_SATA_QSTOR is not set 5.251 CONFIG_SCSI_SATA_PROMISE=m 5.252 -# CONFIG_SCSI_SATA_QSTOR is not set 5.253 CONFIG_SCSI_SATA_SX4=m 5.254 CONFIG_SCSI_SATA_SIL=m 5.255 +CONFIG_SCSI_SATA_SIL24=m 5.256 CONFIG_SCSI_SATA_SIS=m 5.257 CONFIG_SCSI_SATA_ULI=m 5.258 CONFIG_SCSI_SATA_VIA=m 5.259 CONFIG_SCSI_SATA_VITESSE=m 5.260 CONFIG_SCSI_SATA_INTEL_COMBINED=y 5.261 -# CONFIG_SCSI_CPQFCTS is not set 5.262 CONFIG_SCSI_DMX3191D=m 5.263 CONFIG_SCSI_EATA_PIO=m 5.264 CONFIG_SCSI_FUTURE_DOMAIN=m 5.265 @@ -1074,11 +1111,9 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 5.266 CONFIG_SCSI_IPR=m 5.267 # CONFIG_SCSI_IPR_TRACE is not set 5.268 # CONFIG_SCSI_IPR_DUMP is not set 5.269 -CONFIG_SCSI_QLOGIC_ISP=m 5.270 CONFIG_SCSI_QLOGIC_FC=m 5.271 CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y 5.272 CONFIG_SCSI_QLOGIC_1280=m 5.273 -CONFIG_SCSI_QLOGIC_1280_1040=y 5.274 CONFIG_SCSI_QLA2XXX=m 5.275 CONFIG_SCSI_QLA21XX=m 5.276 CONFIG_SCSI_QLA22XX=m 5.277 @@ -1206,7 +1241,6 @@ CONFIG_ARCNET_COM20020_PCI=m 5.278 # PHY device support 5.279 # 5.280 CONFIG_PHYLIB=m 5.281 -CONFIG_PHYCONTROL=y 5.282 5.283 # 5.284 # MII PHY device drivers 5.285 @@ -1302,7 +1336,6 @@ CONFIG_IXGB=m 5.286 # CONFIG_IXGB_NAPI is not set 5.287 CONFIG_S2IO=m 5.288 # CONFIG_S2IO_NAPI is not set 5.289 -# CONFIG_2BUFF_MODE is not set 5.290 5.291 # 5.292 # Token Ring devices 5.293 @@ -1418,6 +1451,7 @@ CONFIG_SBNI=m 5.294 # 5.295 # ATM drivers 5.296 # 5.297 +CONFIG_ATM_DUMMY=m 5.298 CONFIG_ATM_TCP=m 5.299 CONFIG_ATM_LANAI=m 5.300 CONFIG_ATM_ENI=m 5.301 @@ -1462,6 +1496,7 @@ CONFIG_PPP_ASYNC=m 5.302 CONFIG_PPP_SYNC_TTY=m 5.303 CONFIG_PPP_DEFLATE=m 5.304 CONFIG_PPP_BSDCOMP=m 5.305 +CONFIG_PPP_MPPE=m 5.306 CONFIG_PPPOE=m 5.307 CONFIG_PPPOATM=m 5.308 CONFIG_SLIP=m 5.309 @@ -1674,6 +1709,7 @@ CONFIG_TOUCHSCREEN_MTOUCH=m 5.310 CONFIG_TOUCHSCREEN_MK712=m 5.311 CONFIG_INPUT_MISC=y 5.312 CONFIG_INPUT_PCSPKR=m 5.313 +CONFIG_INPUT_WISTRON_BTNS=m 5.314 CONFIG_INPUT_UINPUT=m 5.315 5.316 # 5.317 @@ -1816,17 +1852,20 @@ CONFIG_DRM_SAVAGE=m 5.318 # PCMCIA character devices 5.319 # 5.320 CONFIG_SYNCLINK_CS=m 5.321 +CONFIG_CARDMAN_4000=m 5.322 +CONFIG_CARDMAN_4040=m 5.323 CONFIG_MWAVE=m 5.324 CONFIG_SCx200_GPIO=m 5.325 CONFIG_RAW_DRIVER=m 5.326 +CONFIG_MAX_RAW_DEVS=256 5.327 # CONFIG_HPET is not set 5.328 -CONFIG_MAX_RAW_DEVS=256 5.329 CONFIG_HANGCHECK_TIMER=m 5.330 5.331 # 5.332 # TPM devices 5.333 # 5.334 # CONFIG_TCG_TPM is not set 5.335 +CONFIG_TELCLOCK=m 5.336 5.337 # 5.338 # I2C support 5.339 @@ -1883,6 +1922,7 @@ CONFIG_SENSORS_PCA9539=m 5.340 CONFIG_SENSORS_PCF8591=m 5.341 CONFIG_SENSORS_RTC8564=m 5.342 CONFIG_SENSORS_MAX6875=m 5.343 +CONFIG_RTC_X1205_I2C=m 5.344 # CONFIG_I2C_DEBUG_CORE is not set 5.345 # CONFIG_I2C_DEBUG_ALGO is not set 5.346 # CONFIG_I2C_DEBUG_BUS is not set 5.347 @@ -1964,6 +2004,7 @@ CONFIG_VIDEO_DEV=m 5.348 # Video Adapters 5.349 # 5.350 CONFIG_VIDEO_BT848=m 5.351 +# CONFIG_VIDEO_BT848_DVB is not set 5.352 CONFIG_VIDEO_SAA6588=m 5.353 CONFIG_VIDEO_BWQCAM=m 5.354 CONFIG_VIDEO_CQCAM=m 5.355 @@ -1990,7 +2031,10 @@ CONFIG_VIDEO_HEXIUM_ORION=m 5.356 CONFIG_VIDEO_HEXIUM_GEMINI=m 5.357 CONFIG_VIDEO_CX88=m 5.358 # CONFIG_VIDEO_CX88_DVB is not set 5.359 +CONFIG_VIDEO_EM28XX=m 5.360 CONFIG_VIDEO_OVCAMCHIP=m 5.361 +CONFIG_VIDEO_AUDIO_DECODER=m 5.362 +CONFIG_VIDEO_DECODER=m 5.363 5.364 # 5.365 # Radio Adapters 5.366 @@ -2098,6 +2142,7 @@ CONFIG_DVB_STV0297=m 5.367 # ATSC (North American/Korean Terresterial DTV) frontends 5.368 # 5.369 CONFIG_DVB_NXT2002=m 5.370 +CONFIG_DVB_NXT200X=m 5.371 CONFIG_DVB_OR51211=m 5.372 CONFIG_DVB_OR51132=m 5.373 CONFIG_DVB_BCM3510=m 5.374 @@ -2118,7 +2163,6 @@ CONFIG_FB=y 5.375 CONFIG_FB_CFB_FILLRECT=m 5.376 CONFIG_FB_CFB_COPYAREA=m 5.377 CONFIG_FB_CFB_IMAGEBLIT=m 5.378 -CONFIG_FB_SOFT_CURSOR=m 5.379 # CONFIG_FB_MACMODES is not set 5.380 CONFIG_FB_MODE_HELPERS=y 5.381 CONFIG_FB_TILEBLITTING=y 5.382 @@ -2134,6 +2178,7 @@ CONFIG_FB_VGA16=m 5.383 CONFIG_VIDEO_SELECT=y 5.384 CONFIG_FB_HGA=m 5.385 # CONFIG_FB_HGA_ACCEL is not set 5.386 +CONFIG_FB_S1D13XXX=m 5.387 CONFIG_FB_NVIDIA=m 5.388 CONFIG_FB_NVIDIA_I2C=y 5.389 CONFIG_FB_RIVA=m 5.390 @@ -2176,7 +2221,6 @@ CONFIG_FB_TRIDENT=m 5.391 # CONFIG_FB_PM3 is not set 5.392 CONFIG_FB_GEODE=y 5.393 CONFIG_FB_GEODE_GX1=m 5.394 -CONFIG_FB_S1D13XXX=m 5.395 CONFIG_FB_VIRTUAL=m 5.396 5.397 # 5.398 @@ -2185,6 +2229,7 @@ CONFIG_FB_VIRTUAL=m 5.399 CONFIG_VGA_CONSOLE=y 5.400 CONFIG_DUMMY_CONSOLE=y 5.401 CONFIG_FRAMEBUFFER_CONSOLE=m 5.402 +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 5.403 # CONFIG_FONTS is not set 5.404 CONFIG_FONT_8x8=y 5.405 CONFIG_FONT_8x16=y 5.406 @@ -2204,6 +2249,8 @@ CONFIG_SOUND=m 5.407 # Advanced Linux Sound Architecture 5.408 # 5.409 CONFIG_SND=m 5.410 +CONFIG_SND_AC97_CODEC=m 5.411 +CONFIG_SND_AC97_BUS=m 5.412 CONFIG_SND_TIMER=m 5.413 CONFIG_SND_PCM=m 5.414 CONFIG_SND_HWDEP=m 5.415 @@ -2231,8 +2278,6 @@ CONFIG_SND_VIRMIDI=m 5.416 CONFIG_SND_MTPAV=m 5.417 CONFIG_SND_SERIAL_U16550=m 5.418 CONFIG_SND_MPU401=m 5.419 -CONFIG_SND_AC97_CODEC=m 5.420 -CONFIG_SND_AC97_BUS=m 5.421 5.422 # 5.423 # PCI devices 5.424 @@ -2295,30 +2340,13 @@ CONFIG_SND_USB_USX2Y=m 5.425 # Open Sound System 5.426 # 5.427 CONFIG_SOUND_PRIME=m 5.428 -CONFIG_SOUND_BT878=m 5.429 -CONFIG_SOUND_CMPCI=m 5.430 -# CONFIG_SOUND_CMPCI_FM is not set 5.431 -# CONFIG_SOUND_CMPCI_MIDI is not set 5.432 -CONFIG_SOUND_CMPCI_JOYSTICK=y 5.433 -CONFIG_SOUND_EMU10K1=m 5.434 +# CONFIG_OBSOLETE_OSS_DRIVER is not set 5.435 CONFIG_SOUND_FUSION=m 5.436 -CONFIG_SOUND_CS4281=m 5.437 -CONFIG_SOUND_ES1370=m 5.438 -CONFIG_SOUND_ES1371=m 5.439 -CONFIG_SOUND_ESSSOLO1=m 5.440 -CONFIG_SOUND_MAESTRO=m 5.441 -CONFIG_SOUND_MAESTRO3=m 5.442 CONFIG_SOUND_ICH=m 5.443 -CONFIG_SOUND_SONICVIBES=m 5.444 CONFIG_SOUND_TRIDENT=m 5.445 # CONFIG_SOUND_MSNDCLAS is not set 5.446 # CONFIG_SOUND_MSNDPIN is not set 5.447 -CONFIG_SOUND_VIA82CXXX=m 5.448 CONFIG_SOUND_TVMIXER=m 5.449 -CONFIG_SOUND_ALI5455=m 5.450 -CONFIG_SOUND_FORTE=m 5.451 -CONFIG_SOUND_RME96XX=m 5.452 -CONFIG_SOUND_AD1980=m 5.453 5.454 # 5.455 # USB support 5.456 @@ -2355,15 +2383,15 @@ CONFIG_USB_SL811_CS=m 5.457 # USB Device Class drivers 5.458 # 5.459 # CONFIG_OBSOLETE_OSS_USB_DRIVER is not set 5.460 - 5.461 -# 5.462 -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem 5.463 -# 5.464 CONFIG_USB_ACM=m 5.465 CONFIG_USB_PRINTER=m 5.466 5.467 # 5.468 -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information 5.469 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 5.470 +# 5.471 + 5.472 +# 5.473 +# may also be needed; see USB_STORAGE Help for more information 5.474 # 5.475 CONFIG_USB_STORAGE=m 5.476 # CONFIG_USB_STORAGE_DEBUG is not set 5.477 @@ -2375,7 +2403,6 @@ CONFIG_USB_STORAGE_USBAT=y 5.478 CONFIG_USB_STORAGE_SDDR09=y 5.479 CONFIG_USB_STORAGE_SDDR55=y 5.480 CONFIG_USB_STORAGE_JUMPSHOT=y 5.481 -CONFIG_USB_STORAGE_ONETOUCH=y 5.482 5.483 # 5.484 # USB Input Devices 5.485 @@ -2460,6 +2487,7 @@ CONFIG_USB_USS720=m 5.486 CONFIG_USB_SERIAL=m 5.487 CONFIG_USB_SERIAL_GENERIC=y 5.488 CONFIG_USB_SERIAL_AIRPRIME=m 5.489 +CONFIG_USB_SERIAL_ANYDATA=m 5.490 CONFIG_USB_SERIAL_BELKIN=m 5.491 CONFIG_USB_SERIAL_WHITEHEAT=m 5.492 CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 5.493 @@ -2593,7 +2621,7 @@ CONFIG_JFS_STATISTICS=y 5.494 CONFIG_FS_POSIX_ACL=y 5.495 CONFIG_XFS_FS=m 5.496 CONFIG_XFS_EXPORT=y 5.497 -CONFIG_XFS_QUOTA=m 5.498 +# CONFIG_XFS_QUOTA is not set 5.499 CONFIG_XFS_SECURITY=y 5.500 CONFIG_XFS_POSIX_ACL=y 5.501 CONFIG_XFS_RT=y 5.502 @@ -2660,6 +2688,7 @@ CONFIG_JFFS_PROC_FS=y 5.503 CONFIG_JFFS2_FS=m 5.504 CONFIG_JFFS2_FS_DEBUG=0 5.505 CONFIG_JFFS2_FS_WRITEBUFFER=y 5.506 +# CONFIG_JFFS2_SUMMARY is not set 5.507 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 5.508 CONFIG_JFFS2_ZLIB=y 5.509 CONFIG_JFFS2_RTIME=y 5.510 @@ -2787,6 +2816,11 @@ CONFIG_NLS_KOI8_U=m 5.511 CONFIG_NLS_UTF8=m 5.512 5.513 # 5.514 +# Instrumentation Support 5.515 +# 5.516 +# CONFIG_KPROBES is not set 5.517 + 5.518 +# 5.519 # Kernel hacking 5.520 # 5.521 # CONFIG_PRINTK_TIME is not set 5.522 @@ -2803,10 +2837,11 @@ CONFIG_DETECT_SOFTLOCKUP=y 5.523 # CONFIG_DEBUG_BUGVERBOSE is not set 5.524 # CONFIG_DEBUG_INFO is not set 5.525 # CONFIG_DEBUG_FS is not set 5.526 +# CONFIG_DEBUG_VM is not set 5.527 # CONFIG_FRAME_POINTER is not set 5.528 +# CONFIG_RCU_TORTURE_TEST is not set 5.529 # CONFIG_EARLY_PRINTK is not set 5.530 # CONFIG_DEBUG_STACKOVERFLOW is not set 5.531 -# CONFIG_KPROBES is not set 5.532 # CONFIG_DEBUG_STACK_USAGE is not set 5.533 # CONFIG_DEBUG_PAGEALLOC is not set 5.534 # CONFIG_4KSTACKS is not set
6.1 --- a/buildconfigs/linux-defconfig_xen_x86_64 Wed Feb 01 17:06:16 2006 +0000 6.2 +++ b/buildconfigs/linux-defconfig_xen_x86_64 Wed Feb 01 18:00:19 2006 +0000 6.3 @@ -1,7 +1,7 @@ 6.4 # 6.5 # Automatically generated make config: don't edit 6.6 -# Linux kernel version: 2.6.14-xen 6.7 -# Tue Jan 31 18:19:07 2006 6.8 +# Linux kernel version: 2.6.15-xen 6.9 +# Wed Feb 1 15:51:35 2006 6.10 # 6.11 CONFIG_X86_64=y 6.12 CONFIG_64BIT=y 6.13 @@ -42,6 +42,7 @@ CONFIG_KOBJECT_UEVENT=y 6.14 # CONFIG_IKCONFIG is not set 6.15 # CONFIG_CPUSETS is not set 6.16 CONFIG_INITRAMFS_SOURCE="" 6.17 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 6.18 # CONFIG_EMBEDDED is not set 6.19 CONFIG_KALLSYMS=y 6.20 # CONFIG_KALLSYMS_ALL is not set 6.21 @@ -72,6 +73,24 @@ CONFIG_KMOD=y 6.22 CONFIG_STOP_MACHINE=y 6.23 6.24 # 6.25 +# Block layer 6.26 +# 6.27 +CONFIG_LBD=y 6.28 + 6.29 +# 6.30 +# IO Schedulers 6.31 +# 6.32 +CONFIG_IOSCHED_NOOP=y 6.33 +CONFIG_IOSCHED_AS=y 6.34 +CONFIG_IOSCHED_DEADLINE=y 6.35 +CONFIG_IOSCHED_CFQ=y 6.36 +CONFIG_DEFAULT_AS=y 6.37 +# CONFIG_DEFAULT_DEADLINE is not set 6.38 +# CONFIG_DEFAULT_CFQ is not set 6.39 +# CONFIG_DEFAULT_NOOP is not set 6.40 +CONFIG_DEFAULT_IOSCHED="anticipatory" 6.41 + 6.42 +# 6.43 # Processor type and features 6.44 # 6.45 # CONFIG_MK8 is not set 6.46 @@ -92,7 +111,6 @@ CONFIG_PREEMPT_NONE=y 6.47 # CONFIG_PREEMPT_VOLUNTARY is not set 6.48 # CONFIG_PREEMPT is not set 6.49 CONFIG_PREEMPT_BKL=y 6.50 -# CONFIG_NUMA is not set 6.51 CONFIG_ARCH_FLATMEM_ENABLE=y 6.52 CONFIG_SELECT_MEMORY_MODEL=y 6.53 CONFIG_FLATMEM_MANUAL=y 6.54 @@ -101,6 +119,7 @@ CONFIG_FLATMEM_MANUAL=y 6.55 CONFIG_FLATMEM=y 6.56 CONFIG_FLAT_NODE_MEM_MAP=y 6.57 # CONFIG_SPARSEMEM_STATIC is not set 6.58 +CONFIG_SPLIT_PTLOCK_CPUS=4096 6.59 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 6.60 CONFIG_NR_CPUS=8 6.61 # CONFIG_HOTPLUG_CPU is not set 6.62 @@ -259,6 +278,10 @@ CONFIG_IPV6_TUNNEL=m 6.63 CONFIG_NETFILTER=y 6.64 # CONFIG_NETFILTER_DEBUG is not set 6.65 CONFIG_BRIDGE_NETFILTER=y 6.66 + 6.67 +# 6.68 +# Core Netfilter Configuration 6.69 +# 6.70 CONFIG_NETFILTER_NETLINK=m 6.71 CONFIG_NETFILTER_NETLINK_QUEUE=m 6.72 CONFIG_NETFILTER_NETLINK_LOG=m 6.73 @@ -444,10 +467,18 @@ CONFIG_IPDDP_DECAP=y 6.74 CONFIG_NET_DIVERT=y 6.75 # CONFIG_ECONET is not set 6.76 CONFIG_WAN_ROUTER=m 6.77 + 6.78 +# 6.79 +# QoS and/or fair queueing 6.80 +# 6.81 CONFIG_NET_SCHED=y 6.82 CONFIG_NET_SCH_CLK_JIFFIES=y 6.83 # CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set 6.84 # CONFIG_NET_SCH_CLK_CPU is not set 6.85 + 6.86 +# 6.87 +# Queueing/Scheduling 6.88 +# 6.89 CONFIG_NET_SCH_CBQ=m 6.90 CONFIG_NET_SCH_HTB=m 6.91 CONFIG_NET_SCH_HFSC=m 6.92 @@ -461,8 +492,10 @@ CONFIG_NET_SCH_GRED=m 6.93 CONFIG_NET_SCH_DSMARK=m 6.94 CONFIG_NET_SCH_NETEM=m 6.95 CONFIG_NET_SCH_INGRESS=m 6.96 -CONFIG_NET_QOS=y 6.97 -CONFIG_NET_ESTIMATOR=y 6.98 + 6.99 +# 6.100 +# Classification 6.101 +# 6.102 CONFIG_NET_CLS=y 6.103 CONFIG_NET_CLS_BASIC=m 6.104 CONFIG_NET_CLS_TCINDEX=m 6.105 @@ -471,7 +504,6 @@ CONFIG_NET_CLS_ROUTE=y 6.106 CONFIG_NET_CLS_FW=m 6.107 CONFIG_NET_CLS_U32=m 6.108 CONFIG_CLS_U32_PERF=y 6.109 -CONFIG_NET_CLS_IND=y 6.110 CONFIG_CLS_U32_MARK=y 6.111 CONFIG_NET_CLS_RSVP=m 6.112 CONFIG_NET_CLS_RSVP6=m 6.113 @@ -484,6 +516,8 @@ CONFIG_NET_EMATCH_META=m 6.114 CONFIG_NET_EMATCH_TEXT=m 6.115 # CONFIG_NET_CLS_ACT is not set 6.116 CONFIG_NET_CLS_POLICE=y 6.117 +CONFIG_NET_CLS_IND=y 6.118 +CONFIG_NET_ESTIMATOR=y 6.119 6.120 # 6.121 # Network testing 6.122 @@ -570,7 +604,6 @@ CONFIG_BT_HCIUSB_SCO=y 6.123 CONFIG_BT_HCIUART=m 6.124 CONFIG_BT_HCIUART_H4=y 6.125 CONFIG_BT_HCIUART_BCSP=y 6.126 -CONFIG_BT_HCIUART_BCSP_TXCRC=y 6.127 CONFIG_BT_HCIBCM203X=m 6.128 CONFIG_BT_HCIBPA10X=m 6.129 CONFIG_BT_HCIBFUSB=m 6.130 @@ -621,6 +654,7 @@ CONFIG_FTL=m 6.131 CONFIG_NFTL=m 6.132 CONFIG_NFTL_RW=y 6.133 CONFIG_INFTL=m 6.134 +CONFIG_RFD_FTL=m 6.135 6.136 # 6.137 # RAM/ROM/Flash chip drivers 6.138 @@ -703,6 +737,12 @@ CONFIG_MTD_NAND_IDS=m 6.139 # CONFIG_MTD_NAND_NANDSIM is not set 6.140 6.141 # 6.142 +# OneNAND Flash Device Drivers 6.143 +# 6.144 +CONFIG_MTD_ONENAND=m 6.145 +# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set 6.146 + 6.147 +# 6.148 # Parallel port support 6.149 # 6.150 CONFIG_PARPORT=m 6.151 @@ -767,18 +807,9 @@ CONFIG_BLK_DEV_RAM=y 6.152 CONFIG_BLK_DEV_RAM_COUNT=16 6.153 CONFIG_BLK_DEV_RAM_SIZE=16384 6.154 CONFIG_BLK_DEV_INITRD=y 6.155 -CONFIG_LBD=y 6.156 CONFIG_CDROM_PKTCDVD=m 6.157 CONFIG_CDROM_PKTCDVD_BUFFERS=8 6.158 # CONFIG_CDROM_PKTCDVD_WCACHE is not set 6.159 - 6.160 -# 6.161 -# IO Schedulers 6.162 -# 6.163 -CONFIG_IOSCHED_NOOP=y 6.164 -CONFIG_IOSCHED_AS=y 6.165 -CONFIG_IOSCHED_DEADLINE=y 6.166 -CONFIG_IOSCHED_CFQ=y 6.167 CONFIG_ATA_OVER_ETH=m 6.168 6.169 # 6.170 @@ -885,6 +916,7 @@ CONFIG_SCSI_SAS_ATTRS=m 6.171 # 6.172 # SCSI low-level drivers 6.173 # 6.174 +CONFIG_ISCSI_TCP=m 6.175 CONFIG_BLK_DEV_3W_XXXX_RAID=m 6.176 CONFIG_SCSI_3W_9XXX=m 6.177 CONFIG_SCSI_ACARD=m 6.178 @@ -914,10 +946,12 @@ CONFIG_SCSI_SATA_SVW=m 6.179 CONFIG_SCSI_ATA_PIIX=y 6.180 CONFIG_SCSI_SATA_MV=m 6.181 CONFIG_SCSI_SATA_NV=m 6.182 +CONFIG_SCSI_PDC_ADMA=m 6.183 +CONFIG_SCSI_SATA_QSTOR=m 6.184 CONFIG_SCSI_SATA_PROMISE=m 6.185 -CONFIG_SCSI_SATA_QSTOR=m 6.186 CONFIG_SCSI_SATA_SX4=m 6.187 CONFIG_SCSI_SATA_SIL=m 6.188 +CONFIG_SCSI_SATA_SIL24=m 6.189 CONFIG_SCSI_SATA_SIS=m 6.190 CONFIG_SCSI_SATA_ULI=m 6.191 CONFIG_SCSI_SATA_VIA=m 6.192 @@ -925,7 +959,6 @@ CONFIG_SCSI_SATA_VITESSE=m 6.193 CONFIG_SCSI_SATA_INTEL_COMBINED=y 6.194 CONFIG_SCSI_BUSLOGIC=m 6.195 # CONFIG_SCSI_OMIT_FLASHPOINT is not set 6.196 -# CONFIG_SCSI_CPQFCTS is not set 6.197 # CONFIG_SCSI_DMX3191D is not set 6.198 # CONFIG_SCSI_EATA is not set 6.199 # CONFIG_SCSI_EATA_PIO is not set 6.200 @@ -944,10 +977,8 @@ CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 6.201 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 6.202 # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set 6.203 # CONFIG_SCSI_IPR is not set 6.204 -# CONFIG_SCSI_QLOGIC_ISP is not set 6.205 # CONFIG_SCSI_QLOGIC_FC is not set 6.206 CONFIG_SCSI_QLOGIC_1280=m 6.207 -CONFIG_SCSI_QLOGIC_1280_1040=y 6.208 CONFIG_SCSI_QLA2XXX=y 6.209 CONFIG_SCSI_QLA21XX=m 6.210 CONFIG_SCSI_QLA22XX=m 6.211 @@ -1055,7 +1086,6 @@ CONFIG_TUN=m 6.212 # PHY device support 6.213 # 6.214 CONFIG_PHYLIB=m 6.215 -CONFIG_PHYCONTROL=y 6.216 6.217 # 6.218 # MII PHY device drivers 6.219 @@ -1152,7 +1182,6 @@ CONFIG_IXGB=m 6.220 CONFIG_IXGB_NAPI=y 6.221 CONFIG_S2IO=m 6.222 CONFIG_S2IO_NAPI=y 6.223 -# CONFIG_2BUFF_MODE is not set 6.224 6.225 # 6.226 # Token Ring devices 6.227 @@ -1208,6 +1237,7 @@ CONFIG_NET_WIRELESS=y 6.228 # 6.229 # ATM drivers 6.230 # 6.231 +CONFIG_ATM_DUMMY=m 6.232 CONFIG_ATM_TCP=m 6.233 CONFIG_ATM_LANAI=m 6.234 CONFIG_ATM_ENI=m 6.235 @@ -1239,6 +1269,7 @@ CONFIG_PPP_ASYNC=m 6.236 CONFIG_PPP_SYNC_TTY=m 6.237 CONFIG_PPP_DEFLATE=m 6.238 # CONFIG_PPP_BSDCOMP is not set 6.239 +CONFIG_PPP_MPPE=m 6.240 CONFIG_PPPOE=m 6.241 CONFIG_PPPOATM=m 6.242 CONFIG_SLIP=m 6.243 @@ -1466,7 +1497,6 @@ CONFIG_HW_CONSOLE=y 6.244 # 6.245 # Serial drivers 6.246 # 6.247 -# CONFIG_SERIAL_8250 is not set 6.248 6.249 # 6.250 # Non-8250 serial port support 6.251 @@ -1558,6 +1588,7 @@ CONFIG_HANGCHECK_TIMER=m 6.252 # TPM devices 6.253 # 6.254 # CONFIG_TCG_TPM is not set 6.255 +CONFIG_TELCLOCK=m 6.256 6.257 # 6.258 # I2C support 6.259 @@ -1611,6 +1642,7 @@ CONFIG_SENSORS_PCA9539=m 6.260 CONFIG_SENSORS_PCF8591=m 6.261 CONFIG_SENSORS_RTC8564=m 6.262 CONFIG_SENSORS_MAX6875=m 6.263 +CONFIG_RTC_X1205_I2C=m 6.264 # CONFIG_I2C_DEBUG_CORE is not set 6.265 # CONFIG_I2C_DEBUG_ALGO is not set 6.266 # CONFIG_I2C_DEBUG_BUS is not set 6.267 @@ -1692,6 +1724,7 @@ CONFIG_VIDEO_DEV=m 6.268 # Video Adapters 6.269 # 6.270 CONFIG_VIDEO_BT848=m 6.271 +# CONFIG_VIDEO_BT848_DVB is not set 6.272 CONFIG_VIDEO_SAA6588=m 6.273 CONFIG_VIDEO_BWQCAM=m 6.274 CONFIG_VIDEO_CQCAM=m 6.275 @@ -1711,14 +1744,20 @@ CONFIG_VIDEO_ZORAN_LML33=m 6.276 CONFIG_VIDEO_ZORAN_LML33R10=m 6.277 # CONFIG_VIDEO_ZR36120 is not set 6.278 CONFIG_VIDEO_SAA7134=m 6.279 +CONFIG_VIDEO_SAA7134_ALSA=m 6.280 CONFIG_VIDEO_SAA7134_DVB=m 6.281 +CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y 6.282 CONFIG_VIDEO_MXB=m 6.283 CONFIG_VIDEO_DPC=m 6.284 CONFIG_VIDEO_HEXIUM_ORION=m 6.285 CONFIG_VIDEO_HEXIUM_GEMINI=m 6.286 CONFIG_VIDEO_CX88=m 6.287 CONFIG_VIDEO_CX88_DVB=m 6.288 +CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y 6.289 +CONFIG_VIDEO_EM28XX=m 6.290 CONFIG_VIDEO_OVCAMCHIP=m 6.291 +CONFIG_VIDEO_AUDIO_DECODER=m 6.292 +CONFIG_VIDEO_DECODER=m 6.293 6.294 # 6.295 # Radio Adapters 6.296 @@ -1831,6 +1870,7 @@ CONFIG_DVB_STV0297=m 6.297 # ATSC (North American/Korean Terresterial DTV) frontends 6.298 # 6.299 CONFIG_DVB_NXT2002=m 6.300 +CONFIG_DVB_NXT200X=m 6.301 CONFIG_DVB_OR51211=m 6.302 CONFIG_DVB_OR51132=m 6.303 CONFIG_DVB_BCM3510=m 6.304 @@ -1852,7 +1892,6 @@ CONFIG_FB=y 6.305 CONFIG_FB_CFB_FILLRECT=y 6.306 CONFIG_FB_CFB_COPYAREA=y 6.307 CONFIG_FB_CFB_IMAGEBLIT=y 6.308 -CONFIG_FB_SOFT_CURSOR=y 6.309 # CONFIG_FB_MACMODES is not set 6.310 CONFIG_FB_MODE_HELPERS=y 6.311 CONFIG_FB_TILEBLITTING=y 6.312 @@ -1866,6 +1905,7 @@ CONFIG_FB_VGA16=m 6.313 CONFIG_FB_VESA=y 6.314 CONFIG_VIDEO_SELECT=y 6.315 # CONFIG_FB_HGA is not set 6.316 +# CONFIG_FB_S1D13XXX is not set 6.317 # CONFIG_FB_NVIDIA is not set 6.318 CONFIG_FB_RIVA=m 6.319 # CONFIG_FB_RIVA_I2C is not set 6.320 @@ -1901,7 +1941,6 @@ CONFIG_FB_TRIDENT=m 6.321 CONFIG_FB_TRIDENT_ACCEL=y 6.322 # CONFIG_FB_PM3 is not set 6.323 # CONFIG_FB_GEODE is not set 6.324 -# CONFIG_FB_S1D13XXX is not set 6.325 # CONFIG_FB_VIRTUAL is not set 6.326 6.327 # 6.328 @@ -1910,6 +1949,7 @@ CONFIG_FB_TRIDENT_ACCEL=y 6.329 CONFIG_VGA_CONSOLE=y 6.330 CONFIG_DUMMY_CONSOLE=y 6.331 CONFIG_FRAMEBUFFER_CONSOLE=y 6.332 +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set 6.333 # CONFIG_FONTS is not set 6.334 CONFIG_FONT_8x8=y 6.335 CONFIG_FONT_8x16=y 6.336 @@ -1936,6 +1976,8 @@ CONFIG_SOUND=m 6.337 # Advanced Linux Sound Architecture 6.338 # 6.339 CONFIG_SND=m 6.340 +CONFIG_SND_AC97_CODEC=m 6.341 +CONFIG_SND_AC97_BUS=m 6.342 CONFIG_SND_TIMER=m 6.343 CONFIG_SND_PCM=m 6.344 CONFIG_SND_HWDEP=m 6.345 @@ -1963,8 +2005,6 @@ CONFIG_SND_VIRMIDI=m 6.346 CONFIG_SND_MTPAV=m 6.347 # CONFIG_SND_SERIAL_U16550 is not set 6.348 CONFIG_SND_MPU401=m 6.349 -CONFIG_SND_AC97_CODEC=m 6.350 -CONFIG_SND_AC97_BUS=m 6.351 6.352 # 6.353 # PCI devices 6.354 @@ -2059,15 +2099,15 @@ CONFIG_USB_SL811_HCD=m 6.355 # USB Device Class drivers 6.356 # 6.357 # CONFIG_OBSOLETE_OSS_USB_DRIVER is not set 6.358 - 6.359 -# 6.360 -# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem 6.361 -# 6.362 CONFIG_USB_ACM=m 6.363 CONFIG_USB_PRINTER=m 6.364 6.365 # 6.366 -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information 6.367 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 6.368 +# 6.369 + 6.370 +# 6.371 +# may also be needed; see USB_STORAGE Help for more information 6.372 # 6.373 CONFIG_USB_STORAGE=m 6.374 # CONFIG_USB_STORAGE_DEBUG is not set 6.375 @@ -2079,7 +2119,6 @@ CONFIG_USB_STORAGE_USBAT=y 6.376 CONFIG_USB_STORAGE_SDDR09=y 6.377 CONFIG_USB_STORAGE_SDDR55=y 6.378 CONFIG_USB_STORAGE_JUMPSHOT=y 6.379 -CONFIG_USB_STORAGE_ONETOUCH=y 6.380 6.381 # 6.382 # USB Input Devices 6.383 @@ -2161,6 +2200,7 @@ CONFIG_USB_USS720=m 6.384 CONFIG_USB_SERIAL=m 6.385 CONFIG_USB_SERIAL_GENERIC=y 6.386 CONFIG_USB_SERIAL_AIRPRIME=m 6.387 +CONFIG_USB_SERIAL_ANYDATA=m 6.388 CONFIG_USB_SERIAL_BELKIN=m 6.389 CONFIG_USB_SERIAL_WHITEHEAT=m 6.390 CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m 6.391 @@ -2252,6 +2292,7 @@ CONFIG_INFINIBAND_MTHCA=m 6.392 # CONFIG_INFINIBAND_MTHCA_DEBUG is not set 6.393 CONFIG_INFINIBAND_IPOIB=m 6.394 # CONFIG_INFINIBAND_IPOIB_DEBUG is not set 6.395 +CONFIG_INFINIBAND_SRP=m 6.396 6.397 # 6.398 # SN Devices 6.399 @@ -2293,7 +2334,7 @@ CONFIG_JFS_SECURITY=y 6.400 CONFIG_FS_POSIX_ACL=y 6.401 CONFIG_XFS_FS=m 6.402 CONFIG_XFS_EXPORT=y 6.403 -CONFIG_XFS_QUOTA=m 6.404 +# CONFIG_XFS_QUOTA is not set 6.405 CONFIG_XFS_SECURITY=y 6.406 CONFIG_XFS_POSIX_ACL=y 6.407 # CONFIG_XFS_RT is not set 6.408 @@ -2355,6 +2396,7 @@ CONFIG_EFS_FS=m 6.409 CONFIG_JFFS2_FS=m 6.410 CONFIG_JFFS2_FS_DEBUG=0 6.411 CONFIG_JFFS2_FS_WRITEBUFFER=y 6.412 +# CONFIG_JFFS2_SUMMARY is not set 6.413 # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 6.414 CONFIG_JFFS2_ZLIB=y 6.415 CONFIG_JFFS2_RTIME=y 6.416 @@ -2474,9 +2516,10 @@ CONFIG_NLS_KOI8_U=m 6.417 CONFIG_NLS_UTF8=m 6.418 6.419 # 6.420 -# Profiling support 6.421 +# Instrumentation Support 6.422 # 6.423 # CONFIG_PROFILING is not set 6.424 +# CONFIG_KPROBES is not set 6.425 6.426 # 6.427 # Kernel hacking 6.428 @@ -2492,9 +2535,10 @@ CONFIG_DETECT_SOFTLOCKUP=y 6.429 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 6.430 # CONFIG_DEBUG_KOBJECT is not set 6.431 # CONFIG_DEBUG_FS is not set 6.432 +# CONFIG_DEBUG_VM is not set 6.433 # CONFIG_FRAME_POINTER is not set 6.434 +# CONFIG_RCU_TORTURE_TEST is not set 6.435 # CONFIG_INIT_DEBUG is not set 6.436 -# CONFIG_KPROBES is not set 6.437 6.438 # 6.439 # Security options
7.1 --- a/buildconfigs/mk.linux-2.6-xen Wed Feb 01 17:06:16 2006 +0000 7.2 +++ b/buildconfigs/mk.linux-2.6-xen Wed Feb 01 18:00:19 2006 +0000 7.3 @@ -2,7 +2,7 @@ 7.4 OS = linux 7.5 7.6 LINUX_SERIES = 2.6 7.7 -LINUX_VER = 2.6.14 7.8 +LINUX_VER = 2.6.15 7.9 7.10 EXTRAVERSION ?= xen 7.11
8.1 --- a/linux-2.6-xen-sparse/arch/i386/Kconfig Wed Feb 01 17:06:16 2006 +0000 8.2 +++ b/linux-2.6-xen-sparse/arch/i386/Kconfig Wed Feb 01 18:00:19 2006 +0000 8.3 @@ -5,7 +5,7 @@ 8.4 8.5 mainmenu "Linux Kernel Configuration" 8.6 8.7 -config X86 8.8 +config X86_32 8.9 bool 8.10 default y 8.11 help 8.12 @@ -18,6 +18,10 @@ config SEMAPHORE_SLEEPERS 8.13 bool 8.14 default y 8.15 8.16 +config X86 8.17 + bool 8.18 + default y 8.19 + 8.20 config MMU 8.21 bool 8.22 default y 8.23 @@ -160,304 +164,7 @@ config ES7000_CLUSTERED_APIC 8.24 default y 8.25 depends on SMP && X86_ES7000 && MPENTIUMIII 8.26 8.27 -if !X86_ELAN 8.28 - 8.29 -choice 8.30 - prompt "Processor family" 8.31 - default M686 8.32 - 8.33 -config M386 8.34 - bool "386" 8.35 - ---help--- 8.36 - This is the processor type of your CPU. This information is used for 8.37 - optimizing purposes. In order to compile a kernel that can run on 8.38 - all x86 CPU types (albeit not optimally fast), you can specify 8.39 - "386" here. 8.40 - 8.41 - The kernel will not necessarily run on earlier architectures than 8.42 - the one you have chosen, e.g. a Pentium optimized kernel will run on 8.43 - a PPro, but not necessarily on a i486. 8.44 - 8.45 - Here are the settings recommended for greatest speed: 8.46 - - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI 8.47 - 486DLC/DLC2, UMC 486SX-S and NexGen Nx586. Only "386" kernels 8.48 - will run on a 386 class machine. 8.49 - - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or 8.50 - SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S. 8.51 - - "586" for generic Pentium CPUs lacking the TSC 8.52 - (time stamp counter) register. 8.53 - - "Pentium-Classic" for the Intel Pentium. 8.54 - - "Pentium-MMX" for the Intel Pentium MMX. 8.55 - - "Pentium-Pro" for the Intel Pentium Pro. 8.56 - - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron. 8.57 - - "Pentium-III" for the Intel Pentium III or Coppermine Celeron. 8.58 - - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron. 8.59 - - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D). 8.60 - - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird). 8.61 - - "Crusoe" for the Transmeta Crusoe series. 8.62 - - "Efficeon" for the Transmeta Efficeon series. 8.63 - - "Winchip-C6" for original IDT Winchip. 8.64 - - "Winchip-2" for IDT Winchip 2. 8.65 - - "Winchip-2A" for IDT Winchips with 3dNow! capabilities. 8.66 - - "GeodeGX1" for Geode GX1 (Cyrix MediaGX). 8.67 - - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3. 8.68 - - "VIA C3-2 for VIA C3-2 "Nehemiah" (model 9 and above). 8.69 - 8.70 - If you don't know what to do, choose "386". 8.71 - 8.72 -config M486 8.73 - bool "486" 8.74 - help 8.75 - Select this for a 486 series processor, either Intel or one of the 8.76 - compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX, 8.77 - DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or 8.78 - U5S. 8.79 - 8.80 -config M586 8.81 - bool "586/K5/5x86/6x86/6x86MX" 8.82 - help 8.83 - Select this for an 586 or 686 series processor such as the AMD K5, 8.84 - the Cyrix 5x86, 6x86 and 6x86MX. This choice does not 8.85 - assume the RDTSC (Read Time Stamp Counter) instruction. 8.86 - 8.87 -config M586TSC 8.88 - bool "Pentium-Classic" 8.89 - help 8.90 - Select this for a Pentium Classic processor with the RDTSC (Read 8.91 - Time Stamp Counter) instruction for benchmarking. 8.92 - 8.93 -config M586MMX 8.94 - bool "Pentium-MMX" 8.95 - help 8.96 - Select this for a Pentium with the MMX graphics/multimedia 8.97 - extended instructions. 8.98 - 8.99 -config M686 8.100 - bool "Pentium-Pro" 8.101 - help 8.102 - Select this for Intel Pentium Pro chips. This enables the use of 8.103 - Pentium Pro extended instructions, and disables the init-time guard 8.104 - against the f00f bug found in earlier Pentiums. 8.105 - 8.106 -config MPENTIUMII 8.107 - bool "Pentium-II/Celeron(pre-Coppermine)" 8.108 - help 8.109 - Select this for Intel chips based on the Pentium-II and 8.110 - pre-Coppermine Celeron core. This option enables an unaligned 8.111 - copy optimization, compiles the kernel with optimization flags 8.112 - tailored for the chip, and applies any applicable Pentium Pro 8.113 - optimizations. 8.114 - 8.115 -config MPENTIUMIII 8.116 - bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon" 8.117 - help 8.118 - Select this for Intel chips based on the Pentium-III and 8.119 - Celeron-Coppermine core. This option enables use of some 8.120 - extended prefetch instructions in addition to the Pentium II 8.121 - extensions. 8.122 - 8.123 -config MPENTIUMM 8.124 - bool "Pentium M" 8.125 - help 8.126 - Select this for Intel Pentium M (not Pentium-4 M) 8.127 - notebook chips. 8.128 - 8.129 -config MPENTIUM4 8.130 - bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon" 8.131 - help 8.132 - Select this for Intel Pentium 4 chips. This includes the 8.133 - Pentium 4, P4-based Celeron and Xeon, and Pentium-4 M 8.134 - (not Pentium M) chips. This option enables compile flags 8.135 - optimized for the chip, uses the correct cache shift, and 8.136 - applies any applicable Pentium III optimizations. 8.137 - 8.138 -config MK6 8.139 - bool "K6/K6-II/K6-III" 8.140 - help 8.141 - Select this for an AMD K6-family processor. Enables use of 8.142 - some extended instructions, and passes appropriate optimization 8.143 - flags to GCC. 8.144 - 8.145 -config MK7 8.146 - bool "Athlon/Duron/K7" 8.147 - help 8.148 - Select this for an AMD Athlon K7-family processor. Enables use of 8.149 - some extended instructions, and passes appropriate optimization 8.150 - flags to GCC. 8.151 - 8.152 -config MK8 8.153 - bool "Opteron/Athlon64/Hammer/K8" 8.154 - help 8.155 - Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables 8.156 - use of some extended instructions, and passes appropriate optimization 8.157 - flags to GCC. 8.158 - 8.159 -config MCRUSOE 8.160 - bool "Crusoe" 8.161 - help 8.162 - Select this for a Transmeta Crusoe processor. Treats the processor 8.163 - like a 586 with TSC, and sets some GCC optimization flags (like a 8.164 - Pentium Pro with no alignment requirements). 8.165 - 8.166 -config MEFFICEON 8.167 - bool "Efficeon" 8.168 - help 8.169 - Select this for a Transmeta Efficeon processor. 8.170 - 8.171 -config MWINCHIPC6 8.172 - bool "Winchip-C6" 8.173 - help 8.174 - Select this for an IDT Winchip C6 chip. Linux and GCC 8.175 - treat this chip as a 586TSC with some extended instructions 8.176 - and alignment requirements. 8.177 - 8.178 -config MWINCHIP2 8.179 - bool "Winchip-2" 8.180 - help 8.181 - Select this for an IDT Winchip-2. Linux and GCC 8.182 - treat this chip as a 586TSC with some extended instructions 8.183 - and alignment requirements. 8.184 - 8.185 -config MWINCHIP3D 8.186 - bool "Winchip-2A/Winchip-3" 8.187 - help 8.188 - Select this for an IDT Winchip-2A or 3. Linux and GCC 8.189 - treat this chip as a 586TSC with some extended instructions 8.190 - and alignment reqirements. Also enable out of order memory 8.191 - stores for this CPU, which can increase performance of some 8.192 - operations. 8.193 - 8.194 -config MGEODEGX1 8.195 - bool "GeodeGX1" 8.196 - help 8.197 - Select this for a Geode GX1 (Cyrix MediaGX) chip. 8.198 - 8.199 -config MCYRIXIII 8.200 - bool "CyrixIII/VIA-C3" 8.201 - help 8.202 - Select this for a Cyrix III or C3 chip. Presently Linux and GCC 8.203 - treat this chip as a generic 586. Whilst the CPU is 686 class, 8.204 - it lacks the cmov extension which gcc assumes is present when 8.205 - generating 686 code. 8.206 - Note that Nehemiah (Model 9) and above will not boot with this 8.207 - kernel due to them lacking the 3DNow! instructions used in earlier 8.208 - incarnations of the CPU. 8.209 - 8.210 -config MVIAC3_2 8.211 - bool "VIA C3-2 (Nehemiah)" 8.212 - help 8.213 - Select this for a VIA C3 "Nehemiah". Selecting this enables usage 8.214 - of SSE and tells gcc to treat the CPU as a 686. 8.215 - Note, this kernel will not boot on older (pre model 9) C3s. 8.216 - 8.217 -endchoice 8.218 - 8.219 -config X86_GENERIC 8.220 - bool "Generic x86 support" 8.221 - help 8.222 - Instead of just including optimizations for the selected 8.223 - x86 variant (e.g. PII, Crusoe or Athlon), include some more 8.224 - generic optimizations as well. This will make the kernel 8.225 - perform better on x86 CPUs other than that selected. 8.226 - 8.227 - This is really intended for distributors who need more 8.228 - generic optimizations. 8.229 - 8.230 -endif 8.231 - 8.232 -# 8.233 -# Define implied options from the CPU selection here 8.234 -# 8.235 -config X86_CMPXCHG 8.236 - bool 8.237 - depends on !M386 8.238 - default y 8.239 - 8.240 -config X86_XADD 8.241 - bool 8.242 - depends on !M386 8.243 - default y 8.244 - 8.245 -config X86_L1_CACHE_SHIFT 8.246 - int 8.247 - default "7" if MPENTIUM4 || X86_GENERIC 8.248 - default "4" if X86_ELAN || M486 || M386 8.249 - default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODEGX1 8.250 - default "6" if MK7 || MK8 || MPENTIUMM 8.251 - 8.252 -config RWSEM_GENERIC_SPINLOCK 8.253 - bool 8.254 - depends on M386 8.255 - default y 8.256 - 8.257 -config RWSEM_XCHGADD_ALGORITHM 8.258 - bool 8.259 - depends on !M386 8.260 - default y 8.261 - 8.262 -config GENERIC_CALIBRATE_DELAY 8.263 - bool 8.264 - default y 8.265 - 8.266 -config X86_PPRO_FENCE 8.267 - bool 8.268 - depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1 8.269 - default y 8.270 - 8.271 -config X86_F00F_BUG 8.272 - bool 8.273 - depends on M586MMX || M586TSC || M586 || M486 || M386 8.274 - default y 8.275 - 8.276 -config X86_WP_WORKS_OK 8.277 - bool 8.278 - depends on !M386 8.279 - default y 8.280 - 8.281 -config X86_INVLPG 8.282 - bool 8.283 - depends on !M386 8.284 - default y 8.285 - 8.286 -config X86_BSWAP 8.287 - bool 8.288 - depends on !M386 8.289 - default y 8.290 - 8.291 -config X86_POPAD_OK 8.292 - bool 8.293 - depends on !M386 8.294 - default y 8.295 - 8.296 -config X86_ALIGNMENT_16 8.297 - bool 8.298 - depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1 8.299 - default y 8.300 - 8.301 -config X86_GOOD_APIC 8.302 - bool 8.303 - depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON 8.304 - default y 8.305 - 8.306 -config X86_INTEL_USERCOPY 8.307 - bool 8.308 - depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON 8.309 - default y 8.310 - 8.311 -config X86_USE_PPRO_CHECKSUM 8.312 - bool 8.313 - depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON 8.314 - default y 8.315 - 8.316 -config X86_USE_3DNOW 8.317 - bool 8.318 - depends on MCYRIXIII || MK7 8.319 - default y 8.320 - 8.321 -config X86_OOSTORE 8.322 - bool 8.323 - depends on (MWINCHIP3D || MWINCHIP2 || MWINCHIPC6) && MTRR 8.324 - default y 8.325 +source "arch/i386/Kconfig.cpu" 8.326 8.327 config HPET_TIMER 8.328 bool "HPET Timer Support" 8.329 @@ -1041,7 +748,7 @@ depends on PM && !(X86_VISWS || X86_XEN) 8.330 8.331 config APM 8.332 tristate "APM (Advanced Power Management) BIOS support" 8.333 - depends on PM 8.334 + depends on PM && PM_LEGACY 8.335 ---help--- 8.336 APM is a BIOS specification for saving power using several different 8.337 techniques. This is mostly useful for battery powered laptops with 8.338 @@ -1333,10 +1040,23 @@ source "drivers/Kconfig" 8.339 8.340 source "fs/Kconfig" 8.341 8.342 +menu "Instrumentation Support" 8.343 + depends on EXPERIMENTAL 8.344 + 8.345 if !X86_XEN 8.346 source "arch/i386/oprofile/Kconfig" 8.347 endif 8.348 8.349 +config KPROBES 8.350 + bool "Kprobes (EXPERIMENTAL)" 8.351 + help 8.352 + Kprobes allows you to trap at almost any kernel address and 8.353 + execute a callback function. register_kprobe() establishes 8.354 + a probepoint and specifies the callback. Kprobes is useful 8.355 + for kernel debugging, non-intrusive instrumentation and testing. 8.356 + If in doubt, say "N". 8.357 +endmenu 8.358 + 8.359 source "arch/i386/Kconfig.debug" 8.360 8.361 source "security/Kconfig" 8.362 @@ -1382,8 +1102,3 @@ config X86_TRAMPOLINE 8.363 bool 8.364 depends on X86_SMP || (X86_VOYAGER && SMP) 8.365 default y 8.366 - 8.367 -config PC 8.368 - bool 8.369 - depends on X86 && !EMBEDDED 8.370 - default y
9.1 --- a/linux-2.6-xen-sparse/arch/i386/Makefile Wed Feb 01 17:06:16 2006 +0000 9.2 +++ b/linux-2.6-xen-sparse/arch/i386/Makefile Wed Feb 01 18:00:19 2006 +0000 9.3 @@ -34,35 +34,8 @@ CFLAGS += -pipe -msoft-float 9.4 # prevent gcc from keeping the stack 16 byte aligned 9.5 CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 9.6 9.7 -align := $(cc-option-align) 9.8 -cflags-$(CONFIG_M386) += -march=i386 9.9 -cflags-$(CONFIG_M486) += -march=i486 9.10 -cflags-$(CONFIG_M586) += -march=i586 9.11 -cflags-$(CONFIG_M586TSC) += -march=i586 9.12 -cflags-$(CONFIG_M586MMX) += $(call cc-option,-march=pentium-mmx,-march=i586) 9.13 -cflags-$(CONFIG_M686) += -march=i686 9.14 -cflags-$(CONFIG_MPENTIUMII) += -march=i686 $(call cc-option,-mtune=pentium2) 9.15 -cflags-$(CONFIG_MPENTIUMIII) += -march=i686 $(call cc-option,-mtune=pentium3) 9.16 -cflags-$(CONFIG_MPENTIUMM) += -march=i686 $(call cc-option,-mtune=pentium3) 9.17 -cflags-$(CONFIG_MPENTIUM4) += -march=i686 $(call cc-option,-mtune=pentium4) 9.18 -cflags-$(CONFIG_MK6) += -march=k6 9.19 -# Please note, that patches that add -march=athlon-xp and friends are pointless. 9.20 -# They make zero difference whatsosever to performance at this time. 9.21 -cflags-$(CONFIG_MK7) += $(call cc-option,-march=athlon,-march=i686 $(align)-functions=4) 9.22 -cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8,$(call cc-option,-march=athlon,-march=i686 $(align)-functions=4)) 9.23 -cflags-$(CONFIG_MCRUSOE) += -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 9.24 -cflags-$(CONFIG_MEFFICEON) += -march=i686 $(call cc-option,-mtune=pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 9.25 -cflags-$(CONFIG_MWINCHIPC6) += $(call cc-option,-march=winchip-c6,-march=i586) 9.26 -cflags-$(CONFIG_MWINCHIP2) += $(call cc-option,-march=winchip2,-march=i586) 9.27 -cflags-$(CONFIG_MWINCHIP3D) += $(call cc-option,-march=winchip2,-march=i586) 9.28 -cflags-$(CONFIG_MCYRIXIII) += $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0 9.29 -cflags-$(CONFIG_MVIAC3_2) += $(call cc-option,-march=c3-2,-march=i686) 9.30 - 9.31 -# AMD Elan support 9.32 -cflags-$(CONFIG_X86_ELAN) += -march=i486 9.33 - 9.34 -# Geode GX1 support 9.35 -cflags-$(CONFIG_MGEODEGX1) += $(call cc-option,-march=pentium-mmx,-march=i486) 9.36 +# CPU-specific tuning. Anything which can be shared with UML should go here. 9.37 +include $(srctree)/arch/i386/Makefile.cpu 9.38 9.39 # -mregparm=3 works ok on gcc-3.0 and later 9.40 #
10.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/Makefile Wed Feb 01 17:06:16 2006 +0000 10.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/Makefile Wed Feb 01 18:00:19 2006 +0000 10.3 @@ -86,6 +86,7 @@ ifdef CONFIG_XEN 10.4 include $(srctree)/scripts/Makefile.xen 10.5 10.6 obj-y += fixup.o 10.7 +microcode-$(subst m,y,$(CONFIG_MICROCODE)) := microcode-xen.o 10.8 n-obj-xen := i8259.o doublefault.o timers/ reboot.o smpboot.o trampoline.o 10.9 10.10 obj-y := $(call filterxen, $(obj-y), $(n-obj-xen))
11.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/acpi/boot-xen.c Wed Feb 01 17:06:16 2006 +0000 11.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/acpi/boot-xen.c Wed Feb 01 18:00:19 2006 +0000 11.3 @@ -36,23 +36,17 @@ 11.4 #include <asm/apic.h> 11.5 #include <asm/io.h> 11.6 #include <asm/mpspec.h> 11.7 -#ifdef CONFIG_XEN 11.8 -#include <asm/fixmap.h> 11.9 -#endif 11.10 11.11 #ifdef CONFIG_X86_64 11.12 11.13 -static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id) 11.14 -{ 11.15 -} 11.16 extern void __init clustered_apic_check(void); 11.17 -static inline int ioapic_setup_disabled(void) 11.18 -{ 11.19 - return 0; 11.20 -} 11.21 11.22 +extern int gsi_irq_sharing(int gsi); 11.23 #include <asm/proto.h> 11.24 11.25 +static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return 0; } 11.26 + 11.27 + 11.28 #else /* X86 */ 11.29 11.30 #ifdef CONFIG_X86_LOCAL_APIC 11.31 @@ -60,6 +54,8 @@ static inline int ioapic_setup_disabled( 11.32 #include <mach_mpparse.h> 11.33 #endif /* CONFIG_X86_LOCAL_APIC */ 11.34 11.35 +static inline int gsi_irq_sharing(int gsi) { return gsi; } 11.36 + 11.37 #endif /* X86 */ 11.38 11.39 #define BAD_MADT_ENTRY(entry, end) ( \ 11.40 @@ -138,7 +134,7 @@ char *__acpi_map_table(unsigned long phy 11.41 int idx; 11.42 11.43 #ifndef CONFIG_XEN 11.44 - if (phys + size < 8 * 1024 * 1024) 11.45 + if (phys + size < 8 * 1024 * 1024) 11.46 return __va(phys); 11.47 #endif 11.48 11.49 @@ -254,9 +250,7 @@ acpi_parse_lapic(acpi_table_entry_header 11.50 11.51 acpi_table_print_madt_entry(header); 11.52 11.53 - /* no utility in registering a disabled processor */ 11.54 - if (processor->flags.enabled == 0) 11.55 - return 0; 11.56 + /* Register even disabled CPUs for cpu hotplug */ 11.57 11.58 x86_acpiid_to_apicid[processor->acpi_id] = processor->id; 11.59 11.60 @@ -464,7 +458,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned in 11.61 *irq = IO_APIC_VECTOR(gsi); 11.62 else 11.63 #endif 11.64 - *irq = gsi; 11.65 + *irq = gsi_irq_sharing(gsi); 11.66 return 0; 11.67 } 11.68 11.69 @@ -538,7 +532,7 @@ int acpi_unregister_ioapic(acpi_handle h 11.70 EXPORT_SYMBOL(acpi_unregister_ioapic); 11.71 11.72 static unsigned long __init 11.73 -acpi_scan_rsdp (unsigned long start, unsigned long length) 11.74 +acpi_scan_rsdp(unsigned long start, unsigned long length) 11.75 { 11.76 unsigned long offset = 0; 11.77 unsigned long sig_len = sizeof("RSD PTR ") - 1; 11.78 @@ -647,6 +641,13 @@ static int __init acpi_parse_fadt(unsign 11.79 return 0; 11.80 11.81 pmtmr_ioport = fadt->xpm_tmr_blk.address; 11.82 + /* 11.83 + * "X" fields are optional extensions to the original V1.0 11.84 + * fields, so we must selectively expand V1.0 fields if the 11.85 + * corresponding X field is zero. 11.86 + */ 11.87 + if (!pmtmr_ioport) 11.88 + pmtmr_ioport = fadt->V1_pm_tmr_blk; 11.89 } else { 11.90 /* FADT rev. 1 */ 11.91 pmtmr_ioport = fadt->V1_pm_tmr_blk;
12.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/apm.c Wed Feb 01 17:06:16 2006 +0000 12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 12.3 @@ -1,2420 +0,0 @@ 12.4 -/* -*- linux-c -*- 12.5 - * APM BIOS driver for Linux 12.6 - * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au) 12.7 - * 12.8 - * Initial development of this driver was funded by NEC Australia P/L 12.9 - * and NEC Corporation 12.10 - * 12.11 - * This program is free software; you can redistribute it and/or modify it 12.12 - * under the terms of the GNU General Public License as published by the 12.13 - * Free Software Foundation; either version 2, or (at your option) any 12.14 - * later version. 12.15 - * 12.16 - * This program is distributed in the hope that it will be useful, but 12.17 - * WITHOUT ANY WARRANTY; without even the implied warranty of 12.18 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12.19 - * General Public License for more details. 12.20 - * 12.21 - * October 1995, Rik Faith (faith@cs.unc.edu): 12.22 - * Minor enhancements and updates (to the patch set) for 1.3.x 12.23 - * Documentation 12.24 - * January 1996, Rik Faith (faith@cs.unc.edu): 12.25 - * Make /proc/apm easy to format (bump driver version) 12.26 - * March 1996, Rik Faith (faith@cs.unc.edu): 12.27 - * Prohibit APM BIOS calls unless apm_enabled. 12.28 - * (Thanks to Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>) 12.29 - * April 1996, Stephen Rothwell (sfr@canb.auug.org.au) 12.30 - * Version 1.0 and 1.1 12.31 - * May 1996, Version 1.2 12.32 - * Feb 1998, Version 1.3 12.33 - * Feb 1998, Version 1.4 12.34 - * Aug 1998, Version 1.5 12.35 - * Sep 1998, Version 1.6 12.36 - * Nov 1998, Version 1.7 12.37 - * Jan 1999, Version 1.8 12.38 - * Jan 1999, Version 1.9 12.39 - * Oct 1999, Version 1.10 12.40 - * Nov 1999, Version 1.11 12.41 - * Jan 2000, Version 1.12 12.42 - * Feb 2000, Version 1.13 12.43 - * Nov 2000, Version 1.14 12.44 - * Oct 2001, Version 1.15 12.45 - * Jan 2002, Version 1.16 12.46 - * Oct 2002, Version 1.16ac 12.47 - * 12.48 - * History: 12.49 - * 0.6b: first version in official kernel, Linux 1.3.46 12.50 - * 0.7: changed /proc/apm format, Linux 1.3.58 12.51 - * 0.8: fixed gcc 2.7.[12] compilation problems, Linux 1.3.59 12.52 - * 0.9: only call bios if bios is present, Linux 1.3.72 12.53 - * 1.0: use fixed device number, consolidate /proc/apm into this file, 12.54 - * Linux 1.3.85 12.55 - * 1.1: support user-space standby and suspend, power off after system 12.56 - * halted, Linux 1.3.98 12.57 - * 1.2: When resetting RTC after resume, take care so that the time 12.58 - * is only incorrect by 30-60mS (vs. 1S previously) (Gabor J. Toth 12.59 - * <jtoth@princeton.edu>); improve interaction between 12.60 - * screen-blanking and gpm (Stephen Rothwell); Linux 1.99.4 12.61 - * 1.2a:Simple change to stop mysterious bug reports with SMP also added 12.62 - * levels to the printk calls. APM is not defined for SMP machines. 12.63 - * The new replacment for it is, but Linux doesn't yet support this. 12.64 - * Alan Cox Linux 2.1.55 12.65 - * 1.3: Set up a valid data descriptor 0x40 for buggy BIOS's 12.66 - * 1.4: Upgraded to support APM 1.2. Integrated ThinkPad suspend patch by 12.67 - * Dean Gaudet <dgaudet@arctic.org>. 12.68 - * C. Scott Ananian <cananian@alumni.princeton.edu> Linux 2.1.87 12.69 - * 1.5: Fix segment register reloading (in case of bad segments saved 12.70 - * across BIOS call). 12.71 - * Stephen Rothwell 12.72 - * 1.6: Cope with complier/assembler differences. 12.73 - * Only try to turn off the first display device. 12.74 - * Fix OOPS at power off with no APM BIOS by Jan Echternach 12.75 - * <echter@informatik.uni-rostock.de> 12.76 - * Stephen Rothwell 12.77 - * 1.7: Modify driver's cached copy of the disabled/disengaged flags 12.78 - * to reflect current state of APM BIOS. 12.79 - * Chris Rankin <rankinc@bellsouth.net> 12.80 - * Reset interrupt 0 timer to 100Hz after suspend 12.81 - * Chad Miller <cmiller@surfsouth.com> 12.82 - * Add CONFIG_APM_IGNORE_SUSPEND_BOUNCE 12.83 - * Richard Gooch <rgooch@atnf.csiro.au> 12.84 - * Allow boot time disabling of APM 12.85 - * Make boot messages far less verbose by default 12.86 - * Make asm safer 12.87 - * Stephen Rothwell 12.88 - * 1.8: Add CONFIG_APM_RTC_IS_GMT 12.89 - * Richard Gooch <rgooch@atnf.csiro.au> 12.90 - * change APM_NOINTS to CONFIG_APM_ALLOW_INTS 12.91 - * remove dependency on CONFIG_PROC_FS 12.92 - * Stephen Rothwell 12.93 - * 1.9: Fix small typo. <laslo@wodip.opole.pl> 12.94 - * Try to cope with BIOS's that need to have all display 12.95 - * devices blanked and not just the first one. 12.96 - * Ross Paterson <ross@soi.city.ac.uk> 12.97 - * Fix segment limit setting it has always been wrong as 12.98 - * the segments needed to have byte granularity. 12.99 - * Mark a few things __init. 12.100 - * Add hack to allow power off of SMP systems by popular request. 12.101 - * Use CONFIG_SMP instead of __SMP__ 12.102 - * Ignore BOUNCES for three seconds. 12.103 - * Stephen Rothwell 12.104 - * 1.10: Fix for Thinkpad return code. 12.105 - * Merge 2.2 and 2.3 drivers. 12.106 - * Remove APM dependencies in arch/i386/kernel/process.c 12.107 - * Remove APM dependencies in drivers/char/sysrq.c 12.108 - * Reset time across standby. 12.109 - * Allow more inititialisation on SMP. 12.110 - * Remove CONFIG_APM_POWER_OFF and make it boot time 12.111 - * configurable (default on). 12.112 - * Make debug only a boot time parameter (remove APM_DEBUG). 12.113 - * Try to blank all devices on any error. 12.114 - * 1.11: Remove APM dependencies in drivers/char/console.c 12.115 - * Check nr_running to detect if we are idle (from 12.116 - * Borislav Deianov <borislav@lix.polytechnique.fr>) 12.117 - * Fix for bioses that don't zero the top part of the 12.118 - * entrypoint offset (Mario Sitta <sitta@al.unipmn.it>) 12.119 - * (reported by Panos Katsaloulis <teras@writeme.com>). 12.120 - * Real mode power off patch (Walter Hofmann 12.121 - * <Walter.Hofmann@physik.stud.uni-erlangen.de>). 12.122 - * 1.12: Remove CONFIG_SMP as the compiler will optimize 12.123 - * the code away anyway (smp_num_cpus == 1 in UP) 12.124 - * noted by Artur Skawina <skawina@geocities.com>. 12.125 - * Make power off under SMP work again. 12.126 - * Fix thinko with initial engaging of BIOS. 12.127 - * Make sure power off only happens on CPU 0 12.128 - * (Paul "Rusty" Russell <rusty@rustcorp.com.au>). 12.129 - * Do error notification to user mode if BIOS calls fail. 12.130 - * Move entrypoint offset fix to ...boot/setup.S 12.131 - * where it belongs (Cosmos <gis88564@cis.nctu.edu.tw>). 12.132 - * Remove smp-power-off. SMP users must now specify 12.133 - * "apm=power-off" on the kernel command line. Suggested 12.134 - * by Jim Avera <jima@hal.com>, modified by Alan Cox 12.135 - * <alan@lxorguk.ukuu.org.uk>. 12.136 - * Register the /proc/apm entry even on SMP so that 12.137 - * scripts that check for it before doing power off 12.138 - * work (Jim Avera <jima@hal.com>). 12.139 - * 1.13: Changes for new pm_ interfaces (Andy Henroid 12.140 - * <andy_henroid@yahoo.com>). 12.141 - * Modularize the code. 12.142 - * Fix the Thinkpad (again) :-( (CONFIG_APM_IGNORE_MULTIPLE_SUSPENDS 12.143 - * is now the way life works). 12.144 - * Fix thinko in suspend() (wrong return). 12.145 - * Notify drivers on critical suspend. 12.146 - * Make kapmd absorb more idle time (Pavel Machek <pavel@suse.cz> 12.147 - * modified by sfr). 12.148 - * Disable interrupts while we are suspended (Andy Henroid 12.149 - * <andy_henroid@yahoo.com> fixed by sfr). 12.150 - * Make power off work on SMP again (Tony Hoyle 12.151 - * <tmh@magenta-logic.com> and <zlatko@iskon.hr>) modified by sfr. 12.152 - * Remove CONFIG_APM_SUSPEND_BOUNCE. The bounce ignore 12.153 - * interval is now configurable. 12.154 - * 1.14: Make connection version persist across module unload/load. 12.155 - * Enable and engage power management earlier. 12.156 - * Disengage power management on module unload. 12.157 - * Changed to use the sysrq-register hack for registering the 12.158 - * power off function called by magic sysrq based upon discussions 12.159 - * in irc://irc.openprojects.net/#kernelnewbies 12.160 - * (Crutcher Dunnavant <crutcher+kernel@datastacks.com>). 12.161 - * Make CONFIG_APM_REAL_MODE_POWER_OFF run time configurable. 12.162 - * (Arjan van de Ven <arjanv@redhat.com>) modified by sfr. 12.163 - * Work around byte swap bug in one of the Vaio's BIOS's 12.164 - * (Marc Boucher <marc@mbsi.ca>). 12.165 - * Exposed the disable flag to dmi so that we can handle known 12.166 - * broken APM (Alan Cox <alan@redhat.com>). 12.167 - * 1.14ac: If the BIOS says "I slowed the CPU down" then don't spin 12.168 - * calling it - instead idle. (Alan Cox <alan@redhat.com>) 12.169 - * If an APM idle fails log it and idle sensibly 12.170 - * 1.15: Don't queue events to clients who open the device O_WRONLY. 12.171 - * Don't expect replies from clients who open the device O_RDONLY. 12.172 - * (Idea from Thomas Hood) 12.173 - * Minor waitqueue cleanups. (John Fremlin <chief@bandits.org>) 12.174 - * 1.16: Fix idle calling. (Andreas Steinmetz <ast@domdv.de> et al.) 12.175 - * Notify listeners of standby or suspend events before notifying 12.176 - * drivers. Return EBUSY to ioctl() if suspend is rejected. 12.177 - * (Russell King <rmk@arm.linux.org.uk> and Thomas Hood) 12.178 - * Ignore first resume after we generate our own resume event 12.179 - * after a suspend (Thomas Hood) 12.180 - * Daemonize now gets rid of our controlling terminal (sfr). 12.181 - * CONFIG_APM_CPU_IDLE now just affects the default value of 12.182 - * idle_threshold (sfr). 12.183 - * Change name of kernel apm daemon (as it no longer idles) (sfr). 12.184 - * 1.16ac: Fix up SMP support somewhat. You can now force SMP on and we 12.185 - * make _all_ APM calls on the CPU#0. Fix unsafe sign bug. 12.186 - * TODO: determine if its "boot CPU" or "CPU0" we want to lock to. 12.187 - * 12.188 - * APM 1.1 Reference: 12.189 - * 12.190 - * Intel Corporation, Microsoft Corporation. Advanced Power Management 12.191 - * (APM) BIOS Interface Specification, Revision 1.1, September 1993. 12.192 - * Intel Order Number 241704-001. Microsoft Part Number 781-110-X01. 12.193 - * 12.194 - * [This document is available free from Intel by calling 800.628.8686 (fax 12.195 - * 916.356.6100) or 800.548.4725; or via anonymous ftp from 12.196 - * ftp://ftp.intel.com/pub/IAL/software_specs/apmv11.doc. It is also 12.197 - * available from Microsoft by calling 206.882.8080.] 12.198 - * 12.199 - * APM 1.2 Reference: 12.200 - * Intel Corporation, Microsoft Corporation. Advanced Power Management 12.201 - * (APM) BIOS Interface Specification, Revision 1.2, February 1996. 12.202 - * 12.203 - * [This document is available from Microsoft at: 12.204 - * http://www.microsoft.com/hwdev/busbios/amp_12.htm] 12.205 - */ 12.206 - 12.207 -#include <linux/config.h> 12.208 -#include <linux/module.h> 12.209 - 12.210 -#include <linux/poll.h> 12.211 -#include <linux/types.h> 12.212 -#include <linux/stddef.h> 12.213 -#include <linux/timer.h> 12.214 -#include <linux/fcntl.h> 12.215 -#include <linux/slab.h> 12.216 -#include <linux/stat.h> 12.217 -#include <linux/proc_fs.h> 12.218 -#include <linux/miscdevice.h> 12.219 -#include <linux/apm_bios.h> 12.220 -#include <linux/init.h> 12.221 -#include <linux/time.h> 12.222 -#include <linux/sched.h> 12.223 -#include <linux/pm.h> 12.224 -#include <linux/device.h> 12.225 -#include <linux/kernel.h> 12.226 -#include <linux/smp.h> 12.227 -#include <linux/smp_lock.h> 12.228 -#include <linux/dmi.h> 12.229 -#include <linux/suspend.h> 12.230 - 12.231 -#include <asm/system.h> 12.232 -#include <asm/uaccess.h> 12.233 -#include <asm/desc.h> 12.234 -#include <asm/i8253.h> 12.235 - 12.236 -#include "io_ports.h" 12.237 - 12.238 -extern unsigned long get_cmos_time(void); 12.239 -extern void machine_real_restart(unsigned char *, int); 12.240 - 12.241 -#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT) 12.242 -extern int (*console_blank_hook)(int); 12.243 -#endif 12.244 - 12.245 -/* 12.246 - * The apm_bios device is one of the misc char devices. 12.247 - * This is its minor number. 12.248 - */ 12.249 -#define APM_MINOR_DEV 134 12.250 - 12.251 -/* 12.252 - * See Documentation/Config.help for the configuration options. 12.253 - * 12.254 - * Various options can be changed at boot time as follows: 12.255 - * (We allow underscores for compatibility with the modules code) 12.256 - * apm=on/off enable/disable APM 12.257 - * [no-]allow[-_]ints allow interrupts during BIOS calls 12.258 - * [no-]broken[-_]psr BIOS has a broken GetPowerStatus call 12.259 - * [no-]realmode[-_]power[-_]off switch to real mode before 12.260 - * powering off 12.261 - * [no-]debug log some debugging messages 12.262 - * [no-]power[-_]off power off on shutdown 12.263 - * [no-]smp Use apm even on an SMP box 12.264 - * bounce[-_]interval=<n> number of ticks to ignore suspend 12.265 - * bounces 12.266 - * idle[-_]threshold=<n> System idle percentage above which to 12.267 - * make APM BIOS idle calls. Set it to 12.268 - * 100 to disable. 12.269 - * idle[-_]period=<n> Period (in 1/100s of a second) over 12.270 - * which the idle percentage is 12.271 - * calculated. 12.272 - */ 12.273 - 12.274 -/* KNOWN PROBLEM MACHINES: 12.275 - * 12.276 - * U: TI 4000M TravelMate: BIOS is *NOT* APM compliant 12.277 - * [Confirmed by TI representative] 12.278 - * ?: ACER 486DX4/75: uses dseg 0040, in violation of APM specification 12.279 - * [Confirmed by BIOS disassembly] 12.280 - * [This may work now ...] 12.281 - * P: Toshiba 1950S: battery life information only gets updated after resume 12.282 - * P: Midwest Micro Soundbook Elite DX2/66 monochrome: screen blanking 12.283 - * broken in BIOS [Reported by Garst R. Reese <reese@isn.net>] 12.284 - * ?: AcerNote-950: oops on reading /proc/apm - workaround is a WIP 12.285 - * Neale Banks <neale@lowendale.com.au> December 2000 12.286 - * 12.287 - * Legend: U = unusable with APM patches 12.288 - * P = partially usable with APM patches 12.289 - */ 12.290 - 12.291 -/* 12.292 - * Define as 1 to make the driver always call the APM BIOS busy 12.293 - * routine even if the clock was not reported as slowed by the 12.294 - * idle routine. Otherwise, define as 0. 12.295 - */ 12.296 -#define ALWAYS_CALL_BUSY 1 12.297 - 12.298 -/* 12.299 - * Define to make the APM BIOS calls zero all data segment registers (so 12.300 - * that an incorrect BIOS implementation will cause a kernel panic if it 12.301 - * tries to write to arbitrary memory). 12.302 - */ 12.303 -#define APM_ZERO_SEGS 12.304 - 12.305 -#include "apm.h" 12.306 - 12.307 -/* 12.308 - * Define to make all _set_limit calls use 64k limits. The APM 1.1 BIOS is 12.309 - * supposed to provide limit information that it recognizes. Many machines 12.310 - * do this correctly, but many others do not restrict themselves to their 12.311 - * claimed limit. When this happens, they will cause a segmentation 12.312 - * violation in the kernel at boot time. Most BIOS's, however, will 12.313 - * respect a 64k limit, so we use that. If you want to be pedantic and 12.314 - * hold your BIOS to its claims, then undefine this. 12.315 - */ 12.316 -#define APM_RELAX_SEGMENTS 12.317 - 12.318 -/* 12.319 - * Define to re-initialize the interrupt 0 timer to 100 Hz after a suspend. 12.320 - * This patched by Chad Miller <cmiller@surfsouth.com>, original code by 12.321 - * David Chen <chen@ctpa04.mit.edu> 12.322 - */ 12.323 -#undef INIT_TIMER_AFTER_SUSPEND 12.324 - 12.325 -#ifdef INIT_TIMER_AFTER_SUSPEND 12.326 -#include <linux/timex.h> 12.327 -#include <asm/io.h> 12.328 -#include <linux/delay.h> 12.329 -#endif 12.330 - 12.331 -/* 12.332 - * Need to poll the APM BIOS every second 12.333 - */ 12.334 -#define APM_CHECK_TIMEOUT (HZ) 12.335 - 12.336 -/* 12.337 - * Ignore suspend events for this amount of time after a resume 12.338 - */ 12.339 -#define DEFAULT_BOUNCE_INTERVAL (3 * HZ) 12.340 - 12.341 -/* 12.342 - * Maximum number of events stored 12.343 - */ 12.344 -#define APM_MAX_EVENTS 20 12.345 - 12.346 -/* 12.347 - * The per-file APM data 12.348 - */ 12.349 -struct apm_user { 12.350 - int magic; 12.351 - struct apm_user * next; 12.352 - unsigned int suser: 1; 12.353 - unsigned int writer: 1; 12.354 - unsigned int reader: 1; 12.355 - unsigned int suspend_wait: 1; 12.356 - int suspend_result; 12.357 - int suspends_pending; 12.358 - int standbys_pending; 12.359 - int suspends_read; 12.360 - int standbys_read; 12.361 - int event_head; 12.362 - int event_tail; 12.363 - apm_event_t events[APM_MAX_EVENTS]; 12.364 -}; 12.365 - 12.366 -/* 12.367 - * The magic number in apm_user 12.368 - */ 12.369 -#define APM_BIOS_MAGIC 0x4101 12.370 - 12.371 -/* 12.372 - * idle percentage above which bios idle calls are done 12.373 - */ 12.374 -#ifdef CONFIG_APM_CPU_IDLE 12.375 -#define DEFAULT_IDLE_THRESHOLD 95 12.376 -#else 12.377 -#define DEFAULT_IDLE_THRESHOLD 100 12.378 -#endif 12.379 -#define DEFAULT_IDLE_PERIOD (100 / 3) 12.380 - 12.381 -/* 12.382 - * Local variables 12.383 - */ 12.384 -static struct { 12.385 - unsigned long offset; 12.386 - unsigned short segment; 12.387 -} apm_bios_entry; 12.388 -static int clock_slowed; 12.389 -static int idle_threshold = DEFAULT_IDLE_THRESHOLD; 12.390 -static int idle_period = DEFAULT_IDLE_PERIOD; 12.391 -static int set_pm_idle; 12.392 -static int suspends_pending; 12.393 -static int standbys_pending; 12.394 -static int ignore_sys_suspend; 12.395 -static int ignore_normal_resume; 12.396 -static int bounce_interval = DEFAULT_BOUNCE_INTERVAL; 12.397 - 12.398 -#ifdef CONFIG_APM_RTC_IS_GMT 12.399 -# define clock_cmos_diff 0 12.400 -# define got_clock_diff 1 12.401 -#else 12.402 -static long clock_cmos_diff; 12.403 -static int got_clock_diff; 12.404 -#endif 12.405 -static int debug; 12.406 -static int smp; 12.407 -static int apm_disabled = -1; 12.408 -#ifdef CONFIG_SMP 12.409 -static int power_off; 12.410 -#else 12.411 -static int power_off = 1; 12.412 -#endif 12.413 -#ifdef CONFIG_APM_REAL_MODE_POWER_OFF 12.414 -static int realmode_power_off = 1; 12.415 -#else 12.416 -static int realmode_power_off; 12.417 -#endif 12.418 -static int exit_kapmd; 12.419 -static int kapmd_running; 12.420 -#ifdef CONFIG_APM_ALLOW_INTS 12.421 -static int allow_ints = 1; 12.422 -#else 12.423 -static int allow_ints; 12.424 -#endif 12.425 -static int broken_psr; 12.426 - 12.427 -static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); 12.428 -static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); 12.429 -static struct apm_user * user_list; 12.430 -static DEFINE_SPINLOCK(user_list_lock); 12.431 -static struct desc_struct bad_bios_desc = { 0, 0x00409200 }; 12.432 - 12.433 -static char driver_version[] = "1.16ac"; /* no spaces */ 12.434 - 12.435 -/* 12.436 - * APM event names taken from the APM 1.2 specification. These are 12.437 - * the message codes that the BIOS uses to tell us about events 12.438 - */ 12.439 -static char * apm_event_name[] = { 12.440 - "system standby", 12.441 - "system suspend", 12.442 - "normal resume", 12.443 - "critical resume", 12.444 - "low battery", 12.445 - "power status change", 12.446 - "update time", 12.447 - "critical suspend", 12.448 - "user standby", 12.449 - "user suspend", 12.450 - "system standby resume", 12.451 - "capabilities change" 12.452 -}; 12.453 -#define NR_APM_EVENT_NAME \ 12.454 - (sizeof(apm_event_name) / sizeof(apm_event_name[0])) 12.455 - 12.456 -typedef struct lookup_t { 12.457 - int key; 12.458 - char * msg; 12.459 -} lookup_t; 12.460 - 12.461 -/* 12.462 - * The BIOS returns a set of standard error codes in AX when the 12.463 - * carry flag is set. 12.464 - */ 12.465 - 12.466 -static const lookup_t error_table[] = { 12.467 -/* N/A { APM_SUCCESS, "Operation succeeded" }, */ 12.468 - { APM_DISABLED, "Power management disabled" }, 12.469 - { APM_CONNECTED, "Real mode interface already connected" }, 12.470 - { APM_NOT_CONNECTED, "Interface not connected" }, 12.471 - { APM_16_CONNECTED, "16 bit interface already connected" }, 12.472 -/* N/A { APM_16_UNSUPPORTED, "16 bit interface not supported" }, */ 12.473 - { APM_32_CONNECTED, "32 bit interface already connected" }, 12.474 - { APM_32_UNSUPPORTED, "32 bit interface not supported" }, 12.475 - { APM_BAD_DEVICE, "Unrecognized device ID" }, 12.476 - { APM_BAD_PARAM, "Parameter out of range" }, 12.477 - { APM_NOT_ENGAGED, "Interface not engaged" }, 12.478 - { APM_BAD_FUNCTION, "Function not supported" }, 12.479 - { APM_RESUME_DISABLED, "Resume timer disabled" }, 12.480 - { APM_BAD_STATE, "Unable to enter requested state" }, 12.481 -/* N/A { APM_NO_EVENTS, "No events pending" }, */ 12.482 - { APM_NO_ERROR, "BIOS did not set a return code" }, 12.483 - { APM_NOT_PRESENT, "No APM present" } 12.484 -}; 12.485 -#define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t)) 12.486 - 12.487 -/** 12.488 - * apm_error - display an APM error 12.489 - * @str: information string 12.490 - * @err: APM BIOS return code 12.491 - * 12.492 - * Write a meaningful log entry to the kernel log in the event of 12.493 - * an APM error. 12.494 - */ 12.495 - 12.496 -static void apm_error(char *str, int err) 12.497 -{ 12.498 - int i; 12.499 - 12.500 - for (i = 0; i < ERROR_COUNT; i++) 12.501 - if (error_table[i].key == err) break; 12.502 - if (i < ERROR_COUNT) 12.503 - printk(KERN_NOTICE "apm: %s: %s\n", str, error_table[i].msg); 12.504 - else 12.505 - printk(KERN_NOTICE "apm: %s: unknown error code %#2.2x\n", 12.506 - str, err); 12.507 -} 12.508 - 12.509 -/* 12.510 - * Lock APM functionality to physical CPU 0 12.511 - */ 12.512 - 12.513 -#ifdef CONFIG_SMP 12.514 - 12.515 -static cpumask_t apm_save_cpus(void) 12.516 -{ 12.517 - cpumask_t x = current->cpus_allowed; 12.518 - /* Some bioses don't like being called from CPU != 0 */ 12.519 - set_cpus_allowed(current, cpumask_of_cpu(0)); 12.520 - BUG_ON(smp_processor_id() != 0); 12.521 - return x; 12.522 -} 12.523 - 12.524 -static inline void apm_restore_cpus(cpumask_t mask) 12.525 -{ 12.526 - set_cpus_allowed(current, mask); 12.527 -} 12.528 - 12.529 -#else 12.530 - 12.531 -/* 12.532 - * No CPU lockdown needed on a uniprocessor 12.533 - */ 12.534 - 12.535 -#define apm_save_cpus() (current->cpus_allowed) 12.536 -#define apm_restore_cpus(x) (void)(x) 12.537 - 12.538 -#endif 12.539 - 12.540 -/* 12.541 - * These are the actual BIOS calls. Depending on APM_ZERO_SEGS and 12.542 - * apm_info.allow_ints, we are being really paranoid here! Not only 12.543 - * are interrupts disabled, but all the segment registers (except SS) 12.544 - * are saved and zeroed this means that if the BIOS tries to reference 12.545 - * any data without explicitly loading the segment registers, the kernel 12.546 - * will fault immediately rather than have some unforeseen circumstances 12.547 - * for the rest of the kernel. And it will be very obvious! :-) Doing 12.548 - * this depends on CS referring to the same physical memory as DS so that 12.549 - * DS can be zeroed before the call. Unfortunately, we can't do anything 12.550 - * about the stack segment/pointer. Also, we tell the compiler that 12.551 - * everything could change. 12.552 - * 12.553 - * Also, we KNOW that for the non error case of apm_bios_call, there 12.554 - * is no useful data returned in the low order 8 bits of eax. 12.555 - */ 12.556 -#define APM_DO_CLI \ 12.557 - if (apm_info.allow_ints) \ 12.558 - local_irq_enable(); \ 12.559 - else \ 12.560 - local_irq_disable(); 12.561 - 12.562 -#ifdef APM_ZERO_SEGS 12.563 -# define APM_DECL_SEGS \ 12.564 - unsigned int saved_fs; unsigned int saved_gs; 12.565 -# define APM_DO_SAVE_SEGS \ 12.566 - savesegment(fs, saved_fs); savesegment(gs, saved_gs) 12.567 -# define APM_DO_RESTORE_SEGS \ 12.568 - loadsegment(fs, saved_fs); loadsegment(gs, saved_gs) 12.569 -#else 12.570 -# define APM_DECL_SEGS 12.571 -# define APM_DO_SAVE_SEGS 12.572 -# define APM_DO_RESTORE_SEGS 12.573 -#endif 12.574 - 12.575 -/** 12.576 - * apm_bios_call - Make an APM BIOS 32bit call 12.577 - * @func: APM function to execute 12.578 - * @ebx_in: EBX register for call entry 12.579 - * @ecx_in: ECX register for call entry 12.580 - * @eax: EAX register return 12.581 - * @ebx: EBX register return 12.582 - * @ecx: ECX register return 12.583 - * @edx: EDX register return 12.584 - * @esi: ESI register return 12.585 - * 12.586 - * Make an APM call using the 32bit protected mode interface. The 12.587 - * caller is responsible for knowing if APM BIOS is configured and 12.588 - * enabled. This call can disable interrupts for a long period of 12.589 - * time on some laptops. The return value is in AH and the carry 12.590 - * flag is loaded into AL. If there is an error, then the error 12.591 - * code is returned in AH (bits 8-15 of eax) and this function 12.592 - * returns non-zero. 12.593 - */ 12.594 - 12.595 -static u8 apm_bios_call(u32 func, u32 ebx_in, u32 ecx_in, 12.596 - u32 *eax, u32 *ebx, u32 *ecx, u32 *edx, u32 *esi) 12.597 -{ 12.598 - APM_DECL_SEGS 12.599 - unsigned long flags; 12.600 - cpumask_t cpus; 12.601 - int cpu; 12.602 - struct desc_struct save_desc_40; 12.603 - 12.604 - cpus = apm_save_cpus(); 12.605 - 12.606 - cpu = get_cpu(); 12.607 - save_desc_40 = get_cpu_gdt_table(cpu)[0x40 / 8]; 12.608 - get_cpu_gdt_table(cpu)[0x40 / 8] = bad_bios_desc; 12.609 - 12.610 - local_save_flags(flags); 12.611 - APM_DO_CLI; 12.612 - APM_DO_SAVE_SEGS; 12.613 - apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); 12.614 - APM_DO_RESTORE_SEGS; 12.615 - local_irq_restore(flags); 12.616 - get_cpu_gdt_table(cpu)[0x40 / 8] = save_desc_40; 12.617 - put_cpu(); 12.618 - apm_restore_cpus(cpus); 12.619 - 12.620 - return *eax & 0xff; 12.621 -} 12.622 - 12.623 -/** 12.624 - * apm_bios_call_simple - make a simple APM BIOS 32bit call 12.625 - * @func: APM function to invoke 12.626 - * @ebx_in: EBX register value for BIOS call 12.627 - * @ecx_in: ECX register value for BIOS call 12.628 - * @eax: EAX register on return from the BIOS call 12.629 - * 12.630 - * Make a BIOS call that does only returns one value, or just status. 12.631 - * If there is an error, then the error code is returned in AH 12.632 - * (bits 8-15 of eax) and this function returns non-zero. This is 12.633 - * used for simpler BIOS operations. This call may hold interrupts 12.634 - * off for a long time on some laptops. 12.635 - */ 12.636 - 12.637 -static u8 apm_bios_call_simple(u32 func, u32 ebx_in, u32 ecx_in, u32 *eax) 12.638 -{ 12.639 - u8 error; 12.640 - APM_DECL_SEGS 12.641 - unsigned long flags; 12.642 - cpumask_t cpus; 12.643 - int cpu; 12.644 - struct desc_struct save_desc_40; 12.645 - 12.646 - 12.647 - cpus = apm_save_cpus(); 12.648 - 12.649 - cpu = get_cpu(); 12.650 - save_desc_40 = get_cpu_gdt_table(cpu)[0x40 / 8]; 12.651 - get_cpu_gdt_table(cpu)[0x40 / 8] = bad_bios_desc; 12.652 - 12.653 - local_save_flags(flags); 12.654 - APM_DO_CLI; 12.655 - APM_DO_SAVE_SEGS; 12.656 - error = apm_bios_call_simple_asm(func, ebx_in, ecx_in, eax); 12.657 - APM_DO_RESTORE_SEGS; 12.658 - local_irq_restore(flags); 12.659 - get_cpu_gdt_table(cpu)[0x40 / 8] = save_desc_40; 12.660 - put_cpu(); 12.661 - apm_restore_cpus(cpus); 12.662 - return error; 12.663 -} 12.664 - 12.665 -/** 12.666 - * apm_driver_version - APM driver version 12.667 - * @val: loaded with the APM version on return 12.668 - * 12.669 - * Retrieve the APM version supported by the BIOS. This is only 12.670 - * supported for APM 1.1 or higher. An error indicates APM 1.0 is 12.671 - * probably present. 12.672 - * 12.673 - * On entry val should point to a value indicating the APM driver 12.674 - * version with the high byte being the major and the low byte the 12.675 - * minor number both in BCD 12.676 - * 12.677 - * On return it will hold the BIOS revision supported in the 12.678 - * same format. 12.679 - */ 12.680 - 12.681 -static int apm_driver_version(u_short *val) 12.682 -{ 12.683 - u32 eax; 12.684 - 12.685 - if (apm_bios_call_simple(APM_FUNC_VERSION, 0, *val, &eax)) 12.686 - return (eax >> 8) & 0xff; 12.687 - *val = eax; 12.688 - return APM_SUCCESS; 12.689 -} 12.690 - 12.691 -/** 12.692 - * apm_get_event - get an APM event from the BIOS 12.693 - * @event: pointer to the event 12.694 - * @info: point to the event information 12.695 - * 12.696 - * The APM BIOS provides a polled information for event 12.697 - * reporting. The BIOS expects to be polled at least every second 12.698 - * when events are pending. When a message is found the caller should 12.699 - * poll until no more messages are present. However, this causes 12.700 - * problems on some laptops where a suspend event notification is 12.701 - * not cleared until it is acknowledged. 12.702 - * 12.703 - * Additional information is returned in the info pointer, providing 12.704 - * that APM 1.2 is in use. If no messges are pending the value 0x80 12.705 - * is returned (No power management events pending). 12.706 - */ 12.707 - 12.708 -static int apm_get_event(apm_event_t *event, apm_eventinfo_t *info) 12.709 -{ 12.710 - u32 eax; 12.711 - u32 ebx; 12.712 - u32 ecx; 12.713 - u32 dummy; 12.714 - 12.715 - if (apm_bios_call(APM_FUNC_GET_EVENT, 0, 0, &eax, &ebx, &ecx, 12.716 - &dummy, &dummy)) 12.717 - return (eax >> 8) & 0xff; 12.718 - *event = ebx; 12.719 - if (apm_info.connection_version < 0x0102) 12.720 - *info = ~0; /* indicate info not valid */ 12.721 - else 12.722 - *info = ecx; 12.723 - return APM_SUCCESS; 12.724 -} 12.725 - 12.726 -/** 12.727 - * set_power_state - set the power management state 12.728 - * @what: which items to transition 12.729 - * @state: state to transition to 12.730 - * 12.731 - * Request an APM change of state for one or more system devices. The 12.732 - * processor state must be transitioned last of all. what holds the 12.733 - * class of device in the upper byte and the device number (0xFF for 12.734 - * all) for the object to be transitioned. 12.735 - * 12.736 - * The state holds the state to transition to, which may in fact 12.737 - * be an acceptance of a BIOS requested state change. 12.738 - */ 12.739 - 12.740 -static int set_power_state(u_short what, u_short state) 12.741 -{ 12.742 - u32 eax; 12.743 - 12.744 - if (apm_bios_call_simple(APM_FUNC_SET_STATE, what, state, &eax)) 12.745 - return (eax >> 8) & 0xff; 12.746 - return APM_SUCCESS; 12.747 -} 12.748 - 12.749 -/** 12.750 - * set_system_power_state - set system wide power state 12.751 - * @state: which state to enter 12.752 - * 12.753 - * Transition the entire system into a new APM power state. 12.754 - */ 12.755 - 12.756 -static int set_system_power_state(u_short state) 12.757 -{ 12.758 - return set_power_state(APM_DEVICE_ALL, state); 12.759 -} 12.760 - 12.761 -/** 12.762 - * apm_do_idle - perform power saving 12.763 - * 12.764 - * This function notifies the BIOS that the processor is (in the view 12.765 - * of the OS) idle. It returns -1 in the event that the BIOS refuses 12.766 - * to handle the idle request. On a success the function returns 1 12.767 - * if the BIOS did clock slowing or 0 otherwise. 12.768 - */ 12.769 - 12.770 -static int apm_do_idle(void) 12.771 -{ 12.772 - u32 eax; 12.773 - 12.774 - if (apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax)) { 12.775 - static unsigned long t; 12.776 - 12.777 - /* This always fails on some SMP boards running UP kernels. 12.778 - * Only report the failure the first 5 times. 12.779 - */ 12.780 - if (++t < 5) 12.781 - { 12.782 - printk(KERN_DEBUG "apm_do_idle failed (%d)\n", 12.783 - (eax >> 8) & 0xff); 12.784 - t = jiffies; 12.785 - } 12.786 - return -1; 12.787 - } 12.788 - clock_slowed = (apm_info.bios.flags & APM_IDLE_SLOWS_CLOCK) != 0; 12.789 - return clock_slowed; 12.790 -} 12.791 - 12.792 -/** 12.793 - * apm_do_busy - inform the BIOS the CPU is busy 12.794 - * 12.795 - * Request that the BIOS brings the CPU back to full performance. 12.796 - */ 12.797 - 12.798 -static void apm_do_busy(void) 12.799 -{ 12.800 - u32 dummy; 12.801 - 12.802 - if (clock_slowed || ALWAYS_CALL_BUSY) { 12.803 - (void) apm_bios_call_simple(APM_FUNC_BUSY, 0, 0, &dummy); 12.804 - clock_slowed = 0; 12.805 - } 12.806 -} 12.807 - 12.808 -/* 12.809 - * If no process has really been interested in 12.810 - * the CPU for some time, we want to call BIOS 12.811 - * power management - we probably want 12.812 - * to conserve power. 12.813 - */ 12.814 -#define IDLE_CALC_LIMIT (HZ * 100) 12.815 -#define IDLE_LEAKY_MAX 16 12.816 - 12.817 -static void (*original_pm_idle)(void); 12.818 - 12.819 -extern void default_idle(void); 12.820 - 12.821 -/** 12.822 - * apm_cpu_idle - cpu idling for APM capable Linux 12.823 - * 12.824 - * This is the idling function the kernel executes when APM is available. It 12.825 - * tries to do BIOS powermanagement based on the average system idle time. 12.826 - * Furthermore it calls the system default idle routine. 12.827 - */ 12.828 - 12.829 -static void apm_cpu_idle(void) 12.830 -{ 12.831 - static int use_apm_idle; /* = 0 */ 12.832 - static unsigned int last_jiffies; /* = 0 */ 12.833 - static unsigned int last_stime; /* = 0 */ 12.834 - 12.835 - int apm_idle_done = 0; 12.836 - unsigned int jiffies_since_last_check = jiffies - last_jiffies; 12.837 - unsigned int bucket; 12.838 - 12.839 -recalc: 12.840 - if (jiffies_since_last_check > IDLE_CALC_LIMIT) { 12.841 - use_apm_idle = 0; 12.842 - last_jiffies = jiffies; 12.843 - last_stime = current->stime; 12.844 - } else if (jiffies_since_last_check > idle_period) { 12.845 - unsigned int idle_percentage; 12.846 - 12.847 - idle_percentage = current->stime - last_stime; 12.848 - idle_percentage *= 100; 12.849 - idle_percentage /= jiffies_since_last_check; 12.850 - use_apm_idle = (idle_percentage > idle_threshold); 12.851 - if (apm_info.forbid_idle) 12.852 - use_apm_idle = 0; 12.853 - last_jiffies = jiffies; 12.854 - last_stime = current->stime; 12.855 - } 12.856 - 12.857 - bucket = IDLE_LEAKY_MAX; 12.858 - 12.859 - while (!need_resched()) { 12.860 - if (use_apm_idle) { 12.861 - unsigned int t; 12.862 - 12.863 - t = jiffies; 12.864 - switch (apm_do_idle()) { 12.865 - case 0: apm_idle_done = 1; 12.866 - if (t != jiffies) { 12.867 - if (bucket) { 12.868 - bucket = IDLE_LEAKY_MAX; 12.869 - continue; 12.870 - } 12.871 - } else if (bucket) { 12.872 - bucket--; 12.873 - continue; 12.874 - } 12.875 - break; 12.876 - case 1: apm_idle_done = 1; 12.877 - break; 12.878 - default: /* BIOS refused */ 12.879 - break; 12.880 - } 12.881 - } 12.882 - if (original_pm_idle) 12.883 - original_pm_idle(); 12.884 - else 12.885 - default_idle(); 12.886 - jiffies_since_last_check = jiffies - last_jiffies; 12.887 - if (jiffies_since_last_check > idle_period) 12.888 - goto recalc; 12.889 - } 12.890 - 12.891 - if (apm_idle_done) 12.892 - apm_do_busy(); 12.893 -} 12.894 - 12.895 -/** 12.896 - * apm_power_off - ask the BIOS to power off 12.897 - * 12.898 - * Handle the power off sequence. This is the one piece of code we 12.899 - * will execute even on SMP machines. In order to deal with BIOS 12.900 - * bugs we support real mode APM BIOS power off calls. We also make 12.901 - * the SMP call on CPU0 as some systems will only honour this call 12.902 - * on their first cpu. 12.903 - */ 12.904 - 12.905 -static void apm_power_off(void) 12.906 -{ 12.907 - unsigned char po_bios_call[] = { 12.908 - 0xb8, 0x00, 0x10, /* movw $0x1000,ax */ 12.909 - 0x8e, 0xd0, /* movw ax,ss */ 12.910 - 0xbc, 0x00, 0xf0, /* movw $0xf000,sp */ 12.911 - 0xb8, 0x07, 0x53, /* movw $0x5307,ax */ 12.912 - 0xbb, 0x01, 0x00, /* movw $0x0001,bx */ 12.913 - 0xb9, 0x03, 0x00, /* movw $0x0003,cx */ 12.914 - 0xcd, 0x15 /* int $0x15 */ 12.915 - }; 12.916 - 12.917 - /* Some bioses don't like being called from CPU != 0 */ 12.918 - if (apm_info.realmode_power_off) 12.919 - { 12.920 - (void)apm_save_cpus(); 12.921 - machine_real_restart(po_bios_call, sizeof(po_bios_call)); 12.922 - } 12.923 - else 12.924 - (void) set_system_power_state(APM_STATE_OFF); 12.925 -} 12.926 - 12.927 -#ifdef CONFIG_APM_DO_ENABLE 12.928 - 12.929 -/** 12.930 - * apm_enable_power_management - enable BIOS APM power management 12.931 - * @enable: enable yes/no 12.932 - * 12.933 - * Enable or disable the APM BIOS power services. 12.934 - */ 12.935 - 12.936 -static int apm_enable_power_management(int enable) 12.937 -{ 12.938 - u32 eax; 12.939 - 12.940 - if ((enable == 0) && (apm_info.bios.flags & APM_BIOS_DISENGAGED)) 12.941 - return APM_NOT_ENGAGED; 12.942 - if (apm_bios_call_simple(APM_FUNC_ENABLE_PM, APM_DEVICE_BALL, 12.943 - enable, &eax)) 12.944 - return (eax >> 8) & 0xff; 12.945 - if (enable) 12.946 - apm_info.bios.flags &= ~APM_BIOS_DISABLED; 12.947 - else 12.948 - apm_info.bios.flags |= APM_BIOS_DISABLED; 12.949 - return APM_SUCCESS; 12.950 -} 12.951 -#endif 12.952 - 12.953 -/** 12.954 - * apm_get_power_status - get current power state 12.955 - * @status: returned status 12.956 - * @bat: battery info 12.957 - * @life: estimated life 12.958 - * 12.959 - * Obtain the current power status from the APM BIOS. We return a 12.960 - * status which gives the rough battery status, and current power 12.961 - * source. The bat value returned give an estimate as a percentage 12.962 - * of life and a status value for the battery. The estimated life 12.963 - * if reported is a lifetime in secodnds/minutes at current powwer 12.964 - * consumption. 12.965 - */ 12.966 - 12.967 -static int apm_get_power_status(u_short *status, u_short *bat, u_short *life) 12.968 -{ 12.969 - u32 eax; 12.970 - u32 ebx; 12.971 - u32 ecx; 12.972 - u32 edx; 12.973 - u32 dummy; 12.974 - 12.975 - if (apm_info.get_power_status_broken) 12.976 - return APM_32_UNSUPPORTED; 12.977 - if (apm_bios_call(APM_FUNC_GET_STATUS, APM_DEVICE_ALL, 0, 12.978 - &eax, &ebx, &ecx, &edx, &dummy)) 12.979 - return (eax >> 8) & 0xff; 12.980 - *status = ebx; 12.981 - *bat = ecx; 12.982 - if (apm_info.get_power_status_swabinminutes) { 12.983 - *life = swab16((u16)edx); 12.984 - *life |= 0x8000; 12.985 - } else 12.986 - *life = edx; 12.987 - return APM_SUCCESS; 12.988 -} 12.989 - 12.990 -#if 0 12.991 -static int apm_get_battery_status(u_short which, u_short *status, 12.992 - u_short *bat, u_short *life, u_short *nbat) 12.993 -{ 12.994 - u32 eax; 12.995 - u32 ebx; 12.996 - u32 ecx; 12.997 - u32 edx; 12.998 - u32 esi; 12.999 - 12.1000 - if (apm_info.connection_version < 0x0102) { 12.1001 - /* pretend we only have one battery. */ 12.1002 - if (which != 1) 12.1003 - return APM_BAD_DEVICE; 12.1004 - *nbat = 1; 12.1005 - return apm_get_power_status(status, bat, life); 12.1006 - } 12.1007 - 12.1008 - if (apm_bios_call(APM_FUNC_GET_STATUS, (0x8000 | (which)), 0, &eax, 12.1009 - &ebx, &ecx, &edx, &esi)) 12.1010 - return (eax >> 8) & 0xff; 12.1011 - *status = ebx; 12.1012 - *bat = ecx; 12.1013 - *life = edx; 12.1014 - *nbat = esi; 12.1015 - return APM_SUCCESS; 12.1016 -} 12.1017 -#endif 12.1018 - 12.1019 -/** 12.1020 - * apm_engage_power_management - enable PM on a device 12.1021 - * @device: identity of device 12.1022 - * @enable: on/off 12.1023 - * 12.1024 - * Activate or deactive power management on either a specific device 12.1025 - * or the entire system (%APM_DEVICE_ALL). 12.1026 - */ 12.1027 - 12.1028 -static int apm_engage_power_management(u_short device, int enable) 12.1029 -{ 12.1030 - u32 eax; 12.1031 - 12.1032 - if ((enable == 0) && (device == APM_DEVICE_ALL) 12.1033 - && (apm_info.bios.flags & APM_BIOS_DISABLED)) 12.1034 - return APM_DISABLED; 12.1035 - if (apm_bios_call_simple(APM_FUNC_ENGAGE_PM, device, enable, &eax)) 12.1036 - return (eax >> 8) & 0xff; 12.1037 - if (device == APM_DEVICE_ALL) { 12.1038 - if (enable) 12.1039 - apm_info.bios.flags &= ~APM_BIOS_DISENGAGED; 12.1040 - else 12.1041 - apm_info.bios.flags |= APM_BIOS_DISENGAGED; 12.1042 - } 12.1043 - return APM_SUCCESS; 12.1044 -} 12.1045 - 12.1046 -#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT) 12.1047 - 12.1048 -/** 12.1049 - * apm_console_blank - blank the display 12.1050 - * @blank: on/off 12.1051 - * 12.1052 - * Attempt to blank the console, firstly by blanking just video device 12.1053 - * zero, and if that fails (some BIOSes don't support it) then it blanks 12.1054 - * all video devices. Typically the BIOS will do laptop backlight and 12.1055 - * monitor powerdown for us. 12.1056 - */ 12.1057 - 12.1058 -static int apm_console_blank(int blank) 12.1059 -{ 12.1060 - int error; 12.1061 - u_short state; 12.1062 - 12.1063 - state = blank ? APM_STATE_STANDBY : APM_STATE_READY; 12.1064 - /* Blank the first display device */ 12.1065 - error = set_power_state(0x100, state); 12.1066 - if ((error != APM_SUCCESS) && (error != APM_NO_ERROR)) { 12.1067 - /* try to blank them all instead */ 12.1068 - error = set_power_state(0x1ff, state); 12.1069 - if ((error != APM_SUCCESS) && (error != APM_NO_ERROR)) 12.1070 - /* try to blank device one instead */ 12.1071 - error = set_power_state(0x101, state); 12.1072 - } 12.1073 - if ((error == APM_SUCCESS) || (error == APM_NO_ERROR)) 12.1074 - return 1; 12.1075 - if (error == APM_NOT_ENGAGED) { 12.1076 - static int tried; 12.1077 - int eng_error; 12.1078 - if (tried++ == 0) { 12.1079 - eng_error = apm_engage_power_management(APM_DEVICE_ALL, 1); 12.1080 - if (eng_error) { 12.1081 - apm_error("set display", error); 12.1082 - apm_error("engage interface", eng_error); 12.1083 - return 0; 12.1084 - } else 12.1085 - return apm_console_blank(blank); 12.1086 - } 12.1087 - } 12.1088 - apm_error("set display", error); 12.1089 - return 0; 12.1090 -} 12.1091 -#endif 12.1092 - 12.1093 -static int queue_empty(struct apm_user *as) 12.1094 -{ 12.1095 - return as->event_head == as->event_tail; 12.1096 -} 12.1097 - 12.1098 -static apm_event_t get_queued_event(struct apm_user *as) 12.1099 -{ 12.1100 - as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; 12.1101 - return as->events[as->event_tail]; 12.1102 -} 12.1103 - 12.1104 -static void queue_event(apm_event_t event, struct apm_user *sender) 12.1105 -{ 12.1106 - struct apm_user * as; 12.1107 - 12.1108 - spin_lock(&user_list_lock); 12.1109 - if (user_list == NULL) 12.1110 - goto out; 12.1111 - for (as = user_list; as != NULL; as = as->next) { 12.1112 - if ((as == sender) || (!as->reader)) 12.1113 - continue; 12.1114 - as->event_head = (as->event_head + 1) % APM_MAX_EVENTS; 12.1115 - if (as->event_head == as->event_tail) { 12.1116 - static int notified; 12.1117 - 12.1118 - if (notified++ == 0) 12.1119 - printk(KERN_ERR "apm: an event queue overflowed\n"); 12.1120 - as->event_tail = (as->event_tail + 1) % APM_MAX_EVENTS; 12.1121 - } 12.1122 - as->events[as->event_head] = event; 12.1123 - if ((!as->suser) || (!as->writer)) 12.1124 - continue; 12.1125 - switch (event) { 12.1126 - case APM_SYS_SUSPEND: 12.1127 - case APM_USER_SUSPEND: 12.1128 - as->suspends_pending++; 12.1129 - suspends_pending++; 12.1130 - break; 12.1131 - 12.1132 - case APM_SYS_STANDBY: 12.1133 - case APM_USER_STANDBY: 12.1134 - as->standbys_pending++; 12.1135 - standbys_pending++; 12.1136 - break; 12.1137 - } 12.1138 - } 12.1139 - wake_up_interruptible(&apm_waitqueue); 12.1140 -out: 12.1141 - spin_unlock(&user_list_lock); 12.1142 -} 12.1143 - 12.1144 -static void set_time(void) 12.1145 -{ 12.1146 - if (got_clock_diff) { /* Must know time zone in order to set clock */ 12.1147 - xtime.tv_sec = get_cmos_time() + clock_cmos_diff; 12.1148 - xtime.tv_nsec = 0; 12.1149 - } 12.1150 -} 12.1151 - 12.1152 -static void get_time_diff(void) 12.1153 -{ 12.1154 -#ifndef CONFIG_APM_RTC_IS_GMT 12.1155 - /* 12.1156 - * Estimate time zone so that set_time can update the clock 12.1157 - */ 12.1158 - clock_cmos_diff = -get_cmos_time(); 12.1159 - clock_cmos_diff += get_seconds(); 12.1160 - got_clock_diff = 1; 12.1161 -#endif 12.1162 -} 12.1163 - 12.1164 -static void reinit_timer(void) 12.1165 -{ 12.1166 -#ifdef INIT_TIMER_AFTER_SUSPEND 12.1167 - unsigned long flags; 12.1168 - 12.1169 - spin_lock_irqsave(&i8253_lock, flags); 12.1170 - /* set the clock to 100 Hz */ 12.1171 - outb_p(0x34, PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */ 12.1172 - udelay(10); 12.1173 - outb_p(LATCH & 0xff, PIT_CH0); /* LSB */ 12.1174 - udelay(10); 12.1175 - outb(LATCH >> 8, PIT_CH0); /* MSB */ 12.1176 - udelay(10); 12.1177 - spin_unlock_irqrestore(&i8253_lock, flags); 12.1178 -#endif 12.1179 -} 12.1180 - 12.1181 -static int suspend(int vetoable) 12.1182 -{ 12.1183 - int err; 12.1184 - struct apm_user *as; 12.1185 - 12.1186 - if (pm_send_all(PM_SUSPEND, (void *)3)) { 12.1187 - /* Vetoed */ 12.1188 - if (vetoable) { 12.1189 - if (apm_info.connection_version > 0x100) 12.1190 - set_system_power_state(APM_STATE_REJECT); 12.1191 - err = -EBUSY; 12.1192 - ignore_sys_suspend = 0; 12.1193 - printk(KERN_WARNING "apm: suspend was vetoed.\n"); 12.1194 - goto out; 12.1195 - } 12.1196 - printk(KERN_CRIT "apm: suspend was vetoed, but suspending anyway.\n"); 12.1197 - } 12.1198 - 12.1199 - device_suspend(PMSG_SUSPEND); 12.1200 - local_irq_disable(); 12.1201 - device_power_down(PMSG_SUSPEND); 12.1202 - 12.1203 - /* serialize with the timer interrupt */ 12.1204 - write_seqlock(&xtime_lock); 12.1205 - 12.1206 - /* protect against access to timer chip registers */ 12.1207 - spin_lock(&i8253_lock); 12.1208 - 12.1209 - get_time_diff(); 12.1210 - /* 12.1211 - * Irq spinlock must be dropped around set_system_power_state. 12.1212 - * We'll undo any timer changes due to interrupts below. 12.1213 - */ 12.1214 - spin_unlock(&i8253_lock); 12.1215 - write_sequnlock(&xtime_lock); 12.1216 - local_irq_enable(); 12.1217 - 12.1218 - save_processor_state(); 12.1219 - err = set_system_power_state(APM_STATE_SUSPEND); 12.1220 - ignore_normal_resume = 1; 12.1221 - restore_processor_state(); 12.1222 - 12.1223 - local_irq_disable(); 12.1224 - write_seqlock(&xtime_lock); 12.1225 - spin_lock(&i8253_lock); 12.1226 - reinit_timer(); 12.1227 - set_time(); 12.1228 - 12.1229 - spin_unlock(&i8253_lock); 12.1230 - write_sequnlock(&xtime_lock); 12.1231 - 12.1232 - if (err == APM_NO_ERROR) 12.1233 - err = APM_SUCCESS; 12.1234 - if (err != APM_SUCCESS) 12.1235 - apm_error("suspend", err); 12.1236 - err = (err == APM_SUCCESS) ? 0 : -EIO; 12.1237 - device_power_up(); 12.1238 - local_irq_enable(); 12.1239 - device_resume(); 12.1240 - pm_send_all(PM_RESUME, (void *)0); 12.1241 - queue_event(APM_NORMAL_RESUME, NULL); 12.1242 - out: 12.1243 - spin_lock(&user_list_lock); 12.1244 - for (as = user_list; as != NULL; as = as->next) { 12.1245 - as->suspend_wait = 0; 12.1246 - as->suspend_result = err; 12.1247 - } 12.1248 - spin_unlock(&user_list_lock); 12.1249 - wake_up_interruptible(&apm_suspend_waitqueue); 12.1250 - return err; 12.1251 -} 12.1252 - 12.1253 -static void standby(void) 12.1254 -{ 12.1255 - int err; 12.1256 - 12.1257 - local_irq_disable(); 12.1258 - device_power_down(PMSG_SUSPEND); 12.1259 - /* serialize with the timer interrupt */ 12.1260 - write_seqlock(&xtime_lock); 12.1261 - /* If needed, notify drivers here */ 12.1262 - get_time_diff(); 12.1263 - write_sequnlock(&xtime_lock); 12.1264 - local_irq_enable(); 12.1265 - 12.1266 - err = set_system_power_state(APM_STATE_STANDBY); 12.1267 - if ((err != APM_SUCCESS) && (err != APM_NO_ERROR)) 12.1268 - apm_error("standby", err); 12.1269 - 12.1270 - local_irq_disable(); 12.1271 - device_power_up(); 12.1272 - local_irq_enable(); 12.1273 -} 12.1274 - 12.1275 -static apm_event_t get_event(void) 12.1276 -{ 12.1277 - int error; 12.1278 - apm_event_t event; 12.1279 - apm_eventinfo_t info; 12.1280 - 12.1281 - static int notified; 12.1282 - 12.1283 - /* we don't use the eventinfo */ 12.1284 - error = apm_get_event(&event, &info); 12.1285 - if (error == APM_SUCCESS) 12.1286 - return event; 12.1287 - 12.1288 - if ((error != APM_NO_EVENTS) && (notified++ == 0)) 12.1289 - apm_error("get_event", error); 12.1290 - 12.1291 - return 0; 12.1292 -} 12.1293 - 12.1294 -static void check_events(void) 12.1295 -{ 12.1296 - apm_event_t event; 12.1297 - static unsigned long last_resume; 12.1298 - static int ignore_bounce; 12.1299 - 12.1300 - while ((event = get_event()) != 0) { 12.1301 - if (debug) { 12.1302 - if (event <= NR_APM_EVENT_NAME) 12.1303 - printk(KERN_DEBUG "apm: received %s notify\n", 12.1304 - apm_event_name[event - 1]); 12.1305 - else 12.1306 - printk(KERN_DEBUG "apm: received unknown " 12.1307 - "event 0x%02x\n", event); 12.1308 - } 12.1309 - if (ignore_bounce 12.1310 - && ((jiffies - last_resume) > bounce_interval)) 12.1311 - ignore_bounce = 0; 12.1312 - 12.1313 - switch (event) { 12.1314 - case APM_SYS_STANDBY: 12.1315 - case APM_USER_STANDBY: 12.1316 - queue_event(event, NULL); 12.1317 - if (standbys_pending <= 0) 12.1318 - standby(); 12.1319 - break; 12.1320 - 12.1321 - case APM_USER_SUSPEND: 12.1322 -#ifdef CONFIG_APM_IGNORE_USER_SUSPEND 12.1323 - if (apm_info.connection_version > 0x100) 12.1324 - set_system_power_state(APM_STATE_REJECT); 12.1325 - break; 12.1326 -#endif 12.1327 - case APM_SYS_SUSPEND: 12.1328 - if (ignore_bounce) { 12.1329 - if (apm_info.connection_version > 0x100) 12.1330 - set_system_power_state(APM_STATE_REJECT); 12.1331 - break; 12.1332 - } 12.1333 - /* 12.1334 - * If we are already processing a SUSPEND, 12.1335 - * then further SUSPEND events from the BIOS 12.1336 - * will be ignored. We also return here to 12.1337 - * cope with the fact that the Thinkpads keep 12.1338 - * sending a SUSPEND event until something else 12.1339 - * happens! 12.1340 - */ 12.1341 - if (ignore_sys_suspend) 12.1342 - return; 12.1343 - ignore_sys_suspend = 1; 12.1344 - queue_event(event, NULL); 12.1345 - if (suspends_pending <= 0) 12.1346 - (void) suspend(1); 12.1347 - break; 12.1348 - 12.1349 - case APM_NORMAL_RESUME: 12.1350 - case APM_CRITICAL_RESUME: 12.1351 - case APM_STANDBY_RESUME: 12.1352 - ignore_sys_suspend = 0; 12.1353 - last_resume = jiffies; 12.1354 - ignore_bounce = 1; 12.1355 - if ((event != APM_NORMAL_RESUME) 12.1356 - || (ignore_normal_resume == 0)) { 12.1357 - write_seqlock_irq(&xtime_lock); 12.1358 - set_time(); 12.1359 - write_sequnlock_irq(&xtime_lock); 12.1360 - device_resume(); 12.1361 - pm_send_all(PM_RESUME, (void *)0); 12.1362 - queue_event(event, NULL); 12.1363 - } 12.1364 - ignore_normal_resume = 0; 12.1365 - break; 12.1366 - 12.1367 - case APM_CAPABILITY_CHANGE: 12.1368 - case APM_LOW_BATTERY: 12.1369 - case APM_POWER_STATUS_CHANGE: 12.1370 - queue_event(event, NULL); 12.1371 - /* If needed, notify drivers here */ 12.1372 - break; 12.1373 - 12.1374 - case APM_UPDATE_TIME: 12.1375 - write_seqlock_irq(&xtime_lock); 12.1376 - set_time(); 12.1377 - write_sequnlock_irq(&xtime_lock); 12.1378 - break; 12.1379 - 12.1380 - case APM_CRITICAL_SUSPEND: 12.1381 - /* 12.1382 - * We are not allowed to reject a critical suspend. 12.1383 - */ 12.1384 - (void) suspend(0); 12.1385 - break; 12.1386 - } 12.1387 - } 12.1388 -} 12.1389 - 12.1390 -static void apm_event_handler(void) 12.1391 -{ 12.1392 - static int pending_count = 4; 12.1393 - int err; 12.1394 - 12.1395 - if ((standbys_pending > 0) || (suspends_pending > 0)) { 12.1396 - if ((apm_info.connection_version > 0x100) && 12.1397 - (pending_count-- <= 0)) { 12.1398 - pending_count = 4; 12.1399 - if (debug) 12.1400 - printk(KERN_DEBUG "apm: setting state busy\n"); 12.1401 - err = set_system_power_state(APM_STATE_BUSY); 12.1402 - if (err) 12.1403 - apm_error("busy", err); 12.1404 - } 12.1405 - } else 12.1406 - pending_count = 4; 12.1407 - check_events(); 12.1408 -} 12.1409 - 12.1410 -/* 12.1411 - * This is the APM thread main loop. 12.1412 - */ 12.1413 - 12.1414 -static void apm_mainloop(void) 12.1415 -{ 12.1416 - DECLARE_WAITQUEUE(wait, current); 12.1417 - 12.1418 - add_wait_queue(&apm_waitqueue, &wait); 12.1419 - set_current_state(TASK_INTERRUPTIBLE); 12.1420 - for (;;) { 12.1421 - schedule_timeout(APM_CHECK_TIMEOUT); 12.1422 - if (exit_kapmd) 12.1423 - break; 12.1424 - /* 12.1425 - * Ok, check all events, check for idle (and mark us sleeping 12.1426 - * so as not to count towards the load average).. 12.1427 - */ 12.1428 - set_current_state(TASK_INTERRUPTIBLE); 12.1429 - apm_event_handler(); 12.1430 - } 12.1431 - remove_wait_queue(&apm_waitqueue, &wait); 12.1432 -} 12.1433 - 12.1434 -static int check_apm_user(struct apm_user *as, const char *func) 12.1435 -{ 12.1436 - if ((as == NULL) || (as->magic != APM_BIOS_MAGIC)) { 12.1437 - printk(KERN_ERR "apm: %s passed bad filp\n", func); 12.1438 - return 1; 12.1439 - } 12.1440 - return 0; 12.1441 -} 12.1442 - 12.1443 -static ssize_t do_read(struct file *fp, char __user *buf, size_t count, loff_t *ppos) 12.1444 -{ 12.1445 - struct apm_user * as; 12.1446 - int i; 12.1447 - apm_event_t event; 12.1448 - 12.1449 - as = fp->private_data; 12.1450 - if (check_apm_user(as, "read")) 12.1451 - return -EIO; 12.1452 - if ((int)count < sizeof(apm_event_t)) 12.1453 - return -EINVAL; 12.1454 - if ((queue_empty(as)) && (fp->f_flags & O_NONBLOCK)) 12.1455 - return -EAGAIN; 12.1456 - wait_event_interruptible(apm_waitqueue, !queue_empty(as)); 12.1457 - i = count; 12.1458 - while ((i >= sizeof(event)) && !queue_empty(as)) { 12.1459 - event = get_queued_event(as); 12.1460 - if (copy_to_user(buf, &event, sizeof(event))) { 12.1461 - if (i < count) 12.1462 - break; 12.1463 - return -EFAULT; 12.1464 - } 12.1465 - switch (event) { 12.1466 - case APM_SYS_SUSPEND: 12.1467 - case APM_USER_SUSPEND: 12.1468 - as->suspends_read++; 12.1469 - break; 12.1470 - 12.1471 - case APM_SYS_STANDBY: 12.1472 - case APM_USER_STANDBY: 12.1473 - as->standbys_read++; 12.1474 - break; 12.1475 - } 12.1476 - buf += sizeof(event); 12.1477 - i -= sizeof(event); 12.1478 - } 12.1479 - if (i < count) 12.1480 - return count - i; 12.1481 - if (signal_pending(current)) 12.1482 - return -ERESTARTSYS; 12.1483 - return 0; 12.1484 -} 12.1485 - 12.1486 -static unsigned int do_poll(struct file *fp, poll_table * wait) 12.1487 -{ 12.1488 - struct apm_user * as; 12.1489 - 12.1490 - as = fp->private_data; 12.1491 - if (check_apm_user(as, "poll")) 12.1492 - return 0; 12.1493 - poll_wait(fp, &apm_waitqueue, wait); 12.1494 - if (!queue_empty(as)) 12.1495 - return POLLIN | POLLRDNORM; 12.1496 - return 0; 12.1497 -} 12.1498 - 12.1499 -static int do_ioctl(struct inode * inode, struct file *filp, 12.1500 - u_int cmd, u_long arg) 12.1501 -{ 12.1502 - struct apm_user * as; 12.1503 - 12.1504 - as = filp->private_data; 12.1505 - if (check_apm_user(as, "ioctl")) 12.1506 - return -EIO; 12.1507 - if ((!as->suser) || (!as->writer)) 12.1508 - return -EPERM; 12.1509 - switch (cmd) { 12.1510 - case APM_IOC_STANDBY: 12.1511 - if (as->standbys_read > 0) { 12.1512 - as->standbys_read--; 12.1513 - as->standbys_pending--; 12.1514 - standbys_pending--; 12.1515 - } else 12.1516 - queue_event(APM_USER_STANDBY, as); 12.1517 - if (standbys_pending <= 0) 12.1518 - standby(); 12.1519 - break; 12.1520 - case APM_IOC_SUSPEND: 12.1521 - if (as->suspends_read > 0) { 12.1522 - as->suspends_read--; 12.1523 - as->suspends_pending--; 12.1524 - suspends_pending--; 12.1525 - } else 12.1526 - queue_event(APM_USER_SUSPEND, as); 12.1527 - if (suspends_pending <= 0) { 12.1528 - return suspend(1); 12.1529 - } else { 12.1530 - as->suspend_wait = 1; 12.1531 - wait_event_interruptible(apm_suspend_waitqueue, 12.1532 - as->suspend_wait == 0); 12.1533 - return as->suspend_result; 12.1534 - } 12.1535 - break; 12.1536 - default: 12.1537 - return -EINVAL; 12.1538 - } 12.1539 - return 0; 12.1540 -} 12.1541 - 12.1542 -static int do_release(struct inode * inode, struct file * filp) 12.1543 -{ 12.1544 - struct apm_user * as; 12.1545 - 12.1546 - as = filp->private_data; 12.1547 - if (check_apm_user(as, "release")) 12.1548 - return 0; 12.1549 - filp->private_data = NULL; 12.1550 - if (as->standbys_pending > 0) { 12.1551 - standbys_pending -= as->standbys_pending; 12.1552 - if (standbys_pending <= 0) 12.1553 - standby(); 12.1554 - } 12.1555 - if (as->suspends_pending > 0) { 12.1556 - suspends_pending -= as->suspends_pending; 12.1557 - if (suspends_pending <= 0) 12.1558 - (void) suspend(1); 12.1559 - } 12.1560 - spin_lock(&user_list_lock); 12.1561 - if (user_list == as) 12.1562 - user_list = as->next; 12.1563 - else { 12.1564 - struct apm_user * as1; 12.1565 - 12.1566 - for (as1 = user_list; 12.1567 - (as1 != NULL) && (as1->next != as); 12.1568 - as1 = as1->next) 12.1569 - ; 12.1570 - if (as1 == NULL) 12.1571 - printk(KERN_ERR "apm: filp not in user list\n"); 12.1572 - else 12.1573 - as1->next = as->next; 12.1574 - } 12.1575 - spin_unlock(&user_list_lock); 12.1576 - kfree(as); 12.1577 - return 0; 12.1578 -} 12.1579 - 12.1580 -static int do_open(struct inode * inode, struct file * filp) 12.1581 -{ 12.1582 - struct apm_user * as; 12.1583 - 12.1584 - as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL); 12.1585 - if (as == NULL) { 12.1586 - printk(KERN_ERR "apm: cannot allocate struct of size %d bytes\n", 12.1587 - sizeof(*as)); 12.1588 - return -ENOMEM; 12.1589 - } 12.1590 - as->magic = APM_BIOS_MAGIC; 12.1591 - as->event_tail = as->event_head = 0; 12.1592 - as->suspends_pending = as->standbys_pending = 0; 12.1593 - as->suspends_read = as->standbys_read = 0; 12.1594 - /* 12.1595 - * XXX - this is a tiny bit broken, when we consider BSD 12.1596 - * process accounting. If the device is opened by root, we 12.1597 - * instantly flag that we used superuser privs. Who knows, 12.1598 - * we might close the device immediately without doing a 12.1599 - * privileged operation -- cevans 12.1600 - */ 12.1601 - as->suser = capable(CAP_SYS_ADMIN); 12.1602 - as->writer = (filp->f_mode & FMODE_WRITE) == FMODE_WRITE; 12.1603 - as->reader = (filp->f_mode & FMODE_READ) == FMODE_READ; 12.1604 - spin_lock(&user_list_lock); 12.1605 - as->next = user_list; 12.1606 - user_list = as; 12.1607 - spin_unlock(&user_list_lock); 12.1608 - filp->private_data = as; 12.1609 - return 0; 12.1610 -} 12.1611 - 12.1612 -static int apm_get_info(char *buf, char **start, off_t fpos, int length) 12.1613 -{ 12.1614 - char * p; 12.1615 - unsigned short bx; 12.1616 - unsigned short cx; 12.1617 - unsigned short dx; 12.1618 - int error; 12.1619 - unsigned short ac_line_status = 0xff; 12.1620 - unsigned short battery_status = 0xff; 12.1621 - unsigned short battery_flag = 0xff; 12.1622 - int percentage = -1; 12.1623 - int time_units = -1; 12.1624 - char *units = "?"; 12.1625 - 12.1626 - p = buf; 12.1627 - 12.1628 - if ((num_online_cpus() == 1) && 12.1629 - !(error = apm_get_power_status(&bx, &cx, &dx))) { 12.1630 - ac_line_status = (bx >> 8) & 0xff; 12.1631 - battery_status = bx & 0xff; 12.1632 - if ((cx & 0xff) != 0xff) 12.1633 - percentage = cx & 0xff; 12.1634 - 12.1635 - if (apm_info.connection_version > 0x100) { 12.1636 - battery_flag = (cx >> 8) & 0xff; 12.1637 - if (dx != 0xffff) { 12.1638 - units = (dx & 0x8000) ? "min" : "sec"; 12.1639 - time_units = dx & 0x7fff; 12.1640 - } 12.1641 - } 12.1642 - } 12.1643 - /* Arguments, with symbols from linux/apm_bios.h. Information is 12.1644 - from the Get Power Status (0x0a) call unless otherwise noted. 12.1645 - 12.1646 - 0) Linux driver version (this will change if format changes) 12.1647 - 1) APM BIOS Version. Usually 1.0, 1.1 or 1.2. 12.1648 - 2) APM flags from APM Installation Check (0x00): 12.1649 - bit 0: APM_16_BIT_SUPPORT 12.1650 - bit 1: APM_32_BIT_SUPPORT 12.1651 - bit 2: APM_IDLE_SLOWS_CLOCK 12.1652 - bit 3: APM_BIOS_DISABLED 12.1653 - bit 4: APM_BIOS_DISENGAGED 12.1654 - 3) AC line status 12.1655 - 0x00: Off-line 12.1656 - 0x01: On-line 12.1657 - 0x02: On backup power (BIOS >= 1.1 only) 12.1658 - 0xff: Unknown 12.1659 - 4) Battery status 12.1660 - 0x00: High 12.1661 - 0x01: Low 12.1662 - 0x02: Critical 12.1663 - 0x03: Charging 12.1664 - 0x04: Selected battery not present (BIOS >= 1.2 only) 12.1665 - 0xff: Unknown 12.1666 - 5) Battery flag 12.1667 - bit 0: High 12.1668 - bit 1: Low 12.1669 - bit 2: Critical 12.1670 - bit 3: Charging 12.1671 - bit 7: No system battery 12.1672 - 0xff: Unknown 12.1673 - 6) Remaining battery life (percentage of charge): 12.1674 - 0-100: valid 12.1675 - -1: Unknown 12.1676 - 7) Remaining battery life (time units): 12.1677 - Number of remaining minutes or seconds 12.1678 - -1: Unknown 12.1679 - 8) min = minutes; sec = seconds */ 12.1680 - 12.1681 - p += sprintf(p, "%s %d.%d 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n", 12.1682 - driver_version, 12.1683 - (apm_info.bios.version >> 8) & 0xff, 12.1684 - apm_info.bios.version & 0xff, 12.1685 - apm_info.bios.flags, 12.1686 - ac_line_status, 12.1687 - battery_status, 12.1688 - battery_flag, 12.1689 - percentage, 12.1690 - time_units, 12.1691 - units); 12.1692 - 12.1693 - return p - buf; 12.1694 -} 12.1695 - 12.1696 -static int apm(void *unused) 12.1697 -{ 12.1698 - unsigned short bx; 12.1699 - unsigned short cx; 12.1700 - unsigned short dx; 12.1701 - int error; 12.1702 - char * power_stat; 12.1703 - char * bat_stat; 12.1704 - 12.1705 - kapmd_running = 1; 12.1706 - 12.1707 - daemonize("kapmd"); 12.1708 - 12.1709 - current->flags |= PF_NOFREEZE; 12.1710 - 12.1711 -#ifdef CONFIG_SMP 12.1712 - /* 2002/08/01 - WT 12.1713 - * This is to avoid random crashes at boot time during initialization 12.1714 - * on SMP systems in case of "apm=power-off" mode. Seen on ASUS A7M266D. 12.1715 - * Some bioses don't like being called from CPU != 0. 12.1716 - * Method suggested by Ingo Molnar. 12.1717 - */ 12.1718 - set_cpus_allowed(current, cpumask_of_cpu(0)); 12.1719 - BUG_ON(smp_processor_id() != 0); 12.1720 -#endif 12.1721 - 12.1722 - if (apm_info.connection_version == 0) { 12.1723 - apm_info.connection_version = apm_info.bios.version; 12.1724 - if (apm_info.connection_version > 0x100) { 12.1725 - /* 12.1726 - * We only support BIOSs up to version 1.2 12.1727 - */ 12.1728 - if (apm_info.connection_version > 0x0102) 12.1729 - apm_info.connection_version = 0x0102; 12.1730 - error = apm_driver_version(&apm_info.connection_version); 12.1731 - if (error != APM_SUCCESS) { 12.1732 - apm_error("driver version", error); 12.1733 - /* Fall back to an APM 1.0 connection. */ 12.1734 - apm_info.connection_version = 0x100; 12.1735 - } 12.1736 - } 12.1737 - } 12.1738 - 12.1739 - if (debug) 12.1740 - printk(KERN_INFO "apm: Connection version %d.%d\n", 12.1741 - (apm_info.connection_version >> 8) & 0xff, 12.1742 - apm_info.connection_version & 0xff); 12.1743 - 12.1744 -#ifdef CONFIG_APM_DO_ENABLE 12.1745 - if (apm_info.bios.flags & APM_BIOS_DISABLED) { 12.1746 - /* 12.1747 - * This call causes my NEC UltraLite Versa 33/C to hang if it 12.1748 - * is booted with PM disabled but not in the docking station. 12.1749 - * Unfortunate ... 12.1750 - */ 12.1751 - error = apm_enable_power_management(1); 12.1752 - if (error) { 12.1753 - apm_error("enable power management", error); 12.1754 - return -1; 12.1755 - } 12.1756 - } 12.1757 -#endif 12.1758 - 12.1759 - if ((apm_info.bios.flags & APM_BIOS_DISENGAGED) 12.1760 - && (apm_info.connection_version > 0x0100)) { 12.1761 - error = apm_engage_power_management(APM_DEVICE_ALL, 1); 12.1762 - if (error) { 12.1763 - apm_error("engage power management", error); 12.1764 - return -1; 12.1765 - } 12.1766 - } 12.1767 - 12.1768 - if (debug && (num_online_cpus() == 1 || smp )) { 12.1769 - error = apm_get_power_status(&bx, &cx, &dx); 12.1770 - if (error) 12.1771 - printk(KERN_INFO "apm: power status not available\n"); 12.1772 - else { 12.1773 - switch ((bx >> 8) & 0xff) { 12.1774 - case 0: power_stat = "off line"; break; 12.1775 - case 1: power_stat = "on line"; break; 12.1776 - case 2: power_stat = "on backup power"; break; 12.1777 - default: power_stat = "unknown"; break; 12.1778 - } 12.1779 - switch (bx & 0xff) { 12.1780 - case 0: bat_stat = "high"; break; 12.1781 - case 1: bat_stat = "low"; break; 12.1782 - case 2: bat_stat = "critical"; break; 12.1783 - case 3: bat_stat = "charging"; break; 12.1784 - default: bat_stat = "unknown"; break; 12.1785 - } 12.1786 - printk(KERN_INFO 12.1787 - "apm: AC %s, battery status %s, battery life ", 12.1788 - power_stat, bat_stat); 12.1789 - if ((cx & 0xff) == 0xff) 12.1790 - printk("unknown\n"); 12.1791 - else 12.1792 - printk("%d%%\n", cx & 0xff); 12.1793 - if (apm_info.connection_version > 0x100) { 12.1794 - printk(KERN_INFO 12.1795 - "apm: battery flag 0x%02x, battery life ", 12.1796 - (cx >> 8) & 0xff); 12.1797 - if (dx == 0xffff) 12.1798 - printk("unknown\n"); 12.1799 - else 12.1800 - printk("%d %s\n", dx & 0x7fff, 12.1801 - (dx & 0x8000) ? 12.1802 - "minutes" : "seconds"); 12.1803 - } 12.1804 - } 12.1805 - } 12.1806 - 12.1807 - /* Install our power off handler.. */ 12.1808 - if (power_off) 12.1809 - pm_power_off = apm_power_off; 12.1810 - 12.1811 - if (num_online_cpus() == 1 || smp) { 12.1812 -#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT) 12.1813 - console_blank_hook = apm_console_blank; 12.1814 -#endif 12.1815 - apm_mainloop(); 12.1816 -#if defined(CONFIG_APM_DISPLAY_BLANK) && defined(CONFIG_VT) 12.1817 - console_blank_hook = NULL; 12.1818 -#endif 12.1819 - } 12.1820 - kapmd_running = 0; 12.1821 - 12.1822 - return 0; 12.1823 -} 12.1824 - 12.1825 -#ifndef MODULE 12.1826 -static int __init apm_setup(char *str) 12.1827 -{ 12.1828 - int invert; 12.1829 - 12.1830 - while ((str != NULL) && (*str != '\0')) { 12.1831 - if (strncmp(str, "off", 3) == 0) 12.1832 - apm_disabled = 1; 12.1833 - if (strncmp(str, "on", 2) == 0) 12.1834 - apm_disabled = 0; 12.1835 - if ((strncmp(str, "bounce-interval=", 16) == 0) || 12.1836 - (strncmp(str, "bounce_interval=", 16) == 0)) 12.1837 - bounce_interval = simple_strtol(str + 16, NULL, 0); 12.1838 - if ((strncmp(str, "idle-threshold=", 15) == 0) || 12.1839 - (strncmp(str, "idle_threshold=", 15) == 0)) 12.1840 - idle_threshold = simple_strtol(str + 15, NULL, 0); 12.1841 - if ((strncmp(str, "idle-period=", 12) == 0) || 12.1842 - (strncmp(str, "idle_period=", 12) == 0)) 12.1843 - idle_period = simple_strtol(str + 12, NULL, 0); 12.1844 - invert = (strncmp(str, "no-", 3) == 0) || 12.1845 - (strncmp(str, "no_", 3) == 0); 12.1846 - if (invert) 12.1847 - str += 3; 12.1848 - if (strncmp(str, "debug", 5) == 0) 12.1849 - debug = !invert; 12.1850 - if ((strncmp(str, "power-off", 9) == 0) || 12.1851 - (strncmp(str, "power_off", 9) == 0)) 12.1852 - power_off = !invert; 12.1853 - if (strncmp(str, "smp", 3) == 0) 12.1854 - { 12.1855 - smp = !invert; 12.1856 - idle_threshold = 100; 12.1857 - } 12.1858 - if ((strncmp(str, "allow-ints", 10) == 0) || 12.1859 - (strncmp(str, "allow_ints", 10) == 0)) 12.1860 - apm_info.allow_ints = !invert; 12.1861 - if ((strncmp(str, "broken-psr", 10) == 0) || 12.1862 - (strncmp(str, "broken_psr", 10) == 0)) 12.1863 - apm_info.get_power_status_broken = !invert; 12.1864 - if ((strncmp(str, "realmode-power-off", 18) == 0) || 12.1865 - (strncmp(str, "realmode_power_off", 18) == 0)) 12.1866 - apm_info.realmode_power_off = !invert; 12.1867 - str = strchr(str, ','); 12.1868 - if (str != NULL) 12.1869 - str += strspn(str, ", \t"); 12.1870 - } 12.1871 - return 1; 12.1872 -} 12.1873 - 12.1874 -__setup("apm=", apm_setup); 12.1875 -#endif 12.1876 - 12.1877 -static struct file_operations apm_bios_fops = { 12.1878 - .owner = THIS_MODULE, 12.1879 - .read = do_read, 12.1880 - .poll = do_poll, 12.1881 - .ioctl = do_ioctl, 12.1882 - .open = do_open, 12.1883 - .release = do_release, 12.1884 -}; 12.1885 - 12.1886 -static struct miscdevice apm_device = { 12.1887 - APM_MINOR_DEV, 12.1888 - "apm_bios", 12.1889 - &apm_bios_fops 12.1890 -}; 12.1891 - 12.1892 - 12.1893 -/* Simple "print if true" callback */ 12.1894 -static int __init print_if_true(struct dmi_system_id *d) 12.1895 -{ 12.1896 - printk("%s\n", d->ident); 12.1897 - return 0; 12.1898 -} 12.1899 - 12.1900 -/* 12.1901 - * Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it was 12.1902 - * disabled before the suspend. Linux used to get terribly confused by that. 12.1903 - */ 12.1904 -static int __init broken_ps2_resume(struct dmi_system_id *d) 12.1905 -{ 12.1906 - printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround hopefully not needed.\n", d->ident); 12.1907 - return 0; 12.1908 -} 12.1909 - 12.1910 -/* Some bioses have a broken protected mode poweroff and need to use realmode */ 12.1911 -static int __init set_realmode_power_off(struct dmi_system_id *d) 12.1912 -{ 12.1913 - if (apm_info.realmode_power_off == 0) { 12.1914 - apm_info.realmode_power_off = 1; 12.1915 - printk(KERN_INFO "%s bios detected. Using realmode poweroff only.\n", d->ident); 12.1916 - } 12.1917 - return 0; 12.1918 -} 12.1919 - 12.1920 -/* Some laptops require interrupts to be enabled during APM calls */ 12.1921 -static int __init set_apm_ints(struct dmi_system_id *d) 12.1922 -{ 12.1923 - if (apm_info.allow_ints == 0) { 12.1924 - apm_info.allow_ints = 1; 12.1925 - printk(KERN_INFO "%s machine detected. Enabling interrupts during APM calls.\n", d->ident); 12.1926 - } 12.1927 - return 0; 12.1928 -} 12.1929 - 12.1930 -/* Some APM bioses corrupt memory or just plain do not work */ 12.1931 -static int __init apm_is_horked(struct dmi_system_id *d) 12.1932 -{ 12.1933 - if (apm_info.disabled == 0) { 12.1934 - apm_info.disabled = 1; 12.1935 - printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident); 12.1936 - } 12.1937 - return 0; 12.1938 -} 12.1939 - 12.1940 -static int __init apm_is_horked_d850md(struct dmi_system_id *d) 12.1941 -{ 12.1942 - if (apm_info.disabled == 0) { 12.1943 - apm_info.disabled = 1; 12.1944 - printk(KERN_INFO "%s machine detected. Disabling APM.\n", d->ident); 12.1945 - printk(KERN_INFO "This bug is fixed in bios P15 which is available for \n"); 12.1946 - printk(KERN_INFO "download from support.intel.com \n"); 12.1947 - } 12.1948 - return 0; 12.1949 -} 12.1950 - 12.1951 -/* Some APM bioses hang on APM idle calls */ 12.1952 -static int __init apm_likes_to_melt(struct dmi_system_id *d) 12.1953 -{ 12.1954 - if (apm_info.forbid_idle == 0) { 12.1955 - apm_info.forbid_idle = 1; 12.1956 - printk(KERN_INFO "%s machine detected. Disabling APM idle calls.\n", d->ident); 12.1957 - } 12.1958 - return 0; 12.1959 -} 12.1960 - 12.1961 -/* 12.1962 - * Check for clue free BIOS implementations who use 12.1963 - * the following QA technique 12.1964 - * 12.1965 - * [ Write BIOS Code ]<------ 12.1966 - * | ^ 12.1967 - * < Does it Compile >----N-- 12.1968 - * |Y ^ 12.1969 - * < Does it Boot Win98 >-N-- 12.1970 - * |Y 12.1971 - * [Ship It] 12.1972 - * 12.1973 - * Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e) 12.1974 - * Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000) 12.1975 - */ 12.1976 -static int __init broken_apm_power(struct dmi_system_id *d) 12.1977 -{ 12.1978 - apm_info.get_power_status_broken = 1; 12.1979 - printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n"); 12.1980 - return 0; 12.1981 -} 12.1982 - 12.1983 -/* 12.1984 - * This bios swaps the APM minute reporting bytes over (Many sony laptops 12.1985 - * have this problem). 12.1986 - */ 12.1987 -static int __init swab_apm_power_in_minutes(struct dmi_system_id *d) 12.1988 -{ 12.1989 - apm_info.get_power_status_swabinminutes = 1; 12.1990 - printk(KERN_WARNING "BIOS strings suggest APM reports battery life in minutes and wrong byte order.\n"); 12.1991 - return 0; 12.1992 -} 12.1993 - 12.1994 -static struct dmi_system_id __initdata apm_dmi_table[] = { 12.1995 - { 12.1996 - print_if_true, 12.1997 - KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.", 12.1998 - { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), 12.1999 - DMI_MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"), }, 12.2000 - }, 12.2001 - { /* Handle problems with APM on the C600 */ 12.2002 - broken_ps2_resume, "Dell Latitude C600", 12.2003 - { DMI_MATCH(DMI_SYS_VENDOR, "Dell"), 12.2004 - DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C600"), }, 12.2005 - }, 12.2006 - { /* Allow interrupts during suspend on Dell Latitude laptops*/ 12.2007 - set_apm_ints, "Dell Latitude", 12.2008 - { DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), 12.2009 - DMI_MATCH(DMI_PRODUCT_NAME, "Latitude C510"), } 12.2010 - }, 12.2011 - { /* APM crashes */ 12.2012 - apm_is_horked, "Dell Inspiron 2500", 12.2013 - { DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), 12.2014 - DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"), 12.2015 - DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), 12.2016 - DMI_MATCH(DMI_BIOS_VERSION,"A11"), }, 12.2017 - }, 12.2018 - { /* Allow interrupts during suspend on Dell Inspiron laptops*/ 12.2019 - set_apm_ints, "Dell Inspiron", { 12.2020 - DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), 12.2021 - DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 4000"), }, 12.2022 - }, 12.2023 - { /* Handle problems with APM on Inspiron 5000e */ 12.2024 - broken_apm_power, "Dell Inspiron 5000e", 12.2025 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2026 - DMI_MATCH(DMI_BIOS_VERSION, "A04"), 12.2027 - DMI_MATCH(DMI_BIOS_DATE, "08/24/2000"), }, 12.2028 - }, 12.2029 - { /* Handle problems with APM on Inspiron 2500 */ 12.2030 - broken_apm_power, "Dell Inspiron 2500", 12.2031 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2032 - DMI_MATCH(DMI_BIOS_VERSION, "A12"), 12.2033 - DMI_MATCH(DMI_BIOS_DATE, "02/04/2002"), }, 12.2034 - }, 12.2035 - { /* APM crashes */ 12.2036 - apm_is_horked, "Dell Dimension 4100", 12.2037 - { DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), 12.2038 - DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"), 12.2039 - DMI_MATCH(DMI_BIOS_VENDOR,"Intel Corp."), 12.2040 - DMI_MATCH(DMI_BIOS_VERSION,"A11"), }, 12.2041 - }, 12.2042 - { /* Allow interrupts during suspend on Compaq Laptops*/ 12.2043 - set_apm_ints, "Compaq 12XL125", 12.2044 - { DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), 12.2045 - DMI_MATCH(DMI_PRODUCT_NAME, "Compaq PC"), 12.2046 - DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2047 - DMI_MATCH(DMI_BIOS_VERSION,"4.06"), }, 12.2048 - }, 12.2049 - { /* Allow interrupts during APM or the clock goes slow */ 12.2050 - set_apm_ints, "ASUSTeK", 12.2051 - { DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), 12.2052 - DMI_MATCH(DMI_PRODUCT_NAME, "L8400K series Notebook PC"), }, 12.2053 - }, 12.2054 - { /* APM blows on shutdown */ 12.2055 - apm_is_horked, "ABIT KX7-333[R]", 12.2056 - { DMI_MATCH(DMI_BOARD_VENDOR, "ABIT"), 12.2057 - DMI_MATCH(DMI_BOARD_NAME, "VT8367-8233A (KX7-333[R])"), }, 12.2058 - }, 12.2059 - { /* APM crashes */ 12.2060 - apm_is_horked, "Trigem Delhi3", 12.2061 - { DMI_MATCH(DMI_SYS_VENDOR, "TriGem Computer, Inc"), 12.2062 - DMI_MATCH(DMI_PRODUCT_NAME, "Delhi3"), }, 12.2063 - }, 12.2064 - { /* APM crashes */ 12.2065 - apm_is_horked, "Fujitsu-Siemens", 12.2066 - { DMI_MATCH(DMI_BIOS_VENDOR, "hoenix/FUJITSU SIEMENS"), 12.2067 - DMI_MATCH(DMI_BIOS_VERSION, "Version1.01"), }, 12.2068 - }, 12.2069 - { /* APM crashes */ 12.2070 - apm_is_horked_d850md, "Intel D850MD", 12.2071 - { DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."), 12.2072 - DMI_MATCH(DMI_BIOS_VERSION, "MV85010A.86A.0016.P07.0201251536"), }, 12.2073 - }, 12.2074 - { /* APM crashes */ 12.2075 - apm_is_horked, "Intel D810EMO", 12.2076 - { DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."), 12.2077 - DMI_MATCH(DMI_BIOS_VERSION, "MO81010A.86A.0008.P04.0004170800"), }, 12.2078 - }, 12.2079 - { /* APM crashes */ 12.2080 - apm_is_horked, "Dell XPS-Z", 12.2081 - { DMI_MATCH(DMI_BIOS_VENDOR, "Intel Corp."), 12.2082 - DMI_MATCH(DMI_BIOS_VERSION, "A11"), 12.2083 - DMI_MATCH(DMI_PRODUCT_NAME, "XPS-Z"), }, 12.2084 - }, 12.2085 - { /* APM crashes */ 12.2086 - apm_is_horked, "Sharp PC-PJ/AX", 12.2087 - { DMI_MATCH(DMI_SYS_VENDOR, "SHARP"), 12.2088 - DMI_MATCH(DMI_PRODUCT_NAME, "PC-PJ/AX"), 12.2089 - DMI_MATCH(DMI_BIOS_VENDOR,"SystemSoft"), 12.2090 - DMI_MATCH(DMI_BIOS_VERSION,"Version R2.08"), }, 12.2091 - }, 12.2092 - { /* APM crashes */ 12.2093 - apm_is_horked, "Dell Inspiron 2500", 12.2094 - { DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), 12.2095 - DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 2500"), 12.2096 - DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), 12.2097 - DMI_MATCH(DMI_BIOS_VERSION,"A11"), }, 12.2098 - }, 12.2099 - { /* APM idle hangs */ 12.2100 - apm_likes_to_melt, "Jabil AMD", 12.2101 - { DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), 12.2102 - DMI_MATCH(DMI_BIOS_VERSION, "0AASNP06"), }, 12.2103 - }, 12.2104 - { /* APM idle hangs */ 12.2105 - apm_likes_to_melt, "AMI Bios", 12.2106 - { DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."), 12.2107 - DMI_MATCH(DMI_BIOS_VERSION, "0AASNP05"), }, 12.2108 - }, 12.2109 - { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */ 12.2110 - swab_apm_power_in_minutes, "Sony VAIO", 12.2111 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2112 - DMI_MATCH(DMI_BIOS_VERSION, "R0206H"), 12.2113 - DMI_MATCH(DMI_BIOS_DATE, "08/23/99"), }, 12.2114 - }, 12.2115 - { /* Handle problems with APM on Sony Vaio PCG-N505VX */ 12.2116 - swab_apm_power_in_minutes, "Sony VAIO", 12.2117 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2118 - DMI_MATCH(DMI_BIOS_VERSION, "W2K06H0"), 12.2119 - DMI_MATCH(DMI_BIOS_DATE, "02/03/00"), }, 12.2120 - }, 12.2121 - { /* Handle problems with APM on Sony Vaio PCG-XG29 */ 12.2122 - swab_apm_power_in_minutes, "Sony VAIO", 12.2123 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2124 - DMI_MATCH(DMI_BIOS_VERSION, "R0117A0"), 12.2125 - DMI_MATCH(DMI_BIOS_DATE, "04/25/00"), }, 12.2126 - }, 12.2127 - { /* Handle problems with APM on Sony Vaio PCG-Z600NE */ 12.2128 - swab_apm_power_in_minutes, "Sony VAIO", 12.2129 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2130 - DMI_MATCH(DMI_BIOS_VERSION, "R0121Z1"), 12.2131 - DMI_MATCH(DMI_BIOS_DATE, "05/11/00"), }, 12.2132 - }, 12.2133 - { /* Handle problems with APM on Sony Vaio PCG-Z600NE */ 12.2134 - swab_apm_power_in_minutes, "Sony VAIO", 12.2135 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2136 - DMI_MATCH(DMI_BIOS_VERSION, "WME01Z1"), 12.2137 - DMI_MATCH(DMI_BIOS_DATE, "08/11/00"), }, 12.2138 - }, 12.2139 - { /* Handle problems with APM on Sony Vaio PCG-Z600LEK(DE) */ 12.2140 - swab_apm_power_in_minutes, "Sony VAIO", 12.2141 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2142 - DMI_MATCH(DMI_BIOS_VERSION, "R0206Z3"), 12.2143 - DMI_MATCH(DMI_BIOS_DATE, "12/25/00"), }, 12.2144 - }, 12.2145 - { /* Handle problems with APM on Sony Vaio PCG-Z505LS */ 12.2146 - swab_apm_power_in_minutes, "Sony VAIO", 12.2147 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2148 - DMI_MATCH(DMI_BIOS_VERSION, "R0203D0"), 12.2149 - DMI_MATCH(DMI_BIOS_DATE, "05/12/00"), }, 12.2150 - }, 12.2151 - { /* Handle problems with APM on Sony Vaio PCG-Z505LS */ 12.2152 - swab_apm_power_in_minutes, "Sony VAIO", 12.2153 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2154 - DMI_MATCH(DMI_BIOS_VERSION, "R0203Z3"), 12.2155 - DMI_MATCH(DMI_BIOS_DATE, "08/25/00"), }, 12.2156 - }, 12.2157 - { /* Handle problems with APM on Sony Vaio PCG-Z505LS (with updated BIOS) */ 12.2158 - swab_apm_power_in_minutes, "Sony VAIO", 12.2159 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2160 - DMI_MATCH(DMI_BIOS_VERSION, "R0209Z3"), 12.2161 - DMI_MATCH(DMI_BIOS_DATE, "05/12/01"), }, 12.2162 - }, 12.2163 - { /* Handle problems with APM on Sony Vaio PCG-F104K */ 12.2164 - swab_apm_power_in_minutes, "Sony VAIO", 12.2165 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2166 - DMI_MATCH(DMI_BIOS_VERSION, "R0204K2"), 12.2167 - DMI_MATCH(DMI_BIOS_DATE, "08/28/00"), }, 12.2168 - }, 12.2169 - 12.2170 - { /* Handle problems with APM on Sony Vaio PCG-C1VN/C1VE */ 12.2171 - swab_apm_power_in_minutes, "Sony VAIO", 12.2172 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2173 - DMI_MATCH(DMI_BIOS_VERSION, "R0208P1"), 12.2174 - DMI_MATCH(DMI_BIOS_DATE, "11/09/00"), }, 12.2175 - }, 12.2176 - { /* Handle problems with APM on Sony Vaio PCG-C1VE */ 12.2177 - swab_apm_power_in_minutes, "Sony VAIO", 12.2178 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2179 - DMI_MATCH(DMI_BIOS_VERSION, "R0204P1"), 12.2180 - DMI_MATCH(DMI_BIOS_DATE, "09/12/00"), }, 12.2181 - }, 12.2182 - { /* Handle problems with APM on Sony Vaio PCG-C1VE */ 12.2183 - swab_apm_power_in_minutes, "Sony VAIO", 12.2184 - { DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 12.2185 - DMI_MATCH(DMI_BIOS_VERSION, "WXPO1Z3"), 12.2186 - DMI_MATCH(DMI_BIOS_DATE, "10/26/01"), }, 12.2187 - }, 12.2188 - { /* broken PM poweroff bios */ 12.2189 - set_realmode_power_off, "Award Software v4.60 PGMA", 12.2190 - { DMI_MATCH(DMI_BIOS_VENDOR, "Award Software International, Inc."), 12.2191 - DMI_MATCH(DMI_BIOS_VERSION, "4.60 PGMA"), 12.2192 - DMI_MATCH(DMI_BIOS_DATE, "134526184"), }, 12.2193 - }, 12.2194 - 12.2195 - /* Generic per vendor APM settings */ 12.2196 - 12.2197 - { /* Allow interrupts during suspend on IBM laptops */ 12.2198 - set_apm_ints, "IBM", 12.2199 - { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), }, 12.2200 - }, 12.2201 - 12.2202 - { } 12.2203 -}; 12.2204 - 12.2205 -/* 12.2206 - * Just start the APM thread. We do NOT want to do APM BIOS 12.2207 - * calls from anything but the APM thread, if for no other reason 12.2208 - * than the fact that we don't trust the APM BIOS. This way, 12.2209 - * most common APM BIOS problems that lead to protection errors 12.2210 - * etc will have at least some level of being contained... 12.2211 - * 12.2212 - * In short, if something bad happens, at least we have a choice 12.2213 - * of just killing the apm thread.. 12.2214 - */ 12.2215 -static int __init apm_init(void) 12.2216 -{ 12.2217 - struct proc_dir_entry *apm_proc; 12.2218 - int ret; 12.2219 - int i; 12.2220 - 12.2221 - dmi_check_system(apm_dmi_table); 12.2222 - 12.2223 - if (apm_info.bios.version == 0) { 12.2224 - printk(KERN_INFO "apm: BIOS not found.\n"); 12.2225 - return -ENODEV; 12.2226 - } 12.2227 - printk(KERN_INFO 12.2228 - "apm: BIOS version %d.%d Flags 0x%02x (Driver version %s)\n", 12.2229 - ((apm_info.bios.version >> 8) & 0xff), 12.2230 - (apm_info.bios.version & 0xff), 12.2231 - apm_info.bios.flags, 12.2232 - driver_version); 12.2233 - if ((apm_info.bios.flags & APM_32_BIT_SUPPORT) == 0) { 12.2234 - printk(KERN_INFO "apm: no 32 bit BIOS support\n"); 12.2235 - return -ENODEV; 12.2236 - } 12.2237 - 12.2238 - if (allow_ints) 12.2239 - apm_info.allow_ints = 1; 12.2240 - if (broken_psr) 12.2241 - apm_info.get_power_status_broken = 1; 12.2242 - if (realmode_power_off) 12.2243 - apm_info.realmode_power_off = 1; 12.2244 - /* User can override, but default is to trust DMI */ 12.2245 - if (apm_disabled != -1) 12.2246 - apm_info.disabled = apm_disabled; 12.2247 - 12.2248 - /* 12.2249 - * Fix for the Compaq Contura 3/25c which reports BIOS version 0.1 12.2250 - * but is reportedly a 1.0 BIOS. 12.2251 - */ 12.2252 - if (apm_info.bios.version == 0x001) 12.2253 - apm_info.bios.version = 0x100; 12.2254 - 12.2255 - /* BIOS < 1.2 doesn't set cseg_16_len */ 12.2256 - if (apm_info.bios.version < 0x102) 12.2257 - apm_info.bios.cseg_16_len = 0; /* 64k */ 12.2258 - 12.2259 - if (debug) { 12.2260 - printk(KERN_INFO "apm: entry %x:%lx cseg16 %x dseg %x", 12.2261 - apm_info.bios.cseg, apm_info.bios.offset, 12.2262 - apm_info.bios.cseg_16, apm_info.bios.dseg); 12.2263 - if (apm_info.bios.version > 0x100) 12.2264 - printk(" cseg len %x, dseg len %x", 12.2265 - apm_info.bios.cseg_len, 12.2266 - apm_info.bios.dseg_len); 12.2267 - if (apm_info.bios.version > 0x101) 12.2268 - printk(" cseg16 len %x", apm_info.bios.cseg_16_len); 12.2269 - printk("\n"); 12.2270 - } 12.2271 - 12.2272 - if (apm_info.disabled) { 12.2273 - printk(KERN_NOTICE "apm: disabled on user request.\n"); 12.2274 - return -ENODEV; 12.2275 - } 12.2276 - if ((num_online_cpus() > 1) && !power_off && !smp) { 12.2277 - printk(KERN_NOTICE "apm: disabled - APM is not SMP safe.\n"); 12.2278 - apm_info.disabled = 1; 12.2279 - return -ENODEV; 12.2280 - } 12.2281 - if (PM_IS_ACTIVE()) { 12.2282 - printk(KERN_NOTICE "apm: overridden by ACPI.\n"); 12.2283 - apm_info.disabled = 1; 12.2284 - return -ENODEV; 12.2285 - } 12.2286 - pm_active = 1; 12.2287 - 12.2288 - /* 12.2289 - * Set up a segment that references the real mode segment 0x40 12.2290 - * that extends up to the end of page zero (that we have reserved). 12.2291 - * This is for buggy BIOS's that refer to (real mode) segment 0x40 12.2292 - * even though they are called in protected mode. 12.2293 - */ 12.2294 - set_base(bad_bios_desc, __va((unsigned long)0x40 << 4)); 12.2295 - _set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4)); 12.2296 - 12.2297 - apm_bios_entry.offset = apm_info.bios.offset; 12.2298 - apm_bios_entry.segment = APM_CS; 12.2299 - 12.2300 - for (i = 0; i < NR_CPUS; i++) { 12.2301 - set_base(get_cpu_gdt_table(i)[APM_CS >> 3], 12.2302 - __va((unsigned long)apm_info.bios.cseg << 4)); 12.2303 - set_base(get_cpu_gdt_table(i)[APM_CS_16 >> 3], 12.2304 - __va((unsigned long)apm_info.bios.cseg_16 << 4)); 12.2305 - set_base(get_cpu_gdt_table(i)[APM_DS >> 3], 12.2306 - __va((unsigned long)apm_info.bios.dseg << 4)); 12.2307 -#ifndef APM_RELAX_SEGMENTS 12.2308 - if (apm_info.bios.version == 0x100) { 12.2309 -#endif 12.2310 - /* For ASUS motherboard, Award BIOS rev 110 (and others?) */ 12.2311 - _set_limit((char *)&get_cpu_gdt_table(i)[APM_CS >> 3], 64 * 1024 - 1); 12.2312 - /* For some unknown machine. */ 12.2313 - _set_limit((char *)&get_cpu_gdt_table(i)[APM_CS_16 >> 3], 64 * 1024 - 1); 12.2314 - /* For the DEC Hinote Ultra CT475 (and others?) */ 12.2315 - _set_limit((char *)&get_cpu_gdt_table(i)[APM_DS >> 3], 64 * 1024 - 1); 12.2316 -#ifndef APM_RELAX_SEGMENTS 12.2317 - } else { 12.2318 - _set_limit((char *)&get_cpu_gdt_table(i)[APM_CS >> 3], 12.2319 - (apm_info.bios.cseg_len - 1) & 0xffff); 12.2320 - _set_limit((char *)&get_cpu_gdt_table(i)[APM_CS_16 >> 3], 12.2321 - (apm_info.bios.cseg_16_len - 1) & 0xffff); 12.2322 - _set_limit((char *)&get_cpu_gdt_table(i)[APM_DS >> 3], 12.2323 - (apm_info.bios.dseg_len - 1) & 0xffff); 12.2324 - /* workaround for broken BIOSes */ 12.2325 - if (apm_info.bios.cseg_len <= apm_info.bios.offset) 12.2326 - _set_limit((char *)&get_cpu_gdt_table(i)[APM_CS >> 3], 64 * 1024 -1); 12.2327 - if (apm_info.bios.dseg_len <= 0x40) { /* 0x40 * 4kB == 64kB */ 12.2328 - /* for the BIOS that assumes granularity = 1 */ 12.2329 - get_cpu_gdt_table(i)[APM_DS >> 3].b |= 0x800000; 12.2330 - printk(KERN_NOTICE "apm: we set the granularity of dseg.\n"); 12.2331 - } 12.2332 - } 12.2333 -#endif 12.2334 - } 12.2335 - 12.2336 - apm_proc = create_proc_info_entry("apm", 0, NULL, apm_get_info); 12.2337 - if (apm_proc) 12.2338 - apm_proc->owner = THIS_MODULE; 12.2339 - 12.2340 - ret = kernel_thread(apm, NULL, CLONE_KERNEL | SIGCHLD); 12.2341 - if (ret < 0) { 12.2342 - printk(KERN_ERR "apm: disabled - Unable to start kernel thread.\n"); 12.2343 - return -ENOMEM; 12.2344 - } 12.2345 - 12.2346 - if (num_online_cpus() > 1 && !smp ) { 12.2347 - printk(KERN_NOTICE 12.2348 - "apm: disabled - APM is not SMP safe (power off active).\n"); 12.2349 - return 0; 12.2350 - } 12.2351 - 12.2352 - misc_register(&apm_device); 12.2353 - 12.2354 - if (HZ != 100) 12.2355 - idle_period = (idle_period * HZ) / 100; 12.2356 - if (idle_threshold < 100) { 12.2357 - original_pm_idle = pm_idle; 12.2358 - pm_idle = apm_cpu_idle; 12.2359 - set_pm_idle = 1; 12.2360 - } 12.2361 - 12.2362 - return 0; 12.2363 -} 12.2364 - 12.2365 -static void __exit apm_exit(void) 12.2366 -{ 12.2367 - int error; 12.2368 - 12.2369 - if (set_pm_idle) { 12.2370 - pm_idle = original_pm_idle; 12.2371 - /* 12.2372 - * We are about to unload the current idle thread pm callback 12.2373 - * (pm_idle), Wait for all processors to update cached/local 12.2374 - * copies of pm_idle before proceeding. 12.2375 - */ 12.2376 - cpu_idle_wait(); 12.2377 - } 12.2378 - if (((apm_info.bios.flags & APM_BIOS_DISENGAGED) == 0) 12.2379 - && (apm_info.connection_version > 0x0100)) { 12.2380 - error = apm_engage_power_management(APM_DEVICE_ALL, 0); 12.2381 - if (error) 12.2382 - apm_error("disengage power management", error); 12.2383 - } 12.2384 - misc_deregister(&apm_device); 12.2385 - remove_proc_entry("apm", NULL); 12.2386 - if (power_off) 12.2387 - pm_power_off = NULL; 12.2388 - exit_kapmd = 1; 12.2389 - while (kapmd_running) 12.2390 - schedule(); 12.2391 - pm_active = 0; 12.2392 -} 12.2393 - 12.2394 -module_init(apm_init); 12.2395 -module_exit(apm_exit); 12.2396 - 12.2397 -MODULE_AUTHOR("Stephen Rothwell"); 12.2398 -MODULE_DESCRIPTION("Advanced Power Management"); 12.2399 -MODULE_LICENSE("GPL"); 12.2400 -module_param(debug, bool, 0644); 12.2401 -MODULE_PARM_DESC(debug, "Enable debug mode"); 12.2402 -module_param(power_off, bool, 0444); 12.2403 -MODULE_PARM_DESC(power_off, "Enable power off"); 12.2404 -module_param(bounce_interval, int, 0444); 12.2405 -MODULE_PARM_DESC(bounce_interval, 12.2406 - "Set the number of ticks to ignore suspend bounces"); 12.2407 -module_param(allow_ints, bool, 0444); 12.2408 -MODULE_PARM_DESC(allow_ints, "Allow interrupts during BIOS calls"); 12.2409 -module_param(broken_psr, bool, 0444); 12.2410 -MODULE_PARM_DESC(broken_psr, "BIOS has a broken GetPowerStatus call"); 12.2411 -module_param(realmode_power_off, bool, 0444); 12.2412 -MODULE_PARM_DESC(realmode_power_off, 12.2413 - "Switch to real mode before powering off"); 12.2414 -module_param(idle_threshold, int, 0444); 12.2415 -MODULE_PARM_DESC(idle_threshold, 12.2416 - "System idle percentage above which to make APM BIOS idle calls"); 12.2417 -module_param(idle_period, int, 0444); 12.2418 -MODULE_PARM_DESC(idle_period, 12.2419 - "Period (in sec/100) over which to caculate the idle percentage"); 12.2420 -module_param(smp, bool, 0444); 12.2421 -MODULE_PARM_DESC(smp, 12.2422 - "Set this to enable APM use on an SMP platform. Use with caution on older systems"); 12.2423 -MODULE_ALIAS_MISCDEV(APM_MINOR_DEV);
13.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c Wed Feb 01 17:06:16 2006 +0000 13.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/cpu/common-xen.c Wed Feb 01 18:00:19 2006 +0000 13.3 @@ -33,8 +33,6 @@ static int disable_x86_serial_nr __devin 13.4 13.5 struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {}; 13.6 13.7 -extern void mcheck_init(struct cpuinfo_x86 *c); 13.8 - 13.9 extern void machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c); 13.10 13.11 extern int disable_pse; 13.12 @@ -238,10 +236,10 @@ static void __init early_cpu_detect(void 13.13 cpuid(0x00000001, &tfms, &misc, &junk, &cap0); 13.14 c->x86 = (tfms >> 8) & 15; 13.15 c->x86_model = (tfms >> 4) & 15; 13.16 - if (c->x86 == 0xf) { 13.17 + if (c->x86 == 0xf) 13.18 c->x86 += (tfms >> 20) & 0xff; 13.19 + if (c->x86 >= 0x6) 13.20 c->x86_model += ((tfms >> 16) & 0xF) << 4; 13.21 - } 13.22 c->x86_mask = tfms & 15; 13.23 if (cap0 & (1<<19)) 13.24 c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8; 13.25 @@ -340,7 +338,7 @@ void __devinit identify_cpu(struct cpuin 13.26 c->x86_model = c->x86_mask = 0; /* So far unknown... */ 13.27 c->x86_vendor_id[0] = '\0'; /* Unset */ 13.28 c->x86_model_id[0] = '\0'; /* Unset */ 13.29 - c->x86_num_cores = 1; 13.30 + c->x86_max_cores = 1; 13.31 memset(&c->x86_capability, 0, sizeof c->x86_capability); 13.32 13.33 if (!have_cpuid_p()) { 13.34 @@ -436,9 +434,8 @@ void __devinit identify_cpu(struct cpuin 13.35 } 13.36 13.37 /* Init Machine Check Exception if available. */ 13.38 -#ifdef CONFIG_X86_MCE 13.39 mcheck_init(c); 13.40 -#endif 13.41 + 13.42 if (c == &boot_cpu_data) 13.43 sysenter_setup(); 13.44 enable_sep_cpu(); 13.45 @@ -453,52 +450,44 @@ void __devinit identify_cpu(struct cpuin 13.46 void __devinit detect_ht(struct cpuinfo_x86 *c) 13.47 { 13.48 u32 eax, ebx, ecx, edx; 13.49 - int index_msb, tmp; 13.50 + int index_msb, core_bits; 13.51 int cpu = smp_processor_id(); 13.52 13.53 + cpuid(1, &eax, &ebx, &ecx, &edx); 13.54 + 13.55 + c->apicid = phys_pkg_id((ebx >> 24) & 0xFF, 0); 13.56 + 13.57 if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c, X86_FEATURE_CMP_LEGACY)) 13.58 return; 13.59 13.60 - cpuid(1, &eax, &ebx, &ecx, &edx); 13.61 smp_num_siblings = (ebx & 0xff0000) >> 16; 13.62 13.63 if (smp_num_siblings == 1) { 13.64 printk(KERN_INFO "CPU: Hyper-Threading is disabled\n"); 13.65 } else if (smp_num_siblings > 1 ) { 13.66 - index_msb = 31; 13.67 13.68 if (smp_num_siblings > NR_CPUS) { 13.69 printk(KERN_WARNING "CPU: Unsupported number of the siblings %d", smp_num_siblings); 13.70 smp_num_siblings = 1; 13.71 return; 13.72 } 13.73 - tmp = smp_num_siblings; 13.74 - while ((tmp & 0x80000000 ) == 0) { 13.75 - tmp <<=1 ; 13.76 - index_msb--; 13.77 - } 13.78 - if (smp_num_siblings & (smp_num_siblings - 1)) 13.79 - index_msb++; 13.80 + 13.81 + index_msb = get_count_order(smp_num_siblings); 13.82 phys_proc_id[cpu] = phys_pkg_id((ebx >> 24) & 0xFF, index_msb); 13.83 13.84 printk(KERN_INFO "CPU: Physical Processor ID: %d\n", 13.85 phys_proc_id[cpu]); 13.86 13.87 - smp_num_siblings = smp_num_siblings / c->x86_num_cores; 13.88 + smp_num_siblings = smp_num_siblings / c->x86_max_cores; 13.89 13.90 - tmp = smp_num_siblings; 13.91 - index_msb = 31; 13.92 - while ((tmp & 0x80000000) == 0) { 13.93 - tmp <<=1 ; 13.94 - index_msb--; 13.95 - } 13.96 + index_msb = get_count_order(smp_num_siblings) ; 13.97 13.98 - if (smp_num_siblings & (smp_num_siblings - 1)) 13.99 - index_msb++; 13.100 + core_bits = get_count_order(c->x86_max_cores); 13.101 13.102 - cpu_core_id[cpu] = phys_pkg_id((ebx >> 24) & 0xFF, index_msb); 13.103 + cpu_core_id[cpu] = phys_pkg_id((ebx >> 24) & 0xFF, index_msb) & 13.104 + ((1 << core_bits) - 1); 13.105 13.106 - if (c->x86_num_cores > 1) 13.107 + if (c->x86_max_cores > 1) 13.108 printk(KERN_INFO "CPU: Processor Core ID: %d\n", 13.109 cpu_core_id[cpu]); 13.110 } 13.111 @@ -615,12 +604,6 @@ void __cpuinit cpu_init(void) 13.112 set_in_cr4(X86_CR4_TSD); 13.113 } 13.114 13.115 - /* 13.116 - * Set up the per-thread TLS descriptor cache: 13.117 - */ 13.118 - memcpy(thread->tls_array, &get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN], 13.119 - GDT_ENTRY_TLS_ENTRIES * 8); 13.120 - 13.121 cpu_gdt_init(&cpu_gdt_descr[cpu]); 13.122 13.123 /*
14.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S Wed Feb 01 17:06:16 2006 +0000 14.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/entry-xen.S Wed Feb 01 18:00:19 2006 +0000 14.3 @@ -746,11 +746,10 @@ nmi_stack_fixup: 14.4 nmi_debug_stack_check: 14.5 cmpw $__KERNEL_CS,16(%esp) 14.6 jne nmi_stack_correct 14.7 - cmpl $debug - 1,(%esp) 14.8 - jle nmi_stack_correct 14.9 + cmpl $debug,(%esp) 14.10 + jb nmi_stack_correct 14.11 cmpl $debug_esp_fix_insn,(%esp) 14.12 - jle nmi_debug_stack_fixup 14.13 -nmi_debug_stack_fixup: 14.14 + ja nmi_stack_correct 14.15 FIX_STACK(24,nmi_stack_correct, 1) 14.16 jmp nmi_stack_correct 14.17
15.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c Wed Feb 01 17:06:16 2006 +0000 15.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c Wed Feb 01 18:00:19 2006 +0000 15.3 @@ -88,6 +88,9 @@ static inline void xen_io_apic_write(uns 15.4 int (*ioapic_renumber_irq)(int ioapic, int irq); 15.5 atomic_t irq_mis_count; 15.6 15.7 +/* Where if anywhere is the i8259 connect in external int mode */ 15.8 +static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; 15.9 + 15.10 static DEFINE_SPINLOCK(ioapic_lock); 15.11 15.12 /* 15.13 @@ -784,10 +787,11 @@ static int find_irq_entry(int apic, int 15.14 } 15.15 15.16 #ifndef CONFIG_XEN 15.17 +#endif 15.18 /* 15.19 * Find the pin to which IRQ[irq] (ISA) is connected 15.20 */ 15.21 -static int find_isa_irq_pin(int irq, int type) 15.22 +static int __init find_isa_irq_pin(int irq, int type) 15.23 { 15.24 int i; 15.25 15.26 @@ -806,7 +810,33 @@ static int find_isa_irq_pin(int irq, int 15.27 } 15.28 return -1; 15.29 } 15.30 -#endif 15.31 + 15.32 +static int __init find_isa_irq_apic(int irq, int type) 15.33 +{ 15.34 + int i; 15.35 + 15.36 + for (i = 0; i < mp_irq_entries; i++) { 15.37 + int lbus = mp_irqs[i].mpc_srcbus; 15.38 + 15.39 + if ((mp_bus_id_to_type[lbus] == MP_BUS_ISA || 15.40 + mp_bus_id_to_type[lbus] == MP_BUS_EISA || 15.41 + mp_bus_id_to_type[lbus] == MP_BUS_MCA || 15.42 + mp_bus_id_to_type[lbus] == MP_BUS_NEC98 15.43 + ) && 15.44 + (mp_irqs[i].mpc_irqtype == type) && 15.45 + (mp_irqs[i].mpc_srcbusirq == irq)) 15.46 + break; 15.47 + } 15.48 + if (i < mp_irq_entries) { 15.49 + int apic; 15.50 + for(apic = 0; apic < nr_ioapics; apic++) { 15.51 + if (mp_ioapics[apic].mpc_apicid == mp_irqs[i].mpc_dstapic) 15.52 + return apic; 15.53 + } 15.54 + } 15.55 + 15.56 + return -1; 15.57 +} 15.58 15.59 /* 15.60 * Find a specific PCI IRQ entry. 15.61 @@ -1306,7 +1336,7 @@ static void __init setup_IO_APIC_irqs(vo 15.62 * Set up the 8259A-master output pin: 15.63 */ 15.64 #ifndef CONFIG_XEN 15.65 -static void __init setup_ExtINT_IRQ0_pin(unsigned int pin, int vector) 15.66 +static void __init setup_ExtINT_IRQ0_pin(unsigned int apic, unsigned int pin, int vector) 15.67 { 15.68 struct IO_APIC_route_entry entry; 15.69 unsigned long flags; 15.70 @@ -1340,8 +1370,8 @@ static void __init setup_ExtINT_IRQ0_pin 15.71 * Add it to the IO-APIC irq-routing table: 15.72 */ 15.73 spin_lock_irqsave(&ioapic_lock, flags); 15.74 - io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1)); 15.75 - io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0)); 15.76 + io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1)); 15.77 + io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0)); 15.78 spin_unlock_irqrestore(&ioapic_lock, flags); 15.79 15.80 enable_8259A_irq(0); 15.81 @@ -1647,7 +1677,8 @@ void __init print_IO_APIC(void) { } 15.82 static void __init enable_IO_APIC(void) 15.83 { 15.84 union IO_APIC_reg_01 reg_01; 15.85 - int i; 15.86 + int i8259_apic, i8259_pin; 15.87 + int i, apic; 15.88 unsigned long flags; 15.89 15.90 for (i = 0; i < PIN_MAP_SIZE; i++) { 15.91 @@ -1661,11 +1692,52 @@ static void __init enable_IO_APIC(void) 15.92 /* 15.93 * The number of IO-APIC IRQ registers (== #pins): 15.94 */ 15.95 - for (i = 0; i < nr_ioapics; i++) { 15.96 + for (apic = 0; apic < nr_ioapics; apic++) { 15.97 spin_lock_irqsave(&ioapic_lock, flags); 15.98 - reg_01.raw = io_apic_read(i, 1); 15.99 + reg_01.raw = io_apic_read(apic, 1); 15.100 spin_unlock_irqrestore(&ioapic_lock, flags); 15.101 - nr_ioapic_registers[i] = reg_01.bits.entries+1; 15.102 + nr_ioapic_registers[apic] = reg_01.bits.entries+1; 15.103 + } 15.104 + for(apic = 0; apic < nr_ioapics; apic++) { 15.105 + int pin; 15.106 + /* See if any of the pins is in ExtINT mode */ 15.107 + for(pin = 0; pin < nr_ioapic_registers[i]; pin++) { 15.108 + struct IO_APIC_route_entry entry; 15.109 + spin_lock_irqsave(&ioapic_lock, flags); 15.110 + *(((int *)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin); 15.111 + *(((int *)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin); 15.112 + spin_unlock_irqrestore(&ioapic_lock, flags); 15.113 + 15.114 + 15.115 + /* If the interrupt line is enabled and in ExtInt mode 15.116 + * I have found the pin where the i8259 is connected. 15.117 + */ 15.118 + if ((entry.mask == 0) && (entry.delivery_mode == dest_ExtINT)) { 15.119 + ioapic_i8259.apic = apic; 15.120 + ioapic_i8259.pin = pin; 15.121 + goto found_i8259; 15.122 + } 15.123 + } 15.124 + } 15.125 + found_i8259: 15.126 + /* Look to see what if the MP table has reported the ExtINT */ 15.127 + /* If we could not find the appropriate pin by looking at the ioapic 15.128 + * the i8259 probably is not connected the ioapic but give the 15.129 + * mptable a chance anyway. 15.130 + */ 15.131 + i8259_pin = find_isa_irq_pin(0, mp_ExtINT); 15.132 + i8259_apic = find_isa_irq_apic(0, mp_ExtINT); 15.133 + /* Trust the MP table if nothing is setup in the hardware */ 15.134 + if ((ioapic_i8259.pin == -1) && (i8259_pin >= 0)) { 15.135 + printk(KERN_WARNING "ExtINT not setup in hardware but reported by MP table\n"); 15.136 + ioapic_i8259.pin = i8259_pin; 15.137 + ioapic_i8259.apic = i8259_apic; 15.138 + } 15.139 + /* Complain if the MP table and the hardware disagree */ 15.140 + if (((ioapic_i8259.apic != i8259_apic) || (ioapic_i8259.pin != i8259_pin)) && 15.141 + (i8259_pin >= 0) && (ioapic_i8259.pin >= 0)) 15.142 + { 15.143 + printk(KERN_WARNING "ExtINT in hardware and MP table differ\n"); 15.144 } 15.145 15.146 /* 15.147 @@ -1679,9 +1751,6 @@ static void __init enable_IO_APIC(void) 15.148 */ 15.149 void disable_IO_APIC(void) 15.150 { 15.151 -#ifndef CONFIG_XEN 15.152 - int pin; 15.153 -#endif 15.154 /* 15.155 * Clear the IO-APIC before rebooting: 15.156 */ 15.157 @@ -1693,8 +1762,7 @@ void disable_IO_APIC(void) 15.158 * Put that IOAPIC in virtual wire mode 15.159 * so legacy interrupts can be delivered. 15.160 */ 15.161 - pin = find_isa_irq_pin(0, mp_ExtINT); 15.162 - if (pin != -1) { 15.163 + if (ioapic_i8259.pin != -1) { 15.164 struct IO_APIC_route_entry entry; 15.165 unsigned long flags; 15.166 15.167 @@ -1705,7 +1773,7 @@ void disable_IO_APIC(void) 15.168 entry.polarity = 0; /* High */ 15.169 entry.delivery_status = 0; 15.170 entry.dest_mode = 0; /* Physical */ 15.171 - entry.delivery_mode = 7; /* ExtInt */ 15.172 + entry.delivery_mode = dest_ExtINT; /* ExtInt */ 15.173 entry.vector = 0; 15.174 entry.dest.physical.physical_dest = 0; 15.175 15.176 @@ -1714,11 +1782,13 @@ void disable_IO_APIC(void) 15.177 * Add it to the IO-APIC irq-routing table: 15.178 */ 15.179 spin_lock_irqsave(&ioapic_lock, flags); 15.180 - io_apic_write(0, 0x11+2*pin, *(((int *)&entry)+1)); 15.181 - io_apic_write(0, 0x10+2*pin, *(((int *)&entry)+0)); 15.182 + io_apic_write(ioapic_i8259.apic, 0x11+2*ioapic_i8259.pin, 15.183 + *(((int *)&entry)+1)); 15.184 + io_apic_write(ioapic_i8259.apic, 0x10+2*ioapic_i8259.pin, 15.185 + *(((int *)&entry)+0)); 15.186 spin_unlock_irqrestore(&ioapic_lock, flags); 15.187 } 15.188 - disconnect_bsp_APIC(pin != -1); 15.189 + disconnect_bsp_APIC(ioapic_i8259.pin != -1); 15.190 #endif 15.191 } 15.192 15.193 @@ -1994,7 +2064,7 @@ static void ack_edge_ioapic_vector(unsig 15.194 { 15.195 int irq = vector_to_irq(vector); 15.196 15.197 - move_irq(vector); 15.198 + move_native_irq(vector); 15.199 ack_edge_ioapic_irq(irq); 15.200 } 15.201 15.202 @@ -2009,7 +2079,7 @@ static void end_level_ioapic_vector (uns 15.203 { 15.204 int irq = vector_to_irq(vector); 15.205 15.206 - move_irq(vector); 15.207 + move_native_irq(vector); 15.208 end_level_ioapic_irq(irq); 15.209 } 15.210 15.211 @@ -2174,20 +2244,21 @@ static void setup_nmi (void) 15.212 */ 15.213 static inline void unlock_ExtINT_logic(void) 15.214 { 15.215 - int pin, i; 15.216 + int apic, pin, i; 15.217 struct IO_APIC_route_entry entry0, entry1; 15.218 unsigned char save_control, save_freq_select; 15.219 unsigned long flags; 15.220 15.221 - pin = find_isa_irq_pin(8, mp_INT); 15.222 + pin = find_isa_irq_pin(8, mp_INT); 15.223 + apic = find_isa_irq_apic(8, mp_INT); 15.224 if (pin == -1) 15.225 return; 15.226 15.227 spin_lock_irqsave(&ioapic_lock, flags); 15.228 - *(((int *)&entry0) + 1) = io_apic_read(0, 0x11 + 2 * pin); 15.229 - *(((int *)&entry0) + 0) = io_apic_read(0, 0x10 + 2 * pin); 15.230 + *(((int *)&entry0) + 1) = io_apic_read(apic, 0x11 + 2 * pin); 15.231 + *(((int *)&entry0) + 0) = io_apic_read(apic, 0x10 + 2 * pin); 15.232 spin_unlock_irqrestore(&ioapic_lock, flags); 15.233 - clear_IO_APIC_pin(0, pin); 15.234 + clear_IO_APIC_pin(apic, pin); 15.235 15.236 memset(&entry1, 0, sizeof(entry1)); 15.237 15.238 @@ -2200,8 +2271,8 @@ static inline void unlock_ExtINT_logic(v 15.239 entry1.vector = 0; 15.240 15.241 spin_lock_irqsave(&ioapic_lock, flags); 15.242 - io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry1) + 1)); 15.243 - io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry1) + 0)); 15.244 + io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry1) + 1)); 15.245 + io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry1) + 0)); 15.246 spin_unlock_irqrestore(&ioapic_lock, flags); 15.247 15.248 save_control = CMOS_READ(RTC_CONTROL); 15.249 @@ -2219,11 +2290,11 @@ static inline void unlock_ExtINT_logic(v 15.250 15.251 CMOS_WRITE(save_control, RTC_CONTROL); 15.252 CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT); 15.253 - clear_IO_APIC_pin(0, pin); 15.254 + clear_IO_APIC_pin(apic, pin); 15.255 15.256 spin_lock_irqsave(&ioapic_lock, flags); 15.257 - io_apic_write(0, 0x11 + 2 * pin, *(((int *)&entry0) + 1)); 15.258 - io_apic_write(0, 0x10 + 2 * pin, *(((int *)&entry0) + 0)); 15.259 + io_apic_write(apic, 0x11 + 2 * pin, *(((int *)&entry0) + 1)); 15.260 + io_apic_write(apic, 0x10 + 2 * pin, *(((int *)&entry0) + 0)); 15.261 spin_unlock_irqrestore(&ioapic_lock, flags); 15.262 } 15.263 15.264 @@ -2235,7 +2306,7 @@ static inline void unlock_ExtINT_logic(v 15.265 */ 15.266 static inline void check_timer(void) 15.267 { 15.268 - int pin1, pin2; 15.269 + int apic1, pin1, apic2, pin2; 15.270 int vector; 15.271 15.272 /* 15.273 @@ -2257,10 +2328,13 @@ static inline void check_timer(void) 15.274 timer_ack = 1; 15.275 enable_8259A_irq(0); 15.276 15.277 - pin1 = find_isa_irq_pin(0, mp_INT); 15.278 - pin2 = find_isa_irq_pin(0, mp_ExtINT); 15.279 - 15.280 - printk(KERN_INFO "..TIMER: vector=0x%02X pin1=%d pin2=%d\n", vector, pin1, pin2); 15.281 + pin1 = find_isa_irq_pin(0, mp_INT); 15.282 + apic1 = find_isa_irq_apic(0, mp_INT); 15.283 + pin2 = ioapic_i8259.pin; 15.284 + apic2 = ioapic_i8259.apic; 15.285 + 15.286 + printk(KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", 15.287 + vector, apic1, pin1, apic2, pin2); 15.288 15.289 if (pin1 != -1) { 15.290 /* 15.291 @@ -2277,8 +2351,9 @@ static inline void check_timer(void) 15.292 clear_IO_APIC_pin(0, pin1); 15.293 return; 15.294 } 15.295 - clear_IO_APIC_pin(0, pin1); 15.296 - printk(KERN_ERR "..MP-BIOS bug: 8254 timer not connected to IO-APIC\n"); 15.297 + clear_IO_APIC_pin(apic1, pin1); 15.298 + printk(KERN_ERR "..MP-BIOS bug: 8254 timer not connected to " 15.299 + "IO-APIC\n"); 15.300 } 15.301 15.302 printk(KERN_INFO "...trying to set up timer (IRQ0) through the 8259A ... "); 15.303 @@ -2287,13 +2362,13 @@ static inline void check_timer(void) 15.304 /* 15.305 * legacy devices should be connected to IO APIC #0 15.306 */ 15.307 - setup_ExtINT_IRQ0_pin(pin2, vector); 15.308 + setup_ExtINT_IRQ0_pin(apic2, pin2, vector); 15.309 if (timer_irq_works()) { 15.310 printk("works.\n"); 15.311 if (pin1 != -1) 15.312 - replace_pin_at_irq(0, 0, pin1, 0, pin2); 15.313 + replace_pin_at_irq(0, apic1, pin1, apic2, pin2); 15.314 else 15.315 - add_pin_to_irq(0, 0, pin2); 15.316 + add_pin_to_irq(0, apic2, pin2); 15.317 if (nmi_watchdog == NMI_IO_APIC) { 15.318 setup_nmi(); 15.319 } 15.320 @@ -2302,7 +2377,7 @@ static inline void check_timer(void) 15.321 /* 15.322 * Cleanup, just in case ... 15.323 */ 15.324 - clear_IO_APIC_pin(0, pin2); 15.325 + clear_IO_APIC_pin(apic2, pin2); 15.326 } 15.327 printk(" failed.\n"); 15.328
16.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c Wed Feb 01 17:06:16 2006 +0000 16.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/irq-xen.c Wed Feb 01 18:00:19 2006 +0000 16.3 @@ -218,7 +218,7 @@ int show_interrupts(struct seq_file *p, 16.4 16.5 if (i == 0) { 16.6 seq_printf(p, " "); 16.7 - for_each_cpu(j) 16.8 + for_each_online_cpu(j) 16.9 seq_printf(p, "CPU%d ",j); 16.10 seq_putc(p, '\n'); 16.11 } 16.12 @@ -232,7 +232,7 @@ int show_interrupts(struct seq_file *p, 16.13 #ifndef CONFIG_SMP 16.14 seq_printf(p, "%10u ", kstat_irqs(i)); 16.15 #else 16.16 - for_each_cpu(j) 16.17 + for_each_online_cpu(j) 16.18 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); 16.19 #endif 16.20 seq_printf(p, " %14s", irq_desc[i].handler->typename); 16.21 @@ -246,12 +246,12 @@ skip: 16.22 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 16.23 } else if (i == NR_IRQS) { 16.24 seq_printf(p, "NMI: "); 16.25 - for_each_cpu(j) 16.26 + for_each_online_cpu(j) 16.27 seq_printf(p, "%10u ", nmi_count(j)); 16.28 seq_putc(p, '\n'); 16.29 #ifdef CONFIG_X86_LOCAL_APIC 16.30 seq_printf(p, "LOC: "); 16.31 - for_each_cpu(j) 16.32 + for_each_online_cpu(j) 16.33 seq_printf(p, "%10u ", 16.34 per_cpu(irq_stat,j).apic_timer_irqs); 16.35 seq_putc(p, '\n');
17.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/ldt-xen.c Wed Feb 01 17:06:16 2006 +0000 17.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/ldt-xen.c Wed Feb 01 18:00:19 2006 +0000 17.3 @@ -18,6 +18,7 @@ 17.4 #include <asm/system.h> 17.5 #include <asm/ldt.h> 17.6 #include <asm/desc.h> 17.7 +#include <asm/mmu_context.h> 17.8 17.9 #ifdef CONFIG_SMP /* avoids "defined but not used" warnig */ 17.10 static void flush_ldt(void *null)
18.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/mpparse-xen.c Wed Feb 01 17:06:16 2006 +0000 18.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/mpparse-xen.c Wed Feb 01 18:00:19 2006 +0000 18.3 @@ -69,7 +69,7 @@ unsigned int def_to_bigsmp = 0; 18.4 /* Processor that is doing the boot up */ 18.5 unsigned int boot_cpu_physical_apicid = -1U; 18.6 /* Internal processor count */ 18.7 -static unsigned int __initdata num_processors; 18.8 +static unsigned int __devinitdata num_processors; 18.9 18.10 /* Bitmask of physically existing CPUs */ 18.11 physid_mask_t phys_cpu_present_map; 18.12 @@ -120,7 +120,7 @@ static int MP_valid_apicid(int apicid, i 18.13 #endif 18.14 18.15 #ifndef CONFIG_XEN 18.16 -static void __init MP_processor_info (struct mpc_config_processor *m) 18.17 +static void __devinit MP_processor_info (struct mpc_config_processor *m) 18.18 { 18.19 int ver, apicid; 18.20 physid_mask_t phys_cpu; 18.21 @@ -183,17 +183,6 @@ static void __init MP_processor_info (st 18.22 boot_cpu_physical_apicid = m->mpc_apicid; 18.23 } 18.24 18.25 - if (num_processors >= NR_CPUS) { 18.26 - printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." 18.27 - " Processor ignored.\n", NR_CPUS); 18.28 - return; 18.29 - } 18.30 - 18.31 - if (num_processors >= maxcpus) { 18.32 - printk(KERN_WARNING "WARNING: maxcpus limit of %i reached." 18.33 - " Processor ignored.\n", maxcpus); 18.34 - return; 18.35 - } 18.36 ver = m->mpc_apicver; 18.37 18.38 if (!MP_valid_apicid(apicid, ver)) { 18.39 @@ -202,11 +191,6 @@ static void __init MP_processor_info (st 18.40 return; 18.41 } 18.42 18.43 - cpu_set(num_processors, cpu_possible_map); 18.44 - num_processors++; 18.45 - phys_cpu = apicid_to_cpu_present(apicid); 18.46 - physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu); 18.47 - 18.48 /* 18.49 * Validate version 18.50 */ 18.51 @@ -217,9 +201,29 @@ static void __init MP_processor_info (st 18.52 ver = 0x10; 18.53 } 18.54 apic_version[m->mpc_apicid] = ver; 18.55 + 18.56 + phys_cpu = apicid_to_cpu_present(apicid); 18.57 + physids_or(phys_cpu_present_map, phys_cpu_present_map, phys_cpu); 18.58 + 18.59 + if (num_processors >= NR_CPUS) { 18.60 + printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." 18.61 + " Processor ignored.\n", NR_CPUS); 18.62 + return; 18.63 + } 18.64 + 18.65 + if (num_processors >= maxcpus) { 18.66 + printk(KERN_WARNING "WARNING: maxcpus limit of %i reached." 18.67 + " Processor ignored.\n", maxcpus); 18.68 + return; 18.69 + } 18.70 + 18.71 + cpu_set(num_processors, cpu_possible_map); 18.72 + num_processors++; 18.73 + 18.74 if ((num_processors > 8) && 18.75 - APIC_XAPIC(ver) && 18.76 - (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) 18.77 + ((APIC_XAPIC(ver) && 18.78 + (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) || 18.79 + (boot_cpu_data.x86_vendor == X86_VENDOR_AMD))) 18.80 def_to_bigsmp = 1; 18.81 else 18.82 def_to_bigsmp = 0; 18.83 @@ -850,7 +854,7 @@ void __init mp_register_lapic_address ( 18.84 } 18.85 18.86 18.87 -void __init mp_register_lapic ( 18.88 +void __devinit mp_register_lapic ( 18.89 u8 id, 18.90 u8 enabled) 18.91 {
19.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c Wed Feb 01 17:06:16 2006 +0000 19.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c Wed Feb 01 18:00:19 2006 +0000 19.3 @@ -108,16 +108,32 @@ void xen_idle(void) 19.4 if (need_resched()) { 19.5 local_irq_enable(); 19.6 } else { 19.7 + clear_thread_flag(TIF_POLLING_NRFLAG); 19.8 + smp_mb__after_clear_bit(); 19.9 stop_hz_timer(); 19.10 /* Blocking includes an implicit local_irq_enable(). */ 19.11 HYPERVISOR_sched_op(SCHEDOP_block, 0); 19.12 start_hz_timer(); 19.13 + set_thread_flag(TIF_POLLING_NRFLAG); 19.14 } 19.15 } 19.16 #ifdef CONFIG_APM_MODULE 19.17 EXPORT_SYMBOL(default_idle); 19.18 #endif 19.19 19.20 +#ifdef CONFIG_HOTPLUG_CPU 19.21 +static inline void play_dead(void) 19.22 +{ 19.23 + HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL); 19.24 + local_irq_enable(); 19.25 +} 19.26 +#else 19.27 +static inline void play_dead(void) 19.28 +{ 19.29 + BUG(); 19.30 +} 19.31 +#endif /* CONFIG_HOTPLUG_CPU */ 19.32 + 19.33 /* 19.34 * The idle thread. There's no useful work to be 19.35 * done, so just try to conserve power and have a 19.36 @@ -126,9 +142,9 @@ EXPORT_SYMBOL(default_idle); 19.37 */ 19.38 void cpu_idle(void) 19.39 { 19.40 -#if defined(CONFIG_HOTPLUG_CPU) 19.41 - int cpu = raw_smp_processor_id(); 19.42 -#endif 19.43 + int cpu = smp_processor_id(); 19.44 + 19.45 + set_thread_flag(TIF_POLLING_NRFLAG); 19.46 19.47 /* endless idle loop with no priority at all */ 19.48 while (1) { 19.49 @@ -139,17 +155,15 @@ void cpu_idle(void) 19.50 19.51 rmb(); 19.52 19.53 -#if defined(CONFIG_HOTPLUG_CPU) 19.54 - if (cpu_is_offline(cpu)) { 19.55 - HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL); 19.56 - local_irq_enable(); 19.57 - } 19.58 -#endif 19.59 + if (cpu_is_offline(cpu)) 19.60 + play_dead(); 19.61 19.62 __get_cpu_var(irq_stat).idle_timestamp = jiffies; 19.63 xen_idle(); 19.64 } 19.65 + preempt_enable_no_resched(); 19.66 schedule(); 19.67 + preempt_disable(); 19.68 } 19.69 } 19.70 19.71 @@ -187,6 +201,8 @@ void __devinit select_idle_routine(const 19.72 19.73 void show_regs(struct pt_regs * regs) 19.74 { 19.75 + unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; 19.76 + 19.77 printk("\n"); 19.78 printk("Pid: %d, comm: %20s\n", current->pid, current->comm); 19.79 printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id()); 19.80 @@ -203,6 +219,13 @@ void show_regs(struct pt_regs * regs) 19.81 printk(" DS: %04x ES: %04x\n", 19.82 0xffff & regs->xds,0xffff & regs->xes); 19.83 19.84 + cr0 = read_cr0(); 19.85 + cr2 = read_cr2(); 19.86 + cr3 = read_cr3(); 19.87 + if (current_cpu_data.x86 > 4) { 19.88 + cr4 = read_cr4(); 19.89 + } 19.90 + printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4); 19.91 show_trace(NULL, ®s->esp); 19.92 } 19.93 19.94 @@ -275,13 +298,6 @@ void flush_thread(void) 19.95 { 19.96 struct task_struct *tsk = current; 19.97 19.98 - /* 19.99 - * Remove function-return probe instances associated with this task 19.100 - * and put them back on the free list. Do not insert an exit probe for 19.101 - * this function, it will be disabled by kprobe_flush_task if you do. 19.102 - */ 19.103 - kprobe_flush_task(tsk); 19.104 - 19.105 memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8); 19.106 memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array)); 19.107 /* 19.108 @@ -445,7 +461,9 @@ int dump_task_regs(struct task_struct *t 19.109 struct pt_regs ptregs; 19.110 19.111 ptregs = *(struct pt_regs *) 19.112 - ((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs)); 19.113 + ((unsigned long)tsk->thread_info + 19.114 + /* see comments in copy_thread() about -8 */ 19.115 + THREAD_SIZE - sizeof(ptregs) - 8); 19.116 ptregs.xcs &= 0xffff; 19.117 ptregs.xds &= 0xffff; 19.118 ptregs.xes &= 0xffff; 19.119 @@ -453,7 +471,6 @@ int dump_task_regs(struct task_struct *t 19.120 19.121 elf_core_copy_regs(regs, &ptregs); 19.122 19.123 - boot_option_idle_override = 1; 19.124 return 1; 19.125 } 19.126
20.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Wed Feb 01 17:06:16 2006 +0000 20.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Wed Feb 01 18:00:19 2006 +0000 20.3 @@ -142,9 +142,7 @@ struct drive_info_struct { char dummy[32 20.4 EXPORT_SYMBOL(drive_info); 20.5 #endif 20.6 struct screen_info screen_info; 20.7 -#ifdef CONFIG_VT 20.8 EXPORT_SYMBOL(screen_info); 20.9 -#endif 20.10 struct apm_info apm_info; 20.11 EXPORT_SYMBOL(apm_info); 20.12 struct sys_desc_table_struct { 20.13 @@ -425,14 +423,24 @@ static void __init limit_regions(unsigne 20.14 } 20.15 } 20.16 for (i = 0; i < e820.nr_map; i++) { 20.17 - if (e820.map[i].type == E820_RAM) { 20.18 - current_addr = e820.map[i].addr + e820.map[i].size; 20.19 - if (current_addr >= size) { 20.20 - e820.map[i].size -= current_addr-size; 20.21 - e820.nr_map = i + 1; 20.22 - return; 20.23 - } 20.24 + current_addr = e820.map[i].addr + e820.map[i].size; 20.25 + if (current_addr < size) 20.26 + continue; 20.27 + 20.28 + if (e820.map[i].type != E820_RAM) 20.29 + continue; 20.30 + 20.31 + if (e820.map[i].addr >= size) { 20.32 + /* 20.33 + * This region starts past the end of the 20.34 + * requested size, skip it completely. 20.35 + */ 20.36 + e820.nr_map = i; 20.37 + } else { 20.38 + e820.nr_map = i + 1; 20.39 + e820.map[i].size -= current_addr - size; 20.40 } 20.41 + return; 20.42 } 20.43 } 20.44
21.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/smpboot.c Wed Feb 01 17:06:16 2006 +0000 21.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/smpboot.c Wed Feb 01 18:00:19 2006 +0000 21.3 @@ -68,15 +68,15 @@ EXPORT_SYMBOL(smp_num_siblings); 21.4 21.5 /* Package ID of each logical CPU */ 21.6 int phys_proc_id[NR_CPUS] __read_mostly = {[0 ... NR_CPUS-1] = BAD_APICID}; 21.7 -EXPORT_SYMBOL(phys_proc_id); 21.8 21.9 /* Core ID of each logical CPU */ 21.10 int cpu_core_id[NR_CPUS] __read_mostly = {[0 ... NR_CPUS-1] = BAD_APICID}; 21.11 -EXPORT_SYMBOL(cpu_core_id); 21.12 21.13 +/* representing HT siblings of each logical CPU */ 21.14 cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly; 21.15 EXPORT_SYMBOL(cpu_sibling_map); 21.16 21.17 +/* representing HT and core siblings of each logical CPU */ 21.18 cpumask_t cpu_core_map[NR_CPUS] __read_mostly; 21.19 EXPORT_SYMBOL(cpu_core_map); 21.20 21.21 @@ -87,7 +87,11 @@ EXPORT_SYMBOL(cpu_online_map); 21.22 cpumask_t cpu_callin_map; 21.23 cpumask_t cpu_callout_map; 21.24 EXPORT_SYMBOL(cpu_callout_map); 21.25 +#ifdef CONFIG_HOTPLUG_CPU 21.26 +cpumask_t cpu_possible_map = CPU_MASK_ALL; 21.27 +#else 21.28 cpumask_t cpu_possible_map; 21.29 +#endif 21.30 EXPORT_SYMBOL(cpu_possible_map); 21.31 static cpumask_t smp_commenced_mask; 21.32 21.33 @@ -440,35 +444,60 @@ static void __devinit smp_callin(void) 21.34 21.35 static int cpucount; 21.36 21.37 +/* representing cpus for which sibling maps can be computed */ 21.38 +static cpumask_t cpu_sibling_setup_map; 21.39 + 21.40 static inline void 21.41 set_cpu_sibling_map(int cpu) 21.42 { 21.43 int i; 21.44 + struct cpuinfo_x86 *c = cpu_data; 21.45 + 21.46 + cpu_set(cpu, cpu_sibling_setup_map); 21.47 21.48 if (smp_num_siblings > 1) { 21.49 - for (i = 0; i < NR_CPUS; i++) { 21.50 - if (!cpu_isset(i, cpu_callout_map)) 21.51 - continue; 21.52 - if (cpu_core_id[cpu] == cpu_core_id[i]) { 21.53 + for_each_cpu_mask(i, cpu_sibling_setup_map) { 21.54 + if (phys_proc_id[cpu] == phys_proc_id[i] && 21.55 + cpu_core_id[cpu] == cpu_core_id[i]) { 21.56 cpu_set(i, cpu_sibling_map[cpu]); 21.57 cpu_set(cpu, cpu_sibling_map[i]); 21.58 + cpu_set(i, cpu_core_map[cpu]); 21.59 + cpu_set(cpu, cpu_core_map[i]); 21.60 } 21.61 } 21.62 } else { 21.63 cpu_set(cpu, cpu_sibling_map[cpu]); 21.64 } 21.65 21.66 - if (current_cpu_data.x86_num_cores > 1) { 21.67 - for (i = 0; i < NR_CPUS; i++) { 21.68 - if (!cpu_isset(i, cpu_callout_map)) 21.69 - continue; 21.70 - if (phys_proc_id[cpu] == phys_proc_id[i]) { 21.71 - cpu_set(i, cpu_core_map[cpu]); 21.72 - cpu_set(cpu, cpu_core_map[i]); 21.73 - } 21.74 + if (current_cpu_data.x86_max_cores == 1) { 21.75 + cpu_core_map[cpu] = cpu_sibling_map[cpu]; 21.76 + c[cpu].booted_cores = 1; 21.77 + return; 21.78 + } 21.79 + 21.80 + for_each_cpu_mask(i, cpu_sibling_setup_map) { 21.81 + if (phys_proc_id[cpu] == phys_proc_id[i]) { 21.82 + cpu_set(i, cpu_core_map[cpu]); 21.83 + cpu_set(cpu, cpu_core_map[i]); 21.84 + /* 21.85 + * Does this new cpu bringup a new core? 21.86 + */ 21.87 + if (cpus_weight(cpu_sibling_map[cpu]) == 1) { 21.88 + /* 21.89 + * for each core in package, increment 21.90 + * the booted_cores for this new cpu 21.91 + */ 21.92 + if (first_cpu(cpu_sibling_map[i]) == i) 21.93 + c[cpu].booted_cores++; 21.94 + /* 21.95 + * increment the core count for all 21.96 + * the other cpus in this package 21.97 + */ 21.98 + if (i != cpu) 21.99 + c[i].booted_cores++; 21.100 + } else if (i != cpu && !c[cpu].booted_cores) 21.101 + c[cpu].booted_cores = c[i].booted_cores; 21.102 } 21.103 - } else { 21.104 - cpu_core_map[cpu] = cpu_sibling_map[cpu]; 21.105 } 21.106 } 21.107 21.108 @@ -483,6 +512,7 @@ static void __devinit start_secondary(vo 21.109 * things done here to the most necessary things. 21.110 */ 21.111 cpu_init(); 21.112 + preempt_disable(); 21.113 smp_callin(); 21.114 while (!cpu_isset(smp_processor_id(), smp_commenced_mask)) 21.115 rep_nop(); 21.116 @@ -608,7 +638,7 @@ static inline void __inquire_remote_apic 21.117 21.118 printk("Inquiring remote APIC #%d...\n", apicid); 21.119 21.120 - for (i = 0; i < sizeof(regs) / sizeof(*regs); i++) { 21.121 + for (i = 0; i < ARRAY_SIZE(regs); i++) { 21.122 printk("... APIC #%d %s: ", apicid, names[i]); 21.123 21.124 /* 21.125 @@ -1092,11 +1122,8 @@ static void __init smp_boot_cpus(unsigne 21.126 21.127 current_thread_info()->cpu = 0; 21.128 smp_tune_scheduling(); 21.129 - cpus_clear(cpu_sibling_map[0]); 21.130 - cpu_set(0, cpu_sibling_map[0]); 21.131 21.132 - cpus_clear(cpu_core_map[0]); 21.133 - cpu_set(0, cpu_core_map[0]); 21.134 + set_cpu_sibling_map(0); 21.135 21.136 /* 21.137 * If we couldn't find an SMP configuration at boot time, 21.138 @@ -1280,15 +1307,24 @@ static void 21.139 remove_siblinginfo(int cpu) 21.140 { 21.141 int sibling; 21.142 + struct cpuinfo_x86 *c = cpu_data; 21.143 21.144 + for_each_cpu_mask(sibling, cpu_core_map[cpu]) { 21.145 + cpu_clear(cpu, cpu_core_map[sibling]); 21.146 + /* 21.147 + * last thread sibling in this cpu core going down 21.148 + */ 21.149 + if (cpus_weight(cpu_sibling_map[cpu]) == 1) 21.150 + c[sibling].booted_cores--; 21.151 + } 21.152 + 21.153 for_each_cpu_mask(sibling, cpu_sibling_map[cpu]) 21.154 cpu_clear(cpu, cpu_sibling_map[sibling]); 21.155 - for_each_cpu_mask(sibling, cpu_core_map[cpu]) 21.156 - cpu_clear(cpu, cpu_core_map[sibling]); 21.157 cpus_clear(cpu_sibling_map[cpu]); 21.158 cpus_clear(cpu_core_map[cpu]); 21.159 phys_proc_id[cpu] = BAD_APICID; 21.160 cpu_core_id[cpu] = BAD_APICID; 21.161 + cpu_clear(cpu, cpu_sibling_setup_map); 21.162 } 21.163 21.164 int __cpu_disable(void) 21.165 @@ -1307,8 +1343,7 @@ int __cpu_disable(void) 21.166 if (cpu == 0) 21.167 return -EBUSY; 21.168 21.169 - /* We enable the timer again on the exit path of the death loop */ 21.170 - disable_APIC_timer(); 21.171 + clear_local_APIC(); 21.172 /* Allow any queued timer interrupts to get serviced */ 21.173 local_irq_enable(); 21.174 mdelay(1);
22.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c Wed Feb 01 17:06:16 2006 +0000 22.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c Wed Feb 01 18:00:19 2006 +0000 22.3 @@ -69,8 +69,6 @@ 22.4 22.5 #include <asm/arch_hooks.h> 22.6 22.7 -#include "io_ports.h" 22.8 - 22.9 #include <xen/evtchn.h> 22.10 22.11 #if defined (__i386__) 22.12 @@ -79,10 +77,6 @@ 22.13 22.14 int pit_latch_buggy; /* extern */ 22.15 22.16 -u64 jiffies_64 = INITIAL_JIFFIES; 22.17 - 22.18 -EXPORT_SYMBOL(jiffies_64); 22.19 - 22.20 #if defined(__x86_64__) 22.21 unsigned long vxtime_hz = PIT_TICK_RATE; 22.22 struct vxtime_data __vxtime __section_vxtime; /* for vsyscalls */
23.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/traps-xen.c Wed Feb 01 17:06:16 2006 +0000 23.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/traps-xen.c Wed Feb 01 18:00:19 2006 +0000 23.3 @@ -627,13 +627,6 @@ fastcall void do_nmi(struct pt_regs * re 23.4 23.5 cpu = smp_processor_id(); 23.6 23.7 -#ifdef CONFIG_HOTPLUG_CPU 23.8 - if (!cpu_online(cpu)) { 23.9 - nmi_exit(); 23.10 - return; 23.11 - } 23.12 -#endif 23.13 - 23.14 ++nmi_count(cpu); 23.15 23.16 if (!rcu_dereference(nmi_callback)(regs, cpu))
24.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/traps.c Wed Feb 01 17:06:16 2006 +0000 24.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/traps.c Wed Feb 01 18:00:19 2006 +0000 24.3 @@ -488,6 +488,7 @@ fastcall void __kprobes do_general_prote 24.4 tss->io_bitmap_max - thread->io_bitmap_max); 24.5 tss->io_bitmap_max = thread->io_bitmap_max; 24.6 tss->io_bitmap_base = IO_BITMAP_OFFSET; 24.7 + tss->io_bitmap_owner = thread; 24.8 put_cpu(); 24.9 return; 24.10 } 24.11 @@ -642,13 +643,6 @@ fastcall void do_nmi(struct pt_regs * re 24.12 24.13 cpu = smp_processor_id(); 24.14 24.15 -#ifdef CONFIG_HOTPLUG_CPU 24.16 - if (!cpu_online(cpu)) { 24.17 - nmi_exit(); 24.18 - return; 24.19 - } 24.20 -#endif 24.21 - 24.22 ++nmi_count(cpu); 24.23 24.24 if (!rcu_dereference(nmi_callback)(regs, cpu))
25.1 --- a/linux-2.6-xen-sparse/arch/i386/mach-xen/Makefile Wed Feb 01 17:06:16 2006 +0000 25.2 +++ b/linux-2.6-xen-sparse/arch/i386/mach-xen/Makefile Wed Feb 01 18:00:19 2006 +0000 25.3 @@ -3,5 +3,5 @@ 25.4 # 25.5 25.6 obj-y := setup.o topology.o 25.7 - 25.8 + 25.9 topology-y := ../mach-default/topology.o
26.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/fault-xen.c Wed Feb 01 17:06:16 2006 +0000 26.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/fault-xen.c Wed Feb 01 18:00:19 2006 +0000 26.3 @@ -22,7 +22,6 @@ 26.4 #include <linux/highmem.h> 26.5 #include <linux/module.h> 26.6 #include <linux/kprobes.h> 26.7 -#include <linux/percpu.h> 26.8 26.9 #include <asm/system.h> 26.10 #include <asm/uaccess.h> 26.11 @@ -31,8 +30,6 @@ 26.12 26.13 extern void die(const char *,struct pt_regs *,long); 26.14 26.15 -DEFINE_PER_CPU(pgd_t *, cur_pgd); 26.16 - 26.17 /* 26.18 * Unlock any spinlocks which will prevent us from getting the 26.19 * message out 26.20 @@ -111,7 +108,7 @@ static inline unsigned long get_segment_ 26.21 desc = (void *)desc + (seg & ~7); 26.22 } else { 26.23 /* Must disable preemption while reading the GDT. */ 26.24 - desc = (u32 *)get_cpu_gdt_table(get_cpu()); 26.25 + desc = (u32 *)get_cpu_gdt_table(get_cpu()); 26.26 desc = (void *)desc + (seg & ~7); 26.27 } 26.28 26.29 @@ -223,10 +220,7 @@ static void dump_fault_path(unsigned lon 26.30 unsigned long *p, page; 26.31 unsigned long mfn; 26.32 26.33 - preempt_disable(); 26.34 - page = __pa(per_cpu(cur_pgd, smp_processor_id())); 26.35 - preempt_enable(); 26.36 - 26.37 + page = read_cr3(); 26.38 p = (unsigned long *)__va(page); 26.39 p += (address >> 30) * 2; 26.40 printk(KERN_ALERT "%08lx -> *pde = %08lx:%08lx\n", page, p[1], p[0]); 26.41 @@ -256,13 +250,8 @@ static void dump_fault_path(unsigned lon 26.42 { 26.43 unsigned long page; 26.44 26.45 - preempt_disable(); 26.46 - page = ((unsigned long *) per_cpu(cur_pgd, smp_processor_id())) 26.47 - [address >> 22]; 26.48 - preempt_enable(); 26.49 - 26.50 - page = ((unsigned long *) per_cpu(cur_pgd, get_cpu())) 26.51 - [address >> 22]; 26.52 + page = read_cr3(); 26.53 + page = ((unsigned long *) __va(page))[address >> 22]; 26.54 printk(KERN_ALERT "*pde = ma %08lx pa %08lx\n", page, 26.55 machine_to_phys(page)); 26.56 /* 26.57 @@ -304,8 +293,8 @@ fastcall void __kprobes do_page_fault(st 26.58 unsigned long address; 26.59 int write, si_code; 26.60 26.61 - address = HYPERVISOR_shared_info->vcpu_info[ 26.62 - smp_processor_id()].arch.cr2; 26.63 + /* get the address */ 26.64 + address = read_cr2(); 26.65 26.66 /* Set the "privileged fault" bit to something sane. */ 26.67 error_code &= ~4; 26.68 @@ -582,14 +571,14 @@ vmalloc_fault: 26.69 * an interrupt in the middle of a task switch.. 26.70 */ 26.71 int index = pgd_index(address); 26.72 + unsigned long pgd_paddr; 26.73 pgd_t *pgd, *pgd_k; 26.74 pud_t *pud, *pud_k; 26.75 pmd_t *pmd, *pmd_k; 26.76 pte_t *pte_k; 26.77 26.78 - preempt_disable(); 26.79 - pgd = index + per_cpu(cur_pgd, smp_processor_id()); 26.80 - preempt_enable(); 26.81 + pgd_paddr = read_cr3(); 26.82 + pgd = index + (pgd_t *)__va(pgd_paddr); 26.83 pgd_k = init_mm.pgd + index; 26.84 26.85 if (!pgd_present(*pgd_k))
27.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c Wed Feb 01 17:06:16 2006 +0000 27.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c Wed Feb 01 18:00:19 2006 +0000 27.3 @@ -27,6 +27,8 @@ 27.4 #include <linux/slab.h> 27.5 #include <linux/proc_fs.h> 27.6 #include <linux/efi.h> 27.7 +#include <linux/memory_hotplug.h> 27.8 +#include <linux/initrd.h> 27.9 27.10 #include <asm/processor.h> 27.11 #include <asm/system.h> 27.12 @@ -313,18 +315,47 @@ static void __init permanent_kmaps_init( 27.13 pkmap_page_table = pte; 27.14 } 27.15 27.16 -void __init one_highpage_init(struct page *page, int pfn, int bad_ppro) 27.17 +static void __devinit free_new_highpage(struct page *page, int pfn) 27.18 +{ 27.19 + set_page_count(page, 1); 27.20 + if (pfn < xen_start_info->nr_pages) 27.21 + __free_page(page); 27.22 + totalhigh_pages++; 27.23 +} 27.24 + 27.25 +void __init add_one_highpage_init(struct page *page, int pfn, int bad_ppro) 27.26 { 27.27 if (page_is_ram(pfn) && !(bad_ppro && page_kills_ppro(pfn))) { 27.28 ClearPageReserved(page); 27.29 - set_page_count(page, 1); 27.30 - if (pfn < xen_start_info->nr_pages) 27.31 - __free_page(page); 27.32 - totalhigh_pages++; 27.33 + free_new_highpage(page, pfn); 27.34 } else 27.35 SetPageReserved(page); 27.36 } 27.37 27.38 +static int add_one_highpage_hotplug(struct page *page, unsigned long pfn) 27.39 +{ 27.40 + free_new_highpage(page, pfn); 27.41 + totalram_pages++; 27.42 +#ifdef CONFIG_FLATMEM 27.43 + max_mapnr = max(pfn, max_mapnr); 27.44 +#endif 27.45 + num_physpages++; 27.46 + return 0; 27.47 +} 27.48 + 27.49 +/* 27.50 + * Not currently handling the NUMA case. 27.51 + * Assuming single node and all memory that 27.52 + * has been added dynamically that would be 27.53 + * onlined here is in HIGHMEM 27.54 + */ 27.55 +void online_page(struct page *page) 27.56 +{ 27.57 + ClearPageReserved(page); 27.58 + add_one_highpage_hotplug(page, page_to_pfn(page)); 27.59 +} 27.60 + 27.61 + 27.62 #ifdef CONFIG_NUMA 27.63 extern void set_highmem_pages_init(int); 27.64 #else 27.65 @@ -332,7 +363,7 @@ static void __init set_highmem_pages_ini 27.66 { 27.67 int pfn; 27.68 for (pfn = highstart_pfn; pfn < highend_pfn; pfn++) 27.69 - one_highpage_init(pfn_to_page(pfn), pfn, bad_ppro); 27.70 + add_one_highpage_init(pfn_to_page(pfn), pfn, bad_ppro); 27.71 totalram_pages += totalhigh_pages; 27.72 } 27.73 #endif /* CONFIG_FLATMEM */ 27.74 @@ -359,12 +390,9 @@ static void __init pagetable_init (void) 27.75 { 27.76 unsigned long vaddr; 27.77 pgd_t *pgd_base = (pgd_t *)xen_start_info->pt_base; 27.78 - int i; 27.79 27.80 swapper_pg_dir = pgd_base; 27.81 init_mm.pgd = pgd_base; 27.82 - for (i = 0; i < NR_CPUS; i++) 27.83 - per_cpu(cur_pgd, i) = pgd_base; 27.84 27.85 /* Enable PSE if available */ 27.86 if (cpu_has_pse) { 27.87 @@ -694,6 +722,28 @@ void __init mem_init(void) 27.88 set_bit(PG_pinned, &virt_to_page(init_mm.pgd)->flags); 27.89 } 27.90 27.91 +/* 27.92 + * this is for the non-NUMA, single node SMP system case. 27.93 + * Specifically, in the case of x86, we will always add 27.94 + * memory to the highmem for now. 27.95 + */ 27.96 +#ifndef CONFIG_NEED_MULTIPLE_NODES 27.97 +int add_memory(u64 start, u64 size) 27.98 +{ 27.99 + struct pglist_data *pgdata = &contig_page_data; 27.100 + struct zone *zone = pgdata->node_zones + MAX_NR_ZONES-1; 27.101 + unsigned long start_pfn = start >> PAGE_SHIFT; 27.102 + unsigned long nr_pages = size >> PAGE_SHIFT; 27.103 + 27.104 + return __add_pages(zone, start_pfn, nr_pages); 27.105 +} 27.106 + 27.107 +int remove_memory(u64 start, u64 size) 27.108 +{ 27.109 + return -EINVAL; 27.110 +} 27.111 +#endif 27.112 + 27.113 kmem_cache_t *pgd_cache; 27.114 kmem_cache_t *pmd_cache; 27.115
28.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c Wed Feb 01 17:06:16 2006 +0000 28.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c Wed Feb 01 18:00:19 2006 +0000 28.3 @@ -323,9 +323,15 @@ void __iomem *ioremap_nocache (unsigned 28.4 } 28.5 EXPORT_SYMBOL(ioremap_nocache); 28.6 28.7 +/** 28.8 + * iounmap - Free a IO remapping 28.9 + * @addr: virtual address from ioremap_* 28.10 + * 28.11 + * Caller must ensure there is only one unmapping for the same pointer. 28.12 + */ 28.13 void iounmap(volatile void __iomem *addr) 28.14 { 28.15 - struct vm_struct *p; 28.16 + struct vm_struct *p, *o; 28.17 28.18 if ((void __force *)addr <= high_memory) 28.19 return; 28.20 @@ -338,14 +344,27 @@ void iounmap(volatile void __iomem *addr 28.21 if ((unsigned long) addr >= fix_to_virt(FIX_ISAMAP_BEGIN)) 28.22 return; 28.23 28.24 - write_lock(&vmlist_lock); 28.25 - p = __remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr)); 28.26 - if (!p) { 28.27 - printk(KERN_WARNING "iounmap: bad address %p\n", addr); 28.28 + addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long __force)addr); 28.29 + 28.30 + /* Use the vm area unlocked, assuming the caller 28.31 + ensures there isn't another iounmap for the same address 28.32 + in parallel. Reuse of the virtual address is prevented by 28.33 + leaving it in the global lists until we're done with it. 28.34 + cpa takes care of the direct mappings. */ 28.35 + read_lock(&vmlist_lock); 28.36 + for (p = vmlist; p; p = p->next) { 28.37 + if (p->addr == addr) 28.38 + break; 28.39 + } 28.40 + read_unlock(&vmlist_lock); 28.41 + 28.42 + if (!p) { 28.43 + printk("iounmap: bad address %p\n", addr); 28.44 dump_stack(); 28.45 - goto out_unlock; 28.46 + return; 28.47 } 28.48 28.49 + /* Reset the direct mapping. Can block */ 28.50 if ((p->flags >> 20) && is_local_lowmem(p->phys_addr)) { 28.51 /* p->size includes the guard page, but cpa doesn't like that */ 28.52 change_page_attr(virt_to_page(bus_to_virt(p->phys_addr)), 28.53 @@ -353,8 +372,10 @@ void iounmap(volatile void __iomem *addr 28.54 PAGE_KERNEL); 28.55 global_flush_tlb(); 28.56 } 28.57 -out_unlock: 28.58 - write_unlock(&vmlist_lock); 28.59 + 28.60 + /* Finally remove it */ 28.61 + o = remove_vm_area((void *)addr); 28.62 + BUG_ON(p != o || o == NULL); 28.63 kfree(p); 28.64 } 28.65 EXPORT_SYMBOL(iounmap);
29.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c Wed Feb 01 17:06:16 2006 +0000 29.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c Wed Feb 01 18:00:19 2006 +0000 29.3 @@ -39,11 +39,13 @@ void show_mem(void) 29.4 pg_data_t *pgdat; 29.5 unsigned long i; 29.6 struct page_state ps; 29.7 + unsigned long flags; 29.8 29.9 printk(KERN_INFO "Mem-info:\n"); 29.10 show_free_areas(); 29.11 printk(KERN_INFO "Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); 29.12 for_each_pgdat(pgdat) { 29.13 + pgdat_resize_lock(pgdat, &flags); 29.14 for (i = 0; i < pgdat->node_spanned_pages; ++i) { 29.15 page = pgdat_page_nr(pgdat, i); 29.16 total++; 29.17 @@ -56,6 +58,7 @@ void show_mem(void) 29.18 else if (page_count(page)) 29.19 shared += page_count(page) - 1; 29.20 } 29.21 + pgdat_resize_unlock(pgdat, &flags); 29.22 } 29.23 printk(KERN_INFO "%d pages of RAM\n", total); 29.24 printk(KERN_INFO "%d pages of HIGHMEM\n", highmem); 29.25 @@ -267,19 +270,19 @@ static inline void pgd_list_add(pgd_t *p 29.26 struct page *page = virt_to_page(pgd); 29.27 page->index = (unsigned long)pgd_list; 29.28 if (pgd_list) 29.29 - pgd_list->private = (unsigned long)&page->index; 29.30 + set_page_private(pgd_list, (unsigned long)&page->index); 29.31 pgd_list = page; 29.32 - page->private = (unsigned long)&pgd_list; 29.33 + set_page_private(page, (unsigned long)&pgd_list); 29.34 } 29.35 29.36 static inline void pgd_list_del(pgd_t *pgd) 29.37 { 29.38 struct page *next, **pprev, *page = virt_to_page(pgd); 29.39 next = (struct page *)page->index; 29.40 - pprev = (struct page **)page->private; 29.41 + pprev = (struct page **)page_private(page); 29.42 *pprev = next; 29.43 if (next) 29.44 - next->private = (unsigned long)pprev; 29.45 + set_page_private(next, (unsigned long)pprev); 29.46 } 29.47 29.48 void pgd_ctor(void *pgd, kmem_cache_t *cache, unsigned long unused)
30.1 --- a/linux-2.6-xen-sparse/arch/i386/pci/Makefile Wed Feb 01 17:06:16 2006 +0000 30.2 +++ b/linux-2.6-xen-sparse/arch/i386/pci/Makefile Wed Feb 01 18:00:19 2006 +0000 30.3 @@ -1,7 +1,7 @@ 30.4 obj-y := i386.o 30.5 30.6 obj-$(CONFIG_PCI_BIOS) += pcbios.o 30.7 -obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o 30.8 +obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o 30.9 obj-$(CONFIG_PCI_DIRECT) += direct.o 30.10 30.11 pci-y := fixup.o
31.1 --- a/linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c Wed Feb 01 17:06:16 2006 +0000 31.2 +++ b/linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c Wed Feb 01 18:00:19 2006 +0000 31.3 @@ -550,31 +550,48 @@ static __init int intel_router_probe(str 31.4 return 0; 31.5 } 31.6 31.7 -static __init int via_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) 31.8 +static __init int via_router_probe(struct irq_router *r, 31.9 + struct pci_dev *router, u16 device) 31.10 { 31.11 /* FIXME: We should move some of the quirk fixup stuff here */ 31.12 31.13 - if (router->device == PCI_DEVICE_ID_VIA_82C686 && 31.14 - device == PCI_DEVICE_ID_VIA_82C586_0) { 31.15 - /* Asus k7m bios wrongly reports 82C686A as 586-compatible */ 31.16 - device = PCI_DEVICE_ID_VIA_82C686; 31.17 + /* 31.18 + * work arounds for some buggy BIOSes 31.19 + */ 31.20 + if (device == PCI_DEVICE_ID_VIA_82C586_0) { 31.21 + switch(router->device) { 31.22 + case PCI_DEVICE_ID_VIA_82C686: 31.23 + /* 31.24 + * Asus k7m bios wrongly reports 82C686A 31.25 + * as 586-compatible 31.26 + */ 31.27 + device = PCI_DEVICE_ID_VIA_82C686; 31.28 + break; 31.29 + case PCI_DEVICE_ID_VIA_8235: 31.30 + /** 31.31 + * Asus a7v-x bios wrongly reports 8235 31.32 + * as 586-compatible 31.33 + */ 31.34 + device = PCI_DEVICE_ID_VIA_8235; 31.35 + break; 31.36 + } 31.37 } 31.38 31.39 - switch(device) 31.40 - { 31.41 - case PCI_DEVICE_ID_VIA_82C586_0: 31.42 - r->name = "VIA"; 31.43 - r->get = pirq_via586_get; 31.44 - r->set = pirq_via586_set; 31.45 - return 1; 31.46 - case PCI_DEVICE_ID_VIA_82C596: 31.47 - case PCI_DEVICE_ID_VIA_82C686: 31.48 - case PCI_DEVICE_ID_VIA_8231: 31.49 + switch(device) { 31.50 + case PCI_DEVICE_ID_VIA_82C586_0: 31.51 + r->name = "VIA"; 31.52 + r->get = pirq_via586_get; 31.53 + r->set = pirq_via586_set; 31.54 + return 1; 31.55 + case PCI_DEVICE_ID_VIA_82C596: 31.56 + case PCI_DEVICE_ID_VIA_82C686: 31.57 + case PCI_DEVICE_ID_VIA_8231: 31.58 + case PCI_DEVICE_ID_VIA_8235: 31.59 /* FIXME: add new ones for 8233/5 */ 31.60 - r->name = "VIA"; 31.61 - r->get = pirq_via_get; 31.62 - r->set = pirq_via_set; 31.63 - return 1; 31.64 + r->name = "VIA"; 31.65 + r->get = pirq_via_get; 31.66 + r->set = pirq_via_set; 31.67 + return 1; 31.68 } 31.69 return 0; 31.70 }
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 32.2 +++ b/linux-2.6-xen-sparse/arch/i386/power/Makefile Wed Feb 01 18:00:19 2006 +0000 32.3 @@ -0,0 +1,4 @@ 32.4 +obj-$(CONFIG_PM_LEGACY) += cpu.o 32.5 +obj-$(CONFIG_SOFTWARE_SUSPEND) += cpu.o 32.6 +obj-$(CONFIG_ACPI_SLEEP) += cpu.o 32.7 +obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o
33.1 --- a/linux-2.6-xen-sparse/arch/um/kernel/physmem.c Wed Feb 01 17:06:16 2006 +0000 33.2 +++ b/linux-2.6-xen-sparse/arch/um/kernel/physmem.c Wed Feb 01 18:00:19 2006 +0000 33.3 @@ -248,7 +248,7 @@ int is_remapped(void *virt) 33.4 /* Changed during early boot */ 33.5 unsigned long high_physmem; 33.6 33.7 -extern unsigned long physmem_size; 33.8 +extern unsigned long long physmem_size; 33.9 33.10 int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem) 33.11 { 33.12 @@ -323,7 +323,7 @@ void map_memory(unsigned long virt, unsi 33.13 extern int __syscall_stub_start, __binary_start; 33.14 33.15 void setup_physmem(unsigned long start, unsigned long reserve_end, 33.16 - unsigned long len, unsigned long highmem) 33.17 + unsigned long len, unsigned long long highmem) 33.18 { 33.19 unsigned long reserve = reserve_end - start; 33.20 int pfn = PFN_UP(__pa(reserve_end));
34.1 --- a/linux-2.6-xen-sparse/arch/x86_64/Kconfig Wed Feb 01 17:06:16 2006 +0000 34.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/Kconfig Wed Feb 01 18:00:19 2006 +0000 34.3 @@ -242,22 +242,42 @@ config SCHED_SMT 34.4 34.5 source "kernel/Kconfig.preempt" 34.6 34.7 -config K8_NUMA 34.8 - bool "K8 NUMA support" 34.9 - select NUMA 34.10 +config NUMA 34.11 + bool "Non Uniform Memory Access (NUMA) Support" 34.12 depends on SMP && !X86_64_XEN 34.13 help 34.14 - Enable NUMA (Non Unified Memory Architecture) support for 34.15 - AMD Opteron Multiprocessor systems. The kernel will try to allocate 34.16 - memory used by a CPU on the local memory controller of the CPU 34.17 - and add some more NUMA awareness to the kernel. 34.18 - This code is recommended on all multiprocessor Opteron systems 34.19 - and normally doesn't hurt on others. 34.20 + Enable NUMA (Non Uniform Memory Access) support. The kernel 34.21 + will try to allocate memory used by a CPU on the local memory 34.22 + controller of the CPU and add some more NUMA awareness to the kernel. 34.23 + This code is recommended on all multiprocessor Opteron systems. 34.24 + If the system is EM64T, you should say N unless your system is EM64T 34.25 + NUMA. 34.26 + 34.27 +config K8_NUMA 34.28 + bool "Old style AMD Opteron NUMA detection" 34.29 + depends on NUMA 34.30 + default y 34.31 + help 34.32 + Enable K8 NUMA node topology detection. You should say Y here if 34.33 + you have a multi processor AMD K8 system. This uses an old 34.34 + method to read the NUMA configurtion directly from the builtin 34.35 + Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA 34.36 + instead, which also takes priority if both are compiled in. 34.37 + 34.38 +# Dummy CONFIG option to select ACPI_NUMA from drivers/acpi/Kconfig. 34.39 + 34.40 +config X86_64_ACPI_NUMA 34.41 + bool "ACPI NUMA detection" 34.42 + depends on NUMA 34.43 + select ACPI 34.44 + select ACPI_NUMA 34.45 + default y 34.46 + help 34.47 + Enable ACPI SRAT based node topology detection. 34.48 34.49 config NUMA_EMU 34.50 - bool "NUMA emulation support" 34.51 - select NUMA 34.52 - depends on SMP && !X86_64_XEN 34.53 + bool "NUMA emulation" 34.54 + depends on NUMA 34.55 help 34.56 Enable NUMA emulation. A flat machine will be split 34.57 into virtual nodes when booted with "numa=fake=N", where N is the 34.58 @@ -268,9 +288,6 @@ config ARCH_DISCONTIGMEM_ENABLE 34.59 depends on NUMA 34.60 default y 34.61 34.62 -config NUMA 34.63 - bool 34.64 - default n 34.65 34.66 config ARCH_DISCONTIGMEM_ENABLE 34.67 def_bool y 34.68 @@ -393,6 +410,14 @@ config X86_MCE_INTEL 34.69 Additional support for intel specific MCE features such as 34.70 the thermal monitor. 34.71 34.72 +config X86_MCE_AMD 34.73 + bool "AMD MCE features" 34.74 + depends on X86_MCE && X86_LOCAL_APIC 34.75 + default y 34.76 + help 34.77 + Additional support for AMD specific MCE features such as 34.78 + the DRAM Error Threshold. 34.79 + 34.80 config PHYSICAL_START 34.81 hex "Physical address where the kernel is loaded" if EMBEDDED 34.82 default "0x100000" 34.83 @@ -528,7 +553,7 @@ config IA32_EMULATION 34.84 left. 34.85 34.86 config IA32_AOUT 34.87 - bool "IA32 a.out support" 34.88 + tristate "IA32 a.out support" 34.89 depends on IA32_EMULATION 34.90 help 34.91 Support old a.out binaries in the 32bit emulation. 34.92 @@ -558,8 +583,21 @@ source "drivers/firmware/Kconfig" 34.93 34.94 source fs/Kconfig 34.95 34.96 +menu "Instrumentation Support" 34.97 + depends on EXPERIMENTAL 34.98 + 34.99 source "arch/x86_64/oprofile/Kconfig" 34.100 34.101 +config KPROBES 34.102 + bool "Kprobes (EXPERIMENTAL)" 34.103 + help 34.104 + Kprobes allows you to trap at almost any kernel address and 34.105 + execute a callback function. register_kprobe() establishes 34.106 + a probepoint and specifies the callback. Kprobes is useful 34.107 + for kernel debugging, non-intrusive instrumentation and testing. 34.108 + If in doubt, say "N". 34.109 +endmenu 34.110 + 34.111 source "arch/x86_64/Kconfig.debug" 34.112 34.113 source "security/Kconfig"
35.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile Wed Feb 01 17:06:16 2006 +0000 35.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/Makefile Wed Feb 01 18:00:19 2006 +0000 35.3 @@ -11,6 +11,7 @@ obj-y := process.o signal.o entry.o trap 35.4 35.5 obj-$(CONFIG_X86_MCE) += mce.o 35.6 obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o 35.7 +obj-$(CONFIG_X86_MCE_AMD) += mce_amd.o 35.8 obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ 35.9 obj-$(CONFIG_ACPI) += acpi/ 35.10 obj-$(CONFIG_X86_MSR) += msr.o 35.11 @@ -22,13 +23,13 @@ obj-$(CONFIG_X86_XEN_GENAPIC) += genapic 35.12 obj-$(CONFIG_X86_IO_APIC) += io_apic.o mpparse.o \ 35.13 genapic.o genapic_cluster.o genapic_flat.o 35.14 obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o 35.15 -obj-$(CONFIG_PM) += suspend.o 35.16 +obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o 35.17 +obj-$(CONFIG_ACPI_SLEEP) += suspend.o 35.18 obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend_asm.o 35.19 obj-$(CONFIG_CPU_FREQ) += cpufreq/ 35.20 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 35.21 obj-$(CONFIG_GART_IOMMU) += pci-gart.o aperture.o 35.22 obj-$(CONFIG_DUMMY_IOMMU) += pci-nommu.o pci-dma.o 35.23 -obj-$(CONFIG_SWIOTLB) += swiotlb.o 35.24 obj-$(CONFIG_KPROBES) += kprobes.o 35.25 obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o 35.26 35.27 @@ -42,7 +43,6 @@ CFLAGS_vsyscall.o := $(PROFILING) -g0 35.28 bootflag-y += ../../i386/kernel/bootflag.o 35.29 cpuid-$(subst m,y,$(CONFIG_X86_CPUID)) += ../../i386/kernel/cpuid.o 35.30 topology-y += ../../i386/mach-default/topology.o 35.31 -swiotlb-$(CONFIG_SWIOTLB) += ../../ia64/lib/swiotlb.o 35.32 microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o 35.33 intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o 35.34 quirks-y += ../../i386/kernel/quirks.o 35.35 @@ -51,6 +51,7 @@ msr-$(subst m,y,$(CONFIG_X86_MSR)) += . 35.36 35.37 ifdef CONFIG_XEN 35.38 time-y += ../../i386/kernel/time-xen.o 35.39 +obj-$(CONFIG_SWIOTLB) += swiotlb.o 35.40 swiotlb-$(CONFIG_SWIOTLB) := ../../i386/kernel/swiotlb.o 35.41 pci-dma-y += ../../i386/kernel/pci-dma-xen.o 35.42 microcode-$(subst m,y,$(CONFIG_MICROCODE)) := ../../i386/kernel/microcode-xen.o
36.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/apic-xen.c Wed Feb 01 17:06:16 2006 +0000 36.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/apic-xen.c Wed Feb 01 18:00:19 2006 +0000 36.3 @@ -34,8 +34,6 @@ 36.4 #include <asm/arch_hooks.h> 36.5 #include <asm/hpet.h> 36.6 36.7 -#include "io_ports.h" 36.8 - 36.9 /* 36.10 * Debug level 36.11 */
37.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c Wed Feb 01 17:06:16 2006 +0000 37.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/e820-xen.c Wed Feb 01 18:00:19 2006 +0000 37.3 @@ -23,6 +23,7 @@ 37.4 #include <asm/e820.h> 37.5 #include <asm/proto.h> 37.6 #include <asm/bootsetup.h> 37.7 +#include <asm/sections.h> 37.8 #include <xen/interface/memory.h> 37.9 37.10 unsigned long pci_mem_start = 0xaeedbabe; 37.11 @@ -54,7 +55,6 @@ void __init add_memory_region(unsigned l 37.12 } 37.13 37.14 #ifndef CONFIG_XEN 37.15 -extern char _end[]; 37.16 37.17 /* 37.18 * end_pfn only includes RAM, while end_pfn_map includes all e820 entries.
38.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S Wed Feb 01 17:06:16 2006 +0000 38.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S Wed Feb 01 18:00:19 2006 +0000 38.3 @@ -609,7 +609,14 @@ retint_kernel: 38.4 CFI_ENDPROC 38.5 .endm 38.6 38.7 -#if 0 38.8 +#ifndef CONFIG_XEN 38.9 +ENTRY(thermal_interrupt) 38.10 + apicinterrupt THERMAL_APIC_VECTOR,smp_thermal_interrupt 38.11 + 38.12 +ENTRY(threshold_interrupt) 38.13 + apicinterrupt THRESHOLD_APIC_VECTOR,mce_threshold_interrupt 38.14 + 38.15 +#ifdef CONFIG_SMP 38.16 ENTRY(reschedule_interrupt) 38.17 apicinterrupt RESCHEDULE_VECTOR,smp_reschedule_interrupt 38.18 38.19 @@ -630,6 +637,7 @@ ENTRY(invalidate_interrupt\num) 38.20 ENTRY(call_function_interrupt) 38.21 apicinterrupt CALL_FUNCTION_VECTOR,smp_call_function_interrupt 38.22 #endif 38.23 +#endif /* !CONFIG_XEN */ 38.24 38.25 #ifdef CONFIG_X86_LOCAL_APIC 38.26 ENTRY(apic_timer_interrupt)
39.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S Wed Feb 01 17:06:16 2006 +0000 39.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S Wed Feb 01 18:00:19 2006 +0000 39.3 @@ -25,6 +25,7 @@ 39.4 39.5 39.6 #include <linux/threads.h> 39.7 +#include <linux/init.h> 39.8 #include <asm/desc.h> 39.9 #include <asm/segment.h> 39.10 #include <asm/page.h> 39.11 @@ -243,6 +244,26 @@ ENTRY(wakeup_level4_pgt) 39.12 .quad 0x0000000000003007 + __PHYSICAL_START /* -> level3_kernel_pgt */ 39.13 #endif 39.14 39.15 +#ifndef CONFIG_XEN 39.16 +#ifndef CONFIG_HOTPLUG_CPU 39.17 + __INITDATA 39.18 +#endif 39.19 + /* 39.20 + * This default setting generates an ident mapping at address 0x100000 39.21 + * and a mapping for the kernel that precisely maps virtual address 39.22 + * 0xffffffff80000000 to physical address 0x000000. (always using 39.23 + * 2Mbyte large pages provided by PAE mode) 39.24 + */ 39.25 + .align PAGE_SIZE 39.26 +ENTRY(boot_level4_pgt) 39.27 + .quad 0x0000000000002007 + __PHYSICAL_START /* -> level3_ident_pgt */ 39.28 + .fill 255,8,0 39.29 + .quad 0x000000000000a007 + __PHYSICAL_START 39.30 + .fill 254,8,0 39.31 + /* (2^48-(2*1024*1024*1024))/(2^39) = 511 */ 39.32 + .quad 0x0000000000003007 + __PHYSICAL_START /* -> level3_kernel_pgt */ 39.33 +#endif 39.34 + 39.35 .data 39.36 39.37 .align 16
40.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/head64-xen.c Wed Feb 01 17:06:16 2006 +0000 40.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/head64-xen.c Wed Feb 01 18:00:19 2006 +0000 40.3 @@ -22,6 +22,8 @@ 40.4 #include <asm/bootsetup.h> 40.5 #include <asm/setup.h> 40.6 #include <asm/desc.h> 40.7 +#include <asm/pgtable.h> 40.8 +#include <asm/sections.h> 40.9 40.10 unsigned long start_pfn; 40.11 40.12 @@ -30,9 +32,8 @@ unsigned long start_pfn; 40.13 #if 0 40.14 static void __init clear_bss(void) 40.15 { 40.16 - extern char __bss_start[], __bss_end[]; 40.17 memset(__bss_start, 0, 40.18 - (unsigned long) __bss_end - (unsigned long) __bss_start); 40.19 + (unsigned long) __bss_stop - (unsigned long) __bss_start); 40.20 } 40.21 #endif 40.22 40.23 @@ -84,8 +85,6 @@ static void __init setup_boot_cpu_data(v 40.24 boot_cpu_data.x86_mask = eax & 0xf; 40.25 } 40.26 40.27 -extern char _end[]; 40.28 - 40.29 void __init x86_64_start_kernel(char * real_mode_data) 40.30 { 40.31 int i;
41.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c Wed Feb 01 17:06:16 2006 +0000 41.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c Wed Feb 01 18:00:19 2006 +0000 41.3 @@ -57,7 +57,7 @@ int nr_ioapic_registers[MAX_IO_APICS]; 41.4 * Rough estimation of how many shared IRQs there are, can 41.5 * be changed anytime. 41.6 */ 41.7 -#define MAX_PLUS_SHARED_IRQS NR_IRQS 41.8 +#define MAX_PLUS_SHARED_IRQS NR_IRQ_VECTORS 41.9 #define PIN_MAP_SIZE (MAX_PLUS_SHARED_IRQS + NR_IRQS) 41.10 41.11 /* 41.12 @@ -162,6 +162,7 @@ static void add_pin_to_irq(unsigned int 41.13 static int first_free_entry = NR_IRQS; 41.14 struct irq_pin_list *entry = irq_2_pin + irq; 41.15 41.16 + BUG_ON(irq >= NR_IRQS); 41.17 while (entry->next) 41.18 entry = irq_2_pin + entry->next; 41.19 41.20 @@ -169,7 +170,7 @@ static void add_pin_to_irq(unsigned int 41.21 entry->next = first_free_entry; 41.22 entry = irq_2_pin + entry->next; 41.23 if (++first_free_entry >= PIN_MAP_SIZE) 41.24 - panic("io_apic.c: whoops"); 41.25 + panic("io_apic.c: ran out of irq_2_pin entries!"); 41.26 } 41.27 entry->apic = apic; 41.28 entry->pin = pin; 41.29 @@ -182,6 +183,7 @@ static void add_pin_to_irq(unsigned int 41.30 int pin; \ 41.31 struct irq_pin_list *entry = irq_2_pin + irq; \ 41.32 \ 41.33 + BUG_ON(irq >= NR_IRQS); \ 41.34 for (;;) { \ 41.35 unsigned int reg; \ 41.36 pin = entry->pin; \ 41.37 @@ -259,6 +261,8 @@ static void clear_IO_APIC (void) 41.38 41.39 #endif /* !CONFIG_XEN */ 41.40 41.41 +static u8 gsi_2_irq[NR_IRQ_VECTORS] = { [0 ... NR_IRQ_VECTORS-1] = 0xFF }; 41.42 + 41.43 /* 41.44 * support for broken MP BIOSs, enables hand-redirection of PIRQ0-7 to 41.45 * specific CPU-side IRQs. 41.46 @@ -470,6 +474,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, 41.47 best_guess = irq; 41.48 } 41.49 } 41.50 + BUG_ON(best_guess >= NR_IRQS); 41.51 return best_guess; 41.52 } 41.53 41.54 @@ -660,6 +665,64 @@ static inline int irq_trigger(int idx) 41.55 return MPBIOS_trigger(idx); 41.56 } 41.57 41.58 +static int next_irq = 16; 41.59 + 41.60 +/* 41.61 + * gsi_irq_sharing -- Name overload! "irq" can be either a legacy IRQ 41.62 + * in the range 0-15, a linux IRQ in the range 0-223, or a GSI number 41.63 + * from ACPI, which can reach 800 in large boxen. 41.64 + * 41.65 + * Compact the sparse GSI space into a sequential IRQ series and reuse 41.66 + * vectors if possible. 41.67 + */ 41.68 +int gsi_irq_sharing(int gsi) 41.69 +{ 41.70 + int i, tries, vector; 41.71 + 41.72 + BUG_ON(gsi >= NR_IRQ_VECTORS); 41.73 + 41.74 + if (platform_legacy_irq(gsi)) 41.75 + return gsi; 41.76 + 41.77 + if (gsi_2_irq[gsi] != 0xFF) 41.78 + return (int)gsi_2_irq[gsi]; 41.79 + 41.80 + tries = NR_IRQS; 41.81 + try_again: 41.82 + vector = assign_irq_vector(gsi); 41.83 + 41.84 + /* 41.85 + * Sharing vectors means sharing IRQs, so scan irq_vectors for previous 41.86 + * use of vector and if found, return that IRQ. However, we never want 41.87 + * to share legacy IRQs, which usually have a different trigger mode 41.88 + * than PCI. 41.89 + */ 41.90 + for (i = 0; i < NR_IRQS; i++) 41.91 + if (IO_APIC_VECTOR(i) == vector) 41.92 + break; 41.93 + if (platform_legacy_irq(i)) { 41.94 + if (--tries >= 0) { 41.95 + IO_APIC_VECTOR(i) = 0; 41.96 + goto try_again; 41.97 + } 41.98 + panic("gsi_irq_sharing: didn't find an IRQ using vector 0x%02X for GSI %d", vector, gsi); 41.99 + } 41.100 + if (i < NR_IRQS) { 41.101 + gsi_2_irq[gsi] = i; 41.102 + printk(KERN_INFO "GSI %d sharing vector 0x%02X and IRQ %d\n", 41.103 + gsi, vector, i); 41.104 + return i; 41.105 + } 41.106 + 41.107 + i = next_irq++; 41.108 + BUG_ON(i >= NR_IRQS); 41.109 + gsi_2_irq[gsi] = i; 41.110 + IO_APIC_VECTOR(i) = vector; 41.111 + printk(KERN_INFO "GSI %d assigned vector 0x%02X and IRQ %d\n", 41.112 + gsi, vector, i); 41.113 + return i; 41.114 +} 41.115 + 41.116 static int pin_2_irq(int idx, int apic, int pin) 41.117 { 41.118 int irq, i; 41.119 @@ -689,6 +752,7 @@ static int pin_2_irq(int idx, int apic, 41.120 while (i < apic) 41.121 irq += nr_ioapic_registers[i++]; 41.122 irq += pin; 41.123 + irq = gsi_irq_sharing(irq); 41.124 break; 41.125 } 41.126 default: 41.127 @@ -698,6 +762,7 @@ static int pin_2_irq(int idx, int apic, 41.128 break; 41.129 } 41.130 } 41.131 + BUG_ON(irq >= NR_IRQS); 41.132 41.133 /* 41.134 * PCI IRQ command line redirection. Yes, limits are hardcoded. 41.135 @@ -713,6 +778,7 @@ static int pin_2_irq(int idx, int apic, 41.136 } 41.137 } 41.138 } 41.139 + BUG_ON(irq >= NR_IRQS); 41.140 return irq; 41.141 } 41.142 41.143 @@ -741,7 +807,7 @@ int assign_irq_vector(int irq) 41.144 static int current_vector = FIRST_DEVICE_VECTOR; 41.145 physdev_op_t op; 41.146 41.147 - BUG_ON(irq >= NR_IRQ_VECTORS); 41.148 + BUG_ON(irq != AUTO_ASSIGN && (unsigned)irq >= NR_IRQ_VECTORS); 41.149 if (irq != AUTO_ASSIGN && IO_APIC_VECTOR(irq) > 0) 41.150 return IO_APIC_VECTOR(irq); 41.151 41.152 @@ -1990,6 +2056,7 @@ int io_apic_set_pci_routing (int ioapic, 41.153 entry.polarity = active_high_low; 41.154 entry.mask = 1; /* Disabled (masked) */ 41.155 41.156 + irq = gsi_irq_sharing(irq); 41.157 /* 41.158 * IRQs < 16 are already in the irq_2_pin[] map 41.159 */
42.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c Wed Feb 01 17:06:16 2006 +0000 42.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c Wed Feb 01 18:00:19 2006 +0000 42.3 @@ -42,7 +42,7 @@ int acpi_found_madt; 42.4 * Various Linux-internal data structures created from the 42.5 * MP-table. 42.6 */ 42.7 -int apic_version [MAX_APICS]; 42.8 +unsigned char apic_version [MAX_APICS]; 42.9 unsigned char mp_bus_id_to_type [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; 42.10 int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { [0 ... MAX_MP_BUSSES-1] = -1 }; 42.11 42.12 @@ -65,7 +65,9 @@ unsigned long mp_lapic_addr = 0; 42.13 /* Processor that is doing the boot up */ 42.14 unsigned int boot_cpu_id = -1U; 42.15 /* Internal processor count */ 42.16 -static unsigned int num_processors = 0; 42.17 +unsigned int num_processors __initdata = 0; 42.18 + 42.19 +unsigned disabled_cpus __initdata; 42.20 42.21 /* Bitmask of physically existing CPUs */ 42.22 physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE; 42.23 @@ -107,11 +109,14 @@ static int __init mpf_checksum(unsigned 42.24 #ifndef CONFIG_XEN 42.25 static void __init MP_processor_info (struct mpc_config_processor *m) 42.26 { 42.27 - int ver, cpu; 42.28 + int cpu; 42.29 + unsigned char ver; 42.30 static int found_bsp=0; 42.31 42.32 - if (!(m->mpc_cpuflag & CPU_ENABLED)) 42.33 + if (!(m->mpc_cpuflag & CPU_ENABLED)) { 42.34 + disabled_cpus++; 42.35 return; 42.36 + } 42.37 42.38 printk(KERN_INFO "Processor #%d %d:%d APIC version %d\n", 42.39 m->mpc_apicid, 42.40 @@ -130,12 +135,14 @@ static void __init MP_processor_info (st 42.41 } 42.42 42.43 cpu = num_processors++; 42.44 - 42.45 - if (m->mpc_apicid > MAX_APICS) { 42.46 + 42.47 +#if MAX_APICS < 255 42.48 + if ((int)m->mpc_apicid > MAX_APICS) { 42.49 printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n", 42.50 m->mpc_apicid, MAX_APICS); 42.51 return; 42.52 } 42.53 +#endif 42.54 ver = m->mpc_apicver; 42.55 42.56 physid_set(m->mpc_apicid, phys_cpu_present_map); 42.57 @@ -225,7 +232,7 @@ static void __init MP_intsrc_info (struc 42.58 m->mpc_irqtype, m->mpc_irqflag & 3, 42.59 (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, 42.60 m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq); 42.61 - if (++mp_irq_entries == MAX_IRQ_SOURCES) 42.62 + if (++mp_irq_entries >= MAX_IRQ_SOURCES) 42.63 panic("Max # of irq sources exceeded!!\n"); 42.64 } 42.65
43.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/pci-nommu-xen.c Wed Feb 01 17:06:16 2006 +0000 43.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/pci-nommu-xen.c Wed Feb 01 18:00:19 2006 +0000 43.3 @@ -25,7 +25,7 @@ EXPORT_SYMBOL(iommu_sac_force); 43.4 */ 43.5 43.6 void *dma_alloc_coherent(struct device *hwdev, size_t size, 43.7 - dma_addr_t *dma_handle, unsigned gfp) 43.8 + dma_addr_t *dma_handle, gfp_t gfp) 43.9 { 43.10 void *ret; 43.11 u64 mask;
44.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c Wed Feb 01 17:06:16 2006 +0000 44.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c Wed Feb 01 18:00:19 2006 +0000 44.3 @@ -96,10 +96,13 @@ void xen_idle(void) 44.4 if (need_resched()) { 44.5 local_irq_enable(); 44.6 } else { 44.7 + clear_thread_flag(TIF_POLLING_NRFLAG); 44.8 + smp_mb__after_clear_bit(); 44.9 stop_hz_timer(); 44.10 /* Blocking includes an implicit local_irq_enable(). */ 44.11 HYPERVISOR_sched_op(SCHEDOP_block, 0); 44.12 start_hz_timer(); 44.13 + set_thread_flag(TIF_POLLING_NRFLAG); 44.14 } 44.15 } 44.16 44.17 @@ -143,6 +146,8 @@ static inline void play_dead(void) 44.18 */ 44.19 void cpu_idle (void) 44.20 { 44.21 + set_thread_flag(TIF_POLLING_NRFLAG); 44.22 + 44.23 /* endless idle loop with no priority at all */ 44.24 while (1) { 44.25 while (!need_resched()) { 44.26 @@ -156,7 +161,9 @@ void cpu_idle (void) 44.27 xen_idle(); 44.28 } 44.29 44.30 + preempt_enable_no_resched(); 44.31 schedule(); 44.32 + preempt_disable(); 44.33 } 44.34 } 44.35 44.36 @@ -180,7 +187,8 @@ void cpu_idle_wait(void) 44.37 do { 44.38 ssleep(1); 44.39 for_each_online_cpu(cpu) { 44.40 - if (cpu_isset(cpu, map) && !per_cpu(cpu_idle_state, cpu)) 44.41 + if (cpu_isset(cpu, map) && 44.42 + !per_cpu(cpu_idle_state, cpu)) 44.43 cpu_clear(cpu, map); 44.44 } 44.45 cpus_and(map, map, cpu_online_map); 44.46 @@ -208,7 +216,8 @@ void __show_regs(struct pt_regs * regs) 44.47 system_utsname.version); 44.48 printk("RIP: %04lx:[<%016lx>] ", regs->cs & 0xffff, regs->rip); 44.49 printk_address(regs->rip); 44.50 - printk("\nRSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, regs->eflags); 44.51 + printk("\nRSP: %04lx:%016lx EFLAGS: %08lx\n", regs->ss, regs->rsp, 44.52 + regs->eflags); 44.53 printk("RAX: %016lx RBX: %016lx RCX: %016lx\n", 44.54 regs->rax, regs->rbx, regs->rcx); 44.55 printk("RDX: %016lx RSI: %016lx RDI: %016lx\n", 44.56 @@ -282,13 +291,6 @@ void flush_thread(void) 44.57 struct task_struct *tsk = current; 44.58 struct thread_info *t = current_thread_info(); 44.59 44.60 - /* 44.61 - * Remove function-return probe instances associated with this task 44.62 - * and put them back on the free list. Do not insert an exit probe for 44.63 - * this function, it will be disabled by kprobe_flush_task if you do. 44.64 - */ 44.65 - kprobe_flush_task(tsk); 44.66 - 44.67 if (t->flags & _TIF_ABI_PENDING) 44.68 t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32); 44.69 44.70 @@ -361,15 +363,14 @@ int copy_thread(int nr, unsigned long cl 44.71 struct pt_regs * childregs; 44.72 struct task_struct *me = current; 44.73 44.74 - childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1; 44.75 - 44.76 + childregs = ((struct pt_regs *) 44.77 + (THREAD_SIZE + (unsigned long) p->thread_info)) - 1; 44.78 *childregs = *regs; 44.79 44.80 childregs->rax = 0; 44.81 childregs->rsp = rsp; 44.82 - if (rsp == ~0UL) { 44.83 + if (rsp == ~0UL) 44.84 childregs->rsp = (unsigned long)childregs; 44.85 - } 44.86 44.87 p->thread.rsp = (unsigned long) childregs; 44.88 p->thread.rsp0 = (unsigned long) (childregs+1); 44.89 @@ -391,7 +392,8 @@ int copy_thread(int nr, unsigned long cl 44.90 p->thread.io_bitmap_max = 0; 44.91 return -ENOMEM; 44.92 } 44.93 - memcpy(p->thread.io_bitmap_ptr, me->thread.io_bitmap_ptr, IO_BITMAP_BYTES); 44.94 + memcpy(p->thread.io_bitmap_ptr, me->thread.io_bitmap_ptr, 44.95 + IO_BITMAP_BYTES); 44.96 } 44.97 44.98 /* 44.99 @@ -432,7 +434,8 @@ static inline void __save_init_fpu( stru 44.100 * - fold all the options into a flag word and test it with a single test. 44.101 * - could test fs/gs bitsliced 44.102 */ 44.103 -struct task_struct *__switch_to(struct task_struct *prev_p, struct task_struct *next_p) 44.104 +struct task_struct * 44.105 +__switch_to(struct task_struct *prev_p, struct task_struct *next_p) 44.106 { 44.107 struct thread_struct *prev = &prev_p->thread, 44.108 *next = &next_p->thread; 44.109 @@ -530,7 +533,8 @@ struct task_struct *__switch_to(struct t 44.110 prev->userrsp = read_pda(oldrsp); 44.111 write_pda(oldrsp, next->userrsp); 44.112 write_pda(pcurrent, next_p); 44.113 - write_pda(kernelstack, (unsigned long)next_p->thread_info + THREAD_SIZE - PDA_STACKOFFSET); 44.114 + write_pda(kernelstack, 44.115 + (unsigned long)next_p->thread_info + THREAD_SIZE - PDA_STACKOFFSET); 44.116 44.117 /* 44.118 * Now maybe reload the debug registers 44.119 @@ -591,7 +595,9 @@ asmlinkage long sys_fork(struct pt_regs 44.120 return do_fork(SIGCHLD, regs->rsp, regs, 0, NULL, NULL); 44.121 } 44.122 44.123 -asmlinkage long sys_clone(unsigned long clone_flags, unsigned long newsp, void __user *parent_tid, void __user *child_tid, struct pt_regs *regs) 44.124 +asmlinkage long 44.125 +sys_clone(unsigned long clone_flags, unsigned long newsp, 44.126 + void __user *parent_tid, void __user *child_tid, struct pt_regs *regs) 44.127 { 44.128 if (!newsp) 44.129 newsp = regs->rsp; 44.130 @@ -627,7 +633,8 @@ unsigned long get_wchan(struct task_stru 44.131 return 0; 44.132 fp = *(u64 *)(p->thread.rsp); 44.133 do { 44.134 - if (fp < (unsigned long)stack || fp > (unsigned long)stack+THREAD_SIZE) 44.135 + if (fp < (unsigned long)stack || 44.136 + fp > (unsigned long)stack+THREAD_SIZE) 44.137 return 0; 44.138 rip = *(u64 *)(fp+8); 44.139 if (!in_sched_functions(rip)) 44.140 @@ -662,8 +669,9 @@ long do_arch_prctl(struct task_struct *t 44.141 task->thread.gsindex = 0; 44.142 task->thread.gs = addr; 44.143 if (doit) { 44.144 - load_gs_index(0); 44.145 - ret = HYPERVISOR_set_segment_base(SEGBASE_GS_USER, addr); 44.146 + load_gs_index(0); 44.147 + ret = HYPERVISOR_set_segment_base( 44.148 + SEGBASE_GS_USER, addr); 44.149 } 44.150 } 44.151 put_cpu(); 44.152 @@ -680,7 +688,7 @@ long do_arch_prctl(struct task_struct *t 44.153 set_32bit_tls(task, FS_TLS, addr); 44.154 if (doit) { 44.155 load_TLS(&task->thread, cpu); 44.156 - asm volatile("mov %0,%%fs" :: "r" (FS_TLS_SEL)); 44.157 + asm volatile("movl %0,%%fs" :: "r"(FS_TLS_SEL)); 44.158 } 44.159 task->thread.fsindex = FS_TLS_SEL; 44.160 task->thread.fs = 0; 44.161 @@ -690,9 +698,9 @@ long do_arch_prctl(struct task_struct *t 44.162 if (doit) { 44.163 /* set the selector to 0 to not confuse 44.164 __switch_to */ 44.165 - asm volatile("mov %0,%%fs" :: "r" (0)); 44.166 - ret = HYPERVISOR_set_segment_base(SEGBASE_FS, addr); 44.167 - 44.168 + asm volatile("movl %0,%%fs" :: "r" (0)); 44.169 + ret = HYPERVISOR_set_segment_base(SEGBASE_FS, 44.170 + addr); 44.171 } 44.172 } 44.173 put_cpu(); 44.174 @@ -701,9 +709,9 @@ long do_arch_prctl(struct task_struct *t 44.175 unsigned long base; 44.176 if (task->thread.fsindex == FS_TLS_SEL) 44.177 base = read_32bit_tls(task, FS_TLS); 44.178 - else if (doit) { 44.179 + else if (doit) 44.180 rdmsrl(MSR_FS_BASE, base); 44.181 - } else 44.182 + else 44.183 base = task->thread.fs; 44.184 ret = put_user(base, (unsigned long __user *)addr); 44.185 break; 44.186 @@ -712,9 +720,9 @@ long do_arch_prctl(struct task_struct *t 44.187 unsigned long base; 44.188 if (task->thread.gsindex == GS_TLS_SEL) 44.189 base = read_32bit_tls(task, GS_TLS); 44.190 - else if (doit) { 44.191 + else if (doit) 44.192 rdmsrl(MSR_KERNEL_GS_BASE, base); 44.193 - } else 44.194 + else 44.195 base = task->thread.gs; 44.196 ret = put_user(base, (unsigned long __user *)addr); 44.197 break;
45.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c Wed Feb 01 17:06:16 2006 +0000 45.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c Wed Feb 01 18:00:19 2006 +0000 45.3 @@ -60,6 +60,7 @@ 45.4 #include <asm/setup.h> 45.5 #include <asm/mach_apic.h> 45.6 #include <asm/numa.h> 45.7 +#include <asm/sections.h> 45.8 #ifdef CONFIG_XEN 45.9 #include <linux/percpu.h> 45.10 #include <xen/interface/physdev.h> 45.11 @@ -139,7 +140,6 @@ struct edid_info edid_info; 45.12 struct e820map e820; 45.13 45.14 extern int root_mountflags; 45.15 -extern char _text, _etext, _edata, _end; 45.16 45.17 char command_line[COMMAND_LINE_SIZE]; 45.18 45.19 @@ -473,7 +473,6 @@ contig_initmem_init(unsigned long start_ 45.20 { 45.21 unsigned long bootmap_size, bootmap; 45.22 45.23 - memory_present(0, start_pfn, end_pfn); 45.24 bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT; 45.25 bootmap = find_e820_area(0, end_pfn<<PAGE_SHIFT, bootmap_size); 45.26 if (bootmap == -1L) 45.27 @@ -773,8 +772,6 @@ void __init setup_arch(char **cmdline_p) 45.28 } 45.29 #endif 45.30 45.31 - sparse_init(); 45.32 - 45.33 paging_init(); 45.34 #ifdef CONFIG_X86_LOCAL_APIC 45.35 /* 45.36 @@ -855,6 +852,8 @@ void __init setup_arch(char **cmdline_p) 45.37 check_ioapic(); 45.38 #endif 45.39 45.40 + zap_low_mappings(0); 45.41 + 45.42 #ifdef CONFIG_ACPI 45.43 /* 45.44 * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). 45.45 @@ -1032,7 +1031,7 @@ static void __init amd_detect_cmp(struct 45.46 #endif 45.47 45.48 bits = 0; 45.49 - while ((1 << bits) < c->x86_num_cores) 45.50 + while ((1 << bits) < c->x86_max_cores) 45.51 bits++; 45.52 45.53 /* Low order bits define the core id (index of core in socket) */ 45.54 @@ -1062,10 +1061,10 @@ static void __init amd_detect_cmp(struct 45.55 if (!node_online(node)) 45.56 node = nearby_node(apicid); 45.57 } 45.58 - cpu_to_node[cpu] = node; 45.59 + numa_set_node(cpu, node); 45.60 45.61 printk(KERN_INFO "CPU %d(%d) -> Node %d -> Core %d\n", 45.62 - cpu, c->x86_num_cores, node, cpu_core_id[cpu]); 45.63 + cpu, c->x86_max_cores, node, cpu_core_id[cpu]); 45.64 #endif 45.65 #endif 45.66 } 45.67 @@ -1114,9 +1113,9 @@ static int __init init_amd(struct cpuinf 45.68 display_cacheinfo(c); 45.69 45.70 if (c->extended_cpuid_level >= 0x80000008) { 45.71 - c->x86_num_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; 45.72 - if (c->x86_num_cores & (c->x86_num_cores - 1)) 45.73 - c->x86_num_cores = 1; 45.74 + c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; 45.75 + if (c->x86_max_cores & (c->x86_max_cores - 1)) 45.76 + c->x86_max_cores = 1; 45.77 45.78 amd_detect_cmp(c); 45.79 } 45.80 @@ -1128,54 +1127,44 @@ static void __cpuinit detect_ht(struct c 45.81 { 45.82 #ifdef CONFIG_SMP 45.83 u32 eax, ebx, ecx, edx; 45.84 - int index_msb, tmp; 45.85 + int index_msb, core_bits; 45.86 int cpu = smp_processor_id(); 45.87 - 45.88 + 45.89 + cpuid(1, &eax, &ebx, &ecx, &edx); 45.90 + 45.91 + c->apicid = phys_pkg_id(0); 45.92 + 45.93 if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c, X86_FEATURE_CMP_LEGACY)) 45.94 return; 45.95 45.96 - cpuid(1, &eax, &ebx, &ecx, &edx); 45.97 smp_num_siblings = (ebx & 0xff0000) >> 16; 45.98 - 45.99 + 45.100 if (smp_num_siblings == 1) { 45.101 printk(KERN_INFO "CPU: Hyper-Threading is disabled\n"); 45.102 - } else if (smp_num_siblings > 1) { 45.103 - index_msb = 31; 45.104 - /* 45.105 - * At this point we only support two siblings per 45.106 - * processor package. 45.107 - */ 45.108 + } else if (smp_num_siblings > 1 ) { 45.109 + 45.110 if (smp_num_siblings > NR_CPUS) { 45.111 printk(KERN_WARNING "CPU: Unsupported number of the siblings %d", smp_num_siblings); 45.112 smp_num_siblings = 1; 45.113 return; 45.114 } 45.115 - tmp = smp_num_siblings; 45.116 - while ((tmp & 0x80000000 ) == 0) { 45.117 - tmp <<=1 ; 45.118 - index_msb--; 45.119 - } 45.120 - if (smp_num_siblings & (smp_num_siblings - 1)) 45.121 - index_msb++; 45.122 + 45.123 + index_msb = get_count_order(smp_num_siblings); 45.124 phys_proc_id[cpu] = phys_pkg_id(index_msb); 45.125 - 45.126 + 45.127 printk(KERN_INFO "CPU: Physical Processor ID: %d\n", 45.128 phys_proc_id[cpu]); 45.129 45.130 - smp_num_siblings = smp_num_siblings / c->x86_num_cores; 45.131 + smp_num_siblings = smp_num_siblings / c->x86_max_cores; 45.132 45.133 - tmp = smp_num_siblings; 45.134 - index_msb = 31; 45.135 - while ((tmp & 0x80000000) == 0) { 45.136 - tmp <<=1 ; 45.137 - index_msb--; 45.138 - } 45.139 - if (smp_num_siblings & (smp_num_siblings - 1)) 45.140 - index_msb++; 45.141 + index_msb = get_count_order(smp_num_siblings) ; 45.142 45.143 - cpu_core_id[cpu] = phys_pkg_id(index_msb); 45.144 + core_bits = get_count_order(c->x86_max_cores); 45.145 45.146 - if (c->x86_num_cores > 1) 45.147 + cpu_core_id[cpu] = phys_pkg_id(index_msb) & 45.148 + ((1 << core_bits) - 1); 45.149 + 45.150 + if (c->x86_max_cores > 1) 45.151 printk(KERN_INFO "CPU: Processor Core ID: %d\n", 45.152 cpu_core_id[cpu]); 45.153 } 45.154 @@ -1214,7 +1203,7 @@ static void srat_detect_node(void) 45.155 node = apicid_to_node[hard_smp_processor_id()]; 45.156 if (node == NUMA_NO_NODE) 45.157 node = 0; 45.158 - cpu_to_node[cpu] = node; 45.159 + numa_set_node(cpu, node); 45.160 45.161 if (acpi_numa > 0) 45.162 printk(KERN_INFO "CPU %d -> Node %d\n", cpu, node); 45.163 @@ -1232,13 +1221,18 @@ static void __cpuinit init_intel(struct 45.164 unsigned eax = cpuid_eax(0x80000008); 45.165 c->x86_virt_bits = (eax >> 8) & 0xff; 45.166 c->x86_phys_bits = eax & 0xff; 45.167 + /* CPUID workaround for Intel 0F34 CPU */ 45.168 + if (c->x86_vendor == X86_VENDOR_INTEL && 45.169 + c->x86 == 0xF && c->x86_model == 0x3 && 45.170 + c->x86_mask == 0x4) 45.171 + c->x86_phys_bits = 36; 45.172 } 45.173 45.174 if (c->x86 == 15) 45.175 c->x86_cache_alignment = c->x86_clflush_size * 2; 45.176 if (c->x86 >= 15) 45.177 set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability); 45.178 - c->x86_num_cores = intel_num_cpu_cores(c); 45.179 + c->x86_max_cores = intel_num_cpu_cores(c); 45.180 45.181 srat_detect_node(); 45.182 } 45.183 @@ -1276,7 +1270,7 @@ void __cpuinit early_identify_cpu(struct 45.184 c->x86_model_id[0] = '\0'; /* Unset */ 45.185 c->x86_clflush_size = 64; 45.186 c->x86_cache_alignment = c->x86_clflush_size; 45.187 - c->x86_num_cores = 1; 45.188 + c->x86_max_cores = 1; 45.189 c->extended_cpuid_level = 0; 45.190 memset(&c->x86_capability, 0, sizeof c->x86_capability); 45.191 45.192 @@ -1299,10 +1293,10 @@ void __cpuinit early_identify_cpu(struct 45.193 c->x86 = (tfms >> 8) & 0xf; 45.194 c->x86_model = (tfms >> 4) & 0xf; 45.195 c->x86_mask = tfms & 0xf; 45.196 - if (c->x86 == 0xf) { 45.197 + if (c->x86 == 0xf) 45.198 c->x86 += (tfms >> 20) & 0xff; 45.199 + if (c->x86 >= 0x6) 45.200 c->x86_model += ((tfms >> 16) & 0xF) << 4; 45.201 - } 45.202 if (c->x86_capability[0] & (1<<19)) 45.203 c->x86_clflush_size = ((misc >> 8) & 0xff) * 8; 45.204 } else { 45.205 @@ -1452,7 +1446,7 @@ static int show_cpuinfo(struct seq_file 45.206 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 45.207 45.208 /* Intel-defined (#2) */ 45.209 - "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "est", 45.210 + "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", NULL, "est", 45.211 "tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL, 45.212 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 45.213 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 45.214 @@ -1510,13 +1504,12 @@ static int show_cpuinfo(struct seq_file 45.215 seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size); 45.216 45.217 #ifdef CONFIG_SMP 45.218 - if (smp_num_siblings * c->x86_num_cores > 1) { 45.219 + if (smp_num_siblings * c->x86_max_cores > 1) { 45.220 int cpu = c - cpu_data; 45.221 seq_printf(m, "physical id\t: %d\n", phys_proc_id[cpu]); 45.222 - seq_printf(m, "siblings\t: %d\n", 45.223 - c->x86_num_cores * smp_num_siblings); 45.224 + seq_printf(m, "siblings\t: %d\n", cpus_weight(cpu_core_map[cpu])); 45.225 seq_printf(m, "core id\t\t: %d\n", cpu_core_id[cpu]); 45.226 - seq_printf(m, "cpu cores\t: %d\n", c->x86_num_cores); 45.227 + seq_printf(m, "cpu cores\t: %d\n", c->booted_cores); 45.228 } 45.229 #endif 45.230
46.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c Wed Feb 01 17:06:16 2006 +0000 46.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup64-xen.c Wed Feb 01 18:00:19 2006 +0000 46.3 @@ -255,6 +255,7 @@ void __cpuinit cpu_init (void) 46.4 /* CPU 0 is initialised in head64.c */ 46.5 if (cpu != 0) { 46.6 pda_init(cpu); 46.7 + zap_low_mappings(cpu); 46.8 } else 46.9 estacks = boot_exception_stacks; 46.10
47.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/smp-xen.c Wed Feb 01 17:06:16 2006 +0000 47.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/smp-xen.c Wed Feb 01 18:00:19 2006 +0000 47.3 @@ -71,8 +71,6 @@ union smp_flush_state { 47.4 static DEFINE_PER_CPU(union smp_flush_state, flush_state); 47.5 #endif 47.6 47.7 -#define __cpuinit __init 47.8 - 47.9 /* 47.10 * We cannot call mmdrop() because we are in interrupt context, 47.11 * instead update mm->cpu_vm_mask. 47.12 @@ -478,15 +476,16 @@ int smp_call_function (void (*func) (voi 47.13 47.14 void smp_stop_cpu(void) 47.15 { 47.16 + unsigned long flags; 47.17 /* 47.18 * Remove this CPU: 47.19 */ 47.20 cpu_clear(smp_processor_id(), cpu_online_map); 47.21 - local_irq_disable(); 47.22 + local_irq_save(flags); 47.23 #ifndef CONFIG_XEN 47.24 disable_local_APIC(); 47.25 #endif 47.26 - local_irq_enable(); 47.27 + local_irq_restore(flags); 47.28 } 47.29 47.30 static void smp_really_stop_cpu(void *dummy)
48.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c Wed Feb 01 17:06:16 2006 +0000 48.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c Wed Feb 01 18:00:19 2006 +0000 48.3 @@ -430,19 +430,6 @@ static void __kprobes do_trap(int trapnr 48.4 { 48.5 conditional_sti(regs); 48.6 48.7 -#ifdef CONFIG_CHECKING 48.8 - { 48.9 - unsigned long gs; 48.10 - struct x8664_pda *pda = cpu_pda + safe_smp_processor_id(); 48.11 - rdmsrl(MSR_GS_BASE, gs); 48.12 - if (gs != (unsigned long)pda) { 48.13 - wrmsrl(MSR_GS_BASE, pda); 48.14 - printk("%s: wrong gs %lx expected %p rip %lx\n", str, gs, pda, 48.15 - regs->rip); 48.16 - } 48.17 - } 48.18 -#endif 48.19 - 48.20 if (user_mode(regs)) { 48.21 struct task_struct *tsk = current; 48.22 48.23 @@ -515,20 +502,6 @@ asmlinkage void __kprobes do_general_pro 48.24 { 48.25 conditional_sti(regs); 48.26 48.27 -#ifdef CONFIG_CHECKING 48.28 - { 48.29 - unsigned long gs; 48.30 - struct x8664_pda *pda = cpu_pda + safe_smp_processor_id(); 48.31 - rdmsrl(MSR_GS_BASE, gs); 48.32 - if (gs != (unsigned long)pda) { 48.33 - wrmsrl(MSR_GS_BASE, pda); 48.34 - oops_in_progress++; 48.35 - printk("general protection handler: wrong gs %lx expected %p\n", gs, pda); 48.36 - oops_in_progress--; 48.37 - } 48.38 - } 48.39 -#endif 48.40 - 48.41 if (user_mode(regs)) { 48.42 struct task_struct *tsk = current; 48.43 48.44 @@ -671,19 +644,6 @@ asmlinkage void __kprobes do_debug(struc 48.45 struct task_struct *tsk = current; 48.46 siginfo_t info; 48.47 48.48 -#ifdef CONFIG_CHECKING 48.49 - { 48.50 - /* RED-PEN interaction with debugger - could destroy gs */ 48.51 - unsigned long gs; 48.52 - struct x8664_pda *pda = cpu_pda + safe_smp_processor_id(); 48.53 - rdmsrl(MSR_GS_BASE, gs); 48.54 - if (gs != (unsigned long)pda) { 48.55 - wrmsrl(MSR_GS_BASE, pda); 48.56 - printk("debug handler: wrong gs %lx expected %p\n", gs, pda); 48.57 - } 48.58 - } 48.59 -#endif 48.60 - 48.61 get_debugreg(condition, 6); 48.62 48.63 if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, 48.64 @@ -896,6 +856,10 @@ asmlinkage void __attribute__((weak)) sm 48.65 } 48.66 #endif 48.67 48.68 +asmlinkage void __attribute__((weak)) mce_threshold_interrupt(void) 48.69 +{ 48.70 +} 48.71 + 48.72 /* 48.73 * 'math_state_restore()' saves the current math information in the 48.74 * old math state array, and gets the new ones from the current task
49.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/x8664_ksyms-xen.c Wed Feb 01 17:06:16 2006 +0000 49.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/x8664_ksyms-xen.c Wed Feb 01 18:00:19 2006 +0000 49.3 @@ -204,3 +204,6 @@ EXPORT_SYMBOL(flush_tlb_page); 49.4 #endif 49.5 49.6 EXPORT_SYMBOL(cpu_khz); 49.7 + 49.8 +EXPORT_SYMBOL(load_gs_index); 49.9 +
50.1 --- a/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c Wed Feb 01 17:06:16 2006 +0000 50.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/fault-xen.c Wed Feb 01 18:00:19 2006 +0000 50.3 @@ -24,7 +24,6 @@ 50.4 #include <linux/compiler.h> 50.5 #include <linux/module.h> 50.6 #include <linux/kprobes.h> 50.7 -#include <linux/percpu.h> 50.8 50.9 #include <asm/system.h> 50.10 #include <asm/uaccess.h> 50.11 @@ -36,8 +35,6 @@ 50.12 #include <asm-generic/sections.h> 50.13 #include <asm/kdebug.h> 50.14 50.15 -DEFINE_PER_CPU(pgd_t *, cur_pgd); 50.16 - 50.17 void bust_spinlocks(int yes) 50.18 { 50.19 int loglevel_save = console_loglevel; 50.20 @@ -149,9 +146,10 @@ void dump_pagetable(unsigned long addres 50.21 pmd_t *pmd; 50.22 pte_t *pte; 50.23 50.24 - preempt_disable(); 50.25 - pgd = (pgd_t *)per_cpu(cur_pgd, smp_processor_id()); 50.26 - preempt_enable(); 50.27 + asm("movq %%cr3,%0" : "=r" (pgd)); 50.28 + pgd = (pgd_t *)machine_to_phys((maddr_t)pgd); 50.29 + 50.30 + pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK); 50.31 pgd += pgd_index(address); 50.32 printk("PGD %lx ", pgd_val(*pgd)); 50.33 if (bad_address(pgd)) goto bad; 50.34 @@ -252,9 +250,9 @@ static int vmalloc_fault(unsigned long a 50.35 50.36 /* On Xen the line below does not always work. Needs investigating! */ 50.37 /*pgd = pgd_offset(current->mm ?: &init_mm, address);*/ 50.38 - preempt_disable(); 50.39 - pgd = (pgd_t *)per_cpu(cur_pgd, smp_processor_id()); 50.40 - preempt_enable(); 50.41 + asm("movq %%cr3,%0" : "=r" (pgd)); 50.42 + pgd = (pgd_t *)machine_to_phys((maddr_t)pgd); 50.43 + pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK); 50.44 pgd += pgd_index(address); 50.45 pgd_ref = pgd_offset_k(address); 50.46 if (pgd_none(*pgd_ref)) 50.47 @@ -330,22 +328,9 @@ asmlinkage void __kprobes do_page_fault( 50.48 if (!user_mode(regs)) 50.49 error_code &= ~4; /* means kernel */ 50.50 50.51 -#ifdef CONFIG_CHECKING 50.52 - { 50.53 - unsigned long gs; 50.54 - struct x8664_pda *pda = cpu_pda + stack_smp_processor_id(); 50.55 - rdmsrl(MSR_GS_BASE, gs); 50.56 - if (gs != (unsigned long)pda) { 50.57 - wrmsrl(MSR_GS_BASE, pda); 50.58 - printk("page_fault: wrong gs %lx expected %p\n", gs, pda); 50.59 - } 50.60 - } 50.61 -#endif 50.62 - 50.63 /* get the address */ 50.64 address = HYPERVISOR_shared_info->vcpu_info[ 50.65 smp_processor_id()].arch.cr2; 50.66 - 50.67 if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, 50.68 SIGSEGV) == NOTIFY_STOP) 50.69 return; 50.70 @@ -595,3 +580,10 @@ do_sigbus: 50.71 force_sig_info(SIGBUS, &info, tsk); 50.72 return; 50.73 } 50.74 + 50.75 +static int __init enable_pagefaulttrace(char *str) 50.76 +{ 50.77 + page_fault_trace = 1; 50.78 + return 0; 50.79 +} 50.80 +__setup("pagefaulttrace", enable_pagefaulttrace);
51.1 --- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c Wed Feb 01 17:06:16 2006 +0000 51.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c Wed Feb 01 18:00:19 2006 +0000 51.3 @@ -25,6 +25,7 @@ 51.4 #include <linux/pagemap.h> 51.5 #include <linux/bootmem.h> 51.6 #include <linux/proc_fs.h> 51.7 +#include <linux/pci.h> 51.8 51.9 #include <asm/processor.h> 51.10 #include <asm/system.h> 51.11 @@ -39,6 +40,7 @@ 51.12 #include <asm/mmu_context.h> 51.13 #include <asm/proto.h> 51.14 #include <asm/smp.h> 51.15 +#include <asm/sections.h> 51.16 51.17 #include <xen/features.h> 51.18 51.19 @@ -52,7 +54,7 @@ extern unsigned long *contiguous_bitmap; 51.20 extern void swiotlb_init(void); 51.21 #endif 51.22 51.23 -extern char _stext[]; 51.24 +static unsigned long dma_reserve __initdata; 51.25 51.26 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 51.27 extern unsigned long start_pfn; 51.28 @@ -194,9 +196,6 @@ void show_mem(void) 51.29 51.30 /* References to section boundaries */ 51.31 51.32 -extern char _text, _etext, _edata, __bss_start, _end[]; 51.33 -extern char __init_begin, __init_end; 51.34 - 51.35 int after_bootmem; 51.36 51.37 static void *spp_getpage(void) 51.38 @@ -492,10 +491,6 @@ static void __init find_early_table_spac 51.39 void __init xen_init_pt(void) 51.40 { 51.41 unsigned long addr, *page; 51.42 - int i; 51.43 - 51.44 - for (i = 0; i < NR_CPUS; i++) 51.45 - per_cpu(cur_pgd, i) = init_mm.pgd; 51.46 51.47 memset((void *)init_level4_pgt, 0, PAGE_SIZE); 51.48 memset((void *)level3_kernel_pgt, 0, PAGE_SIZE); 51.49 @@ -628,9 +623,7 @@ void __init init_memory_mapping(unsigned 51.50 __flush_tlb_all(); 51.51 } 51.52 51.53 -extern struct x8664_pda cpu_pda[NR_CPUS]; 51.54 - 51.55 -void zap_low_mappings(void) 51.56 +void __cpuinit zap_low_mappings(int cpu) 51.57 { 51.58 /* this is not required for Xen */ 51.59 #if 0 51.60 @@ -638,32 +631,74 @@ void zap_low_mappings(void) 51.61 #endif 51.62 } 51.63 51.64 +/* Compute zone sizes for the DMA and DMA32 zones in a node. */ 51.65 +__init void 51.66 +size_zones(unsigned long *z, unsigned long *h, 51.67 + unsigned long start_pfn, unsigned long end_pfn) 51.68 +{ 51.69 + int i; 51.70 +#ifndef CONFIG_XEN 51.71 + unsigned long w; 51.72 +#endif 51.73 + 51.74 + for (i = 0; i < MAX_NR_ZONES; i++) 51.75 + z[i] = 0; 51.76 + 51.77 +#ifndef CONFIG_XEN 51.78 + if (start_pfn < MAX_DMA_PFN) 51.79 + z[ZONE_DMA] = MAX_DMA_PFN - start_pfn; 51.80 + if (start_pfn < MAX_DMA32_PFN) { 51.81 + unsigned long dma32_pfn = MAX_DMA32_PFN; 51.82 + if (dma32_pfn > end_pfn) 51.83 + dma32_pfn = end_pfn; 51.84 + z[ZONE_DMA32] = dma32_pfn - start_pfn; 51.85 + } 51.86 + z[ZONE_NORMAL] = end_pfn - start_pfn; 51.87 + 51.88 + /* Remove lower zones from higher ones. */ 51.89 + w = 0; 51.90 + for (i = 0; i < MAX_NR_ZONES; i++) { 51.91 + if (z[i]) 51.92 + z[i] -= w; 51.93 + w += z[i]; 51.94 + } 51.95 + 51.96 + /* Compute holes */ 51.97 + w = start_pfn; 51.98 + for (i = 0; i < MAX_NR_ZONES; i++) { 51.99 + unsigned long s = w; 51.100 + w += z[i]; 51.101 + h[i] = e820_hole_size(s, w); 51.102 + } 51.103 + 51.104 + /* Add the space pace needed for mem_map to the holes too. */ 51.105 + for (i = 0; i < MAX_NR_ZONES; i++) 51.106 + h[i] += (z[i] * sizeof(struct page)) / PAGE_SIZE; 51.107 + 51.108 + /* The 16MB DMA zone has the kernel and other misc mappings. 51.109 + Account them too */ 51.110 + if (h[ZONE_DMA]) { 51.111 + h[ZONE_DMA] += dma_reserve; 51.112 + if (h[ZONE_DMA] >= z[ZONE_DMA]) { 51.113 + printk(KERN_WARNING 51.114 + "Kernel too large and filling up ZONE_DMA?\n"); 51.115 + h[ZONE_DMA] = z[ZONE_DMA]; 51.116 + } 51.117 + } 51.118 +#else 51.119 + z[ZONE_DMA] = end_pfn; 51.120 + for (i = 0; i < MAX_NR_ZONES; i++) 51.121 + h[i] = 0; 51.122 +#endif 51.123 +} 51.124 + 51.125 #ifndef CONFIG_NUMA 51.126 void __init paging_init(void) 51.127 { 51.128 - { 51.129 - unsigned long zones_size[MAX_NR_ZONES]; 51.130 - unsigned long holes[MAX_NR_ZONES]; 51.131 - /* unsigned int max_dma; */ 51.132 - 51.133 - memset(zones_size, 0, sizeof(zones_size)); 51.134 - memset(holes, 0, sizeof(holes)); 51.135 - 51.136 - /* max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; */ 51.137 - /* if (end_pfn < max_dma) { */ 51.138 - zones_size[ZONE_DMA] = end_pfn; 51.139 -#if 0 51.140 - holes[ZONE_DMA] = e820_hole_size(0, end_pfn); 51.141 - } else { 51.142 - zones_size[ZONE_DMA] = max_dma; 51.143 - holes[ZONE_DMA] = e820_hole_size(0, max_dma); 51.144 - zones_size[ZONE_NORMAL] = end_pfn - max_dma; 51.145 - holes[ZONE_NORMAL] = e820_hole_size(max_dma, end_pfn); 51.146 - } 51.147 -#endif 51.148 - free_area_init_node(0, NODE_DATA(0), zones_size, 51.149 - __pa(PAGE_OFFSET) >> PAGE_SHIFT, holes); 51.150 - } 51.151 + unsigned long zones[MAX_NR_ZONES], holes[MAX_NR_ZONES]; 51.152 + size_zones(zones, holes, 0, end_pfn); 51.153 + free_area_init_node(0, NODE_DATA(0), zones, 51.154 + __pa(PAGE_OFFSET) >> PAGE_SHIFT, holes); 51.155 51.156 set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info); 51.157 HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO); 51.158 @@ -780,19 +815,18 @@ void __init mem_init(void) 51.159 datasize >> 10, 51.160 initsize >> 10); 51.161 51.162 +#ifndef CONFIG_XEN 51.163 +#ifdef CONFIG_SMP 51.164 /* 51.165 - * Subtle. SMP is doing its boot stuff late (because it has to 51.166 - * fork idle threads) - but it also needs low mappings for the 51.167 - * protected-mode entry to work. We zap these entries only after 51.168 - * the WP-bit has been tested. 51.169 + * Sync boot_level4_pgt mappings with the init_level4_pgt 51.170 + * except for the low identity mappings which are already zapped 51.171 + * in init_level4_pgt. This sync-up is essential for AP's bringup 51.172 */ 51.173 -#ifndef CONFIG_SMP 51.174 - zap_low_mappings(); 51.175 + memcpy(boot_level4_pgt+1, init_level4_pgt+1, (PTRS_PER_PGD-1)*sizeof(pgd_t)); 51.176 +#endif 51.177 #endif 51.178 } 51.179 51.180 -extern char __initdata_begin[], __initdata_end[]; 51.181 - 51.182 void free_initmem(void) 51.183 { 51.184 #ifdef __DO_LATER__ 51.185 @@ -819,7 +853,7 @@ void free_initmem(void) 51.186 totalram_pages++; 51.187 } 51.188 memset(__initdata_begin, 0xba, __initdata_end - __initdata_begin); 51.189 - printk ("Freeing unused kernel memory: %luk freed\n", (&__init_end - &__init_begin) >> 10); 51.190 + printk ("Freeing unused kernel memory: %luk freed\n", (__init_end - __init_begin) >> 10); 51.191 #endif 51.192 } 51.193 51.194 @@ -847,6 +881,8 @@ void __init reserve_bootmem_generic(unsi 51.195 #else 51.196 reserve_bootmem(phys, len); 51.197 #endif 51.198 + if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) 51.199 + dma_reserve += len / PAGE_SIZE; 51.200 } 51.201 51.202 int kern_addr_valid(unsigned long addr) 51.203 @@ -888,10 +924,6 @@ extern int exception_trace, page_fault_t 51.204 static ctl_table debug_table2[] = { 51.205 { 99, "exception-trace", &exception_trace, sizeof(int), 0644, NULL, 51.206 proc_dointvec }, 51.207 -#ifdef CONFIG_CHECKING 51.208 - { 100, "page-fault-trace", &page_fault_trace, sizeof(int), 0644, NULL, 51.209 - proc_dointvec }, 51.210 -#endif 51.211 { 0, } 51.212 }; 51.213
52.1 --- a/linux-2.6-xen-sparse/arch/x86_64/pci/Makefile Wed Feb 01 17:06:16 2006 +0000 52.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/pci/Makefile Wed Feb 01 18:00:19 2006 +0000 52.3 @@ -11,7 +11,7 @@ obj-y += fixup.o 52.4 obj-$(CONFIG_ACPI) += acpi.o 52.5 obj-y += legacy.o irq.o common.o 52.6 # mmconfig has a 64bit special 52.7 -obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o 52.8 +obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o 52.9 52.10 obj-$(CONFIG_NUMA) += k8-bus.o 52.11
53.1 --- a/linux-2.6-xen-sparse/drivers/Makefile Wed Feb 01 17:06:16 2006 +0000 53.2 +++ b/linux-2.6-xen-sparse/drivers/Makefile Wed Feb 01 18:00:19 2006 +0000 53.3 @@ -7,6 +7,7 @@ 53.4 53.5 obj-$(CONFIG_PCI) += pci/ 53.6 obj-$(CONFIG_PARISC) += parisc/ 53.7 +obj-$(CONFIG_RAPIDIO) += rapidio/ 53.8 obj-y += video/ 53.9 obj-$(CONFIG_ACPI) += acpi/ 53.10 # PnP must come after ACPI since it will eventually need to check if acpi 53.11 @@ -49,6 +50,7 @@ obj-$(CONFIG_ATA_OVER_ETH) += block/aoe/ 53.12 obj-$(CONFIG_PARIDE) += block/paride/ 53.13 obj-$(CONFIG_TC) += tc/ 53.14 obj-$(CONFIG_USB) += usb/ 53.15 +obj-$(CONFIG_PCI) += usb/ 53.16 obj-$(CONFIG_USB_GADGET) += usb/gadget/ 53.17 obj-$(CONFIG_GAMEPORT) += input/gameport/ 53.18 obj-$(CONFIG_INPUT) += input/ 53.19 @@ -68,3 +70,4 @@ obj-$(CONFIG_INFINIBAND) += infiniband/ 53.20 obj-$(CONFIG_SGI_IOC4) += sn/ 53.21 obj-y += firmware/ 53.22 obj-$(CONFIG_CRYPTO) += crypto/ 53.23 +obj-$(CONFIG_SUPERH) += sh/
54.1 --- a/linux-2.6-xen-sparse/drivers/acpi/Kconfig Wed Feb 01 17:06:16 2006 +0000 54.2 +++ b/linux-2.6-xen-sparse/drivers/acpi/Kconfig Wed Feb 01 18:00:19 2006 +0000 54.3 @@ -197,7 +197,6 @@ config ACPI_ASUS 54.4 config ACPI_IBM 54.5 tristate "IBM ThinkPad Laptop Extras" 54.6 depends on X86 54.7 - default y 54.8 ---help--- 54.9 This is a Linux ACPI driver for the IBM ThinkPad laptops. It adds 54.10 support for Fn-Fx key combinations, Bluetooth control, video
55.1 --- a/linux-2.6-xen-sparse/drivers/char/mem.c Wed Feb 01 17:06:16 2006 +0000 55.2 +++ b/linux-2.6-xen-sparse/drivers/char/mem.c Wed Feb 01 18:00:19 2006 +0000 55.3 @@ -233,9 +233,7 @@ static ssize_t write_mem(struct file * f 55.4 static int mmap_mem(struct file * file, struct vm_area_struct * vma) 55.5 { 55.6 #if defined(__HAVE_PHYS_MEM_ACCESS_PROT) 55.7 - unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; 55.8 - 55.9 - vma->vm_page_prot = phys_mem_access_prot(file, offset, 55.10 + vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff, 55.11 vma->vm_end - vma->vm_start, 55.12 vma->vm_page_prot); 55.13 #elif defined(pgprot_noncached) 55.14 @@ -926,7 +924,8 @@ static int __init chr_dev_init(void) 55.15 55.16 mem_class = class_create(THIS_MODULE, "mem"); 55.17 for (i = 0; i < ARRAY_SIZE(devlist); i++) { 55.18 - class_device_create(mem_class, MKDEV(MEM_MAJOR, devlist[i].minor), 55.19 + class_device_create(mem_class, NULL, 55.20 + MKDEV(MEM_MAJOR, devlist[i].minor), 55.21 NULL, devlist[i].name); 55.22 devfs_mk_cdev(MKDEV(MEM_MAJOR, devlist[i].minor), 55.23 S_IFCHR | devlist[i].mode, devlist[i].name);
56.1 --- a/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig Wed Feb 01 17:06:16 2006 +0000 56.2 +++ b/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig Wed Feb 01 18:00:19 2006 +0000 56.3 @@ -6,7 +6,7 @@ menu "TPM devices" 56.4 56.5 config TCG_TPM 56.6 tristate "TPM Hardware Support" 56.7 - depends on EXPERIMENTAL && (PCI || XEN) 56.8 + depends on EXPERIMENTAL 56.9 ---help--- 56.10 If you have a TPM security chip in your system, which 56.11 implements the Trusted Computing Group's specification,
57.1 --- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm.c Wed Feb 01 17:06:16 2006 +0000 57.2 +++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm.c Wed Feb 01 18:00:19 2006 +0000 57.3 @@ -47,6 +47,13 @@ static void user_reader_timeout(unsigned 57.4 { 57.5 struct tpm_chip *chip = (struct tpm_chip *) ptr; 57.6 57.7 + schedule_work(&chip->work); 57.8 +} 57.9 + 57.10 +static void timeout_work(void * ptr) 57.11 +{ 57.12 + struct tpm_chip *chip = ptr; 57.13 + 57.14 down(&chip->buffer_mutex); 57.15 atomic_set(&chip->data_pending, 0); 57.16 memset(chip->data_buffer, 0, chip->vendor->buffersize); 57.17 @@ -146,8 +153,7 @@ ssize_t tpm_show_pcrs(struct device *dev 57.18 __be32 index; 57.19 char *str = buf; 57.20 57.21 - struct tpm_chip *chip = 57.22 - pci_get_drvdata(to_pci_dev(dev)); 57.23 + struct tpm_chip *chip = dev_get_drvdata(dev); 57.24 if (chip == NULL) 57.25 return -ENODEV; 57.26 57.27 @@ -170,7 +176,8 @@ ssize_t tpm_show_pcrs(struct device *dev 57.28 < READ_PCR_RESULT_SIZE){ 57.29 dev_dbg(chip->dev, "A TPM error (%d) occurred" 57.30 " attempting to read PCR %d of %d\n", 57.31 - be32_to_cpu(*((__be32 *) (data + 6))), i, num_pcrs); 57.32 + be32_to_cpu(*((__be32 *) (data + 6))), 57.33 + i, num_pcrs); 57.34 goto out; 57.35 } 57.36 str += sprintf(str, "PCR-%02d: ", i); 57.37 @@ -198,17 +205,15 @@ ssize_t tpm_show_pubek(struct device *de 57.38 int i, rc; 57.39 char *str = buf; 57.40 57.41 - struct tpm_chip *chip = 57.42 - pci_get_drvdata(to_pci_dev(dev)); 57.43 + struct tpm_chip *chip = dev_get_drvdata(dev); 57.44 if (chip == NULL) 57.45 return -ENODEV; 57.46 57.47 - data = kmalloc(READ_PUBEK_RESULT_SIZE, GFP_KERNEL); 57.48 + data = kzalloc(READ_PUBEK_RESULT_SIZE, GFP_KERNEL); 57.49 if (!data) 57.50 return -ENOMEM; 57.51 57.52 memcpy(data, readpubek, sizeof(readpubek)); 57.53 - memset(data + sizeof(readpubek), 0, 20); /* zero nonce */ 57.54 57.55 if ((len = tpm_transmit(chip, data, READ_PUBEK_RESULT_SIZE)) < 57.56 READ_PUBEK_RESULT_SIZE) { 57.57 @@ -252,7 +257,6 @@ out: 57.58 kfree(data); 57.59 return rc; 57.60 } 57.61 - 57.62 EXPORT_SYMBOL_GPL(tpm_show_pubek); 57.63 57.64 #define CAP_VER_RESULT_SIZE 18 57.65 @@ -281,8 +285,7 @@ ssize_t tpm_show_caps(struct device *dev 57.66 ssize_t len; 57.67 char *str = buf; 57.68 57.69 - struct tpm_chip *chip = 57.70 - pci_get_drvdata(to_pci_dev(dev)); 57.71 + struct tpm_chip *chip = dev_get_drvdata(dev); 57.72 if (chip == NULL) 57.73 return -ENODEV; 57.74 57.75 @@ -322,7 +325,6 @@ ssize_t tpm_store_cancel(struct device * 57.76 } 57.77 EXPORT_SYMBOL_GPL(tpm_store_cancel); 57.78 57.79 - 57.80 /* 57.81 * Device file system interface to the TPM 57.82 */ 57.83 @@ -346,8 +348,7 @@ int tpm_open(struct inode *inode, struct 57.84 } 57.85 57.86 if (chip->num_opens) { 57.87 - dev_dbg(chip->dev, 57.88 - "Another process owns this TPM\n"); 57.89 + dev_dbg(chip->dev, "Another process owns this TPM\n"); 57.90 rc = -EBUSY; 57.91 goto err_out; 57.92 } 57.93 @@ -373,7 +374,6 @@ err_out: 57.94 spin_unlock(&driver_lock); 57.95 return rc; 57.96 } 57.97 - 57.98 EXPORT_SYMBOL_GPL(tpm_open); 57.99 57.100 int tpm_release(struct inode *inode, struct file *file) 57.101 @@ -384,16 +384,16 @@ int tpm_release(struct inode *inode, str 57.102 file->private_data = NULL; 57.103 chip->num_opens--; 57.104 del_singleshot_timer_sync(&chip->user_read_timer); 57.105 + flush_scheduled_work(); 57.106 atomic_set(&chip->data_pending, 0); 57.107 put_device(chip->dev); 57.108 kfree(chip->data_buffer); 57.109 spin_unlock(&driver_lock); 57.110 return 0; 57.111 } 57.112 - 57.113 EXPORT_SYMBOL_GPL(tpm_release); 57.114 57.115 -ssize_t tpm_write(struct file * file, const char __user * buf, 57.116 +ssize_t tpm_write(struct file *file, const char __user *buf, 57.117 size_t size, loff_t * off) 57.118 { 57.119 struct tpm_chip *chip = file->private_data; 57.120 @@ -431,13 +431,14 @@ ssize_t tpm_write(struct file * file, co 57.121 57.122 EXPORT_SYMBOL_GPL(tpm_write); 57.123 57.124 -ssize_t tpm_read(struct file * file, char __user * buf, 57.125 +ssize_t tpm_read(struct file * file, char __user *buf, 57.126 size_t size, loff_t * off) 57.127 { 57.128 struct tpm_chip *chip = file->private_data; 57.129 int ret_size; 57.130 int pos, pending = 0; 57.131 57.132 + flush_scheduled_work(); 57.133 ret_size = atomic_read(&chip->data_pending); 57.134 if (ret_size > 0) { /* relay data */ 57.135 if (size < ret_size) 57.136 @@ -446,8 +447,7 @@ ssize_t tpm_read(struct file * file, cha 57.137 pos = atomic_read(&chip->data_position); 57.138 57.139 down(&chip->buffer_mutex); 57.140 - if (copy_to_user 57.141 - ((void __user *) buf, &chip->data_buffer[pos], ret_size)) { 57.142 + if (copy_to_user(buf, &chip->data_buffer[pos], ret_size)) { 57.143 ret_size = -EFAULT; 57.144 } else { 57.145 pending = atomic_read(&chip->data_pending) - ret_size; 57.146 @@ -466,7 +466,6 @@ ssize_t tpm_read(struct file * file, cha 57.147 57.148 return ret_size; 57.149 } 57.150 - 57.151 EXPORT_SYMBOL_GPL(tpm_read); 57.152 57.153 void tpm_remove_hardware(struct device *dev) 57.154 @@ -490,13 +489,13 @@ void tpm_remove_hardware(struct device * 57.155 57.156 sysfs_remove_group(&dev->kobj, chip->vendor->attr_group); 57.157 57.158 - dev_mask[chip->dev_num / TPM_NUM_MASK_ENTRIES ] &= !(1 << (chip->dev_num % TPM_NUM_MASK_ENTRIES)); 57.159 + dev_mask[chip->dev_num / TPM_NUM_MASK_ENTRIES ] &= 57.160 + ~(1 << (chip->dev_num % TPM_NUM_MASK_ENTRIES)); 57.161 57.162 kfree(chip); 57.163 57.164 put_device(dev); 57.165 } 57.166 - 57.167 EXPORT_SYMBOL_GPL(tpm_remove_hardware); 57.168 57.169 static u8 savestate[] = { 57.170 @@ -509,32 +508,30 @@ static u8 savestate[] = { 57.171 * We are about to suspend. Save the TPM state 57.172 * so that it can be restored. 57.173 */ 57.174 -int tpm_pm_suspend(struct pci_dev *pci_dev, pm_message_t pm_state) 57.175 +int tpm_pm_suspend(struct device *dev, pm_message_t pm_state) 57.176 { 57.177 - struct tpm_chip *chip = pci_get_drvdata(pci_dev); 57.178 + struct tpm_chip *chip = dev_get_drvdata(dev); 57.179 if (chip == NULL) 57.180 return -ENODEV; 57.181 57.182 tpm_transmit(chip, savestate, sizeof(savestate)); 57.183 return 0; 57.184 } 57.185 - 57.186 EXPORT_SYMBOL_GPL(tpm_pm_suspend); 57.187 57.188 /* 57.189 * Resume from a power safe. The BIOS already restored 57.190 * the TPM state. 57.191 */ 57.192 -int tpm_pm_resume(struct pci_dev *pci_dev) 57.193 +int tpm_pm_resume(struct device *dev) 57.194 { 57.195 - struct tpm_chip *chip = pci_get_drvdata(pci_dev); 57.196 + struct tpm_chip *chip = dev_get_drvdata(dev); 57.197 57.198 if (chip == NULL) 57.199 return -ENODEV; 57.200 57.201 return 0; 57.202 } 57.203 - 57.204 EXPORT_SYMBOL_GPL(tpm_pm_resume); 57.205 57.206 /* 57.207 @@ -544,8 +541,7 @@ EXPORT_SYMBOL_GPL(tpm_pm_resume); 57.208 * upon errant exit from this function specific probe function should call 57.209 * pci_disable_device 57.210 */ 57.211 -int tpm_register_hardware(struct device *dev, 57.212 - struct tpm_vendor_specific *entry) 57.213 +int tpm_register_hardware(struct device *dev, struct tpm_vendor_specific *entry) 57.214 { 57.215 #define DEVNAME_SIZE 7 57.216 57.217 @@ -554,16 +550,16 @@ int tpm_register_hardware(struct device 57.218 int i, j; 57.219 57.220 /* Driver specific per-device data */ 57.221 - chip = kmalloc(sizeof(*chip), GFP_KERNEL); 57.222 + chip = kzalloc(sizeof(*chip), GFP_KERNEL); 57.223 if (chip == NULL) 57.224 return -ENOMEM; 57.225 57.226 - memset(chip, 0, sizeof(struct tpm_chip)); 57.227 - 57.228 init_MUTEX(&chip->buffer_mutex); 57.229 init_MUTEX(&chip->tpm_mutex); 57.230 INIT_LIST_HEAD(&chip->list); 57.231 57.232 + INIT_WORK(&chip->work, timeout_work, chip); 57.233 + 57.234 init_timer(&chip->user_read_timer); 57.235 chip->user_read_timer.function = user_reader_timeout; 57.236 chip->user_read_timer.data = (unsigned long) chip; 57.237 @@ -589,8 +585,7 @@ int tpm_register_hardware(struct device 57.238 57.239 dev_num_search_complete: 57.240 if (chip->dev_num < 0) { 57.241 - dev_err(dev, 57.242 - "No available tpm device numbers\n"); 57.243 + dev_err(dev, "No available tpm device numbers\n"); 57.244 kfree(chip); 57.245 return -ENODEV; 57.246 } else if (chip->dev_num == 0) 57.247 @@ -628,7 +623,6 @@ dev_num_search_complete: 57.248 57.249 return 0; 57.250 } 57.251 - 57.252 EXPORT_SYMBOL_GPL(tpm_register_hardware); 57.253 57.254 MODULE_AUTHOR("Leendert van Doorn (leendert@watson.ibm.com)");
58.1 --- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm.h Wed Feb 01 17:06:16 2006 +0000 58.2 +++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm.h Wed Feb 01 18:00:19 2006 +0000 58.3 @@ -19,11 +19,11 @@ 58.4 * 58.5 */ 58.6 #include <linux/module.h> 58.7 -#include <linux/version.h> 58.8 #include <linux/pci.h> 58.9 #include <linux/delay.h> 58.10 #include <linux/fs.h> 58.11 #include <linux/miscdevice.h> 58.12 +#include <linux/platform_device.h> 58.13 58.14 enum tpm_timeout { 58.15 TPM_TIMEOUT = 5, /* msecs */ 58.16 @@ -76,6 +76,7 @@ struct tpm_chip { 58.17 struct semaphore buffer_mutex; 58.18 58.19 struct timer_list user_read_timer; /* user needs to claim result */ 58.20 + struct work_struct work; 58.21 struct semaphore tpm_mutex; /* tpm is processing */ 58.22 58.23 struct tpm_vendor_specific *vendor;
59.1 --- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm_atmel.c Wed Feb 01 17:06:16 2006 +0000 59.2 +++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm_atmel.c Wed Feb 01 18:00:19 2006 +0000 59.3 @@ -20,12 +20,7 @@ 59.4 */ 59.5 59.6 #include "tpm.h" 59.7 - 59.8 -/* Atmel definitions */ 59.9 -enum tpm_atmel_addr { 59.10 - TPM_ATMEL_BASE_ADDR_LO = 0x08, 59.11 - TPM_ATMEL_BASE_ADDR_HI = 0x09 59.12 -}; 59.13 +#include "tpm_atmel.h" 59.14 59.15 /* write status bits */ 59.16 enum tpm_atmel_write_status { 59.17 @@ -40,7 +35,7 @@ enum tpm_atmel_read_status { 59.18 ATML_STATUS_READY = 0x08 59.19 }; 59.20 59.21 -static int tpm_atml_recv(struct tpm_chip *chip, u8 * buf, size_t count) 59.22 +static int tpm_atml_recv(struct tpm_chip *chip, u8 *buf, size_t count) 59.23 { 59.24 u8 status, *hdr = buf; 59.25 u32 size; 59.26 @@ -52,13 +47,12 @@ static int tpm_atml_recv(struct tpm_chip 59.27 return -EIO; 59.28 59.29 for (i = 0; i < 6; i++) { 59.30 - status = inb(chip->vendor->base + 1); 59.31 + status = atmel_getb(chip, 1); 59.32 if ((status & ATML_STATUS_DATA_AVAIL) == 0) { 59.33 - dev_err(chip->dev, 59.34 - "error reading header\n"); 59.35 + dev_err(chip->dev, "error reading header\n"); 59.36 return -EIO; 59.37 } 59.38 - *buf++ = inb(chip->vendor->base); 59.39 + *buf++ = atmel_getb(chip, 0); 59.40 } 59.41 59.42 /* size of the data received */ 59.43 @@ -69,10 +63,9 @@ static int tpm_atml_recv(struct tpm_chip 59.44 dev_err(chip->dev, 59.45 "Recv size(%d) less than available space\n", size); 59.46 for (; i < size; i++) { /* clear the waiting data anyway */ 59.47 - status = inb(chip->vendor->base + 1); 59.48 + status = atmel_getb(chip, 1); 59.49 if ((status & ATML_STATUS_DATA_AVAIL) == 0) { 59.50 - dev_err(chip->dev, 59.51 - "error reading data\n"); 59.52 + dev_err(chip->dev, "error reading data\n"); 59.53 return -EIO; 59.54 } 59.55 } 59.56 @@ -81,17 +74,16 @@ static int tpm_atml_recv(struct tpm_chip 59.57 59.58 /* read all the data available */ 59.59 for (; i < size; i++) { 59.60 - status = inb(chip->vendor->base + 1); 59.61 + status = atmel_getb(chip, 1); 59.62 if ((status & ATML_STATUS_DATA_AVAIL) == 0) { 59.63 - dev_err(chip->dev, 59.64 - "error reading data\n"); 59.65 + dev_err(chip->dev, "error reading data\n"); 59.66 return -EIO; 59.67 } 59.68 - *buf++ = inb(chip->vendor->base); 59.69 + *buf++ = atmel_getb(chip, 0); 59.70 } 59.71 59.72 /* make sure data available is gone */ 59.73 - status = inb(chip->vendor->base + 1); 59.74 + status = atmel_getb(chip, 1); 59.75 if (status & ATML_STATUS_DATA_AVAIL) { 59.76 dev_err(chip->dev, "data available is stuck\n"); 59.77 return -EIO; 59.78 @@ -100,14 +92,14 @@ static int tpm_atml_recv(struct tpm_chip 59.79 return size; 59.80 } 59.81 59.82 -static int tpm_atml_send(struct tpm_chip *chip, u8 * buf, size_t count) 59.83 +static int tpm_atml_send(struct tpm_chip *chip, u8 *buf, size_t count) 59.84 { 59.85 int i; 59.86 59.87 dev_dbg(chip->dev, "tpm_atml_send:\n"); 59.88 for (i = 0; i < count; i++) { 59.89 dev_dbg(chip->dev, "%d 0x%x(%d)\n", i, buf[i], buf[i]); 59.90 - outb(buf[i], chip->vendor->base); 59.91 + atmel_putb(buf[i], chip, 0); 59.92 } 59.93 59.94 return count; 59.95 @@ -115,12 +107,12 @@ static int tpm_atml_send(struct tpm_chip 59.96 59.97 static void tpm_atml_cancel(struct tpm_chip *chip) 59.98 { 59.99 - outb(ATML_STATUS_ABORT, chip->vendor->base + 1); 59.100 + atmel_putb(ATML_STATUS_ABORT, chip, 1); 59.101 } 59.102 59.103 static u8 tpm_atml_status(struct tpm_chip *chip) 59.104 { 59.105 - return inb(chip->vendor->base + 1); 59.106 + return atmel_getb(chip, 1); 59.107 } 59.108 59.109 static struct file_operations atmel_ops = { 59.110 @@ -142,7 +134,7 @@ static struct attribute* atmel_attrs[] = 59.111 &dev_attr_pcrs.attr, 59.112 &dev_attr_caps.attr, 59.113 &dev_attr_cancel.attr, 59.114 - 0, 59.115 + NULL, 59.116 }; 59.117 59.118 static struct attribute_group atmel_attr_grp = { .attrs = atmel_attrs }; 59.119 @@ -159,27 +151,39 @@ static struct tpm_vendor_specific tpm_at 59.120 .miscdev = { .fops = &atmel_ops, }, 59.121 }; 59.122 59.123 -static int __devinit tpm_atml_init(struct pci_dev *pci_dev, 59.124 - const struct pci_device_id *pci_id) 59.125 -{ 59.126 - u8 version[4]; 59.127 - int rc = 0; 59.128 - int lo, hi; 59.129 - 59.130 - if (pci_enable_device(pci_dev)) 59.131 - return -EIO; 59.132 +static struct platform_device *pdev; 59.133 59.134 - lo = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_LO); 59.135 - hi = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_HI); 59.136 +static void atml_plat_remove(void) 59.137 +{ 59.138 + struct tpm_chip *chip = dev_get_drvdata(&pdev->dev); 59.139 59.140 - tpm_atmel.base = (hi<<8)|lo; 59.141 - dev_dbg( &pci_dev->dev, "Operating with base: 0x%x\n", tpm_atmel.base); 59.142 + if (chip) { 59.143 + if (chip->vendor->have_region) 59.144 + atmel_release_region(chip->vendor->base, 59.145 + chip->vendor->region_size); 59.146 + atmel_put_base_addr(chip->vendor); 59.147 + tpm_remove_hardware(chip->dev); 59.148 + platform_device_unregister(pdev); 59.149 + } 59.150 +} 59.151 59.152 - /* verify that it is an Atmel part */ 59.153 - if (tpm_read_index(TPM_ADDR, 4) != 'A' || tpm_read_index(TPM_ADDR, 5) != 'T' 59.154 - || tpm_read_index(TPM_ADDR, 6) != 'M' || tpm_read_index(TPM_ADDR, 7) != 'L') { 59.155 +static struct device_driver atml_drv = { 59.156 + .name = "tpm_atmel", 59.157 + .bus = &platform_bus_type, 59.158 + .owner = THIS_MODULE, 59.159 + .suspend = tpm_pm_suspend, 59.160 + .resume = tpm_pm_resume, 59.161 +}; 59.162 + 59.163 +static int __init init_atmel(void) 59.164 +{ 59.165 + int rc = 0; 59.166 + 59.167 + driver_register(&atml_drv); 59.168 + 59.169 + if ((tpm_atmel.iobase = atmel_get_base_addr(&tpm_atmel)) == NULL) { 59.170 rc = -ENODEV; 59.171 - goto out_err; 59.172 + goto err_unreg_drv; 59.173 } 59.174 59.175 /* query chip for its version number */
60.1 --- a/linux-2.6-xen-sparse/drivers/char/tty_io.c Wed Feb 01 17:06:16 2006 +0000 60.2 +++ b/linux-2.6-xen-sparse/drivers/char/tty_io.c Wed Feb 01 18:00:19 2006 +0000 60.3 @@ -811,7 +811,7 @@ static void do_tty_hangup(void *data) 60.4 check_tty_count(tty, "do_tty_hangup"); 60.5 file_list_lock(); 60.6 /* This breaks for file handles being sent over AF_UNIX sockets ? */ 60.7 - list_for_each_entry(filp, &tty->tty_files, f_list) { 60.8 + list_for_each_entry(filp, &tty->tty_files, f_u.fu_list) { 60.9 if (filp->f_op->write == redirected_tty_write) 60.10 cons_filp = filp; 60.11 if (filp->f_op->write != tty_write) 60.12 @@ -1418,14 +1418,11 @@ end_init: 60.13 60.14 /* Release locally allocated memory ... nothing placed in slots */ 60.15 free_mem_out: 60.16 - if (o_tp) 60.17 - kfree(o_tp); 60.18 + kfree(o_tp); 60.19 if (o_tty) 60.20 free_tty_struct(o_tty); 60.21 - if (ltp) 60.22 - kfree(ltp); 60.23 - if (tp) 60.24 - kfree(tp); 60.25 + kfree(ltp); 60.26 + kfree(tp); 60.27 free_tty_struct(tty); 60.28 60.29 fail_no_mem: 60.30 @@ -2730,7 +2727,7 @@ void tty_register_device(struct tty_driv 60.31 pty_line_name(driver, index, name); 60.32 else 60.33 tty_line_name(driver, index, name); 60.34 - class_device_create(tty_class, dev, device, name); 60.35 + class_device_create(tty_class, NULL, dev, device, "%s", name); 60.36 } 60.37 60.38 /** 60.39 @@ -2985,14 +2982,14 @@ static int __init tty_init(void) 60.40 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) 60.41 panic("Couldn't register /dev/tty driver\n"); 60.42 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty"); 60.43 - class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); 60.44 + class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); 60.45 60.46 cdev_init(&console_cdev, &console_fops); 60.47 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || 60.48 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) 60.49 panic("Couldn't register /dev/console driver\n"); 60.50 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console"); 60.51 - class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); 60.52 + class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); 60.53 60.54 #ifdef CONFIG_UNIX98_PTYS 60.55 cdev_init(&ptmx_cdev, &ptmx_fops); 60.56 @@ -3000,7 +2997,7 @@ static int __init tty_init(void) 60.57 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) 60.58 panic("Couldn't register /dev/ptmx driver\n"); 60.59 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx"); 60.60 - class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); 60.61 + class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); 60.62 #endif 60.63 60.64 #ifdef CONFIG_VT 60.65 @@ -3011,7 +3008,7 @@ static int __init tty_init(void) 60.66 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) 60.67 panic("Couldn't register /dev/tty0 driver\n"); 60.68 devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); 60.69 - class_device_create(tty_class, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); 60.70 + class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); 60.71 60.72 vty_init(); 60.73 out_vt:
61.1 --- a/linux-2.6-xen-sparse/drivers/firmware/Kconfig Wed Feb 01 17:06:16 2006 +0000 61.2 +++ b/linux-2.6-xen-sparse/drivers/firmware/Kconfig Wed Feb 01 18:00:19 2006 +0000 61.3 @@ -60,6 +60,7 @@ config EFI_PCDP 61.4 61.5 config DELL_RBU 61.6 tristate "BIOS update support for DELL systems via sysfs" 61.7 + depends on X86 61.8 select FW_LOADER 61.9 help 61.10 Say m if you want to have the option of updating the BIOS for your 61.11 @@ -70,8 +71,7 @@ config DELL_RBU 61.12 61.13 config DCDBAS 61.14 tristate "Dell Systems Management Base Driver" 61.15 - depends on X86 || X86_64 61.16 - default m 61.17 + depends on X86 61.18 help 61.19 The Dell Systems Management Base Driver provides a sysfs interface 61.20 for systems management software to perform System Management
62.1 --- a/linux-2.6-xen-sparse/drivers/serial/Kconfig Wed Feb 01 17:06:16 2006 +0000 62.2 +++ b/linux-2.6-xen-sparse/drivers/serial/Kconfig Wed Feb 01 18:00:19 2006 +0000 62.3 @@ -10,7 +10,8 @@ menu "Serial drivers" 62.4 # The new 8250/16550 serial drivers 62.5 config SERIAL_8250 62.6 tristate "8250/16550 and compatible serial support" 62.7 - depends on (BROKEN || !(SPARC64 || SPARC32 || XEN_DISABLE_SERIAL)) 62.8 + depends on (BROKEN || !SPARC) 62.9 + depends on !XEN_DISABLE_SERIAL 62.10 select SERIAL_CORE 62.11 ---help--- 62.12 This selects whether you want to include the driver for the standard 62.13 @@ -207,6 +208,14 @@ config SERIAL_8250_ACORN 62.14 system, say Y to this option. The driver can handle 1, 2, or 3 port 62.15 cards. If unsure, say N. 62.16 62.17 +config SERIAL_8250_AU1X00 62.18 + bool "AU1X00 serial port support" 62.19 + depends on SERIAL_8250 != n && SOC_AU1X00 62.20 + help 62.21 + If you have an Au1x00 board and want to use the serial port, say Y 62.22 + to this option. The driver can handle 1 or 2 serial ports. 62.23 + If unsure, say N. 62.24 + 62.25 comment "Non-8250 serial port support" 62.26 62.27 config SERIAL_AMBA_PL010 62.28 @@ -461,14 +470,14 @@ config SERIAL_IMX_CONSOLE 62.29 62.30 config SERIAL_SUNCORE 62.31 bool 62.32 - depends on SPARC32 || SPARC64 62.33 + depends on SPARC 62.34 select SERIAL_CORE 62.35 select SERIAL_CORE_CONSOLE 62.36 default y 62.37 62.38 config SERIAL_SUNZILOG 62.39 tristate "Sun Zilog8530 serial support" 62.40 - depends on SPARC32 || SPARC64 62.41 + depends on SPARC 62.42 help 62.43 This driver supports the Zilog8530 serial ports found on many Sparc 62.44 systems. Say Y or M if you want to be able to these serial ports. 62.45 @@ -483,7 +492,7 @@ config SERIAL_SUNZILOG_CONSOLE 62.46 62.47 config SERIAL_SUNSU 62.48 tristate "Sun SU serial support" 62.49 - depends on (SPARC32 || SPARC64) && PCI 62.50 + depends on SPARC && PCI 62.51 help 62.52 This driver supports the 8250 serial ports that run the keyboard and 62.53 mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able 62.54 @@ -499,7 +508,7 @@ config SERIAL_SUNSU_CONSOLE 62.55 62.56 config SERIAL_MUX 62.57 tristate "Serial MUX support" 62.58 - depends on PARISC 62.59 + depends on GSC 62.60 select SERIAL_CORE 62.61 default y 62.62 ---help--- 62.63 @@ -539,7 +548,7 @@ config PDC_CONSOLE 62.64 62.65 config SERIAL_SUNSAB 62.66 tristate "Sun Siemens SAB82532 serial support" 62.67 - depends on (SPARC32 || SPARC64) && PCI 62.68 + depends on SPARC && PCI 62.69 help 62.70 This driver supports the Siemens SAB82532 DUSCC serial ports on newer 62.71 (PCI) UltraSPARC systems. Say Y or M if you want to be able to these
63.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Wed Feb 01 17:06:16 2006 +0000 63.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Wed Feb 01 18:00:19 2006 +0000 63.3 @@ -92,14 +92,14 @@ static DECLARE_WORK(balloon_worker, ball 63.4 static struct timer_list balloon_timer; 63.5 63.6 /* Use the private and mapping fields of struct page as a list. */ 63.7 -#define PAGE_TO_LIST(p) ((struct list_head *)&p->private) 63.8 +#define PAGE_TO_LIST(p) ((struct list_head *)&p->u.private) 63.9 #define LIST_TO_PAGE(l) \ 63.10 - (list_entry(((unsigned long *)l), struct page, private)) 63.11 + (list_entry(((unsigned long *)l), struct page, u.private)) 63.12 #define UNLIST_PAGE(p) \ 63.13 do { \ 63.14 list_del(PAGE_TO_LIST(p)); \ 63.15 p->mapping = NULL; \ 63.16 - p->private = 0; \ 63.17 + p->u.private = 0; \ 63.18 } while(0) 63.19 63.20 #define IPRINTK(fmt, args...) \
64.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Wed Feb 01 17:06:16 2006 +0000 64.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c Wed Feb 01 18:00:19 2006 +0000 64.3 @@ -126,8 +126,10 @@ static void xen_smp_intr_exit(unsigned i 64.4 64.5 static void cpu_bringup(void) 64.6 { 64.7 - if (!cpu_isset(smp_processor_id(), cpu_initialized)) 64.8 + if (!cpu_isset(smp_processor_id(), cpu_initialized)) { 64.9 cpu_init(); 64.10 + preempt_disable(); 64.11 + } 64.12 local_irq_enable(); 64.13 cpu_idle(); 64.14 }
65.1 --- a/linux-2.6-xen-sparse/fs/Kconfig Wed Feb 01 17:06:16 2006 +0000 65.2 +++ b/linux-2.6-xen-sparse/fs/Kconfig Wed Feb 01 18:00:19 2006 +0000 65.3 @@ -810,7 +810,7 @@ config TMPFS 65.4 65.5 config HUGETLBFS 65.6 bool "HugeTLB file system support" 65.7 - depends X86 || IA64 || PPC64 || SPARC64 || SUPERH || X86_64 || BROKEN 65.8 + depends X86 || IA64 || PPC64 || SPARC64 || SUPERH || BROKEN 65.9 depends !XEN 65.10 65.11 config HUGETLB_PAGE 65.12 @@ -899,6 +899,7 @@ config AFFS_FS 65.13 config HFS_FS 65.14 tristate "Apple Macintosh file system support (EXPERIMENTAL)" 65.15 depends on EXPERIMENTAL 65.16 + select NLS 65.17 help 65.18 If you say Y here, you will be able to mount Macintosh-formatted 65.19 floppy disks and hard drive partitions with full read-write access. 65.20 @@ -1051,6 +1052,19 @@ config JFFS2_FS_WRITEBUFFER 65.21 - NOR flash with transparent ECC 65.22 - DataFlash 65.23 65.24 +config JFFS2_SUMMARY 65.25 + bool "JFFS2 summary support (EXPERIMENTAL)" 65.26 + depends on JFFS2_FS && EXPERIMENTAL 65.27 + default n 65.28 + help 65.29 + This feature makes it possible to use summary information 65.30 + for faster filesystem mount. 65.31 + 65.32 + The summary information can be inserted into a filesystem image 65.33 + by the utility 'sumtool'. 65.34 + 65.35 + If unsure, say 'N'. 65.36 + 65.37 config JFFS2_COMPRESSION_OPTIONS 65.38 bool "Advanced compression options for JFFS2" 65.39 depends on JFFS2_FS 65.40 @@ -1072,10 +1086,10 @@ config JFFS2_ZLIB 65.41 default y 65.42 help 65.43 Zlib is designed to be a free, general-purpose, legally unencumbered, 65.44 - lossless data-compression library for use on virtually any computer 65.45 + lossless data-compression library for use on virtually any computer 65.46 hardware and operating system. See <http://www.gzip.org/zlib/> for 65.47 further information. 65.48 - 65.49 + 65.50 Say 'Y' if unsure. 65.51 65.52 config JFFS2_RTIME 65.53 @@ -1097,7 +1111,7 @@ choice 65.54 default JFFS2_CMODE_PRIORITY 65.55 depends on JFFS2_FS 65.56 help 65.57 - You can set here the default compression mode of JFFS2 from 65.58 + You can set here the default compression mode of JFFS2 from 65.59 the available compression modes. Don't touch if unsure. 65.60 65.61 config JFFS2_CMODE_NONE 65.62 @@ -1108,13 +1122,13 @@ config JFFS2_CMODE_NONE 65.63 config JFFS2_CMODE_PRIORITY 65.64 bool "priority" 65.65 help 65.66 - Tries the compressors in a predefinied order and chooses the first 65.67 + Tries the compressors in a predefinied order and chooses the first 65.68 successful one. 65.69 65.70 config JFFS2_CMODE_SIZE 65.71 bool "size (EXPERIMENTAL)" 65.72 help 65.73 - Tries all compressors and chooses the one which has the smallest 65.74 + Tries all compressors and chooses the one which has the smallest 65.75 result. 65.76 65.77 endchoice 65.78 @@ -1588,9 +1602,10 @@ config CIFS 65.79 PC operating systems. The CIFS protocol is fully supported by 65.80 file servers such as Windows 2000 (including Windows 2003, NT 4 65.81 and Windows XP) as well by Samba (which provides excellent CIFS 65.82 - server support for Linux and many other operating systems). Currently 65.83 - you must use the smbfs client filesystem to access older SMB servers 65.84 - such as Windows 9x and OS/2. 65.85 + server support for Linux and many other operating systems). Limited 65.86 + support for Windows ME and similar servers is provided as well. 65.87 + You must use the smbfs client filesystem to access older SMB servers 65.88 + such as OS/2 and DOS. 65.89 65.90 The intent of the cifs module is to provide an advanced 65.91 network file system client for mounting to CIFS compliant servers, 65.92 @@ -1601,7 +1616,7 @@ config CIFS 65.93 cifs if running only a (Samba) server. It is possible to enable both 65.94 smbfs and cifs (e.g. if you are using CIFS for accessing Windows 2003 65.95 and Samba 3 servers, and smbfs for accessing old servers). If you need 65.96 - to mount to Samba or Windows 2003 servers from this machine, say Y. 65.97 + to mount to Samba or Windows from this machine, say Y. 65.98 65.99 config CIFS_STATS 65.100 bool "CIFS statistics" 65.101 @@ -1610,8 +1625,22 @@ config CIFS_STATS 65.102 Enabling this option will cause statistics for each server share 65.103 mounted by the cifs client to be displayed in /proc/fs/cifs/Stats 65.104 65.105 +config CIFS_STATS2 65.106 + bool "CIFS extended statistics" 65.107 + depends on CIFS_STATS 65.108 + help 65.109 + Enabling this option will allow more detailed statistics on SMB 65.110 + request timing to be displayed in /proc/fs/cifs/DebugData and also 65.111 + allow optional logging of slow responses to dmesg (depending on the 65.112 + value of /proc/fs/cifs/cifsFYI, see fs/cifs/README for more details). 65.113 + These additional statistics may have a minor effect on performance 65.114 + and memory utilization. 65.115 + 65.116 + Unless you are a developer or are doing network performance analysis 65.117 + or tuning, say N. 65.118 + 65.119 config CIFS_XATTR 65.120 - bool "CIFS extended attributes (EXPERIMENTAL)" 65.121 + bool "CIFS extended attributes" 65.122 depends on CIFS 65.123 help 65.124 Extended attributes are name:value pairs associated with inodes by 65.125 @@ -1623,11 +1652,11 @@ config CIFS_XATTR 65.126 prefaced by the user namespace prefix. The system namespace 65.127 (used by some filesystems to store ACLs) is not supported at 65.128 this time. 65.129 - 65.130 + 65.131 If unsure, say N. 65.132 65.133 config CIFS_POSIX 65.134 - bool "CIFS POSIX Extensions (EXPERIMENTAL)" 65.135 + bool "CIFS POSIX Extensions" 65.136 depends on CIFS_XATTR 65.137 help 65.138 Enabling this option will cause the cifs client to attempt to 65.139 @@ -1640,10 +1669,28 @@ config CIFS_POSIX 65.140 65.141 config CIFS_EXPERIMENTAL 65.142 bool "CIFS Experimental Features (EXPERIMENTAL)" 65.143 - depends on CIFS 65.144 + depends on CIFS && EXPERIMENTAL 65.145 help 65.146 - Enables cifs features under testing. These features 65.147 - are highly experimental. If unsure, say N. 65.148 + Enables cifs features under testing. These features are 65.149 + experimental and currently include support for writepages 65.150 + (multipage writebehind performance improvements) and directory 65.151 + change notification ie fcntl(F_DNOTIFY) as well as some security 65.152 + improvements. Some also depend on setting at runtime the 65.153 + pseudo-file /proc/fs/cifs/Experimental (which is disabled by 65.154 + default). See the file fs/cifs/README for more details. 65.155 + 65.156 + If unsure, say N. 65.157 + 65.158 +config CIFS_UPCALL 65.159 + bool "CIFS Kerberos/SPNEGO advanced session setup (EXPERIMENTAL)" 65.160 + depends on CIFS_EXPERIMENTAL 65.161 + select CONNECTOR 65.162 + help 65.163 + Enables an upcall mechanism for CIFS which will be used to contact 65.164 + userspace helper utilities to provide SPNEGO packaged Kerberos 65.165 + tickets which are needed to mount to certain secure servers 65.166 + (for which more secure Kerberos authentication is required). If 65.167 + unsure, say N. 65.168 65.169 config NCP_FS 65.170 tristate "NCP file system support (to mount NetWare volumes)"
66.1 --- a/linux-2.6-xen-sparse/include/asm-i386/atomic.h Wed Feb 01 17:06:16 2006 +0000 66.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/atomic.h Wed Feb 01 18:00:19 2006 +0000 66.3 @@ -210,6 +210,27 @@ static __inline__ int atomic_sub_return( 66.4 return atomic_add_return(-i,v); 66.5 } 66.6 66.7 +#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) 66.8 + 66.9 +/** 66.10 + * atomic_add_unless - add unless the number is a given value 66.11 + * @v: pointer of type atomic_t 66.12 + * @a: the amount to add to v... 66.13 + * @u: ...unless v is equal to u. 66.14 + * 66.15 + * Atomically adds @a to @v, so long as it was not @u. 66.16 + * Returns non-zero if @v was not @u, and zero otherwise. 66.17 + */ 66.18 +#define atomic_add_unless(v, a, u) \ 66.19 +({ \ 66.20 + int c, old; \ 66.21 + c = atomic_read(v); \ 66.22 + while (c != (u) && (old = atomic_cmpxchg((v), c, c + (a))) != c) \ 66.23 + c = old; \ 66.24 + c != (u); \ 66.25 +}) 66.26 +#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) 66.27 + 66.28 #define atomic_inc_return(v) (atomic_add_return(1,v)) 66.29 #define atomic_dec_return(v) (atomic_sub_return(1,v)) 66.30
67.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/desc.h Wed Feb 01 17:06:16 2006 +0000 67.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/desc.h Wed Feb 01 18:00:19 2006 +0000 67.3 @@ -15,6 +15,8 @@ 67.4 67.5 extern struct desc_struct cpu_gdt_table[NR_CPUS][GDT_ENTRIES]; 67.6 67.7 +#define get_cpu_gdt_table(_cpu) ((struct desc_struct *)cpu_gdt_descr[(_cpu)].address) 67.8 + 67.9 DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); 67.10 67.11 struct Xgt_desc_struct { 67.12 @@ -38,8 +40,6 @@ extern struct Xgt_desc_struct idt_descr, 67.13 #define store_tr(tr) __asm__ ("str %0":"=mr" (tr)) 67.14 #define store_ldt(ldt) __asm__ ("sldt %0":"=mr" (ldt)) 67.15 67.16 -#define get_cpu_gdt_table(_cpu) ((struct desc_struct *)cpu_gdt_descr[(_cpu)].address) 67.17 - 67.18 /* 67.19 * This is the ldt that every process will get unless we need 67.20 * something other than this. 67.21 @@ -68,8 +68,7 @@ static inline void __set_tss_desc(unsign 67.22 67.23 static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) 67.24 { 67.25 - _set_tssldt_desc(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], 67.26 - (int)addr, ((size << 3)-1), 0x82); 67.27 + _set_tssldt_desc(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); 67.28 } 67.29 67.30 #define LDT_entry_a(info) \
68.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/mmu_context.h Wed Feb 01 17:06:16 2006 +0000 68.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/mmu_context.h Wed Feb 01 18:00:19 2006 +0000 68.3 @@ -63,7 +63,6 @@ static inline void switch_mm(struct mm_s 68.4 cpu_set(cpu, next->cpu_vm_mask); 68.5 68.6 /* Re-load page tables: load_cr3(next->pgd) */ 68.7 - per_cpu(cur_pgd, cpu) = next->pgd; 68.8 op->cmd = MMUEXT_NEW_BASEPTR; 68.9 op->arg1.mfn = pfn_to_mfn(__pa(next->pgd) >> PAGE_SHIFT); 68.10 op++;
69.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/param.h Wed Feb 01 17:06:16 2006 +0000 69.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/param.h Wed Feb 01 18:00:19 2006 +0000 69.3 @@ -1,9 +1,8 @@ 69.4 -#include <linux/config.h> 69.5 - 69.6 #ifndef _ASMi386_PARAM_H 69.7 #define _ASMi386_PARAM_H 69.8 69.9 #ifdef __KERNEL__ 69.10 +# include <linux/config.h> 69.11 # define HZ CONFIG_HZ /* Internal kernel timer frequency */ 69.12 # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ 69.13 # define CLOCKS_PER_SEC (USER_HZ) /* like times() */
70.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h Wed Feb 01 17:06:16 2006 +0000 70.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h Wed Feb 01 18:00:19 2006 +0000 70.3 @@ -76,11 +76,6 @@ 70.4 #define pfn_pte_ma(pfn, prot) __pte_ma(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) 70.5 #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) 70.6 70.7 -#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) 70.8 - 70.9 -#define pmd_page_kernel(pmd) \ 70.10 -((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) 70.11 - 70.12 /* 70.13 * All present user pages are user-executable: 70.14 */
71.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h Wed Feb 01 17:06:16 2006 +0000 71.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h Wed Feb 01 18:00:19 2006 +0000 71.3 @@ -103,11 +103,6 @@ static inline void set_pte(pte_t *ptep, 71.4 */ 71.5 static inline void pud_clear (pud_t * pud) { } 71.6 71.7 -#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) 71.8 - 71.9 -#define pmd_page_kernel(pmd) \ 71.10 -((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) 71.11 - 71.12 #define pud_page(pud) \ 71.13 ((struct page *) __va(pud_val(pud) & PAGE_MASK)) 71.14
72.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h Wed Feb 01 17:06:16 2006 +0000 72.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h Wed Feb 01 18:00:19 2006 +0000 72.3 @@ -26,6 +26,9 @@ 72.4 #include <linux/list.h> 72.5 #include <linux/spinlock.h> 72.6 72.7 +struct mm_struct; 72.8 +struct vm_area_struct; 72.9 + 72.10 /* 72.11 * ZERO_PAGE is a global shared page that is always zero: used 72.12 * for zero-mapped memory areas etc.. 72.13 @@ -204,7 +207,8 @@ extern unsigned long pg0[]; 72.14 #define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE)) 72.15 #define pte_clear(mm,addr,xp) do { set_pte_at(mm, addr, xp, __pte(0)); } while (0) 72.16 72.17 -#define pmd_none(x) (!pmd_val(x)) 72.18 +/* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ 72.19 +#define pmd_none(x) (!(unsigned long)pmd_val(x)) 72.20 /* pmd_present doesn't just test the _PAGE_PRESENT bit since wr.p.t. 72.21 can temporarily clear it. */ 72.22 #define pmd_present(x) (pmd_val(x)) 72.23 @@ -326,8 +330,6 @@ static inline pte_t pte_modify(pte_t pte 72.24 return pte; 72.25 } 72.26 72.27 -#define page_pte(page) page_pte_prot(page, __pgprot(0)) 72.28 - 72.29 #define pmd_large(pmd) \ 72.30 ((pmd_val(pmd) & (_PAGE_PSE|_PAGE_PRESENT)) == (_PAGE_PSE|_PAGE_PRESENT)) 72.31 72.32 @@ -372,6 +374,11 @@ static inline pte_t pte_modify(pte_t pte 72.33 #define pte_offset_kernel(dir, address) \ 72.34 ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(address)) 72.35 72.36 +#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) 72.37 + 72.38 +#define pmd_page_kernel(pmd) \ 72.39 + ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) 72.40 + 72.41 /* 72.42 * Helper function that returns the kernel pagetable entry controlling 72.43 * the virtual address 'address'. NULL means no pagetable entry present.
73.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h Wed Feb 01 17:06:16 2006 +0000 73.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/processor.h Wed Feb 01 18:00:19 2006 +0000 73.3 @@ -66,7 +66,9 @@ struct cpuinfo_x86 { 73.4 int f00f_bug; 73.5 int coma_bug; 73.6 unsigned long loops_per_jiffy; 73.7 - unsigned char x86_num_cores; 73.8 + unsigned char x86_max_cores; /* cpuid returned max cores value */ 73.9 + unsigned char booted_cores; /* number of cores as seen by OS */ 73.10 + unsigned char apicid; 73.11 } __attribute__((__aligned__(SMP_CACHE_BYTES))); 73.12 73.13 #define X86_VENDOR_INTEL 0 73.14 @@ -89,7 +91,6 @@ extern struct cpuinfo_x86 boot_cpu_data; 73.15 extern struct cpuinfo_x86 new_cpu_data; 73.16 extern struct tss_struct doublefault_tss; 73.17 DECLARE_PER_CPU(struct tss_struct, init_tss); 73.18 -DECLARE_PER_CPU(pgd_t *, cur_pgd); 73.19 73.20 #ifdef CONFIG_SMP 73.21 extern struct cpuinfo_x86 cpu_data[]; 73.22 @@ -724,4 +725,10 @@ extern void mtrr_bp_init(void); 73.23 #define mtrr_bp_init() do {} while (0) 73.24 #endif 73.25 73.26 +#ifdef CONFIG_X86_MCE 73.27 +extern void mcheck_init(struct cpuinfo_x86 *c); 73.28 +#else 73.29 +#define mcheck_init(c) do {} while(0) 73.30 +#endif 73.31 + 73.32 #endif /* __ASM_I386_PROCESSOR_H */
74.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/smp.h Wed Feb 01 17:06:16 2006 +0000 74.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/smp.h Wed Feb 01 18:00:19 2006 +0000 74.3 @@ -45,6 +45,8 @@ extern void unlock_ipi_call_lock(void); 74.4 #define MAX_APICID 256 74.5 extern u8 x86_cpu_to_apicid[]; 74.6 74.7 +#define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] 74.8 + 74.9 #ifdef CONFIG_HOTPLUG_CPU 74.10 extern void cpu_exit_clear(void); 74.11 extern void cpu_uninit(void); 74.12 @@ -91,6 +93,10 @@ extern int __cpu_disable(void); 74.13 extern void __cpu_die(unsigned int cpu); 74.14 #endif /* !__ASSEMBLY__ */ 74.15 74.16 +#else /* CONFIG_SMP */ 74.17 + 74.18 +#define cpu_physical_id(cpu) boot_cpu_physical_apicid 74.19 + 74.20 #define NO_PROC_ID 0xFF /* No processor magic marker */ 74.21 74.22 #endif
75.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/system.h Wed Feb 01 17:06:16 2006 +0000 75.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/system.h Wed Feb 01 18:00:19 2006 +0000 75.3 @@ -122,21 +122,22 @@ static inline unsigned long _get_base(ch 75.4 #define write_cr0(x) \ 75.5 __asm__ __volatile__("movl %0,%%cr0": :"r" (x)); 75.6 75.7 -#define read_cr2() ({ \ 75.8 - unsigned int __dummy; \ 75.9 - __asm__ __volatile__( \ 75.10 - "movl %%cr2,%0\n\t" \ 75.11 - :"=r" (__dummy)); \ 75.12 - __dummy; \ 75.13 -}) 75.14 +#define read_cr2() \ 75.15 + (HYPERVISOR_shared_info->vcpu_info[smp_processor_id()].arch.cr2) 75.16 #define write_cr2(x) \ 75.17 __asm__ __volatile__("movl %0,%%cr2": :"r" (x)); 75.18 75.19 -#define read_cr3() per_cpu(cur_pgd, smp_processor_id()) 75.20 -#define write_cr3(x) do { \ 75.21 - xen_pt_switch((x)); \ 75.22 - per_cpu(cur_pgd, smp_processor_id()) = (x); \ 75.23 -} while (/* CONSTCOND */0) 75.24 +#define read_cr3() ({ \ 75.25 + unsigned int __dummy; \ 75.26 + __asm__ ( \ 75.27 + "movl %%cr3,%0\n\t" \ 75.28 + :"=r" (__dummy)); \ 75.29 + machine_to_phys(__dummy); \ 75.30 +}) 75.31 +#define write_cr3(x) ({ \ 75.32 + maddr_t __dummy = phys_to_machine(x); \ 75.33 + __asm__ __volatile__("movl %0,%%cr3": :"r" (__dummy)); \ 75.34 +}) 75.35 75.36 #define read_cr4() ({ \ 75.37 unsigned int __dummy; \ 75.38 @@ -147,7 +148,6 @@ static inline unsigned long _get_base(ch 75.39 }) 75.40 #define write_cr4(x) \ 75.41 __asm__ __volatile__("movl %0,%%cr4": :"r" (x)); 75.42 - 75.43 #define stts() (HYPERVISOR_fpu_taskswitch(1)) 75.44 75.45 #endif /* __KERNEL__ */ 75.46 @@ -173,6 +173,8 @@ struct __xchg_dummy { unsigned long a[10 75.47 #define __xg(x) ((struct __xchg_dummy *)(x)) 75.48 75.49 75.50 +#ifdef CONFIG_X86_CMPXCHG64 75.51 + 75.52 /* 75.53 * The semantics of XCHGCMP8B are a bit strange, this is why 75.54 * there is a loop and the loading of %%eax and %%edx has to 75.55 @@ -227,6 +229,8 @@ static inline void __set_64bit_var (unsi 75.56 __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : \ 75.57 __set_64bit(ptr, ll_low(value), ll_high(value)) ) 75.58 75.59 +#endif 75.60 + 75.61 /* 75.62 * Note: no "lock" prefix even on SMP: xchg always implies lock anyway 75.63 * Note 2: xchg has side effect, so that attribute volatile is necessary, 75.64 @@ -265,6 +269,9 @@ static inline unsigned long __xchg(unsig 75.65 75.66 #ifdef CONFIG_X86_CMPXCHG 75.67 #define __HAVE_ARCH_CMPXCHG 1 75.68 +#define cmpxchg(ptr,o,n)\ 75.69 + ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ 75.70 + (unsigned long)(n),sizeof(*(ptr)))) 75.71 #endif 75.72 75.73 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, 75.74 @@ -281,22 +288,78 @@ static inline unsigned long __cmpxchg(vo 75.75 case 2: 75.76 __asm__ __volatile__(LOCK "cmpxchgw %w1,%2" 75.77 : "=a"(prev) 75.78 - : "q"(new), "m"(*__xg(ptr)), "0"(old) 75.79 + : "r"(new), "m"(*__xg(ptr)), "0"(old) 75.80 : "memory"); 75.81 return prev; 75.82 case 4: 75.83 __asm__ __volatile__(LOCK "cmpxchgl %1,%2" 75.84 : "=a"(prev) 75.85 - : "q"(new), "m"(*__xg(ptr)), "0"(old) 75.86 + : "r"(new), "m"(*__xg(ptr)), "0"(old) 75.87 : "memory"); 75.88 return prev; 75.89 } 75.90 return old; 75.91 } 75.92 75.93 -#define cmpxchg(ptr,o,n)\ 75.94 - ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ 75.95 - (unsigned long)(n),sizeof(*(ptr)))) 75.96 +#ifndef CONFIG_X86_CMPXCHG 75.97 +/* 75.98 + * Building a kernel capable running on 80386. It may be necessary to 75.99 + * simulate the cmpxchg on the 80386 CPU. For that purpose we define 75.100 + * a function for each of the sizes we support. 75.101 + */ 75.102 + 75.103 +extern unsigned long cmpxchg_386_u8(volatile void *, u8, u8); 75.104 +extern unsigned long cmpxchg_386_u16(volatile void *, u16, u16); 75.105 +extern unsigned long cmpxchg_386_u32(volatile void *, u32, u32); 75.106 + 75.107 +static inline unsigned long cmpxchg_386(volatile void *ptr, unsigned long old, 75.108 + unsigned long new, int size) 75.109 +{ 75.110 + switch (size) { 75.111 + case 1: 75.112 + return cmpxchg_386_u8(ptr, old, new); 75.113 + case 2: 75.114 + return cmpxchg_386_u16(ptr, old, new); 75.115 + case 4: 75.116 + return cmpxchg_386_u32(ptr, old, new); 75.117 + } 75.118 + return old; 75.119 +} 75.120 + 75.121 +#define cmpxchg(ptr,o,n) \ 75.122 +({ \ 75.123 + __typeof__(*(ptr)) __ret; \ 75.124 + if (likely(boot_cpu_data.x86 > 3)) \ 75.125 + __ret = __cmpxchg((ptr), (unsigned long)(o), \ 75.126 + (unsigned long)(n), sizeof(*(ptr))); \ 75.127 + else \ 75.128 + __ret = cmpxchg_386((ptr), (unsigned long)(o), \ 75.129 + (unsigned long)(n), sizeof(*(ptr))); \ 75.130 + __ret; \ 75.131 +}) 75.132 +#endif 75.133 + 75.134 +#ifdef CONFIG_X86_CMPXCHG64 75.135 + 75.136 +static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long long old, 75.137 + unsigned long long new) 75.138 +{ 75.139 + unsigned long long prev; 75.140 + __asm__ __volatile__(LOCK "cmpxchg8b %3" 75.141 + : "=A"(prev) 75.142 + : "b"((unsigned long)new), 75.143 + "c"((unsigned long)(new >> 32)), 75.144 + "m"(*__xg(ptr)), 75.145 + "0"(old) 75.146 + : "memory"); 75.147 + return prev; 75.148 +} 75.149 + 75.150 +#define cmpxchg64(ptr,o,n)\ 75.151 + ((__typeof__(*(ptr)))__cmpxchg64((ptr),(unsigned long long)(o),\ 75.152 + (unsigned long long)(n))) 75.153 + 75.154 +#endif 75.155 75.156 #ifdef __KERNEL__ 75.157 struct alt_instr {
76.1 --- a/linux-2.6-xen-sparse/include/asm-i386/rwsem.h Wed Feb 01 17:06:16 2006 +0000 76.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/rwsem.h Wed Feb 01 18:00:19 2006 +0000 76.3 @@ -285,5 +285,10 @@ LOCK "xadd %0,(%2)" 76.4 return tmp+delta; 76.5 } 76.6 76.7 +static inline int rwsem_is_locked(struct rw_semaphore *sem) 76.8 +{ 76.9 + return (sem->count != 0); 76.10 +} 76.11 + 76.12 #endif /* __KERNEL__ */ 76.13 #endif /* _I386_RWSEM_H */
77.1 --- a/linux-2.6-xen-sparse/include/asm-i386/system.h Wed Feb 01 17:06:16 2006 +0000 77.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/system.h Wed Feb 01 18:00:19 2006 +0000 77.3 @@ -167,6 +167,8 @@ struct __xchg_dummy { unsigned long a[10 77.4 #define __xg(x) ((struct __xchg_dummy *)(x)) 77.5 77.6 77.7 +#ifdef CONFIG_X86_CMPXCHG64 77.8 + 77.9 /* 77.10 * The semantics of XCHGCMP8B are a bit strange, this is why 77.11 * there is a loop and the loading of %%eax and %%edx has to 77.12 @@ -221,6 +223,8 @@ static inline void __set_64bit_var (unsi 77.13 __set_64bit(ptr, (unsigned int)(value), (unsigned int)((value)>>32ULL) ) : \ 77.14 __set_64bit(ptr, ll_low(value), ll_high(value)) ) 77.15 77.16 +#endif 77.17 + 77.18 /* 77.19 * Note: no "lock" prefix even on SMP: xchg always implies lock anyway 77.20 * Note 2: xchg has side effect, so that attribute volatile is necessary, 77.21 @@ -259,6 +263,9 @@ static inline unsigned long __xchg(unsig 77.22 77.23 #ifdef CONFIG_X86_CMPXCHG 77.24 #define __HAVE_ARCH_CMPXCHG 1 77.25 +#define cmpxchg(ptr,o,n)\ 77.26 + ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ 77.27 + (unsigned long)(n),sizeof(*(ptr)))) 77.28 #endif 77.29 77.30 static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, 77.31 @@ -275,22 +282,78 @@ static inline unsigned long __cmpxchg(vo 77.32 case 2: 77.33 __asm__ __volatile__(LOCK "cmpxchgw %w1,%2" 77.34 : "=a"(prev) 77.35 - : "q"(new), "m"(*__xg(ptr)), "0"(old) 77.36 + : "r"(new), "m"(*__xg(ptr)), "0"(old) 77.37 : "memory"); 77.38 return prev; 77.39 case 4: 77.40 __asm__ __volatile__(LOCK "cmpxchgl %1,%2" 77.41 : "=a"(prev) 77.42 - : "q"(new), "m"(*__xg(ptr)), "0"(old) 77.43 + : "r"(new), "m"(*__xg(ptr)), "0"(old) 77.44 : "memory"); 77.45 return prev; 77.46 } 77.47 return old; 77.48 } 77.49 77.50 -#define cmpxchg(ptr,o,n)\ 77.51 - ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ 77.52 - (unsigned long)(n),sizeof(*(ptr)))) 77.53 +#ifndef CONFIG_X86_CMPXCHG 77.54 +/* 77.55 + * Building a kernel capable running on 80386. It may be necessary to 77.56 + * simulate the cmpxchg on the 80386 CPU. For that purpose we define 77.57 + * a function for each of the sizes we support. 77.58 + */ 77.59 + 77.60 +extern unsigned long cmpxchg_386_u8(volatile void *, u8, u8); 77.61 +extern unsigned long cmpxchg_386_u16(volatile void *, u16, u16); 77.62 +extern unsigned long cmpxchg_386_u32(volatile void *, u32, u32); 77.63 + 77.64 +static inline unsigned long cmpxchg_386(volatile void *ptr, unsigned long old, 77.65 + unsigned long new, int size) 77.66 +{ 77.67 + switch (size) { 77.68 + case 1: 77.69 + return cmpxchg_386_u8(ptr, old, new); 77.70 + case 2: 77.71 + return cmpxchg_386_u16(ptr, old, new); 77.72 + case 4: 77.73 + return cmpxchg_386_u32(ptr, old, new); 77.74 + } 77.75 + return old; 77.76 +} 77.77 + 77.78 +#define cmpxchg(ptr,o,n) \ 77.79 +({ \ 77.80 + __typeof__(*(ptr)) __ret; \ 77.81 + if (likely(boot_cpu_data.x86 > 3)) \ 77.82 + __ret = __cmpxchg((ptr), (unsigned long)(o), \ 77.83 + (unsigned long)(n), sizeof(*(ptr))); \ 77.84 + else \ 77.85 + __ret = cmpxchg_386((ptr), (unsigned long)(o), \ 77.86 + (unsigned long)(n), sizeof(*(ptr))); \ 77.87 + __ret; \ 77.88 +}) 77.89 +#endif 77.90 + 77.91 +#ifdef CONFIG_X86_CMPXCHG64 77.92 + 77.93 +static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long long old, 77.94 + unsigned long long new) 77.95 +{ 77.96 + unsigned long long prev; 77.97 + __asm__ __volatile__(LOCK "cmpxchg8b %3" 77.98 + : "=A"(prev) 77.99 + : "b"((unsigned long)new), 77.100 + "c"((unsigned long)(new >> 32)), 77.101 + "m"(*__xg(ptr)), 77.102 + "0"(old) 77.103 + : "memory"); 77.104 + return prev; 77.105 +} 77.106 + 77.107 +#define cmpxchg64(ptr,o,n)\ 77.108 + ((__typeof__(*(ptr)))__cmpxchg64((ptr),(unsigned long long)(o),\ 77.109 + (unsigned long long)(n))) 77.110 + 77.111 +#endif 77.112 77.113 #ifdef __KERNEL__ 77.114 struct alt_instr {
78.1 --- a/linux-2.6-xen-sparse/include/asm-um/page.h Wed Feb 01 17:06:16 2006 +0000 78.2 +++ b/linux-2.6-xen-sparse/include/asm-um/page.h Wed Feb 01 18:00:19 2006 +0000 78.3 @@ -115,7 +115,7 @@ extern unsigned long uml_physmem; 78.4 #define pfn_valid(pfn) ((pfn) < max_mapnr) 78.5 #define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v))) 78.6 78.7 -extern struct page *arch_validate(struct page *page, int mask, int order); 78.8 +extern struct page *arch_validate(struct page *page, gfp_t mask, int order); 78.9 #define HAVE_ARCH_VALIDATE 78.10 78.11 extern int arch_free_page(struct page *page, int order);
79.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/desc.h Wed Feb 01 17:06:16 2006 +0000 79.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/desc.h Wed Feb 01 18:00:19 2006 +0000 79.3 @@ -114,16 +114,19 @@ static inline void _set_gate(void *adr, 79.4 79.5 static inline void set_intr_gate(int nr, void *func) 79.6 { 79.7 + BUG_ON((unsigned)nr > 0xFF); 79.8 _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 0, 0); 79.9 } 79.10 79.11 static inline void set_intr_gate_ist(int nr, void *func, unsigned ist) 79.12 { 79.13 + BUG_ON((unsigned)nr > 0xFF); 79.14 _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 0, ist); 79.15 } 79.16 79.17 static inline void set_system_gate(int nr, void *func) 79.18 { 79.19 + BUG_ON((unsigned)nr > 0xFF); 79.20 _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, 0); 79.21 } 79.22 79.23 @@ -145,10 +148,16 @@ static inline void set_tssldt_descriptor 79.24 79.25 static inline void set_tss_desc(unsigned cpu, void *addr) 79.26 { 79.27 + /* 79.28 + * sizeof(unsigned long) coming from an extra "long" at the end 79.29 + * of the iobitmap. See tss_struct definition in processor.h 79.30 + * 79.31 + * -1? seg base+limit should be pointing to the address of the 79.32 + * last valid byte 79.33 + */ 79.34 set_tssldt_descriptor((struct ldttss_desc *)&get_cpu_gdt_table(cpu)[GDT_ENTRY_TSS], 79.35 - (unsigned long)addr, 79.36 - DESC_TSS, 79.37 - sizeof(struct tss_struct) - 1); 79.38 + (unsigned long)addr, DESC_TSS, 79.39 + IO_BITMAP_OFFSET + IO_BITMAP_BYTES + sizeof(unsigned long) - 1); 79.40 } 79.41 79.42 static inline void set_ldt_desc(unsigned cpu, void *addr, int size)
80.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hw_irq.h Wed Feb 01 17:06:16 2006 +0000 80.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hw_irq.h Wed Feb 01 18:00:19 2006 +0000 80.3 @@ -56,7 +56,7 @@ struct hw_interrupt_type; 80.4 #define CALL_FUNCTION_VECTOR 0xfc 80.5 #define KDB_VECTOR 0xfb /* reserved for KDB */ 80.6 #define THERMAL_APIC_VECTOR 0xfa 80.7 -/* 0xf9 free */ 80.8 +#define THRESHOLD_APIC_VECTOR 0xf9 80.9 #define INVALIDATE_TLB_VECTOR_END 0xf8 80.10 #define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f8 used for TLB flush */ 80.11
81.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/mmu_context.h Wed Feb 01 17:06:16 2006 +0000 81.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/mmu_context.h Wed Feb 01 18:00:19 2006 +0000 81.3 @@ -60,6 +60,12 @@ extern void mm_pin(struct mm_struct *mm) 81.4 extern void mm_unpin(struct mm_struct *mm); 81.5 void mm_pin_all(void); 81.6 81.7 +static inline void load_cr3(pgd_t *pgd) 81.8 +{ 81.9 + asm volatile("movq %0,%%cr3" :: "r" (phys_to_machine(__pa(pgd))) : 81.10 + "memory"); 81.11 +} 81.12 + 81.13 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 81.14 struct task_struct *tsk) 81.15 { 81.16 @@ -79,7 +85,6 @@ static inline void switch_mm(struct mm_s 81.17 set_bit(cpu, &next->cpu_vm_mask); 81.18 81.19 /* load_cr3(next->pgd) */ 81.20 - per_cpu(cur_pgd, smp_processor_id()) = next->pgd; 81.21 op->cmd = MMUEXT_NEW_BASEPTR; 81.22 op->arg1.mfn = pfn_to_mfn(__pa(next->pgd) >> PAGE_SHIFT); 81.23 op++;
82.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h Wed Feb 01 17:06:16 2006 +0000 82.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h Wed Feb 01 18:00:19 2006 +0000 82.3 @@ -31,7 +31,7 @@ 82.4 #define PAGE_SIZE (1UL << PAGE_SHIFT) 82.5 #endif 82.6 #define PAGE_MASK (~(PAGE_SIZE-1)) 82.7 -#define PHYSICAL_PAGE_MASK (~(PAGE_SIZE-1) & (__PHYSICAL_MASK << PAGE_SHIFT)) 82.8 +#define PHYSICAL_PAGE_MASK (~(PAGE_SIZE-1) & __PHYSICAL_MASK) 82.9 82.10 #define THREAD_ORDER 1 82.11 #ifdef __ASSEMBLY__
83.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/param.h Wed Feb 01 17:06:16 2006 +0000 83.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/param.h Wed Feb 01 18:00:19 2006 +0000 83.3 @@ -1,9 +1,8 @@ 83.4 -#include <linux/config.h> 83.5 - 83.6 #ifndef _ASMx86_64_PARAM_H 83.7 #define _ASMx86_64_PARAM_H 83.8 83.9 #ifdef __KERNEL__ 83.10 +# include <linux/config.h> 83.11 # define HZ CONFIG_HZ /* Internal kernel timer frequency */ 83.12 # define USER_HZ 100 /* .. some user interfaces are in "ticks */ 83.13 # define CLOCKS_PER_SEC (USER_HZ) /* like times() */
84.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h Wed Feb 01 17:06:16 2006 +0000 84.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h Wed Feb 01 18:00:19 2006 +0000 84.3 @@ -39,6 +39,7 @@ extern pud_t level3_physmem_pgt[512]; 84.4 extern pud_t level3_ident_pgt[512]; 84.5 extern pmd_t level2_kernel_pgt[512]; 84.6 extern pgd_t init_level4_pgt[]; 84.7 +extern pgd_t boot_level4_pgt[]; 84.8 extern unsigned long __supported_pte_mask; 84.9 84.10 #define swapper_pg_dir init_level4_pgt 84.11 @@ -143,6 +144,8 @@ static inline pte_t ptep_get_and_clear(s 84.12 } 84.13 #endif 84.14 84.15 +struct mm_struct; 84.16 + 84.17 static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) 84.18 { 84.19 pte_t pte; 84.20 @@ -405,8 +408,6 @@ static inline int pmd_large(pmd_t pte) { 84.21 * and a page entry and page directory to the page they refer to. 84.22 */ 84.23 84.24 -#define page_pte(page) page_pte_prot(page, __pgprot(0)) 84.25 - 84.26 /* 84.27 * Level 4 access. 84.28 * Never use these in the common code. 84.29 @@ -450,7 +451,7 @@ static inline pud_t *pud_offset_k(unsign 84.30 #define pmd_clear(xp) do { set_pmd(xp, __pmd(0)); } while (0) 84.31 #define pmd_bad(x) ((pmd_val(x) & (~PAGE_MASK & ~_PAGE_PRESENT)) != (_KERNPG_TABLE & ~_PAGE_PRESENT)) 84.32 #define pfn_pmd(nr,prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val(prot))) 84.33 -#define pmd_pfn(x) ((pmd_val(x) >> PAGE_SHIFT) & __PHYSICAL_MASK) 84.34 +#define pmd_pfn(x) ((pmd_val(x) & __PHYSICAL_MASK) >> PAGE_SHIFT) 84.35 84.36 #define pte_to_pgoff(pte) ((pte_val(pte) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) 84.37 #define pgoff_to_pte(off) ((pte_t) { ((off) << PAGE_SHIFT) | _PAGE_FILE })
85.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/processor.h Wed Feb 01 17:06:16 2006 +0000 85.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/processor.h Wed Feb 01 18:00:19 2006 +0000 85.3 @@ -61,10 +61,12 @@ struct cpuinfo_x86 { 85.4 int x86_cache_alignment; 85.5 int x86_tlbsize; /* number of 4K pages in DTLB/ITLB combined(in pages)*/ 85.6 __u8 x86_virt_bits, x86_phys_bits; 85.7 - __u8 x86_num_cores; 85.8 + __u8 x86_max_cores; /* cpuid returned max cores value */ 85.9 __u32 x86_power; 85.10 __u32 extended_cpuid_level; /* Max extended CPUID function supported */ 85.11 unsigned long loops_per_jiffy; 85.12 + __u8 apicid; 85.13 + __u8 booted_cores; /* number of cores as seen by OS */ 85.14 } ____cacheline_aligned; 85.15 85.16 #define X86_VENDOR_INTEL 0 85.17 @@ -168,11 +170,6 @@ static inline void clear_in_cr4 (unsigne 85.18 } 85.19 85.20 85.21 -#define load_cr3(pgdir) do { \ 85.22 - xen_pt_switch(__pa(pgdir)); \ 85.23 - per_cpu(cur_pgd, smp_processor_id()) = pgdir; \ 85.24 -} while (/* CONSTCOND */0) 85.25 - 85.26 /* 85.27 * Bus types 85.28 */ 85.29 @@ -247,7 +244,6 @@ struct tss_struct { 85.30 85.31 extern struct cpuinfo_x86 boot_cpu_data; 85.32 DECLARE_PER_CPU(struct tss_struct,init_tss); 85.33 -DECLARE_PER_CPU(pgd_t *, cur_pgd); 85.34 85.35 #define ARCH_MIN_TASKALIGN 16 85.36
86.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/smp.h Wed Feb 01 17:06:16 2006 +0000 86.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/smp.h Wed Feb 01 18:00:19 2006 +0000 86.3 @@ -46,7 +46,6 @@ extern void lock_ipi_call_lock(void); 86.4 extern void unlock_ipi_call_lock(void); 86.5 extern int smp_num_siblings; 86.6 extern void smp_send_reschedule(int cpu); 86.7 -extern void zap_low_mappings(void); 86.8 void smp_stop_cpu(void); 86.9 extern int smp_call_function_single(int cpuid, void (*func) (void *info), 86.10 void *info, int retry, int wait); 86.11 @@ -83,6 +82,8 @@ extern int safe_smp_processor_id(void); 86.12 extern int __cpu_disable(void); 86.13 extern void __cpu_die(unsigned int cpu); 86.14 extern void prefill_possible_map(void); 86.15 +extern unsigned num_processors; 86.16 +extern unsigned disabled_cpus; 86.17 86.18 #endif /* !ASSEMBLY */ 86.19 86.20 @@ -139,5 +140,11 @@ static __inline int logical_smp_processo 86.21 #endif 86.22 #endif 86.23 86.24 +#ifdef CONFIG_SMP 86.25 +#define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] 86.26 +#else 86.27 +#define cpu_physical_id(cpu) boot_cpu_id 86.28 #endif 86.29 86.30 +#endif 86.31 +
87.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h Wed Feb 01 17:06:16 2006 +0000 87.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/system.h Wed Feb 01 18:00:19 2006 +0000 87.3 @@ -11,6 +11,12 @@ 87.4 #ifdef __KERNEL__ 87.5 87.6 #ifdef CONFIG_SMP 87.7 +#define __vcpu_id smp_processor_id() 87.8 +#else 87.9 +#define __vcpu_id 0 87.10 +#endif 87.11 + 87.12 +#ifdef CONFIG_SMP 87.13 #define LOCK_PREFIX "lock ; " 87.14 #else 87.15 #define LOCK_PREFIX "" 87.16 @@ -325,7 +331,7 @@ static inline unsigned long __cmpxchg(vo 87.17 do { \ 87.18 vcpu_info_t *_vcpu; \ 87.19 preempt_disable(); \ 87.20 - _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ 87.21 + _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; \ 87.22 _vcpu->evtchn_upcall_mask = 1; \ 87.23 preempt_enable_no_resched(); \ 87.24 barrier(); \ 87.25 @@ -336,7 +342,7 @@ do { \ 87.26 vcpu_info_t *_vcpu; \ 87.27 barrier(); \ 87.28 preempt_disable(); \ 87.29 - _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ 87.30 + _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; \ 87.31 _vcpu->evtchn_upcall_mask = 0; \ 87.32 barrier(); /* unmask then check (avoid races) */ \ 87.33 if ( unlikely(_vcpu->evtchn_upcall_pending) ) \ 87.34 @@ -348,7 +354,7 @@ do { \ 87.35 do { \ 87.36 vcpu_info_t *_vcpu; \ 87.37 preempt_disable(); \ 87.38 - _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ 87.39 + _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; \ 87.40 (x) = _vcpu->evtchn_upcall_mask; \ 87.41 preempt_enable(); \ 87.42 } while (0) 87.43 @@ -358,7 +364,7 @@ do { \ 87.44 vcpu_info_t *_vcpu; \ 87.45 barrier(); \ 87.46 preempt_disable(); \ 87.47 - _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ 87.48 + _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; \ 87.49 if ((_vcpu->evtchn_upcall_mask = (x)) == 0) { \ 87.50 barrier(); /* unmask then check (avoid races) */ \ 87.51 if ( unlikely(_vcpu->evtchn_upcall_pending) ) \ 87.52 @@ -374,7 +380,7 @@ do { \ 87.53 do { \ 87.54 vcpu_info_t *_vcpu; \ 87.55 preempt_disable(); \ 87.56 - _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ 87.57 + _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; \ 87.58 (x) = _vcpu->evtchn_upcall_mask; \ 87.59 _vcpu->evtchn_upcall_mask = 1; \ 87.60 preempt_enable_no_resched(); \ 87.61 @@ -394,7 +400,7 @@ void cpu_idle_wait(void); 87.62 ({ int ___x; \ 87.63 vcpu_info_t *_vcpu; \ 87.64 preempt_disable(); \ 87.65 - _vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; \ 87.66 + _vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id]; \ 87.67 ___x = (_vcpu->evtchn_upcall_mask != 0); \ 87.68 preempt_enable_no_resched(); \ 87.69 ___x; })
88.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/io_ports.h Wed Feb 01 17:06:16 2006 +0000 88.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 88.3 @@ -1,30 +0,0 @@ 88.4 -/* 88.5 - * arch/i386/mach-generic/io_ports.h 88.6 - * 88.7 - * Machine specific IO port address definition for generic. 88.8 - * Written by Osamu Tomita <tomita@cinet.co.jp> 88.9 - */ 88.10 -#ifndef _MACH_IO_PORTS_H 88.11 -#define _MACH_IO_PORTS_H 88.12 - 88.13 -/* i8253A PIT registers */ 88.14 -#define PIT_MODE 0x43 88.15 -#define PIT_CH0 0x40 88.16 -#define PIT_CH2 0x42 88.17 - 88.18 -/* i8259A PIC registers */ 88.19 -#define PIC_MASTER_CMD 0x20 88.20 -#define PIC_MASTER_IMR 0x21 88.21 -#define PIC_MASTER_ISR PIC_MASTER_CMD 88.22 -#define PIC_MASTER_POLL PIC_MASTER_ISR 88.23 -#define PIC_MASTER_OCW3 PIC_MASTER_ISR 88.24 -#define PIC_SLAVE_CMD 0xa0 88.25 -#define PIC_SLAVE_IMR 0xa1 88.26 - 88.27 -/* i8259A PIC related value */ 88.28 -#define PIC_CASCADE_IR 2 88.29 -#define MASTER_ICW4_DEFAULT 0x01 88.30 -#define SLAVE_ICW4_DEFAULT 0x01 88.31 -#define PIC_ICW4_AEOI 2 88.32 - 88.33 -#endif /* !_MACH_IO_PORTS_H */
89.1 --- a/linux-2.6-xen-sparse/include/linux/gfp.h Wed Feb 01 17:06:16 2006 +0000 89.2 +++ b/linux-2.6-xen-sparse/include/linux/gfp.h Wed Feb 01 18:00:19 2006 +0000 89.3 @@ -11,9 +11,16 @@ struct vm_area_struct; 89.4 /* 89.5 * GFP bitmasks.. 89.6 */ 89.7 -/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */ 89.8 -#define __GFP_DMA 0x01u 89.9 -#define __GFP_HIGHMEM 0x02u 89.10 +/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low three bits) */ 89.11 +#define __GFP_DMA ((__force gfp_t)0x01u) 89.12 +#define __GFP_HIGHMEM ((__force gfp_t)0x02u) 89.13 +#ifdef CONFIG_DMA_IS_DMA32 89.14 +#define __GFP_DMA32 ((__force gfp_t)0x01) /* ZONE_DMA is ZONE_DMA32 */ 89.15 +#elif BITS_PER_LONG < 64 89.16 +#define __GFP_DMA32 ((__force gfp_t)0x00) /* ZONE_NORMAL is ZONE_DMA32 */ 89.17 +#else 89.18 +#define __GFP_DMA32 ((__force gfp_t)0x04) /* Has own ZONE_DMA32 */ 89.19 +#endif 89.20 89.21 /* 89.22 * Action modifiers - doesn't change the zoning 89.23 @@ -26,30 +33,29 @@ struct vm_area_struct; 89.24 * 89.25 * __GFP_NORETRY: The VM implementation must not retry indefinitely. 89.26 */ 89.27 -#define __GFP_WAIT 0x10u /* Can wait and reschedule? */ 89.28 -#define __GFP_HIGH 0x20u /* Should access emergency pools? */ 89.29 -#define __GFP_IO 0x40u /* Can start physical IO? */ 89.30 -#define __GFP_FS 0x80u /* Can call down to low-level FS? */ 89.31 -#define __GFP_COLD 0x100u /* Cache-cold page required */ 89.32 -#define __GFP_NOWARN 0x200u /* Suppress page allocation failure warning */ 89.33 -#define __GFP_REPEAT 0x400u /* Retry the allocation. Might fail */ 89.34 -#define __GFP_NOFAIL 0x800u /* Retry for ever. Cannot fail */ 89.35 -#define __GFP_NORETRY 0x1000u /* Do not retry. Might fail */ 89.36 -#define __GFP_NO_GROW 0x2000u /* Slab internal usage */ 89.37 -#define __GFP_COMP 0x4000u /* Add compound page metadata */ 89.38 -#define __GFP_ZERO 0x8000u /* Return zeroed page on success */ 89.39 -#define __GFP_NOMEMALLOC 0x10000u /* Don't use emergency reserves */ 89.40 -#define __GFP_NORECLAIM 0x20000u /* No realy zone reclaim during allocation */ 89.41 -#define __GFP_HARDWALL 0x40000u /* Enforce hardwall cpuset memory allocs */ 89.42 +#define __GFP_WAIT ((__force gfp_t)0x10u) /* Can wait and reschedule? */ 89.43 +#define __GFP_HIGH ((__force gfp_t)0x20u) /* Should access emergency pools? */ 89.44 +#define __GFP_IO ((__force gfp_t)0x40u) /* Can start physical IO? */ 89.45 +#define __GFP_FS ((__force gfp_t)0x80u) /* Can call down to low-level FS? */ 89.46 +#define __GFP_COLD ((__force gfp_t)0x100u) /* Cache-cold page required */ 89.47 +#define __GFP_NOWARN ((__force gfp_t)0x200u) /* Suppress page allocation failure warning */ 89.48 +#define __GFP_REPEAT ((__force gfp_t)0x400u) /* Retry the allocation. Might fail */ 89.49 +#define __GFP_NOFAIL ((__force gfp_t)0x800u) /* Retry for ever. Cannot fail */ 89.50 +#define __GFP_NORETRY ((__force gfp_t)0x1000u)/* Do not retry. Might fail */ 89.51 +#define __GFP_NO_GROW ((__force gfp_t)0x2000u)/* Slab internal usage */ 89.52 +#define __GFP_COMP ((__force gfp_t)0x4000u)/* Add compound page metadata */ 89.53 +#define __GFP_ZERO ((__force gfp_t)0x8000u)/* Return zeroed page on success */ 89.54 +#define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */ 89.55 +#define __GFP_HARDWALL ((__force gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */ 89.56 89.57 #define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */ 89.58 -#define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) 89.59 +#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) 89.60 89.61 /* if you forget to add the bitmask here kernel will crash, period */ 89.62 #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ 89.63 __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ 89.64 __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \ 89.65 - __GFP_NOMEMALLOC|__GFP_NORECLAIM|__GFP_HARDWALL) 89.66 + __GFP_NOMEMALLOC|__GFP_HARDWALL) 89.67 89.68 #define GFP_ATOMIC (__GFP_HIGH) 89.69 #define GFP_NOIO (__GFP_WAIT) 89.70 @@ -64,6 +70,16 @@ struct vm_area_struct; 89.71 89.72 #define GFP_DMA __GFP_DMA 89.73 89.74 +/* 4GB DMA on some platforms */ 89.75 +#define GFP_DMA32 __GFP_DMA32 89.76 + 89.77 + 89.78 +static inline int gfp_zone(gfp_t gfp) 89.79 +{ 89.80 + int zone = GFP_ZONEMASK & (__force int) gfp; 89.81 + BUG_ON(zone >= GFP_ZONETYPES); 89.82 + return zone; 89.83 +} 89.84 89.85 /* 89.86 * There is only one page-allocator function, and two main namespaces to 89.87 @@ -98,7 +114,7 @@ static inline struct page *alloc_pages_n 89.88 return NULL; 89.89 89.90 return __alloc_pages(gfp_mask, order, 89.91 - NODE_DATA(nid)->node_zonelists + (gfp_mask & GFP_ZONEMASK)); 89.92 + NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask)); 89.93 } 89.94 89.95 #ifdef CONFIG_NUMA
90.1 --- a/linux-2.6-xen-sparse/include/linux/irq.h Wed Feb 01 17:06:16 2006 +0000 90.2 +++ b/linux-2.6-xen-sparse/include/linux/irq.h Wed Feb 01 18:00:19 2006 +0000 90.3 @@ -10,6 +10,7 @@ 90.4 */ 90.5 90.6 #include <linux/config.h> 90.7 +#include <linux/smp.h> 90.8 90.9 #if !defined(CONFIG_ARCH_S390) 90.10
91.1 --- a/linux-2.6-xen-sparse/include/linux/mm.h Wed Feb 01 17:06:16 2006 +0000 91.2 +++ b/linux-2.6-xen-sparse/include/linux/mm.h Wed Feb 01 18:00:19 2006 +0000 91.3 @@ -144,7 +144,8 @@ extern unsigned int kobjsize(const void 91.4 91.5 #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ 91.6 #define VM_GROWSUP 0x00000200 91.7 -#define VM_SHM 0x00000400 /* shared memory area, don't swap out */ 91.8 +#define VM_SHM 0x00000000 /* Means nothing: delete it later */ 91.9 +#define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ 91.10 #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ 91.11 91.12 #define VM_EXECUTABLE 0x00001000 91.13 @@ -157,13 +158,14 @@ extern unsigned int kobjsize(const void 91.14 91.15 #define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */ 91.16 #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ 91.17 -#define VM_RESERVED 0x00080000 /* Don't unmap it from swap_out */ 91.18 +#define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */ 91.19 #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ 91.20 #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ 91.21 #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ 91.22 #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ 91.23 +#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */ 91.24 #ifdef CONFIG_XEN 91.25 -#define VM_FOREIGN 0x02000000 /* Has pages belonging to another VM */ 91.26 +#define VM_FOREIGN 0x04000000 /* Has pages belonging to another VM */ 91.27 #endif 91.28 91.29 #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ 91.30 @@ -209,12 +211,6 @@ struct vm_operations_struct { 91.31 struct mmu_gather; 91.32 struct inode; 91.33 91.34 -#ifdef ARCH_HAS_ATOMIC_UNSIGNED 91.35 -typedef unsigned page_flags_t; 91.36 -#else 91.37 -typedef unsigned long page_flags_t; 91.38 -#endif 91.39 - 91.40 /* 91.41 * Each physical page in the system has a struct page associated with 91.42 * it to keep track of whatever it is we are using the page for at the 91.43 @@ -222,20 +218,25 @@ typedef unsigned long page_flags_t; 91.44 * a page. 91.45 */ 91.46 struct page { 91.47 - page_flags_t flags; /* Atomic flags, some possibly 91.48 + unsigned long flags; /* Atomic flags, some possibly 91.49 * updated asynchronously */ 91.50 atomic_t _count; /* Usage count, see below. */ 91.51 atomic_t _mapcount; /* Count of ptes mapped in mms, 91.52 * to show when page is mapped 91.53 * & limit reverse map searches. 91.54 */ 91.55 - unsigned long private; /* Mapping-private opaque data: 91.56 + union { 91.57 + unsigned long private; /* Mapping-private opaque data: 91.58 * usually used for buffer_heads 91.59 * if PagePrivate set; used for 91.60 * swp_entry_t if PageSwapCache 91.61 * When page is free, this indicates 91.62 * order in the buddy system. 91.63 */ 91.64 +#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS 91.65 + spinlock_t ptl; 91.66 +#endif 91.67 + } u; 91.68 struct address_space *mapping; /* If low bit clear, points to 91.69 * inode address_space, or NULL. 91.70 * If page mapped as anonymous 91.71 @@ -263,6 +264,9 @@ struct page { 91.72 #endif /* WANT_PAGE_VIRTUAL */ 91.73 }; 91.74 91.75 +#define page_private(page) ((page)->u.private) 91.76 +#define set_page_private(page, v) ((page)->u.private = (v)) 91.77 + 91.78 /* 91.79 * FIXME: take this include out, include page-flags.h in 91.80 * files which need it (119 of them) 91.81 @@ -312,41 +316,22 @@ struct page { 91.82 91.83 extern void FASTCALL(__page_cache_release(struct page *)); 91.84 91.85 -#ifdef CONFIG_HUGETLB_PAGE 91.86 - 91.87 -static inline int page_count(struct page *p) 91.88 +static inline int page_count(struct page *page) 91.89 { 91.90 - if (PageCompound(p)) 91.91 - p = (struct page *)p->private; 91.92 - return atomic_read(&(p)->_count) + 1; 91.93 + if (PageCompound(page)) 91.94 + page = (struct page *)page_private(page); 91.95 + return atomic_read(&page->_count) + 1; 91.96 } 91.97 91.98 static inline void get_page(struct page *page) 91.99 { 91.100 if (unlikely(PageCompound(page))) 91.101 - page = (struct page *)page->private; 91.102 + page = (struct page *)page_private(page); 91.103 atomic_inc(&page->_count); 91.104 } 91.105 91.106 void put_page(struct page *page); 91.107 91.108 -#else /* CONFIG_HUGETLB_PAGE */ 91.109 - 91.110 -#define page_count(p) (atomic_read(&(p)->_count) + 1) 91.111 - 91.112 -static inline void get_page(struct page *page) 91.113 -{ 91.114 - atomic_inc(&page->_count); 91.115 -} 91.116 - 91.117 -static inline void put_page(struct page *page) 91.118 -{ 91.119 - if (!PageReserved(page) && put_page_testzero(page)) 91.120 - __page_cache_release(page); 91.121 -} 91.122 - 91.123 -#endif /* CONFIG_HUGETLB_PAGE */ 91.124 - 91.125 /* 91.126 * Multiple processes may "see" the same page. E.g. for untouched 91.127 * mappings of /dev/null, all processes see the same page full of 91.128 @@ -430,7 +415,7 @@ static inline void put_page(struct page 91.129 #endif 91.130 91.131 /* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */ 91.132 -#define SECTIONS_PGOFF ((sizeof(page_flags_t)*8) - SECTIONS_WIDTH) 91.133 +#define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH) 91.134 #define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH) 91.135 #define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH) 91.136 91.137 @@ -590,7 +575,7 @@ static inline int PageAnon(struct page * 91.138 static inline pgoff_t page_index(struct page *page) 91.139 { 91.140 if (unlikely(PageSwapCache(page))) 91.141 - return page->private; 91.142 + return page_private(page); 91.143 return page->index; 91.144 } 91.145 91.146 @@ -683,9 +668,10 @@ struct zap_details { 91.147 unsigned long truncate_count; /* Compare vm_truncate_count */ 91.148 }; 91.149 91.150 +struct page *vm_normal_page(struct vm_area_struct *, unsigned long, pte_t); 91.151 unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, 91.152 unsigned long size, struct zap_details *); 91.153 -unsigned long unmap_vmas(struct mmu_gather **tlb, struct mm_struct *mm, 91.154 +unsigned long unmap_vmas(struct mmu_gather **tlb, 91.155 struct vm_area_struct *start_vma, unsigned long start_addr, 91.156 unsigned long end_addr, unsigned long *nr_accounted, 91.157 struct zap_details *); 91.158 @@ -707,10 +693,6 @@ static inline void unmap_shared_mapping_ 91.159 } 91.160 91.161 extern int vmtruncate(struct inode * inode, loff_t offset); 91.162 -extern pud_t *FASTCALL(__pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)); 91.163 -extern pmd_t *FASTCALL(__pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)); 91.164 -extern pte_t *FASTCALL(pte_alloc_kernel(struct mm_struct *mm, pmd_t *pmd, unsigned long address)); 91.165 -extern pte_t *FASTCALL(pte_alloc_map(struct mm_struct *mm, pmd_t *pmd, unsigned long address)); 91.166 extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot); 91.167 extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot); 91.168 extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access); 91.169 @@ -726,6 +708,7 @@ void install_arg_page(struct vm_area_str 91.170 91.171 int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, 91.172 int len, int write, int force, struct page **pages, struct vm_area_struct **vmas); 91.173 +void print_bad_pte(struct vm_area_struct *, pte_t, unsigned long); 91.174 91.175 int __set_page_dirty_buffers(struct page *page); 91.176 int __set_page_dirty_nobuffers(struct page *page); 91.177 @@ -750,7 +733,7 @@ extern unsigned long do_mremap(unsigned 91.178 * The callback will be passed nr_to_scan == 0 when the VM is querying the 91.179 * cache size, so a fastpath for that case is appropriate. 91.180 */ 91.181 -typedef int (*shrinker_t)(int nr_to_scan, unsigned int gfp_mask); 91.182 +typedef int (*shrinker_t)(int nr_to_scan, gfp_t gfp_mask); 91.183 91.184 /* 91.185 * Add an aging callback. The int is the number of 'seeks' it takes 91.186 @@ -762,38 +745,85 @@ struct shrinker; 91.187 extern struct shrinker *set_shrinker(int, shrinker_t); 91.188 extern void remove_shrinker(struct shrinker *shrinker); 91.189 91.190 -/* 91.191 - * On a two-level or three-level page table, this ends up being trivial. Thus 91.192 - * the inlining and the symmetry break with pte_alloc_map() that does all 91.193 - * of this out-of-line. 91.194 - */ 91.195 +extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); 91.196 + 91.197 +int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address); 91.198 +int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); 91.199 +int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address); 91.200 +int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); 91.201 + 91.202 /* 91.203 * The following ifdef needed to get the 4level-fixup.h header to work. 91.204 * Remove it when 4level-fixup.h has been removed. 91.205 */ 91.206 -#ifdef CONFIG_MMU 91.207 -#ifndef __ARCH_HAS_4LEVEL_HACK 91.208 +#if defined(CONFIG_MMU) && !defined(__ARCH_HAS_4LEVEL_HACK) 91.209 static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) 91.210 { 91.211 - if (pgd_none(*pgd)) 91.212 - return __pud_alloc(mm, pgd, address); 91.213 - return pud_offset(pgd, address); 91.214 + return (unlikely(pgd_none(*pgd)) && __pud_alloc(mm, pgd, address))? 91.215 + NULL: pud_offset(pgd, address); 91.216 } 91.217 91.218 static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) 91.219 { 91.220 - if (pud_none(*pud)) 91.221 - return __pmd_alloc(mm, pud, address); 91.222 - return pmd_offset(pud, address); 91.223 + return (unlikely(pud_none(*pud)) && __pmd_alloc(mm, pud, address))? 91.224 + NULL: pmd_offset(pud, address); 91.225 } 91.226 -#endif 91.227 -#endif /* CONFIG_MMU */ 91.228 +#endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */ 91.229 + 91.230 +#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS 91.231 +/* 91.232 + * We tuck a spinlock to guard each pagetable page into its struct page, 91.233 + * at page->private, with BUILD_BUG_ON to make sure that this will not 91.234 + * overflow into the next struct page (as it might with DEBUG_SPINLOCK). 91.235 + * When freeing, reset page->mapping so free_pages_check won't complain. 91.236 + */ 91.237 +#define __pte_lockptr(page) &((page)->u.ptl) 91.238 +#define pte_lock_init(_page) do { \ 91.239 + spin_lock_init(__pte_lockptr(_page)); \ 91.240 +} while (0) 91.241 +#define pte_lock_deinit(page) ((page)->mapping = NULL) 91.242 +#define pte_lockptr(mm, pmd) ({(void)(mm); __pte_lockptr(pmd_page(*(pmd)));}) 91.243 +#else 91.244 +/* 91.245 + * We use mm->page_table_lock to guard all pagetable pages of the mm. 91.246 + */ 91.247 +#define pte_lock_init(page) do {} while (0) 91.248 +#define pte_lock_deinit(page) do {} while (0) 91.249 +#define pte_lockptr(mm, pmd) ({(void)(pmd); &(mm)->page_table_lock;}) 91.250 +#endif /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */ 91.251 + 91.252 +#define pte_offset_map_lock(mm, pmd, address, ptlp) \ 91.253 +({ \ 91.254 + spinlock_t *__ptl = pte_lockptr(mm, pmd); \ 91.255 + pte_t *__pte = pte_offset_map(pmd, address); \ 91.256 + *(ptlp) = __ptl; \ 91.257 + spin_lock(__ptl); \ 91.258 + __pte; \ 91.259 +}) 91.260 + 91.261 +#define pte_unmap_unlock(pte, ptl) do { \ 91.262 + spin_unlock(ptl); \ 91.263 + pte_unmap(pte); \ 91.264 +} while (0) 91.265 + 91.266 +#define pte_alloc_map(mm, pmd, address) \ 91.267 + ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? \ 91.268 + NULL: pte_offset_map(pmd, address)) 91.269 + 91.270 +#define pte_alloc_map_lock(mm, pmd, address, ptlp) \ 91.271 + ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? \ 91.272 + NULL: pte_offset_map_lock(mm, pmd, address, ptlp)) 91.273 + 91.274 +#define pte_alloc_kernel(pmd, address) \ 91.275 + ((unlikely(!pmd_present(*(pmd))) && __pte_alloc_kernel(pmd, address))? \ 91.276 + NULL: pte_offset_kernel(pmd, address)) 91.277 91.278 extern void free_area_init(unsigned long * zones_size); 91.279 extern void free_area_init_node(int nid, pg_data_t *pgdat, 91.280 unsigned long * zones_size, unsigned long zone_start_pfn, 91.281 unsigned long *zholes_size); 91.282 extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long); 91.283 +extern void setup_per_zone_pages_min(void); 91.284 extern void mem_init(void); 91.285 extern void show_mem(void); 91.286 extern void si_meminfo(struct sysinfo * val); 91.287 @@ -837,6 +867,7 @@ extern int split_vma(struct mm_struct *, 91.288 extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *); 91.289 extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *, 91.290 struct rb_node **, struct rb_node *); 91.291 +extern void unlink_file_vma(struct vm_area_struct *); 91.292 extern struct vm_area_struct *copy_vma(struct vm_area_struct **, 91.293 unsigned long addr, unsigned long len, pgoff_t pgoff); 91.294 extern void exit_mmap(struct mm_struct *); 91.295 @@ -884,20 +915,23 @@ int write_one_page(struct page *page, in 91.296 * turning readahead off */ 91.297 91.298 int do_page_cache_readahead(struct address_space *mapping, struct file *filp, 91.299 - unsigned long offset, unsigned long nr_to_read); 91.300 + pgoff_t offset, unsigned long nr_to_read); 91.301 int force_page_cache_readahead(struct address_space *mapping, struct file *filp, 91.302 - unsigned long offset, unsigned long nr_to_read); 91.303 -unsigned long page_cache_readahead(struct address_space *mapping, 91.304 + pgoff_t offset, unsigned long nr_to_read); 91.305 +unsigned long page_cache_readahead(struct address_space *mapping, 91.306 struct file_ra_state *ra, 91.307 struct file *filp, 91.308 - unsigned long offset, 91.309 + pgoff_t offset, 91.310 unsigned long size); 91.311 void handle_ra_miss(struct address_space *mapping, 91.312 struct file_ra_state *ra, pgoff_t offset); 91.313 unsigned long max_sane_readahead(unsigned long nr); 91.314 91.315 /* Do stack extension */ 91.316 -extern int expand_stack(struct vm_area_struct * vma, unsigned long address); 91.317 +extern int expand_stack(struct vm_area_struct *vma, unsigned long address); 91.318 +#ifdef CONFIG_IA64 91.319 +extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); 91.320 +#endif 91.321 91.322 /* Look up the first VMA which satisfies addr < vm_end, NULL if none. */ 91.323 extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr); 91.324 @@ -920,15 +954,19 @@ static inline unsigned long vma_pages(st 91.325 return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 91.326 } 91.327 91.328 -extern struct vm_area_struct *find_extend_vma(struct mm_struct *mm, unsigned long addr); 91.329 +struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); 91.330 +struct page *vmalloc_to_page(void *addr); 91.331 +unsigned long vmalloc_to_pfn(void *addr); 91.332 +int remap_pfn_range(struct vm_area_struct *, unsigned long addr, 91.333 + unsigned long pfn, unsigned long size, pgprot_t); 91.334 +int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); 91.335 91.336 -extern struct page * vmalloc_to_page(void *addr); 91.337 -extern unsigned long vmalloc_to_pfn(void *addr); 91.338 -extern struct page * follow_page(struct mm_struct *mm, unsigned long address, 91.339 - int write); 91.340 -extern int check_user_page_readable(struct mm_struct *mm, unsigned long address); 91.341 -int remap_pfn_range(struct vm_area_struct *, unsigned long, 91.342 - unsigned long, unsigned long, pgprot_t); 91.343 +struct page *follow_page(struct vm_area_struct *, unsigned long address, 91.344 + unsigned int foll_flags); 91.345 +#define FOLL_WRITE 0x01 /* check pte is writable */ 91.346 +#define FOLL_TOUCH 0x02 /* mark page accessed */ 91.347 +#define FOLL_GET 0x04 /* do get_page on page */ 91.348 +#define FOLL_ANON 0x08 /* give ZERO_PAGE if no pgtable */ 91.349 91.350 #ifdef CONFIG_XEN 91.351 typedef int (*pte_fn_t)(pte_t *pte, struct page *pte_page, unsigned long addr, 91.352 @@ -938,29 +976,14 @@ extern int generic_page_range(struct mm_ 91.353 #endif 91.354 91.355 #ifdef CONFIG_PROC_FS 91.356 -void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); 91.357 +void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); 91.358 #else 91.359 -static inline void __vm_stat_account(struct mm_struct *mm, 91.360 +static inline void vm_stat_account(struct mm_struct *mm, 91.361 unsigned long flags, struct file *file, long pages) 91.362 { 91.363 } 91.364 #endif /* CONFIG_PROC_FS */ 91.365 91.366 -static inline void vm_stat_account(struct vm_area_struct *vma) 91.367 -{ 91.368 - __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, 91.369 - vma_pages(vma)); 91.370 -} 91.371 - 91.372 -static inline void vm_stat_unaccount(struct vm_area_struct *vma) 91.373 -{ 91.374 - __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, 91.375 - -vma_pages(vma)); 91.376 -} 91.377 - 91.378 -/* update per process rss and vm hiwater data */ 91.379 -extern void update_mem_hiwater(struct task_struct *tsk); 91.380 - 91.381 #ifndef CONFIG_DEBUG_PAGEALLOC 91.382 static inline void 91.383 kernel_map_pages(struct page *page, int numpages, int enable)
92.1 --- a/linux-2.6-xen-sparse/include/linux/skbuff.h Wed Feb 01 17:06:16 2006 +0000 92.2 +++ b/linux-2.6-xen-sparse/include/linux/skbuff.h Wed Feb 01 18:00:19 2006 +0000 92.3 @@ -137,6 +137,8 @@ struct skb_shared_info { 92.4 unsigned int nr_frags; 92.5 unsigned short tso_size; 92.6 unsigned short tso_segs; 92.7 + unsigned short ufo_size; 92.8 + unsigned int ip6_frag_id; 92.9 struct sk_buff *frag_list; 92.10 skb_frag_t frags[MAX_SKB_FRAGS]; 92.11 }; 92.12 @@ -171,7 +173,6 @@ enum { 92.13 * struct sk_buff - socket buffer 92.14 * @next: Next buffer in list 92.15 * @prev: Previous buffer in list 92.16 - * @list: List we are on 92.17 * @sk: Socket we are owned by 92.18 * @tstamp: Time we arrived 92.19 * @dev: Device we arrived on/are leaving by 92.20 @@ -192,6 +193,7 @@ enum { 92.21 * @proto_csum_valid: Protocol csum validated since arriving at localhost 92.22 * @proto_csum_blank: Protocol csum must be added before leaving localhost 92.23 * @pkt_type: Packet class 92.24 + * @fclone: skbuff clone status 92.25 * @ip_summed: Driver fed us an IP checksum 92.26 * @priority: Packet queueing priority 92.27 * @users: User count - see {datagram,tcp}.c 92.28 @@ -204,7 +206,9 @@ enum { 92.29 * @destructor: Destruct function 92.30 * @nfmark: Can be used for communication between hooks 92.31 * @nfct: Associated connection, if any 92.32 + * @ipvs_property: skbuff is owned by ipvs 92.33 * @nfctinfo: Relationship of this skb to the connection 92.34 + * @nfct_reasm: netfilter conntrack re-assembly pointer 92.35 * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c 92.36 * @tc_index: Traffic control index 92.37 * @tc_verd: traffic control verdict 92.38 @@ -263,13 +267,13 @@ struct sk_buff { 92.39 nohdr:1, 92.40 nfctinfo:3; 92.41 __u8 pkt_type:3, 92.42 + fclone:2, 92.43 #ifndef CONFIG_XEN 92.44 - fclone:2; 92.45 + ipvs_property:1; 92.46 #else 92.47 - fclone:2, 92.48 + ipvs_property:1, 92.49 proto_csum_valid:1, 92.50 proto_csum_blank:1; 92.51 - /* 1 bit spare */ 92.52 #endif 92.53 __be16 protocol; 92.54 92.55 @@ -277,8 +281,8 @@ struct sk_buff { 92.56 #ifdef CONFIG_NETFILTER 92.57 __u32 nfmark; 92.58 struct nf_conntrack *nfct; 92.59 -#if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) 92.60 - __u8 ipvs_property:1; 92.61 +#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 92.62 + struct sk_buff *nfct_reasm; 92.63 #endif 92.64 #ifdef CONFIG_BRIDGE_NETFILTER 92.65 struct nf_bridge_info *nf_bridge; 92.66 @@ -350,6 +354,11 @@ extern void skb_over_panic(struct 92.67 extern void skb_under_panic(struct sk_buff *skb, int len, 92.68 void *here); 92.69 92.70 +extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, 92.71 + int getfrag(void *from, char *to, int offset, 92.72 + int len,int odd, struct sk_buff *skb), 92.73 + void *from, int length); 92.74 + 92.75 struct skb_seq_state 92.76 { 92.77 __u32 lower_offset; 92.78 @@ -605,6 +614,30 @@ static inline void skb_queue_head_init(s 92.79 */ 92.80 92.81 /** 92.82 + * __skb_queue_after - queue a buffer at the list head 92.83 + * @list: list to use 92.84 + * @prev: place after this buffer 92.85 + * @newsk: buffer to queue 92.86 + * 92.87 + * Queue a buffer int the middle of a list. This function takes no locks 92.88 + * and you must therefore hold required locks before calling it. 92.89 + * 92.90 + * A buffer cannot be placed on two lists at the same time. 92.91 + */ 92.92 +static inline void __skb_queue_after(struct sk_buff_head *list, 92.93 + struct sk_buff *prev, 92.94 + struct sk_buff *newsk) 92.95 +{ 92.96 + struct sk_buff *next; 92.97 + list->qlen++; 92.98 + 92.99 + next = prev->next; 92.100 + newsk->next = next; 92.101 + newsk->prev = prev; 92.102 + next->prev = prev->next = newsk; 92.103 +} 92.104 + 92.105 +/** 92.106 * __skb_queue_head - queue a buffer at the list head 92.107 * @list: list to use 92.108 * @newsk: buffer to queue 92.109 @@ -618,14 +651,7 @@ extern void skb_queue_head(struct sk_buf 92.110 static inline void __skb_queue_head(struct sk_buff_head *list, 92.111 struct sk_buff *newsk) 92.112 { 92.113 - struct sk_buff *prev, *next; 92.114 - 92.115 - list->qlen++; 92.116 - prev = (struct sk_buff *)list; 92.117 - next = prev->next; 92.118 - newsk->next = next; 92.119 - newsk->prev = prev; 92.120 - next->prev = prev->next = newsk; 92.121 + __skb_queue_after(list, (struct sk_buff *)list, newsk); 92.122 } 92.123 92.124 /** 92.125 @@ -1205,6 +1231,11 @@ static inline void kunmap_skb_frag(void 92.126 prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \ 92.127 skb = skb->next) 92.128 92.129 +#define skb_queue_reverse_walk(queue, skb) \ 92.130 + for (skb = (queue)->prev; \ 92.131 + prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \ 92.132 + skb = skb->prev) 92.133 + 92.134 92.135 extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, 92.136 int noblock, int *err); 92.137 @@ -1213,8 +1244,7 @@ extern unsigned int datagram_poll(str 92.138 extern int skb_copy_datagram_iovec(const struct sk_buff *from, 92.139 int offset, struct iovec *to, 92.140 int size); 92.141 -extern int skb_copy_and_csum_datagram_iovec(const 92.142 - struct sk_buff *skb, 92.143 +extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, 92.144 int hlen, 92.145 struct iovec *iov); 92.146 extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); 92.147 @@ -1282,6 +1312,30 @@ static inline void skb_set_timestamp(str 92.148 92.149 extern void __net_timestamp(struct sk_buff *skb); 92.150 92.151 +extern unsigned int __skb_checksum_complete(struct sk_buff *skb); 92.152 + 92.153 +/** 92.154 + * skb_checksum_complete - Calculate checksum of an entire packet 92.155 + * @skb: packet to process 92.156 + * 92.157 + * This function calculates the checksum over the entire packet plus 92.158 + * the value of skb->csum. The latter can be used to supply the 92.159 + * checksum of a pseudo header as used by TCP/UDP. It returns the 92.160 + * checksum. 92.161 + * 92.162 + * For protocols that contain complete checksums such as ICMP/TCP/UDP, 92.163 + * this function can be used to verify that checksum on received 92.164 + * packets. In that case the function should return zero if the 92.165 + * checksum is correct. In particular, this function will return zero 92.166 + * if skb->ip_summed is CHECKSUM_UNNECESSARY which indicates that the 92.167 + * hardware has already verified the correctness of the checksum. 92.168 + */ 92.169 +static inline unsigned int skb_checksum_complete(struct sk_buff *skb) 92.170 +{ 92.171 + return skb->ip_summed != CHECKSUM_UNNECESSARY && 92.172 + __skb_checksum_complete(skb); 92.173 +} 92.174 + 92.175 #ifdef CONFIG_NETFILTER 92.176 static inline void nf_conntrack_put(struct nf_conntrack *nfct) 92.177 { 92.178 @@ -1293,10 +1347,26 @@ static inline void nf_conntrack_get(stru 92.179 if (nfct) 92.180 atomic_inc(&nfct->use); 92.181 } 92.182 +#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 92.183 +static inline void nf_conntrack_get_reasm(struct sk_buff *skb) 92.184 +{ 92.185 + if (skb) 92.186 + atomic_inc(&skb->users); 92.187 +} 92.188 +static inline void nf_conntrack_put_reasm(struct sk_buff *skb) 92.189 +{ 92.190 + if (skb) 92.191 + kfree_skb(skb); 92.192 +} 92.193 +#endif 92.194 static inline void nf_reset(struct sk_buff *skb) 92.195 { 92.196 nf_conntrack_put(skb->nfct); 92.197 skb->nfct = NULL; 92.198 +#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 92.199 + nf_conntrack_put_reasm(skb->nfct_reasm); 92.200 + skb->nfct_reasm = NULL; 92.201 +#endif 92.202 } 92.203 92.204 #ifdef CONFIG_BRIDGE_NETFILTER
93.1 --- a/linux-2.6-xen-sparse/kernel/irq/manage.c Wed Feb 01 17:06:16 2006 +0000 93.2 +++ b/linux-2.6-xen-sparse/kernel/irq/manage.c Wed Feb 01 18:00:19 2006 +0000 93.3 @@ -24,6 +24,7 @@ cpumask_t __cacheline_aligned pending_ir 93.4 93.5 /** 93.6 * synchronize_irq - wait for pending IRQ handlers (on other CPUs) 93.7 + * @irq: interrupt number to wait for 93.8 * 93.9 * This function waits for any pending IRQ handlers for this interrupt 93.10 * to complete before returning. If you use this function while 93.11 @@ -35,6 +36,9 @@ void synchronize_irq(unsigned int irq) 93.12 { 93.13 struct irq_desc *desc = irq_desc + irq; 93.14 93.15 + if (irq >= NR_IRQS) 93.16 + return; 93.17 + 93.18 while (desc->status & IRQ_INPROGRESS) 93.19 cpu_relax(); 93.20 } 93.21 @@ -59,6 +63,9 @@ void disable_irq_nosync(unsigned int irq 93.22 irq_desc_t *desc = irq_desc + irq; 93.23 unsigned long flags; 93.24 93.25 + if (irq >= NR_IRQS) 93.26 + return; 93.27 + 93.28 spin_lock_irqsave(&desc->lock, flags); 93.29 if (!desc->depth++) { 93.30 desc->status |= IRQ_DISABLED; 93.31 @@ -85,6 +92,9 @@ void disable_irq(unsigned int irq) 93.32 { 93.33 irq_desc_t *desc = irq_desc + irq; 93.34 93.35 + if (irq >= NR_IRQS) 93.36 + return; 93.37 + 93.38 disable_irq_nosync(irq); 93.39 if (desc->action) 93.40 synchronize_irq(irq); 93.41 @@ -107,6 +117,9 @@ void enable_irq(unsigned int irq) 93.42 irq_desc_t *desc = irq_desc + irq; 93.43 unsigned long flags; 93.44 93.45 + if (irq >= NR_IRQS) 93.46 + return; 93.47 + 93.48 spin_lock_irqsave(&desc->lock, flags); 93.49 switch (desc->depth) { 93.50 case 0: 93.51 @@ -167,6 +180,9 @@ int setup_irq(unsigned int irq, struct i 93.52 unsigned long flags; 93.53 int shared = 0; 93.54 93.55 + if (irq >= NR_IRQS) 93.56 + return -EINVAL; 93.57 + 93.58 if (desc->handler == &no_irq_type) 93.59 return -ENOSYS; 93.60 /*
94.1 --- a/linux-2.6-xen-sparse/lib/Kconfig.debug Wed Feb 01 17:06:16 2006 +0000 94.2 +++ b/linux-2.6-xen-sparse/lib/Kconfig.debug Wed Feb 01 18:00:19 2006 +0000 94.3 @@ -128,7 +128,7 @@ config DEBUG_HIGHMEM 94.4 config DEBUG_BUGVERBOSE 94.5 bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED 94.6 depends on BUG 94.7 - depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || (X86 && !X86_64) || FRV 94.8 + depends on ARM || ARM26 || M32R || M68K || SPARC32 || SPARC64 || X86_32 || FRV 94.9 default !EMBEDDED 94.10 help 94.11 Say Y here to make BUG() panics output the file name and line number 94.12 @@ -168,13 +168,34 @@ config DEBUG_FS 94.13 94.14 If unsure, say N. 94.15 94.16 +config DEBUG_VM 94.17 + bool "Debug VM" 94.18 + depends on DEBUG_KERNEL 94.19 + help 94.20 + Enable this to debug the virtual-memory system. 94.21 + 94.22 + If unsure, say N. 94.23 + 94.24 config FRAME_POINTER 94.25 bool "Compile the kernel with frame pointers" 94.26 depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML) 94.27 default y if DEBUG_INFO && UML 94.28 help 94.29 If you say Y here the resulting kernel image will be slightly larger 94.30 - and slower, but it might give very useful debugging information 94.31 - on some architectures or you use external debuggers. 94.32 + and slower, but it might give very useful debugging information on 94.33 + some architectures or if you use external debuggers. 94.34 If you don't debug the kernel, you can say N. 94.35 94.36 +config RCU_TORTURE_TEST 94.37 + tristate "torture tests for RCU" 94.38 + depends on DEBUG_KERNEL 94.39 + default n 94.40 + help 94.41 + This option provides a kernel module that runs torture tests 94.42 + on the RCU infrastructure. The kernel module may be built 94.43 + after the fact on the running kernel to be tested, if desired. 94.44 + 94.45 + Say Y here if you want RCU torture tests to start automatically 94.46 + at boot time (you probably don't). 94.47 + Say M if you want the RCU torture tests to build as a module. 94.48 + Say N if you are unsure.
95.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 95.2 +++ b/linux-2.6-xen-sparse/lib/Makefile Wed Feb 01 18:00:19 2006 +0000 95.3 @@ -0,0 +1,60 @@ 95.4 +# 95.5 +# Makefile for some libs needed in the kernel. 95.6 +# 95.7 + 95.8 +lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \ 95.9 + bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ 95.10 + idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ 95.11 + sha1.o 95.12 + 95.13 +lib-y += kobject.o kref.o kobject_uevent.o klist.o 95.14 + 95.15 +obj-y += sort.o parser.o halfmd4.o 95.16 + 95.17 +ifeq ($(CONFIG_DEBUG_KOBJECT),y) 95.18 +CFLAGS_kobject.o += -DDEBUG 95.19 +CFLAGS_kobject_uevent.o += -DDEBUG 95.20 +endif 95.21 + 95.22 +obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock_debug.o 95.23 +lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o 95.24 +lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o 95.25 +lib-$(CONFIG_SEMAPHORE_SLEEPERS) += semaphore-sleepers.o 95.26 +lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o 95.27 +obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o 95.28 +obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o 95.29 + 95.30 +ifneq ($(CONFIG_HAVE_DEC_LOCK),y) 95.31 + lib-y += dec_and_lock.o 95.32 +endif 95.33 + 95.34 +obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o 95.35 +obj-$(CONFIG_CRC16) += crc16.o 95.36 +obj-$(CONFIG_CRC32) += crc32.o 95.37 +obj-$(CONFIG_LIBCRC32C) += libcrc32c.o 95.38 +obj-$(CONFIG_GENERIC_IOMAP) += iomap.o 95.39 +obj-$(CONFIG_GENERIC_ALLOCATOR) += genalloc.o 95.40 + 95.41 +obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/ 95.42 +obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/ 95.43 +obj-$(CONFIG_REED_SOLOMON) += reed_solomon/ 95.44 + 95.45 +obj-$(CONFIG_TEXTSEARCH) += textsearch.o 95.46 +obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o 95.47 +obj-$(CONFIG_TEXTSEARCH_BM) += ts_bm.o 95.48 +obj-$(CONFIG_TEXTSEARCH_FSM) += ts_fsm.o 95.49 + 95.50 +ifneq ($(CONFIG_XEN),y) 95.51 +obj-$(CONFIG_SWIOTLB) += swiotlb.o 95.52 +endif 95.53 + 95.54 +hostprogs-y := gen_crc32table 95.55 +clean-files := crc32table.h 95.56 + 95.57 +$(obj)/crc32.o: $(obj)/crc32table.h 95.58 + 95.59 +quiet_cmd_crc32 = GEN $@ 95.60 + cmd_crc32 = $< > $@ 95.61 + 95.62 +$(obj)/crc32table.h: $(obj)/gen_crc32table 95.63 + $(call cmd,crc32)
96.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 96.2 +++ b/linux-2.6-xen-sparse/mm/Kconfig Wed Feb 01 18:00:19 2006 +0000 96.3 @@ -0,0 +1,137 @@ 96.4 +config SELECT_MEMORY_MODEL 96.5 + def_bool y 96.6 + depends on EXPERIMENTAL || ARCH_SELECT_MEMORY_MODEL 96.7 + 96.8 +choice 96.9 + prompt "Memory model" 96.10 + depends on SELECT_MEMORY_MODEL 96.11 + default DISCONTIGMEM_MANUAL if ARCH_DISCONTIGMEM_DEFAULT 96.12 + default SPARSEMEM_MANUAL if ARCH_SPARSEMEM_DEFAULT 96.13 + default FLATMEM_MANUAL 96.14 + 96.15 +config FLATMEM_MANUAL 96.16 + bool "Flat Memory" 96.17 + depends on !ARCH_DISCONTIGMEM_ENABLE || ARCH_FLATMEM_ENABLE 96.18 + help 96.19 + This option allows you to change some of the ways that 96.20 + Linux manages its memory internally. Most users will 96.21 + only have one option here: FLATMEM. This is normal 96.22 + and a correct option. 96.23 + 96.24 + Some users of more advanced features like NUMA and 96.25 + memory hotplug may have different options here. 96.26 + DISCONTIGMEM is an more mature, better tested system, 96.27 + but is incompatible with memory hotplug and may suffer 96.28 + decreased performance over SPARSEMEM. If unsure between 96.29 + "Sparse Memory" and "Discontiguous Memory", choose 96.30 + "Discontiguous Memory". 96.31 + 96.32 + If unsure, choose this option (Flat Memory) over any other. 96.33 + 96.34 +config DISCONTIGMEM_MANUAL 96.35 + bool "Discontiguous Memory" 96.36 + depends on ARCH_DISCONTIGMEM_ENABLE 96.37 + help 96.38 + This option provides enhanced support for discontiguous 96.39 + memory systems, over FLATMEM. These systems have holes 96.40 + in their physical address spaces, and this option provides 96.41 + more efficient handling of these holes. However, the vast 96.42 + majority of hardware has quite flat address spaces, and 96.43 + can have degraded performance from extra overhead that 96.44 + this option imposes. 96.45 + 96.46 + Many NUMA configurations will have this as the only option. 96.47 + 96.48 + If unsure, choose "Flat Memory" over this option. 96.49 + 96.50 +config SPARSEMEM_MANUAL 96.51 + bool "Sparse Memory" 96.52 + depends on ARCH_SPARSEMEM_ENABLE 96.53 + help 96.54 + This will be the only option for some systems, including 96.55 + memory hotplug systems. This is normal. 96.56 + 96.57 + For many other systems, this will be an alternative to 96.58 + "Discontiguous Memory". This option provides some potential 96.59 + performance benefits, along with decreased code complexity, 96.60 + but it is newer, and more experimental. 96.61 + 96.62 + If unsure, choose "Discontiguous Memory" or "Flat Memory" 96.63 + over this option. 96.64 + 96.65 +endchoice 96.66 + 96.67 +config DISCONTIGMEM 96.68 + def_bool y 96.69 + depends on (!SELECT_MEMORY_MODEL && ARCH_DISCONTIGMEM_ENABLE) || DISCONTIGMEM_MANUAL 96.70 + 96.71 +config SPARSEMEM 96.72 + def_bool y 96.73 + depends on SPARSEMEM_MANUAL 96.74 + 96.75 +config FLATMEM 96.76 + def_bool y 96.77 + depends on (!DISCONTIGMEM && !SPARSEMEM) || FLATMEM_MANUAL 96.78 + 96.79 +config FLAT_NODE_MEM_MAP 96.80 + def_bool y 96.81 + depends on !SPARSEMEM 96.82 + 96.83 +# 96.84 +# Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's 96.85 +# to represent different areas of memory. This variable allows 96.86 +# those dependencies to exist individually. 96.87 +# 96.88 +config NEED_MULTIPLE_NODES 96.89 + def_bool y 96.90 + depends on DISCONTIGMEM || NUMA 96.91 + 96.92 +config HAVE_MEMORY_PRESENT 96.93 + def_bool y 96.94 + depends on ARCH_HAVE_MEMORY_PRESENT || SPARSEMEM 96.95 + 96.96 +# 96.97 +# SPARSEMEM_EXTREME (which is the default) does some bootmem 96.98 +# allocations when memory_present() is called. If this can not 96.99 +# be done on your architecture, select this option. However, 96.100 +# statically allocating the mem_section[] array can potentially 96.101 +# consume vast quantities of .bss, so be careful. 96.102 +# 96.103 +# This option will also potentially produce smaller runtime code 96.104 +# with gcc 3.4 and later. 96.105 +# 96.106 +config SPARSEMEM_STATIC 96.107 + def_bool n 96.108 + 96.109 +# 96.110 +# Architectecture platforms which require a two level mem_section in SPARSEMEM 96.111 +# must select this option. This is usually for architecture platforms with 96.112 +# an extremely sparse physical address space. 96.113 +# 96.114 +config SPARSEMEM_EXTREME 96.115 + def_bool y 96.116 + depends on SPARSEMEM && !SPARSEMEM_STATIC 96.117 + 96.118 +# eventually, we can have this option just 'select SPARSEMEM' 96.119 +config MEMORY_HOTPLUG 96.120 + bool "Allow for memory hot-add" 96.121 + depends on SPARSEMEM && HOTPLUG && !SOFTWARE_SUSPEND 96.122 + 96.123 +comment "Memory hotplug is currently incompatible with Software Suspend" 96.124 + depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPEND 96.125 + 96.126 +# Heavily threaded applications may benefit from splitting the mm-wide 96.127 +# page_table_lock, so that faults on different parts of the user address 96.128 +# space can be handled with less contention: split it at this NR_CPUS. 96.129 +# Default to 4 for wider testing, though 8 might be more appropriate. 96.130 +# ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock. 96.131 +# PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes. 96.132 +# XEN uses the mapping field on pagetable pages to store a pointer to 96.133 +# the destructor. 96.134 +# 96.135 +config SPLIT_PTLOCK_CPUS 96.136 + int 96.137 + default "4096" if ARM && !CPU_CACHE_VIPT 96.138 + default "4096" if PARISC && !PA20 96.139 + default "4096" if XEN 96.140 + default "4"
97.1 --- a/linux-2.6-xen-sparse/mm/highmem.c Wed Feb 01 17:06:16 2006 +0000 97.2 +++ b/linux-2.6-xen-sparse/mm/highmem.c Wed Feb 01 18:00:19 2006 +0000 97.3 @@ -30,11 +30,9 @@ 97.4 97.5 static mempool_t *page_pool, *isa_page_pool; 97.6 97.7 -static void *page_pool_alloc(gfp_t gfp_mask, void *data) 97.8 +static void *page_pool_alloc_isa(gfp_t gfp_mask, void *data) 97.9 { 97.10 - unsigned int gfp = gfp_mask | (unsigned int) (long) data; 97.11 - 97.12 - return alloc_page(gfp); 97.13 + return alloc_page(gfp_mask | GFP_DMA); 97.14 } 97.15 97.16 static void page_pool_free(void *page, void *data) 97.17 @@ -51,6 +49,12 @@ static void page_pool_free(void *page, v 97.18 * n means that there are (n-1) current users of it. 97.19 */ 97.20 #ifdef CONFIG_HIGHMEM 97.21 + 97.22 +static void *page_pool_alloc(gfp_t gfp_mask, void *data) 97.23 +{ 97.24 + return alloc_page(gfp_mask); 97.25 +} 97.26 + 97.27 static int pkmap_count[LAST_PKMAP]; 97.28 static unsigned int last_pkmap_nr; 97.29 static __cacheline_aligned_in_smp DEFINE_SPINLOCK(kmap_lock); 97.30 @@ -278,7 +282,7 @@ int init_emergency_isa_pool(void) 97.31 if (isa_page_pool) 97.32 return 0; 97.33 97.34 - isa_page_pool = mempool_create(ISA_POOL_SIZE, page_pool_alloc, page_pool_free, (void *) __GFP_DMA); 97.35 + isa_page_pool = mempool_create(ISA_POOL_SIZE, page_pool_alloc_isa, page_pool_free, NULL); 97.36 if (!isa_page_pool) 97.37 BUG(); 97.38
98.1 --- a/linux-2.6-xen-sparse/mm/memory.c Wed Feb 01 17:06:16 2006 +0000 98.2 +++ b/linux-2.6-xen-sparse/mm/memory.c Wed Feb 01 18:00:19 2006 +0000 98.3 @@ -114,6 +114,7 @@ static void free_pte_range(struct mmu_ga 98.4 { 98.5 struct page *page = pmd_page(*pmd); 98.6 pmd_clear(pmd); 98.7 + pte_lock_deinit(page); 98.8 pte_free_tlb(tlb, page); 98.9 dec_page_state(nr_page_table_pages); 98.10 tlb->mm->nr_ptes--; 98.11 @@ -249,7 +250,7 @@ void free_pgd_range(struct mmu_gather ** 98.12 free_pud_range(*tlb, pgd, addr, next, floor, ceiling); 98.13 } while (pgd++, addr = next, addr != end); 98.14 98.15 - if (!tlb_is_full_mm(*tlb)) 98.16 + if (!(*tlb)->fullmm) 98.17 flush_tlb_pgtables((*tlb)->mm, start, end); 98.18 } 98.19 98.20 @@ -260,6 +261,12 @@ void free_pgtables(struct mmu_gather **t 98.21 struct vm_area_struct *next = vma->vm_next; 98.22 unsigned long addr = vma->vm_start; 98.23 98.24 + /* 98.25 + * Hide vma from rmap and vmtruncate before freeing pgtables 98.26 + */ 98.27 + anon_vma_unlink(vma); 98.28 + unlink_file_vma(vma); 98.29 + 98.30 if (is_hugepage_only_range(vma->vm_mm, addr, HPAGE_SIZE)) { 98.31 hugetlb_free_pgd_range(tlb, addr, vma->vm_end, 98.32 floor, next? next->vm_start: ceiling); 98.33 @@ -272,6 +279,8 @@ void free_pgtables(struct mmu_gather **t 98.34 HPAGE_SIZE)) { 98.35 vma = next; 98.36 next = vma->vm_next; 98.37 + anon_vma_unlink(vma); 98.38 + unlink_file_vma(vma); 98.39 } 98.40 free_pgd_range(tlb, addr, vma->vm_end, 98.41 floor, next? next->vm_start: ceiling); 98.42 @@ -280,75 +289,141 @@ void free_pgtables(struct mmu_gather **t 98.43 } 98.44 } 98.45 98.46 -pte_t fastcall *pte_alloc_map(struct mm_struct *mm, pmd_t *pmd, 98.47 - unsigned long address) 98.48 +int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address) 98.49 { 98.50 - if (!pmd_present(*pmd)) { 98.51 - struct page *new; 98.52 + struct page *new = pte_alloc_one(mm, address); 98.53 + if (!new) 98.54 + return -ENOMEM; 98.55 98.56 - spin_unlock(&mm->page_table_lock); 98.57 - new = pte_alloc_one(mm, address); 98.58 - spin_lock(&mm->page_table_lock); 98.59 - if (!new) 98.60 - return NULL; 98.61 - /* 98.62 - * Because we dropped the lock, we should re-check the 98.63 - * entry, as somebody else could have populated it.. 98.64 - */ 98.65 - if (pmd_present(*pmd)) { 98.66 - pte_free(new); 98.67 - goto out; 98.68 - } 98.69 + pte_lock_init(new); 98.70 + spin_lock(&mm->page_table_lock); 98.71 + if (pmd_present(*pmd)) { /* Another has populated it */ 98.72 + pte_lock_deinit(new); 98.73 + pte_free(new); 98.74 + } else { 98.75 mm->nr_ptes++; 98.76 inc_page_state(nr_page_table_pages); 98.77 pmd_populate(mm, pmd, new); 98.78 } 98.79 -out: 98.80 - return pte_offset_map(pmd, address); 98.81 + spin_unlock(&mm->page_table_lock); 98.82 + return 0; 98.83 } 98.84 98.85 -pte_t fastcall * pte_alloc_kernel(struct mm_struct *mm, pmd_t *pmd, unsigned long address) 98.86 +int __pte_alloc_kernel(pmd_t *pmd, unsigned long address) 98.87 { 98.88 - if (!pmd_present(*pmd)) { 98.89 - pte_t *new; 98.90 - 98.91 - spin_unlock(&mm->page_table_lock); 98.92 - new = pte_alloc_one_kernel(mm, address); 98.93 - spin_lock(&mm->page_table_lock); 98.94 - if (!new) 98.95 - return NULL; 98.96 + pte_t *new = pte_alloc_one_kernel(&init_mm, address); 98.97 + if (!new) 98.98 + return -ENOMEM; 98.99 98.100 - /* 98.101 - * Because we dropped the lock, we should re-check the 98.102 - * entry, as somebody else could have populated it.. 98.103 - */ 98.104 - if (pmd_present(*pmd)) { 98.105 - pte_free_kernel(new); 98.106 - goto out; 98.107 - } 98.108 - pmd_populate_kernel(mm, pmd, new); 98.109 + spin_lock(&init_mm.page_table_lock); 98.110 + if (pmd_present(*pmd)) /* Another has populated it */ 98.111 + pte_free_kernel(new); 98.112 + else 98.113 + pmd_populate_kernel(&init_mm, pmd, new); 98.114 + spin_unlock(&init_mm.page_table_lock); 98.115 + return 0; 98.116 +} 98.117 + 98.118 +static inline void add_mm_rss(struct mm_struct *mm, int file_rss, int anon_rss) 98.119 +{ 98.120 + if (file_rss) 98.121 + add_mm_counter(mm, file_rss, file_rss); 98.122 + if (anon_rss) 98.123 + add_mm_counter(mm, anon_rss, anon_rss); 98.124 +} 98.125 + 98.126 +/* 98.127 + * This function is called to print an error when a bad pte 98.128 + * is found. For example, we might have a PFN-mapped pte in 98.129 + * a region that doesn't allow it. 98.130 + * 98.131 + * The calling function must still handle the error. 98.132 + */ 98.133 +void print_bad_pte(struct vm_area_struct *vma, pte_t pte, unsigned long vaddr) 98.134 +{ 98.135 + printk(KERN_ERR "Bad pte = %08llx, process = %s, " 98.136 + "vm_flags = %lx, vaddr = %lx\n", 98.137 + (long long)pte_val(pte), 98.138 + (vma->vm_mm == current->mm ? current->comm : "???"), 98.139 + vma->vm_flags, vaddr); 98.140 + dump_stack(); 98.141 +} 98.142 + 98.143 +static inline int is_cow_mapping(unsigned int flags) 98.144 +{ 98.145 + return (flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE; 98.146 +} 98.147 + 98.148 +/* 98.149 + * This function gets the "struct page" associated with a pte. 98.150 + * 98.151 + * NOTE! Some mappings do not have "struct pages". A raw PFN mapping 98.152 + * will have each page table entry just pointing to a raw page frame 98.153 + * number, and as far as the VM layer is concerned, those do not have 98.154 + * pages associated with them - even if the PFN might point to memory 98.155 + * that otherwise is perfectly fine and has a "struct page". 98.156 + * 98.157 + * The way we recognize those mappings is through the rules set up 98.158 + * by "remap_pfn_range()": the vma will have the VM_PFNMAP bit set, 98.159 + * and the vm_pgoff will point to the first PFN mapped: thus every 98.160 + * page that is a raw mapping will always honor the rule 98.161 + * 98.162 + * pfn_of_page == vma->vm_pgoff + ((addr - vma->vm_start) >> PAGE_SHIFT) 98.163 + * 98.164 + * and if that isn't true, the page has been COW'ed (in which case it 98.165 + * _does_ have a "struct page" associated with it even if it is in a 98.166 + * VM_PFNMAP range). 98.167 + */ 98.168 +struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, pte_t pte) 98.169 +{ 98.170 + unsigned long pfn = pte_pfn(pte); 98.171 + 98.172 + if (vma->vm_flags & VM_PFNMAP) { 98.173 + unsigned long off = (addr - vma->vm_start) >> PAGE_SHIFT; 98.174 + if (pfn == vma->vm_pgoff + off) 98.175 + return NULL; 98.176 + if (!is_cow_mapping(vma->vm_flags)) 98.177 + return NULL; 98.178 } 98.179 -out: 98.180 - return pte_offset_kernel(pmd, address); 98.181 + 98.182 + /* 98.183 + * Add some anal sanity checks for now. Eventually, 98.184 + * we should just do "return pfn_to_page(pfn)", but 98.185 + * in the meantime we check that we get a valid pfn, 98.186 + * and that the resulting page looks ok. 98.187 + * 98.188 + * Remove this test eventually! 98.189 + */ 98.190 + if (unlikely(!pfn_valid(pfn))) { 98.191 + if (!vma->vm_flags & VM_RESERVED) 98.192 + print_bad_pte(vma, pte, addr); 98.193 + return NULL; 98.194 + } 98.195 + 98.196 + /* 98.197 + * NOTE! We still have PageReserved() pages in the page 98.198 + * tables. 98.199 + * 98.200 + * The PAGE_ZERO() pages and various VDSO mappings can 98.201 + * cause them to exist. 98.202 + */ 98.203 + return pfn_to_page(pfn); 98.204 } 98.205 98.206 /* 98.207 * copy one vm_area from one task to the other. Assumes the page tables 98.208 * already present in the new task to be cleared in the whole range 98.209 * covered by this vma. 98.210 - * 98.211 - * dst->page_table_lock is held on entry and exit, 98.212 - * but may be dropped within p[mg]d_alloc() and pte_alloc_map(). 98.213 */ 98.214 98.215 static inline void 98.216 copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, 98.217 - pte_t *dst_pte, pte_t *src_pte, unsigned long vm_flags, 98.218 - unsigned long addr) 98.219 + pte_t *dst_pte, pte_t *src_pte, struct vm_area_struct *vma, 98.220 + unsigned long addr, int *rss) 98.221 { 98.222 + unsigned long vm_flags = vma->vm_flags; 98.223 pte_t pte = *src_pte; 98.224 struct page *page; 98.225 - unsigned long pfn; 98.226 98.227 /* pte contains position in swap or file, so copy. */ 98.228 if (unlikely(!pte_present(pte))) { 98.229 @@ -357,34 +432,20 @@ copy_one_pte(struct mm_struct *dst_mm, s 98.230 /* make sure dst_mm is on swapoff's mmlist. */ 98.231 if (unlikely(list_empty(&dst_mm->mmlist))) { 98.232 spin_lock(&mmlist_lock); 98.233 - list_add(&dst_mm->mmlist, &src_mm->mmlist); 98.234 + if (list_empty(&dst_mm->mmlist)) 98.235 + list_add(&dst_mm->mmlist, 98.236 + &src_mm->mmlist); 98.237 spin_unlock(&mmlist_lock); 98.238 } 98.239 } 98.240 - set_pte_at(dst_mm, addr, dst_pte, pte); 98.241 - return; 98.242 - } 98.243 - 98.244 - pfn = pte_pfn(pte); 98.245 - /* the pte points outside of valid memory, the 98.246 - * mapping is assumed to be good, meaningful 98.247 - * and not mapped via rmap - duplicate the 98.248 - * mapping as is. 98.249 - */ 98.250 - page = NULL; 98.251 - if (pfn_valid(pfn)) 98.252 - page = pfn_to_page(pfn); 98.253 - 98.254 - if (!page || PageReserved(page)) { 98.255 - set_pte_at(dst_mm, addr, dst_pte, pte); 98.256 - return; 98.257 + goto out_set_pte; 98.258 } 98.259 98.260 /* 98.261 * If it's a COW mapping, write protect it both 98.262 * in the parent and the child 98.263 */ 98.264 - if ((vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE) { 98.265 + if (is_cow_mapping(vm_flags)) { 98.266 ptep_set_wrprotect(src_mm, addr, src_pte); 98.267 pte = *src_pte; 98.268 } 98.269 @@ -396,12 +457,16 @@ copy_one_pte(struct mm_struct *dst_mm, s 98.270 if (vm_flags & VM_SHARED) 98.271 pte = pte_mkclean(pte); 98.272 pte = pte_mkold(pte); 98.273 - get_page(page); 98.274 - inc_mm_counter(dst_mm, rss); 98.275 - if (PageAnon(page)) 98.276 - inc_mm_counter(dst_mm, anon_rss); 98.277 + 98.278 + page = vm_normal_page(vma, addr, pte); 98.279 + if (page) { 98.280 + get_page(page); 98.281 + page_dup_rmap(page); 98.282 + rss[!!PageAnon(page)]++; 98.283 + } 98.284 + 98.285 +out_set_pte: 98.286 set_pte_at(dst_mm, addr, dst_pte, pte); 98.287 - page_dup_rmap(page); 98.288 } 98.289 98.290 static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, 98.291 @@ -409,38 +474,44 @@ static int copy_pte_range(struct mm_stru 98.292 unsigned long addr, unsigned long end) 98.293 { 98.294 pte_t *src_pte, *dst_pte; 98.295 - unsigned long vm_flags = vma->vm_flags; 98.296 - int progress; 98.297 + spinlock_t *src_ptl, *dst_ptl; 98.298 + int progress = 0; 98.299 + int rss[2]; 98.300 98.301 again: 98.302 - dst_pte = pte_alloc_map(dst_mm, dst_pmd, addr); 98.303 + rss[1] = rss[0] = 0; 98.304 + dst_pte = pte_alloc_map_lock(dst_mm, dst_pmd, addr, &dst_ptl); 98.305 if (!dst_pte) 98.306 return -ENOMEM; 98.307 src_pte = pte_offset_map_nested(src_pmd, addr); 98.308 + src_ptl = pte_lockptr(src_mm, src_pmd); 98.309 + spin_lock(src_ptl); 98.310 98.311 - progress = 0; 98.312 - spin_lock(&src_mm->page_table_lock); 98.313 do { 98.314 /* 98.315 * We are holding two locks at this point - either of them 98.316 * could generate latencies in another task on another CPU. 98.317 */ 98.318 - if (progress >= 32 && (need_resched() || 98.319 - need_lockbreak(&src_mm->page_table_lock) || 98.320 - need_lockbreak(&dst_mm->page_table_lock))) 98.321 - break; 98.322 + if (progress >= 32) { 98.323 + progress = 0; 98.324 + if (need_resched() || 98.325 + need_lockbreak(src_ptl) || 98.326 + need_lockbreak(dst_ptl)) 98.327 + break; 98.328 + } 98.329 if (pte_none(*src_pte)) { 98.330 progress++; 98.331 continue; 98.332 } 98.333 - copy_one_pte(dst_mm, src_mm, dst_pte, src_pte, vm_flags, addr); 98.334 + copy_one_pte(dst_mm, src_mm, dst_pte, src_pte, vma, addr, rss); 98.335 progress += 8; 98.336 } while (dst_pte++, src_pte++, addr += PAGE_SIZE, addr != end); 98.337 - spin_unlock(&src_mm->page_table_lock); 98.338 98.339 + spin_unlock(src_ptl); 98.340 pte_unmap_nested(src_pte - 1); 98.341 - pte_unmap(dst_pte - 1); 98.342 - cond_resched_lock(&dst_mm->page_table_lock); 98.343 + add_mm_rss(dst_mm, rss[0], rss[1]); 98.344 + pte_unmap_unlock(dst_pte - 1, dst_ptl); 98.345 + cond_resched(); 98.346 if (addr != end) 98.347 goto again; 98.348 return 0; 98.349 @@ -504,7 +575,7 @@ int copy_page_range(struct mm_struct *ds 98.350 * readonly mappings. The tradeoff is that copy_page_range is more 98.351 * efficient than faulting. 98.352 */ 98.353 - if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_RESERVED))) { 98.354 + if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_PFNMAP|VM_INSERTPAGE))) { 98.355 if (!vma->anon_vma) 98.356 return 0; 98.357 } 98.358 @@ -525,25 +596,30 @@ int copy_page_range(struct mm_struct *ds 98.359 return 0; 98.360 } 98.361 98.362 -static void zap_pte_range(struct mmu_gather *tlb, pmd_t *pmd, 98.363 +static unsigned long zap_pte_range(struct mmu_gather *tlb, 98.364 + struct vm_area_struct *vma, pmd_t *pmd, 98.365 unsigned long addr, unsigned long end, 98.366 - struct zap_details *details) 98.367 + long *zap_work, struct zap_details *details) 98.368 { 98.369 + struct mm_struct *mm = tlb->mm; 98.370 pte_t *pte; 98.371 + spinlock_t *ptl; 98.372 + int file_rss = 0; 98.373 + int anon_rss = 0; 98.374 98.375 - pte = pte_offset_map(pmd, addr); 98.376 + pte = pte_offset_map_lock(mm, pmd, addr, &ptl); 98.377 do { 98.378 pte_t ptent = *pte; 98.379 - if (pte_none(ptent)) 98.380 + if (pte_none(ptent)) { 98.381 + (*zap_work)--; 98.382 continue; 98.383 + } 98.384 if (pte_present(ptent)) { 98.385 - struct page *page = NULL; 98.386 - unsigned long pfn = pte_pfn(ptent); 98.387 - if (pfn_valid(pfn)) { 98.388 - page = pfn_to_page(pfn); 98.389 - if (PageReserved(page)) 98.390 - page = NULL; 98.391 - } 98.392 + struct page *page; 98.393 + 98.394 + (*zap_work) -= PAGE_SIZE; 98.395 + 98.396 + page = vm_normal_page(vma, addr, ptent); 98.397 if (unlikely(details) && page) { 98.398 /* 98.399 * unmap_shared_mapping_pages() wants to 98.400 @@ -562,7 +638,7 @@ static void zap_pte_range(struct mmu_gat 98.401 page->index > details->last_index)) 98.402 continue; 98.403 } 98.404 - ptent = ptep_get_and_clear_full(tlb->mm, addr, pte, 98.405 + ptent = ptep_get_and_clear_full(mm, addr, pte, 98.406 tlb->fullmm); 98.407 tlb_remove_tlb_entry(tlb, pte, addr); 98.408 if (unlikely(!page)) 98.409 @@ -570,15 +646,17 @@ static void zap_pte_range(struct mmu_gat 98.410 if (unlikely(details) && details->nonlinear_vma 98.411 && linear_page_index(details->nonlinear_vma, 98.412 addr) != page->index) 98.413 - set_pte_at(tlb->mm, addr, pte, 98.414 + set_pte_at(mm, addr, pte, 98.415 pgoff_to_pte(page->index)); 98.416 - if (pte_dirty(ptent)) 98.417 - set_page_dirty(page); 98.418 if (PageAnon(page)) 98.419 - dec_mm_counter(tlb->mm, anon_rss); 98.420 - else if (pte_young(ptent)) 98.421 - mark_page_accessed(page); 98.422 - tlb->freed++; 98.423 + anon_rss--; 98.424 + else { 98.425 + if (pte_dirty(ptent)) 98.426 + set_page_dirty(page); 98.427 + if (pte_young(ptent)) 98.428 + mark_page_accessed(page); 98.429 + file_rss--; 98.430 + } 98.431 page_remove_rmap(page); 98.432 tlb_remove_page(tlb, page); 98.433 continue; 98.434 @@ -591,14 +669,19 @@ static void zap_pte_range(struct mmu_gat 98.435 continue; 98.436 if (!pte_file(ptent)) 98.437 free_swap_and_cache(pte_to_swp_entry(ptent)); 98.438 - pte_clear_full(tlb->mm, addr, pte, tlb->fullmm); 98.439 - } while (pte++, addr += PAGE_SIZE, addr != end); 98.440 - pte_unmap(pte - 1); 98.441 + pte_clear_full(mm, addr, pte, tlb->fullmm); 98.442 + } while (pte++, addr += PAGE_SIZE, (addr != end && *zap_work > 0)); 98.443 + 98.444 + add_mm_rss(mm, file_rss, anon_rss); 98.445 + pte_unmap_unlock(pte - 1, ptl); 98.446 + 98.447 + return addr; 98.448 } 98.449 98.450 -static inline void zap_pmd_range(struct mmu_gather *tlb, pud_t *pud, 98.451 +static inline unsigned long zap_pmd_range(struct mmu_gather *tlb, 98.452 + struct vm_area_struct *vma, pud_t *pud, 98.453 unsigned long addr, unsigned long end, 98.454 - struct zap_details *details) 98.455 + long *zap_work, struct zap_details *details) 98.456 { 98.457 pmd_t *pmd; 98.458 unsigned long next; 98.459 @@ -606,15 +689,21 @@ static inline void zap_pmd_range(struct 98.460 pmd = pmd_offset(pud, addr); 98.461 do { 98.462 next = pmd_addr_end(addr, end); 98.463 - if (pmd_none_or_clear_bad(pmd)) 98.464 + if (pmd_none_or_clear_bad(pmd)) { 98.465 + (*zap_work)--; 98.466 continue; 98.467 - zap_pte_range(tlb, pmd, addr, next, details); 98.468 - } while (pmd++, addr = next, addr != end); 98.469 + } 98.470 + next = zap_pte_range(tlb, vma, pmd, addr, next, 98.471 + zap_work, details); 98.472 + } while (pmd++, addr = next, (addr != end && *zap_work > 0)); 98.473 + 98.474 + return addr; 98.475 } 98.476 98.477 -static inline void zap_pud_range(struct mmu_gather *tlb, pgd_t *pgd, 98.478 +static inline unsigned long zap_pud_range(struct mmu_gather *tlb, 98.479 + struct vm_area_struct *vma, pgd_t *pgd, 98.480 unsigned long addr, unsigned long end, 98.481 - struct zap_details *details) 98.482 + long *zap_work, struct zap_details *details) 98.483 { 98.484 pud_t *pud; 98.485 unsigned long next; 98.486 @@ -622,15 +711,21 @@ static inline void zap_pud_range(struct 98.487 pud = pud_offset(pgd, addr); 98.488 do { 98.489 next = pud_addr_end(addr, end); 98.490 - if (pud_none_or_clear_bad(pud)) 98.491 + if (pud_none_or_clear_bad(pud)) { 98.492 + (*zap_work)--; 98.493 continue; 98.494 - zap_pmd_range(tlb, pud, addr, next, details); 98.495 - } while (pud++, addr = next, addr != end); 98.496 + } 98.497 + next = zap_pmd_range(tlb, vma, pud, addr, next, 98.498 + zap_work, details); 98.499 + } while (pud++, addr = next, (addr != end && *zap_work > 0)); 98.500 + 98.501 + return addr; 98.502 } 98.503 98.504 -static void unmap_page_range(struct mmu_gather *tlb, struct vm_area_struct *vma, 98.505 +static unsigned long unmap_page_range(struct mmu_gather *tlb, 98.506 + struct vm_area_struct *vma, 98.507 unsigned long addr, unsigned long end, 98.508 - struct zap_details *details) 98.509 + long *zap_work, struct zap_details *details) 98.510 { 98.511 pgd_t *pgd; 98.512 unsigned long next; 98.513 @@ -643,11 +738,16 @@ static void unmap_page_range(struct mmu_ 98.514 pgd = pgd_offset(vma->vm_mm, addr); 98.515 do { 98.516 next = pgd_addr_end(addr, end); 98.517 - if (pgd_none_or_clear_bad(pgd)) 98.518 + if (pgd_none_or_clear_bad(pgd)) { 98.519 + (*zap_work)--; 98.520 continue; 98.521 - zap_pud_range(tlb, pgd, addr, next, details); 98.522 - } while (pgd++, addr = next, addr != end); 98.523 + } 98.524 + next = zap_pud_range(tlb, vma, pgd, addr, next, 98.525 + zap_work, details); 98.526 + } while (pgd++, addr = next, (addr != end && *zap_work > 0)); 98.527 tlb_end_vma(tlb, vma); 98.528 + 98.529 + return addr; 98.530 } 98.531 98.532 #ifdef CONFIG_PREEMPT 98.533 @@ -660,7 +760,6 @@ static void unmap_page_range(struct mmu_ 98.534 /** 98.535 * unmap_vmas - unmap a range of memory covered by a list of vma's 98.536 * @tlbp: address of the caller's struct mmu_gather 98.537 - * @mm: the controlling mm_struct 98.538 * @vma: the starting vma 98.539 * @start_addr: virtual address at which to start unmapping 98.540 * @end_addr: virtual address at which to end unmapping 98.541 @@ -669,10 +768,10 @@ static void unmap_page_range(struct mmu_ 98.542 * 98.543 * Returns the end address of the unmapping (restart addr if interrupted). 98.544 * 98.545 - * Unmap all pages in the vma list. Called under page_table_lock. 98.546 + * Unmap all pages in the vma list. 98.547 * 98.548 - * We aim to not hold page_table_lock for too