aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-12-06 17:31:30 -0500
committerLen Brown <len.brown@intel.com>2005-12-06 17:31:30 -0500
commit3d5271f9883cba7b54762bc4fe027d4172f06db7 (patch)
treeab8a881a14478598a0c8bda0d26c62cdccfffd6d /arch/ia64
parent378b2556f4e09fa6f87ff0cb5c4395ff28257d02 (diff)
parent9115a6c787596e687df03010d97fccc5e0762506 (diff)
Pull release into acpica branch
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig133
-rw-r--r--arch/ia64/Kconfig.debug11
-rw-r--r--arch/ia64/configs/bigsur_defconfig395
-rw-r--r--arch/ia64/configs/gensparse_defconfig1319
-rw-r--r--arch/ia64/configs/sn2_defconfig2
-rw-r--r--arch/ia64/configs/tiger_defconfig86
-rw-r--r--arch/ia64/configs/zx1_defconfig92
-rw-r--r--arch/ia64/defconfig267
-rw-r--r--arch/ia64/hp/common/hwsw_iommu.c15
-rw-r--r--arch/ia64/hp/common/sba_iommu.c47
-rw-r--r--arch/ia64/hp/sim/simscsi.c42
-rw-r--r--arch/ia64/hp/sim/simserial.c6
-rw-r--r--arch/ia64/ia32/ia32_ioctl.c4
-rw-r--r--arch/ia64/ia32/sys_ia32.c1
-rw-r--r--arch/ia64/kernel/acpi.c13
-rw-r--r--arch/ia64/kernel/cyclone.c1
-rw-r--r--arch/ia64/kernel/efi.c510
-rw-r--r--arch/ia64/kernel/ia64_ksyms.c1
-rw-r--r--arch/ia64/kernel/irq.c12
-rw-r--r--arch/ia64/kernel/ivt.S142
-rw-r--r--arch/ia64/kernel/kprobes.c144
-rw-r--r--arch/ia64/kernel/mca.c129
-rw-r--r--arch/ia64/kernel/mca_asm.S96
-rw-r--r--arch/ia64/kernel/mca_drv.c39
-rw-r--r--arch/ia64/kernel/module.c6
-rw-r--r--arch/ia64/kernel/patch.c16
-rw-r--r--arch/ia64/kernel/perfmon.c5
-rw-r--r--arch/ia64/kernel/process.c42
-rw-r--r--arch/ia64/kernel/ptrace.c28
-rw-r--r--arch/ia64/kernel/setup.c71
-rw-r--r--arch/ia64/kernel/signal.c11
-rw-r--r--arch/ia64/kernel/smp.c10
-rw-r--r--arch/ia64/kernel/smpboot.c7
-rw-r--r--arch/ia64/kernel/time.c4
-rw-r--r--arch/ia64/kernel/traps.c62
-rw-r--r--arch/ia64/kernel/uncached.c17
-rw-r--r--arch/ia64/lib/Makefile2
-rw-r--r--arch/ia64/lib/swiotlb.c657
-rw-r--r--arch/ia64/mm/Makefile5
-rw-r--r--arch/ia64/mm/contig.c4
-rw-r--r--arch/ia64/mm/discontig.c69
-rw-r--r--arch/ia64/mm/fault.c34
-rw-r--r--arch/ia64/mm/init.c15
-rw-r--r--arch/ia64/mm/numa.c24
-rw-r--r--arch/ia64/mm/tlb.c100
-rw-r--r--arch/ia64/oprofile/Kconfig6
-rw-r--r--arch/ia64/pci/pci.c164
-rw-r--r--arch/ia64/sn/kernel/bte.c3
-rw-r--r--arch/ia64/sn/kernel/io_init.c6
-rw-r--r--arch/ia64/sn/kernel/setup.c317
-rw-r--r--arch/ia64/sn/kernel/sn2/sn2_smp.c34
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c7
-rw-r--r--arch/ia64/sn/kernel/tiocx.c67
-rw-r--r--arch/ia64/sn/kernel/xpc.h370
-rw-r--r--arch/ia64/sn/kernel/xpc_channel.c329
-rw-r--r--arch/ia64/sn/kernel/xpc_main.c432
-rw-r--r--arch/ia64/sn/kernel/xpc_partition.c483
-rw-r--r--arch/ia64/sn/pci/pci_dma.c48
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c4
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_reg.c59
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c32
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c36
62 files changed, 4838 insertions, 2255 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 945c15a0722b..b76ce1fe2e7f 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -26,6 +26,10 @@ config MMU
26 bool 26 bool
27 default y 27 default y
28 28
29config SWIOTLB
30 bool
31 default y
32
29config RWSEM_XCHGADD_ALGORITHM 33config RWSEM_XCHGADD_ALGORITHM
30 bool 34 bool
31 default y 35 default y
@@ -54,6 +58,10 @@ config IA64_UNCACHED_ALLOCATOR
54 bool 58 bool
55 select GENERIC_ALLOCATOR 59 select GENERIC_ALLOCATOR
56 60
61config ZONE_DMA_IS_DMA32
62 bool
63 default y
64
57choice 65choice
58 prompt "System type" 66 prompt "System type"
59 default IA64_GENERIC 67 default IA64_GENERIC
@@ -63,8 +71,6 @@ config IA64_GENERIC
63 select ACPI 71 select ACPI
64 select NUMA 72 select NUMA
65 select ACPI_NUMA 73 select ACPI_NUMA
66 select VIRTUAL_MEM_MAP
67 select DISCONTIGMEM
68 help 74 help
69 This selects the system type of your hardware. A "generic" kernel 75 This selects the system type of your hardware. A "generic" kernel
70 will run on any supported IA-64 system. However, if you configure 76 will run on any supported IA-64 system. However, if you configure
@@ -162,6 +168,19 @@ config IA64_PAGE_SIZE_64KB
162 168
163endchoice 169endchoice
164 170
171choice
172 prompt "Page Table Levels"
173 default PGTABLE_3
174
175config PGTABLE_3
176 bool "3 Levels"
177
178config PGTABLE_4
179 depends on !IA64_PAGE_SIZE_64KB
180 bool "4 Levels"
181
182endchoice
183
165source kernel/Kconfig.hz 184source kernel/Kconfig.hz
166 185
167config IA64_BRL_EMU 186config IA64_BRL_EMU
@@ -176,40 +195,6 @@ config IA64_L1_CACHE_SHIFT
176 default "6" if ITANIUM 195 default "6" if ITANIUM
177 196
178# align cache-sensitive data to 64 bytes 197# align cache-sensitive data to 64 bytes
179config NUMA
180 bool "NUMA support"
181 depends on !IA64_HP_SIM
182 default y if IA64_SGI_SN2
183 select ACPI_NUMA
184 help
185 Say Y to compile the kernel to support NUMA (Non-Uniform Memory
186 Access). This option is for configuring high-end multiprocessor
187 server systems. If in doubt, say N.
188
189config VIRTUAL_MEM_MAP
190 bool "Virtual mem map"
191 default y if !IA64_HP_SIM
192 help
193 Say Y to compile the kernel with support for a virtual mem map.
194 This code also only takes effect if a memory hole of greater than
195 1 Gb is found during boot. You must turn this option on if you
196 require the DISCONTIGMEM option for your machine. If you are
197 unsure, say Y.
198
199config HOLES_IN_ZONE
200 bool
201 default y if VIRTUAL_MEM_MAP
202
203config ARCH_DISCONTIGMEM_ENABLE
204 bool "Discontiguous memory support"
205 depends on (IA64_DIG || IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB) && NUMA && VIRTUAL_MEM_MAP
206 default y if (IA64_SGI_SN2 || IA64_GENERIC) && NUMA
207 help
208 Say Y to support efficient handling of discontiguous physical memory,
209 for architectures which are either NUMA (Non-Uniform Memory Access)
210 or have huge holes in the physical address space for other reasons.
211 See <file:Documentation/vm/numa> for more.
212
213config IA64_CYCLONE 198config IA64_CYCLONE
214 bool "Cyclone (EXA) Time Source support" 199 bool "Cyclone (EXA) Time Source support"
215 help 200 help
@@ -223,6 +208,7 @@ config IOSAPIC
223 208
224config IA64_SGI_SN_XP 209config IA64_SGI_SN_XP
225 tristate "Support communication between SGI SSIs" 210 tristate "Support communication between SGI SSIs"
211 depends on IA64_GENERIC || IA64_SGI_SN2
226 select IA64_UNCACHED_ALLOCATOR 212 select IA64_UNCACHED_ALLOCATOR
227 help 213 help
228 An SGI machine can be divided into multiple Single System 214 An SGI machine can be divided into multiple Single System
@@ -232,8 +218,10 @@ config IA64_SGI_SN_XP
232 based on a network adapter and DMA messaging. 218 based on a network adapter and DMA messaging.
233 219
234config FORCE_MAX_ZONEORDER 220config FORCE_MAX_ZONEORDER
235 int 221 int "MAX_ORDER (11 - 17)" if !HUGETLB_PAGE
236 default "18" 222 range 11 17 if !HUGETLB_PAGE
223 default "17" if HUGETLB_PAGE
224 default "11"
237 225
238config SMP 226config SMP
239 bool "Symmetric multi-processing support" 227 bool "Symmetric multi-processing support"
@@ -254,8 +242,8 @@ config SMP
254 If you don't know what to do here, say N. 242 If you don't know what to do here, say N.
255 243
256config NR_CPUS 244config NR_CPUS
257 int "Maximum number of CPUs (2-512)" 245 int "Maximum number of CPUs (2-1024)"
258 range 2 512 246 range 2 1024
259 depends on SMP 247 depends on SMP
260 default "64" 248 default "64"
261 help 249 help
@@ -298,6 +286,58 @@ config PREEMPT
298 286
299source "mm/Kconfig" 287source "mm/Kconfig"
300 288
289config ARCH_SELECT_MEMORY_MODEL
290 def_bool y
291
292config ARCH_DISCONTIGMEM_ENABLE
293 def_bool y
294 help
295 Say Y to support efficient handling of discontiguous physical memory,
296 for architectures which are either NUMA (Non-Uniform Memory Access)
297 or have huge holes in the physical address space for other reasons.
298 See <file:Documentation/vm/numa> for more.
299
300config ARCH_FLATMEM_ENABLE
301 def_bool y
302
303config ARCH_SPARSEMEM_ENABLE
304 def_bool y
305 depends on ARCH_DISCONTIGMEM_ENABLE
306
307config ARCH_DISCONTIGMEM_DEFAULT
308 def_bool y if (IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB)
309 depends on ARCH_DISCONTIGMEM_ENABLE
310
311config NUMA
312 bool "NUMA support"
313 depends on !IA64_HP_SIM && !FLATMEM
314 default y if IA64_SGI_SN2
315 help
316 Say Y to compile the kernel to support NUMA (Non-Uniform Memory
317 Access). This option is for configuring high-end multiprocessor
318 server systems. If in doubt, say N.
319
320# VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent.
321# VIRTUAL_MEM_MAP has been retained for historical reasons.
322config VIRTUAL_MEM_MAP
323 bool "Virtual mem map"
324 depends on !SPARSEMEM
325 default y if !IA64_HP_SIM
326 help
327 Say Y to compile the kernel with support for a virtual mem map.
328 This code also only takes effect if a memory hole of greater than
329 1 Gb is found during boot. You must turn this option on if you
330 require the DISCONTIGMEM option for your machine. If you are
331 unsure, say Y.
332
333config HOLES_IN_ZONE
334 bool
335 default y if VIRTUAL_MEM_MAP
336
337config HAVE_ARCH_EARLY_PFN_TO_NID
338 def_bool y
339 depends on NEED_MULTIPLE_NODES
340
301config IA32_SUPPORT 341config IA32_SUPPORT
302 bool "Support for Linux/x86 binaries" 342 bool "Support for Linux/x86 binaries"
303 help 343 help
@@ -404,8 +444,21 @@ config GENERIC_PENDING_IRQ
404 444
405source "arch/ia64/hp/sim/Kconfig" 445source "arch/ia64/hp/sim/Kconfig"
406 446
447menu "Instrumentation Support"
448 depends on EXPERIMENTAL
449
407source "arch/ia64/oprofile/Kconfig" 450source "arch/ia64/oprofile/Kconfig"
408 451
452config KPROBES
453 bool "Kprobes (EXPERIMENTAL)"
454 help
455 Kprobes allows you to trap at almost any kernel address and
456 execute a callback function. register_kprobe() establishes
457 a probepoint and specifies the callback. Kprobes is useful
458 for kernel debugging, non-intrusive instrumentation and testing.
459 If in doubt, say "N".
460endmenu
461
409source "arch/ia64/Kconfig.debug" 462source "arch/ia64/Kconfig.debug"
410 463
411source "security/Kconfig" 464source "security/Kconfig"
diff --git a/arch/ia64/Kconfig.debug b/arch/ia64/Kconfig.debug
index fda67ac993d7..de9d507ba0fd 100644
--- a/arch/ia64/Kconfig.debug
+++ b/arch/ia64/Kconfig.debug
@@ -2,17 +2,6 @@ menu "Kernel hacking"
2 2
3source "lib/Kconfig.debug" 3source "lib/Kconfig.debug"
4 4
5config KPROBES
6 bool "Kprobes"
7 depends on DEBUG_KERNEL
8 help
9 Kprobes allows you to trap at almost any kernel address and
10 execute a callback function. register_kprobe() establishes
11 a probepoint and specifies the callback. Kprobes is useful
12 for kernel debugging, non-intrusive instrumentation and testing.
13 If in doubt, say "N".
14
15
16choice 5choice
17 prompt "Physical memory granularity" 6 prompt "Physical memory granularity"
18 default IA64_GRANULE_64MB 7 default IA64_GRANULE_64MB
diff --git a/arch/ia64/configs/bigsur_defconfig b/arch/ia64/configs/bigsur_defconfig
index 3b65cbb31b1d..b40672bb3ab0 100644
--- a/arch/ia64/configs/bigsur_defconfig
+++ b/arch/ia64/configs/bigsur_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.10-rc2 3# Linux kernel version: 2.6.14-rc1
4# Mon Nov 29 13:27:48 2004 4# Wed Sep 14 15:18:49 2005
5# 5#
6 6
7# 7#
@@ -10,34 +10,40 @@
10CONFIG_EXPERIMENTAL=y 10CONFIG_EXPERIMENTAL=y
11CONFIG_CLEAN_COMPILE=y 11CONFIG_CLEAN_COMPILE=y
12CONFIG_LOCK_KERNEL=y 12CONFIG_LOCK_KERNEL=y
13CONFIG_INIT_ENV_ARG_LIMIT=32
13 14
14# 15#
15# General setup 16# General setup
16# 17#
17CONFIG_LOCALVERSION="" 18CONFIG_LOCALVERSION=""
19CONFIG_LOCALVERSION_AUTO=y
18CONFIG_SWAP=y 20CONFIG_SWAP=y
19CONFIG_SYSVIPC=y 21CONFIG_SYSVIPC=y
20CONFIG_POSIX_MQUEUE=y 22CONFIG_POSIX_MQUEUE=y
21# CONFIG_BSD_PROCESS_ACCT is not set 23# CONFIG_BSD_PROCESS_ACCT is not set
22CONFIG_SYSCTL=y 24CONFIG_SYSCTL=y
23# CONFIG_AUDIT is not set 25# CONFIG_AUDIT is not set
24CONFIG_LOG_BUF_SHIFT=16
25CONFIG_HOTPLUG=y 26CONFIG_HOTPLUG=y
26CONFIG_KOBJECT_UEVENT=y 27CONFIG_KOBJECT_UEVENT=y
27# CONFIG_IKCONFIG is not set 28# CONFIG_IKCONFIG is not set
29# CONFIG_CPUSETS is not set
30CONFIG_INITRAMFS_SOURCE=""
28# CONFIG_EMBEDDED is not set 31# CONFIG_EMBEDDED is not set
29CONFIG_KALLSYMS=y 32CONFIG_KALLSYMS=y
30# CONFIG_KALLSYMS_ALL is not set 33# CONFIG_KALLSYMS_ALL is not set
31# CONFIG_KALLSYMS_EXTRA_PASS is not set 34# CONFIG_KALLSYMS_EXTRA_PASS is not set
35CONFIG_PRINTK=y
36CONFIG_BUG=y
37CONFIG_BASE_FULL=y
32CONFIG_FUTEX=y 38CONFIG_FUTEX=y
33CONFIG_EPOLL=y 39CONFIG_EPOLL=y
34# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
35CONFIG_SHMEM=y 40CONFIG_SHMEM=y
36CONFIG_CC_ALIGN_FUNCTIONS=0 41CONFIG_CC_ALIGN_FUNCTIONS=0
37CONFIG_CC_ALIGN_LABELS=0 42CONFIG_CC_ALIGN_LABELS=0
38CONFIG_CC_ALIGN_LOOPS=0 43CONFIG_CC_ALIGN_LOOPS=0
39CONFIG_CC_ALIGN_JUMPS=0 44CONFIG_CC_ALIGN_JUMPS=0
40# CONFIG_TINY_SHMEM is not set 45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
41 47
42# 48#
43# Loadable module support 49# Loadable module support
@@ -58,12 +64,15 @@ CONFIG_IA64=y
58CONFIG_64BIT=y 64CONFIG_64BIT=y
59CONFIG_MMU=y 65CONFIG_MMU=y
60CONFIG_RWSEM_XCHGADD_ALGORITHM=y 66CONFIG_RWSEM_XCHGADD_ALGORITHM=y
67CONFIG_GENERIC_CALIBRATE_DELAY=y
61CONFIG_TIME_INTERPOLATION=y 68CONFIG_TIME_INTERPOLATION=y
62CONFIG_EFI=y 69CONFIG_EFI=y
63CONFIG_GENERIC_IOMAP=y 70CONFIG_GENERIC_IOMAP=y
71CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
64# CONFIG_IA64_GENERIC is not set 72# CONFIG_IA64_GENERIC is not set
65CONFIG_IA64_DIG=y 73CONFIG_IA64_DIG=y
66# CONFIG_IA64_HP_ZX1 is not set 74# CONFIG_IA64_HP_ZX1 is not set
75# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
67# CONFIG_IA64_SGI_SN2 is not set 76# CONFIG_IA64_SGI_SN2 is not set
68# CONFIG_IA64_HP_SIM is not set 77# CONFIG_IA64_HP_SIM is not set
69CONFIG_ITANIUM=y 78CONFIG_ITANIUM=y
@@ -72,17 +81,30 @@ CONFIG_ITANIUM=y
72# CONFIG_IA64_PAGE_SIZE_8KB is not set 81# CONFIG_IA64_PAGE_SIZE_8KB is not set
73CONFIG_IA64_PAGE_SIZE_16KB=y 82CONFIG_IA64_PAGE_SIZE_16KB=y
74# CONFIG_IA64_PAGE_SIZE_64KB is not set 83# CONFIG_IA64_PAGE_SIZE_64KB is not set
84# CONFIG_HZ_100 is not set
85CONFIG_HZ_250=y
86# CONFIG_HZ_1000 is not set
87CONFIG_HZ=250
75CONFIG_IA64_BRL_EMU=y 88CONFIG_IA64_BRL_EMU=y
76CONFIG_IA64_L1_CACHE_SHIFT=6 89CONFIG_IA64_L1_CACHE_SHIFT=6
77# CONFIG_NUMA is not set 90# CONFIG_NUMA is not set
78# CONFIG_VIRTUAL_MEM_MAP is not set 91# CONFIG_VIRTUAL_MEM_MAP is not set
79# CONFIG_IA64_CYCLONE is not set 92# CONFIG_IA64_CYCLONE is not set
80CONFIG_IOSAPIC=y 93CONFIG_IOSAPIC=y
94# CONFIG_IA64_SGI_SN_XP is not set
81CONFIG_FORCE_MAX_ZONEORDER=18 95CONFIG_FORCE_MAX_ZONEORDER=18
82CONFIG_SMP=y 96CONFIG_SMP=y
83CONFIG_NR_CPUS=2 97CONFIG_NR_CPUS=2
84# CONFIG_HOTPLUG_CPU is not set 98# CONFIG_HOTPLUG_CPU is not set
99# CONFIG_SCHED_SMT is not set
85CONFIG_PREEMPT=y 100CONFIG_PREEMPT=y
101CONFIG_SELECT_MEMORY_MODEL=y
102CONFIG_FLATMEM_MANUAL=y
103# CONFIG_DISCONTIGMEM_MANUAL is not set
104# CONFIG_SPARSEMEM_MANUAL is not set
105CONFIG_FLATMEM=y
106CONFIG_FLAT_NODE_MEM_MAP=y
107# CONFIG_SPARSEMEM_STATIC is not set
86CONFIG_HAVE_DEC_LOCK=y 108CONFIG_HAVE_DEC_LOCK=y
87CONFIG_IA32_SUPPORT=y 109CONFIG_IA32_SUPPORT=y
88CONFIG_COMPAT=y 110CONFIG_COMPAT=y
@@ -95,6 +117,7 @@ CONFIG_IA64_PALINFO=y
95# 117#
96CONFIG_EFI_VARS=y 118CONFIG_EFI_VARS=y
97CONFIG_EFI_PCDP=y 119CONFIG_EFI_PCDP=y
120# CONFIG_DELL_RBU is not set
98CONFIG_BINFMT_ELF=y 121CONFIG_BINFMT_ELF=y
99CONFIG_BINFMT_MISC=m 122CONFIG_BINFMT_MISC=m
100 123
@@ -102,18 +125,26 @@ CONFIG_BINFMT_MISC=m
102# Power management and ACPI 125# Power management and ACPI
103# 126#
104CONFIG_PM=y 127CONFIG_PM=y
105CONFIG_ACPI=y 128# CONFIG_PM_DEBUG is not set
106 129
107# 130#
108# ACPI (Advanced Configuration and Power Interface) Support 131# ACPI (Advanced Configuration and Power Interface) Support
109# 132#
133CONFIG_ACPI=y
110CONFIG_ACPI_BUTTON=m 134CONFIG_ACPI_BUTTON=m
111CONFIG_ACPI_FAN=m 135CONFIG_ACPI_FAN=m
112CONFIG_ACPI_PROCESSOR=m 136CONFIG_ACPI_PROCESSOR=m
113CONFIG_ACPI_THERMAL=m 137CONFIG_ACPI_THERMAL=m
138CONFIG_ACPI_BLACKLIST_YEAR=0
114# CONFIG_ACPI_DEBUG is not set 139# CONFIG_ACPI_DEBUG is not set
115CONFIG_ACPI_POWER=y 140CONFIG_ACPI_POWER=y
116CONFIG_ACPI_SYSTEM=y 141CONFIG_ACPI_SYSTEM=y
142# CONFIG_ACPI_CONTAINER is not set
143
144#
145# CPU Frequency scaling
146#
147# CONFIG_CPU_FREQ is not set
117 148
118# 149#
119# Bus options (PCI, PCMCIA) 150# Bus options (PCI, PCMCIA)
@@ -122,7 +153,7 @@ CONFIG_PCI=y
122CONFIG_PCI_DOMAINS=y 153CONFIG_PCI_DOMAINS=y
123# CONFIG_PCI_MSI is not set 154# CONFIG_PCI_MSI is not set
124CONFIG_PCI_LEGACY_PROC=y 155CONFIG_PCI_LEGACY_PROC=y
125CONFIG_PCI_NAMES=y 156# CONFIG_PCI_DEBUG is not set
126 157
127# 158#
128# PCI Hotplug Support 159# PCI Hotplug Support
@@ -135,8 +166,70 @@ CONFIG_PCI_NAMES=y
135# CONFIG_PCCARD is not set 166# CONFIG_PCCARD is not set
136 167
137# 168#
138# PC-card bridges 169# Networking
170#
171CONFIG_NET=y
172
173#
174# Networking options
175#
176CONFIG_PACKET=y
177CONFIG_PACKET_MMAP=y
178CONFIG_UNIX=y
179# CONFIG_NET_KEY is not set
180CONFIG_INET=y
181# CONFIG_IP_MULTICAST is not set
182# CONFIG_IP_ADVANCED_ROUTER is not set
183CONFIG_IP_FIB_HASH=y
184# CONFIG_IP_PNP is not set
185# CONFIG_NET_IPIP is not set
186# CONFIG_NET_IPGRE is not set
187# CONFIG_ARPD is not set
188# CONFIG_SYN_COOKIES is not set
189# CONFIG_INET_AH is not set
190# CONFIG_INET_ESP is not set
191# CONFIG_INET_IPCOMP is not set
192# CONFIG_INET_TUNNEL is not set
193CONFIG_INET_DIAG=y
194CONFIG_INET_TCP_DIAG=y
195# CONFIG_TCP_CONG_ADVANCED is not set
196CONFIG_TCP_CONG_BIC=y
197# CONFIG_IPV6 is not set
198# CONFIG_NETFILTER is not set
199
200#
201# DCCP Configuration (EXPERIMENTAL)
202#
203# CONFIG_IP_DCCP is not set
204
205#
206# SCTP Configuration (EXPERIMENTAL)
207#
208# CONFIG_IP_SCTP is not set
209# CONFIG_ATM is not set
210# CONFIG_BRIDGE is not set
211# CONFIG_VLAN_8021Q is not set
212# CONFIG_DECNET is not set
213# CONFIG_LLC2 is not set
214# CONFIG_IPX is not set
215# CONFIG_ATALK is not set
216# CONFIG_X25 is not set
217# CONFIG_LAPB is not set
218# CONFIG_NET_DIVERT is not set
219# CONFIG_ECONET is not set
220# CONFIG_WAN_ROUTER is not set
221# CONFIG_NET_SCHED is not set
222# CONFIG_NET_CLS_ROUTE is not set
223
224#
225# Network testing
139# 226#
227# CONFIG_NET_PKTGEN is not set
228# CONFIG_NETFILTER_NETLINK is not set
229# CONFIG_HAMRADIO is not set
230# CONFIG_IRDA is not set
231# CONFIG_BT is not set
232# CONFIG_IEEE80211 is not set
140 233
141# 234#
142# Device Drivers 235# Device Drivers
@@ -151,6 +244,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
151# CONFIG_DEBUG_DRIVER is not set 244# CONFIG_DEBUG_DRIVER is not set
152 245
153# 246#
247# Connector - unified userspace <-> kernelspace linker
248#
249# CONFIG_CONNECTOR is not set
250
251#
154# Memory Technology Devices (MTD) 252# Memory Technology Devices (MTD)
155# 253#
156# CONFIG_MTD is not set 254# CONFIG_MTD is not set
@@ -163,7 +261,13 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
163# 261#
164# Plug and Play support 262# Plug and Play support
165# 263#
166# CONFIG_PNP is not set 264CONFIG_PNP=y
265# CONFIG_PNP_DEBUG is not set
266
267#
268# Protocols
269#
270CONFIG_PNPACPI=y
167 271
168# 272#
169# Block devices 273# Block devices
@@ -172,14 +276,15 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
172# CONFIG_BLK_CPQ_CISS_DA is not set 276# CONFIG_BLK_CPQ_CISS_DA is not set
173# CONFIG_BLK_DEV_DAC960 is not set 277# CONFIG_BLK_DEV_DAC960 is not set
174# CONFIG_BLK_DEV_UMEM is not set 278# CONFIG_BLK_DEV_UMEM is not set
279# CONFIG_BLK_DEV_COW_COMMON is not set
175CONFIG_BLK_DEV_LOOP=m 280CONFIG_BLK_DEV_LOOP=m
176CONFIG_BLK_DEV_CRYPTOLOOP=m 281CONFIG_BLK_DEV_CRYPTOLOOP=m
177CONFIG_BLK_DEV_NBD=m 282CONFIG_BLK_DEV_NBD=m
178# CONFIG_BLK_DEV_SX8 is not set 283# CONFIG_BLK_DEV_SX8 is not set
179# CONFIG_BLK_DEV_UB is not set 284# CONFIG_BLK_DEV_UB is not set
180CONFIG_BLK_DEV_RAM=m 285CONFIG_BLK_DEV_RAM=m
286CONFIG_BLK_DEV_RAM_COUNT=16
181CONFIG_BLK_DEV_RAM_SIZE=4096 287CONFIG_BLK_DEV_RAM_SIZE=4096
182CONFIG_INITRAMFS_SOURCE=""
183# CONFIG_CDROM_PKTCDVD is not set 288# CONFIG_CDROM_PKTCDVD is not set
184 289
185# 290#
@@ -189,6 +294,7 @@ CONFIG_IOSCHED_NOOP=y
189CONFIG_IOSCHED_AS=y 294CONFIG_IOSCHED_AS=y
190CONFIG_IOSCHED_DEADLINE=y 295CONFIG_IOSCHED_DEADLINE=y
191CONFIG_IOSCHED_CFQ=y 296CONFIG_IOSCHED_CFQ=y
297# CONFIG_ATA_OVER_ETH is not set
192 298
193# 299#
194# ATA/ATAPI/MFM/RLL support 300# ATA/ATAPI/MFM/RLL support
@@ -211,7 +317,8 @@ CONFIG_BLK_DEV_IDEFLOPPY=m
211# 317#
212# IDE chipset support/bugfixes 318# IDE chipset support/bugfixes
213# 319#
214CONFIG_IDE_GENERIC=m 320# CONFIG_IDE_GENERIC is not set
321# CONFIG_BLK_DEV_IDEPNP is not set
215CONFIG_BLK_DEV_IDEPCI=y 322CONFIG_BLK_DEV_IDEPCI=y
216CONFIG_IDEPCI_SHARE_IRQ=y 323CONFIG_IDEPCI_SHARE_IRQ=y
217# CONFIG_BLK_DEV_OFFBOARD is not set 324# CONFIG_BLK_DEV_OFFBOARD is not set
@@ -233,6 +340,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
233# CONFIG_BLK_DEV_HPT366 is not set 340# CONFIG_BLK_DEV_HPT366 is not set
234# CONFIG_BLK_DEV_SC1200 is not set 341# CONFIG_BLK_DEV_SC1200 is not set
235CONFIG_BLK_DEV_PIIX=m 342CONFIG_BLK_DEV_PIIX=m
343# CONFIG_BLK_DEV_IT821X is not set
236# CONFIG_BLK_DEV_NS87415 is not set 344# CONFIG_BLK_DEV_NS87415 is not set
237# CONFIG_BLK_DEV_PDC202XX_OLD is not set 345# CONFIG_BLK_DEV_PDC202XX_OLD is not set
238# CONFIG_BLK_DEV_PDC202XX_NEW is not set 346# CONFIG_BLK_DEV_PDC202XX_NEW is not set
@@ -250,6 +358,7 @@ CONFIG_IDEDMA_AUTO=y
250# 358#
251# SCSI device support 359# SCSI device support
252# 360#
361# CONFIG_RAID_ATTRS is not set
253CONFIG_SCSI=y 362CONFIG_SCSI=y
254CONFIG_SCSI_PROC_FS=y 363CONFIG_SCSI_PROC_FS=y
255 364
@@ -261,6 +370,7 @@ CONFIG_BLK_DEV_SD=y
261# CONFIG_CHR_DEV_OSST is not set 370# CONFIG_CHR_DEV_OSST is not set
262# CONFIG_BLK_DEV_SR is not set 371# CONFIG_BLK_DEV_SR is not set
263# CONFIG_CHR_DEV_SG is not set 372# CONFIG_CHR_DEV_SG is not set
373# CONFIG_CHR_DEV_SCH is not set
264 374
265# 375#
266# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 376# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -274,6 +384,8 @@ CONFIG_SCSI_LOGGING=y
274# 384#
275CONFIG_SCSI_SPI_ATTRS=m 385CONFIG_SCSI_SPI_ATTRS=m
276# CONFIG_SCSI_FC_ATTRS is not set 386# CONFIG_SCSI_FC_ATTRS is not set
387# CONFIG_SCSI_ISCSI_ATTRS is not set
388# CONFIG_SCSI_SAS_ATTRS is not set
277 389
278# 390#
279# SCSI low-level drivers 391# SCSI low-level drivers
@@ -288,18 +400,13 @@ CONFIG_SCSI_SPI_ATTRS=m
288# CONFIG_MEGARAID_NEWGEN is not set 400# CONFIG_MEGARAID_NEWGEN is not set
289# CONFIG_MEGARAID_LEGACY is not set 401# CONFIG_MEGARAID_LEGACY is not set
290# CONFIG_SCSI_SATA is not set 402# CONFIG_SCSI_SATA is not set
291# CONFIG_SCSI_BUSLOGIC is not set
292# CONFIG_SCSI_DMX3191D is not set 403# CONFIG_SCSI_DMX3191D is not set
293# CONFIG_SCSI_EATA is not set
294# CONFIG_SCSI_EATA_PIO is not set
295# CONFIG_SCSI_FUTURE_DOMAIN is not set 404# CONFIG_SCSI_FUTURE_DOMAIN is not set
296# CONFIG_SCSI_GDTH is not set
297# CONFIG_SCSI_IPS is not set 405# CONFIG_SCSI_IPS is not set
298# CONFIG_SCSI_INITIO is not set 406# CONFIG_SCSI_INITIO is not set
299# CONFIG_SCSI_INIA100 is not set 407# CONFIG_SCSI_INIA100 is not set
300# CONFIG_SCSI_SYM53C8XX_2 is not set 408# CONFIG_SCSI_SYM53C8XX_2 is not set
301# CONFIG_SCSI_IPR is not set 409# CONFIG_SCSI_IPR is not set
302# CONFIG_SCSI_QLOGIC_ISP is not set
303# CONFIG_SCSI_QLOGIC_FC is not set 410# CONFIG_SCSI_QLOGIC_FC is not set
304CONFIG_SCSI_QLOGIC_1280=y 411CONFIG_SCSI_QLOGIC_1280=y
305# CONFIG_SCSI_QLOGIC_1280_1040 is not set 412# CONFIG_SCSI_QLOGIC_1280_1040 is not set
@@ -309,7 +416,8 @@ CONFIG_SCSI_QLA2XXX=y
309# CONFIG_SCSI_QLA2300 is not set 416# CONFIG_SCSI_QLA2300 is not set
310# CONFIG_SCSI_QLA2322 is not set 417# CONFIG_SCSI_QLA2322 is not set
311# CONFIG_SCSI_QLA6312 is not set 418# CONFIG_SCSI_QLA6312 is not set
312# CONFIG_SCSI_QLA6322 is not set 419# CONFIG_SCSI_QLA24XX is not set
420# CONFIG_SCSI_LPFC is not set
313# CONFIG_SCSI_DC395x is not set 421# CONFIG_SCSI_DC395x is not set
314# CONFIG_SCSI_DC390T is not set 422# CONFIG_SCSI_DC390T is not set
315# CONFIG_SCSI_DEBUG is not set 423# CONFIG_SCSI_DEBUG is not set
@@ -332,11 +440,14 @@ CONFIG_DM_CRYPT=m
332CONFIG_DM_SNAPSHOT=m 440CONFIG_DM_SNAPSHOT=m
333CONFIG_DM_MIRROR=m 441CONFIG_DM_MIRROR=m
334CONFIG_DM_ZERO=m 442CONFIG_DM_ZERO=m
443# CONFIG_DM_MULTIPATH is not set
335 444
336# 445#
337# Fusion MPT device support 446# Fusion MPT device support
338# 447#
339# CONFIG_FUSION is not set 448# CONFIG_FUSION is not set
449# CONFIG_FUSION_SPI is not set
450# CONFIG_FUSION_FC is not set
340 451
341# 452#
342# IEEE 1394 (FireWire) support 453# IEEE 1394 (FireWire) support
@@ -349,72 +460,14 @@ CONFIG_DM_ZERO=m
349# CONFIG_I2O is not set 460# CONFIG_I2O is not set
350 461
351# 462#
352# Networking support 463# Network device support
353# 464#
354CONFIG_NET=y
355
356#
357# Networking options
358#
359CONFIG_PACKET=y
360CONFIG_PACKET_MMAP=y
361# CONFIG_NETLINK_DEV is not set
362CONFIG_UNIX=y
363# CONFIG_NET_KEY is not set
364CONFIG_INET=y
365# CONFIG_IP_MULTICAST is not set
366# CONFIG_IP_ADVANCED_ROUTER is not set
367# CONFIG_IP_PNP is not set
368# CONFIG_NET_IPIP is not set
369# CONFIG_NET_IPGRE is not set
370# CONFIG_ARPD is not set
371# CONFIG_SYN_COOKIES is not set
372# CONFIG_INET_AH is not set
373# CONFIG_INET_ESP is not set
374# CONFIG_INET_IPCOMP is not set
375# CONFIG_INET_TUNNEL is not set
376CONFIG_IP_TCPDIAG=y
377# CONFIG_IP_TCPDIAG_IPV6 is not set
378# CONFIG_IPV6 is not set
379# CONFIG_NETFILTER is not set
380
381#
382# SCTP Configuration (EXPERIMENTAL)
383#
384# CONFIG_IP_SCTP is not set
385# CONFIG_ATM is not set
386# CONFIG_BRIDGE is not set
387# CONFIG_VLAN_8021Q is not set
388# CONFIG_DECNET is not set
389# CONFIG_LLC2 is not set
390# CONFIG_IPX is not set
391# CONFIG_ATALK is not set
392# CONFIG_X25 is not set
393# CONFIG_LAPB is not set
394# CONFIG_NET_DIVERT is not set
395# CONFIG_ECONET is not set
396# CONFIG_WAN_ROUTER is not set
397
398#
399# QoS and/or fair queueing
400#
401# CONFIG_NET_SCHED is not set
402# CONFIG_NET_CLS_ROUTE is not set
403
404#
405# Network testing
406#
407# CONFIG_NET_PKTGEN is not set
408# CONFIG_NETPOLL is not set
409# CONFIG_NET_POLL_CONTROLLER is not set
410# CONFIG_HAMRADIO is not set
411# CONFIG_IRDA is not set
412# CONFIG_BT is not set
413CONFIG_NETDEVICES=y 465CONFIG_NETDEVICES=y
414CONFIG_DUMMY=y 466CONFIG_DUMMY=y
415# CONFIG_BONDING is not set 467# CONFIG_BONDING is not set
416# CONFIG_EQUALIZER is not set 468# CONFIG_EQUALIZER is not set
417# CONFIG_TUN is not set 469# CONFIG_TUN is not set
470# CONFIG_NET_SB1000 is not set
418 471
419# 472#
420# ARCnet devices 473# ARCnet devices
@@ -422,6 +475,11 @@ CONFIG_DUMMY=y
422# CONFIG_ARCNET is not set 475# CONFIG_ARCNET is not set
423 476
424# 477#
478# PHY device support
479#
480# CONFIG_PHYLIB is not set
481
482#
425# Ethernet (10 or 100Mbit) 483# Ethernet (10 or 100Mbit)
426# 484#
427CONFIG_NET_ETHERNET=y 485CONFIG_NET_ETHERNET=y
@@ -443,7 +501,6 @@ CONFIG_NET_PCI=y
443# CONFIG_FORCEDETH is not set 501# CONFIG_FORCEDETH is not set
444# CONFIG_DGRS is not set 502# CONFIG_DGRS is not set
445CONFIG_EEPRO100=y 503CONFIG_EEPRO100=y
446# CONFIG_EEPRO100_PIO is not set
447# CONFIG_E100 is not set 504# CONFIG_E100 is not set
448# CONFIG_FEALNX is not set 505# CONFIG_FEALNX is not set
449# CONFIG_NATSEMI is not set 506# CONFIG_NATSEMI is not set
@@ -465,13 +522,17 @@ CONFIG_EEPRO100=y
465# CONFIG_HAMACHI is not set 522# CONFIG_HAMACHI is not set
466# CONFIG_YELLOWFIN is not set 523# CONFIG_YELLOWFIN is not set
467# CONFIG_R8169 is not set 524# CONFIG_R8169 is not set
525# CONFIG_SIS190 is not set
526# CONFIG_SKGE is not set
468# CONFIG_SK98LIN is not set 527# CONFIG_SK98LIN is not set
469# CONFIG_VIA_VELOCITY is not set 528# CONFIG_VIA_VELOCITY is not set
470# CONFIG_TIGON3 is not set 529# CONFIG_TIGON3 is not set
530# CONFIG_BNX2 is not set
471 531
472# 532#
473# Ethernet (10000 Mbit) 533# Ethernet (10000 Mbit)
474# 534#
535# CONFIG_CHELSIO_T1 is not set
475# CONFIG_IXGB is not set 536# CONFIG_IXGB is not set
476# CONFIG_S2IO is not set 537# CONFIG_S2IO is not set
477 538
@@ -496,6 +557,8 @@ CONFIG_EEPRO100=y
496# CONFIG_NET_FC is not set 557# CONFIG_NET_FC is not set
497# CONFIG_SHAPER is not set 558# CONFIG_SHAPER is not set
498# CONFIG_NETCONSOLE is not set 559# CONFIG_NETCONSOLE is not set
560# CONFIG_NETPOLL is not set
561# CONFIG_NET_POLL_CONTROLLER is not set
499 562
500# 563#
501# ISDN subsystem 564# ISDN subsystem
@@ -525,18 +588,6 @@ CONFIG_INPUT_EVDEV=y
525# CONFIG_INPUT_EVBUG is not set 588# CONFIG_INPUT_EVBUG is not set
526 589
527# 590#
528# Input I/O drivers
529#
530# CONFIG_GAMEPORT is not set
531CONFIG_SOUND_GAMEPORT=y
532CONFIG_SERIO=y
533CONFIG_SERIO_I8042=y
534CONFIG_SERIO_SERPORT=y
535# CONFIG_SERIO_CT82C710 is not set
536# CONFIG_SERIO_PCIPS2 is not set
537# CONFIG_SERIO_RAW is not set
538
539#
540# Input Device Drivers 591# Input Device Drivers
541# 592#
542CONFIG_INPUT_KEYBOARD=y 593CONFIG_INPUT_KEYBOARD=y
@@ -554,6 +605,17 @@ CONFIG_MOUSE_PS2=y
554# CONFIG_INPUT_MISC is not set 605# CONFIG_INPUT_MISC is not set
555 606
556# 607#
608# Hardware I/O ports
609#
610CONFIG_SERIO=y
611CONFIG_SERIO_I8042=y
612CONFIG_SERIO_SERPORT=y
613# CONFIG_SERIO_PCIPS2 is not set
614CONFIG_SERIO_LIBPS2=y
615# CONFIG_SERIO_RAW is not set
616# CONFIG_GAMEPORT is not set
617
618#
557# Character devices 619# Character devices
558# 620#
559CONFIG_VT=y 621CONFIG_VT=y
@@ -571,7 +633,6 @@ CONFIG_SERIAL_8250_NR_UARTS=4
571CONFIG_SERIAL_8250_EXTENDED=y 633CONFIG_SERIAL_8250_EXTENDED=y
572CONFIG_SERIAL_8250_SHARE_IRQ=y 634CONFIG_SERIAL_8250_SHARE_IRQ=y
573# CONFIG_SERIAL_8250_DETECT_IRQ is not set 635# CONFIG_SERIAL_8250_DETECT_IRQ is not set
574# CONFIG_SERIAL_8250_MULTIPORT is not set
575# CONFIG_SERIAL_8250_RSA is not set 636# CONFIG_SERIAL_8250_RSA is not set
576 637
577# 638#
@@ -579,6 +640,7 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
579# 640#
580CONFIG_SERIAL_CORE=y 641CONFIG_SERIAL_CORE=y
581CONFIG_SERIAL_CORE_CONSOLE=y 642CONFIG_SERIAL_CORE_CONSOLE=y
643# CONFIG_SERIAL_JSM is not set
582CONFIG_UNIX98_PTYS=y 644CONFIG_UNIX98_PTYS=y
583CONFIG_LEGACY_PTYS=y 645CONFIG_LEGACY_PTYS=y
584CONFIG_LEGACY_PTY_COUNT=256 646CONFIG_LEGACY_PTY_COUNT=256
@@ -603,14 +665,22 @@ CONFIG_EFI_RTC=y
603# 665#
604CONFIG_AGP=m 666CONFIG_AGP=m
605CONFIG_AGP_I460=m 667CONFIG_AGP_I460=m
606CONFIG_DRM=y 668CONFIG_DRM=m
607# CONFIG_DRM_TDFX is not set 669# CONFIG_DRM_TDFX is not set
608CONFIG_DRM_R128=m 670CONFIG_DRM_R128=m
609# CONFIG_DRM_RADEON is not set 671# CONFIG_DRM_RADEON is not set
610# CONFIG_DRM_MGA is not set 672# CONFIG_DRM_MGA is not set
611# CONFIG_DRM_SIS is not set 673# CONFIG_DRM_SIS is not set
674# CONFIG_DRM_VIA is not set
675# CONFIG_DRM_SAVAGE is not set
612# CONFIG_RAW_DRIVER is not set 676# CONFIG_RAW_DRIVER is not set
613# CONFIG_HPET is not set 677# CONFIG_HPET is not set
678# CONFIG_HANGCHECK_TIMER is not set
679
680#
681# TPM devices
682#
683# CONFIG_TCG_TPM is not set
614 684
615# 685#
616# I2C support 686# I2C support
@@ -635,7 +705,7 @@ CONFIG_I2C_ALGOBIT=y
635# CONFIG_I2C_AMD8111 is not set 705# CONFIG_I2C_AMD8111 is not set
636# CONFIG_I2C_I801 is not set 706# CONFIG_I2C_I801 is not set
637# CONFIG_I2C_I810 is not set 707# CONFIG_I2C_I810 is not set
638# CONFIG_I2C_ISA is not set 708# CONFIG_I2C_PIIX4 is not set
639# CONFIG_I2C_NFORCE2 is not set 709# CONFIG_I2C_NFORCE2 is not set
640# CONFIG_I2C_PARPORT_LIGHT is not set 710# CONFIG_I2C_PARPORT_LIGHT is not set
641# CONFIG_I2C_PROSAVAGE is not set 711# CONFIG_I2C_PROSAVAGE is not set
@@ -651,16 +721,43 @@ CONFIG_I2C_ALGOBIT=y
651# CONFIG_I2C_PCA_ISA is not set 721# CONFIG_I2C_PCA_ISA is not set
652 722
653# 723#
654# Hardware Sensors Chip support 724# Miscellaneous I2C Chip support
655# 725#
656# CONFIG_I2C_SENSOR is not set 726# CONFIG_SENSORS_DS1337 is not set
727# CONFIG_SENSORS_DS1374 is not set
728# CONFIG_SENSORS_EEPROM is not set
729# CONFIG_SENSORS_PCF8574 is not set
730# CONFIG_SENSORS_PCA9539 is not set
731# CONFIG_SENSORS_PCF8591 is not set
732# CONFIG_SENSORS_RTC8564 is not set
733# CONFIG_SENSORS_MAX6875 is not set
734# CONFIG_I2C_DEBUG_CORE is not set
735# CONFIG_I2C_DEBUG_ALGO is not set
736# CONFIG_I2C_DEBUG_BUS is not set
737# CONFIG_I2C_DEBUG_CHIP is not set
738
739#
740# Dallas's 1-wire bus
741#
742# CONFIG_W1 is not set
743
744#
745# Hardware Monitoring support
746#
747CONFIG_HWMON=y
748# CONFIG_HWMON_VID is not set
657# CONFIG_SENSORS_ADM1021 is not set 749# CONFIG_SENSORS_ADM1021 is not set
658# CONFIG_SENSORS_ADM1025 is not set 750# CONFIG_SENSORS_ADM1025 is not set
751# CONFIG_SENSORS_ADM1026 is not set
659# CONFIG_SENSORS_ADM1031 is not set 752# CONFIG_SENSORS_ADM1031 is not set
753# CONFIG_SENSORS_ADM9240 is not set
660# CONFIG_SENSORS_ASB100 is not set 754# CONFIG_SENSORS_ASB100 is not set
755# CONFIG_SENSORS_ATXP1 is not set
661# CONFIG_SENSORS_DS1621 is not set 756# CONFIG_SENSORS_DS1621 is not set
662# CONFIG_SENSORS_FSCHER is not set 757# CONFIG_SENSORS_FSCHER is not set
758# CONFIG_SENSORS_FSCPOS is not set
663# CONFIG_SENSORS_GL518SM is not set 759# CONFIG_SENSORS_GL518SM is not set
760# CONFIG_SENSORS_GL520SM is not set
664# CONFIG_SENSORS_IT87 is not set 761# CONFIG_SENSORS_IT87 is not set
665# CONFIG_SENSORS_LM63 is not set 762# CONFIG_SENSORS_LM63 is not set
666# CONFIG_SENSORS_LM75 is not set 763# CONFIG_SENSORS_LM75 is not set
@@ -671,33 +768,26 @@ CONFIG_I2C_ALGOBIT=y
671# CONFIG_SENSORS_LM85 is not set 768# CONFIG_SENSORS_LM85 is not set
672# CONFIG_SENSORS_LM87 is not set 769# CONFIG_SENSORS_LM87 is not set
673# CONFIG_SENSORS_LM90 is not set 770# CONFIG_SENSORS_LM90 is not set
771# CONFIG_SENSORS_LM92 is not set
674# CONFIG_SENSORS_MAX1619 is not set 772# CONFIG_SENSORS_MAX1619 is not set
675# CONFIG_SENSORS_PC87360 is not set 773# CONFIG_SENSORS_PC87360 is not set
774# CONFIG_SENSORS_SIS5595 is not set
676# CONFIG_SENSORS_SMSC47M1 is not set 775# CONFIG_SENSORS_SMSC47M1 is not set
776# CONFIG_SENSORS_SMSC47B397 is not set
677# CONFIG_SENSORS_VIA686A is not set 777# CONFIG_SENSORS_VIA686A is not set
678# CONFIG_SENSORS_W83781D is not set 778# CONFIG_SENSORS_W83781D is not set
779# CONFIG_SENSORS_W83792D is not set
679# CONFIG_SENSORS_W83L785TS is not set 780# CONFIG_SENSORS_W83L785TS is not set
680# CONFIG_SENSORS_W83627HF is not set 781# CONFIG_SENSORS_W83627HF is not set
782# CONFIG_SENSORS_W83627EHF is not set
783# CONFIG_HWMON_DEBUG_CHIP is not set
681 784
682# 785#
683# Other I2C Chip support 786# Misc devices
684#
685# CONFIG_SENSORS_EEPROM is not set
686# CONFIG_SENSORS_PCF8574 is not set
687# CONFIG_SENSORS_PCF8591 is not set
688# CONFIG_SENSORS_RTC8564 is not set
689# CONFIG_I2C_DEBUG_CORE is not set
690# CONFIG_I2C_DEBUG_ALGO is not set
691# CONFIG_I2C_DEBUG_BUS is not set
692# CONFIG_I2C_DEBUG_CHIP is not set
693
694#
695# Dallas's 1-wire bus
696# 787#
697# CONFIG_W1 is not set
698 788
699# 789#
700# Misc devices 790# Multimedia Capabilities Port drivers
701# 791#
702 792
703# 793#
@@ -752,11 +842,12 @@ CONFIG_SND_OPL3_LIB=m
752# CONFIG_SND_MTPAV is not set 842# CONFIG_SND_MTPAV is not set
753# CONFIG_SND_SERIAL_U16550 is not set 843# CONFIG_SND_SERIAL_U16550 is not set
754# CONFIG_SND_MPU401 is not set 844# CONFIG_SND_MPU401 is not set
845CONFIG_SND_AC97_CODEC=m
846CONFIG_SND_AC97_BUS=m
755 847
756# 848#
757# PCI devices 849# PCI devices
758# 850#
759CONFIG_SND_AC97_CODEC=m
760# CONFIG_SND_ALI5451 is not set 851# CONFIG_SND_ALI5451 is not set
761# CONFIG_SND_ATIIXP is not set 852# CONFIG_SND_ATIIXP is not set
762# CONFIG_SND_ATIIXP_MODEM is not set 853# CONFIG_SND_ATIIXP_MODEM is not set
@@ -768,6 +859,8 @@ CONFIG_SND_AC97_CODEC=m
768# CONFIG_SND_CS46XX is not set 859# CONFIG_SND_CS46XX is not set
769CONFIG_SND_CS4281=m 860CONFIG_SND_CS4281=m
770# CONFIG_SND_EMU10K1 is not set 861# CONFIG_SND_EMU10K1 is not set
862# CONFIG_SND_EMU10K1X is not set
863# CONFIG_SND_CA0106 is not set
771# CONFIG_SND_KORG1212 is not set 864# CONFIG_SND_KORG1212 is not set
772# CONFIG_SND_MIXART is not set 865# CONFIG_SND_MIXART is not set
773# CONFIG_SND_NM256 is not set 866# CONFIG_SND_NM256 is not set
@@ -775,9 +868,10 @@ CONFIG_SND_CS4281=m
775# CONFIG_SND_RME96 is not set 868# CONFIG_SND_RME96 is not set
776# CONFIG_SND_RME9652 is not set 869# CONFIG_SND_RME9652 is not set
777# CONFIG_SND_HDSP is not set 870# CONFIG_SND_HDSP is not set
871# CONFIG_SND_HDSPM is not set
778# CONFIG_SND_TRIDENT is not set 872# CONFIG_SND_TRIDENT is not set
779# CONFIG_SND_YMFPCI is not set 873# CONFIG_SND_YMFPCI is not set
780# CONFIG_SND_ALS4000 is not set 874# CONFIG_SND_AD1889 is not set
781# CONFIG_SND_CMIPCI is not set 875# CONFIG_SND_CMIPCI is not set
782# CONFIG_SND_ENS1370 is not set 876# CONFIG_SND_ENS1370 is not set
783# CONFIG_SND_ENS1371 is not set 877# CONFIG_SND_ENS1371 is not set
@@ -791,13 +885,14 @@ CONFIG_SND_CS4281=m
791# CONFIG_SND_INTEL8X0M is not set 885# CONFIG_SND_INTEL8X0M is not set
792# CONFIG_SND_SONICVIBES is not set 886# CONFIG_SND_SONICVIBES is not set
793# CONFIG_SND_VIA82XX is not set 887# CONFIG_SND_VIA82XX is not set
888# CONFIG_SND_VIA82XX_MODEM is not set
794# CONFIG_SND_VX222 is not set 889# CONFIG_SND_VX222 is not set
890# CONFIG_SND_HDA_INTEL is not set
795 891
796# 892#
797# USB devices 893# USB devices
798# 894#
799# CONFIG_SND_USB_AUDIO is not set 895# CONFIG_SND_USB_AUDIO is not set
800# CONFIG_SND_USB_USX2Y is not set
801 896
802# 897#
803# Open Sound System 898# Open Sound System
@@ -807,6 +902,8 @@ CONFIG_SND_CS4281=m
807# 902#
808# USB support 903# USB support
809# 904#
905CONFIG_USB_ARCH_HAS_HCD=y
906CONFIG_USB_ARCH_HAS_OHCI=y
810CONFIG_USB=m 907CONFIG_USB=m
811# CONFIG_USB_DEBUG is not set 908# CONFIG_USB_DEBUG is not set
812 909
@@ -818,35 +915,38 @@ CONFIG_USB_DEVICEFS=y
818# CONFIG_USB_DYNAMIC_MINORS is not set 915# CONFIG_USB_DYNAMIC_MINORS is not set
819# CONFIG_USB_SUSPEND is not set 916# CONFIG_USB_SUSPEND is not set
820# CONFIG_USB_OTG is not set 917# CONFIG_USB_OTG is not set
821CONFIG_USB_ARCH_HAS_HCD=y
822CONFIG_USB_ARCH_HAS_OHCI=y
823 918
824# 919#
825# USB Host Controller Drivers 920# USB Host Controller Drivers
826# 921#
827# CONFIG_USB_EHCI_HCD is not set 922# CONFIG_USB_EHCI_HCD is not set
923# CONFIG_USB_ISP116X_HCD is not set
828# CONFIG_USB_OHCI_HCD is not set 924# CONFIG_USB_OHCI_HCD is not set
829CONFIG_USB_UHCI_HCD=m 925CONFIG_USB_UHCI_HCD=m
926# CONFIG_USB_SL811_HCD is not set
830 927
831# 928#
832# USB Device Class drivers 929# USB Device Class drivers
833# 930#
834CONFIG_USB_AUDIO=m 931# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
835CONFIG_USB_BLUETOOTH_TTY=m 932CONFIG_USB_BLUETOOTH_TTY=m
836CONFIG_USB_MIDI=m
837CONFIG_USB_ACM=m 933CONFIG_USB_ACM=m
838CONFIG_USB_PRINTER=m 934CONFIG_USB_PRINTER=m
935
936#
937# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
938#
839CONFIG_USB_STORAGE=m 939CONFIG_USB_STORAGE=m
840# CONFIG_USB_STORAGE_DEBUG is not set 940# CONFIG_USB_STORAGE_DEBUG is not set
841# CONFIG_USB_STORAGE_RW_DETECT is not set
842# CONFIG_USB_STORAGE_DATAFAB is not set 941# CONFIG_USB_STORAGE_DATAFAB is not set
843# CONFIG_USB_STORAGE_FREECOM is not set 942# CONFIG_USB_STORAGE_FREECOM is not set
844# CONFIG_USB_STORAGE_ISD200 is not set 943# CONFIG_USB_STORAGE_ISD200 is not set
845# CONFIG_USB_STORAGE_DPCM is not set 944# CONFIG_USB_STORAGE_DPCM is not set
846# CONFIG_USB_STORAGE_HP8200e is not set 945# CONFIG_USB_STORAGE_USBAT is not set
847# CONFIG_USB_STORAGE_SDDR09 is not set 946# CONFIG_USB_STORAGE_SDDR09 is not set
848# CONFIG_USB_STORAGE_SDDR55 is not set 947# CONFIG_USB_STORAGE_SDDR55 is not set
849# CONFIG_USB_STORAGE_JUMPSHOT is not set 948# CONFIG_USB_STORAGE_JUMPSHOT is not set
949# CONFIG_USB_STORAGE_ONETOUCH is not set
850 950
851# 951#
852# USB Input Devices 952# USB Input Devices
@@ -863,19 +963,23 @@ CONFIG_USB_HIDDEV=y
863# CONFIG_USB_MOUSE is not set 963# CONFIG_USB_MOUSE is not set
864# CONFIG_USB_AIPTEK is not set 964# CONFIG_USB_AIPTEK is not set
865# CONFIG_USB_WACOM is not set 965# CONFIG_USB_WACOM is not set
966# CONFIG_USB_ACECAD is not set
866# CONFIG_USB_KBTAB is not set 967# CONFIG_USB_KBTAB is not set
867# CONFIG_USB_POWERMATE is not set 968# CONFIG_USB_POWERMATE is not set
868# CONFIG_USB_MTOUCH is not set 969# CONFIG_USB_MTOUCH is not set
970# CONFIG_USB_ITMTOUCH is not set
869# CONFIG_USB_EGALAX is not set 971# CONFIG_USB_EGALAX is not set
972# CONFIG_USB_YEALINK is not set
870# CONFIG_USB_XPAD is not set 973# CONFIG_USB_XPAD is not set
871# CONFIG_USB_ATI_REMOTE is not set 974# CONFIG_USB_ATI_REMOTE is not set
975# CONFIG_USB_KEYSPAN_REMOTE is not set
976# CONFIG_USB_APPLETOUCH is not set
872 977
873# 978#
874# USB Imaging devices 979# USB Imaging devices
875# 980#
876# CONFIG_USB_MDC800 is not set 981# CONFIG_USB_MDC800 is not set
877# CONFIG_USB_MICROTEK is not set 982# CONFIG_USB_MICROTEK is not set
878# CONFIG_USB_HPUSBSCSI is not set
879 983
880# 984#
881# USB Multimedia devices 985# USB Multimedia devices
@@ -894,6 +998,7 @@ CONFIG_USB_HIDDEV=y
894# CONFIG_USB_PEGASUS is not set 998# CONFIG_USB_PEGASUS is not set
895# CONFIG_USB_RTL8150 is not set 999# CONFIG_USB_RTL8150 is not set
896# CONFIG_USB_USBNET is not set 1000# CONFIG_USB_USBNET is not set
1001CONFIG_USB_MON=y
897 1002
898# 1003#
899# USB port drivers 1004# USB port drivers
@@ -909,7 +1014,6 @@ CONFIG_USB_HIDDEV=y
909# 1014#
910# CONFIG_USB_EMI62 is not set 1015# CONFIG_USB_EMI62 is not set
911# CONFIG_USB_EMI26 is not set 1016# CONFIG_USB_EMI26 is not set
912# CONFIG_USB_TIGL is not set
913# CONFIG_USB_AUERSWALD is not set 1017# CONFIG_USB_AUERSWALD is not set
914# CONFIG_USB_RIO500 is not set 1018# CONFIG_USB_RIO500 is not set
915# CONFIG_USB_LEGOTOWER is not set 1019# CONFIG_USB_LEGOTOWER is not set
@@ -918,10 +1022,12 @@ CONFIG_USB_HIDDEV=y
918# CONFIG_USB_CYTHERM is not set 1022# CONFIG_USB_CYTHERM is not set
919# CONFIG_USB_PHIDGETKIT is not set 1023# CONFIG_USB_PHIDGETKIT is not set
920# CONFIG_USB_PHIDGETSERVO is not set 1024# CONFIG_USB_PHIDGETSERVO is not set
1025# CONFIG_USB_IDMOUSE is not set
1026# CONFIG_USB_LD is not set
921# CONFIG_USB_TEST is not set 1027# CONFIG_USB_TEST is not set
922 1028
923# 1029#
924# USB ATM/DSL drivers 1030# USB DSL modem support
925# 1031#
926 1032
927# 1033#
@@ -930,10 +1036,25 @@ CONFIG_USB_HIDDEV=y
930# CONFIG_USB_GADGET is not set 1036# CONFIG_USB_GADGET is not set
931 1037
932# 1038#
1039# MMC/SD Card support
1040#
1041# CONFIG_MMC is not set
1042
1043#
1044# InfiniBand support
1045#
1046# CONFIG_INFINIBAND is not set
1047
1048#
1049# SN Devices
1050#
1051
1052#
933# File systems 1053# File systems
934# 1054#
935CONFIG_EXT2_FS=y 1055CONFIG_EXT2_FS=y
936# CONFIG_EXT2_FS_XATTR is not set 1056# CONFIG_EXT2_FS_XATTR is not set
1057# CONFIG_EXT2_FS_XIP is not set
937CONFIG_EXT3_FS=y 1058CONFIG_EXT3_FS=y
938CONFIG_EXT3_FS_XATTR=y 1059CONFIG_EXT3_FS_XATTR=y
939# CONFIG_EXT3_FS_POSIX_ACL is not set 1060# CONFIG_EXT3_FS_POSIX_ACL is not set
@@ -945,17 +1066,20 @@ CONFIG_FS_MBCACHE=y
945# CONFIG_JFS_FS is not set 1066# CONFIG_JFS_FS is not set
946CONFIG_FS_POSIX_ACL=y 1067CONFIG_FS_POSIX_ACL=y
947CONFIG_XFS_FS=y 1068CONFIG_XFS_FS=y
948# CONFIG_XFS_RT is not set 1069CONFIG_XFS_EXPORT=y
949CONFIG_XFS_QUOTA=y 1070CONFIG_XFS_QUOTA=y
950CONFIG_XFS_SECURITY=y 1071CONFIG_XFS_SECURITY=y
951CONFIG_XFS_POSIX_ACL=y 1072CONFIG_XFS_POSIX_ACL=y
1073# CONFIG_XFS_RT is not set
952# CONFIG_MINIX_FS is not set 1074# CONFIG_MINIX_FS is not set
953# CONFIG_ROMFS_FS is not set 1075# CONFIG_ROMFS_FS is not set
1076CONFIG_INOTIFY=y
954# CONFIG_QUOTA is not set 1077# CONFIG_QUOTA is not set
955CONFIG_QUOTACTL=y 1078CONFIG_QUOTACTL=y
956CONFIG_DNOTIFY=y 1079CONFIG_DNOTIFY=y
957CONFIG_AUTOFS_FS=m 1080CONFIG_AUTOFS_FS=m
958CONFIG_AUTOFS4_FS=m 1081CONFIG_AUTOFS4_FS=m
1082# CONFIG_FUSE_FS is not set
959 1083
960# 1084#
961# CD-ROM/DVD Filesystems 1085# CD-ROM/DVD Filesystems
@@ -982,14 +1106,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
982CONFIG_PROC_FS=y 1106CONFIG_PROC_FS=y
983CONFIG_PROC_KCORE=y 1107CONFIG_PROC_KCORE=y
984CONFIG_SYSFS=y 1108CONFIG_SYSFS=y
985# CONFIG_DEVFS_FS is not set
986CONFIG_DEVPTS_FS_XATTR=y
987CONFIG_DEVPTS_FS_SECURITY=y
988CONFIG_TMPFS=y 1109CONFIG_TMPFS=y
989# CONFIG_TMPFS_XATTR is not set
990CONFIG_HUGETLBFS=y 1110CONFIG_HUGETLBFS=y
991CONFIG_HUGETLB_PAGE=y 1111CONFIG_HUGETLB_PAGE=y
992CONFIG_RAMFS=y 1112CONFIG_RAMFS=y
1113# CONFIG_RELAYFS_FS is not set
993 1114
994# 1115#
995# Miscellaneous filesystems 1116# Miscellaneous filesystems
@@ -1013,15 +1134,18 @@ CONFIG_RAMFS=y
1013# 1134#
1014CONFIG_NFS_FS=m 1135CONFIG_NFS_FS=m
1015CONFIG_NFS_V3=y 1136CONFIG_NFS_V3=y
1137# CONFIG_NFS_V3_ACL is not set
1016CONFIG_NFS_V4=y 1138CONFIG_NFS_V4=y
1017# CONFIG_NFS_DIRECTIO is not set 1139# CONFIG_NFS_DIRECTIO is not set
1018CONFIG_NFSD=m 1140CONFIG_NFSD=m
1019CONFIG_NFSD_V3=y 1141CONFIG_NFSD_V3=y
1142# CONFIG_NFSD_V3_ACL is not set
1020CONFIG_NFSD_V4=y 1143CONFIG_NFSD_V4=y
1021CONFIG_NFSD_TCP=y 1144CONFIG_NFSD_TCP=y
1022CONFIG_LOCKD=m 1145CONFIG_LOCKD=m
1023CONFIG_LOCKD_V4=y 1146CONFIG_LOCKD_V4=y
1024CONFIG_EXPORTFS=m 1147CONFIG_EXPORTFS=y
1148CONFIG_NFS_COMMON=y
1025CONFIG_SUNRPC=m 1149CONFIG_SUNRPC=m
1026CONFIG_SUNRPC_GSS=m 1150CONFIG_SUNRPC_GSS=m
1027CONFIG_RPCSEC_GSS_KRB5=m 1151CONFIG_RPCSEC_GSS_KRB5=m
@@ -1031,9 +1155,11 @@ CONFIG_CIFS=m
1031CONFIG_CIFS_STATS=y 1155CONFIG_CIFS_STATS=y
1032CONFIG_CIFS_XATTR=y 1156CONFIG_CIFS_XATTR=y
1033CONFIG_CIFS_POSIX=y 1157CONFIG_CIFS_POSIX=y
1158# CONFIG_CIFS_EXPERIMENTAL is not set
1034# CONFIG_NCP_FS is not set 1159# CONFIG_NCP_FS is not set
1035# CONFIG_CODA_FS is not set 1160# CONFIG_CODA_FS is not set
1036# CONFIG_AFS_FS is not set 1161# CONFIG_AFS_FS is not set
1162# CONFIG_9P_FS is not set
1037 1163
1038# 1164#
1039# Partition Types 1165# Partition Types
@@ -1103,8 +1229,12 @@ CONFIG_NLS_UTF8=m
1103# Library routines 1229# Library routines
1104# 1230#
1105# CONFIG_CRC_CCITT is not set 1231# CONFIG_CRC_CCITT is not set
1232# CONFIG_CRC16 is not set
1106CONFIG_CRC32=y 1233CONFIG_CRC32=y
1107# CONFIG_LIBCRC32C is not set 1234# CONFIG_LIBCRC32C is not set
1235CONFIG_GENERIC_HARDIRQS=y
1236CONFIG_GENERIC_IRQ_PROBE=y
1237CONFIG_GENERIC_PENDING_IRQ=y
1108 1238
1109# 1239#
1110# Profiling support 1240# Profiling support
@@ -1115,14 +1245,20 @@ CONFIG_OPROFILE=y
1115# 1245#
1116# Kernel hacking 1246# Kernel hacking
1117# 1247#
1248# CONFIG_PRINTK_TIME is not set
1118CONFIG_DEBUG_KERNEL=y 1249CONFIG_DEBUG_KERNEL=y
1119CONFIG_MAGIC_SYSRQ=y 1250CONFIG_MAGIC_SYSRQ=y
1251CONFIG_LOG_BUF_SHIFT=16
1252CONFIG_DETECT_SOFTLOCKUP=y
1120# CONFIG_SCHEDSTATS is not set 1253# CONFIG_SCHEDSTATS is not set
1121# CONFIG_DEBUG_SLAB is not set 1254# CONFIG_DEBUG_SLAB is not set
1255CONFIG_DEBUG_PREEMPT=y
1122# CONFIG_DEBUG_SPINLOCK is not set 1256# CONFIG_DEBUG_SPINLOCK is not set
1123# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1257# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1124# CONFIG_DEBUG_KOBJECT is not set 1258# CONFIG_DEBUG_KOBJECT is not set
1125# CONFIG_DEBUG_INFO is not set 1259# CONFIG_DEBUG_INFO is not set
1260# CONFIG_DEBUG_FS is not set
1261# CONFIG_KPROBES is not set
1126# CONFIG_IA64_GRANULE_16MB is not set 1262# CONFIG_IA64_GRANULE_16MB is not set
1127CONFIG_IA64_GRANULE_64MB=y 1263CONFIG_IA64_GRANULE_64MB=y
1128# CONFIG_IA64_PRINT_HAZARDS is not set 1264# CONFIG_IA64_PRINT_HAZARDS is not set
@@ -1149,6 +1285,7 @@ CONFIG_CRYPTO_MD5=y
1149# CONFIG_CRYPTO_SHA256 is not set 1285# CONFIG_CRYPTO_SHA256 is not set
1150# CONFIG_CRYPTO_SHA512 is not set 1286# CONFIG_CRYPTO_SHA512 is not set
1151# CONFIG_CRYPTO_WP512 is not set 1287# CONFIG_CRYPTO_WP512 is not set
1288# CONFIG_CRYPTO_TGR192 is not set
1152CONFIG_CRYPTO_DES=y 1289CONFIG_CRYPTO_DES=y
1153# CONFIG_CRYPTO_BLOWFISH is not set 1290# CONFIG_CRYPTO_BLOWFISH is not set
1154# CONFIG_CRYPTO_TWOFISH is not set 1291# CONFIG_CRYPTO_TWOFISH is not set
@@ -1164,3 +1301,7 @@ CONFIG_CRYPTO_DES=y
1164# CONFIG_CRYPTO_MICHAEL_MIC is not set 1301# CONFIG_CRYPTO_MICHAEL_MIC is not set
1165# CONFIG_CRYPTO_CRC32C is not set 1302# CONFIG_CRYPTO_CRC32C is not set
1166# CONFIG_CRYPTO_TEST is not set 1303# CONFIG_CRYPTO_TEST is not set
1304
1305#
1306# Hardware crypto devices
1307#
diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig
new file mode 100644
index 000000000000..80f8663bc6d9
--- /dev/null
+++ b/arch/ia64/configs/gensparse_defconfig
@@ -0,0 +1,1319 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-rc2
4# Wed Sep 28 08:27:29 2005
5#
6
7#
8# Code maturity level options
9#
10CONFIG_EXPERIMENTAL=y
11CONFIG_CLEAN_COMPILE=y
12CONFIG_LOCK_KERNEL=y
13CONFIG_INIT_ENV_ARG_LIMIT=32
14
15#
16# General setup
17#
18CONFIG_LOCALVERSION=""
19CONFIG_LOCALVERSION_AUTO=y
20CONFIG_SWAP=y
21CONFIG_SYSVIPC=y
22CONFIG_POSIX_MQUEUE=y
23# CONFIG_BSD_PROCESS_ACCT is not set
24CONFIG_SYSCTL=y
25# CONFIG_AUDIT is not set
26CONFIG_HOTPLUG=y
27CONFIG_KOBJECT_UEVENT=y
28CONFIG_IKCONFIG=y
29CONFIG_IKCONFIG_PROC=y
30# CONFIG_CPUSETS is not set
31CONFIG_INITRAMFS_SOURCE=""
32# CONFIG_EMBEDDED is not set
33CONFIG_KALLSYMS=y
34CONFIG_KALLSYMS_ALL=y
35# CONFIG_KALLSYMS_EXTRA_PASS is not set
36CONFIG_PRINTK=y
37CONFIG_BUG=y
38CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y
40CONFIG_EPOLL=y
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0
48
49#
50# Loadable module support
51#
52CONFIG_MODULES=y
53CONFIG_MODULE_UNLOAD=y
54# CONFIG_MODULE_FORCE_UNLOAD is not set
55CONFIG_OBSOLETE_MODPARM=y
56CONFIG_MODVERSIONS=y
57# CONFIG_MODULE_SRCVERSION_ALL is not set
58CONFIG_KMOD=y
59CONFIG_STOP_MACHINE=y
60
61#
62# Processor type and features
63#
64CONFIG_IA64=y
65CONFIG_64BIT=y
66CONFIG_MMU=y
67CONFIG_RWSEM_XCHGADD_ALGORITHM=y
68CONFIG_GENERIC_CALIBRATE_DELAY=y
69CONFIG_TIME_INTERPOLATION=y
70CONFIG_EFI=y
71CONFIG_GENERIC_IOMAP=y
72CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
73CONFIG_IA64_GENERIC=y
74# CONFIG_IA64_DIG is not set
75# CONFIG_IA64_HP_ZX1 is not set
76# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
77# CONFIG_IA64_SGI_SN2 is not set
78# CONFIG_IA64_HP_SIM is not set
79# CONFIG_ITANIUM is not set
80CONFIG_MCKINLEY=y
81# CONFIG_IA64_PAGE_SIZE_4KB is not set
82# CONFIG_IA64_PAGE_SIZE_8KB is not set
83CONFIG_IA64_PAGE_SIZE_16KB=y
84# CONFIG_IA64_PAGE_SIZE_64KB is not set
85# CONFIG_HZ_100 is not set
86CONFIG_HZ_250=y
87# CONFIG_HZ_1000 is not set
88CONFIG_HZ=250
89CONFIG_IA64_L1_CACHE_SHIFT=7
90CONFIG_IA64_CYCLONE=y
91CONFIG_IOSAPIC=y
92# CONFIG_IA64_SGI_SN_XP is not set
93CONFIG_FORCE_MAX_ZONEORDER=17
94CONFIG_SMP=y
95CONFIG_NR_CPUS=512
96CONFIG_HOTPLUG_CPU=y
97# CONFIG_SCHED_SMT is not set
98# CONFIG_PREEMPT is not set
99CONFIG_SELECT_MEMORY_MODEL=y
100# CONFIG_FLATMEM_MANUAL is not set
101# CONFIG_DISCONTIGMEM_MANUAL is not set
102CONFIG_SPARSEMEM_MANUAL=y
103CONFIG_SPARSEMEM=y
104CONFIG_NEED_MULTIPLE_NODES=y
105CONFIG_HAVE_MEMORY_PRESENT=y
106# CONFIG_SPARSEMEM_STATIC is not set
107CONFIG_SPARSEMEM_EXTREME=y
108CONFIG_ARCH_SELECT_MEMORY_MODEL=y
109CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
110CONFIG_ARCH_FLATMEM_ENABLE=y
111CONFIG_ARCH_SPARSEMEM_ENABLE=y
112CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
113CONFIG_NUMA=y
114CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
115CONFIG_IA32_SUPPORT=y
116CONFIG_COMPAT=y
117CONFIG_IA64_MCA_RECOVERY=y
118CONFIG_PERFMON=y
119CONFIG_IA64_PALINFO=y
120
121#
122# Firmware Drivers
123#
124CONFIG_EFI_VARS=y
125CONFIG_EFI_PCDP=y
126# CONFIG_DELL_RBU is not set
127CONFIG_BINFMT_ELF=y
128CONFIG_BINFMT_MISC=m
129
130#
131# Power management and ACPI
132#
133CONFIG_PM=y
134# CONFIG_PM_DEBUG is not set
135
136#
137# ACPI (Advanced Configuration and Power Interface) Support
138#
139CONFIG_ACPI=y
140CONFIG_ACPI_BUTTON=m
141CONFIG_ACPI_FAN=m
142CONFIG_ACPI_PROCESSOR=m
143CONFIG_ACPI_HOTPLUG_CPU=y
144CONFIG_ACPI_THERMAL=m
145CONFIG_ACPI_NUMA=y
146CONFIG_ACPI_BLACKLIST_YEAR=0
147# CONFIG_ACPI_DEBUG is not set
148CONFIG_ACPI_POWER=y
149CONFIG_ACPI_SYSTEM=y
150CONFIG_ACPI_CONTAINER=m
151
152#
153# CPU Frequency scaling
154#
155# CONFIG_CPU_FREQ is not set
156
157#
158# Bus options (PCI, PCMCIA)
159#
160CONFIG_PCI=y
161CONFIG_PCI_DOMAINS=y
162# CONFIG_PCI_MSI is not set
163CONFIG_PCI_LEGACY_PROC=y
164# CONFIG_PCI_DEBUG is not set
165
166#
167# PCI Hotplug Support
168#
169CONFIG_HOTPLUG_PCI=m
170# CONFIG_HOTPLUG_PCI_FAKE is not set
171CONFIG_HOTPLUG_PCI_ACPI=m
172# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
173# CONFIG_HOTPLUG_PCI_CPCI is not set
174# CONFIG_HOTPLUG_PCI_SHPC is not set
175# CONFIG_HOTPLUG_PCI_SGI is not set
176
177#
178# PCCARD (PCMCIA/CardBus) support
179#
180# CONFIG_PCCARD is not set
181
182#
183# Networking
184#
185CONFIG_NET=y
186
187#
188# Networking options
189#
190CONFIG_PACKET=y
191# CONFIG_PACKET_MMAP is not set
192CONFIG_UNIX=y
193# CONFIG_NET_KEY is not set
194CONFIG_INET=y
195CONFIG_IP_MULTICAST=y
196# CONFIG_IP_ADVANCED_ROUTER is not set
197CONFIG_IP_FIB_HASH=y
198# CONFIG_IP_PNP is not set
199# CONFIG_NET_IPIP is not set
200# CONFIG_NET_IPGRE is not set
201# CONFIG_IP_MROUTE is not set
202CONFIG_ARPD=y
203CONFIG_SYN_COOKIES=y
204# CONFIG_INET_AH is not set
205# CONFIG_INET_ESP is not set
206# CONFIG_INET_IPCOMP is not set
207# CONFIG_INET_TUNNEL is not set
208CONFIG_INET_DIAG=y
209CONFIG_INET_TCP_DIAG=y
210# CONFIG_TCP_CONG_ADVANCED is not set
211CONFIG_TCP_CONG_BIC=y
212# CONFIG_IPV6 is not set
213# CONFIG_NETFILTER is not set
214
215#
216# DCCP Configuration (EXPERIMENTAL)
217#
218# CONFIG_IP_DCCP is not set
219
220#
221# SCTP Configuration (EXPERIMENTAL)
222#
223# CONFIG_IP_SCTP is not set
224# CONFIG_ATM is not set
225# CONFIG_BRIDGE is not set
226# CONFIG_VLAN_8021Q is not set
227# CONFIG_DECNET is not set
228# CONFIG_LLC2 is not set
229# CONFIG_IPX is not set
230# CONFIG_ATALK is not set
231# CONFIG_X25 is not set
232# CONFIG_LAPB is not set
233# CONFIG_NET_DIVERT is not set
234# CONFIG_ECONET is not set
235# CONFIG_WAN_ROUTER is not set
236# CONFIG_NET_SCHED is not set
237# CONFIG_NET_CLS_ROUTE is not set
238
239#
240# Network testing
241#
242# CONFIG_NET_PKTGEN is not set
243# CONFIG_HAMRADIO is not set
244# CONFIG_IRDA is not set
245# CONFIG_BT is not set
246# CONFIG_IEEE80211 is not set
247
248#
249# Device Drivers
250#
251
252#
253# Generic Driver Options
254#
255CONFIG_STANDALONE=y
256CONFIG_PREVENT_FIRMWARE_BUILD=y
257CONFIG_FW_LOADER=m
258# CONFIG_DEBUG_DRIVER is not set
259
260#
261# Connector - unified userspace <-> kernelspace linker
262#
263# CONFIG_CONNECTOR is not set
264
265#
266# Memory Technology Devices (MTD)
267#
268# CONFIG_MTD is not set
269
270#
271# Parallel port support
272#
273# CONFIG_PARPORT is not set
274
275#
276# Plug and Play support
277#
278# CONFIG_PNP is not set
279
280#
281# Block devices
282#
283# CONFIG_BLK_CPQ_DA is not set
284# CONFIG_BLK_CPQ_CISS_DA is not set
285# CONFIG_BLK_DEV_DAC960 is not set
286# CONFIG_BLK_DEV_UMEM is not set
287# CONFIG_BLK_DEV_COW_COMMON is not set
288CONFIG_BLK_DEV_LOOP=m
289CONFIG_BLK_DEV_CRYPTOLOOP=m
290CONFIG_BLK_DEV_NBD=m
291# CONFIG_BLK_DEV_SX8 is not set
292# CONFIG_BLK_DEV_UB is not set
293CONFIG_BLK_DEV_RAM=y
294CONFIG_BLK_DEV_RAM_COUNT=16
295CONFIG_BLK_DEV_RAM_SIZE=4096
296CONFIG_BLK_DEV_INITRD=y
297# CONFIG_CDROM_PKTCDVD is not set
298
299#
300# IO Schedulers
301#
302CONFIG_IOSCHED_NOOP=y
303CONFIG_IOSCHED_AS=y
304CONFIG_IOSCHED_DEADLINE=y
305CONFIG_IOSCHED_CFQ=y
306# CONFIG_ATA_OVER_ETH is not set
307
308#
309# ATA/ATAPI/MFM/RLL support
310#
311CONFIG_IDE=y
312CONFIG_BLK_DEV_IDE=y
313
314#
315# Please see Documentation/ide.txt for help/info on IDE drives
316#
317# CONFIG_BLK_DEV_IDE_SATA is not set
318CONFIG_BLK_DEV_IDEDISK=y
319# CONFIG_IDEDISK_MULTI_MODE is not set
320CONFIG_BLK_DEV_IDECD=y
321# CONFIG_BLK_DEV_IDETAPE is not set
322CONFIG_BLK_DEV_IDEFLOPPY=y
323CONFIG_BLK_DEV_IDESCSI=m
324# CONFIG_IDE_TASK_IOCTL is not set
325
326#
327# IDE chipset support/bugfixes
328#
329CONFIG_IDE_GENERIC=y
330CONFIG_BLK_DEV_IDEPCI=y
331# CONFIG_IDEPCI_SHARE_IRQ is not set
332# CONFIG_BLK_DEV_OFFBOARD is not set
333CONFIG_BLK_DEV_GENERIC=y
334# CONFIG_BLK_DEV_OPTI621 is not set
335CONFIG_BLK_DEV_IDEDMA_PCI=y
336# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
337CONFIG_IDEDMA_PCI_AUTO=y
338# CONFIG_IDEDMA_ONLYDISK is not set
339# CONFIG_BLK_DEV_AEC62XX is not set
340# CONFIG_BLK_DEV_ALI15X3 is not set
341# CONFIG_BLK_DEV_AMD74XX is not set
342CONFIG_BLK_DEV_CMD64X=y
343# CONFIG_BLK_DEV_TRIFLEX is not set
344# CONFIG_BLK_DEV_CY82C693 is not set
345# CONFIG_BLK_DEV_CS5520 is not set
346# CONFIG_BLK_DEV_CS5530 is not set
347# CONFIG_BLK_DEV_HPT34X is not set
348# CONFIG_BLK_DEV_HPT366 is not set
349# CONFIG_BLK_DEV_SC1200 is not set
350CONFIG_BLK_DEV_PIIX=y
351# CONFIG_BLK_DEV_IT821X is not set
352# CONFIG_BLK_DEV_NS87415 is not set
353# CONFIG_BLK_DEV_PDC202XX_OLD is not set
354# CONFIG_BLK_DEV_PDC202XX_NEW is not set
355# CONFIG_BLK_DEV_SVWKS is not set
356CONFIG_BLK_DEV_SGIIOC4=y
357# CONFIG_BLK_DEV_SIIMAGE is not set
358# CONFIG_BLK_DEV_SLC90E66 is not set
359# CONFIG_BLK_DEV_TRM290 is not set
360# CONFIG_BLK_DEV_VIA82CXXX is not set
361# CONFIG_IDE_ARM is not set
362CONFIG_BLK_DEV_IDEDMA=y
363# CONFIG_IDEDMA_IVB is not set
364CONFIG_IDEDMA_AUTO=y
365# CONFIG_BLK_DEV_HD is not set
366
367#
368# SCSI device support
369#
370# CONFIG_RAID_ATTRS is not set
371CONFIG_SCSI=y
372CONFIG_SCSI_PROC_FS=y
373
374#
375# SCSI support type (disk, tape, CD-ROM)
376#
377CONFIG_BLK_DEV_SD=y
378CONFIG_CHR_DEV_ST=m
379# CONFIG_CHR_DEV_OSST is not set
380CONFIG_BLK_DEV_SR=m
381# CONFIG_BLK_DEV_SR_VENDOR is not set
382CONFIG_CHR_DEV_SG=m
383# CONFIG_CHR_DEV_SCH is not set
384
385#
386# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
387#
388# CONFIG_SCSI_MULTI_LUN is not set
389# CONFIG_SCSI_CONSTANTS is not set
390# CONFIG_SCSI_LOGGING is not set
391
392#
393# SCSI Transport Attributes
394#
395CONFIG_SCSI_SPI_ATTRS=y
396CONFIG_SCSI_FC_ATTRS=y
397# CONFIG_SCSI_ISCSI_ATTRS is not set
398# CONFIG_SCSI_SAS_ATTRS is not set
399
400#
401# SCSI low-level drivers
402#
403# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
404# CONFIG_SCSI_3W_9XXX is not set
405# CONFIG_SCSI_ACARD is not set
406# CONFIG_SCSI_AACRAID is not set
407# CONFIG_SCSI_AIC7XXX is not set
408# CONFIG_SCSI_AIC7XXX_OLD is not set
409# CONFIG_SCSI_AIC79XX is not set
410# CONFIG_MEGARAID_NEWGEN is not set
411# CONFIG_MEGARAID_LEGACY is not set
412CONFIG_SCSI_SATA=y
413# CONFIG_SCSI_SATA_AHCI is not set
414# CONFIG_SCSI_SATA_SVW is not set
415# CONFIG_SCSI_ATA_PIIX is not set
416# CONFIG_SCSI_SATA_MV is not set
417# CONFIG_SCSI_SATA_NV is not set
418# CONFIG_SCSI_SATA_PROMISE is not set
419# CONFIG_SCSI_SATA_QSTOR is not set
420# CONFIG_SCSI_SATA_SX4 is not set
421# CONFIG_SCSI_SATA_SIL is not set
422# CONFIG_SCSI_SATA_SIS is not set
423# CONFIG_SCSI_SATA_ULI is not set
424# CONFIG_SCSI_SATA_VIA is not set
425CONFIG_SCSI_SATA_VITESSE=y
426# CONFIG_SCSI_DMX3191D is not set
427# CONFIG_SCSI_FUTURE_DOMAIN is not set
428# CONFIG_SCSI_IPS is not set
429# CONFIG_SCSI_INITIO is not set
430# CONFIG_SCSI_INIA100 is not set
431CONFIG_SCSI_SYM53C8XX_2=y
432CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
433CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
434CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
435# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
436# CONFIG_SCSI_IPR is not set
437# CONFIG_SCSI_QLOGIC_FC is not set
438CONFIG_SCSI_QLOGIC_1280=y
439# CONFIG_SCSI_QLOGIC_1280_1040 is not set
440CONFIG_SCSI_QLA2XXX=y
441CONFIG_SCSI_QLA21XX=m
442CONFIG_SCSI_QLA22XX=m
443CONFIG_SCSI_QLA2300=m
444CONFIG_SCSI_QLA2322=m
445# CONFIG_SCSI_QLA6312 is not set
446# CONFIG_SCSI_QLA24XX is not set
447# CONFIG_SCSI_LPFC is not set
448# CONFIG_SCSI_DC395x is not set
449# CONFIG_SCSI_DC390T is not set
450# CONFIG_SCSI_DEBUG is not set
451
452#
453# Multi-device support (RAID and LVM)
454#
455CONFIG_MD=y
456CONFIG_BLK_DEV_MD=m
457CONFIG_MD_LINEAR=m
458CONFIG_MD_RAID0=m
459CONFIG_MD_RAID1=m
460# CONFIG_MD_RAID10 is not set
461CONFIG_MD_RAID5=m
462CONFIG_MD_RAID6=m
463CONFIG_MD_MULTIPATH=m
464# CONFIG_MD_FAULTY is not set
465CONFIG_BLK_DEV_DM=m
466CONFIG_DM_CRYPT=m
467CONFIG_DM_SNAPSHOT=m
468CONFIG_DM_MIRROR=m
469CONFIG_DM_ZERO=m
470CONFIG_DM_MULTIPATH=m
471# CONFIG_DM_MULTIPATH_EMC is not set
472
473#
474# Fusion MPT device support
475#
476CONFIG_FUSION=y
477CONFIG_FUSION_SPI=y
478CONFIG_FUSION_FC=m
479CONFIG_FUSION_MAX_SGE=128
480# CONFIG_FUSION_CTL is not set
481
482#
483# IEEE 1394 (FireWire) support
484#
485# CONFIG_IEEE1394 is not set
486
487#
488# I2O device support
489#
490# CONFIG_I2O is not set
491
492#
493# Network device support
494#
495CONFIG_NETDEVICES=y
496CONFIG_DUMMY=m
497# CONFIG_BONDING is not set
498# CONFIG_EQUALIZER is not set
499# CONFIG_TUN is not set
500
501#
502# ARCnet devices
503#
504# CONFIG_ARCNET is not set
505
506#
507# PHY device support
508#
509# CONFIG_PHYLIB is not set
510
511#
512# Ethernet (10 or 100Mbit)
513#
514CONFIG_NET_ETHERNET=y
515CONFIG_MII=m
516# CONFIG_HAPPYMEAL is not set
517# CONFIG_SUNGEM is not set
518# CONFIG_NET_VENDOR_3COM is not set
519
520#
521# Tulip family network device support
522#
523CONFIG_NET_TULIP=y
524# CONFIG_DE2104X is not set
525CONFIG_TULIP=m
526# CONFIG_TULIP_MWI is not set
527# CONFIG_TULIP_MMIO is not set
528# CONFIG_TULIP_NAPI is not set
529# CONFIG_DE4X5 is not set
530# CONFIG_WINBOND_840 is not set
531# CONFIG_DM9102 is not set
532# CONFIG_ULI526X is not set
533# CONFIG_HP100 is not set
534CONFIG_NET_PCI=y
535# CONFIG_PCNET32 is not set
536# CONFIG_AMD8111_ETH is not set
537# CONFIG_ADAPTEC_STARFIRE is not set
538# CONFIG_B44 is not set
539# CONFIG_FORCEDETH is not set
540# CONFIG_DGRS is not set
541CONFIG_EEPRO100=m
542CONFIG_E100=m
543# CONFIG_FEALNX is not set
544# CONFIG_NATSEMI is not set
545# CONFIG_NE2K_PCI is not set
546# CONFIG_8139CP is not set
547# CONFIG_8139TOO is not set
548# CONFIG_SIS900 is not set
549# CONFIG_EPIC100 is not set
550# CONFIG_SUNDANCE is not set
551# CONFIG_VIA_RHINE is not set
552
553#
554# Ethernet (1000 Mbit)
555#
556# CONFIG_ACENIC is not set
557# CONFIG_DL2K is not set
558CONFIG_E1000=y
559# CONFIG_E1000_NAPI is not set
560# CONFIG_NS83820 is not set
561# CONFIG_HAMACHI is not set
562# CONFIG_YELLOWFIN is not set
563# CONFIG_R8169 is not set
564# CONFIG_SIS190 is not set
565# CONFIG_SKGE is not set
566# CONFIG_SK98LIN is not set
567# CONFIG_VIA_VELOCITY is not set
568CONFIG_TIGON3=y
569# CONFIG_BNX2 is not set
570
571#
572# Ethernet (10000 Mbit)
573#
574# CONFIG_CHELSIO_T1 is not set
575# CONFIG_IXGB is not set
576# CONFIG_S2IO is not set
577
578#
579# Token Ring devices
580#
581# CONFIG_TR is not set
582
583#
584# Wireless LAN (non-hamradio)
585#
586# CONFIG_NET_RADIO is not set
587
588#
589# Wan interfaces
590#
591# CONFIG_WAN is not set
592# CONFIG_FDDI is not set
593# CONFIG_HIPPI is not set
594# CONFIG_PPP is not set
595# CONFIG_SLIP is not set
596# CONFIG_NET_FC is not set
597# CONFIG_SHAPER is not set
598CONFIG_NETCONSOLE=y
599CONFIG_NETPOLL=y
600# CONFIG_NETPOLL_RX is not set
601# CONFIG_NETPOLL_TRAP is not set
602CONFIG_NET_POLL_CONTROLLER=y
603
604#
605# ISDN subsystem
606#
607# CONFIG_ISDN is not set
608
609#
610# Telephony Support
611#
612# CONFIG_PHONE is not set
613
614#
615# Input device support
616#
617CONFIG_INPUT=y
618
619#
620# Userland interfaces
621#
622CONFIG_INPUT_MOUSEDEV=y
623CONFIG_INPUT_MOUSEDEV_PSAUX=y
624CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
625CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
626# CONFIG_INPUT_JOYDEV is not set
627# CONFIG_INPUT_TSDEV is not set
628# CONFIG_INPUT_EVDEV is not set
629# CONFIG_INPUT_EVBUG is not set
630
631#
632# Input Device Drivers
633#
634CONFIG_INPUT_KEYBOARD=y
635CONFIG_KEYBOARD_ATKBD=y
636# CONFIG_KEYBOARD_SUNKBD is not set
637# CONFIG_KEYBOARD_LKKBD is not set
638# CONFIG_KEYBOARD_XTKBD is not set
639# CONFIG_KEYBOARD_NEWTON is not set
640CONFIG_INPUT_MOUSE=y
641CONFIG_MOUSE_PS2=y
642# CONFIG_MOUSE_SERIAL is not set
643# CONFIG_MOUSE_VSXXXAA is not set
644# CONFIG_INPUT_JOYSTICK is not set
645# CONFIG_INPUT_TOUCHSCREEN is not set
646# CONFIG_INPUT_MISC is not set
647
648#
649# Hardware I/O ports
650#
651CONFIG_SERIO=y
652CONFIG_SERIO_I8042=y
653# CONFIG_SERIO_SERPORT is not set
654# CONFIG_SERIO_PCIPS2 is not set
655CONFIG_SERIO_LIBPS2=y
656# CONFIG_SERIO_RAW is not set
657CONFIG_GAMEPORT=m
658# CONFIG_GAMEPORT_NS558 is not set
659# CONFIG_GAMEPORT_L4 is not set
660# CONFIG_GAMEPORT_EMU10K1 is not set
661# CONFIG_GAMEPORT_FM801 is not set
662
663#
664# Character devices
665#
666CONFIG_VT=y
667CONFIG_VT_CONSOLE=y
668CONFIG_HW_CONSOLE=y
669CONFIG_SERIAL_NONSTANDARD=y
670# CONFIG_ROCKETPORT is not set
671# CONFIG_CYCLADES is not set
672# CONFIG_DIGIEPCA is not set
673# CONFIG_MOXA_SMARTIO is not set
674# CONFIG_ISI is not set
675# CONFIG_SYNCLINKMP is not set
676# CONFIG_N_HDLC is not set
677# CONFIG_SPECIALIX is not set
678# CONFIG_SX is not set
679# CONFIG_STALDRV is not set
680CONFIG_SGI_SNSC=y
681CONFIG_SGI_TIOCX=y
682CONFIG_SGI_MBCS=m
683
684#
685# Serial drivers
686#
687CONFIG_SERIAL_8250=y
688CONFIG_SERIAL_8250_CONSOLE=y
689CONFIG_SERIAL_8250_ACPI=y
690CONFIG_SERIAL_8250_NR_UARTS=6
691CONFIG_SERIAL_8250_EXTENDED=y
692CONFIG_SERIAL_8250_SHARE_IRQ=y
693# CONFIG_SERIAL_8250_DETECT_IRQ is not set
694# CONFIG_SERIAL_8250_RSA is not set
695
696#
697# Non-8250 serial port support
698#
699CONFIG_SERIAL_CORE=y
700CONFIG_SERIAL_CORE_CONSOLE=y
701CONFIG_SERIAL_SGI_L1_CONSOLE=y
702# CONFIG_SERIAL_JSM is not set
703CONFIG_SERIAL_SGI_IOC4=y
704CONFIG_UNIX98_PTYS=y
705CONFIG_LEGACY_PTYS=y
706CONFIG_LEGACY_PTY_COUNT=256
707
708#
709# IPMI
710#
711# CONFIG_IPMI_HANDLER is not set
712
713#
714# Watchdog Cards
715#
716# CONFIG_WATCHDOG is not set
717# CONFIG_HW_RANDOM is not set
718CONFIG_EFI_RTC=y
719# CONFIG_DTLK is not set
720# CONFIG_R3964 is not set
721# CONFIG_APPLICOM is not set
722
723#
724# Ftape, the floppy tape device driver
725#
726CONFIG_AGP=m
727CONFIG_AGP_I460=m
728CONFIG_AGP_HP_ZX1=m
729CONFIG_AGP_SGI_TIOCA=m
730CONFIG_DRM=m
731CONFIG_DRM_TDFX=m
732CONFIG_DRM_R128=m
733CONFIG_DRM_RADEON=m
734CONFIG_DRM_MGA=m
735CONFIG_DRM_SIS=m
736# CONFIG_DRM_VIA is not set
737# CONFIG_DRM_SAVAGE is not set
738CONFIG_RAW_DRIVER=m
739CONFIG_HPET=y
740# CONFIG_HPET_RTC_IRQ is not set
741CONFIG_HPET_MMAP=y
742CONFIG_MAX_RAW_DEVS=256
743# CONFIG_HANGCHECK_TIMER is not set
744CONFIG_MMTIMER=y
745
746#
747# TPM devices
748#
749# CONFIG_TCG_TPM is not set
750
751#
752# I2C support
753#
754# CONFIG_I2C is not set
755
756#
757# Dallas's 1-wire bus
758#
759# CONFIG_W1 is not set
760
761#
762# Hardware Monitoring support
763#
764CONFIG_HWMON=y
765# CONFIG_HWMON_VID is not set
766# CONFIG_HWMON_DEBUG_CHIP is not set
767
768#
769# Misc devices
770#
771
772#
773# Multimedia Capabilities Port drivers
774#
775
776#
777# Multimedia devices
778#
779# CONFIG_VIDEO_DEV is not set
780
781#
782# Digital Video Broadcasting Devices
783#
784# CONFIG_DVB is not set
785
786#
787# Graphics support
788#
789# CONFIG_FB is not set
790
791#
792# Console display driver support
793#
794CONFIG_VGA_CONSOLE=y
795CONFIG_DUMMY_CONSOLE=y
796
797#
798# Sound
799#
800CONFIG_SOUND=m
801
802#
803# Advanced Linux Sound Architecture
804#
805CONFIG_SND=m
806CONFIG_SND_TIMER=m
807CONFIG_SND_PCM=m
808CONFIG_SND_HWDEP=m
809CONFIG_SND_RAWMIDI=m
810CONFIG_SND_SEQUENCER=m
811CONFIG_SND_SEQ_DUMMY=m
812CONFIG_SND_OSSEMUL=y
813CONFIG_SND_MIXER_OSS=m
814CONFIG_SND_PCM_OSS=m
815CONFIG_SND_SEQUENCER_OSS=y
816CONFIG_SND_VERBOSE_PRINTK=y
817# CONFIG_SND_DEBUG is not set
818CONFIG_SND_GENERIC_DRIVER=y
819
820#
821# Generic devices
822#
823CONFIG_SND_MPU401_UART=m
824CONFIG_SND_OPL3_LIB=m
825CONFIG_SND_DUMMY=m
826CONFIG_SND_VIRMIDI=m
827CONFIG_SND_MTPAV=m
828CONFIG_SND_SERIAL_U16550=m
829CONFIG_SND_MPU401=m
830CONFIG_SND_AC97_CODEC=m
831CONFIG_SND_AC97_BUS=m
832
833#
834# PCI devices
835#
836# CONFIG_SND_ALI5451 is not set
837# CONFIG_SND_ATIIXP is not set
838# CONFIG_SND_ATIIXP_MODEM is not set
839# CONFIG_SND_AU8810 is not set
840# CONFIG_SND_AU8820 is not set
841# CONFIG_SND_AU8830 is not set
842# CONFIG_SND_AZT3328 is not set
843# CONFIG_SND_BT87X is not set
844CONFIG_SND_CS46XX=m
845CONFIG_SND_CS46XX_NEW_DSP=y
846CONFIG_SND_CS4281=m
847CONFIG_SND_EMU10K1=m
848# CONFIG_SND_EMU10K1X is not set
849# CONFIG_SND_CA0106 is not set
850# CONFIG_SND_KORG1212 is not set
851# CONFIG_SND_MIXART is not set
852# CONFIG_SND_NM256 is not set
853# CONFIG_SND_RME32 is not set
854# CONFIG_SND_RME96 is not set
855# CONFIG_SND_RME9652 is not set
856# CONFIG_SND_HDSP is not set
857# CONFIG_SND_HDSPM is not set
858# CONFIG_SND_TRIDENT is not set
859# CONFIG_SND_YMFPCI is not set
860# CONFIG_SND_AD1889 is not set
861# CONFIG_SND_CMIPCI is not set
862# CONFIG_SND_ENS1370 is not set
863# CONFIG_SND_ENS1371 is not set
864# CONFIG_SND_ES1938 is not set
865# CONFIG_SND_ES1968 is not set
866# CONFIG_SND_MAESTRO3 is not set
867CONFIG_SND_FM801=m
868# CONFIG_SND_FM801_TEA575X is not set
869# CONFIG_SND_ICE1712 is not set
870# CONFIG_SND_ICE1724 is not set
871# CONFIG_SND_INTEL8X0 is not set
872# CONFIG_SND_INTEL8X0M is not set
873# CONFIG_SND_SONICVIBES is not set
874# CONFIG_SND_VIA82XX is not set
875# CONFIG_SND_VIA82XX_MODEM is not set
876# CONFIG_SND_VX222 is not set
877# CONFIG_SND_HDA_INTEL is not set
878
879#
880# USB devices
881#
882# CONFIG_SND_USB_AUDIO is not set
883
884#
885# Open Sound System
886#
887# CONFIG_SOUND_PRIME is not set
888
889#
890# USB support
891#
892CONFIG_USB_ARCH_HAS_HCD=y
893CONFIG_USB_ARCH_HAS_OHCI=y
894CONFIG_USB=m
895# CONFIG_USB_DEBUG is not set
896
897#
898# Miscellaneous USB options
899#
900CONFIG_USB_DEVICEFS=y
901# CONFIG_USB_BANDWIDTH is not set
902# CONFIG_USB_DYNAMIC_MINORS is not set
903# CONFIG_USB_SUSPEND is not set
904# CONFIG_USB_OTG is not set
905
906#
907# USB Host Controller Drivers
908#
909CONFIG_USB_EHCI_HCD=m
910# CONFIG_USB_EHCI_SPLIT_ISO is not set
911# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
912# CONFIG_USB_ISP116X_HCD is not set
913CONFIG_USB_OHCI_HCD=m
914# CONFIG_USB_OHCI_BIG_ENDIAN is not set
915CONFIG_USB_OHCI_LITTLE_ENDIAN=y
916CONFIG_USB_UHCI_HCD=m
917# CONFIG_USB_SL811_HCD is not set
918
919#
920# USB Device Class drivers
921#
922# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
923# CONFIG_USB_BLUETOOTH_TTY is not set
924# CONFIG_USB_ACM is not set
925# CONFIG_USB_PRINTER is not set
926
927#
928# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
929#
930CONFIG_USB_STORAGE=m
931# CONFIG_USB_STORAGE_DEBUG is not set
932# CONFIG_USB_STORAGE_DATAFAB is not set
933# CONFIG_USB_STORAGE_FREECOM is not set
934# CONFIG_USB_STORAGE_ISD200 is not set
935# CONFIG_USB_STORAGE_DPCM is not set
936# CONFIG_USB_STORAGE_USBAT is not set
937# CONFIG_USB_STORAGE_SDDR09 is not set
938# CONFIG_USB_STORAGE_SDDR55 is not set
939# CONFIG_USB_STORAGE_JUMPSHOT is not set
940
941#
942# USB Input Devices
943#
944CONFIG_USB_HID=m
945CONFIG_USB_HIDINPUT=y
946# CONFIG_HID_FF is not set
947# CONFIG_USB_HIDDEV is not set
948
949#
950# USB HID Boot Protocol drivers
951#
952# CONFIG_USB_KBD is not set
953# CONFIG_USB_MOUSE is not set
954# CONFIG_USB_AIPTEK is not set
955# CONFIG_USB_WACOM is not set
956# CONFIG_USB_ACECAD is not set
957# CONFIG_USB_KBTAB is not set
958# CONFIG_USB_POWERMATE is not set
959# CONFIG_USB_MTOUCH is not set
960# CONFIG_USB_ITMTOUCH is not set
961# CONFIG_USB_EGALAX is not set
962# CONFIG_USB_YEALINK is not set
963# CONFIG_USB_XPAD is not set
964# CONFIG_USB_ATI_REMOTE is not set
965# CONFIG_USB_KEYSPAN_REMOTE is not set
966# CONFIG_USB_APPLETOUCH is not set
967
968#
969# USB Imaging devices
970#
971# CONFIG_USB_MDC800 is not set
972# CONFIG_USB_MICROTEK is not set
973
974#
975# USB Multimedia devices
976#
977# CONFIG_USB_DABUSB is not set
978
979#
980# Video4Linux support is needed for USB Multimedia device support
981#
982
983#
984# USB Network Adapters
985#
986# CONFIG_USB_CATC is not set
987# CONFIG_USB_KAWETH is not set
988# CONFIG_USB_PEGASUS is not set
989# CONFIG_USB_RTL8150 is not set
990# CONFIG_USB_USBNET is not set
991CONFIG_USB_MON=y
992
993#
994# USB port drivers
995#
996
997#
998# USB Serial Converter support
999#
1000# CONFIG_USB_SERIAL is not set
1001
1002#
1003# USB Miscellaneous drivers
1004#
1005# CONFIG_USB_EMI62 is not set
1006# CONFIG_USB_EMI26 is not set
1007# CONFIG_USB_AUERSWALD is not set
1008# CONFIG_USB_RIO500 is not set
1009# CONFIG_USB_LEGOTOWER is not set
1010# CONFIG_USB_LCD is not set
1011# CONFIG_USB_LED is not set
1012# CONFIG_USB_CYTHERM is not set
1013# CONFIG_USB_PHIDGETKIT is not set
1014# CONFIG_USB_PHIDGETSERVO is not set
1015# CONFIG_USB_IDMOUSE is not set
1016# CONFIG_USB_SISUSBVGA is not set
1017# CONFIG_USB_LD is not set
1018# CONFIG_USB_TEST is not set
1019
1020#
1021# USB DSL modem support
1022#
1023
1024#
1025# USB Gadget Support
1026#
1027# CONFIG_USB_GADGET is not set
1028
1029#
1030# MMC/SD Card support
1031#
1032# CONFIG_MMC is not set
1033
1034#
1035# InfiniBand support
1036#
1037CONFIG_INFINIBAND=m
1038# CONFIG_INFINIBAND_USER_MAD is not set
1039# CONFIG_INFINIBAND_USER_ACCESS is not set
1040CONFIG_INFINIBAND_MTHCA=m
1041# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
1042CONFIG_INFINIBAND_IPOIB=m
1043# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
1044
1045#
1046# SN Devices
1047#
1048CONFIG_SGI_IOC4=y
1049
1050#
1051# File systems
1052#
1053CONFIG_EXT2_FS=y
1054CONFIG_EXT2_FS_XATTR=y
1055CONFIG_EXT2_FS_POSIX_ACL=y
1056CONFIG_EXT2_FS_SECURITY=y
1057# CONFIG_EXT2_FS_XIP is not set
1058CONFIG_EXT3_FS=y
1059CONFIG_EXT3_FS_XATTR=y
1060CONFIG_EXT3_FS_POSIX_ACL=y
1061CONFIG_EXT3_FS_SECURITY=y
1062CONFIG_JBD=y
1063# CONFIG_JBD_DEBUG is not set
1064CONFIG_FS_MBCACHE=y
1065CONFIG_REISERFS_FS=y
1066# CONFIG_REISERFS_CHECK is not set
1067# CONFIG_REISERFS_PROC_INFO is not set
1068CONFIG_REISERFS_FS_XATTR=y
1069CONFIG_REISERFS_FS_POSIX_ACL=y
1070CONFIG_REISERFS_FS_SECURITY=y
1071# CONFIG_JFS_FS is not set
1072CONFIG_FS_POSIX_ACL=y
1073CONFIG_XFS_FS=y
1074CONFIG_XFS_EXPORT=y
1075# CONFIG_XFS_QUOTA is not set
1076# CONFIG_XFS_SECURITY is not set
1077# CONFIG_XFS_POSIX_ACL is not set
1078# CONFIG_XFS_RT is not set
1079# CONFIG_MINIX_FS is not set
1080# CONFIG_ROMFS_FS is not set
1081CONFIG_INOTIFY=y
1082# CONFIG_QUOTA is not set
1083CONFIG_DNOTIFY=y
1084CONFIG_AUTOFS_FS=y
1085CONFIG_AUTOFS4_FS=y
1086# CONFIG_FUSE_FS is not set
1087
1088#
1089# CD-ROM/DVD Filesystems
1090#
1091CONFIG_ISO9660_FS=m
1092CONFIG_JOLIET=y
1093# CONFIG_ZISOFS is not set
1094CONFIG_UDF_FS=m
1095CONFIG_UDF_NLS=y
1096
1097#
1098# DOS/FAT/NT Filesystems
1099#
1100CONFIG_FAT_FS=y
1101# CONFIG_MSDOS_FS is not set
1102CONFIG_VFAT_FS=y
1103CONFIG_FAT_DEFAULT_CODEPAGE=437
1104CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1105CONFIG_NTFS_FS=m
1106# CONFIG_NTFS_DEBUG is not set
1107# CONFIG_NTFS_RW is not set
1108
1109#
1110# Pseudo filesystems
1111#
1112CONFIG_PROC_FS=y
1113CONFIG_PROC_KCORE=y
1114CONFIG_SYSFS=y
1115CONFIG_TMPFS=y
1116CONFIG_HUGETLBFS=y
1117CONFIG_HUGETLB_PAGE=y
1118CONFIG_RAMFS=y
1119# CONFIG_RELAYFS_FS is not set
1120
1121#
1122# Miscellaneous filesystems
1123#
1124# CONFIG_ADFS_FS is not set
1125# CONFIG_AFFS_FS is not set
1126# CONFIG_HFS_FS is not set
1127# CONFIG_HFSPLUS_FS is not set
1128# CONFIG_BEFS_FS is not set
1129# CONFIG_BFS_FS is not set
1130# CONFIG_EFS_FS is not set
1131# CONFIG_CRAMFS is not set
1132# CONFIG_VXFS_FS is not set
1133# CONFIG_HPFS_FS is not set
1134# CONFIG_QNX4FS_FS is not set
1135# CONFIG_SYSV_FS is not set
1136# CONFIG_UFS_FS is not set
1137
1138#
1139# Network File Systems
1140#
1141CONFIG_NFS_FS=m
1142CONFIG_NFS_V3=y
1143# CONFIG_NFS_V3_ACL is not set
1144CONFIG_NFS_V4=y
1145CONFIG_NFS_DIRECTIO=y
1146CONFIG_NFSD=m
1147CONFIG_NFSD_V3=y
1148# CONFIG_NFSD_V3_ACL is not set
1149CONFIG_NFSD_V4=y
1150CONFIG_NFSD_TCP=y
1151CONFIG_LOCKD=m
1152CONFIG_LOCKD_V4=y
1153CONFIG_EXPORTFS=y
1154CONFIG_NFS_COMMON=y
1155CONFIG_SUNRPC=m
1156CONFIG_SUNRPC_GSS=m
1157CONFIG_RPCSEC_GSS_KRB5=m
1158# CONFIG_RPCSEC_GSS_SPKM3 is not set
1159CONFIG_SMB_FS=m
1160CONFIG_SMB_NLS_DEFAULT=y
1161CONFIG_SMB_NLS_REMOTE="cp437"
1162CONFIG_CIFS=m
1163# CONFIG_CIFS_STATS is not set
1164# CONFIG_CIFS_XATTR is not set
1165# CONFIG_CIFS_EXPERIMENTAL is not set
1166# CONFIG_NCP_FS is not set
1167# CONFIG_CODA_FS is not set
1168# CONFIG_AFS_FS is not set
1169# CONFIG_9P_FS is not set
1170
1171#
1172# Partition Types
1173#
1174CONFIG_PARTITION_ADVANCED=y
1175# CONFIG_ACORN_PARTITION is not set
1176# CONFIG_OSF_PARTITION is not set
1177# CONFIG_AMIGA_PARTITION is not set
1178# CONFIG_ATARI_PARTITION is not set
1179# CONFIG_MAC_PARTITION is not set
1180CONFIG_MSDOS_PARTITION=y
1181# CONFIG_BSD_DISKLABEL is not set
1182# CONFIG_MINIX_SUBPARTITION is not set
1183# CONFIG_SOLARIS_X86_PARTITION is not set
1184# CONFIG_UNIXWARE_DISKLABEL is not set
1185# CONFIG_LDM_PARTITION is not set
1186CONFIG_SGI_PARTITION=y
1187# CONFIG_ULTRIX_PARTITION is not set
1188# CONFIG_SUN_PARTITION is not set
1189CONFIG_EFI_PARTITION=y
1190
1191#
1192# Native Language Support
1193#
1194CONFIG_NLS=y
1195CONFIG_NLS_DEFAULT="iso8859-1"
1196CONFIG_NLS_CODEPAGE_437=y
1197CONFIG_NLS_CODEPAGE_737=m
1198CONFIG_NLS_CODEPAGE_775=m
1199CONFIG_NLS_CODEPAGE_850=m
1200CONFIG_NLS_CODEPAGE_852=m
1201CONFIG_NLS_CODEPAGE_855=m
1202CONFIG_NLS_CODEPAGE_857=m
1203CONFIG_NLS_CODEPAGE_860=m
1204CONFIG_NLS_CODEPAGE_861=m
1205CONFIG_NLS_CODEPAGE_862=m
1206CONFIG_NLS_CODEPAGE_863=m
1207CONFIG_NLS_CODEPAGE_864=m
1208CONFIG_NLS_CODEPAGE_865=m
1209CONFIG_NLS_CODEPAGE_866=m
1210CONFIG_NLS_CODEPAGE_869=m
1211CONFIG_NLS_CODEPAGE_936=m
1212CONFIG_NLS_CODEPAGE_950=m
1213CONFIG_NLS_CODEPAGE_932=m
1214CONFIG_NLS_CODEPAGE_949=m
1215CONFIG_NLS_CODEPAGE_874=m
1216CONFIG_NLS_ISO8859_8=m
1217CONFIG_NLS_CODEPAGE_1250=m
1218CONFIG_NLS_CODEPAGE_1251=m
1219# CONFIG_NLS_ASCII is not set
1220CONFIG_NLS_ISO8859_1=y
1221CONFIG_NLS_ISO8859_2=m
1222CONFIG_NLS_ISO8859_3=m
1223CONFIG_NLS_ISO8859_4=m
1224CONFIG_NLS_ISO8859_5=m
1225CONFIG_NLS_ISO8859_6=m
1226CONFIG_NLS_ISO8859_7=m
1227CONFIG_NLS_ISO8859_9=m
1228CONFIG_NLS_ISO8859_13=m
1229CONFIG_NLS_ISO8859_14=m
1230CONFIG_NLS_ISO8859_15=m
1231CONFIG_NLS_KOI8_R=m
1232CONFIG_NLS_KOI8_U=m
1233CONFIG_NLS_UTF8=m
1234
1235#
1236# Library routines
1237#
1238# CONFIG_CRC_CCITT is not set
1239# CONFIG_CRC16 is not set
1240CONFIG_CRC32=y
1241# CONFIG_LIBCRC32C is not set
1242CONFIG_GENERIC_HARDIRQS=y
1243CONFIG_GENERIC_IRQ_PROBE=y
1244CONFIG_GENERIC_PENDING_IRQ=y
1245
1246#
1247# HP Simulator drivers
1248#
1249# CONFIG_HP_SIMETH is not set
1250# CONFIG_HP_SIMSERIAL is not set
1251# CONFIG_HP_SIMSCSI is not set
1252
1253#
1254# Profiling support
1255#
1256# CONFIG_PROFILING is not set
1257
1258#
1259# Kernel hacking
1260#
1261# CONFIG_PRINTK_TIME is not set
1262CONFIG_DEBUG_KERNEL=y
1263CONFIG_MAGIC_SYSRQ=y
1264CONFIG_LOG_BUF_SHIFT=20
1265CONFIG_DETECT_SOFTLOCKUP=y
1266# CONFIG_SCHEDSTATS is not set
1267# CONFIG_DEBUG_SLAB is not set
1268# CONFIG_DEBUG_SPINLOCK is not set
1269# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1270# CONFIG_DEBUG_KOBJECT is not set
1271# CONFIG_DEBUG_INFO is not set
1272# CONFIG_DEBUG_FS is not set
1273# CONFIG_KPROBES is not set
1274CONFIG_IA64_GRANULE_16MB=y
1275# CONFIG_IA64_GRANULE_64MB is not set
1276# CONFIG_IA64_PRINT_HAZARDS is not set
1277# CONFIG_DISABLE_VHPT is not set
1278# CONFIG_IA64_DEBUG_CMPXCHG is not set
1279# CONFIG_IA64_DEBUG_IRQ is not set
1280CONFIG_SYSVIPC_COMPAT=y
1281
1282#
1283# Security options
1284#
1285# CONFIG_KEYS is not set
1286# CONFIG_SECURITY is not set
1287
1288#
1289# Cryptographic options
1290#
1291CONFIG_CRYPTO=y
1292# CONFIG_CRYPTO_HMAC is not set
1293# CONFIG_CRYPTO_NULL is not set
1294# CONFIG_CRYPTO_MD4 is not set
1295CONFIG_CRYPTO_MD5=y
1296# CONFIG_CRYPTO_SHA1 is not set
1297# CONFIG_CRYPTO_SHA256 is not set
1298# CONFIG_CRYPTO_SHA512 is not set
1299# CONFIG_CRYPTO_WP512 is not set
1300# CONFIG_CRYPTO_TGR192 is not set
1301CONFIG_CRYPTO_DES=m
1302# CONFIG_CRYPTO_BLOWFISH is not set
1303# CONFIG_CRYPTO_TWOFISH is not set
1304# CONFIG_CRYPTO_SERPENT is not set
1305# CONFIG_CRYPTO_AES is not set
1306# CONFIG_CRYPTO_CAST5 is not set
1307# CONFIG_CRYPTO_CAST6 is not set
1308# CONFIG_CRYPTO_TEA is not set
1309# CONFIG_CRYPTO_ARC4 is not set
1310# CONFIG_CRYPTO_KHAZAD is not set
1311# CONFIG_CRYPTO_ANUBIS is not set
1312# CONFIG_CRYPTO_DEFLATE is not set
1313# CONFIG_CRYPTO_MICHAEL_MIC is not set
1314# CONFIG_CRYPTO_CRC32C is not set
1315# CONFIG_CRYPTO_TEST is not set
1316
1317#
1318# Hardware crypto devices
1319#
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig
index 08112ab38468..87cfd31a4a39 100644
--- a/arch/ia64/configs/sn2_defconfig
+++ b/arch/ia64/configs/sn2_defconfig
@@ -80,6 +80,8 @@ CONFIG_MCKINLEY=y
80# CONFIG_IA64_PAGE_SIZE_8KB is not set 80# CONFIG_IA64_PAGE_SIZE_8KB is not set
81CONFIG_IA64_PAGE_SIZE_16KB=y 81CONFIG_IA64_PAGE_SIZE_16KB=y
82# CONFIG_IA64_PAGE_SIZE_64KB is not set 82# CONFIG_IA64_PAGE_SIZE_64KB is not set
83# CONFIG_PGTABLE_3 is not set
84CONFIG_PGTABLE_4=y
83# CONFIG_HZ_100 is not set 85# CONFIG_HZ_100 is not set
84CONFIG_HZ_250=y 86CONFIG_HZ_250=y
85# CONFIG_HZ_1000 is not set 87# CONFIG_HZ_1000 is not set
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig
index d452e18ac494..9bc8bcafc905 100644
--- a/arch/ia64/configs/tiger_defconfig
+++ b/arch/ia64/configs/tiger_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc6-tiger-smp 3# Linux kernel version: 2.6.14-rc1
4# Wed Aug 17 10:19:51 2005 4# Wed Sep 14 15:17:57 2005
5# 5#
6 6
7# 7#
@@ -16,6 +16,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
16# General setup 16# General setup
17# 17#
18CONFIG_LOCALVERSION="" 18CONFIG_LOCALVERSION=""
19CONFIG_LOCALVERSION_AUTO=y
19CONFIG_SWAP=y 20CONFIG_SWAP=y
20CONFIG_SYSVIPC=y 21CONFIG_SYSVIPC=y
21CONFIG_POSIX_MQUEUE=y 22CONFIG_POSIX_MQUEUE=y
@@ -27,6 +28,7 @@ CONFIG_KOBJECT_UEVENT=y
27CONFIG_IKCONFIG=y 28CONFIG_IKCONFIG=y
28CONFIG_IKCONFIG_PROC=y 29CONFIG_IKCONFIG_PROC=y
29# CONFIG_CPUSETS is not set 30# CONFIG_CPUSETS is not set
31CONFIG_INITRAMFS_SOURCE=""
30# CONFIG_EMBEDDED is not set 32# CONFIG_EMBEDDED is not set
31CONFIG_KALLSYMS=y 33CONFIG_KALLSYMS=y
32CONFIG_KALLSYMS_ALL=y 34CONFIG_KALLSYMS_ALL=y
@@ -103,6 +105,7 @@ CONFIG_FLATMEM_MANUAL=y
103# CONFIG_SPARSEMEM_MANUAL is not set 105# CONFIG_SPARSEMEM_MANUAL is not set
104CONFIG_FLATMEM=y 106CONFIG_FLATMEM=y
105CONFIG_FLAT_NODE_MEM_MAP=y 107CONFIG_FLAT_NODE_MEM_MAP=y
108# CONFIG_SPARSEMEM_STATIC is not set
106CONFIG_HAVE_DEC_LOCK=y 109CONFIG_HAVE_DEC_LOCK=y
107CONFIG_IA32_SUPPORT=y 110CONFIG_IA32_SUPPORT=y
108CONFIG_COMPAT=y 111CONFIG_COMPAT=y
@@ -115,6 +118,7 @@ CONFIG_IA64_PALINFO=y
115# 118#
116CONFIG_EFI_VARS=y 119CONFIG_EFI_VARS=y
117CONFIG_EFI_PCDP=y 120CONFIG_EFI_PCDP=y
121# CONFIG_DELL_RBU is not set
118CONFIG_BINFMT_ELF=y 122CONFIG_BINFMT_ELF=y
119CONFIG_BINFMT_MISC=m 123CONFIG_BINFMT_MISC=m
120 124
@@ -122,20 +126,27 @@ CONFIG_BINFMT_MISC=m
122# Power management and ACPI 126# Power management and ACPI
123# 127#
124CONFIG_PM=y 128CONFIG_PM=y
125CONFIG_ACPI=y 129# CONFIG_PM_DEBUG is not set
126 130
127# 131#
128# ACPI (Advanced Configuration and Power Interface) Support 132# ACPI (Advanced Configuration and Power Interface) Support
129# 133#
134CONFIG_ACPI=y
130CONFIG_ACPI_BUTTON=m 135CONFIG_ACPI_BUTTON=m
131CONFIG_ACPI_FAN=m 136CONFIG_ACPI_FAN=m
132CONFIG_ACPI_PROCESSOR=m 137CONFIG_ACPI_PROCESSOR=m
133# CONFIG_ACPI_HOTPLUG_CPU is not set 138CONFIG_ACPI_HOTPLUG_CPU=y
134CONFIG_ACPI_THERMAL=m 139CONFIG_ACPI_THERMAL=m
140CONFIG_ACPI_BLACKLIST_YEAR=0
135# CONFIG_ACPI_DEBUG is not set 141# CONFIG_ACPI_DEBUG is not set
136CONFIG_ACPI_POWER=y 142CONFIG_ACPI_POWER=y
137CONFIG_ACPI_SYSTEM=y 143CONFIG_ACPI_SYSTEM=y
138# CONFIG_ACPI_CONTAINER is not set 144CONFIG_ACPI_CONTAINER=m
145
146#
147# CPU Frequency scaling
148#
149# CONFIG_CPU_FREQ is not set
139 150
140# 151#
141# Bus options (PCI, PCMCIA) 152# Bus options (PCI, PCMCIA)
@@ -144,7 +155,6 @@ CONFIG_PCI=y
144CONFIG_PCI_DOMAINS=y 155CONFIG_PCI_DOMAINS=y
145# CONFIG_PCI_MSI is not set 156# CONFIG_PCI_MSI is not set
146CONFIG_PCI_LEGACY_PROC=y 157CONFIG_PCI_LEGACY_PROC=y
147CONFIG_PCI_NAMES=y
148# CONFIG_PCI_DEBUG is not set 158# CONFIG_PCI_DEBUG is not set
149 159
150# 160#
@@ -188,14 +198,19 @@ CONFIG_SYN_COOKIES=y
188# CONFIG_INET_ESP is not set 198# CONFIG_INET_ESP is not set
189# CONFIG_INET_IPCOMP is not set 199# CONFIG_INET_IPCOMP is not set
190# CONFIG_INET_TUNNEL is not set 200# CONFIG_INET_TUNNEL is not set
191CONFIG_IP_TCPDIAG=y 201CONFIG_INET_DIAG=y
192# CONFIG_IP_TCPDIAG_IPV6 is not set 202CONFIG_INET_TCP_DIAG=y
193# CONFIG_TCP_CONG_ADVANCED is not set 203# CONFIG_TCP_CONG_ADVANCED is not set
194CONFIG_TCP_CONG_BIC=y 204CONFIG_TCP_CONG_BIC=y
195# CONFIG_IPV6 is not set 205# CONFIG_IPV6 is not set
196# CONFIG_NETFILTER is not set 206# CONFIG_NETFILTER is not set
197 207
198# 208#
209# DCCP Configuration (EXPERIMENTAL)
210#
211# CONFIG_IP_DCCP is not set
212
213#
199# SCTP Configuration (EXPERIMENTAL) 214# SCTP Configuration (EXPERIMENTAL)
200# 215#
201# CONFIG_IP_SCTP is not set 216# CONFIG_IP_SCTP is not set
@@ -218,9 +233,11 @@ CONFIG_TCP_CONG_BIC=y
218# Network testing 233# Network testing
219# 234#
220# CONFIG_NET_PKTGEN is not set 235# CONFIG_NET_PKTGEN is not set
236# CONFIG_NETFILTER_NETLINK is not set
221# CONFIG_HAMRADIO is not set 237# CONFIG_HAMRADIO is not set
222# CONFIG_IRDA is not set 238# CONFIG_IRDA is not set
223# CONFIG_BT is not set 239# CONFIG_BT is not set
240# CONFIG_IEEE80211 is not set
224 241
225# 242#
226# Device Drivers 243# Device Drivers
@@ -235,6 +252,11 @@ CONFIG_FW_LOADER=m
235# CONFIG_DEBUG_DRIVER is not set 252# CONFIG_DEBUG_DRIVER is not set
236 253
237# 254#
255# Connector - unified userspace <-> kernelspace linker
256#
257# CONFIG_CONNECTOR is not set
258
259#
238# Memory Technology Devices (MTD) 260# Memory Technology Devices (MTD)
239# 261#
240# CONFIG_MTD is not set 262# CONFIG_MTD is not set
@@ -247,7 +269,13 @@ CONFIG_FW_LOADER=m
247# 269#
248# Plug and Play support 270# Plug and Play support
249# 271#
250# CONFIG_PNP is not set 272CONFIG_PNP=y
273# CONFIG_PNP_DEBUG is not set
274
275#
276# Protocols
277#
278CONFIG_PNPACPI=y
251 279
252# 280#
253# Block devices 281# Block devices
@@ -266,7 +294,6 @@ CONFIG_BLK_DEV_RAM=y
266CONFIG_BLK_DEV_RAM_COUNT=16 294CONFIG_BLK_DEV_RAM_COUNT=16
267CONFIG_BLK_DEV_RAM_SIZE=4096 295CONFIG_BLK_DEV_RAM_SIZE=4096
268CONFIG_BLK_DEV_INITRD=y 296CONFIG_BLK_DEV_INITRD=y
269CONFIG_INITRAMFS_SOURCE=""
270# CONFIG_CDROM_PKTCDVD is not set 297# CONFIG_CDROM_PKTCDVD is not set
271 298
272# 299#
@@ -299,7 +326,8 @@ CONFIG_BLK_DEV_IDESCSI=m
299# 326#
300# IDE chipset support/bugfixes 327# IDE chipset support/bugfixes
301# 328#
302CONFIG_IDE_GENERIC=y 329# CONFIG_IDE_GENERIC is not set
330# CONFIG_BLK_DEV_IDEPNP is not set
303CONFIG_BLK_DEV_IDEPCI=y 331CONFIG_BLK_DEV_IDEPCI=y
304# CONFIG_IDEPCI_SHARE_IRQ is not set 332# CONFIG_IDEPCI_SHARE_IRQ is not set
305# CONFIG_BLK_DEV_OFFBOARD is not set 333# CONFIG_BLK_DEV_OFFBOARD is not set
@@ -339,6 +367,7 @@ CONFIG_IDEDMA_AUTO=y
339# 367#
340# SCSI device support 368# SCSI device support
341# 369#
370# CONFIG_RAID_ATTRS is not set
342CONFIG_SCSI=y 371CONFIG_SCSI=y
343CONFIG_SCSI_PROC_FS=y 372CONFIG_SCSI_PROC_FS=y
344 373
@@ -366,6 +395,7 @@ CONFIG_CHR_DEV_SG=m
366CONFIG_SCSI_SPI_ATTRS=y 395CONFIG_SCSI_SPI_ATTRS=y
367CONFIG_SCSI_FC_ATTRS=y 396CONFIG_SCSI_FC_ATTRS=y
368# CONFIG_SCSI_ISCSI_ATTRS is not set 397# CONFIG_SCSI_ISCSI_ATTRS is not set
398# CONFIG_SCSI_SAS_ATTRS is not set
369 399
370# 400#
371# SCSI low-level drivers 401# SCSI low-level drivers
@@ -454,6 +484,7 @@ CONFIG_DUMMY=m
454# CONFIG_BONDING is not set 484# CONFIG_BONDING is not set
455# CONFIG_EQUALIZER is not set 485# CONFIG_EQUALIZER is not set
456# CONFIG_TUN is not set 486# CONFIG_TUN is not set
487# CONFIG_NET_SB1000 is not set
457 488
458# 489#
459# ARCnet devices 490# ARCnet devices
@@ -461,6 +492,11 @@ CONFIG_DUMMY=m
461# CONFIG_ARCNET is not set 492# CONFIG_ARCNET is not set
462 493
463# 494#
495# PHY device support
496#
497# CONFIG_PHYLIB is not set
498
499#
464# Ethernet (10 or 100Mbit) 500# Ethernet (10 or 100Mbit)
465# 501#
466CONFIG_NET_ETHERNET=y 502CONFIG_NET_ETHERNET=y
@@ -481,6 +517,7 @@ CONFIG_TULIP=m
481# CONFIG_DE4X5 is not set 517# CONFIG_DE4X5 is not set
482# CONFIG_WINBOND_840 is not set 518# CONFIG_WINBOND_840 is not set
483# CONFIG_DM9102 is not set 519# CONFIG_DM9102 is not set
520# CONFIG_ULI526X is not set
484# CONFIG_HP100 is not set 521# CONFIG_HP100 is not set
485CONFIG_NET_PCI=y 522CONFIG_NET_PCI=y
486# CONFIG_PCNET32 is not set 523# CONFIG_PCNET32 is not set
@@ -512,6 +549,7 @@ CONFIG_E1000=y
512# CONFIG_HAMACHI is not set 549# CONFIG_HAMACHI is not set
513# CONFIG_YELLOWFIN is not set 550# CONFIG_YELLOWFIN is not set
514# CONFIG_R8169 is not set 551# CONFIG_R8169 is not set
552# CONFIG_SIS190 is not set
515# CONFIG_SKGE is not set 553# CONFIG_SKGE is not set
516# CONFIG_SK98LIN is not set 554# CONFIG_SK98LIN is not set
517# CONFIG_VIA_VELOCITY is not set 555# CONFIG_VIA_VELOCITY is not set
@@ -521,6 +559,7 @@ CONFIG_TIGON3=y
521# 559#
522# Ethernet (10000 Mbit) 560# Ethernet (10000 Mbit)
523# 561#
562# CONFIG_CHELSIO_T1 is not set
524# CONFIG_IXGB is not set 563# CONFIG_IXGB is not set
525# CONFIG_S2IO is not set 564# CONFIG_S2IO is not set
526 565
@@ -618,6 +657,7 @@ CONFIG_HW_CONSOLE=y
618CONFIG_SERIAL_NONSTANDARD=y 657CONFIG_SERIAL_NONSTANDARD=y
619# CONFIG_ROCKETPORT is not set 658# CONFIG_ROCKETPORT is not set
620# CONFIG_CYCLADES is not set 659# CONFIG_CYCLADES is not set
660# CONFIG_DIGIEPCA is not set
621# CONFIG_MOXA_SMARTIO is not set 661# CONFIG_MOXA_SMARTIO is not set
622# CONFIG_ISI is not set 662# CONFIG_ISI is not set
623# CONFIG_SYNCLINKMP is not set 663# CONFIG_SYNCLINKMP is not set
@@ -675,6 +715,7 @@ CONFIG_DRM_RADEON=m
675CONFIG_DRM_MGA=m 715CONFIG_DRM_MGA=m
676CONFIG_DRM_SIS=m 716CONFIG_DRM_SIS=m
677# CONFIG_DRM_VIA is not set 717# CONFIG_DRM_VIA is not set
718# CONFIG_DRM_SAVAGE is not set
678CONFIG_RAW_DRIVER=m 719CONFIG_RAW_DRIVER=m
679CONFIG_HPET=y 720CONFIG_HPET=y
680# CONFIG_HPET_RTC_IRQ is not set 721# CONFIG_HPET_RTC_IRQ is not set
@@ -691,7 +732,6 @@ CONFIG_MAX_RAW_DEVS=256
691# I2C support 732# I2C support
692# 733#
693# CONFIG_I2C is not set 734# CONFIG_I2C is not set
694# CONFIG_I2C_SENSOR is not set
695 735
696# 736#
697# Dallas's 1-wire bus 737# Dallas's 1-wire bus
@@ -702,6 +742,7 @@ CONFIG_MAX_RAW_DEVS=256
702# Hardware Monitoring support 742# Hardware Monitoring support
703# 743#
704CONFIG_HWMON=y 744CONFIG_HWMON=y
745# CONFIG_HWMON_VID is not set
705# CONFIG_HWMON_DEBUG_CHIP is not set 746# CONFIG_HWMON_DEBUG_CHIP is not set
706 747
707# 748#
@@ -709,6 +750,10 @@ CONFIG_HWMON=y
709# 750#
710 751
711# 752#
753# Multimedia Capabilities Port drivers
754#
755
756#
712# Multimedia devices 757# Multimedia devices
713# 758#
714# CONFIG_VIDEO_DEV is not set 759# CONFIG_VIDEO_DEV is not set
@@ -800,9 +845,11 @@ CONFIG_USB_HIDINPUT=y
800# CONFIG_USB_MTOUCH is not set 845# CONFIG_USB_MTOUCH is not set
801# CONFIG_USB_ITMTOUCH is not set 846# CONFIG_USB_ITMTOUCH is not set
802# CONFIG_USB_EGALAX is not set 847# CONFIG_USB_EGALAX is not set
848# CONFIG_USB_YEALINK is not set
803# CONFIG_USB_XPAD is not set 849# CONFIG_USB_XPAD is not set
804# CONFIG_USB_ATI_REMOTE is not set 850# CONFIG_USB_ATI_REMOTE is not set
805# CONFIG_USB_KEYSPAN_REMOTE is not set 851# CONFIG_USB_KEYSPAN_REMOTE is not set
852# CONFIG_USB_APPLETOUCH is not set
806 853
807# 854#
808# USB Imaging devices 855# USB Imaging devices
@@ -902,16 +949,12 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
902CONFIG_REISERFS_FS_SECURITY=y 949CONFIG_REISERFS_FS_SECURITY=y
903# CONFIG_JFS_FS is not set 950# CONFIG_JFS_FS is not set
904CONFIG_FS_POSIX_ACL=y 951CONFIG_FS_POSIX_ACL=y
905
906#
907# XFS support
908#
909CONFIG_XFS_FS=y 952CONFIG_XFS_FS=y
910CONFIG_XFS_EXPORT=y 953CONFIG_XFS_EXPORT=y
911# CONFIG_XFS_RT is not set
912# CONFIG_XFS_QUOTA is not set 954# CONFIG_XFS_QUOTA is not set
913# CONFIG_XFS_SECURITY is not set 955# CONFIG_XFS_SECURITY is not set
914# CONFIG_XFS_POSIX_ACL is not set 956# CONFIG_XFS_POSIX_ACL is not set
957# CONFIG_XFS_RT is not set
915# CONFIG_MINIX_FS is not set 958# CONFIG_MINIX_FS is not set
916# CONFIG_ROMFS_FS is not set 959# CONFIG_ROMFS_FS is not set
917CONFIG_INOTIFY=y 960CONFIG_INOTIFY=y
@@ -919,6 +962,7 @@ CONFIG_INOTIFY=y
919CONFIG_DNOTIFY=y 962CONFIG_DNOTIFY=y
920CONFIG_AUTOFS_FS=y 963CONFIG_AUTOFS_FS=y
921CONFIG_AUTOFS4_FS=y 964CONFIG_AUTOFS4_FS=y
965# CONFIG_FUSE_FS is not set
922 966
923# 967#
924# CD-ROM/DVD Filesystems 968# CD-ROM/DVD Filesystems
@@ -947,13 +991,11 @@ CONFIG_NTFS_FS=m
947CONFIG_PROC_FS=y 991CONFIG_PROC_FS=y
948CONFIG_PROC_KCORE=y 992CONFIG_PROC_KCORE=y
949CONFIG_SYSFS=y 993CONFIG_SYSFS=y
950# CONFIG_DEVPTS_FS_XATTR is not set
951CONFIG_TMPFS=y 994CONFIG_TMPFS=y
952CONFIG_TMPFS_XATTR=y
953CONFIG_TMPFS_SECURITY=y
954CONFIG_HUGETLBFS=y 995CONFIG_HUGETLBFS=y
955CONFIG_HUGETLB_PAGE=y 996CONFIG_HUGETLB_PAGE=y
956CONFIG_RAMFS=y 997CONFIG_RAMFS=y
998# CONFIG_RELAYFS_FS is not set
957 999
958# 1000#
959# Miscellaneous filesystems 1001# Miscellaneous filesystems
@@ -1003,6 +1045,7 @@ CONFIG_CIFS=m
1003# CONFIG_NCP_FS is not set 1045# CONFIG_NCP_FS is not set
1004# CONFIG_CODA_FS is not set 1046# CONFIG_CODA_FS is not set
1005# CONFIG_AFS_FS is not set 1047# CONFIG_AFS_FS is not set
1048# CONFIG_9P_FS is not set
1006 1049
1007# 1050#
1008# Partition Types 1051# Partition Types
@@ -1072,10 +1115,12 @@ CONFIG_NLS_UTF8=m
1072# Library routines 1115# Library routines
1073# 1116#
1074# CONFIG_CRC_CCITT is not set 1117# CONFIG_CRC_CCITT is not set
1118# CONFIG_CRC16 is not set
1075CONFIG_CRC32=y 1119CONFIG_CRC32=y
1076# CONFIG_LIBCRC32C is not set 1120# CONFIG_LIBCRC32C is not set
1077CONFIG_GENERIC_HARDIRQS=y 1121CONFIG_GENERIC_HARDIRQS=y
1078CONFIG_GENERIC_IRQ_PROBE=y 1122CONFIG_GENERIC_IRQ_PROBE=y
1123CONFIG_GENERIC_PENDING_IRQ=y
1079 1124
1080# 1125#
1081# Profiling support 1126# Profiling support
@@ -1089,6 +1134,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
1089CONFIG_DEBUG_KERNEL=y 1134CONFIG_DEBUG_KERNEL=y
1090CONFIG_MAGIC_SYSRQ=y 1135CONFIG_MAGIC_SYSRQ=y
1091CONFIG_LOG_BUF_SHIFT=20 1136CONFIG_LOG_BUF_SHIFT=20
1137CONFIG_DETECT_SOFTLOCKUP=y
1092# CONFIG_SCHEDSTATS is not set 1138# CONFIG_SCHEDSTATS is not set
1093# CONFIG_DEBUG_SLAB is not set 1139# CONFIG_DEBUG_SLAB is not set
1094# CONFIG_DEBUG_SPINLOCK is not set 1140# CONFIG_DEBUG_SPINLOCK is not set
diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig
index 80b0e9eb7fb3..0856ca67dd50 100644
--- a/arch/ia64/configs/zx1_defconfig
+++ b/arch/ia64/configs/zx1_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc6 3# Linux kernel version: 2.6.14-rc1
4# Wed Aug 17 10:02:43 2005 4# Wed Sep 14 15:15:01 2005
5# 5#
6 6
7# 7#
@@ -18,6 +18,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
18# General setup 18# General setup
19# 19#
20CONFIG_LOCALVERSION="" 20CONFIG_LOCALVERSION=""
21CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y 22CONFIG_SWAP=y
22CONFIG_SYSVIPC=y 23CONFIG_SYSVIPC=y
23# CONFIG_POSIX_MQUEUE is not set 24# CONFIG_POSIX_MQUEUE is not set
@@ -29,6 +30,7 @@ CONFIG_HOTPLUG=y
29CONFIG_KOBJECT_UEVENT=y 30CONFIG_KOBJECT_UEVENT=y
30# CONFIG_IKCONFIG is not set 31# CONFIG_IKCONFIG is not set
31# CONFIG_CPUSETS is not set 32# CONFIG_CPUSETS is not set
33CONFIG_INITRAMFS_SOURCE=""
32# CONFIG_EMBEDDED is not set 34# CONFIG_EMBEDDED is not set
33CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
@@ -103,6 +105,7 @@ CONFIG_FLATMEM_MANUAL=y
103# CONFIG_SPARSEMEM_MANUAL is not set 105# CONFIG_SPARSEMEM_MANUAL is not set
104CONFIG_FLATMEM=y 106CONFIG_FLATMEM=y
105CONFIG_FLAT_NODE_MEM_MAP=y 107CONFIG_FLAT_NODE_MEM_MAP=y
108# CONFIG_SPARSEMEM_STATIC is not set
106CONFIG_HAVE_DEC_LOCK=y 109CONFIG_HAVE_DEC_LOCK=y
107CONFIG_IA32_SUPPORT=y 110CONFIG_IA32_SUPPORT=y
108CONFIG_COMPAT=y 111CONFIG_COMPAT=y
@@ -115,6 +118,7 @@ CONFIG_IA64_PALINFO=y
115# 118#
116CONFIG_EFI_VARS=y 119CONFIG_EFI_VARS=y
117CONFIG_EFI_PCDP=y 120CONFIG_EFI_PCDP=y
121# CONFIG_DELL_RBU is not set
118CONFIG_BINFMT_ELF=y 122CONFIG_BINFMT_ELF=y
119CONFIG_BINFMT_MISC=y 123CONFIG_BINFMT_MISC=y
120 124
@@ -122,28 +126,34 @@ CONFIG_BINFMT_MISC=y
122# Power management and ACPI 126# Power management and ACPI
123# 127#
124CONFIG_PM=y 128CONFIG_PM=y
125CONFIG_ACPI=y 129# CONFIG_PM_DEBUG is not set
126 130
127# 131#
128# ACPI (Advanced Configuration and Power Interface) Support 132# ACPI (Advanced Configuration and Power Interface) Support
129# 133#
134CONFIG_ACPI=y
130CONFIG_ACPI_BUTTON=y 135CONFIG_ACPI_BUTTON=y
131CONFIG_ACPI_FAN=y 136CONFIG_ACPI_FAN=y
132CONFIG_ACPI_PROCESSOR=y 137CONFIG_ACPI_PROCESSOR=y
133CONFIG_ACPI_THERMAL=y 138CONFIG_ACPI_THERMAL=y
139CONFIG_ACPI_BLACKLIST_YEAR=0
134# CONFIG_ACPI_DEBUG is not set 140# CONFIG_ACPI_DEBUG is not set
135CONFIG_ACPI_POWER=y 141CONFIG_ACPI_POWER=y
136CONFIG_ACPI_SYSTEM=y 142CONFIG_ACPI_SYSTEM=y
137# CONFIG_ACPI_CONTAINER is not set 143# CONFIG_ACPI_CONTAINER is not set
138 144
139# 145#
146# CPU Frequency scaling
147#
148# CONFIG_CPU_FREQ is not set
149
150#
140# Bus options (PCI, PCMCIA) 151# Bus options (PCI, PCMCIA)
141# 152#
142CONFIG_PCI=y 153CONFIG_PCI=y
143CONFIG_PCI_DOMAINS=y 154CONFIG_PCI_DOMAINS=y
144# CONFIG_PCI_MSI is not set 155# CONFIG_PCI_MSI is not set
145CONFIG_PCI_LEGACY_PROC=y 156CONFIG_PCI_LEGACY_PROC=y
146CONFIG_PCI_NAMES=y
147# CONFIG_PCI_DEBUG is not set 157# CONFIG_PCI_DEBUG is not set
148 158
149# 159#
@@ -187,8 +197,8 @@ CONFIG_IP_FIB_HASH=y
187# CONFIG_INET_ESP is not set 197# CONFIG_INET_ESP is not set
188# CONFIG_INET_IPCOMP is not set 198# CONFIG_INET_IPCOMP is not set
189# CONFIG_INET_TUNNEL is not set 199# CONFIG_INET_TUNNEL is not set
190# CONFIG_IP_TCPDIAG is not set 200CONFIG_INET_DIAG=y
191# CONFIG_IP_TCPDIAG_IPV6 is not set 201CONFIG_INET_TCP_DIAG=y
192# CONFIG_TCP_CONG_ADVANCED is not set 202# CONFIG_TCP_CONG_ADVANCED is not set
193CONFIG_TCP_CONG_BIC=y 203CONFIG_TCP_CONG_BIC=y
194 204
@@ -204,7 +214,6 @@ CONFIG_NETFILTER=y
204# IP: Netfilter Configuration 214# IP: Netfilter Configuration
205# 215#
206# CONFIG_IP_NF_CONNTRACK is not set 216# CONFIG_IP_NF_CONNTRACK is not set
207# CONFIG_IP_NF_CONNTRACK_MARK is not set
208# CONFIG_IP_NF_QUEUE is not set 217# CONFIG_IP_NF_QUEUE is not set
209# CONFIG_IP_NF_IPTABLES is not set 218# CONFIG_IP_NF_IPTABLES is not set
210CONFIG_IP_NF_ARPTABLES=y 219CONFIG_IP_NF_ARPTABLES=y
@@ -212,6 +221,11 @@ CONFIG_IP_NF_ARPTABLES=y
212# CONFIG_IP_NF_ARP_MANGLE is not set 221# CONFIG_IP_NF_ARP_MANGLE is not set
213 222
214# 223#
224# DCCP Configuration (EXPERIMENTAL)
225#
226# CONFIG_IP_DCCP is not set
227
228#
215# SCTP Configuration (EXPERIMENTAL) 229# SCTP Configuration (EXPERIMENTAL)
216# 230#
217# CONFIG_IP_SCTP is not set 231# CONFIG_IP_SCTP is not set
@@ -234,9 +248,11 @@ CONFIG_IP_NF_ARPTABLES=y
234# Network testing 248# Network testing
235# 249#
236# CONFIG_NET_PKTGEN is not set 250# CONFIG_NET_PKTGEN is not set
251# CONFIG_NETFILTER_NETLINK is not set
237# CONFIG_HAMRADIO is not set 252# CONFIG_HAMRADIO is not set
238# CONFIG_IRDA is not set 253# CONFIG_IRDA is not set
239# CONFIG_BT is not set 254# CONFIG_BT is not set
255# CONFIG_IEEE80211 is not set
240 256
241# 257#
242# Device Drivers 258# Device Drivers
@@ -251,6 +267,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
251# CONFIG_DEBUG_DRIVER is not set 267# CONFIG_DEBUG_DRIVER is not set
252 268
253# 269#
270# Connector - unified userspace <-> kernelspace linker
271#
272# CONFIG_CONNECTOR is not set
273
274#
254# Memory Technology Devices (MTD) 275# Memory Technology Devices (MTD)
255# 276#
256# CONFIG_MTD is not set 277# CONFIG_MTD is not set
@@ -263,7 +284,13 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
263# 284#
264# Plug and Play support 285# Plug and Play support
265# 286#
266# CONFIG_PNP is not set 287CONFIG_PNP=y
288# CONFIG_PNP_DEBUG is not set
289
290#
291# Protocols
292#
293CONFIG_PNPACPI=y
267 294
268# 295#
269# Block devices 296# Block devices
@@ -282,7 +309,6 @@ CONFIG_BLK_DEV_RAM=y
282CONFIG_BLK_DEV_RAM_COUNT=16 309CONFIG_BLK_DEV_RAM_COUNT=16
283CONFIG_BLK_DEV_RAM_SIZE=4096 310CONFIG_BLK_DEV_RAM_SIZE=4096
284CONFIG_BLK_DEV_INITRD=y 311CONFIG_BLK_DEV_INITRD=y
285CONFIG_INITRAMFS_SOURCE=""
286# CONFIG_CDROM_PKTCDVD is not set 312# CONFIG_CDROM_PKTCDVD is not set
287 313
288# 314#
@@ -315,7 +341,8 @@ CONFIG_BLK_DEV_IDECD=y
315# 341#
316# IDE chipset support/bugfixes 342# IDE chipset support/bugfixes
317# 343#
318CONFIG_IDE_GENERIC=y 344# CONFIG_IDE_GENERIC is not set
345# CONFIG_BLK_DEV_IDEPNP is not set
319CONFIG_BLK_DEV_IDEPCI=y 346CONFIG_BLK_DEV_IDEPCI=y
320CONFIG_IDEPCI_SHARE_IRQ=y 347CONFIG_IDEPCI_SHARE_IRQ=y
321# CONFIG_BLK_DEV_OFFBOARD is not set 348# CONFIG_BLK_DEV_OFFBOARD is not set
@@ -354,6 +381,7 @@ CONFIG_BLK_DEV_IDEDMA=y
354# 381#
355# SCSI device support 382# SCSI device support
356# 383#
384# CONFIG_RAID_ATTRS is not set
357CONFIG_SCSI=y 385CONFIG_SCSI=y
358CONFIG_SCSI_PROC_FS=y 386CONFIG_SCSI_PROC_FS=y
359 387
@@ -381,6 +409,7 @@ CONFIG_SCSI_LOGGING=y
381CONFIG_SCSI_SPI_ATTRS=y 409CONFIG_SCSI_SPI_ATTRS=y
382# CONFIG_SCSI_FC_ATTRS is not set 410# CONFIG_SCSI_FC_ATTRS is not set
383# CONFIG_SCSI_ISCSI_ATTRS is not set 411# CONFIG_SCSI_ISCSI_ATTRS is not set
412# CONFIG_SCSI_SAS_ATTRS is not set
384 413
385# 414#
386# SCSI low-level drivers 415# SCSI low-level drivers
@@ -457,6 +486,7 @@ CONFIG_DUMMY=y
457# CONFIG_BONDING is not set 486# CONFIG_BONDING is not set
458# CONFIG_EQUALIZER is not set 487# CONFIG_EQUALIZER is not set
459# CONFIG_TUN is not set 488# CONFIG_TUN is not set
489# CONFIG_NET_SB1000 is not set
460 490
461# 491#
462# ARCnet devices 492# ARCnet devices
@@ -464,6 +494,11 @@ CONFIG_DUMMY=y
464# CONFIG_ARCNET is not set 494# CONFIG_ARCNET is not set
465 495
466# 496#
497# PHY device support
498#
499# CONFIG_PHYLIB is not set
500
501#
467# Ethernet (10 or 100Mbit) 502# Ethernet (10 or 100Mbit)
468# 503#
469CONFIG_NET_ETHERNET=y 504CONFIG_NET_ETHERNET=y
@@ -485,6 +520,7 @@ CONFIG_TULIP_NAPI_HW_MITIGATION=y
485# CONFIG_DE4X5 is not set 520# CONFIG_DE4X5 is not set
486# CONFIG_WINBOND_840 is not set 521# CONFIG_WINBOND_840 is not set
487# CONFIG_DM9102 is not set 522# CONFIG_DM9102 is not set
523# CONFIG_ULI526X is not set
488# CONFIG_HP100 is not set 524# CONFIG_HP100 is not set
489CONFIG_NET_PCI=y 525CONFIG_NET_PCI=y
490# CONFIG_PCNET32 is not set 526# CONFIG_PCNET32 is not set
@@ -516,6 +552,7 @@ CONFIG_E1000=y
516# CONFIG_HAMACHI is not set 552# CONFIG_HAMACHI is not set
517# CONFIG_YELLOWFIN is not set 553# CONFIG_YELLOWFIN is not set
518# CONFIG_R8169 is not set 554# CONFIG_R8169 is not set
555# CONFIG_SIS190 is not set
519# CONFIG_SKGE is not set 556# CONFIG_SKGE is not set
520# CONFIG_SK98LIN is not set 557# CONFIG_SK98LIN is not set
521# CONFIG_VIA_VELOCITY is not set 558# CONFIG_VIA_VELOCITY is not set
@@ -525,6 +562,7 @@ CONFIG_TIGON3=y
525# 562#
526# Ethernet (10000 Mbit) 563# Ethernet (10000 Mbit)
527# 564#
565# CONFIG_CHELSIO_T1 is not set
528# CONFIG_IXGB is not set 566# CONFIG_IXGB is not set
529# CONFIG_S2IO is not set 567# CONFIG_S2IO is not set
530 568
@@ -650,12 +688,12 @@ CONFIG_AGP=y
650CONFIG_AGP_HP_ZX1=y 688CONFIG_AGP_HP_ZX1=y
651CONFIG_DRM=y 689CONFIG_DRM=y
652# CONFIG_DRM_TDFX is not set 690# CONFIG_DRM_TDFX is not set
653# CONFIG_DRM_GAMMA is not set
654# CONFIG_DRM_R128 is not set 691# CONFIG_DRM_R128 is not set
655CONFIG_DRM_RADEON=y 692CONFIG_DRM_RADEON=y
656# CONFIG_DRM_MGA is not set 693# CONFIG_DRM_MGA is not set
657# CONFIG_DRM_SIS is not set 694# CONFIG_DRM_SIS is not set
658# CONFIG_DRM_VIA is not set 695# CONFIG_DRM_VIA is not set
696# CONFIG_DRM_SAVAGE is not set
659# CONFIG_RAW_DRIVER is not set 697# CONFIG_RAW_DRIVER is not set
660# CONFIG_HPET is not set 698# CONFIG_HPET is not set
661# CONFIG_HANGCHECK_TIMER is not set 699# CONFIG_HANGCHECK_TIMER is not set
@@ -689,7 +727,6 @@ CONFIG_I2C_ALGOPCF=y
689# CONFIG_I2C_I801 is not set 727# CONFIG_I2C_I801 is not set
690# CONFIG_I2C_I810 is not set 728# CONFIG_I2C_I810 is not set
691# CONFIG_I2C_PIIX4 is not set 729# CONFIG_I2C_PIIX4 is not set
692# CONFIG_I2C_ISA is not set
693# CONFIG_I2C_NFORCE2 is not set 730# CONFIG_I2C_NFORCE2 is not set
694# CONFIG_I2C_PARPORT_LIGHT is not set 731# CONFIG_I2C_PARPORT_LIGHT is not set
695# CONFIG_I2C_PROSAVAGE is not set 732# CONFIG_I2C_PROSAVAGE is not set
@@ -703,7 +740,6 @@ CONFIG_I2C_ALGOPCF=y
703# CONFIG_I2C_VIAPRO is not set 740# CONFIG_I2C_VIAPRO is not set
704# CONFIG_I2C_VOODOO3 is not set 741# CONFIG_I2C_VOODOO3 is not set
705# CONFIG_I2C_PCA_ISA is not set 742# CONFIG_I2C_PCA_ISA is not set
706# CONFIG_I2C_SENSOR is not set
707 743
708# 744#
709# Miscellaneous I2C Chip support 745# Miscellaneous I2C Chip support
@@ -730,12 +766,17 @@ CONFIG_I2C_ALGOPCF=y
730# Hardware Monitoring support 766# Hardware Monitoring support
731# 767#
732# CONFIG_HWMON is not set 768# CONFIG_HWMON is not set
769# CONFIG_HWMON_VID is not set
733 770
734# 771#
735# Misc devices 772# Misc devices
736# 773#
737 774
738# 775#
776# Multimedia Capabilities Port drivers
777#
778
779#
739# Multimedia devices 780# Multimedia devices
740# 781#
741CONFIG_VIDEO_DEV=y 782CONFIG_VIDEO_DEV=y
@@ -806,6 +847,7 @@ CONFIG_FB_RADEON_DEBUG=y
806# CONFIG_FB_KYRO is not set 847# CONFIG_FB_KYRO is not set
807# CONFIG_FB_3DFX is not set 848# CONFIG_FB_3DFX is not set
808# CONFIG_FB_VOODOO1 is not set 849# CONFIG_FB_VOODOO1 is not set
850# CONFIG_FB_CYBLA is not set
809# CONFIG_FB_TRIDENT is not set 851# CONFIG_FB_TRIDENT is not set
810# CONFIG_FB_PM3 is not set 852# CONFIG_FB_PM3 is not set
811# CONFIG_FB_S1D13XXX is not set 853# CONFIG_FB_S1D13XXX is not set
@@ -862,11 +904,12 @@ CONFIG_SND_OPL3_LIB=y
862# CONFIG_SND_MTPAV is not set 904# CONFIG_SND_MTPAV is not set
863# CONFIG_SND_SERIAL_U16550 is not set 905# CONFIG_SND_SERIAL_U16550 is not set
864# CONFIG_SND_MPU401 is not set 906# CONFIG_SND_MPU401 is not set
907CONFIG_SND_AC97_CODEC=y
908CONFIG_SND_AC97_BUS=y
865 909
866# 910#
867# PCI devices 911# PCI devices
868# 912#
869CONFIG_SND_AC97_CODEC=y
870# CONFIG_SND_ALI5451 is not set 913# CONFIG_SND_ALI5451 is not set
871# CONFIG_SND_ATIIXP is not set 914# CONFIG_SND_ATIIXP is not set
872# CONFIG_SND_ATIIXP_MODEM is not set 915# CONFIG_SND_ATIIXP_MODEM is not set
@@ -890,7 +933,7 @@ CONFIG_SND_AC97_CODEC=y
890# CONFIG_SND_HDSPM is not set 933# CONFIG_SND_HDSPM is not set
891# CONFIG_SND_TRIDENT is not set 934# CONFIG_SND_TRIDENT is not set
892# CONFIG_SND_YMFPCI is not set 935# CONFIG_SND_YMFPCI is not set
893# CONFIG_SND_ALS4000 is not set 936# CONFIG_SND_AD1889 is not set
894# CONFIG_SND_CMIPCI is not set 937# CONFIG_SND_CMIPCI is not set
895# CONFIG_SND_ENS1370 is not set 938# CONFIG_SND_ENS1370 is not set
896# CONFIG_SND_ENS1371 is not set 939# CONFIG_SND_ENS1371 is not set
@@ -952,9 +995,8 @@ CONFIG_USB_UHCI_HCD=y
952# 995#
953# USB Device Class drivers 996# USB Device Class drivers
954# 997#
955# CONFIG_USB_AUDIO is not set 998# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
956# CONFIG_USB_BLUETOOTH_TTY is not set 999# CONFIG_USB_BLUETOOTH_TTY is not set
957# CONFIG_USB_MIDI is not set
958# CONFIG_USB_ACM is not set 1000# CONFIG_USB_ACM is not set
959# CONFIG_USB_PRINTER is not set 1001# CONFIG_USB_PRINTER is not set
960 1002
@@ -971,6 +1013,7 @@ CONFIG_USB_STORAGE=y
971# CONFIG_USB_STORAGE_SDDR09 is not set 1013# CONFIG_USB_STORAGE_SDDR09 is not set
972# CONFIG_USB_STORAGE_SDDR55 is not set 1014# CONFIG_USB_STORAGE_SDDR55 is not set
973# CONFIG_USB_STORAGE_JUMPSHOT is not set 1015# CONFIG_USB_STORAGE_JUMPSHOT is not set
1016# CONFIG_USB_STORAGE_ONETOUCH is not set
974 1017
975# 1018#
976# USB Input Devices 1019# USB Input Devices
@@ -987,9 +1030,11 @@ CONFIG_USB_HIDDEV=y
987# CONFIG_USB_MTOUCH is not set 1030# CONFIG_USB_MTOUCH is not set
988# CONFIG_USB_ITMTOUCH is not set 1031# CONFIG_USB_ITMTOUCH is not set
989# CONFIG_USB_EGALAX is not set 1032# CONFIG_USB_EGALAX is not set
1033# CONFIG_USB_YEALINK is not set
990# CONFIG_USB_XPAD is not set 1034# CONFIG_USB_XPAD is not set
991# CONFIG_USB_ATI_REMOTE is not set 1035# CONFIG_USB_ATI_REMOTE is not set
992# CONFIG_USB_KEYSPAN_REMOTE is not set 1036# CONFIG_USB_KEYSPAN_REMOTE is not set
1037# CONFIG_USB_APPLETOUCH is not set
993 1038
994# 1039#
995# USB Imaging devices 1040# USB Imaging devices
@@ -1088,10 +1133,6 @@ CONFIG_FS_MBCACHE=y
1088# CONFIG_REISERFS_FS is not set 1133# CONFIG_REISERFS_FS is not set
1089# CONFIG_JFS_FS is not set 1134# CONFIG_JFS_FS is not set
1090# CONFIG_FS_POSIX_ACL is not set 1135# CONFIG_FS_POSIX_ACL is not set
1091
1092#
1093# XFS support
1094#
1095# CONFIG_XFS_FS is not set 1136# CONFIG_XFS_FS is not set
1096# CONFIG_MINIX_FS is not set 1137# CONFIG_MINIX_FS is not set
1097# CONFIG_ROMFS_FS is not set 1138# CONFIG_ROMFS_FS is not set
@@ -1100,6 +1141,7 @@ CONFIG_FS_MBCACHE=y
1100CONFIG_DNOTIFY=y 1141CONFIG_DNOTIFY=y
1101CONFIG_AUTOFS_FS=y 1142CONFIG_AUTOFS_FS=y
1102# CONFIG_AUTOFS4_FS is not set 1143# CONFIG_AUTOFS4_FS is not set
1144# CONFIG_FUSE_FS is not set
1103 1145
1104# 1146#
1105# CD-ROM/DVD Filesystems 1147# CD-ROM/DVD Filesystems
@@ -1126,13 +1168,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1126CONFIG_PROC_FS=y 1168CONFIG_PROC_FS=y
1127CONFIG_PROC_KCORE=y 1169CONFIG_PROC_KCORE=y
1128CONFIG_SYSFS=y 1170CONFIG_SYSFS=y
1129# CONFIG_DEVPTS_FS_XATTR is not set
1130CONFIG_TMPFS=y 1171CONFIG_TMPFS=y
1131CONFIG_TMPFS_XATTR=y
1132CONFIG_TMPFS_SECURITY=y
1133CONFIG_HUGETLBFS=y 1172CONFIG_HUGETLBFS=y
1134CONFIG_HUGETLB_PAGE=y 1173CONFIG_HUGETLB_PAGE=y
1135CONFIG_RAMFS=y 1174CONFIG_RAMFS=y
1175# CONFIG_RELAYFS_FS is not set
1136 1176
1137# 1177#
1138# Miscellaneous filesystems 1178# Miscellaneous filesystems
@@ -1177,6 +1217,7 @@ CONFIG_RPCSEC_GSS_KRB5=y
1177# CONFIG_NCP_FS is not set 1217# CONFIG_NCP_FS is not set
1178# CONFIG_CODA_FS is not set 1218# CONFIG_CODA_FS is not set
1179# CONFIG_AFS_FS is not set 1219# CONFIG_AFS_FS is not set
1220# CONFIG_9P_FS is not set
1180 1221
1181# 1222#
1182# Partition Types 1223# Partition Types
@@ -1246,10 +1287,12 @@ CONFIG_NLS_UTF8=y
1246# Library routines 1287# Library routines
1247# 1288#
1248# CONFIG_CRC_CCITT is not set 1289# CONFIG_CRC_CCITT is not set
1290# CONFIG_CRC16 is not set
1249CONFIG_CRC32=y 1291CONFIG_CRC32=y
1250# CONFIG_LIBCRC32C is not set 1292# CONFIG_LIBCRC32C is not set
1251CONFIG_GENERIC_HARDIRQS=y 1293CONFIG_GENERIC_HARDIRQS=y
1252CONFIG_GENERIC_IRQ_PROBE=y 1294CONFIG_GENERIC_IRQ_PROBE=y
1295CONFIG_GENERIC_PENDING_IRQ=y
1253 1296
1254# 1297#
1255# Profiling support 1298# Profiling support
@@ -1263,6 +1306,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
1263CONFIG_DEBUG_KERNEL=y 1306CONFIG_DEBUG_KERNEL=y
1264CONFIG_MAGIC_SYSRQ=y 1307CONFIG_MAGIC_SYSRQ=y
1265CONFIG_LOG_BUF_SHIFT=17 1308CONFIG_LOG_BUF_SHIFT=17
1309CONFIG_DETECT_SOFTLOCKUP=y
1266# CONFIG_SCHEDSTATS is not set 1310# CONFIG_SCHEDSTATS is not set
1267# CONFIG_DEBUG_SLAB is not set 1311# CONFIG_DEBUG_SLAB is not set
1268# CONFIG_DEBUG_SPINLOCK is not set 1312# CONFIG_DEBUG_SPINLOCK is not set
diff --git a/arch/ia64/defconfig b/arch/ia64/defconfig
index 5da208115ea1..275a26c6e5aa 100644
--- a/arch/ia64/defconfig
+++ b/arch/ia64/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12 3# Linux kernel version: 2.6.14-rc1
4# Tue Jun 21 11:30:42 2005 4# Wed Sep 14 15:13:03 2005
5# 5#
6 6
7# 7#
@@ -16,6 +16,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
16# General setup 16# General setup
17# 17#
18CONFIG_LOCALVERSION="" 18CONFIG_LOCALVERSION=""
19CONFIG_LOCALVERSION_AUTO=y
19CONFIG_SWAP=y 20CONFIG_SWAP=y
20CONFIG_SYSVIPC=y 21CONFIG_SYSVIPC=y
21CONFIG_POSIX_MQUEUE=y 22CONFIG_POSIX_MQUEUE=y
@@ -27,6 +28,7 @@ CONFIG_KOBJECT_UEVENT=y
27CONFIG_IKCONFIG=y 28CONFIG_IKCONFIG=y
28CONFIG_IKCONFIG_PROC=y 29CONFIG_IKCONFIG_PROC=y
29# CONFIG_CPUSETS is not set 30# CONFIG_CPUSETS is not set
31CONFIG_INITRAMFS_SOURCE=""
30# CONFIG_EMBEDDED is not set 32# CONFIG_EMBEDDED is not set
31CONFIG_KALLSYMS=y 33CONFIG_KALLSYMS=y
32CONFIG_KALLSYMS_ALL=y 34CONFIG_KALLSYMS_ALL=y
@@ -80,6 +82,12 @@ CONFIG_MCKINLEY=y
80# CONFIG_IA64_PAGE_SIZE_8KB is not set 82# CONFIG_IA64_PAGE_SIZE_8KB is not set
81CONFIG_IA64_PAGE_SIZE_16KB=y 83CONFIG_IA64_PAGE_SIZE_16KB=y
82# CONFIG_IA64_PAGE_SIZE_64KB is not set 84# CONFIG_IA64_PAGE_SIZE_64KB is not set
85CONFIG_PGTABLE_3=y
86# CONFIG_PGTABLE_4 is not set
87# CONFIG_HZ_100 is not set
88CONFIG_HZ_250=y
89# CONFIG_HZ_1000 is not set
90CONFIG_HZ=250
83CONFIG_IA64_L1_CACHE_SHIFT=7 91CONFIG_IA64_L1_CACHE_SHIFT=7
84CONFIG_NUMA=y 92CONFIG_NUMA=y
85CONFIG_VIRTUAL_MEM_MAP=y 93CONFIG_VIRTUAL_MEM_MAP=y
@@ -87,12 +95,21 @@ CONFIG_HOLES_IN_ZONE=y
87CONFIG_ARCH_DISCONTIGMEM_ENABLE=y 95CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
88CONFIG_IA64_CYCLONE=y 96CONFIG_IA64_CYCLONE=y
89CONFIG_IOSAPIC=y 97CONFIG_IOSAPIC=y
98# CONFIG_IA64_SGI_SN_XP is not set
90CONFIG_FORCE_MAX_ZONEORDER=18 99CONFIG_FORCE_MAX_ZONEORDER=18
91CONFIG_SMP=y 100CONFIG_SMP=y
92CONFIG_NR_CPUS=512 101CONFIG_NR_CPUS=512
93CONFIG_HOTPLUG_CPU=y 102CONFIG_HOTPLUG_CPU=y
94# CONFIG_SCHED_SMT is not set 103# CONFIG_SCHED_SMT is not set
95# CONFIG_PREEMPT is not set 104# CONFIG_PREEMPT is not set
105CONFIG_SELECT_MEMORY_MODEL=y
106# CONFIG_FLATMEM_MANUAL is not set
107CONFIG_DISCONTIGMEM_MANUAL=y
108# CONFIG_SPARSEMEM_MANUAL is not set
109CONFIG_DISCONTIGMEM=y
110CONFIG_FLAT_NODE_MEM_MAP=y
111CONFIG_NEED_MULTIPLE_NODES=y
112# CONFIG_SPARSEMEM_STATIC is not set
96CONFIG_HAVE_DEC_LOCK=y 113CONFIG_HAVE_DEC_LOCK=y
97CONFIG_IA32_SUPPORT=y 114CONFIG_IA32_SUPPORT=y
98CONFIG_COMPAT=y 115CONFIG_COMPAT=y
@@ -105,6 +122,7 @@ CONFIG_IA64_PALINFO=y
105# 122#
106CONFIG_EFI_VARS=y 123CONFIG_EFI_VARS=y
107CONFIG_EFI_PCDP=y 124CONFIG_EFI_PCDP=y
125# CONFIG_DELL_RBU is not set
108CONFIG_BINFMT_ELF=y 126CONFIG_BINFMT_ELF=y
109CONFIG_BINFMT_MISC=m 127CONFIG_BINFMT_MISC=m
110 128
@@ -112,30 +130,36 @@ CONFIG_BINFMT_MISC=m
112# Power management and ACPI 130# Power management and ACPI
113# 131#
114CONFIG_PM=y 132CONFIG_PM=y
115CONFIG_ACPI=y 133# CONFIG_PM_DEBUG is not set
116 134
117# 135#
118# ACPI (Advanced Configuration and Power Interface) Support 136# ACPI (Advanced Configuration and Power Interface) Support
119# 137#
138CONFIG_ACPI=y
120CONFIG_ACPI_BUTTON=m 139CONFIG_ACPI_BUTTON=m
121CONFIG_ACPI_FAN=m 140CONFIG_ACPI_FAN=m
122CONFIG_ACPI_PROCESSOR=m 141CONFIG_ACPI_PROCESSOR=m
123CONFIG_ACPI_HOTPLUG_CPU=y 142CONFIG_ACPI_HOTPLUG_CPU=y
124CONFIG_ACPI_THERMAL=m 143CONFIG_ACPI_THERMAL=m
125CONFIG_ACPI_NUMA=y 144CONFIG_ACPI_NUMA=y
145CONFIG_ACPI_BLACKLIST_YEAR=0
126# CONFIG_ACPI_DEBUG is not set 146# CONFIG_ACPI_DEBUG is not set
127CONFIG_ACPI_POWER=y 147CONFIG_ACPI_POWER=y
128CONFIG_ACPI_SYSTEM=y 148CONFIG_ACPI_SYSTEM=y
129CONFIG_ACPI_CONTAINER=m 149CONFIG_ACPI_CONTAINER=m
130 150
131# 151#
152# CPU Frequency scaling
153#
154# CONFIG_CPU_FREQ is not set
155
156#
132# Bus options (PCI, PCMCIA) 157# Bus options (PCI, PCMCIA)
133# 158#
134CONFIG_PCI=y 159CONFIG_PCI=y
135CONFIG_PCI_DOMAINS=y 160CONFIG_PCI_DOMAINS=y
136# CONFIG_PCI_MSI is not set 161# CONFIG_PCI_MSI is not set
137CONFIG_PCI_LEGACY_PROC=y 162CONFIG_PCI_LEGACY_PROC=y
138CONFIG_PCI_NAMES=y
139# CONFIG_PCI_DEBUG is not set 163# CONFIG_PCI_DEBUG is not set
140 164
141# 165#
@@ -147,6 +171,7 @@ CONFIG_HOTPLUG_PCI_ACPI=m
147# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set 171# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
148# CONFIG_HOTPLUG_PCI_CPCI is not set 172# CONFIG_HOTPLUG_PCI_CPCI is not set
149# CONFIG_HOTPLUG_PCI_SHPC is not set 173# CONFIG_HOTPLUG_PCI_SHPC is not set
174# CONFIG_HOTPLUG_PCI_SGI is not set
150 175
151# 176#
152# PCCARD (PCMCIA/CardBus) support 177# PCCARD (PCMCIA/CardBus) support
@@ -154,6 +179,73 @@ CONFIG_HOTPLUG_PCI_ACPI=m
154# CONFIG_PCCARD is not set 179# CONFIG_PCCARD is not set
155 180
156# 181#
182# Networking
183#
184CONFIG_NET=y
185
186#
187# Networking options
188#
189CONFIG_PACKET=y
190# CONFIG_PACKET_MMAP is not set
191CONFIG_UNIX=y
192# CONFIG_NET_KEY is not set
193CONFIG_INET=y
194CONFIG_IP_MULTICAST=y
195# CONFIG_IP_ADVANCED_ROUTER is not set
196CONFIG_IP_FIB_HASH=y
197# CONFIG_IP_PNP is not set
198# CONFIG_NET_IPIP is not set
199# CONFIG_NET_IPGRE is not set
200# CONFIG_IP_MROUTE is not set
201CONFIG_ARPD=y
202CONFIG_SYN_COOKIES=y
203# CONFIG_INET_AH is not set
204# CONFIG_INET_ESP is not set
205# CONFIG_INET_IPCOMP is not set
206# CONFIG_INET_TUNNEL is not set
207CONFIG_INET_DIAG=y
208CONFIG_INET_TCP_DIAG=y
209# CONFIG_TCP_CONG_ADVANCED is not set
210CONFIG_TCP_CONG_BIC=y
211# CONFIG_IPV6 is not set
212# CONFIG_NETFILTER is not set
213
214#
215# DCCP Configuration (EXPERIMENTAL)
216#
217# CONFIG_IP_DCCP is not set
218
219#
220# SCTP Configuration (EXPERIMENTAL)
221#
222# CONFIG_IP_SCTP is not set
223# CONFIG_ATM is not set
224# CONFIG_BRIDGE is not set
225# CONFIG_VLAN_8021Q is not set
226# CONFIG_DECNET is not set
227# CONFIG_LLC2 is not set
228# CONFIG_IPX is not set
229# CONFIG_ATALK is not set
230# CONFIG_X25 is not set
231# CONFIG_LAPB is not set
232# CONFIG_NET_DIVERT is not set
233# CONFIG_ECONET is not set
234# CONFIG_WAN_ROUTER is not set
235# CONFIG_NET_SCHED is not set
236# CONFIG_NET_CLS_ROUTE is not set
237
238#
239# Network testing
240#
241# CONFIG_NET_PKTGEN is not set
242# CONFIG_NETFILTER_NETLINK is not set
243# CONFIG_HAMRADIO is not set
244# CONFIG_IRDA is not set
245# CONFIG_BT is not set
246# CONFIG_IEEE80211 is not set
247
248#
157# Device Drivers 249# Device Drivers
158# 250#
159 251
@@ -162,10 +254,15 @@ CONFIG_HOTPLUG_PCI_ACPI=m
162# 254#
163CONFIG_STANDALONE=y 255CONFIG_STANDALONE=y
164CONFIG_PREVENT_FIRMWARE_BUILD=y 256CONFIG_PREVENT_FIRMWARE_BUILD=y
165# CONFIG_FW_LOADER is not set 257CONFIG_FW_LOADER=m
166# CONFIG_DEBUG_DRIVER is not set 258# CONFIG_DEBUG_DRIVER is not set
167 259
168# 260#
261# Connector - unified userspace <-> kernelspace linker
262#
263# CONFIG_CONNECTOR is not set
264
265#
169# Memory Technology Devices (MTD) 266# Memory Technology Devices (MTD)
170# 267#
171# CONFIG_MTD is not set 268# CONFIG_MTD is not set
@@ -178,7 +275,13 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
178# 275#
179# Plug and Play support 276# Plug and Play support
180# 277#
181# CONFIG_PNP is not set 278CONFIG_PNP=y
279# CONFIG_PNP_DEBUG is not set
280
281#
282# Protocols
283#
284CONFIG_PNPACPI=y
182 285
183# 286#
184# Block devices 287# Block devices
@@ -197,7 +300,6 @@ CONFIG_BLK_DEV_RAM=y
197CONFIG_BLK_DEV_RAM_COUNT=16 300CONFIG_BLK_DEV_RAM_COUNT=16
198CONFIG_BLK_DEV_RAM_SIZE=4096 301CONFIG_BLK_DEV_RAM_SIZE=4096
199CONFIG_BLK_DEV_INITRD=y 302CONFIG_BLK_DEV_INITRD=y
200CONFIG_INITRAMFS_SOURCE=""
201# CONFIG_CDROM_PKTCDVD is not set 303# CONFIG_CDROM_PKTCDVD is not set
202 304
203# 305#
@@ -230,7 +332,8 @@ CONFIG_BLK_DEV_IDESCSI=m
230# 332#
231# IDE chipset support/bugfixes 333# IDE chipset support/bugfixes
232# 334#
233CONFIG_IDE_GENERIC=y 335# CONFIG_IDE_GENERIC is not set
336# CONFIG_BLK_DEV_IDEPNP is not set
234CONFIG_BLK_DEV_IDEPCI=y 337CONFIG_BLK_DEV_IDEPCI=y
235# CONFIG_IDEPCI_SHARE_IRQ is not set 338# CONFIG_IDEPCI_SHARE_IRQ is not set
236# CONFIG_BLK_DEV_OFFBOARD is not set 339# CONFIG_BLK_DEV_OFFBOARD is not set
@@ -252,6 +355,7 @@ CONFIG_BLK_DEV_CMD64X=y
252# CONFIG_BLK_DEV_HPT366 is not set 355# CONFIG_BLK_DEV_HPT366 is not set
253# CONFIG_BLK_DEV_SC1200 is not set 356# CONFIG_BLK_DEV_SC1200 is not set
254CONFIG_BLK_DEV_PIIX=y 357CONFIG_BLK_DEV_PIIX=y
358# CONFIG_BLK_DEV_IT821X is not set
255# CONFIG_BLK_DEV_NS87415 is not set 359# CONFIG_BLK_DEV_NS87415 is not set
256# CONFIG_BLK_DEV_PDC202XX_OLD is not set 360# CONFIG_BLK_DEV_PDC202XX_OLD is not set
257# CONFIG_BLK_DEV_PDC202XX_NEW is not set 361# CONFIG_BLK_DEV_PDC202XX_NEW is not set
@@ -270,6 +374,7 @@ CONFIG_IDEDMA_AUTO=y
270# 374#
271# SCSI device support 375# SCSI device support
272# 376#
377# CONFIG_RAID_ATTRS is not set
273CONFIG_SCSI=y 378CONFIG_SCSI=y
274CONFIG_SCSI_PROC_FS=y 379CONFIG_SCSI_PROC_FS=y
275 380
@@ -297,6 +402,7 @@ CONFIG_CHR_DEV_SG=m
297CONFIG_SCSI_SPI_ATTRS=y 402CONFIG_SCSI_SPI_ATTRS=y
298CONFIG_SCSI_FC_ATTRS=y 403CONFIG_SCSI_FC_ATTRS=y
299# CONFIG_SCSI_ISCSI_ATTRS is not set 404# CONFIG_SCSI_ISCSI_ATTRS is not set
405# CONFIG_SCSI_SAS_ATTRS is not set
300 406
301# 407#
302# SCSI low-level drivers 408# SCSI low-level drivers
@@ -314,6 +420,7 @@ CONFIG_SCSI_SATA=y
314# CONFIG_SCSI_SATA_AHCI is not set 420# CONFIG_SCSI_SATA_AHCI is not set
315# CONFIG_SCSI_SATA_SVW is not set 421# CONFIG_SCSI_SATA_SVW is not set
316# CONFIG_SCSI_ATA_PIIX is not set 422# CONFIG_SCSI_ATA_PIIX is not set
423# CONFIG_SCSI_SATA_MV is not set
317# CONFIG_SCSI_SATA_NV is not set 424# CONFIG_SCSI_SATA_NV is not set
318# CONFIG_SCSI_SATA_PROMISE is not set 425# CONFIG_SCSI_SATA_PROMISE is not set
319# CONFIG_SCSI_SATA_QSTOR is not set 426# CONFIG_SCSI_SATA_QSTOR is not set
@@ -335,7 +442,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
335# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set 442# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
336# CONFIG_SCSI_IPR is not set 443# CONFIG_SCSI_IPR is not set
337# CONFIG_SCSI_QLOGIC_FC is not set 444# CONFIG_SCSI_QLOGIC_FC is not set
338# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
339CONFIG_SCSI_QLOGIC_1280=y 445CONFIG_SCSI_QLOGIC_1280=y
340# CONFIG_SCSI_QLOGIC_1280_1040 is not set 446# CONFIG_SCSI_QLOGIC_1280_1040 is not set
341CONFIG_SCSI_QLA2XXX=y 447CONFIG_SCSI_QLA2XXX=y
@@ -344,6 +450,7 @@ CONFIG_SCSI_QLA22XX=m
344CONFIG_SCSI_QLA2300=m 450CONFIG_SCSI_QLA2300=m
345CONFIG_SCSI_QLA2322=m 451CONFIG_SCSI_QLA2322=m
346# CONFIG_SCSI_QLA6312 is not set 452# CONFIG_SCSI_QLA6312 is not set
453# CONFIG_SCSI_QLA24XX is not set
347# CONFIG_SCSI_LPFC is not set 454# CONFIG_SCSI_LPFC is not set
348# CONFIG_SCSI_DC395x is not set 455# CONFIG_SCSI_DC395x is not set
349# CONFIG_SCSI_DC390T is not set 456# CONFIG_SCSI_DC390T is not set
@@ -390,74 +497,14 @@ CONFIG_FUSION_MAX_SGE=128
390# CONFIG_I2O is not set 497# CONFIG_I2O is not set
391 498
392# 499#
393# Networking support 500# Network device support
394#
395CONFIG_NET=y
396
397#
398# Networking options
399#
400CONFIG_PACKET=y
401# CONFIG_PACKET_MMAP is not set
402CONFIG_UNIX=y
403# CONFIG_NET_KEY is not set
404CONFIG_INET=y
405CONFIG_IP_MULTICAST=y
406# CONFIG_IP_ADVANCED_ROUTER is not set
407# CONFIG_IP_PNP is not set
408# CONFIG_NET_IPIP is not set
409# CONFIG_NET_IPGRE is not set
410# CONFIG_IP_MROUTE is not set
411CONFIG_ARPD=y
412CONFIG_SYN_COOKIES=y
413# CONFIG_INET_AH is not set
414# CONFIG_INET_ESP is not set
415# CONFIG_INET_IPCOMP is not set
416# CONFIG_INET_TUNNEL is not set
417CONFIG_IP_TCPDIAG=y
418# CONFIG_IP_TCPDIAG_IPV6 is not set
419# CONFIG_IPV6 is not set
420# CONFIG_NETFILTER is not set
421
422#
423# SCTP Configuration (EXPERIMENTAL)
424#
425# CONFIG_IP_SCTP is not set
426# CONFIG_ATM is not set
427# CONFIG_BRIDGE is not set
428# CONFIG_VLAN_8021Q is not set
429# CONFIG_DECNET is not set
430# CONFIG_LLC2 is not set
431# CONFIG_IPX is not set
432# CONFIG_ATALK is not set
433# CONFIG_X25 is not set
434# CONFIG_LAPB is not set
435# CONFIG_NET_DIVERT is not set
436# CONFIG_ECONET is not set
437# CONFIG_WAN_ROUTER is not set
438
439# 501#
440# QoS and/or fair queueing
441#
442# CONFIG_NET_SCHED is not set
443# CONFIG_NET_CLS_ROUTE is not set
444
445#
446# Network testing
447#
448# CONFIG_NET_PKTGEN is not set
449CONFIG_NETPOLL=y
450# CONFIG_NETPOLL_RX is not set
451# CONFIG_NETPOLL_TRAP is not set
452CONFIG_NET_POLL_CONTROLLER=y
453# CONFIG_HAMRADIO is not set
454# CONFIG_IRDA is not set
455# CONFIG_BT is not set
456CONFIG_NETDEVICES=y 502CONFIG_NETDEVICES=y
457CONFIG_DUMMY=m 503CONFIG_DUMMY=m
458# CONFIG_BONDING is not set 504# CONFIG_BONDING is not set
459# CONFIG_EQUALIZER is not set 505# CONFIG_EQUALIZER is not set
460# CONFIG_TUN is not set 506# CONFIG_TUN is not set
507# CONFIG_NET_SB1000 is not set
461 508
462# 509#
463# ARCnet devices 510# ARCnet devices
@@ -465,6 +512,11 @@ CONFIG_DUMMY=m
465# CONFIG_ARCNET is not set 512# CONFIG_ARCNET is not set
466 513
467# 514#
515# PHY device support
516#
517# CONFIG_PHYLIB is not set
518
519#
468# Ethernet (10 or 100Mbit) 520# Ethernet (10 or 100Mbit)
469# 521#
470CONFIG_NET_ETHERNET=y 522CONFIG_NET_ETHERNET=y
@@ -485,6 +537,7 @@ CONFIG_TULIP=m
485# CONFIG_DE4X5 is not set 537# CONFIG_DE4X5 is not set
486# CONFIG_WINBOND_840 is not set 538# CONFIG_WINBOND_840 is not set
487# CONFIG_DM9102 is not set 539# CONFIG_DM9102 is not set
540# CONFIG_ULI526X is not set
488# CONFIG_HP100 is not set 541# CONFIG_HP100 is not set
489CONFIG_NET_PCI=y 542CONFIG_NET_PCI=y
490# CONFIG_PCNET32 is not set 543# CONFIG_PCNET32 is not set
@@ -516,6 +569,7 @@ CONFIG_E1000=y
516# CONFIG_HAMACHI is not set 569# CONFIG_HAMACHI is not set
517# CONFIG_YELLOWFIN is not set 570# CONFIG_YELLOWFIN is not set
518# CONFIG_R8169 is not set 571# CONFIG_R8169 is not set
572# CONFIG_SIS190 is not set
519# CONFIG_SKGE is not set 573# CONFIG_SKGE is not set
520# CONFIG_SK98LIN is not set 574# CONFIG_SK98LIN is not set
521# CONFIG_VIA_VELOCITY is not set 575# CONFIG_VIA_VELOCITY is not set
@@ -525,6 +579,7 @@ CONFIG_TIGON3=y
525# 579#
526# Ethernet (10000 Mbit) 580# Ethernet (10000 Mbit)
527# 581#
582# CONFIG_CHELSIO_T1 is not set
528# CONFIG_IXGB is not set 583# CONFIG_IXGB is not set
529# CONFIG_S2IO is not set 584# CONFIG_S2IO is not set
530 585
@@ -549,6 +604,10 @@ CONFIG_TIGON3=y
549# CONFIG_NET_FC is not set 604# CONFIG_NET_FC is not set
550# CONFIG_SHAPER is not set 605# CONFIG_SHAPER is not set
551CONFIG_NETCONSOLE=y 606CONFIG_NETCONSOLE=y
607CONFIG_NETPOLL=y
608# CONFIG_NETPOLL_RX is not set
609# CONFIG_NETPOLL_TRAP is not set
610CONFIG_NET_POLL_CONTROLLER=y
552 611
553# 612#
554# ISDN subsystem 613# ISDN subsystem
@@ -607,9 +666,7 @@ CONFIG_GAMEPORT=m
607# CONFIG_GAMEPORT_NS558 is not set 666# CONFIG_GAMEPORT_NS558 is not set
608# CONFIG_GAMEPORT_L4 is not set 667# CONFIG_GAMEPORT_L4 is not set
609# CONFIG_GAMEPORT_EMU10K1 is not set 668# CONFIG_GAMEPORT_EMU10K1 is not set
610# CONFIG_GAMEPORT_VORTEX is not set
611# CONFIG_GAMEPORT_FM801 is not set 669# CONFIG_GAMEPORT_FM801 is not set
612# CONFIG_GAMEPORT_CS461X is not set
613 670
614# 671#
615# Character devices 672# Character devices
@@ -620,6 +677,7 @@ CONFIG_HW_CONSOLE=y
620CONFIG_SERIAL_NONSTANDARD=y 677CONFIG_SERIAL_NONSTANDARD=y
621# CONFIG_ROCKETPORT is not set 678# CONFIG_ROCKETPORT is not set
622# CONFIG_CYCLADES is not set 679# CONFIG_CYCLADES is not set
680# CONFIG_DIGIEPCA is not set
623# CONFIG_MOXA_SMARTIO is not set 681# CONFIG_MOXA_SMARTIO is not set
624# CONFIG_ISI is not set 682# CONFIG_ISI is not set
625# CONFIG_SYNCLINKMP is not set 683# CONFIG_SYNCLINKMP is not set
@@ -641,7 +699,6 @@ CONFIG_SERIAL_8250_NR_UARTS=6
641CONFIG_SERIAL_8250_EXTENDED=y 699CONFIG_SERIAL_8250_EXTENDED=y
642CONFIG_SERIAL_8250_SHARE_IRQ=y 700CONFIG_SERIAL_8250_SHARE_IRQ=y
643# CONFIG_SERIAL_8250_DETECT_IRQ is not set 701# CONFIG_SERIAL_8250_DETECT_IRQ is not set
644# CONFIG_SERIAL_8250_MULTIPORT is not set
645# CONFIG_SERIAL_8250_RSA is not set 702# CONFIG_SERIAL_8250_RSA is not set
646 703
647# 704#
@@ -650,8 +707,8 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
650CONFIG_SERIAL_CORE=y 707CONFIG_SERIAL_CORE=y
651CONFIG_SERIAL_CORE_CONSOLE=y 708CONFIG_SERIAL_CORE_CONSOLE=y
652CONFIG_SERIAL_SGI_L1_CONSOLE=y 709CONFIG_SERIAL_SGI_L1_CONSOLE=y
653CONFIG_SERIAL_SGI_IOC4=y
654# CONFIG_SERIAL_JSM is not set 710# CONFIG_SERIAL_JSM is not set
711CONFIG_SERIAL_SGI_IOC4=y
655CONFIG_UNIX98_PTYS=y 712CONFIG_UNIX98_PTYS=y
656CONFIG_LEGACY_PTYS=y 713CONFIG_LEGACY_PTYS=y
657CONFIG_LEGACY_PTY_COUNT=256 714CONFIG_LEGACY_PTY_COUNT=256
@@ -684,6 +741,8 @@ CONFIG_DRM_R128=m
684CONFIG_DRM_RADEON=m 741CONFIG_DRM_RADEON=m
685CONFIG_DRM_MGA=m 742CONFIG_DRM_MGA=m
686CONFIG_DRM_SIS=m 743CONFIG_DRM_SIS=m
744# CONFIG_DRM_VIA is not set
745# CONFIG_DRM_SAVAGE is not set
687CONFIG_RAW_DRIVER=m 746CONFIG_RAW_DRIVER=m
688CONFIG_HPET=y 747CONFIG_HPET=y
689# CONFIG_HPET_RTC_IRQ is not set 748# CONFIG_HPET_RTC_IRQ is not set
@@ -708,10 +767,21 @@ CONFIG_MMTIMER=y
708# CONFIG_W1 is not set 767# CONFIG_W1 is not set
709 768
710# 769#
770# Hardware Monitoring support
771#
772CONFIG_HWMON=y
773# CONFIG_HWMON_VID is not set
774# CONFIG_HWMON_DEBUG_CHIP is not set
775
776#
711# Misc devices 777# Misc devices
712# 778#
713 779
714# 780#
781# Multimedia Capabilities Port drivers
782#
783
784#
715# Multimedia devices 785# Multimedia devices
716# 786#
717# CONFIG_VIDEO_DEV is not set 787# CONFIG_VIDEO_DEV is not set
@@ -753,6 +823,7 @@ CONFIG_SND_PCM_OSS=m
753CONFIG_SND_SEQUENCER_OSS=y 823CONFIG_SND_SEQUENCER_OSS=y
754CONFIG_SND_VERBOSE_PRINTK=y 824CONFIG_SND_VERBOSE_PRINTK=y
755# CONFIG_SND_DEBUG is not set 825# CONFIG_SND_DEBUG is not set
826CONFIG_SND_GENERIC_DRIVER=y
756 827
757# 828#
758# Generic devices 829# Generic devices
@@ -764,11 +835,12 @@ CONFIG_SND_VIRMIDI=m
764CONFIG_SND_MTPAV=m 835CONFIG_SND_MTPAV=m
765CONFIG_SND_SERIAL_U16550=m 836CONFIG_SND_SERIAL_U16550=m
766CONFIG_SND_MPU401=m 837CONFIG_SND_MPU401=m
838CONFIG_SND_AC97_CODEC=m
839CONFIG_SND_AC97_BUS=m
767 840
768# 841#
769# PCI devices 842# PCI devices
770# 843#
771CONFIG_SND_AC97_CODEC=m
772# CONFIG_SND_ALI5451 is not set 844# CONFIG_SND_ALI5451 is not set
773# CONFIG_SND_ATIIXP is not set 845# CONFIG_SND_ATIIXP is not set
774# CONFIG_SND_ATIIXP_MODEM is not set 846# CONFIG_SND_ATIIXP_MODEM is not set
@@ -790,9 +862,10 @@ CONFIG_SND_EMU10K1=m
790# CONFIG_SND_RME96 is not set 862# CONFIG_SND_RME96 is not set
791# CONFIG_SND_RME9652 is not set 863# CONFIG_SND_RME9652 is not set
792# CONFIG_SND_HDSP is not set 864# CONFIG_SND_HDSP is not set
865# CONFIG_SND_HDSPM is not set
793# CONFIG_SND_TRIDENT is not set 866# CONFIG_SND_TRIDENT is not set
794# CONFIG_SND_YMFPCI is not set 867# CONFIG_SND_YMFPCI is not set
795# CONFIG_SND_ALS4000 is not set 868# CONFIG_SND_AD1889 is not set
796# CONFIG_SND_CMIPCI is not set 869# CONFIG_SND_CMIPCI is not set
797# CONFIG_SND_ENS1370 is not set 870# CONFIG_SND_ENS1370 is not set
798# CONFIG_SND_ENS1371 is not set 871# CONFIG_SND_ENS1371 is not set
@@ -844,6 +917,7 @@ CONFIG_USB_DEVICEFS=y
844CONFIG_USB_EHCI_HCD=m 917CONFIG_USB_EHCI_HCD=m
845# CONFIG_USB_EHCI_SPLIT_ISO is not set 918# CONFIG_USB_EHCI_SPLIT_ISO is not set
846# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 919# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
920# CONFIG_USB_ISP116X_HCD is not set
847CONFIG_USB_OHCI_HCD=m 921CONFIG_USB_OHCI_HCD=m
848# CONFIG_USB_OHCI_BIG_ENDIAN is not set 922# CONFIG_USB_OHCI_BIG_ENDIAN is not set
849CONFIG_USB_OHCI_LITTLE_ENDIAN=y 923CONFIG_USB_OHCI_LITTLE_ENDIAN=y
@@ -853,9 +927,8 @@ CONFIG_USB_UHCI_HCD=m
853# 927#
854# USB Device Class drivers 928# USB Device Class drivers
855# 929#
856# CONFIG_USB_AUDIO is not set 930# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
857# CONFIG_USB_BLUETOOTH_TTY is not set 931# CONFIG_USB_BLUETOOTH_TTY is not set
858# CONFIG_USB_MIDI is not set
859# CONFIG_USB_ACM is not set 932# CONFIG_USB_ACM is not set
860# CONFIG_USB_PRINTER is not set 933# CONFIG_USB_PRINTER is not set
861 934
@@ -888,12 +961,17 @@ CONFIG_USB_HIDINPUT=y
888# CONFIG_USB_MOUSE is not set 961# CONFIG_USB_MOUSE is not set
889# CONFIG_USB_AIPTEK is not set 962# CONFIG_USB_AIPTEK is not set
890# CONFIG_USB_WACOM is not set 963# CONFIG_USB_WACOM is not set
964# CONFIG_USB_ACECAD is not set
891# CONFIG_USB_KBTAB is not set 965# CONFIG_USB_KBTAB is not set
892# CONFIG_USB_POWERMATE is not set 966# CONFIG_USB_POWERMATE is not set
893# CONFIG_USB_MTOUCH is not set 967# CONFIG_USB_MTOUCH is not set
968# CONFIG_USB_ITMTOUCH is not set
894# CONFIG_USB_EGALAX is not set 969# CONFIG_USB_EGALAX is not set
970# CONFIG_USB_YEALINK is not set
895# CONFIG_USB_XPAD is not set 971# CONFIG_USB_XPAD is not set
896# CONFIG_USB_ATI_REMOTE is not set 972# CONFIG_USB_ATI_REMOTE is not set
973# CONFIG_USB_KEYSPAN_REMOTE is not set
974# CONFIG_USB_APPLETOUCH is not set
897 975
898# 976#
899# USB Imaging devices 977# USB Imaging devices
@@ -918,7 +996,7 @@ CONFIG_USB_HIDINPUT=y
918# CONFIG_USB_PEGASUS is not set 996# CONFIG_USB_PEGASUS is not set
919# CONFIG_USB_RTL8150 is not set 997# CONFIG_USB_RTL8150 is not set
920# CONFIG_USB_USBNET is not set 998# CONFIG_USB_USBNET is not set
921CONFIG_USB_MON=m 999CONFIG_USB_MON=y
922 1000
923# 1001#
924# USB port drivers 1002# USB port drivers
@@ -944,10 +1022,11 @@ CONFIG_USB_MON=m
944# CONFIG_USB_PHIDGETSERVO is not set 1022# CONFIG_USB_PHIDGETSERVO is not set
945# CONFIG_USB_IDMOUSE is not set 1023# CONFIG_USB_IDMOUSE is not set
946# CONFIG_USB_SISUSBVGA is not set 1024# CONFIG_USB_SISUSBVGA is not set
1025# CONFIG_USB_LD is not set
947# CONFIG_USB_TEST is not set 1026# CONFIG_USB_TEST is not set
948 1027
949# 1028#
950# USB ATM/DSL drivers 1029# USB DSL modem support
951# 1030#
952 1031
953# 1032#
@@ -964,6 +1043,8 @@ CONFIG_USB_MON=m
964# InfiniBand support 1043# InfiniBand support
965# 1044#
966CONFIG_INFINIBAND=m 1045CONFIG_INFINIBAND=m
1046# CONFIG_INFINIBAND_USER_MAD is not set
1047# CONFIG_INFINIBAND_USER_ACCESS is not set
967CONFIG_INFINIBAND_MTHCA=m 1048CONFIG_INFINIBAND_MTHCA=m
968# CONFIG_INFINIBAND_MTHCA_DEBUG is not set 1049# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
969CONFIG_INFINIBAND_IPOIB=m 1050CONFIG_INFINIBAND_IPOIB=m
@@ -981,6 +1062,7 @@ CONFIG_EXT2_FS=y
981CONFIG_EXT2_FS_XATTR=y 1062CONFIG_EXT2_FS_XATTR=y
982CONFIG_EXT2_FS_POSIX_ACL=y 1063CONFIG_EXT2_FS_POSIX_ACL=y
983CONFIG_EXT2_FS_SECURITY=y 1064CONFIG_EXT2_FS_SECURITY=y
1065# CONFIG_EXT2_FS_XIP is not set
984CONFIG_EXT3_FS=y 1066CONFIG_EXT3_FS=y
985CONFIG_EXT3_FS_XATTR=y 1067CONFIG_EXT3_FS_XATTR=y
986CONFIG_EXT3_FS_POSIX_ACL=y 1068CONFIG_EXT3_FS_POSIX_ACL=y
@@ -996,22 +1078,20 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
996CONFIG_REISERFS_FS_SECURITY=y 1078CONFIG_REISERFS_FS_SECURITY=y
997# CONFIG_JFS_FS is not set 1079# CONFIG_JFS_FS is not set
998CONFIG_FS_POSIX_ACL=y 1080CONFIG_FS_POSIX_ACL=y
999
1000#
1001# XFS support
1002#
1003CONFIG_XFS_FS=y 1081CONFIG_XFS_FS=y
1004CONFIG_XFS_EXPORT=y 1082CONFIG_XFS_EXPORT=y
1005# CONFIG_XFS_RT is not set
1006# CONFIG_XFS_QUOTA is not set 1083# CONFIG_XFS_QUOTA is not set
1007# CONFIG_XFS_SECURITY is not set 1084# CONFIG_XFS_SECURITY is not set
1008# CONFIG_XFS_POSIX_ACL is not set 1085# CONFIG_XFS_POSIX_ACL is not set
1086# CONFIG_XFS_RT is not set
1009# CONFIG_MINIX_FS is not set 1087# CONFIG_MINIX_FS is not set
1010# CONFIG_ROMFS_FS is not set 1088# CONFIG_ROMFS_FS is not set
1089CONFIG_INOTIFY=y
1011# CONFIG_QUOTA is not set 1090# CONFIG_QUOTA is not set
1012CONFIG_DNOTIFY=y 1091CONFIG_DNOTIFY=y
1013CONFIG_AUTOFS_FS=y 1092CONFIG_AUTOFS_FS=y
1014CONFIG_AUTOFS4_FS=y 1093CONFIG_AUTOFS4_FS=y
1094# CONFIG_FUSE_FS is not set
1015 1095
1016# 1096#
1017# CD-ROM/DVD Filesystems 1097# CD-ROM/DVD Filesystems
@@ -1040,14 +1120,11 @@ CONFIG_NTFS_FS=m
1040CONFIG_PROC_FS=y 1120CONFIG_PROC_FS=y
1041CONFIG_PROC_KCORE=y 1121CONFIG_PROC_KCORE=y
1042CONFIG_SYSFS=y 1122CONFIG_SYSFS=y
1043# CONFIG_DEVFS_FS is not set
1044# CONFIG_DEVPTS_FS_XATTR is not set
1045CONFIG_TMPFS=y 1123CONFIG_TMPFS=y
1046CONFIG_TMPFS_XATTR=y
1047CONFIG_TMPFS_SECURITY=y
1048CONFIG_HUGETLBFS=y 1124CONFIG_HUGETLBFS=y
1049CONFIG_HUGETLB_PAGE=y 1125CONFIG_HUGETLB_PAGE=y
1050CONFIG_RAMFS=y 1126CONFIG_RAMFS=y
1127# CONFIG_RELAYFS_FS is not set
1051 1128
1052# 1129#
1053# Miscellaneous filesystems 1130# Miscellaneous filesystems
@@ -1071,15 +1148,18 @@ CONFIG_RAMFS=y
1071# 1148#
1072CONFIG_NFS_FS=m 1149CONFIG_NFS_FS=m
1073CONFIG_NFS_V3=y 1150CONFIG_NFS_V3=y
1151# CONFIG_NFS_V3_ACL is not set
1074CONFIG_NFS_V4=y 1152CONFIG_NFS_V4=y
1075CONFIG_NFS_DIRECTIO=y 1153CONFIG_NFS_DIRECTIO=y
1076CONFIG_NFSD=m 1154CONFIG_NFSD=m
1077CONFIG_NFSD_V3=y 1155CONFIG_NFSD_V3=y
1156# CONFIG_NFSD_V3_ACL is not set
1078CONFIG_NFSD_V4=y 1157CONFIG_NFSD_V4=y
1079CONFIG_NFSD_TCP=y 1158CONFIG_NFSD_TCP=y
1080CONFIG_LOCKD=m 1159CONFIG_LOCKD=m
1081CONFIG_LOCKD_V4=y 1160CONFIG_LOCKD_V4=y
1082CONFIG_EXPORTFS=y 1161CONFIG_EXPORTFS=y
1162CONFIG_NFS_COMMON=y
1083CONFIG_SUNRPC=m 1163CONFIG_SUNRPC=m
1084CONFIG_SUNRPC_GSS=m 1164CONFIG_SUNRPC_GSS=m
1085CONFIG_RPCSEC_GSS_KRB5=m 1165CONFIG_RPCSEC_GSS_KRB5=m
@@ -1094,6 +1174,7 @@ CONFIG_CIFS=m
1094# CONFIG_NCP_FS is not set 1174# CONFIG_NCP_FS is not set
1095# CONFIG_CODA_FS is not set 1175# CONFIG_CODA_FS is not set
1096# CONFIG_AFS_FS is not set 1176# CONFIG_AFS_FS is not set
1177# CONFIG_9P_FS is not set
1097 1178
1098# 1179#
1099# Partition Types 1180# Partition Types
@@ -1163,10 +1244,12 @@ CONFIG_NLS_UTF8=m
1163# Library routines 1244# Library routines
1164# 1245#
1165# CONFIG_CRC_CCITT is not set 1246# CONFIG_CRC_CCITT is not set
1247# CONFIG_CRC16 is not set
1166CONFIG_CRC32=y 1248CONFIG_CRC32=y
1167# CONFIG_LIBCRC32C is not set 1249# CONFIG_LIBCRC32C is not set
1168CONFIG_GENERIC_HARDIRQS=y 1250CONFIG_GENERIC_HARDIRQS=y
1169CONFIG_GENERIC_IRQ_PROBE=y 1251CONFIG_GENERIC_IRQ_PROBE=y
1252CONFIG_GENERIC_PENDING_IRQ=y
1170 1253
1171# 1254#
1172# HP Simulator drivers 1255# HP Simulator drivers
@@ -1187,6 +1270,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
1187CONFIG_DEBUG_KERNEL=y 1270CONFIG_DEBUG_KERNEL=y
1188CONFIG_MAGIC_SYSRQ=y 1271CONFIG_MAGIC_SYSRQ=y
1189CONFIG_LOG_BUF_SHIFT=20 1272CONFIG_LOG_BUF_SHIFT=20
1273CONFIG_DETECT_SOFTLOCKUP=y
1190# CONFIG_SCHEDSTATS is not set 1274# CONFIG_SCHEDSTATS is not set
1191# CONFIG_DEBUG_SLAB is not set 1275# CONFIG_DEBUG_SLAB is not set
1192# CONFIG_DEBUG_SPINLOCK is not set 1276# CONFIG_DEBUG_SPINLOCK is not set
@@ -1194,6 +1278,7 @@ CONFIG_LOG_BUF_SHIFT=20
1194# CONFIG_DEBUG_KOBJECT is not set 1278# CONFIG_DEBUG_KOBJECT is not set
1195# CONFIG_DEBUG_INFO is not set 1279# CONFIG_DEBUG_INFO is not set
1196# CONFIG_DEBUG_FS is not set 1280# CONFIG_DEBUG_FS is not set
1281# CONFIG_KPROBES is not set
1197CONFIG_IA64_GRANULE_16MB=y 1282CONFIG_IA64_GRANULE_16MB=y
1198# CONFIG_IA64_GRANULE_64MB is not set 1283# CONFIG_IA64_GRANULE_64MB is not set
1199# CONFIG_IA64_PRINT_HAZARDS is not set 1284# CONFIG_IA64_PRINT_HAZARDS is not set
@@ -1215,7 +1300,7 @@ CONFIG_CRYPTO=y
1215# CONFIG_CRYPTO_HMAC is not set 1300# CONFIG_CRYPTO_HMAC is not set
1216# CONFIG_CRYPTO_NULL is not set 1301# CONFIG_CRYPTO_NULL is not set
1217# CONFIG_CRYPTO_MD4 is not set 1302# CONFIG_CRYPTO_MD4 is not set
1218CONFIG_CRYPTO_MD5=m 1303CONFIG_CRYPTO_MD5=y
1219# CONFIG_CRYPTO_SHA1 is not set 1304# CONFIG_CRYPTO_SHA1 is not set
1220# CONFIG_CRYPTO_SHA256 is not set 1305# CONFIG_CRYPTO_SHA256 is not set
1221# CONFIG_CRYPTO_SHA512 is not set 1306# CONFIG_CRYPTO_SHA512 is not set
diff --git a/arch/ia64/hp/common/hwsw_iommu.c b/arch/ia64/hp/common/hwsw_iommu.c
index 80f8ef013939..a5a5637507be 100644
--- a/arch/ia64/hp/common/hwsw_iommu.c
+++ b/arch/ia64/hp/common/hwsw_iommu.c
@@ -17,7 +17,7 @@
17#include <asm/machvec.h> 17#include <asm/machvec.h>
18 18
19/* swiotlb declarations & definitions: */ 19/* swiotlb declarations & definitions: */
20extern void swiotlb_init_with_default_size (size_t size); 20extern int swiotlb_late_init_with_default_size (size_t size);
21extern ia64_mv_dma_alloc_coherent swiotlb_alloc_coherent; 21extern ia64_mv_dma_alloc_coherent swiotlb_alloc_coherent;
22extern ia64_mv_dma_free_coherent swiotlb_free_coherent; 22extern ia64_mv_dma_free_coherent swiotlb_free_coherent;
23extern ia64_mv_dma_map_single swiotlb_map_single; 23extern ia64_mv_dma_map_single swiotlb_map_single;
@@ -67,11 +67,20 @@ void
67hwsw_init (void) 67hwsw_init (void)
68{ 68{
69 /* default to a smallish 2MB sw I/O TLB */ 69 /* default to a smallish 2MB sw I/O TLB */
70 swiotlb_init_with_default_size (2 * (1<<20)); 70 if (swiotlb_late_init_with_default_size (2 * (1<<20)) != 0) {
71#ifdef CONFIG_IA64_GENERIC
72 /* Better to have normal DMA than panic */
73 printk(KERN_WARNING "%s: Failed to initialize software I/O TLB,"
74 " reverting to hpzx1 platform vector\n", __FUNCTION__);
75 machvec_init("hpzx1");
76#else
77 panic("Unable to initialize software I/O TLB services");
78#endif
79 }
71} 80}
72 81
73void * 82void *
74hwsw_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, int flags) 83hwsw_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags)
75{ 84{
76 if (use_swiotlb(dev)) 85 if (use_swiotlb(dev))
77 return swiotlb_alloc_coherent(dev, size, dma_handle, flags); 86 return swiotlb_alloc_coherent(dev, size, dma_handle, flags);
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 11957598a8b9..bdccd0b1eb60 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -1076,7 +1076,7 @@ void sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, int dir)
1076 * See Documentation/DMA-mapping.txt 1076 * See Documentation/DMA-mapping.txt
1077 */ 1077 */
1078void * 1078void *
1079sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, int flags) 1079sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flags)
1080{ 1080{
1081 struct ioc *ioc; 1081 struct ioc *ioc;
1082 void *addr; 1082 void *addr;
@@ -2028,9 +2028,40 @@ static struct acpi_driver acpi_sba_ioc_driver = {
2028static int __init 2028static int __init
2029sba_init(void) 2029sba_init(void)
2030{ 2030{
2031 if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb"))
2032 return 0;
2033
2031 acpi_bus_register_driver(&acpi_sba_ioc_driver); 2034 acpi_bus_register_driver(&acpi_sba_ioc_driver);
2032 if (!ioc_list) 2035 if (!ioc_list) {
2036#ifdef CONFIG_IA64_GENERIC
2037 extern int swiotlb_late_init_with_default_size (size_t size);
2038
2039 /*
2040 * If we didn't find something sba_iommu can claim, we
2041 * need to setup the swiotlb and switch to the dig machvec.
2042 */
2043 if (swiotlb_late_init_with_default_size(64 * (1<<20)) != 0)
2044 panic("Unable to find SBA IOMMU or initialize "
2045 "software I/O TLB: Try machvec=dig boot option");
2046 machvec_init("dig");
2047#else
2048 panic("Unable to find SBA IOMMU: Try a generic or DIG kernel");
2049#endif
2033 return 0; 2050 return 0;
2051 }
2052
2053#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_HP_ZX1_SWIOTLB)
2054 /*
2055 * hpzx1_swiotlb needs to have a fairly small swiotlb bounce
2056 * buffer setup to support devices with smaller DMA masks than
2057 * sba_iommu can handle.
2058 */
2059 if (ia64_platform_is("hpzx1_swiotlb")) {
2060 extern void hwsw_init(void);
2061
2062 hwsw_init();
2063 }
2064#endif
2034 2065
2035#ifdef CONFIG_PCI 2066#ifdef CONFIG_PCI
2036 { 2067 {
@@ -2048,18 +2079,6 @@ sba_init(void)
2048 2079
2049subsys_initcall(sba_init); /* must be initialized after ACPI etc., but before any drivers... */ 2080subsys_initcall(sba_init); /* must be initialized after ACPI etc., but before any drivers... */
2050 2081
2051extern void dig_setup(char**);
2052/*
2053 * MAX_DMA_ADDRESS needs to be setup prior to paging_init to do any good,
2054 * so we use the platform_setup hook to fix it up.
2055 */
2056void __init
2057sba_setup(char **cmdline_p)
2058{
2059 MAX_DMA_ADDRESS = ~0UL;
2060 dig_setup(cmdline_p);
2061}
2062
2063static int __init 2082static int __init
2064nosbagart(char *str) 2083nosbagart(char *str)
2065{ 2084{
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c
index 56405dbfd739..a3fe97531134 100644
--- a/arch/ia64/hp/sim/simscsi.c
+++ b/arch/ia64/hp/sim/simscsi.c
@@ -205,10 +205,11 @@ simscsi_get_disk_size (int fd)
205 char buf[512]; 205 char buf[512];
206 206
207 /* 207 /*
208 * This is a bit kludgey: the simulator doesn't provide a direct way of determining 208 * This is a bit kludgey: the simulator doesn't provide a
209 * the disk size, so we do a binary search, assuming a maximum disk size of 4GB. 209 * direct way of determining the disk size, so we do a binary
210 * search, assuming a maximum disk size of 128GB.
210 */ 211 */
211 for (bit = (4UL << 30)/512; bit != 0; bit >>= 1) { 212 for (bit = (128UL << 30)/512; bit != 0; bit >>= 1) {
212 req.addr = __pa(&buf); 213 req.addr = __pa(&buf);
213 req.len = sizeof(buf); 214 req.len = sizeof(buf);
214 ia64_ssc(fd, 1, __pa(&req), ((sectors | bit) - 1)*512, SSC_READ); 215 ia64_ssc(fd, 1, __pa(&req), ((sectors | bit) - 1)*512, SSC_READ);
@@ -225,14 +226,33 @@ simscsi_readwrite10 (struct scsi_cmnd *sc, int mode)
225{ 226{
226 unsigned long offset; 227 unsigned long offset;
227 228
228 offset = ( (sc->cmnd[2] << 24) | (sc->cmnd[3] << 16) 229 offset = (((unsigned long)sc->cmnd[2] << 24)
229 | (sc->cmnd[4] << 8) | (sc->cmnd[5] << 0))*512; 230 | ((unsigned long)sc->cmnd[3] << 16)
231 | ((unsigned long)sc->cmnd[4] << 8)
232 | ((unsigned long)sc->cmnd[5] << 0))*512UL;
230 if (sc->use_sg > 0) 233 if (sc->use_sg > 0)
231 simscsi_sg_readwrite(sc, mode, offset); 234 simscsi_sg_readwrite(sc, mode, offset);
232 else 235 else
233 simscsi_readwrite(sc, mode, offset, ((sc->cmnd[7] << 8) | sc->cmnd[8])*512); 236 simscsi_readwrite(sc, mode, offset, ((sc->cmnd[7] << 8) | sc->cmnd[8])*512);
234} 237}
235 238
239static void simscsi_fillresult(struct scsi_cmnd *sc, char *buf, unsigned len)
240{
241
242 int scatterlen = sc->use_sg;
243 struct scatterlist *slp;
244
245 if (scatterlen == 0)
246 memcpy(sc->request_buffer, buf, len);
247 else for (slp = (struct scatterlist *)sc->buffer; scatterlen-- > 0 && len > 0; slp++) {
248 unsigned thislen = min(len, slp->length);
249
250 memcpy(page_address(slp->page) + slp->offset, buf, thislen);
251 slp++;
252 len -= thislen;
253 }
254}
255
236static int 256static int
237simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) 257simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
238{ 258{
@@ -240,6 +260,7 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
240 char fname[MAX_ROOT_LEN+16]; 260 char fname[MAX_ROOT_LEN+16];
241 size_t disk_size; 261 size_t disk_size;
242 char *buf; 262 char *buf;
263 char localbuf[36];
243#if DEBUG_SIMSCSI 264#if DEBUG_SIMSCSI
244 register long sp asm ("sp"); 265 register long sp asm ("sp");
245 266
@@ -263,7 +284,7 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
263 /* disk doesn't exist... */ 284 /* disk doesn't exist... */
264 break; 285 break;
265 } 286 }
266 buf = sc->request_buffer; 287 buf = localbuf;
267 buf[0] = 0; /* magnetic disk */ 288 buf[0] = 0; /* magnetic disk */
268 buf[1] = 0; /* not a removable medium */ 289 buf[1] = 0; /* not a removable medium */
269 buf[2] = 2; /* SCSI-2 compliant device */ 290 buf[2] = 2; /* SCSI-2 compliant device */
@@ -273,6 +294,7 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
273 buf[6] = 0; /* reserved */ 294 buf[6] = 0; /* reserved */
274 buf[7] = 0; /* various flags */ 295 buf[7] = 0; /* various flags */
275 memcpy(buf + 8, "HP SIMULATED DISK 0.00", 28); 296 memcpy(buf + 8, "HP SIMULATED DISK 0.00", 28);
297 simscsi_fillresult(sc, buf, 36);
276 sc->result = GOOD; 298 sc->result = GOOD;
277 break; 299 break;
278 300
@@ -304,16 +326,13 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
304 simscsi_readwrite10(sc, SSC_WRITE); 326 simscsi_readwrite10(sc, SSC_WRITE);
305 break; 327 break;
306 328
307
308 case READ_CAPACITY: 329 case READ_CAPACITY:
309 if (desc[target_id] < 0 || sc->request_bufflen < 8) { 330 if (desc[target_id] < 0 || sc->request_bufflen < 8) {
310 break; 331 break;
311 } 332 }
312 buf = sc->request_buffer; 333 buf = localbuf;
313
314 disk_size = simscsi_get_disk_size(desc[target_id]); 334 disk_size = simscsi_get_disk_size(desc[target_id]);
315 335
316 /* pretend to be a 1GB disk (partition table contains real stuff): */
317 buf[0] = (disk_size >> 24) & 0xff; 336 buf[0] = (disk_size >> 24) & 0xff;
318 buf[1] = (disk_size >> 16) & 0xff; 337 buf[1] = (disk_size >> 16) & 0xff;
319 buf[2] = (disk_size >> 8) & 0xff; 338 buf[2] = (disk_size >> 8) & 0xff;
@@ -323,13 +342,14 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
323 buf[5] = 0; 342 buf[5] = 0;
324 buf[6] = 2; 343 buf[6] = 2;
325 buf[7] = 0; 344 buf[7] = 0;
345 simscsi_fillresult(sc, buf, 8);
326 sc->result = GOOD; 346 sc->result = GOOD;
327 break; 347 break;
328 348
329 case MODE_SENSE: 349 case MODE_SENSE:
330 case MODE_SENSE_10: 350 case MODE_SENSE_10:
331 /* sd.c uses this to determine whether disk does write-caching. */ 351 /* sd.c uses this to determine whether disk does write-caching. */
332 memset(sc->request_buffer, 0, 128); 352 simscsi_fillresult(sc, (char *)empty_zero_page, sc->request_bufflen);
333 sc->result = GOOD; 353 sc->result = GOOD;
334 break; 354 break;
335 355
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index b42ec37be51c..19ee635eeb70 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -642,10 +642,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
642 info->event = 0; 642 info->event = 0;
643 info->tty = 0; 643 info->tty = 0;
644 if (info->blocked_open) { 644 if (info->blocked_open) {
645 if (info->close_delay) { 645 if (info->close_delay)
646 current->state = TASK_INTERRUPTIBLE; 646 schedule_timeout_interruptible(info->close_delay);
647 schedule_timeout(info->close_delay);
648 }
649 wake_up_interruptible(&info->open_wait); 647 wake_up_interruptible(&info->open_wait);
650 } 648 }
651 info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING); 649 info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
diff --git a/arch/ia64/ia32/ia32_ioctl.c b/arch/ia64/ia32/ia32_ioctl.c
index 164b211f4174..88739394f6df 100644
--- a/arch/ia64/ia32/ia32_ioctl.c
+++ b/arch/ia64/ia32/ia32_ioctl.c
@@ -29,10 +29,8 @@
29#define CODE 29#define CODE
30#include "compat_ioctl.c" 30#include "compat_ioctl.c"
31 31
32typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *);
33
34#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) 32#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl)
35#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL }, 33#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL },
36#define IOCTL_TABLE_START \ 34#define IOCTL_TABLE_START \
37 struct ioctl_trans ioctl_start[] = { 35 struct ioctl_trans ioctl_start[] = {
38#define IOCTL_TABLE_END \ 36#define IOCTL_TABLE_END \
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 3fa67ecebc83..dc282710421a 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -36,6 +36,7 @@
36#include <linux/uio.h> 36#include <linux/uio.h>
37#include <linux/nfs_fs.h> 37#include <linux/nfs_fs.h>
38#include <linux/quota.h> 38#include <linux/quota.h>
39#include <linux/syscalls.h>
39#include <linux/sunrpc/svc.h> 40#include <linux/sunrpc/svc.h>
40#include <linux/nfsd/nfsd.h> 41#include <linux/nfsd/nfsd.h>
41#include <linux/nfsd/cache.h> 42#include <linux/nfsd/cache.h>
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 7e926471e4ec..9ad94ddf6687 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -838,7 +838,7 @@ EXPORT_SYMBOL(acpi_unmap_lsapic);
838#endif /* CONFIG_ACPI_HOTPLUG_CPU */ 838#endif /* CONFIG_ACPI_HOTPLUG_CPU */
839 839
840#ifdef CONFIG_ACPI_NUMA 840#ifdef CONFIG_ACPI_NUMA
841acpi_status __devinit 841static acpi_status __devinit
842acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret) 842acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret)
843{ 843{
844 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 844 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -890,7 +890,16 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret)
890 map_iosapic_to_node(gsi_base, node); 890 map_iosapic_to_node(gsi_base, node);
891 return AE_OK; 891 return AE_OK;
892} 892}
893#endif /* CONFIG_NUMA */ 893
894static int __init
895acpi_map_iosapics (void)
896{
897 acpi_get_devices(NULL, acpi_map_iosapic, NULL, NULL);
898 return 0;
899}
900
901fs_initcall(acpi_map_iosapics);
902#endif /* CONFIG_ACPI_NUMA */
894 903
895int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) 904int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
896{ 905{
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c
index 768c7e46957c..6ade3790ce07 100644
--- a/arch/ia64/kernel/cyclone.c
+++ b/arch/ia64/kernel/cyclone.c
@@ -2,6 +2,7 @@
2#include <linux/smp.h> 2#include <linux/smp.h>
3#include <linux/time.h> 3#include <linux/time.h>
4#include <linux/errno.h> 4#include <linux/errno.h>
5#include <linux/timex.h>
5#include <asm/io.h> 6#include <asm/io.h>
6 7
7/* IBM Summit (EXA) Cyclone counter code*/ 8/* IBM Summit (EXA) Cyclone counter code*/
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 179f230816ed..a3aa45cbcfa0 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -239,57 +239,30 @@ is_available_memory (efi_memory_desc_t *md)
239 return 0; 239 return 0;
240} 240}
241 241
242/* 242typedef struct kern_memdesc {
243 * Trim descriptor MD so its starts at address START_ADDR. If the descriptor covers 243 u64 attribute;
244 * memory that is normally available to the kernel, issue a warning that some memory 244 u64 start;
245 * is being ignored. 245 u64 num_pages;
246 */ 246} kern_memdesc_t;
247static void
248trim_bottom (efi_memory_desc_t *md, u64 start_addr)
249{
250 u64 num_skipped_pages;
251 247
252 if (md->phys_addr >= start_addr || !md->num_pages) 248static kern_memdesc_t *kern_memmap;
253 return;
254
255 num_skipped_pages = (start_addr - md->phys_addr) >> EFI_PAGE_SHIFT;
256 if (num_skipped_pages > md->num_pages)
257 num_skipped_pages = md->num_pages;
258
259 if (is_available_memory(md))
260 printk(KERN_NOTICE "efi.%s: ignoring %luKB of memory at 0x%lx due to granule hole "
261 "at 0x%lx\n", __FUNCTION__,
262 (num_skipped_pages << EFI_PAGE_SHIFT) >> 10,
263 md->phys_addr, start_addr - IA64_GRANULE_SIZE);
264 /*
265 * NOTE: Don't set md->phys_addr to START_ADDR because that could cause the memory
266 * descriptor list to become unsorted. In such a case, md->num_pages will be
267 * zero, so the Right Thing will happen.
268 */
269 md->phys_addr += num_skipped_pages << EFI_PAGE_SHIFT;
270 md->num_pages -= num_skipped_pages;
271}
272 249
273static void 250static void
274trim_top (efi_memory_desc_t *md, u64 end_addr) 251walk (efi_freemem_callback_t callback, void *arg, u64 attr)
275{ 252{
276 u64 num_dropped_pages, md_end_addr; 253 kern_memdesc_t *k;
277 254 u64 start, end, voff;
278 md_end_addr = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT);
279
280 if (md_end_addr <= end_addr || !md->num_pages)
281 return;
282 255
283 num_dropped_pages = (md_end_addr - end_addr) >> EFI_PAGE_SHIFT; 256 voff = (attr == EFI_MEMORY_WB) ? PAGE_OFFSET : __IA64_UNCACHED_OFFSET;
284 if (num_dropped_pages > md->num_pages) 257 for (k = kern_memmap; k->start != ~0UL; k++) {
285 num_dropped_pages = md->num_pages; 258 if (k->attribute != attr)
286 259 continue;
287 if (is_available_memory(md)) 260 start = PAGE_ALIGN(k->start);
288 printk(KERN_NOTICE "efi.%s: ignoring %luKB of memory at 0x%lx due to granule hole " 261 end = (k->start + (k->num_pages << EFI_PAGE_SHIFT)) & PAGE_MASK;
289 "at 0x%lx\n", __FUNCTION__, 262 if (start < end)
290 (num_dropped_pages << EFI_PAGE_SHIFT) >> 10, 263 if ((*callback)(start + voff, end + voff, arg) < 0)
291 md->phys_addr, end_addr); 264 return;
292 md->num_pages -= num_dropped_pages; 265 }
293} 266}
294 267
295/* 268/*
@@ -299,148 +272,19 @@ trim_top (efi_memory_desc_t *md, u64 end_addr)
299void 272void
300efi_memmap_walk (efi_freemem_callback_t callback, void *arg) 273efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
301{ 274{
302 int prev_valid = 0; 275 walk(callback, arg, EFI_MEMORY_WB);
303 struct range {
304 u64 start;
305 u64 end;
306 } prev, curr;
307 void *efi_map_start, *efi_map_end, *p, *q;
308 efi_memory_desc_t *md, *check_md;
309 u64 efi_desc_size, start, end, granule_addr, last_granule_addr, first_non_wb_addr = 0;
310 unsigned long total_mem = 0;
311
312 efi_map_start = __va(ia64_boot_param->efi_memmap);
313 efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
314 efi_desc_size = ia64_boot_param->efi_memdesc_size;
315
316 for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
317 md = p;
318
319 /* skip over non-WB memory descriptors; that's all we're interested in... */
320 if (!(md->attribute & EFI_MEMORY_WB))
321 continue;
322
323 /*
324 * granule_addr is the base of md's first granule.
325 * [granule_addr - first_non_wb_addr) is guaranteed to
326 * be contiguous WB memory.
327 */
328 granule_addr = GRANULEROUNDDOWN(md->phys_addr);
329 first_non_wb_addr = max(first_non_wb_addr, granule_addr);
330
331 if (first_non_wb_addr < md->phys_addr) {
332 trim_bottom(md, granule_addr + IA64_GRANULE_SIZE);
333 granule_addr = GRANULEROUNDDOWN(md->phys_addr);
334 first_non_wb_addr = max(first_non_wb_addr, granule_addr);
335 }
336
337 for (q = p; q < efi_map_end; q += efi_desc_size) {
338 check_md = q;
339
340 if ((check_md->attribute & EFI_MEMORY_WB) &&
341 (check_md->phys_addr == first_non_wb_addr))
342 first_non_wb_addr += check_md->num_pages << EFI_PAGE_SHIFT;
343 else
344 break; /* non-WB or hole */
345 }
346
347 last_granule_addr = GRANULEROUNDDOWN(first_non_wb_addr);
348 if (last_granule_addr < md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT))
349 trim_top(md, last_granule_addr);
350
351 if (is_available_memory(md)) {
352 if (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) >= max_addr) {
353 if (md->phys_addr >= max_addr)
354 continue;
355 md->num_pages = (max_addr - md->phys_addr) >> EFI_PAGE_SHIFT;
356 first_non_wb_addr = max_addr;
357 }
358
359 if (total_mem >= mem_limit)
360 continue;
361
362 if (total_mem + (md->num_pages << EFI_PAGE_SHIFT) > mem_limit) {
363 unsigned long limit_addr = md->phys_addr;
364
365 limit_addr += mem_limit - total_mem;
366 limit_addr = GRANULEROUNDDOWN(limit_addr);
367
368 if (md->phys_addr > limit_addr)
369 continue;
370
371 md->num_pages = (limit_addr - md->phys_addr) >>
372 EFI_PAGE_SHIFT;
373 first_non_wb_addr = max_addr = md->phys_addr +
374 (md->num_pages << EFI_PAGE_SHIFT);
375 }
376 total_mem += (md->num_pages << EFI_PAGE_SHIFT);
377
378 if (md->num_pages == 0)
379 continue;
380
381 curr.start = PAGE_OFFSET + md->phys_addr;
382 curr.end = curr.start + (md->num_pages << EFI_PAGE_SHIFT);
383
384 if (!prev_valid) {
385 prev = curr;
386 prev_valid = 1;
387 } else {
388 if (curr.start < prev.start)
389 printk(KERN_ERR "Oops: EFI memory table not ordered!\n");
390
391 if (prev.end == curr.start) {
392 /* merge two consecutive memory ranges */
393 prev.end = curr.end;
394 } else {
395 start = PAGE_ALIGN(prev.start);
396 end = prev.end & PAGE_MASK;
397 if ((end > start) && (*callback)(start, end, arg) < 0)
398 return;
399 prev = curr;
400 }
401 }
402 }
403 }
404 if (prev_valid) {
405 start = PAGE_ALIGN(prev.start);
406 end = prev.end & PAGE_MASK;
407 if (end > start)
408 (*callback)(start, end, arg);
409 }
410} 276}
411 277
412/* 278/*
413 * Walk the EFI memory map to pull out leftover pages in the lower 279 * Walks the EFI memory map and calls CALLBACK once for each EFI memory descriptor that
414 * memory regions which do not end up in the regular memory map and 280 * has memory that is available for uncached allocator.
415 * stick them into the uncached allocator
416 *
417 * The regular walk function is significantly more complex than the
418 * uncached walk which means it really doesn't make sense to try and
419 * marge the two.
420 */ 281 */
421void __init 282void
422efi_memmap_walk_uc (efi_freemem_callback_t callback) 283efi_memmap_walk_uc (efi_freemem_callback_t callback, void *arg)
423{ 284{
424 void *efi_map_start, *efi_map_end, *p; 285 walk(callback, arg, EFI_MEMORY_UC);
425 efi_memory_desc_t *md;
426 u64 efi_desc_size, start, end;
427
428 efi_map_start = __va(ia64_boot_param->efi_memmap);
429 efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
430 efi_desc_size = ia64_boot_param->efi_memdesc_size;
431
432 for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
433 md = p;
434 if (md->attribute == EFI_MEMORY_UC) {
435 start = PAGE_ALIGN(md->phys_addr);
436 end = PAGE_ALIGN((md->phys_addr+(md->num_pages << EFI_PAGE_SHIFT)) & PAGE_MASK);
437 if ((*callback)(start, end, NULL) < 0)
438 return;
439 }
440 }
441} 286}
442 287
443
444/* 288/*
445 * Look for the PAL_CODE region reported by EFI and maps it using an 289 * Look for the PAL_CODE region reported by EFI and maps it using an
446 * ITR to enable safe PAL calls in virtual mode. See IA-64 Processor 290 * ITR to enable safe PAL calls in virtual mode. See IA-64 Processor
@@ -862,3 +706,307 @@ efi_uart_console_only(void)
862 printk(KERN_ERR "Malformed %s value\n", name); 706 printk(KERN_ERR "Malformed %s value\n", name);
863 return 0; 707 return 0;
864} 708}
709
710#define efi_md_size(md) (md->num_pages << EFI_PAGE_SHIFT)
711
712static inline u64
713kmd_end(kern_memdesc_t *kmd)
714{
715 return (kmd->start + (kmd->num_pages << EFI_PAGE_SHIFT));
716}
717
718static inline u64
719efi_md_end(efi_memory_desc_t *md)
720{
721 return (md->phys_addr + efi_md_size(md));
722}
723
724static inline int
725efi_wb(efi_memory_desc_t *md)
726{
727 return (md->attribute & EFI_MEMORY_WB);
728}
729
730static inline int
731efi_uc(efi_memory_desc_t *md)
732{
733 return (md->attribute & EFI_MEMORY_UC);
734}
735
736/*
737 * Look for the first granule aligned memory descriptor memory
738 * that is big enough to hold EFI memory map. Make sure this
739 * descriptor is atleast granule sized so it does not get trimmed
740 */
741struct kern_memdesc *
742find_memmap_space (void)
743{
744 u64 contig_low=0, contig_high=0;
745 u64 as = 0, ae;
746 void *efi_map_start, *efi_map_end, *p, *q;
747 efi_memory_desc_t *md, *pmd = NULL, *check_md;
748 u64 space_needed, efi_desc_size;
749 unsigned long total_mem = 0;
750
751 efi_map_start = __va(ia64_boot_param->efi_memmap);
752 efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
753 efi_desc_size = ia64_boot_param->efi_memdesc_size;
754
755 /*
756 * Worst case: we need 3 kernel descriptors for each efi descriptor
757 * (if every entry has a WB part in the middle, and UC head and tail),
758 * plus one for the end marker.
759 */
760 space_needed = sizeof(kern_memdesc_t) *
761 (3 * (ia64_boot_param->efi_memmap_size/efi_desc_size) + 1);
762
763 for (p = efi_map_start; p < efi_map_end; pmd = md, p += efi_desc_size) {
764 md = p;
765 if (!efi_wb(md)) {
766 continue;
767 }
768 if (pmd == NULL || !efi_wb(pmd) || efi_md_end(pmd) != md->phys_addr) {
769 contig_low = GRANULEROUNDUP(md->phys_addr);
770 contig_high = efi_md_end(md);
771 for (q = p + efi_desc_size; q < efi_map_end; q += efi_desc_size) {
772 check_md = q;
773 if (!efi_wb(check_md))
774 break;
775 if (contig_high != check_md->phys_addr)
776 break;
777 contig_high = efi_md_end(check_md);
778 }
779 contig_high = GRANULEROUNDDOWN(contig_high);
780 }
781 if (!is_available_memory(md) || md->type == EFI_LOADER_DATA)
782 continue;
783
784 /* Round ends inward to granule boundaries */
785 as = max(contig_low, md->phys_addr);
786 ae = min(contig_high, efi_md_end(md));
787
788 /* keep within max_addr= command line arg */
789 ae = min(ae, max_addr);
790 if (ae <= as)
791 continue;
792
793 /* avoid going over mem= command line arg */
794 if (total_mem + (ae - as) > mem_limit)
795 ae -= total_mem + (ae - as) - mem_limit;
796
797 if (ae <= as)
798 continue;
799
800 if (ae - as > space_needed)
801 break;
802 }
803 if (p >= efi_map_end)
804 panic("Can't allocate space for kernel memory descriptors");
805
806 return __va(as);
807}
808
809/*
810 * Walk the EFI memory map and gather all memory available for kernel
811 * to use. We can allocate partial granules only if the unavailable
812 * parts exist, and are WB.
813 */
814void
815efi_memmap_init(unsigned long *s, unsigned long *e)
816{
817 struct kern_memdesc *k, *prev = 0;
818 u64 contig_low=0, contig_high=0;
819 u64 as, ae, lim;
820 void *efi_map_start, *efi_map_end, *p, *q;
821 efi_memory_desc_t *md, *pmd = NULL, *check_md;
822 u64 efi_desc_size;
823 unsigned long total_mem = 0;
824
825 k = kern_memmap = find_memmap_space();
826
827 efi_map_start = __va(ia64_boot_param->efi_memmap);
828 efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
829 efi_desc_size = ia64_boot_param->efi_memdesc_size;
830
831 for (p = efi_map_start; p < efi_map_end; pmd = md, p += efi_desc_size) {
832 md = p;
833 if (!efi_wb(md)) {
834 if (efi_uc(md) && (md->type == EFI_CONVENTIONAL_MEMORY ||
835 md->type == EFI_BOOT_SERVICES_DATA)) {
836 k->attribute = EFI_MEMORY_UC;
837 k->start = md->phys_addr;
838 k->num_pages = md->num_pages;
839 k++;
840 }
841 continue;
842 }
843 if (pmd == NULL || !efi_wb(pmd) || efi_md_end(pmd) != md->phys_addr) {
844 contig_low = GRANULEROUNDUP(md->phys_addr);
845 contig_high = efi_md_end(md);
846 for (q = p + efi_desc_size; q < efi_map_end; q += efi_desc_size) {
847 check_md = q;
848 if (!efi_wb(check_md))
849 break;
850 if (contig_high != check_md->phys_addr)
851 break;
852 contig_high = efi_md_end(check_md);
853 }
854 contig_high = GRANULEROUNDDOWN(contig_high);
855 }
856 if (!is_available_memory(md))
857 continue;
858
859 /*
860 * Round ends inward to granule boundaries
861 * Give trimmings to uncached allocator
862 */
863 if (md->phys_addr < contig_low) {
864 lim = min(efi_md_end(md), contig_low);
865 if (efi_uc(md)) {
866 if (k > kern_memmap && (k-1)->attribute == EFI_MEMORY_UC &&
867 kmd_end(k-1) == md->phys_addr) {
868 (k-1)->num_pages += (lim - md->phys_addr) >> EFI_PAGE_SHIFT;
869 } else {
870 k->attribute = EFI_MEMORY_UC;
871 k->start = md->phys_addr;
872 k->num_pages = (lim - md->phys_addr) >> EFI_PAGE_SHIFT;
873 k++;
874 }
875 }
876 as = contig_low;
877 } else
878 as = md->phys_addr;
879
880 if (efi_md_end(md) > contig_high) {
881 lim = max(md->phys_addr, contig_high);
882 if (efi_uc(md)) {
883 if (lim == md->phys_addr && k > kern_memmap &&
884 (k-1)->attribute == EFI_MEMORY_UC &&
885 kmd_end(k-1) == md->phys_addr) {
886 (k-1)->num_pages += md->num_pages;
887 } else {
888 k->attribute = EFI_MEMORY_UC;
889 k->start = lim;
890 k->num_pages = (efi_md_end(md) - lim) >> EFI_PAGE_SHIFT;
891 k++;
892 }
893 }
894 ae = contig_high;
895 } else
896 ae = efi_md_end(md);
897
898 /* keep within max_addr= command line arg */
899 ae = min(ae, max_addr);
900 if (ae <= as)
901 continue;
902
903 /* avoid going over mem= command line arg */
904 if (total_mem + (ae - as) > mem_limit)
905 ae -= total_mem + (ae - as) - mem_limit;
906
907 if (ae <= as)
908 continue;
909 if (prev && kmd_end(prev) == md->phys_addr) {
910 prev->num_pages += (ae - as) >> EFI_PAGE_SHIFT;
911 total_mem += ae - as;
912 continue;
913 }
914 k->attribute = EFI_MEMORY_WB;
915 k->start = as;
916 k->num_pages = (ae - as) >> EFI_PAGE_SHIFT;
917 total_mem += ae - as;
918 prev = k++;
919 }
920 k->start = ~0L; /* end-marker */
921
922 /* reserve the memory we are using for kern_memmap */
923 *s = (u64)kern_memmap;
924 *e = (u64)++k;
925}
926
927void
928efi_initialize_iomem_resources(struct resource *code_resource,
929 struct resource *data_resource)
930{
931 struct resource *res;
932 void *efi_map_start, *efi_map_end, *p;
933 efi_memory_desc_t *md;
934 u64 efi_desc_size;
935 char *name;
936 unsigned long flags;
937
938 efi_map_start = __va(ia64_boot_param->efi_memmap);
939 efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
940 efi_desc_size = ia64_boot_param->efi_memdesc_size;
941
942 res = NULL;
943
944 for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
945 md = p;
946
947 if (md->num_pages == 0) /* should not happen */
948 continue;
949
950 flags = IORESOURCE_MEM;
951 switch (md->type) {
952
953 case EFI_MEMORY_MAPPED_IO:
954 case EFI_MEMORY_MAPPED_IO_PORT_SPACE:
955 continue;
956
957 case EFI_LOADER_CODE:
958 case EFI_LOADER_DATA:
959 case EFI_BOOT_SERVICES_DATA:
960 case EFI_BOOT_SERVICES_CODE:
961 case EFI_CONVENTIONAL_MEMORY:
962 if (md->attribute & EFI_MEMORY_WP) {
963 name = "System ROM";
964 flags |= IORESOURCE_READONLY;
965 } else {
966 name = "System RAM";
967 }
968 break;
969
970 case EFI_ACPI_MEMORY_NVS:
971 name = "ACPI Non-volatile Storage";
972 flags |= IORESOURCE_BUSY;
973 break;
974
975 case EFI_UNUSABLE_MEMORY:
976 name = "reserved";
977 flags |= IORESOURCE_BUSY | IORESOURCE_DISABLED;
978 break;
979
980 case EFI_RESERVED_TYPE:
981 case EFI_RUNTIME_SERVICES_CODE:
982 case EFI_RUNTIME_SERVICES_DATA:
983 case EFI_ACPI_RECLAIM_MEMORY:
984 default:
985 name = "reserved";
986 flags |= IORESOURCE_BUSY;
987 break;
988 }
989
990 if ((res = kzalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) {
991 printk(KERN_ERR "failed to alocate resource for iomem\n");
992 return;
993 }
994
995 res->name = name;
996 res->start = md->phys_addr;
997 res->end = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) - 1;
998 res->flags = flags;
999
1000 if (insert_resource(&iomem_resource, res) < 0)
1001 kfree(res);
1002 else {
1003 /*
1004 * We don't know which region contains
1005 * kernel data so we try it repeatedly and
1006 * let the resource manager test it.
1007 */
1008 insert_resource(res, code_resource);
1009 insert_resource(res, data_resource);
1010 }
1011 }
1012}
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
index 01572814abe4..5db9d3bcbbcb 100644
--- a/arch/ia64/kernel/ia64_ksyms.c
+++ b/arch/ia64/kernel/ia64_ksyms.c
@@ -42,6 +42,7 @@ EXPORT_SYMBOL(clear_page);
42 42
43#ifdef CONFIG_VIRTUAL_MEM_MAP 43#ifdef CONFIG_VIRTUAL_MEM_MAP
44#include <linux/bootmem.h> 44#include <linux/bootmem.h>
45EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */
45EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */ 46EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */
46#endif 47#endif
47 48
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 205d98028261..d33244c32759 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -57,9 +57,9 @@ int show_interrupts(struct seq_file *p, void *v)
57 57
58 if (i == 0) { 58 if (i == 0) {
59 seq_printf(p, " "); 59 seq_printf(p, " ");
60 for (j=0; j<NR_CPUS; j++) 60 for_each_online_cpu(j) {
61 if (cpu_online(j)) 61 seq_printf(p, "CPU%d ",j);
62 seq_printf(p, "CPU%d ",j); 62 }
63 seq_putc(p, '\n'); 63 seq_putc(p, '\n');
64 } 64 }
65 65
@@ -72,9 +72,9 @@ int show_interrupts(struct seq_file *p, void *v)
72#ifndef CONFIG_SMP 72#ifndef CONFIG_SMP
73 seq_printf(p, "%10u ", kstat_irqs(i)); 73 seq_printf(p, "%10u ", kstat_irqs(i));
74#else 74#else
75 for (j = 0; j < NR_CPUS; j++) 75 for_each_online_cpu(j) {
76 if (cpu_online(j)) 76 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
77 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); 77 }
78#endif 78#endif
79 seq_printf(p, " %14s", irq_desc[i].handler->typename); 79 seq_printf(p, " %14s", irq_desc[i].handler->typename);
80 seq_printf(p, " %s", action->name); 80 seq_printf(p, " %s", action->name);
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index c13ca0d49c4a..301f2e9d262e 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -91,16 +91,17 @@ ENTRY(vhpt_miss)
91 * (the "original") TLB miss, which may either be caused by an instruction 91 * (the "original") TLB miss, which may either be caused by an instruction
92 * fetch or a data access (or non-access). 92 * fetch or a data access (or non-access).
93 * 93 *
94 * What we do here is normal TLB miss handing for the _original_ miss, followed 94 * What we do here is normal TLB miss handing for the _original_ miss,
95 * by inserting the TLB entry for the virtual page table page that the VHPT 95 * followed by inserting the TLB entry for the virtual page table page
96 * walker was attempting to access. The latter gets inserted as long 96 * that the VHPT walker was attempting to access. The latter gets
97 * as both L1 and L2 have valid mappings for the faulting address. 97 * inserted as long as page table entry above pte level have valid
98 * The TLB entry for the original miss gets inserted only if 98 * mappings for the faulting address. The TLB entry for the original
99 * the L3 entry indicates that the page is present. 99 * miss gets inserted only if the pte entry indicates that the page is
100 * present.
100 * 101 *
101 * do_page_fault gets invoked in the following cases: 102 * do_page_fault gets invoked in the following cases:
102 * - the faulting virtual address uses unimplemented address bits 103 * - the faulting virtual address uses unimplemented address bits
103 * - the faulting virtual address has no L1, L2, or L3 mapping 104 * - the faulting virtual address has no valid page table mapping
104 */ 105 */
105 mov r16=cr.ifa // get address that caused the TLB miss 106 mov r16=cr.ifa // get address that caused the TLB miss
106#ifdef CONFIG_HUGETLB_PAGE 107#ifdef CONFIG_HUGETLB_PAGE
@@ -114,7 +115,7 @@ ENTRY(vhpt_miss)
114 shl r21=r16,3 // shift bit 60 into sign bit 115 shl r21=r16,3 // shift bit 60 into sign bit
115 shr.u r17=r16,61 // get the region number into r17 116 shr.u r17=r16,61 // get the region number into r17
116 ;; 117 ;;
117 shr r22=r21,3 118 shr.u r22=r21,3
118#ifdef CONFIG_HUGETLB_PAGE 119#ifdef CONFIG_HUGETLB_PAGE
119 extr.u r26=r25,2,6 120 extr.u r26=r25,2,6
120 ;; 121 ;;
@@ -126,7 +127,7 @@ ENTRY(vhpt_miss)
126#endif 127#endif
127 ;; 128 ;;
128 cmp.eq p6,p7=5,r17 // is IFA pointing into to region 5? 129 cmp.eq p6,p7=5,r17 // is IFA pointing into to region 5?
129 shr.u r18=r22,PGDIR_SHIFT // get bits 33-63 of the faulting address 130 shr.u r18=r22,PGDIR_SHIFT // get bottom portion of pgd index bit
130 ;; 131 ;;
131(p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place 132(p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place
132 133
@@ -137,24 +138,38 @@ ENTRY(vhpt_miss)
137(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT 138(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT
138(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3 139(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3
139 ;; 140 ;;
140(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8 141(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5
141(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8) 142(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4]
142 cmp.eq p7,p6=0,r21 // unused address bits all zeroes? 143 cmp.eq p7,p6=0,r21 // unused address bits all zeroes?
143 shr.u r18=r22,PMD_SHIFT // shift L2 index into position 144#ifdef CONFIG_PGTABLE_4
145 shr.u r28=r22,PUD_SHIFT // shift pud index into position
146#else
147 shr.u r18=r22,PMD_SHIFT // shift pmd index into position
148#endif
149 ;;
150 ld8 r17=[r17] // get *pgd (may be 0)
151 ;;
152(p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL?
153#ifdef CONFIG_PGTABLE_4
154 dep r28=r28,r17,3,(PAGE_SHIFT-3) // r28=pud_offset(pgd,addr)
144 ;; 155 ;;
145 ld8 r17=[r17] // fetch the L1 entry (may be 0) 156 shr.u r18=r22,PMD_SHIFT // shift pmd index into position
157(p7) ld8 r29=[r28] // get *pud (may be 0)
146 ;; 158 ;;
147(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL? 159(p7) cmp.eq.or.andcm p6,p7=r29,r0 // was pud_present(*pud) == NULL?
148 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry 160 dep r17=r18,r29,3,(PAGE_SHIFT-3) // r17=pmd_offset(pud,addr)
161#else
162 dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=pmd_offset(pgd,addr)
163#endif
149 ;; 164 ;;
150(p7) ld8 r20=[r17] // fetch the L2 entry (may be 0) 165(p7) ld8 r20=[r17] // get *pmd (may be 0)
151 shr.u r19=r22,PAGE_SHIFT // shift L3 index into position 166 shr.u r19=r22,PAGE_SHIFT // shift pte index into position
152 ;; 167 ;;
153(p7) cmp.eq.or.andcm p6,p7=r20,r0 // was L2 entry NULL? 168(p7) cmp.eq.or.andcm p6,p7=r20,r0 // was pmd_present(*pmd) == NULL?
154 dep r21=r19,r20,3,(PAGE_SHIFT-3) // compute address of L3 page table entry 169 dep r21=r19,r20,3,(PAGE_SHIFT-3) // r21=pte_offset(pmd,addr)
155 ;; 170 ;;
156(p7) ld8 r18=[r21] // read the L3 PTE 171(p7) ld8 r18=[r21] // read *pte
157 mov r19=cr.isr // cr.isr bit 0 tells us if this is an insn miss 172 mov r19=cr.isr // cr.isr bit 32 tells us if this is an insn miss
158 ;; 173 ;;
159(p7) tbit.z p6,p7=r18,_PAGE_P_BIT // page present bit cleared? 174(p7) tbit.z p6,p7=r18,_PAGE_P_BIT // page present bit cleared?
160 mov r22=cr.iha // get the VHPT address that caused the TLB miss 175 mov r22=cr.iha // get the VHPT address that caused the TLB miss
@@ -188,18 +203,33 @@ ENTRY(vhpt_miss)
188 dv_serialize_data 203 dv_serialize_data
189 204
190 /* 205 /*
191 * Re-check L2 and L3 pagetable. If they changed, we may have received a ptc.g 206 * Re-check pagetable entry. If they changed, we may have received a ptc.g
192 * between reading the pagetable and the "itc". If so, flush the entry we 207 * between reading the pagetable and the "itc". If so, flush the entry we
193 * inserted and retry. 208 * inserted and retry. At this point, we have:
209 *
210 * r28 = equivalent of pud_offset(pgd, ifa)
211 * r17 = equivalent of pmd_offset(pud, ifa)
212 * r21 = equivalent of pte_offset(pmd, ifa)
213 *
214 * r29 = *pud
215 * r20 = *pmd
216 * r18 = *pte
194 */ 217 */
195 ld8 r25=[r21] // read L3 PTE again 218 ld8 r25=[r21] // read *pte again
196 ld8 r26=[r17] // read L2 entry again 219 ld8 r26=[r17] // read *pmd again
220#ifdef CONFIG_PGTABLE_4
221 ld8 r19=[r28] // read *pud again
222#endif
223 cmp.ne p6,p7=r0,r0
197 ;; 224 ;;
198 cmp.ne p6,p7=r26,r20 // did L2 entry change 225 cmp.ne.or.andcm p6,p7=r26,r20 // did *pmd change
226#ifdef CONFIG_PGTABLE_4
227 cmp.ne.or.andcm p6,p7=r19,r29 // did *pud change
228#endif
199 mov r27=PAGE_SHIFT<<2 229 mov r27=PAGE_SHIFT<<2
200 ;; 230 ;;
201(p6) ptc.l r22,r27 // purge PTE page translation 231(p6) ptc.l r22,r27 // purge PTE page translation
202(p7) cmp.ne.or.andcm p6,p7=r25,r18 // did L3 PTE change 232(p7) cmp.ne.or.andcm p6,p7=r25,r18 // did *pte change
203 ;; 233 ;;
204(p6) ptc.l r16,r27 // purge translation 234(p6) ptc.l r16,r27 // purge translation
205#endif 235#endif
@@ -214,19 +244,19 @@ END(vhpt_miss)
214ENTRY(itlb_miss) 244ENTRY(itlb_miss)
215 DBG_FAULT(1) 245 DBG_FAULT(1)
216 /* 246 /*
217 * The ITLB handler accesses the L3 PTE via the virtually mapped linear 247 * The ITLB handler accesses the PTE via the virtually mapped linear
218 * page table. If a nested TLB miss occurs, we switch into physical 248 * page table. If a nested TLB miss occurs, we switch into physical
219 * mode, walk the page table, and then re-execute the L3 PTE read 249 * mode, walk the page table, and then re-execute the PTE read and
220 * and go on normally after that. 250 * go on normally after that.
221 */ 251 */
222 mov r16=cr.ifa // get virtual address 252 mov r16=cr.ifa // get virtual address
223 mov r29=b0 // save b0 253 mov r29=b0 // save b0
224 mov r31=pr // save predicates 254 mov r31=pr // save predicates
225.itlb_fault: 255.itlb_fault:
226 mov r17=cr.iha // get virtual address of L3 PTE 256 mov r17=cr.iha // get virtual address of PTE
227 movl r30=1f // load nested fault continuation point 257 movl r30=1f // load nested fault continuation point
228 ;; 258 ;;
2291: ld8 r18=[r17] // read L3 PTE 2591: ld8 r18=[r17] // read *pte
230 ;; 260 ;;
231 mov b0=r29 261 mov b0=r29
232 tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? 262 tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared?
@@ -241,7 +271,7 @@ ENTRY(itlb_miss)
241 */ 271 */
242 dv_serialize_data 272 dv_serialize_data
243 273
244 ld8 r19=[r17] // read L3 PTE again and see if same 274 ld8 r19=[r17] // read *pte again and see if same
245 mov r20=PAGE_SHIFT<<2 // setup page size for purge 275 mov r20=PAGE_SHIFT<<2 // setup page size for purge
246 ;; 276 ;;
247 cmp.ne p7,p0=r18,r19 277 cmp.ne p7,p0=r18,r19
@@ -258,19 +288,19 @@ END(itlb_miss)
258ENTRY(dtlb_miss) 288ENTRY(dtlb_miss)
259 DBG_FAULT(2) 289 DBG_FAULT(2)
260 /* 290 /*
261 * The DTLB handler accesses the L3 PTE via the virtually mapped linear 291 * The DTLB handler accesses the PTE via the virtually mapped linear
262 * page table. If a nested TLB miss occurs, we switch into physical 292 * page table. If a nested TLB miss occurs, we switch into physical
263 * mode, walk the page table, and then re-execute the L3 PTE read 293 * mode, walk the page table, and then re-execute the PTE read and
264 * and go on normally after that. 294 * go on normally after that.
265 */ 295 */
266 mov r16=cr.ifa // get virtual address 296 mov r16=cr.ifa // get virtual address
267 mov r29=b0 // save b0 297 mov r29=b0 // save b0
268 mov r31=pr // save predicates 298 mov r31=pr // save predicates
269dtlb_fault: 299dtlb_fault:
270 mov r17=cr.iha // get virtual address of L3 PTE 300 mov r17=cr.iha // get virtual address of PTE
271 movl r30=1f // load nested fault continuation point 301 movl r30=1f // load nested fault continuation point
272 ;; 302 ;;
2731: ld8 r18=[r17] // read L3 PTE 3031: ld8 r18=[r17] // read *pte
274 ;; 304 ;;
275 mov b0=r29 305 mov b0=r29
276 tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? 306 tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared?
@@ -285,7 +315,7 @@ dtlb_fault:
285 */ 315 */
286 dv_serialize_data 316 dv_serialize_data
287 317
288 ld8 r19=[r17] // read L3 PTE again and see if same 318 ld8 r19=[r17] // read *pte again and see if same
289 mov r20=PAGE_SHIFT<<2 // setup page size for purge 319 mov r20=PAGE_SHIFT<<2 // setup page size for purge
290 ;; 320 ;;
291 cmp.ne p7,p0=r18,r19 321 cmp.ne p7,p0=r18,r19
@@ -399,7 +429,7 @@ ENTRY(nested_dtlb_miss)
399 * r30: continuation address 429 * r30: continuation address
400 * r31: saved pr 430 * r31: saved pr
401 * 431 *
402 * Output: r17: physical address of L3 PTE of faulting address 432 * Output: r17: physical address of PTE of faulting address
403 * r29: saved b0 433 * r29: saved b0
404 * r30: continuation address 434 * r30: continuation address
405 * r31: saved pr 435 * r31: saved pr
@@ -429,21 +459,33 @@ ENTRY(nested_dtlb_miss)
429(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT 459(p6) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT
430(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3 460(p7) shr.u r21=r21,PGDIR_SHIFT+PAGE_SHIFT-3
431 ;; 461 ;;
432(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8 462(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=pgd_offset for region 5
433(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8) 463(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=pgd_offset for region[0-4]
434 cmp.eq p7,p6=0,r21 // unused address bits all zeroes? 464 cmp.eq p7,p6=0,r21 // unused address bits all zeroes?
435 shr.u r18=r22,PMD_SHIFT // shift L2 index into position 465#ifdef CONFIG_PGTABLE_4
466 shr.u r18=r22,PUD_SHIFT // shift pud index into position
467#else
468 shr.u r18=r22,PMD_SHIFT // shift pmd index into position
469#endif
436 ;; 470 ;;
437 ld8 r17=[r17] // fetch the L1 entry (may be 0) 471 ld8 r17=[r17] // get *pgd (may be 0)
438 ;; 472 ;;
439(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL? 473(p7) cmp.eq p6,p7=r17,r0 // was pgd_present(*pgd) == NULL?
440 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry 474 dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=p[u|m]d_offset(pgd,addr)
441 ;; 475 ;;
442(p7) ld8 r17=[r17] // fetch the L2 entry (may be 0) 476#ifdef CONFIG_PGTABLE_4
443 shr.u r19=r22,PAGE_SHIFT // shift L3 index into position 477(p7) ld8 r17=[r17] // get *pud (may be 0)
478 shr.u r18=r22,PMD_SHIFT // shift pmd index into position
479 ;;
480(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was pud_present(*pud) == NULL?
481 dep r17=r18,r17,3,(PAGE_SHIFT-3) // r17=pmd_offset(pud,addr)
482 ;;
483#endif
484(p7) ld8 r17=[r17] // get *pmd (may be 0)
485 shr.u r19=r22,PAGE_SHIFT // shift pte index into position
444 ;; 486 ;;
445(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL? 487(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was pmd_present(*pmd) == NULL?
446 dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry 488 dep r17=r19,r17,3,(PAGE_SHIFT-3) // r17=pte_offset(pmd,addr);
447(p6) br.cond.spnt page_fault 489(p6) br.cond.spnt page_fault
448 mov b0=r30 490 mov b0=r30
449 br.sptk.many b0 // return to continuation point 491 br.sptk.many b0 // return to continuation point
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 471086b808a4..2895d6e6062f 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -26,7 +26,6 @@
26#include <linux/config.h> 26#include <linux/config.h>
27#include <linux/kprobes.h> 27#include <linux/kprobes.h>
28#include <linux/ptrace.h> 28#include <linux/ptrace.h>
29#include <linux/spinlock.h>
30#include <linux/string.h> 29#include <linux/string.h>
31#include <linux/slab.h> 30#include <linux/slab.h>
32#include <linux/preempt.h> 31#include <linux/preempt.h>
@@ -38,13 +37,8 @@
38 37
39extern void jprobe_inst_return(void); 38extern void jprobe_inst_return(void);
40 39
41/* kprobe_status settings */ 40DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
42#define KPROBE_HIT_ACTIVE 0x00000001 41DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
43#define KPROBE_HIT_SS 0x00000002
44
45static struct kprobe *current_kprobe, *kprobe_prev;
46static unsigned long kprobe_status, kprobe_status_prev;
47static struct pt_regs jprobe_saved_regs;
48 42
49enum instruction_type {A, I, M, F, B, L, X, u}; 43enum instruction_type {A, I, M, F, B, L, X, u};
50static enum instruction_type bundle_encoding[32][3] = { 44static enum instruction_type bundle_encoding[32][3] = {
@@ -313,21 +307,22 @@ static int __kprobes valid_kprobe_addr(int template, int slot,
313 return 0; 307 return 0;
314} 308}
315 309
316static inline void save_previous_kprobe(void) 310static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb)
317{ 311{
318 kprobe_prev = current_kprobe; 312 kcb->prev_kprobe.kp = kprobe_running();
319 kprobe_status_prev = kprobe_status; 313 kcb->prev_kprobe.status = kcb->kprobe_status;
320} 314}
321 315
322static inline void restore_previous_kprobe(void) 316static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb)
323{ 317{
324 current_kprobe = kprobe_prev; 318 __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp;
325 kprobe_status = kprobe_status_prev; 319 kcb->kprobe_status = kcb->prev_kprobe.status;
326} 320}
327 321
328static inline void set_current_kprobe(struct kprobe *p) 322static inline void set_current_kprobe(struct kprobe *p,
323 struct kprobe_ctlblk *kcb)
329{ 324{
330 current_kprobe = p; 325 __get_cpu_var(current_kprobe) = p;
331} 326}
332 327
333static void kretprobe_trampoline(void) 328static void kretprobe_trampoline(void)
@@ -347,11 +342,12 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
347 struct kretprobe_instance *ri = NULL; 342 struct kretprobe_instance *ri = NULL;
348 struct hlist_head *head; 343 struct hlist_head *head;
349 struct hlist_node *node, *tmp; 344 struct hlist_node *node, *tmp;
350 unsigned long orig_ret_address = 0; 345 unsigned long flags, orig_ret_address = 0;
351 unsigned long trampoline_address = 346 unsigned long trampoline_address =
352 ((struct fnptr *)kretprobe_trampoline)->ip; 347 ((struct fnptr *)kretprobe_trampoline)->ip;
353 348
354 head = kretprobe_inst_table_head(current); 349 spin_lock_irqsave(&kretprobe_lock, flags);
350 head = kretprobe_inst_table_head(current);
355 351
356 /* 352 /*
357 * It is possible to have multiple instances associated with a given 353 * It is possible to have multiple instances associated with a given
@@ -367,9 +363,9 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
367 * kretprobe_trampoline 363 * kretprobe_trampoline
368 */ 364 */
369 hlist_for_each_entry_safe(ri, node, tmp, head, hlist) { 365 hlist_for_each_entry_safe(ri, node, tmp, head, hlist) {
370 if (ri->task != current) 366 if (ri->task != current)
371 /* another task is sharing our hash bucket */ 367 /* another task is sharing our hash bucket */
372 continue; 368 continue;
373 369
374 if (ri->rp && ri->rp->handler) 370 if (ri->rp && ri->rp->handler)
375 ri->rp->handler(ri, regs); 371 ri->rp->handler(ri, regs);
@@ -389,17 +385,19 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
389 BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address)); 385 BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address));
390 regs->cr_iip = orig_ret_address; 386 regs->cr_iip = orig_ret_address;
391 387
392 unlock_kprobes(); 388 reset_current_kprobe();
389 spin_unlock_irqrestore(&kretprobe_lock, flags);
393 preempt_enable_no_resched(); 390 preempt_enable_no_resched();
394 391
395 /* 392 /*
396 * By returning a non-zero value, we are telling 393 * By returning a non-zero value, we are telling
397 * kprobe_handler() that we have handled unlocking 394 * kprobe_handler() that we don't want the post_handler
398 * and re-enabling preemption. 395 * to run (and have re-enabled preemption)
399 */ 396 */
400 return 1; 397 return 1;
401} 398}
402 399
400/* Called with kretprobe_lock held */
403void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, 401void __kprobes arch_prepare_kretprobe(struct kretprobe *rp,
404 struct pt_regs *regs) 402 struct pt_regs *regs)
405{ 403{
@@ -606,17 +604,22 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
606 int ret = 0; 604 int ret = 0;
607 struct pt_regs *regs = args->regs; 605 struct pt_regs *regs = args->regs;
608 kprobe_opcode_t *addr = (kprobe_opcode_t *)instruction_pointer(regs); 606 kprobe_opcode_t *addr = (kprobe_opcode_t *)instruction_pointer(regs);
607 struct kprobe_ctlblk *kcb;
609 608
609 /*
610 * We don't want to be preempted for the entire
611 * duration of kprobe processing
612 */
610 preempt_disable(); 613 preempt_disable();
614 kcb = get_kprobe_ctlblk();
611 615
612 /* Handle recursion cases */ 616 /* Handle recursion cases */
613 if (kprobe_running()) { 617 if (kprobe_running()) {
614 p = get_kprobe(addr); 618 p = get_kprobe(addr);
615 if (p) { 619 if (p) {
616 if ( (kprobe_status == KPROBE_HIT_SS) && 620 if ((kcb->kprobe_status == KPROBE_HIT_SS) &&
617 (p->ainsn.inst_flag == INST_FLAG_BREAK_INST)) { 621 (p->ainsn.inst_flag == INST_FLAG_BREAK_INST)) {
618 ia64_psr(regs)->ss = 0; 622 ia64_psr(regs)->ss = 0;
619 unlock_kprobes();
620 goto no_kprobe; 623 goto no_kprobe;
621 } 624 }
622 /* We have reentered the pre_kprobe_handler(), since 625 /* We have reentered the pre_kprobe_handler(), since
@@ -625,17 +628,17 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
625 * just single step on the instruction of the new probe 628 * just single step on the instruction of the new probe
626 * without calling any user handlers. 629 * without calling any user handlers.
627 */ 630 */
628 save_previous_kprobe(); 631 save_previous_kprobe(kcb);
629 set_current_kprobe(p); 632 set_current_kprobe(p, kcb);
630 p->nmissed++; 633 p->nmissed++;
631 prepare_ss(p, regs); 634 prepare_ss(p, regs);
632 kprobe_status = KPROBE_REENTER; 635 kcb->kprobe_status = KPROBE_REENTER;
633 return 1; 636 return 1;
634 } else if (args->err == __IA64_BREAK_JPROBE) { 637 } else if (args->err == __IA64_BREAK_JPROBE) {
635 /* 638 /*
636 * jprobe instrumented function just completed 639 * jprobe instrumented function just completed
637 */ 640 */
638 p = current_kprobe; 641 p = __get_cpu_var(current_kprobe);
639 if (p->break_handler && p->break_handler(p, regs)) { 642 if (p->break_handler && p->break_handler(p, regs)) {
640 goto ss_probe; 643 goto ss_probe;
641 } 644 }
@@ -645,10 +648,8 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
645 } 648 }
646 } 649 }
647 650
648 lock_kprobes();
649 p = get_kprobe(addr); 651 p = get_kprobe(addr);
650 if (!p) { 652 if (!p) {
651 unlock_kprobes();
652 if (!is_ia64_break_inst(regs)) { 653 if (!is_ia64_break_inst(regs)) {
653 /* 654 /*
654 * The breakpoint instruction was removed right 655 * The breakpoint instruction was removed right
@@ -665,8 +666,8 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
665 goto no_kprobe; 666 goto no_kprobe;
666 } 667 }
667 668
668 kprobe_status = KPROBE_HIT_ACTIVE; 669 set_current_kprobe(p, kcb);
669 set_current_kprobe(p); 670 kcb->kprobe_status = KPROBE_HIT_ACTIVE;
670 671
671 if (p->pre_handler && p->pre_handler(p, regs)) 672 if (p->pre_handler && p->pre_handler(p, regs))
672 /* 673 /*
@@ -678,7 +679,7 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
678 679
679ss_probe: 680ss_probe:
680 prepare_ss(p, regs); 681 prepare_ss(p, regs);
681 kprobe_status = KPROBE_HIT_SS; 682 kcb->kprobe_status = KPROBE_HIT_SS;
682 return 1; 683 return 1;
683 684
684no_kprobe: 685no_kprobe:
@@ -688,23 +689,25 @@ no_kprobe:
688 689
689static int __kprobes post_kprobes_handler(struct pt_regs *regs) 690static int __kprobes post_kprobes_handler(struct pt_regs *regs)
690{ 691{
691 if (!kprobe_running()) 692 struct kprobe *cur = kprobe_running();
693 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
694
695 if (!cur)
692 return 0; 696 return 0;
693 697
694 if ((kprobe_status != KPROBE_REENTER) && current_kprobe->post_handler) { 698 if ((kcb->kprobe_status != KPROBE_REENTER) && cur->post_handler) {
695 kprobe_status = KPROBE_HIT_SSDONE; 699 kcb->kprobe_status = KPROBE_HIT_SSDONE;
696 current_kprobe->post_handler(current_kprobe, regs, 0); 700 cur->post_handler(cur, regs, 0);
697 } 701 }
698 702
699 resume_execution(current_kprobe, regs); 703 resume_execution(cur, regs);
700 704
701 /*Restore back the original saved kprobes variables and continue. */ 705 /*Restore back the original saved kprobes variables and continue. */
702 if (kprobe_status == KPROBE_REENTER) { 706 if (kcb->kprobe_status == KPROBE_REENTER) {
703 restore_previous_kprobe(); 707 restore_previous_kprobe(kcb);
704 goto out; 708 goto out;
705 } 709 }
706 710 reset_current_kprobe();
707 unlock_kprobes();
708 711
709out: 712out:
710 preempt_enable_no_resched(); 713 preempt_enable_no_resched();
@@ -713,16 +716,15 @@ out:
713 716
714static int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr) 717static int __kprobes kprobes_fault_handler(struct pt_regs *regs, int trapnr)
715{ 718{
716 if (!kprobe_running()) 719 struct kprobe *cur = kprobe_running();
717 return 0; 720 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
718 721
719 if (current_kprobe->fault_handler && 722 if (cur->fault_handler && cur->fault_handler(cur, regs, trapnr))
720 current_kprobe->fault_handler(current_kprobe, regs, trapnr))
721 return 1; 723 return 1;
722 724
723 if (kprobe_status & KPROBE_HIT_SS) { 725 if (kcb->kprobe_status & KPROBE_HIT_SS) {
724 resume_execution(current_kprobe, regs); 726 resume_execution(cur, regs);
725 unlock_kprobes(); 727 reset_current_kprobe();
726 preempt_enable_no_resched(); 728 preempt_enable_no_resched();
727 } 729 }
728 730
@@ -733,31 +735,42 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
733 unsigned long val, void *data) 735 unsigned long val, void *data)
734{ 736{
735 struct die_args *args = (struct die_args *)data; 737 struct die_args *args = (struct die_args *)data;
738 int ret = NOTIFY_DONE;
739
736 switch(val) { 740 switch(val) {
737 case DIE_BREAK: 741 case DIE_BREAK:
738 if (pre_kprobes_handler(args)) 742 /* err is break number from ia64_bad_break() */
739 return NOTIFY_STOP; 743 if (args->err == 0x80200 || args->err == 0x80300 || args->err == 0)
744 if (pre_kprobes_handler(args))
745 ret = NOTIFY_STOP;
740 break; 746 break;
741 case DIE_SS: 747 case DIE_FAULT:
742 if (post_kprobes_handler(args->regs)) 748 /* err is vector number from ia64_fault() */
743 return NOTIFY_STOP; 749 if (args->err == 36)
750 if (post_kprobes_handler(args->regs))
751 ret = NOTIFY_STOP;
744 break; 752 break;
745 case DIE_PAGE_FAULT: 753 case DIE_PAGE_FAULT:
746 if (kprobes_fault_handler(args->regs, args->trapnr)) 754 /* kprobe_running() needs smp_processor_id() */
747 return NOTIFY_STOP; 755 preempt_disable();
756 if (kprobe_running() &&
757 kprobes_fault_handler(args->regs, args->trapnr))
758 ret = NOTIFY_STOP;
759 preempt_enable();
748 default: 760 default:
749 break; 761 break;
750 } 762 }
751 return NOTIFY_DONE; 763 return ret;
752} 764}
753 765
754int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs) 766int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
755{ 767{
756 struct jprobe *jp = container_of(p, struct jprobe, kp); 768 struct jprobe *jp = container_of(p, struct jprobe, kp);
757 unsigned long addr = ((struct fnptr *)(jp->entry))->ip; 769 unsigned long addr = ((struct fnptr *)(jp->entry))->ip;
770 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
758 771
759 /* save architectural state */ 772 /* save architectural state */
760 jprobe_saved_regs = *regs; 773 kcb->jprobe_saved_regs = *regs;
761 774
762 /* after rfi, execute the jprobe instrumented function */ 775 /* after rfi, execute the jprobe instrumented function */
763 regs->cr_iip = addr & ~0xFULL; 776 regs->cr_iip = addr & ~0xFULL;
@@ -775,7 +788,10 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
775 788
776int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) 789int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
777{ 790{
778 *regs = jprobe_saved_regs; 791 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
792
793 *regs = kcb->jprobe_saved_regs;
794 preempt_enable_no_resched();
779 return 1; 795 return 1;
780} 796}
781 797
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 6dc726ad7137..355af15287c7 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -51,6 +51,9 @@
51 * 51 *
52 * 2005-08-12 Keith Owens <kaos@sgi.com> 52 * 2005-08-12 Keith Owens <kaos@sgi.com>
53 * Convert MCA/INIT handlers to use per event stacks and SAL/OS state. 53 * Convert MCA/INIT handlers to use per event stacks and SAL/OS state.
54 *
55 * 2005-10-07 Keith Owens <kaos@sgi.com>
56 * Add notify_die() hooks.
54 */ 57 */
55#include <linux/config.h> 58#include <linux/config.h>
56#include <linux/types.h> 59#include <linux/types.h>
@@ -58,7 +61,6 @@
58#include <linux/sched.h> 61#include <linux/sched.h>
59#include <linux/interrupt.h> 62#include <linux/interrupt.h>
60#include <linux/irq.h> 63#include <linux/irq.h>
61#include <linux/kallsyms.h>
62#include <linux/smp_lock.h> 64#include <linux/smp_lock.h>
63#include <linux/bootmem.h> 65#include <linux/bootmem.h>
64#include <linux/acpi.h> 66#include <linux/acpi.h>
@@ -69,6 +71,7 @@
69#include <linux/workqueue.h> 71#include <linux/workqueue.h>
70 72
71#include <asm/delay.h> 73#include <asm/delay.h>
74#include <asm/kdebug.h>
72#include <asm/machvec.h> 75#include <asm/machvec.h>
73#include <asm/meminit.h> 76#include <asm/meminit.h>
74#include <asm/page.h> 77#include <asm/page.h>
@@ -132,6 +135,14 @@ extern void salinfo_log_wakeup(int type, u8 *buffer, u64 size, int irqsafe);
132 135
133static int mca_init; 136static int mca_init;
134 137
138
139static void inline
140ia64_mca_spin(const char *func)
141{
142 printk(KERN_EMERG "%s: spinning here, not returning to SAL\n", func);
143 while (1)
144 cpu_relax();
145}
135/* 146/*
136 * IA64_MCA log support 147 * IA64_MCA log support
137 */ 148 */
@@ -508,9 +519,7 @@ ia64_mca_wakeup_all(void)
508 int cpu; 519 int cpu;
509 520
510 /* Clear the Rendez checkin flag for all cpus */ 521 /* Clear the Rendez checkin flag for all cpus */
511 for(cpu = 0; cpu < NR_CPUS; cpu++) { 522 for_each_online_cpu(cpu) {
512 if (!cpu_online(cpu))
513 continue;
514 if (ia64_mc_info.imi_rendez_checkin[cpu] == IA64_MCA_RENDEZ_CHECKIN_DONE) 523 if (ia64_mc_info.imi_rendez_checkin[cpu] == IA64_MCA_RENDEZ_CHECKIN_DONE)
515 ia64_mca_wakeup(cpu); 524 ia64_mca_wakeup(cpu);
516 } 525 }
@@ -528,13 +537,16 @@ ia64_mca_wakeup_all(void)
528 * Outputs : None 537 * Outputs : None
529 */ 538 */
530static irqreturn_t 539static irqreturn_t
531ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *ptregs) 540ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *regs)
532{ 541{
533 unsigned long flags; 542 unsigned long flags;
534 int cpu = smp_processor_id(); 543 int cpu = smp_processor_id();
535 544
536 /* Mask all interrupts */ 545 /* Mask all interrupts */
537 local_irq_save(flags); 546 local_irq_save(flags);
547 if (notify_die(DIE_MCA_RENDZVOUS_ENTER, "MCA", regs, 0, 0, 0)
548 == NOTIFY_STOP)
549 ia64_mca_spin(__FUNCTION__);
538 550
539 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_DONE; 551 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_DONE;
540 /* Register with the SAL monarch that the slave has 552 /* Register with the SAL monarch that the slave has
@@ -542,10 +554,18 @@ ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *ptregs)
542 */ 554 */
543 ia64_sal_mc_rendez(); 555 ia64_sal_mc_rendez();
544 556
557 if (notify_die(DIE_MCA_RENDZVOUS_PROCESS, "MCA", regs, 0, 0, 0)
558 == NOTIFY_STOP)
559 ia64_mca_spin(__FUNCTION__);
560
545 /* Wait for the monarch cpu to exit. */ 561 /* Wait for the monarch cpu to exit. */
546 while (monarch_cpu != -1) 562 while (monarch_cpu != -1)
547 cpu_relax(); /* spin until monarch leaves */ 563 cpu_relax(); /* spin until monarch leaves */
548 564
565 if (notify_die(DIE_MCA_RENDZVOUS_LEAVE, "MCA", regs, 0, 0, 0)
566 == NOTIFY_STOP)
567 ia64_mca_spin(__FUNCTION__);
568
549 /* Enable all interrupts */ 569 /* Enable all interrupts */
550 local_irq_restore(flags); 570 local_irq_restore(flags);
551 return IRQ_HANDLED; 571 return IRQ_HANDLED;
@@ -935,6 +955,9 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
935 oops_in_progress = 1; /* FIXME: make printk NMI/MCA/INIT safe */ 955 oops_in_progress = 1; /* FIXME: make printk NMI/MCA/INIT safe */
936 previous_current = ia64_mca_modify_original_stack(regs, sw, sos, "MCA"); 956 previous_current = ia64_mca_modify_original_stack(regs, sw, sos, "MCA");
937 monarch_cpu = cpu; 957 monarch_cpu = cpu;
958 if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, 0, 0, 0)
959 == NOTIFY_STOP)
960 ia64_mca_spin(__FUNCTION__);
938 ia64_wait_for_slaves(cpu); 961 ia64_wait_for_slaves(cpu);
939 962
940 /* Wakeup all the processors which are spinning in the rendezvous loop. 963 /* Wakeup all the processors which are spinning in the rendezvous loop.
@@ -944,6 +967,9 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
944 * spinning in SAL does not work. 967 * spinning in SAL does not work.
945 */ 968 */
946 ia64_mca_wakeup_all(); 969 ia64_mca_wakeup_all();
970 if (notify_die(DIE_MCA_MONARCH_PROCESS, "MCA", regs, 0, 0, 0)
971 == NOTIFY_STOP)
972 ia64_mca_spin(__FUNCTION__);
947 973
948 /* Get the MCA error record and log it */ 974 /* Get the MCA error record and log it */
949 ia64_mca_log_sal_error_record(SAL_INFO_TYPE_MCA); 975 ia64_mca_log_sal_error_record(SAL_INFO_TYPE_MCA);
@@ -962,6 +988,9 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
962 ia64_sal_clear_state_info(SAL_INFO_TYPE_MCA); 988 ia64_sal_clear_state_info(SAL_INFO_TYPE_MCA);
963 sos->os_status = IA64_MCA_CORRECTED; 989 sos->os_status = IA64_MCA_CORRECTED;
964 } 990 }
991 if (notify_die(DIE_MCA_MONARCH_LEAVE, "MCA", regs, 0, 0, recover)
992 == NOTIFY_STOP)
993 ia64_mca_spin(__FUNCTION__);
965 994
966 set_curr_task(cpu, previous_current); 995 set_curr_task(cpu, previous_current);
967 monarch_cpu = -1; 996 monarch_cpu = -1;
@@ -1016,6 +1045,11 @@ ia64_mca_cmc_int_handler(int cmc_irq, void *arg, struct pt_regs *ptregs)
1016 1045
1017 cmc_polling_enabled = 1; 1046 cmc_polling_enabled = 1;
1018 spin_unlock(&cmc_history_lock); 1047 spin_unlock(&cmc_history_lock);
1048 /* If we're being hit with CMC interrupts, we won't
1049 * ever execute the schedule_work() below. Need to
1050 * disable CMC interrupts on this processor now.
1051 */
1052 ia64_mca_cmc_vector_disable(NULL);
1019 schedule_work(&cmc_disable_work); 1053 schedule_work(&cmc_disable_work);
1020 1054
1021 /* 1055 /*
@@ -1185,6 +1219,37 @@ ia64_mca_cpe_poll (unsigned long dummy)
1185 1219
1186#endif /* CONFIG_ACPI */ 1220#endif /* CONFIG_ACPI */
1187 1221
1222static int
1223default_monarch_init_process(struct notifier_block *self, unsigned long val, void *data)
1224{
1225 int c;
1226 struct task_struct *g, *t;
1227 if (val != DIE_INIT_MONARCH_PROCESS)
1228 return NOTIFY_DONE;
1229 printk(KERN_ERR "Processes interrupted by INIT -");
1230 for_each_online_cpu(c) {
1231 struct ia64_sal_os_state *s;
1232 t = __va(__per_cpu_mca[c] + IA64_MCA_CPU_INIT_STACK_OFFSET);
1233 s = (struct ia64_sal_os_state *)((char *)t + MCA_SOS_OFFSET);
1234 g = s->prev_task;
1235 if (g) {
1236 if (g->pid)
1237 printk(" %d", g->pid);
1238 else
1239 printk(" %d (cpu %d task 0x%p)", g->pid, task_cpu(g), g);
1240 }
1241 }
1242 printk("\n\n");
1243 if (read_trylock(&tasklist_lock)) {
1244 do_each_thread (g, t) {
1245 printk("\nBacktrace of pid %d (%s)\n", t->pid, t->comm);
1246 show_stack(t, NULL);
1247 } while_each_thread (g, t);
1248 read_unlock(&tasklist_lock);
1249 }
1250 return NOTIFY_DONE;
1251}
1252
1188/* 1253/*
1189 * C portion of the OS INIT handler 1254 * C portion of the OS INIT handler
1190 * 1255 *
@@ -1209,8 +1274,7 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
1209 static atomic_t slaves; 1274 static atomic_t slaves;
1210 static atomic_t monarchs; 1275 static atomic_t monarchs;
1211 task_t *previous_current; 1276 task_t *previous_current;
1212 int cpu = smp_processor_id(), c; 1277 int cpu = smp_processor_id();
1213 struct task_struct *g, *t;
1214 1278
1215 oops_in_progress = 1; /* FIXME: make printk NMI/MCA/INIT safe */ 1279 oops_in_progress = 1; /* FIXME: make printk NMI/MCA/INIT safe */
1216 console_loglevel = 15; /* make sure printks make it to console */ 1280 console_loglevel = 15; /* make sure printks make it to console */
@@ -1250,8 +1314,17 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
1250 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_INIT; 1314 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_INIT;
1251 while (monarch_cpu == -1) 1315 while (monarch_cpu == -1)
1252 cpu_relax(); /* spin until monarch enters */ 1316 cpu_relax(); /* spin until monarch enters */
1317 if (notify_die(DIE_INIT_SLAVE_ENTER, "INIT", regs, 0, 0, 0)
1318 == NOTIFY_STOP)
1319 ia64_mca_spin(__FUNCTION__);
1320 if (notify_die(DIE_INIT_SLAVE_PROCESS, "INIT", regs, 0, 0, 0)
1321 == NOTIFY_STOP)
1322 ia64_mca_spin(__FUNCTION__);
1253 while (monarch_cpu != -1) 1323 while (monarch_cpu != -1)
1254 cpu_relax(); /* spin until monarch leaves */ 1324 cpu_relax(); /* spin until monarch leaves */
1325 if (notify_die(DIE_INIT_SLAVE_LEAVE, "INIT", regs, 0, 0, 0)
1326 == NOTIFY_STOP)
1327 ia64_mca_spin(__FUNCTION__);
1255 printk("Slave on cpu %d returning to normal service.\n", cpu); 1328 printk("Slave on cpu %d returning to normal service.\n", cpu);
1256 set_curr_task(cpu, previous_current); 1329 set_curr_task(cpu, previous_current);
1257 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE; 1330 ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_NOTDONE;
@@ -1260,6 +1333,9 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
1260 } 1333 }
1261 1334
1262 monarch_cpu = cpu; 1335 monarch_cpu = cpu;
1336 if (notify_die(DIE_INIT_MONARCH_ENTER, "INIT", regs, 0, 0, 0)
1337 == NOTIFY_STOP)
1338 ia64_mca_spin(__FUNCTION__);
1263 1339
1264 /* 1340 /*
1265 * Wait for a bit. On some machines (e.g., HP's zx2000 and zx6000, INIT can be 1341 * Wait for a bit. On some machines (e.g., HP's zx2000 and zx6000, INIT can be
@@ -1270,27 +1346,16 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
1270 printk("Delaying for 5 seconds...\n"); 1346 printk("Delaying for 5 seconds...\n");
1271 udelay(5*1000000); 1347 udelay(5*1000000);
1272 ia64_wait_for_slaves(cpu); 1348 ia64_wait_for_slaves(cpu);
1273 printk(KERN_ERR "Processes interrupted by INIT -"); 1349 /* If nobody intercepts DIE_INIT_MONARCH_PROCESS then we drop through
1274 for_each_online_cpu(c) { 1350 * to default_monarch_init_process() above and just print all the
1275 struct ia64_sal_os_state *s; 1351 * tasks.
1276 t = __va(__per_cpu_mca[c] + IA64_MCA_CPU_INIT_STACK_OFFSET); 1352 */
1277 s = (struct ia64_sal_os_state *)((char *)t + MCA_SOS_OFFSET); 1353 if (notify_die(DIE_INIT_MONARCH_PROCESS, "INIT", regs, 0, 0, 0)
1278 g = s->prev_task; 1354 == NOTIFY_STOP)
1279 if (g) { 1355 ia64_mca_spin(__FUNCTION__);
1280 if (g->pid) 1356 if (notify_die(DIE_INIT_MONARCH_LEAVE, "INIT", regs, 0, 0, 0)
1281 printk(" %d", g->pid); 1357 == NOTIFY_STOP)
1282 else 1358 ia64_mca_spin(__FUNCTION__);
1283 printk(" %d (cpu %d task 0x%p)", g->pid, task_cpu(g), g);
1284 }
1285 }
1286 printk("\n\n");
1287 if (read_trylock(&tasklist_lock)) {
1288 do_each_thread (g, t) {
1289 printk("\nBacktrace of pid %d (%s)\n", t->pid, t->comm);
1290 show_stack(t, NULL);
1291 } while_each_thread (g, t);
1292 read_unlock(&tasklist_lock);
1293 }
1294 printk("\nINIT dump complete. Monarch on cpu %d returning to normal service.\n", cpu); 1359 printk("\nINIT dump complete. Monarch on cpu %d returning to normal service.\n", cpu);
1295 atomic_dec(&monarchs); 1360 atomic_dec(&monarchs);
1296 set_curr_task(cpu, previous_current); 1361 set_curr_task(cpu, previous_current);
@@ -1459,6 +1524,10 @@ ia64_mca_init(void)
1459 s64 rc; 1524 s64 rc;
1460 struct ia64_sal_retval isrv; 1525 struct ia64_sal_retval isrv;
1461 u64 timeout = IA64_MCA_RENDEZ_TIMEOUT; /* platform specific */ 1526 u64 timeout = IA64_MCA_RENDEZ_TIMEOUT; /* platform specific */
1527 static struct notifier_block default_init_monarch_nb = {
1528 .notifier_call = default_monarch_init_process,
1529 .priority = 0/* we need to notified last */
1530 };
1462 1531
1463 IA64_MCA_DEBUG("%s: begin\n", __FUNCTION__); 1532 IA64_MCA_DEBUG("%s: begin\n", __FUNCTION__);
1464 1533
@@ -1552,6 +1621,10 @@ ia64_mca_init(void)
1552 "(status %ld)\n", rc); 1621 "(status %ld)\n", rc);
1553 return; 1622 return;
1554 } 1623 }
1624 if (register_die_notifier(&default_init_monarch_nb)) {
1625 printk(KERN_ERR "Failed to register default monarch INIT process\n");
1626 return;
1627 }
1555 1628
1556 IA64_MCA_DEBUG("%s: registered OS INIT handler with SAL\n", __FUNCTION__); 1629 IA64_MCA_DEBUG("%s: registered OS INIT handler with SAL\n", __FUNCTION__);
1557 1630
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S
index 499a065f4e60..db32fc1d3935 100644
--- a/arch/ia64/kernel/mca_asm.S
+++ b/arch/ia64/kernel/mca_asm.S
@@ -489,24 +489,27 @@ ia64_state_save:
489 ;; 489 ;;
490 st8 [temp1]=r17,16 // pal_min_state 490 st8 [temp1]=r17,16 // pal_min_state
491 st8 [temp2]=r6,16 // prev_IA64_KR_CURRENT 491 st8 [temp2]=r6,16 // prev_IA64_KR_CURRENT
492 mov r6=IA64_KR(CURRENT_STACK)
493 ;;
494 st8 [temp1]=r6,16 // prev_IA64_KR_CURRENT_STACK
495 st8 [temp2]=r0,16 // prev_task, starts off as NULL
492 mov r6=cr.ifa 496 mov r6=cr.ifa
493 ;; 497 ;;
494 st8 [temp1]=r0,16 // prev_task, starts off as NULL 498 st8 [temp1]=r12,16 // cr.isr
495 st8 [temp2]=r12,16 // cr.isr 499 st8 [temp2]=r6,16 // cr.ifa
496 mov r12=cr.itir 500 mov r12=cr.itir
497 ;; 501 ;;
498 st8 [temp1]=r6,16 // cr.ifa 502 st8 [temp1]=r12,16 // cr.itir
499 st8 [temp2]=r12,16 // cr.itir 503 st8 [temp2]=r11,16 // cr.iipa
500 mov r12=cr.iim 504 mov r12=cr.iim
501 ;; 505 ;;
502 st8 [temp1]=r11,16 // cr.iipa 506 st8 [temp1]=r12,16 // cr.iim
503 st8 [temp2]=r12,16 // cr.iim
504 mov r6=cr.iha
505(p1) mov r12=IA64_MCA_COLD_BOOT 507(p1) mov r12=IA64_MCA_COLD_BOOT
506(p2) mov r12=IA64_INIT_WARM_BOOT 508(p2) mov r12=IA64_INIT_WARM_BOOT
509 mov r6=cr.iha
507 ;; 510 ;;
508 st8 [temp1]=r6,16 // cr.iha 511 st8 [temp2]=r6,16 // cr.iha
509 st8 [temp2]=r12 // os_status, default is cold boot 512 st8 [temp1]=r12 // os_status, default is cold boot
510 mov r6=IA64_MCA_SAME_CONTEXT 513 mov r6=IA64_MCA_SAME_CONTEXT
511 ;; 514 ;;
512 st8 [temp1]=r6 // context, default is same context 515 st8 [temp1]=r6 // context, default is same context
@@ -823,9 +826,12 @@ ia64_state_restore:
823 ld8 r12=[temp1],16 // sal_ra 826 ld8 r12=[temp1],16 // sal_ra
824 ld8 r9=[temp2],16 // sal_gp 827 ld8 r9=[temp2],16 // sal_gp
825 ;; 828 ;;
826 ld8 r22=[temp1],24 // pal_min_state, virtual. skip prev_task 829 ld8 r22=[temp1],16 // pal_min_state, virtual
827 ld8 r21=[temp2],16 // prev_IA64_KR_CURRENT 830 ld8 r21=[temp2],16 // prev_IA64_KR_CURRENT
828 ;; 831 ;;
832 ld8 r16=[temp1],16 // prev_IA64_KR_CURRENT_STACK
833 ld8 r20=[temp2],16 // prev_task
834 ;;
829 ld8 temp3=[temp1],16 // cr.isr 835 ld8 temp3=[temp1],16 // cr.isr
830 ld8 temp4=[temp2],16 // cr.ifa 836 ld8 temp4=[temp2],16 // cr.ifa
831 ;; 837 ;;
@@ -846,6 +852,45 @@ ia64_state_restore:
846 ld8 r8=[temp1] // os_status 852 ld8 r8=[temp1] // os_status
847 ld8 r10=[temp2] // context 853 ld8 r10=[temp2] // context
848 854
855 /* Wire IA64_TR_CURRENT_STACK to the stack that we are resuming to. To
856 * avoid any dependencies on the algorithm in ia64_switch_to(), just
857 * purge any existing CURRENT_STACK mapping and insert the new one.
858 *
859 * r16 contains prev_IA64_KR_CURRENT_STACK, r21 contains
860 * prev_IA64_KR_CURRENT, these values may have been changed by the C
861 * code. Do not use r8, r9, r10, r22, they contain values ready for
862 * the return to SAL.
863 */
864
865 mov r15=IA64_KR(CURRENT_STACK) // physical granule mapped by IA64_TR_CURRENT_STACK
866 ;;
867 shl r15=r15,IA64_GRANULE_SHIFT
868 ;;
869 dep r15=-1,r15,61,3 // virtual granule
870 mov r18=IA64_GRANULE_SHIFT<<2 // for cr.itir.ps
871 ;;
872 ptr.d r15,r18
873 ;;
874 srlz.d
875
876 extr.u r19=r21,61,3 // r21 = prev_IA64_KR_CURRENT
877 shl r20=r16,IA64_GRANULE_SHIFT // r16 = prev_IA64_KR_CURRENT_STACK
878 movl r21=PAGE_KERNEL // page properties
879 ;;
880 mov IA64_KR(CURRENT_STACK)=r16
881 cmp.ne p6,p0=RGN_KERNEL,r19 // new stack is in the kernel region?
882 or r21=r20,r21 // construct PA | page properties
883(p6) br.spnt 1f // the dreaded cpu 0 idle task in region 5:(
884 ;;
885 mov cr.itir=r18
886 mov cr.ifa=r21
887 mov r20=IA64_TR_CURRENT_STACK
888 ;;
889 itr.d dtr[r20]=r21
890 ;;
891 srlz.d
8921:
893
849 br.sptk b0 894 br.sptk b0
850 895
851//EndStub////////////////////////////////////////////////////////////////////// 896//EndStub//////////////////////////////////////////////////////////////////////
@@ -982,6 +1027,7 @@ ia64_set_kernel_registers:
982 add temp4=temp4, temp1 // &struct ia64_sal_os_state.os_gp 1027 add temp4=temp4, temp1 // &struct ia64_sal_os_state.os_gp
983 add r12=temp1, temp3 // kernel stack pointer on MCA/INIT stack 1028 add r12=temp1, temp3 // kernel stack pointer on MCA/INIT stack
984 add r13=temp1, r3 // set current to start of MCA/INIT stack 1029 add r13=temp1, r3 // set current to start of MCA/INIT stack
1030 add r20=temp1, r3 // physical start of MCA/INIT stack
985 ;; 1031 ;;
986 ld8 r1=[temp4] // OS GP from SAL OS state 1032 ld8 r1=[temp4] // OS GP from SAL OS state
987 ;; 1033 ;;
@@ -991,7 +1037,35 @@ ia64_set_kernel_registers:
991 ;; 1037 ;;
992 mov IA64_KR(CURRENT)=r13 1038 mov IA64_KR(CURRENT)=r13
993 1039
994 // FIXME: do I need to wire IA64_KR_CURRENT_STACK and IA64_TR_CURRENT_STACK? 1040 /* Wire IA64_TR_CURRENT_STACK to the MCA/INIT handler stack. To avoid
1041 * any dependencies on the algorithm in ia64_switch_to(), just purge
1042 * any existing CURRENT_STACK mapping and insert the new one.
1043 */
1044
1045 mov r16=IA64_KR(CURRENT_STACK) // physical granule mapped by IA64_TR_CURRENT_STACK
1046 ;;
1047 shl r16=r16,IA64_GRANULE_SHIFT
1048 ;;
1049 dep r16=-1,r16,61,3 // virtual granule
1050 mov r18=IA64_GRANULE_SHIFT<<2 // for cr.itir.ps
1051 ;;
1052 ptr.d r16,r18
1053 ;;
1054 srlz.d
1055
1056 shr.u r16=r20,IA64_GRANULE_SHIFT // r20 = physical start of MCA/INIT stack
1057 movl r21=PAGE_KERNEL // page properties
1058 ;;
1059 mov IA64_KR(CURRENT_STACK)=r16
1060 or r21=r20,r21 // construct PA | page properties
1061 ;;
1062 mov cr.itir=r18
1063 mov cr.ifa=r13
1064 mov r20=IA64_TR_CURRENT_STACK
1065 ;;
1066 itr.d dtr[r20]=r21
1067 ;;
1068 srlz.d
995 1069
996 br.sptk b0 1070 br.sptk b0
997 1071
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c
index 80f83d6cdbfc..3492e3211a44 100644
--- a/arch/ia64/kernel/mca_drv.c
+++ b/arch/ia64/kernel/mca_drv.c
@@ -56,8 +56,9 @@ static struct page *page_isolate[MAX_PAGE_ISOLATE];
56static int num_page_isolate = 0; 56static int num_page_isolate = 0;
57 57
58typedef enum { 58typedef enum {
59 ISOLATE_NG = 0, 59 ISOLATE_NG,
60 ISOLATE_OK = 1 60 ISOLATE_OK,
61 ISOLATE_NONE
61} isolate_status_t; 62} isolate_status_t;
62 63
63/* 64/*
@@ -74,7 +75,7 @@ static struct {
74 * @paddr: poisoned memory location 75 * @paddr: poisoned memory location
75 * 76 *
76 * Return value: 77 * Return value:
77 * ISOLATE_OK / ISOLATE_NG 78 * one of isolate_status_t, ISOLATE_OK/NG/NONE.
78 */ 79 */
79 80
80static isolate_status_t 81static isolate_status_t
@@ -85,7 +86,10 @@ mca_page_isolate(unsigned long paddr)
85 86
86 /* whether physical address is valid or not */ 87 /* whether physical address is valid or not */
87 if (!ia64_phys_addr_valid(paddr)) 88 if (!ia64_phys_addr_valid(paddr))
88 return ISOLATE_NG; 89 return ISOLATE_NONE;
90
91 if (!pfn_valid(paddr >> PAGE_SHIFT))
92 return ISOLATE_NONE;
89 93
90 /* convert physical address to physical page number */ 94 /* convert physical address to physical page number */
91 p = pfn_to_page(paddr>>PAGE_SHIFT); 95 p = pfn_to_page(paddr>>PAGE_SHIFT);
@@ -104,6 +108,7 @@ mca_page_isolate(unsigned long paddr)
104 return ISOLATE_NG; 108 return ISOLATE_NG;
105 109
106 /* add attribute 'Reserved' and register the page */ 110 /* add attribute 'Reserved' and register the page */
111 get_page(p);
107 SetPageReserved(p); 112 SetPageReserved(p);
108 page_isolate[num_page_isolate++] = p; 113 page_isolate[num_page_isolate++] = p;
109 114
@@ -122,10 +127,15 @@ mca_handler_bh(unsigned long paddr)
122 current->pid, current->comm); 127 current->pid, current->comm);
123 128
124 spin_lock(&mca_bh_lock); 129 spin_lock(&mca_bh_lock);
125 if (mca_page_isolate(paddr) == ISOLATE_OK) { 130 switch (mca_page_isolate(paddr)) {
131 case ISOLATE_OK:
126 printk(KERN_DEBUG "Page isolation: ( %lx ) success.\n", paddr); 132 printk(KERN_DEBUG "Page isolation: ( %lx ) success.\n", paddr);
127 } else { 133 break;
134 case ISOLATE_NG:
128 printk(KERN_DEBUG "Page isolation: ( %lx ) failure.\n", paddr); 135 printk(KERN_DEBUG "Page isolation: ( %lx ) failure.\n", paddr);
136 break;
137 default:
138 break;
129 } 139 }
130 spin_unlock(&mca_bh_lock); 140 spin_unlock(&mca_bh_lock);
131 141
@@ -537,9 +547,20 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
537 (pal_processor_state_info_t*)peidx_psp(peidx); 547 (pal_processor_state_info_t*)peidx_psp(peidx);
538 548
539 /* 549 /*
540 * We cannot recover errors with other than bus_check. 550 * Processor recovery status must key off of the PAL recovery
551 * status in the Processor State Parameter.
552 */
553
554 /*
555 * The machine check is corrected.
541 */ 556 */
542 if (psp->cc || psp->rc || psp->uc) 557 if (psp->cm == 1)
558 return 1;
559
560 /*
561 * The error was not contained. Software must be reset.
562 */
563 if (psp->us || psp->ci == 0)
543 return 0; 564 return 0;
544 565
545 /* 566 /*
@@ -560,8 +581,6 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
560 return 0; 581 return 0;
561 if (pbci->eb && pbci->bsi > 0) 582 if (pbci->eb && pbci->bsi > 0)
562 return 0; 583 return 0;
563 if (psp->ci == 0)
564 return 0;
565 584
566 /* 585 /*
567 * This is a local MCA and estimated as recoverble external bus error. 586 * This is a local MCA and estimated as recoverble external bus error.
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index f1aca7cffd12..7a2f0a798d12 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -947,8 +947,8 @@ void
947percpu_modcopy (void *pcpudst, const void *src, unsigned long size) 947percpu_modcopy (void *pcpudst, const void *src, unsigned long size)
948{ 948{
949 unsigned int i; 949 unsigned int i;
950 for (i = 0; i < NR_CPUS; i++) 950 for_each_cpu(i) {
951 if (cpu_possible(i)) 951 memcpy(pcpudst + __per_cpu_offset[i], src, size);
952 memcpy(pcpudst + __per_cpu_offset[i], src, size); 952 }
953} 953}
954#endif /* CONFIG_SMP */ 954#endif /* CONFIG_SMP */
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c
index 367804a605fa..6a4ac7d70b35 100644
--- a/arch/ia64/kernel/patch.c
+++ b/arch/ia64/kernel/patch.c
@@ -64,22 +64,30 @@ ia64_patch (u64 insn_addr, u64 mask, u64 val)
64void 64void
65ia64_patch_imm64 (u64 insn_addr, u64 val) 65ia64_patch_imm64 (u64 insn_addr, u64 val)
66{ 66{
67 ia64_patch(insn_addr, 67 /* The assembler may generate offset pointing to either slot 1
68 or slot 2 for a long (2-slot) instruction, occupying slots 1
69 and 2. */
70 insn_addr &= -16UL;
71 ia64_patch(insn_addr + 2,
68 0x01fffefe000UL, ( ((val & 0x8000000000000000UL) >> 27) /* bit 63 -> 36 */ 72 0x01fffefe000UL, ( ((val & 0x8000000000000000UL) >> 27) /* bit 63 -> 36 */
69 | ((val & 0x0000000000200000UL) << 0) /* bit 21 -> 21 */ 73 | ((val & 0x0000000000200000UL) << 0) /* bit 21 -> 21 */
70 | ((val & 0x00000000001f0000UL) << 6) /* bit 16 -> 22 */ 74 | ((val & 0x00000000001f0000UL) << 6) /* bit 16 -> 22 */
71 | ((val & 0x000000000000ff80UL) << 20) /* bit 7 -> 27 */ 75 | ((val & 0x000000000000ff80UL) << 20) /* bit 7 -> 27 */
72 | ((val & 0x000000000000007fUL) << 13) /* bit 0 -> 13 */)); 76 | ((val & 0x000000000000007fUL) << 13) /* bit 0 -> 13 */));
73 ia64_patch(insn_addr - 1, 0x1ffffffffffUL, val >> 22); 77 ia64_patch(insn_addr + 1, 0x1ffffffffffUL, val >> 22);
74} 78}
75 79
76void 80void
77ia64_patch_imm60 (u64 insn_addr, u64 val) 81ia64_patch_imm60 (u64 insn_addr, u64 val)
78{ 82{
79 ia64_patch(insn_addr, 83 /* The assembler may generate offset pointing to either slot 1
84 or slot 2 for a long (2-slot) instruction, occupying slots 1
85 and 2. */
86 insn_addr &= -16UL;
87 ia64_patch(insn_addr + 2,
80 0x011ffffe000UL, ( ((val & 0x0800000000000000UL) >> 23) /* bit 59 -> 36 */ 88 0x011ffffe000UL, ( ((val & 0x0800000000000000UL) >> 23) /* bit 59 -> 36 */
81 | ((val & 0x00000000000fffffUL) << 13) /* bit 0 -> 13 */)); 89 | ((val & 0x00000000000fffffUL) << 13) /* bit 0 -> 13 */));
82 ia64_patch(insn_addr - 1, 0x1fffffffffcUL, val >> 18); 90 ia64_patch(insn_addr + 1, 0x1fffffffffcUL, val >> 18);
83} 91}
84 92
85/* 93/*
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index d71731ee5b61..410d4804fa6e 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2352,7 +2352,8 @@ pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned lon
2352 insert_vm_struct(mm, vma); 2352 insert_vm_struct(mm, vma);
2353 2353
2354 mm->total_vm += size >> PAGE_SHIFT; 2354 mm->total_vm += size >> PAGE_SHIFT;
2355 vm_stat_account(vma); 2355 vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file,
2356 vma_pages(vma));
2356 up_write(&task->mm->mmap_sem); 2357 up_write(&task->mm->mmap_sem);
2357 2358
2358 /* 2359 /*
@@ -4939,7 +4940,7 @@ abort_locked:
4939 if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT; 4940 if (call_made && PFM_CMD_RW_ARG(cmd) && copy_to_user(arg, args_k, base_sz*count)) ret = -EFAULT;
4940 4941
4941error_args: 4942error_args:
4942 if (args_k) kfree(args_k); 4943 kfree(args_k);
4943 4944
4944 DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret)); 4945 DPRINT(("cmd=%s ret=%ld\n", PFM_CMD_NAME(cmd), ret));
4945 4946
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 051e050359e4..2e33665d9c18 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -4,6 +4,9 @@
4 * Copyright (C) 1998-2003 Hewlett-Packard Co 4 * Copyright (C) 1998-2003 Hewlett-Packard Co
5 * David Mosberger-Tang <davidm@hpl.hp.com> 5 * David Mosberger-Tang <davidm@hpl.hp.com>
6 * 04/11/17 Ashok Raj <ashok.raj@intel.com> Added CPU Hotplug Support 6 * 04/11/17 Ashok Raj <ashok.raj@intel.com> Added CPU Hotplug Support
7 *
8 * 2005-10-07 Keith Owens <kaos@sgi.com>
9 * Add notify_die() hooks.
7 */ 10 */
8#define __KERNEL_SYSCALLS__ /* see <asm/unistd.h> */ 11#define __KERNEL_SYSCALLS__ /* see <asm/unistd.h> */
9#include <linux/config.h> 12#include <linux/config.h>
@@ -34,6 +37,7 @@
34#include <asm/elf.h> 37#include <asm/elf.h>
35#include <asm/ia32.h> 38#include <asm/ia32.h>
36#include <asm/irq.h> 39#include <asm/irq.h>
40#include <asm/kdebug.h>
37#include <asm/pgalloc.h> 41#include <asm/pgalloc.h>
38#include <asm/processor.h> 42#include <asm/processor.h>
39#include <asm/sal.h> 43#include <asm/sal.h>
@@ -197,11 +201,12 @@ void
197default_idle (void) 201default_idle (void)
198{ 202{
199 local_irq_enable(); 203 local_irq_enable();
200 while (!need_resched()) 204 while (!need_resched()) {
201 if (can_do_pal_halt) 205 if (can_do_pal_halt)
202 safe_halt(); 206 safe_halt();
203 else 207 else
204 cpu_relax(); 208 cpu_relax();
209 }
205} 210}
206 211
207#ifdef CONFIG_HOTPLUG_CPU 212#ifdef CONFIG_HOTPLUG_CPU
@@ -263,16 +268,20 @@ void __attribute__((noreturn))
263cpu_idle (void) 268cpu_idle (void)
264{ 269{
265 void (*mark_idle)(int) = ia64_mark_idle; 270 void (*mark_idle)(int) = ia64_mark_idle;
271 int cpu = smp_processor_id();
266 272
267 /* endless idle loop with no priority at all */ 273 /* endless idle loop with no priority at all */
268 while (1) { 274 while (1) {
275 if (can_do_pal_halt)
276 clear_thread_flag(TIF_POLLING_NRFLAG);
277 else
278 set_thread_flag(TIF_POLLING_NRFLAG);
279
280 if (!need_resched()) {
281 void (*idle)(void);
269#ifdef CONFIG_SMP 282#ifdef CONFIG_SMP
270 if (!need_resched())
271 min_xtp(); 283 min_xtp();
272#endif 284#endif
273 while (!need_resched()) {
274 void (*idle)(void);
275
276 if (__get_cpu_var(cpu_idle_state)) 285 if (__get_cpu_var(cpu_idle_state))
277 __get_cpu_var(cpu_idle_state) = 0; 286 __get_cpu_var(cpu_idle_state) = 0;
278 287
@@ -284,17 +293,17 @@ cpu_idle (void)
284 if (!idle) 293 if (!idle)
285 idle = default_idle; 294 idle = default_idle;
286 (*idle)(); 295 (*idle)();
287 } 296 if (mark_idle)
288 297 (*mark_idle)(0);
289 if (mark_idle)
290 (*mark_idle)(0);
291
292#ifdef CONFIG_SMP 298#ifdef CONFIG_SMP
293 normal_xtp(); 299 normal_xtp();
294#endif 300#endif
301 }
302 preempt_enable_no_resched();
295 schedule(); 303 schedule();
304 preempt_disable();
296 check_pgt_cache(); 305 check_pgt_cache();
297 if (cpu_is_offline(smp_processor_id())) 306 if (cpu_is_offline(cpu))
298 play_dead(); 307 play_dead();
299 } 308 }
300} 309}
@@ -709,13 +718,6 @@ kernel_thread_helper (int (*fn)(void *), void *arg)
709void 718void
710flush_thread (void) 719flush_thread (void)
711{ 720{
712 /*
713 * Remove function-return probe instances associated with this task
714 * and put them back on the free list. Do not insert an exit probe for
715 * this function, it will be disabled by kprobe_flush_task if you do.
716 */
717 kprobe_flush_task(current);
718
719 /* drop floating-point and debug-register state if it exists: */ 721 /* drop floating-point and debug-register state if it exists: */
720 current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); 722 current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
721 ia64_drop_fpu(current); 723 ia64_drop_fpu(current);
@@ -804,12 +806,14 @@ cpu_halt (void)
804void 806void
805machine_restart (char *restart_cmd) 807machine_restart (char *restart_cmd)
806{ 808{
809 (void) notify_die(DIE_MACHINE_RESTART, restart_cmd, NULL, 0, 0, 0);
807 (*efi.reset_system)(EFI_RESET_WARM, 0, 0, NULL); 810 (*efi.reset_system)(EFI_RESET_WARM, 0, 0, NULL);
808} 811}
809 812
810void 813void
811machine_halt (void) 814machine_halt (void)
812{ 815{
816 (void) notify_die(DIE_MACHINE_HALT, "", NULL, 0, 0, 0);
813 cpu_halt(); 817 cpu_halt();
814} 818}
815 819
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index bbb8bc7c0552..4b19d0410632 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -587,8 +587,9 @@ thread_matches (struct task_struct *thread, unsigned long addr)
587static struct task_struct * 587static struct task_struct *
588find_thread_for_addr (struct task_struct *child, unsigned long addr) 588find_thread_for_addr (struct task_struct *child, unsigned long addr)
589{ 589{
590 struct task_struct *g, *p; 590 struct task_struct *p;
591 struct mm_struct *mm; 591 struct mm_struct *mm;
592 struct list_head *this, *next;
592 int mm_users; 593 int mm_users;
593 594
594 if (!(mm = get_task_mm(child))) 595 if (!(mm = get_task_mm(child)))
@@ -600,28 +601,21 @@ find_thread_for_addr (struct task_struct *child, unsigned long addr)
600 goto out; /* not multi-threaded */ 601 goto out; /* not multi-threaded */
601 602
602 /* 603 /*
603 * First, traverse the child's thread-list. Good for scalability with 604 * Traverse the current process' children list. Every task that
604 * NPTL-threads. 605 * one attaches to becomes a child. And it is only attached children
606 * of the debugger that are of interest (ptrace_check_attach checks
607 * for this).
605 */ 608 */
606 p = child; 609 list_for_each_safe(this, next, &current->children) {
607 do { 610 p = list_entry(this, struct task_struct, sibling);
608 if (thread_matches(p, addr)) { 611 if (p->mm != mm)
609 child = p;
610 goto out;
611 }
612 if (mm_users-- <= 1)
613 goto out;
614 } while ((p = next_thread(p)) != child);
615
616 do_each_thread(g, p) {
617 if (child->mm != mm)
618 continue; 612 continue;
619
620 if (thread_matches(p, addr)) { 613 if (thread_matches(p, addr)) {
621 child = p; 614 child = p;
622 goto out; 615 goto out;
623 } 616 }
624 } while_each_thread(g, p); 617 }
618
625 out: 619 out:
626 mmput(mm); 620 mmput(mm);
627 return child; 621 return child;
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 1f5c26dbe705..5add0bcf87a7 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -78,7 +78,27 @@ struct screen_info screen_info;
78unsigned long vga_console_iobase; 78unsigned long vga_console_iobase;
79unsigned long vga_console_membase; 79unsigned long vga_console_membase;
80 80
81static struct resource data_resource = {
82 .name = "Kernel data",
83 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
84};
85
86static struct resource code_resource = {
87 .name = "Kernel code",
88 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
89};
90extern void efi_initialize_iomem_resources(struct resource *,
91 struct resource *);
92extern char _text[], _end[], _etext[];
93
81unsigned long ia64_max_cacheline_size; 94unsigned long ia64_max_cacheline_size;
95
96int dma_get_cache_alignment(void)
97{
98 return ia64_max_cacheline_size;
99}
100EXPORT_SYMBOL(dma_get_cache_alignment);
101
82unsigned long ia64_iobase; /* virtual address for I/O accesses */ 102unsigned long ia64_iobase; /* virtual address for I/O accesses */
83EXPORT_SYMBOL(ia64_iobase); 103EXPORT_SYMBOL(ia64_iobase);
84struct io_space io_space[MAX_IO_SPACES]; 104struct io_space io_space[MAX_IO_SPACES];
@@ -171,6 +191,22 @@ sort_regions (struct rsvd_region *rsvd_region, int max)
171 } 191 }
172} 192}
173 193
194/*
195 * Request address space for all standard resources
196 */
197static int __init register_memory(void)
198{
199 code_resource.start = ia64_tpa(_text);
200 code_resource.end = ia64_tpa(_etext) - 1;
201 data_resource.start = ia64_tpa(_etext);
202 data_resource.end = ia64_tpa(_end) - 1;
203 efi_initialize_iomem_resources(&code_resource, &data_resource);
204
205 return 0;
206}
207
208__initcall(register_memory);
209
174/** 210/**
175 * reserve_memory - setup reserved memory areas 211 * reserve_memory - setup reserved memory areas
176 * 212 *
@@ -211,6 +247,9 @@ reserve_memory (void)
211 } 247 }
212#endif 248#endif
213 249
250 efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end);
251 n++;
252
214 /* end of memory marker */ 253 /* end of memory marker */
215 rsvd_region[n].start = ~0UL; 254 rsvd_region[n].start = ~0UL;
216 rsvd_region[n].end = ~0UL; 255 rsvd_region[n].end = ~0UL;
@@ -244,28 +283,31 @@ find_initrd (void)
244static void __init 283static void __init
245io_port_init (void) 284io_port_init (void)
246{ 285{
247 extern unsigned long ia64_iobase;
248 unsigned long phys_iobase; 286 unsigned long phys_iobase;
249 287
250 /* 288 /*
251 * Set `iobase' to the appropriate address in region 6 (uncached access range). 289 * Set `iobase' based on the EFI memory map or, failing that, the
290 * value firmware left in ar.k0.
252 * 291 *
253 * The EFI memory map is the "preferred" location to get the I/O port space base, 292 * Note that in ia32 mode, IN/OUT instructions use ar.k0 to compute
254 * rather the relying on AR.KR0. This should become more clear in future SAL 293 * the port's virtual address, so ia32_load_state() loads it with a
255 * specs. We'll fall back to getting it out of AR.KR0 if no appropriate entry is 294 * user virtual address. But in ia64 mode, glibc uses the
256 * found in the memory map. 295 * *physical* address in ar.k0 to mmap the appropriate area from
296 * /dev/mem, and the inX()/outX() interfaces use MMIO. In both
297 * cases, user-mode can only use the legacy 0-64K I/O port space.
298 *
299 * ar.k0 is not involved in kernel I/O port accesses, which can use
300 * any of the I/O port spaces and are done via MMIO using the
301 * virtual mmio_base from the appropriate io_space[].
257 */ 302 */
258 phys_iobase = efi_get_iobase(); 303 phys_iobase = efi_get_iobase();
259 if (phys_iobase) 304 if (!phys_iobase) {
260 /* set AR.KR0 since this is all we use it for anyway */
261 ia64_set_kr(IA64_KR_IO_BASE, phys_iobase);
262 else {
263 phys_iobase = ia64_get_kr(IA64_KR_IO_BASE); 305 phys_iobase = ia64_get_kr(IA64_KR_IO_BASE);
264 printk(KERN_INFO "No I/O port range found in EFI memory map, falling back " 306 printk(KERN_INFO "No I/O port range found in EFI memory map, "
265 "to AR.KR0\n"); 307 "falling back to AR.KR0 (0x%lx)\n", phys_iobase);
266 printk(KERN_INFO "I/O port base = 0x%lx\n", phys_iobase);
267 } 308 }
268 ia64_iobase = (unsigned long) ioremap(phys_iobase, 0); 309 ia64_iobase = (unsigned long) ioremap(phys_iobase, 0);
310 ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase));
269 311
270 /* setup legacy IO port space */ 312 /* setup legacy IO port space */
271 io_space[0].mmio_base = ia64_iobase; 313 io_space[0].mmio_base = ia64_iobase;
@@ -419,6 +461,7 @@ setup_arch (char **cmdline_p)
419#endif 461#endif
420 462
421 cpu_init(); /* initialize the bootstrap CPU */ 463 cpu_init(); /* initialize the bootstrap CPU */
464 mmu_context_init(); /* initialize context_id bitmap */
422 465
423#ifdef CONFIG_ACPI 466#ifdef CONFIG_ACPI
424 acpi_boot_init(); 467 acpi_boot_init();
@@ -526,7 +569,7 @@ show_cpuinfo (struct seq_file *m, void *v)
526 c->itc_freq / 1000000, c->itc_freq % 1000000, 569 c->itc_freq / 1000000, c->itc_freq % 1000000,
527 lpj*HZ/500000, (lpj*HZ/5000) % 100); 570 lpj*HZ/500000, (lpj*HZ/5000) % 100);
528#ifdef CONFIG_SMP 571#ifdef CONFIG_SMP
529 seq_printf(m, "siblings : %u\n", c->num_log); 572 seq_printf(m, "siblings : %u\n", cpus_weight(cpu_core_map[cpunum]));
530 if (c->threads_per_core > 1 || c->cores_per_socket > 1) 573 if (c->threads_per_core > 1 || c->cores_per_socket > 1)
531 seq_printf(m, 574 seq_printf(m,
532 "physical id: %u\n" 575 "physical id: %u\n"
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 774f34b675cf..58ce07efc56e 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -387,15 +387,14 @@ setup_frame (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set,
387 struct sigscratch *scr) 387 struct sigscratch *scr)
388{ 388{
389 extern char __kernel_sigtramp[]; 389 extern char __kernel_sigtramp[];
390 unsigned long tramp_addr, new_rbs = 0; 390 unsigned long tramp_addr, new_rbs = 0, new_sp;
391 struct sigframe __user *frame; 391 struct sigframe __user *frame;
392 long err; 392 long err;
393 393
394 frame = (void __user *) scr->pt.r12; 394 new_sp = scr->pt.r12;
395 tramp_addr = (unsigned long) __kernel_sigtramp; 395 tramp_addr = (unsigned long) __kernel_sigtramp;
396 if ((ka->sa.sa_flags & SA_ONSTACK) && sas_ss_flags((unsigned long) frame) == 0) { 396 if ((ka->sa.sa_flags & SA_ONSTACK) && sas_ss_flags(new_sp) == 0) {
397 frame = (void __user *) ((current->sas_ss_sp + current->sas_ss_size) 397 new_sp = current->sas_ss_sp + current->sas_ss_size;
398 & ~(STACK_ALIGN - 1));
399 /* 398 /*
400 * We need to check for the register stack being on the signal stack 399 * We need to check for the register stack being on the signal stack
401 * separately, because it's switched separately (memory stack is switched 400 * separately, because it's switched separately (memory stack is switched
@@ -404,7 +403,7 @@ setup_frame (int sig, struct k_sigaction *ka, siginfo_t *info, sigset_t *set,
404 if (!rbs_on_sig_stack(scr->pt.ar_bspstore)) 403 if (!rbs_on_sig_stack(scr->pt.ar_bspstore))
405 new_rbs = (current->sas_ss_sp + sizeof(long) - 1) & ~(sizeof(long) - 1); 404 new_rbs = (current->sas_ss_sp + sizeof(long) - 1) & ~(sizeof(long) - 1);
406 } 405 }
407 frame = (void __user *) frame - ((sizeof(*frame) + STACK_ALIGN - 1) & ~(STACK_ALIGN - 1)); 406 frame = (void __user *) ((new_sp - sizeof(*frame)) & -STACK_ALIGN);
408 407
409 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) 408 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
410 return force_sigsegv_info(sig, frame); 409 return force_sigsegv_info(sig, frame);
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 0166a9847095..657ac99a451c 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -185,8 +185,8 @@ send_IPI_allbutself (int op)
185{ 185{
186 unsigned int i; 186 unsigned int i;
187 187
188 for (i = 0; i < NR_CPUS; i++) { 188 for_each_online_cpu(i) {
189 if (cpu_online(i) && i != smp_processor_id()) 189 if (i != smp_processor_id())
190 send_IPI_single(i, op); 190 send_IPI_single(i, op);
191 } 191 }
192} 192}
@@ -199,9 +199,9 @@ send_IPI_all (int op)
199{ 199{
200 int i; 200 int i;
201 201
202 for (i = 0; i < NR_CPUS; i++) 202 for_each_online_cpu(i) {
203 if (cpu_online(i)) 203 send_IPI_single(i, op);
204 send_IPI_single(i, op); 204 }
205} 205}
206 206
207/* 207/*
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 7d72c0d872b3..8f44e7d2df66 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -399,6 +399,7 @@ start_secondary (void *unused)
399 Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id()); 399 Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id());
400 efi_map_pal_code(); 400 efi_map_pal_code();
401 cpu_init(); 401 cpu_init();
402 preempt_disable();
402 smp_callin(); 403 smp_callin();
403 404
404 cpu_idle(); 405 cpu_idle();
@@ -694,9 +695,9 @@ smp_cpus_done (unsigned int dummy)
694 * Allow the user to impress friends. 695 * Allow the user to impress friends.
695 */ 696 */
696 697
697 for (cpu = 0; cpu < NR_CPUS; cpu++) 698 for_each_online_cpu(cpu) {
698 if (cpu_online(cpu)) 699 bogosum += cpu_data(cpu)->loops_per_jiffy;
699 bogosum += cpu_data(cpu)->loops_per_jiffy; 700 }
700 701
701 printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", 702 printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
702 (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100); 703 (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100);
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 8b8a5a45b621..5b7e736f3b49 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -32,10 +32,6 @@
32 32
33extern unsigned long wall_jiffies; 33extern unsigned long wall_jiffies;
34 34
35u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
36
37EXPORT_SYMBOL(jiffies_64);
38
39#define TIME_KEEPER_ID 0 /* smp_processor_id() of time-keeper */ 35#define TIME_KEEPER_ID 0 /* smp_processor_id() of time-keeper */
40 36
41#ifdef CONFIG_IA64_DEBUG_IRQ 37#ifdef CONFIG_IA64_DEBUG_IRQ
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index f970359e7edf..d3e0ecb56d62 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -30,17 +30,20 @@ fpswa_interface_t *fpswa_interface;
30EXPORT_SYMBOL(fpswa_interface); 30EXPORT_SYMBOL(fpswa_interface);
31 31
32struct notifier_block *ia64die_chain; 32struct notifier_block *ia64die_chain;
33static DEFINE_SPINLOCK(die_notifier_lock);
34 33
35int register_die_notifier(struct notifier_block *nb) 34int
35register_die_notifier(struct notifier_block *nb)
36{ 36{
37 int err = 0; 37 return notifier_chain_register(&ia64die_chain, nb);
38 unsigned long flags;
39 spin_lock_irqsave(&die_notifier_lock, flags);
40 err = notifier_chain_register(&ia64die_chain, nb);
41 spin_unlock_irqrestore(&die_notifier_lock, flags);
42 return err;
43} 38}
39EXPORT_SYMBOL_GPL(register_die_notifier);
40
41int
42unregister_die_notifier(struct notifier_block *nb)
43{
44 return notifier_chain_unregister(&ia64die_chain, nb);
45}
46EXPORT_SYMBOL_GPL(unregister_die_notifier);
44 47
45void __init 48void __init
46trap_init (void) 49trap_init (void)
@@ -105,6 +108,7 @@ die (const char *str, struct pt_regs *regs, long err)
105 if (++die.lock_owner_depth < 3) { 108 if (++die.lock_owner_depth < 3) {
106 printk("%s[%d]: %s %ld [%d]\n", 109 printk("%s[%d]: %s %ld [%d]\n",
107 current->comm, current->pid, str, err, ++die_counter); 110 current->comm, current->pid, str, err, ++die_counter);
111 (void) notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
108 show_regs(regs); 112 show_regs(regs);
109 } else 113 } else
110 printk(KERN_ERR "Recursive die() failure, output suppressed\n"); 114 printk(KERN_ERR "Recursive die() failure, output suppressed\n");
@@ -128,24 +132,6 @@ __kprobes ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
128 siginfo_t siginfo; 132 siginfo_t siginfo;
129 int sig, code; 133 int sig, code;
130 134
131 /* break.b always sets cr.iim to 0, which causes problems for
132 * debuggers. Get the real break number from the original instruction,
133 * but only for kernel code. User space break.b is left alone, to
134 * preserve the existing behaviour. All break codings have the same
135 * format, so there is no need to check the slot type.
136 */
137 if (break_num == 0 && !user_mode(regs)) {
138 struct ia64_psr *ipsr = ia64_psr(regs);
139 unsigned long *bundle = (unsigned long *)regs->cr_iip;
140 unsigned long slot;
141 switch (ipsr->ri) {
142 case 0: slot = (bundle[0] >> 5); break;
143 case 1: slot = (bundle[0] >> 46) | (bundle[1] << 18); break;
144 default: slot = (bundle[1] >> 23); break;
145 }
146 break_num = ((slot >> 36 & 1) << 20) | (slot >> 6 & 0xfffff);
147 }
148
149 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */ 135 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */
150 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri); 136 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri);
151 siginfo.si_imm = break_num; 137 siginfo.si_imm = break_num;
@@ -155,9 +141,8 @@ __kprobes ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
155 switch (break_num) { 141 switch (break_num) {
156 case 0: /* unknown error (used by GCC for __builtin_abort()) */ 142 case 0: /* unknown error (used by GCC for __builtin_abort()) */
157 if (notify_die(DIE_BREAK, "break 0", regs, break_num, TRAP_BRKPT, SIGTRAP) 143 if (notify_die(DIE_BREAK, "break 0", regs, break_num, TRAP_BRKPT, SIGTRAP)
158 == NOTIFY_STOP) { 144 == NOTIFY_STOP)
159 return; 145 return;
160 }
161 die_if_kernel("bugcheck!", regs, break_num); 146 die_if_kernel("bugcheck!", regs, break_num);
162 sig = SIGILL; code = ILL_ILLOPC; 147 sig = SIGILL; code = ILL_ILLOPC;
163 break; 148 break;
@@ -210,15 +195,6 @@ __kprobes ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
210 sig = SIGILL; code = __ILL_BNDMOD; 195 sig = SIGILL; code = __ILL_BNDMOD;
211 break; 196 break;
212 197
213 case 0x80200:
214 case 0x80300:
215 if (notify_die(DIE_BREAK, "kprobe", regs, break_num, TRAP_BRKPT, SIGTRAP)
216 == NOTIFY_STOP) {
217 return;
218 }
219 sig = SIGTRAP; code = TRAP_BRKPT;
220 break;
221
222 default: 198 default:
223 if (break_num < 0x40000 || break_num > 0x100000) 199 if (break_num < 0x40000 || break_num > 0x100000)
224 die_if_kernel("Bad break", regs, break_num); 200 die_if_kernel("Bad break", regs, break_num);
@@ -226,6 +202,9 @@ __kprobes ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
226 if (break_num < 0x80000) { 202 if (break_num < 0x80000) {
227 sig = SIGILL; code = __ILL_BREAK; 203 sig = SIGILL; code = __ILL_BREAK;
228 } else { 204 } else {
205 if (notify_die(DIE_BREAK, "bad break", regs, break_num, TRAP_BRKPT, SIGTRAP)
206 == NOTIFY_STOP)
207 return;
229 sig = SIGTRAP; code = TRAP_BRKPT; 208 sig = SIGTRAP; code = TRAP_BRKPT;
230 } 209 }
231 } 210 }
@@ -578,12 +557,11 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa,
578#endif 557#endif
579 break; 558 break;
580 case 35: siginfo.si_code = TRAP_BRANCH; ifa = 0; break; 559 case 35: siginfo.si_code = TRAP_BRANCH; ifa = 0; break;
581 case 36: 560 case 36: siginfo.si_code = TRAP_TRACE; ifa = 0; break;
582 if (notify_die(DIE_SS, "ss", &regs, vector,
583 vector, SIGTRAP) == NOTIFY_STOP)
584 return;
585 siginfo.si_code = TRAP_TRACE; ifa = 0; break;
586 } 561 }
562 if (notify_die(DIE_FAULT, "ia64_fault", &regs, vector, siginfo.si_code, SIGTRAP)
563 == NOTIFY_STOP)
564 return;
587 siginfo.si_signo = SIGTRAP; 565 siginfo.si_signo = SIGTRAP;
588 siginfo.si_errno = 0; 566 siginfo.si_errno = 0;
589 siginfo.si_addr = (void __user *) ifa; 567 siginfo.si_addr = (void __user *) ifa;
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c
index 4e9d06c48a8b..c6d40446c2c4 100644
--- a/arch/ia64/kernel/uncached.c
+++ b/arch/ia64/kernel/uncached.c
@@ -205,23 +205,18 @@ EXPORT_SYMBOL(uncached_free_page);
205static int __init 205static int __init
206uncached_build_memmap(unsigned long start, unsigned long end, void *arg) 206uncached_build_memmap(unsigned long start, unsigned long end, void *arg)
207{ 207{
208 long length; 208 long length = end - start;
209 unsigned long vstart, vend;
210 int node; 209 int node;
211 210
212 length = end - start;
213 vstart = start + __IA64_UNCACHED_OFFSET;
214 vend = end + __IA64_UNCACHED_OFFSET;
215
216 dprintk(KERN_ERR "uncached_build_memmap(%lx %lx)\n", start, end); 211 dprintk(KERN_ERR "uncached_build_memmap(%lx %lx)\n", start, end);
217 212
218 memset((char *)vstart, 0, length); 213 memset((char *)start, 0, length);
219 214
220 node = paddr_to_nid(start); 215 node = paddr_to_nid(start - __IA64_UNCACHED_OFFSET);
221 216
222 for (; vstart < vend ; vstart += PAGE_SIZE) { 217 for (; start < end ; start += PAGE_SIZE) {
223 dprintk(KERN_INFO "sticking %lx into the pool!\n", vstart); 218 dprintk(KERN_INFO "sticking %lx into the pool!\n", start);
224 gen_pool_free(uncached_pool[node], vstart, PAGE_SIZE); 219 gen_pool_free(uncached_pool[node], start, PAGE_SIZE);
225 } 220 }
226 221
227 return 0; 222 return 0;
diff --git a/arch/ia64/lib/Makefile b/arch/ia64/lib/Makefile
index cb1af597370b..ac64664a1807 100644
--- a/arch/ia64/lib/Makefile
+++ b/arch/ia64/lib/Makefile
@@ -9,7 +9,7 @@ lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
9 bitop.o checksum.o clear_page.o csum_partial_copy.o \ 9 bitop.o checksum.o clear_page.o csum_partial_copy.o \
10 clear_user.o strncpy_from_user.o strlen_user.o strnlen_user.o \ 10 clear_user.o strncpy_from_user.o strlen_user.o strnlen_user.o \
11 flush.o ip_fast_csum.o do_csum.o \ 11 flush.o ip_fast_csum.o do_csum.o \
12 memset.o strlen.o swiotlb.o 12 memset.o strlen.o
13 13
14lib-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o 14lib-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o
15lib-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o 15lib-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o
diff --git a/arch/ia64/lib/swiotlb.c b/arch/ia64/lib/swiotlb.c
deleted file mode 100644
index dbc0b3e449c5..000000000000
--- a/arch/ia64/lib/swiotlb.c
+++ /dev/null
@@ -1,657 +0,0 @@
1/*
2 * Dynamic DMA mapping support.
3 *
4 * This implementation is for IA-64 platforms that do not support
5 * I/O TLBs (aka DMA address translation hardware).
6 * Copyright (C) 2000 Asit Mallick <Asit.K.Mallick@intel.com>
7 * Copyright (C) 2000 Goutham Rao <goutham.rao@intel.com>
8 * Copyright (C) 2000, 2003 Hewlett-Packard Co
9 * David Mosberger-Tang <davidm@hpl.hp.com>
10 *
11 * 03/05/07 davidm Switch from PCI-DMA to generic device DMA API.
12 * 00/12/13 davidm Rename to swiotlb.c and add mark_clean() to avoid
13 * unnecessary i-cache flushing.
14 * 04/07/.. ak Better overflow handling. Assorted fixes.
15 */
16
17#include <linux/cache.h>
18#include <linux/mm.h>
19#include <linux/module.h>
20#include <linux/pci.h>
21#include <linux/spinlock.h>
22#include <linux/string.h>
23#include <linux/types.h>
24#include <linux/ctype.h>
25
26#include <asm/io.h>
27#include <asm/pci.h>
28#include <asm/dma.h>
29
30#include <linux/init.h>
31#include <linux/bootmem.h>
32
33#define OFFSET(val,align) ((unsigned long) \
34 ( (val) & ( (align) - 1)))
35
36#define SG_ENT_VIRT_ADDRESS(sg) (page_address((sg)->page) + (sg)->offset)
37#define SG_ENT_PHYS_ADDRESS(SG) virt_to_phys(SG_ENT_VIRT_ADDRESS(SG))
38
39/*
40 * Maximum allowable number of contiguous slabs to map,
41 * must be a power of 2. What is the appropriate value ?
42 * The complexity of {map,unmap}_single is linearly dependent on this value.
43 */
44#define IO_TLB_SEGSIZE 128
45
46/*
47 * log of the size of each IO TLB slab. The number of slabs is command line
48 * controllable.
49 */
50#define IO_TLB_SHIFT 11
51
52int swiotlb_force;
53
54/*
55 * Used to do a quick range check in swiotlb_unmap_single and
56 * swiotlb_sync_single_*, to see if the memory was in fact allocated by this
57 * API.
58 */
59static char *io_tlb_start, *io_tlb_end;
60
61/*
62 * The number of IO TLB blocks (in groups of 64) betweeen io_tlb_start and
63 * io_tlb_end. This is command line adjustable via setup_io_tlb_npages.
64 */
65static unsigned long io_tlb_nslabs;
66
67/*
68 * When the IOMMU overflows we return a fallback buffer. This sets the size.
69 */
70static unsigned long io_tlb_overflow = 32*1024;
71
72void *io_tlb_overflow_buffer;
73
74/*
75 * This is a free list describing the number of free entries available from
76 * each index
77 */
78static unsigned int *io_tlb_list;
79static unsigned int io_tlb_index;
80
81/*
82 * We need to save away the original address corresponding to a mapped entry
83 * for the sync operations.
84 */
85static unsigned char **io_tlb_orig_addr;
86
87/*
88 * Protect the above data structures in the map and unmap calls
89 */
90static DEFINE_SPINLOCK(io_tlb_lock);
91
92static int __init
93setup_io_tlb_npages(char *str)
94{
95 if (isdigit(*str)) {
96 io_tlb_nslabs = simple_strtoul(str, &str, 0);
97 /* avoid tail segment of size < IO_TLB_SEGSIZE */
98 io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
99 }
100 if (*str == ',')
101 ++str;
102 if (!strcmp(str, "force"))
103 swiotlb_force = 1;
104 return 1;
105}
106__setup("swiotlb=", setup_io_tlb_npages);
107/* make io_tlb_overflow tunable too? */
108
109/*
110 * Statically reserve bounce buffer space and initialize bounce buffer data
111 * structures for the software IO TLB used to implement the PCI DMA API.
112 */
113void
114swiotlb_init_with_default_size (size_t default_size)
115{
116 unsigned long i;
117
118 if (!io_tlb_nslabs) {
119 io_tlb_nslabs = (default_size >> IO_TLB_SHIFT);
120 io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
121 }
122
123 /*
124 * Get IO TLB memory from the low pages
125 */
126 io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs *
127 (1 << IO_TLB_SHIFT));
128 if (!io_tlb_start)
129 panic("Cannot allocate SWIOTLB buffer");
130 io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT);
131
132 /*
133 * Allocate and initialize the free list array. This array is used
134 * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE
135 * between io_tlb_start and io_tlb_end.
136 */
137 io_tlb_list = alloc_bootmem(io_tlb_nslabs * sizeof(int));
138 for (i = 0; i < io_tlb_nslabs; i++)
139 io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE);
140 io_tlb_index = 0;
141 io_tlb_orig_addr = alloc_bootmem(io_tlb_nslabs * sizeof(char *));
142
143 /*
144 * Get the overflow emergency buffer
145 */
146 io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
147 printk(KERN_INFO "Placing software IO TLB between 0x%lx - 0x%lx\n",
148 virt_to_phys(io_tlb_start), virt_to_phys(io_tlb_end));
149}
150
151void
152swiotlb_init (void)
153{
154 swiotlb_init_with_default_size(64 * (1<<20)); /* default to 64MB */
155}
156
157static inline int
158address_needs_mapping(struct device *hwdev, dma_addr_t addr)
159{
160 dma_addr_t mask = 0xffffffff;
161 /* If the device has a mask, use it, otherwise default to 32 bits */
162 if (hwdev && hwdev->dma_mask)
163 mask = *hwdev->dma_mask;
164 return (addr & ~mask) != 0;
165}
166
167/*
168 * Allocates bounce buffer and returns its kernel virtual address.
169 */
170static void *
171map_single(struct device *hwdev, char *buffer, size_t size, int dir)
172{
173 unsigned long flags;
174 char *dma_addr;
175 unsigned int nslots, stride, index, wrap;
176 int i;
177
178 /*
179 * For mappings greater than a page, we limit the stride (and
180 * hence alignment) to a page size.
181 */
182 nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
183 if (size > PAGE_SIZE)
184 stride = (1 << (PAGE_SHIFT - IO_TLB_SHIFT));
185 else
186 stride = 1;
187
188 if (!nslots)
189 BUG();
190
191 /*
192 * Find suitable number of IO TLB entries size that will fit this
193 * request and allocate a buffer from that IO TLB pool.
194 */
195 spin_lock_irqsave(&io_tlb_lock, flags);
196 {
197 wrap = index = ALIGN(io_tlb_index, stride);
198
199 if (index >= io_tlb_nslabs)
200 wrap = index = 0;
201
202 do {
203 /*
204 * If we find a slot that indicates we have 'nslots'
205 * number of contiguous buffers, we allocate the
206 * buffers from that slot and mark the entries as '0'
207 * indicating unavailable.
208 */
209 if (io_tlb_list[index] >= nslots) {
210 int count = 0;
211
212 for (i = index; i < (int) (index + nslots); i++)
213 io_tlb_list[i] = 0;
214 for (i = index - 1; (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1) && io_tlb_list[i]; i--)
215 io_tlb_list[i] = ++count;
216 dma_addr = io_tlb_start + (index << IO_TLB_SHIFT);
217
218 /*
219 * Update the indices to avoid searching in
220 * the next round.
221 */
222 io_tlb_index = ((index + nslots) < io_tlb_nslabs
223 ? (index + nslots) : 0);
224
225 goto found;
226 }
227 index += stride;
228 if (index >= io_tlb_nslabs)
229 index = 0;
230 } while (index != wrap);
231
232 spin_unlock_irqrestore(&io_tlb_lock, flags);
233 return NULL;
234 }
235 found:
236 spin_unlock_irqrestore(&io_tlb_lock, flags);
237
238 /*
239 * Save away the mapping from the original address to the DMA address.
240 * This is needed when we sync the memory. Then we sync the buffer if
241 * needed.
242 */
243 io_tlb_orig_addr[index] = buffer;
244 if (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL)
245 memcpy(dma_addr, buffer, size);
246
247 return dma_addr;
248}
249
250/*
251 * dma_addr is the kernel virtual address of the bounce buffer to unmap.
252 */
253static void
254unmap_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
255{
256 unsigned long flags;
257 int i, count, nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
258 int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
259 char *buffer = io_tlb_orig_addr[index];
260
261 /*
262 * First, sync the memory before unmapping the entry
263 */
264 if (buffer && ((dir == DMA_FROM_DEVICE) || (dir == DMA_BIDIRECTIONAL)))
265 /*
266 * bounce... copy the data back into the original buffer * and
267 * delete the bounce buffer.
268 */
269 memcpy(buffer, dma_addr, size);
270
271 /*
272 * Return the buffer to the free list by setting the corresponding
273 * entries to indicate the number of contigous entries available.
274 * While returning the entries to the free list, we merge the entries
275 * with slots below and above the pool being returned.
276 */
277 spin_lock_irqsave(&io_tlb_lock, flags);
278 {
279 count = ((index + nslots) < ALIGN(index + 1, IO_TLB_SEGSIZE) ?
280 io_tlb_list[index + nslots] : 0);
281 /*
282 * Step 1: return the slots to the free list, merging the
283 * slots with superceeding slots
284 */
285 for (i = index + nslots - 1; i >= index; i--)
286 io_tlb_list[i] = ++count;
287 /*
288 * Step 2: merge the returned slots with the preceding slots,
289 * if available (non zero)
290 */
291 for (i = index - 1; (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1) && io_tlb_list[i]; i--)
292 io_tlb_list[i] = ++count;
293 }
294 spin_unlock_irqrestore(&io_tlb_lock, flags);
295}
296
297static void
298sync_single(struct device *hwdev, char *dma_addr, size_t size, int dir)
299{
300 int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT;
301 char *buffer = io_tlb_orig_addr[index];
302
303 /*
304 * bounce... copy the data back into/from the original buffer
305 * XXX How do you handle DMA_BIDIRECTIONAL here ?
306 */
307 if (dir == DMA_FROM_DEVICE)
308 memcpy(buffer, dma_addr, size);
309 else if (dir == DMA_TO_DEVICE)
310 memcpy(dma_addr, buffer, size);
311 else
312 BUG();
313}
314
315void *
316swiotlb_alloc_coherent(struct device *hwdev, size_t size,
317 dma_addr_t *dma_handle, int flags)
318{
319 unsigned long dev_addr;
320 void *ret;
321 int order = get_order(size);
322
323 /*
324 * XXX fix me: the DMA API should pass us an explicit DMA mask
325 * instead, or use ZONE_DMA32 (ia64 overloads ZONE_DMA to be a ~32
326 * bit range instead of a 16MB one).
327 */
328 flags |= GFP_DMA;
329
330 ret = (void *)__get_free_pages(flags, order);
331 if (ret && address_needs_mapping(hwdev, virt_to_phys(ret))) {
332 /*
333 * The allocated memory isn't reachable by the device.
334 * Fall back on swiotlb_map_single().
335 */
336 free_pages((unsigned long) ret, order);
337 ret = NULL;
338 }
339 if (!ret) {
340 /*
341 * We are either out of memory or the device can't DMA
342 * to GFP_DMA memory; fall back on
343 * swiotlb_map_single(), which will grab memory from
344 * the lowest available address range.
345 */
346 dma_addr_t handle;
347 handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE);
348 if (dma_mapping_error(handle))
349 return NULL;
350
351 ret = phys_to_virt(handle);
352 }
353
354 memset(ret, 0, size);
355 dev_addr = virt_to_phys(ret);
356
357 /* Confirm address can be DMA'd by device */
358 if (address_needs_mapping(hwdev, dev_addr)) {
359 printk("hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016lx\n",
360 (unsigned long long)*hwdev->dma_mask, dev_addr);
361 panic("swiotlb_alloc_coherent: allocated memory is out of "
362 "range for device");
363 }
364 *dma_handle = dev_addr;
365 return ret;
366}
367
368void
369swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
370 dma_addr_t dma_handle)
371{
372 if (!(vaddr >= (void *)io_tlb_start
373 && vaddr < (void *)io_tlb_end))
374 free_pages((unsigned long) vaddr, get_order(size));
375 else
376 /* DMA_TO_DEVICE to avoid memcpy in unmap_single */
377 swiotlb_unmap_single (hwdev, dma_handle, size, DMA_TO_DEVICE);
378}
379
380static void
381swiotlb_full(struct device *dev, size_t size, int dir, int do_panic)
382{
383 /*
384 * Ran out of IOMMU space for this operation. This is very bad.
385 * Unfortunately the drivers cannot handle this operation properly.
386 * unless they check for pci_dma_mapping_error (most don't)
387 * When the mapping is small enough return a static buffer to limit
388 * the damage, or panic when the transfer is too big.
389 */
390 printk(KERN_ERR "PCI-DMA: Out of SW-IOMMU space for %lu bytes at "
391 "device %s\n", size, dev ? dev->bus_id : "?");
392
393 if (size > io_tlb_overflow && do_panic) {
394 if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL)
395 panic("PCI-DMA: Memory would be corrupted\n");
396 if (dir == PCI_DMA_TODEVICE || dir == PCI_DMA_BIDIRECTIONAL)
397 panic("PCI-DMA: Random memory would be DMAed\n");
398 }
399}
400
401/*
402 * Map a single buffer of the indicated size for DMA in streaming mode. The
403 * PCI address to use is returned.
404 *
405 * Once the device is given the dma address, the device owns this memory until
406 * either swiotlb_unmap_single or swiotlb_dma_sync_single is performed.
407 */
408dma_addr_t
409swiotlb_map_single(struct device *hwdev, void *ptr, size_t size, int dir)
410{
411 unsigned long dev_addr = virt_to_phys(ptr);
412 void *map;
413
414 if (dir == DMA_NONE)
415 BUG();
416 /*
417 * If the pointer passed in happens to be in the device's DMA window,
418 * we can safely return the device addr and not worry about bounce
419 * buffering it.
420 */
421 if (!address_needs_mapping(hwdev, dev_addr) && !swiotlb_force)
422 return dev_addr;
423
424 /*
425 * Oh well, have to allocate and map a bounce buffer.
426 */
427 map = map_single(hwdev, ptr, size, dir);
428 if (!map) {
429 swiotlb_full(hwdev, size, dir, 1);
430 map = io_tlb_overflow_buffer;
431 }
432
433 dev_addr = virt_to_phys(map);
434
435 /*
436 * Ensure that the address returned is DMA'ble
437 */
438 if (address_needs_mapping(hwdev, dev_addr))
439 panic("map_single: bounce buffer is not DMA'ble");
440
441 return dev_addr;
442}
443
444/*
445 * Since DMA is i-cache coherent, any (complete) pages that were written via
446 * DMA can be marked as "clean" so that lazy_mmu_prot_update() doesn't have to
447 * flush them when they get mapped into an executable vm-area.
448 */
449static void
450mark_clean(void *addr, size_t size)
451{
452 unsigned long pg_addr, end;
453
454 pg_addr = PAGE_ALIGN((unsigned long) addr);
455 end = (unsigned long) addr + size;
456 while (pg_addr + PAGE_SIZE <= end) {
457 struct page *page = virt_to_page(pg_addr);
458 set_bit(PG_arch_1, &page->flags);
459 pg_addr += PAGE_SIZE;
460 }
461}
462
463/*
464 * Unmap a single streaming mode DMA translation. The dma_addr and size must
465 * match what was provided for in a previous swiotlb_map_single call. All
466 * other usages are undefined.
467 *
468 * After this call, reads by the cpu to the buffer are guaranteed to see
469 * whatever the device wrote there.
470 */
471void
472swiotlb_unmap_single(struct device *hwdev, dma_addr_t dev_addr, size_t size,
473 int dir)
474{
475 char *dma_addr = phys_to_virt(dev_addr);
476
477 if (dir == DMA_NONE)
478 BUG();
479 if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
480 unmap_single(hwdev, dma_addr, size, dir);
481 else if (dir == DMA_FROM_DEVICE)
482 mark_clean(dma_addr, size);
483}
484
485/*
486 * Make physical memory consistent for a single streaming mode DMA translation
487 * after a transfer.
488 *
489 * If you perform a swiotlb_map_single() but wish to interrogate the buffer
490 * using the cpu, yet do not wish to teardown the PCI dma mapping, you must
491 * call this function before doing so. At the next point you give the PCI dma
492 * address back to the card, you must first perform a
493 * swiotlb_dma_sync_for_device, and then the device again owns the buffer
494 */
495void
496swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
497 size_t size, int dir)
498{
499 char *dma_addr = phys_to_virt(dev_addr);
500
501 if (dir == DMA_NONE)
502 BUG();
503 if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
504 sync_single(hwdev, dma_addr, size, dir);
505 else if (dir == DMA_FROM_DEVICE)
506 mark_clean(dma_addr, size);
507}
508
509void
510swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
511 size_t size, int dir)
512{
513 char *dma_addr = phys_to_virt(dev_addr);
514
515 if (dir == DMA_NONE)
516 BUG();
517 if (dma_addr >= io_tlb_start && dma_addr < io_tlb_end)
518 sync_single(hwdev, dma_addr, size, dir);
519 else if (dir == DMA_FROM_DEVICE)
520 mark_clean(dma_addr, size);
521}
522
523/*
524 * Map a set of buffers described by scatterlist in streaming mode for DMA.
525 * This is the scatter-gather version of the above swiotlb_map_single
526 * interface. Here the scatter gather list elements are each tagged with the
527 * appropriate dma address and length. They are obtained via
528 * sg_dma_{address,length}(SG).
529 *
530 * NOTE: An implementation may be able to use a smaller number of
531 * DMA address/length pairs than there are SG table elements.
532 * (for example via virtual mapping capabilities)
533 * The routine returns the number of addr/length pairs actually
534 * used, at most nents.
535 *
536 * Device ownership issues as mentioned above for swiotlb_map_single are the
537 * same here.
538 */
539int
540swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
541 int dir)
542{
543 void *addr;
544 unsigned long dev_addr;
545 int i;
546
547 if (dir == DMA_NONE)
548 BUG();
549
550 for (i = 0; i < nelems; i++, sg++) {
551 addr = SG_ENT_VIRT_ADDRESS(sg);
552 dev_addr = virt_to_phys(addr);
553 if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) {
554 sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir));
555 if (!sg->dma_address) {
556 /* Don't panic here, we expect map_sg users
557 to do proper error handling. */
558 swiotlb_full(hwdev, sg->length, dir, 0);
559 swiotlb_unmap_sg(hwdev, sg - i, i, dir);
560 sg[0].dma_length = 0;
561 return 0;
562 }
563 } else
564 sg->dma_address = dev_addr;
565 sg->dma_length = sg->length;
566 }
567 return nelems;
568}
569
570/*
571 * Unmap a set of streaming mode DMA translations. Again, cpu read rules
572 * concerning calls here are the same as for swiotlb_unmap_single() above.
573 */
574void
575swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
576 int dir)
577{
578 int i;
579
580 if (dir == DMA_NONE)
581 BUG();
582
583 for (i = 0; i < nelems; i++, sg++)
584 if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
585 unmap_single(hwdev, (void *) phys_to_virt(sg->dma_address), sg->dma_length, dir);
586 else if (dir == DMA_FROM_DEVICE)
587 mark_clean(SG_ENT_VIRT_ADDRESS(sg), sg->dma_length);
588}
589
590/*
591 * Make physical memory consistent for a set of streaming mode DMA translations
592 * after a transfer.
593 *
594 * The same as swiotlb_sync_single_* but for a scatter-gather list, same rules
595 * and usage.
596 */
597void
598swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg,
599 int nelems, int dir)
600{
601 int i;
602
603 if (dir == DMA_NONE)
604 BUG();
605
606 for (i = 0; i < nelems; i++, sg++)
607 if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
608 sync_single(hwdev, (void *) sg->dma_address,
609 sg->dma_length, dir);
610}
611
612void
613swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg,
614 int nelems, int dir)
615{
616 int i;
617
618 if (dir == DMA_NONE)
619 BUG();
620
621 for (i = 0; i < nelems; i++, sg++)
622 if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
623 sync_single(hwdev, (void *) sg->dma_address,
624 sg->dma_length, dir);
625}
626
627int
628swiotlb_dma_mapping_error(dma_addr_t dma_addr)
629{
630 return (dma_addr == virt_to_phys(io_tlb_overflow_buffer));
631}
632
633/*
634 * Return whether the given PCI device DMA address mask can be supported
635 * properly. For example, if your device can only drive the low 24-bits
636 * during PCI bus mastering, then you would pass 0x00ffffff as the mask to
637 * this function.
638 */
639int
640swiotlb_dma_supported (struct device *hwdev, u64 mask)
641{
642 return (virt_to_phys (io_tlb_end) - 1) <= mask;
643}
644
645EXPORT_SYMBOL(swiotlb_init);
646EXPORT_SYMBOL(swiotlb_map_single);
647EXPORT_SYMBOL(swiotlb_unmap_single);
648EXPORT_SYMBOL(swiotlb_map_sg);
649EXPORT_SYMBOL(swiotlb_unmap_sg);
650EXPORT_SYMBOL(swiotlb_sync_single_for_cpu);
651EXPORT_SYMBOL(swiotlb_sync_single_for_device);
652EXPORT_SYMBOL(swiotlb_sync_sg_for_cpu);
653EXPORT_SYMBOL(swiotlb_sync_sg_for_device);
654EXPORT_SYMBOL(swiotlb_dma_mapping_error);
655EXPORT_SYMBOL(swiotlb_alloc_coherent);
656EXPORT_SYMBOL(swiotlb_free_coherent);
657EXPORT_SYMBOL(swiotlb_dma_supported);
diff --git a/arch/ia64/mm/Makefile b/arch/ia64/mm/Makefile
index 7078f67887ec..d78d20f0a0f0 100644
--- a/arch/ia64/mm/Makefile
+++ b/arch/ia64/mm/Makefile
@@ -7,6 +7,5 @@ obj-y := init.o fault.o tlb.o extable.o
7obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o 7obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
8obj-$(CONFIG_NUMA) += numa.o 8obj-$(CONFIG_NUMA) += numa.o
9obj-$(CONFIG_DISCONTIGMEM) += discontig.o 9obj-$(CONFIG_DISCONTIGMEM) += discontig.o
10ifndef CONFIG_DISCONTIGMEM 10obj-$(CONFIG_SPARSEMEM) += discontig.o
11obj-y += contig.o 11obj-$(CONFIG_FLATMEM) += contig.o
12endif
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index 91a055f5731f..acaaec4e4681 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -269,7 +269,7 @@ paging_init (void)
269 efi_memmap_walk(find_largest_hole, (u64 *)&max_gap); 269 efi_memmap_walk(find_largest_hole, (u64 *)&max_gap);
270 if (max_gap < LARGE_GAP) { 270 if (max_gap < LARGE_GAP) {
271 vmem_map = (struct page *) 0; 271 vmem_map = (struct page *) 0;
272 free_area_init_node(0, &contig_page_data, zones_size, 0, 272 free_area_init_node(0, NODE_DATA(0), zones_size, 0,
273 zholes_size); 273 zholes_size);
274 } else { 274 } else {
275 unsigned long map_size; 275 unsigned long map_size;
@@ -282,7 +282,7 @@ paging_init (void)
282 efi_memmap_walk(create_mem_map_page_table, NULL); 282 efi_memmap_walk(create_mem_map_page_table, NULL);
283 283
284 NODE_DATA(0)->node_mem_map = vmem_map; 284 NODE_DATA(0)->node_mem_map = vmem_map;
285 free_area_init_node(0, &contig_page_data, zones_size, 285 free_area_init_node(0, NODE_DATA(0), zones_size,
286 0, zholes_size); 286 0, zholes_size);
287 287
288 printk("Virtual mem_map starts at 0x%p\n", mem_map); 288 printk("Virtual mem_map starts at 0x%p\n", mem_map);
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index b5c90e548195..0f776b032d31 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -350,14 +350,12 @@ static void __init initialize_pernode_data(void)
350 * for best. 350 * for best.
351 * @nid: node id 351 * @nid: node id
352 * @pernodesize: size of this node's pernode data 352 * @pernodesize: size of this node's pernode data
353 * @align: alignment to use for this node's pernode data
354 */ 353 */
355static void __init *memory_less_node_alloc(int nid, unsigned long pernodesize, 354static void __init *memory_less_node_alloc(int nid, unsigned long pernodesize)
356 unsigned long align)
357{ 355{
358 void *ptr = NULL; 356 void *ptr = NULL;
359 u8 best = 0xff; 357 u8 best = 0xff;
360 int bestnode = -1, node; 358 int bestnode = -1, node, anynode = 0;
361 359
362 for_each_online_node(node) { 360 for_each_online_node(node) {
363 if (node_isset(node, memory_less_mask)) 361 if (node_isset(node, memory_less_mask))
@@ -366,13 +364,15 @@ static void __init *memory_less_node_alloc(int nid, unsigned long pernodesize,
366 best = node_distance(nid, node); 364 best = node_distance(nid, node);
367 bestnode = node; 365 bestnode = node;
368 } 366 }
367 anynode = node;
369 } 368 }
370 369
371 ptr = __alloc_bootmem_node(mem_data[bestnode].pgdat, 370 if (bestnode == -1)
372 pernodesize, align, __pa(MAX_DMA_ADDRESS)); 371 bestnode = anynode;
372
373 ptr = __alloc_bootmem_node(mem_data[bestnode].pgdat, pernodesize,
374 PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
373 375
374 if (!ptr)
375 panic("NO memory for memory less node\n");
376 return ptr; 376 return ptr;
377} 377}
378 378
@@ -413,14 +413,44 @@ static void __init memory_less_nodes(void)
413 413
414 for_each_node_mask(node, memory_less_mask) { 414 for_each_node_mask(node, memory_less_mask) {
415 pernodesize = compute_pernodesize(node); 415 pernodesize = compute_pernodesize(node);
416 pernode = memory_less_node_alloc(node, pernodesize, 416 pernode = memory_less_node_alloc(node, pernodesize);
417 (node) ? (node * PERCPU_PAGE_SIZE) : (1024*1024));
418 fill_pernode(node, __pa(pernode), pernodesize); 417 fill_pernode(node, __pa(pernode), pernodesize);
419 } 418 }
420 419
421 return; 420 return;
422} 421}
423 422
423#ifdef CONFIG_SPARSEMEM
424/**
425 * register_sparse_mem - notify SPARSEMEM that this memory range exists.
426 * @start: physical start of range
427 * @end: physical end of range
428 * @arg: unused
429 *
430 * Simply calls SPARSEMEM to register memory section(s).
431 */
432static int __init register_sparse_mem(unsigned long start, unsigned long end,
433 void *arg)
434{
435 int nid;
436
437 start = __pa(start) >> PAGE_SHIFT;
438 end = __pa(end) >> PAGE_SHIFT;
439 nid = early_pfn_to_nid(start);
440 memory_present(nid, start, end);
441
442 return 0;
443}
444
445static void __init arch_sparse_init(void)
446{
447 efi_memmap_walk(register_sparse_mem, NULL);
448 sparse_init();
449}
450#else
451#define arch_sparse_init() do {} while (0)
452#endif
453
424/** 454/**
425 * find_memory - walk the EFI memory map and setup the bootmem allocator 455 * find_memory - walk the EFI memory map and setup the bootmem allocator
426 * 456 *
@@ -524,12 +554,18 @@ void show_mem(void)
524 show_free_areas(); 554 show_free_areas();
525 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); 555 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
526 for_each_pgdat(pgdat) { 556 for_each_pgdat(pgdat) {
527 unsigned long present = pgdat->node_present_pages; 557 unsigned long present;
558 unsigned long flags;
528 int shared = 0, cached = 0, reserved = 0; 559 int shared = 0, cached = 0, reserved = 0;
560
529 printk("Node ID: %d\n", pgdat->node_id); 561 printk("Node ID: %d\n", pgdat->node_id);
562 pgdat_resize_lock(pgdat, &flags);
563 present = pgdat->node_present_pages;
530 for(i = 0; i < pgdat->node_spanned_pages; i++) { 564 for(i = 0; i < pgdat->node_spanned_pages; i++) {
531 struct page *page = pgdat_page_nr(pgdat, i); 565 struct page *page;
532 if (!ia64_pfn_valid(pgdat->node_start_pfn+i)) 566 if (pfn_valid(pgdat->node_start_pfn + i))
567 page = pfn_to_page(pgdat->node_start_pfn + i);
568 else
533 continue; 569 continue;
534 if (PageReserved(page)) 570 if (PageReserved(page))
535 reserved++; 571 reserved++;
@@ -538,6 +574,7 @@ void show_mem(void)
538 else if (page_count(page)) 574 else if (page_count(page))
539 shared += page_count(page)-1; 575 shared += page_count(page)-1;
540 } 576 }
577 pgdat_resize_unlock(pgdat, &flags);
541 total_present += present; 578 total_present += present;
542 total_reserved += reserved; 579 total_reserved += reserved;
543 total_cached += cached; 580 total_cached += cached;
@@ -648,12 +685,16 @@ void __init paging_init(void)
648 685
649 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; 686 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
650 687
688 arch_sparse_init();
689
651 efi_memmap_walk(filter_rsvd_memory, count_node_pages); 690 efi_memmap_walk(filter_rsvd_memory, count_node_pages);
652 691
692#ifdef CONFIG_VIRTUAL_MEM_MAP
653 vmalloc_end -= PAGE_ALIGN(max_low_pfn * sizeof(struct page)); 693 vmalloc_end -= PAGE_ALIGN(max_low_pfn * sizeof(struct page));
654 vmem_map = (struct page *) vmalloc_end; 694 vmem_map = (struct page *) vmalloc_end;
655 efi_memmap_walk(create_mem_map_page_table, NULL); 695 efi_memmap_walk(create_mem_map_page_table, NULL);
656 printk("Virtual mem_map starts at 0x%p\n", vmem_map); 696 printk("Virtual mem_map starts at 0x%p\n", vmem_map);
697#endif
657 698
658 for_each_online_node(node) { 699 for_each_online_node(node) {
659 memset(zones_size, 0, sizeof(zones_size)); 700 memset(zones_size, 0, sizeof(zones_size));
@@ -690,7 +731,9 @@ void __init paging_init(void)
690 731
691 pfn_offset = mem_data[node].min_pfn; 732 pfn_offset = mem_data[node].min_pfn;
692 733
734#ifdef CONFIG_VIRTUAL_MEM_MAP
693 NODE_DATA(node)->node_mem_map = vmem_map + pfn_offset; 735 NODE_DATA(node)->node_mem_map = vmem_map + pfn_offset;
736#endif
694 free_area_init_node(node, NODE_DATA(node), zones_size, 737 free_area_init_node(node, NODE_DATA(node), zones_size,
695 pfn_offset, zholes_size); 738 pfn_offset, zholes_size);
696 } 739 }
diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c
index 3c32af910d60..af7eb087dca7 100644
--- a/arch/ia64/mm/fault.c
+++ b/arch/ia64/mm/fault.c
@@ -20,32 +20,6 @@
20extern void die (char *, struct pt_regs *, long); 20extern void die (char *, struct pt_regs *, long);
21 21
22/* 22/*
23 * This routine is analogous to expand_stack() but instead grows the
24 * register backing store (which grows towards higher addresses).
25 * Since the register backing store is access sequentially, we
26 * disallow growing the RBS by more than a page at a time. Note that
27 * the VM_GROWSUP flag can be set on any VM area but that's fine
28 * because the total process size is still limited by RLIMIT_STACK and
29 * RLIMIT_AS.
30 */
31static inline long
32expand_backing_store (struct vm_area_struct *vma, unsigned long address)
33{
34 unsigned long grow;
35
36 grow = PAGE_SIZE >> PAGE_SHIFT;
37 if (address - vma->vm_start > current->signal->rlim[RLIMIT_STACK].rlim_cur
38 || (((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->signal->rlim[RLIMIT_AS].rlim_cur))
39 return -ENOMEM;
40 vma->vm_end += PAGE_SIZE;
41 vma->vm_mm->total_vm += grow;
42 if (vma->vm_flags & VM_LOCKED)
43 vma->vm_mm->locked_vm += grow;
44 __vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file, grow);
45 return 0;
46}
47
48/*
49 * Return TRUE if ADDRESS points at a page in the kernel's mapped segment 23 * Return TRUE if ADDRESS points at a page in the kernel's mapped segment
50 * (inside region 5, on ia64) and that page is present. 24 * (inside region 5, on ia64) and that page is present.
51 */ 25 */
@@ -185,7 +159,13 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
185 if (REGION_NUMBER(address) != REGION_NUMBER(vma->vm_start) 159 if (REGION_NUMBER(address) != REGION_NUMBER(vma->vm_start)
186 || REGION_OFFSET(address) >= RGN_MAP_LIMIT) 160 || REGION_OFFSET(address) >= RGN_MAP_LIMIT)
187 goto bad_area; 161 goto bad_area;
188 if (expand_backing_store(vma, address)) 162 /*
163 * Since the register backing store is accessed sequentially,
164 * we disallow growing it by more than a page at a time.
165 */
166 if (address > vma->vm_end + PAGE_SIZE - sizeof(long))
167 goto bad_area;
168 if (expand_upwards(vma, address))
189 goto bad_area; 169 goto bad_area;
190 } 170 }
191 goto good_area; 171 goto good_area;
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 1281c609ee98..e3215ba64ffd 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -158,7 +158,7 @@ ia64_init_addr_space (void)
158 vma->vm_start = current->thread.rbs_bot & PAGE_MASK; 158 vma->vm_start = current->thread.rbs_bot & PAGE_MASK;
159 vma->vm_end = vma->vm_start + PAGE_SIZE; 159 vma->vm_end = vma->vm_start + PAGE_SIZE;
160 vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7]; 160 vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7];
161 vma->vm_flags = VM_DATA_DEFAULT_FLAGS | VM_GROWSUP; 161 vma->vm_flags = VM_DATA_DEFAULT_FLAGS|VM_GROWSUP|VM_ACCOUNT;
162 down_write(&current->mm->mmap_sem); 162 down_write(&current->mm->mmap_sem);
163 if (insert_vm_struct(current->mm, vma)) { 163 if (insert_vm_struct(current->mm, vma)) {
164 up_write(&current->mm->mmap_sem); 164 up_write(&current->mm->mmap_sem);
@@ -275,26 +275,21 @@ put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot)
275 275
276 pgd = pgd_offset_k(address); /* note: this is NOT pgd_offset()! */ 276 pgd = pgd_offset_k(address); /* note: this is NOT pgd_offset()! */
277 277
278 spin_lock(&init_mm.page_table_lock);
279 { 278 {
280 pud = pud_alloc(&init_mm, pgd, address); 279 pud = pud_alloc(&init_mm, pgd, address);
281 if (!pud) 280 if (!pud)
282 goto out; 281 goto out;
283
284 pmd = pmd_alloc(&init_mm, pud, address); 282 pmd = pmd_alloc(&init_mm, pud, address);
285 if (!pmd) 283 if (!pmd)
286 goto out; 284 goto out;
287 pte = pte_alloc_map(&init_mm, pmd, address); 285 pte = pte_alloc_kernel(pmd, address);
288 if (!pte) 286 if (!pte)
289 goto out; 287 goto out;
290 if (!pte_none(*pte)) { 288 if (!pte_none(*pte))
291 pte_unmap(pte);
292 goto out; 289 goto out;
293 }
294 set_pte(pte, mk_pte(page, pgprot)); 290 set_pte(pte, mk_pte(page, pgprot));
295 pte_unmap(pte);
296 } 291 }
297 out: spin_unlock(&init_mm.page_table_lock); 292 out:
298 /* no need for flush_tlb */ 293 /* no need for flush_tlb */
299 return page; 294 return page;
300} 295}
@@ -593,7 +588,7 @@ mem_init (void)
593 platform_dma_init(); 588 platform_dma_init();
594#endif 589#endif
595 590
596#ifndef CONFIG_DISCONTIGMEM 591#ifdef CONFIG_FLATMEM
597 if (!mem_map) 592 if (!mem_map)
598 BUG(); 593 BUG();
599 max_mapnr = max_low_pfn; 594 max_mapnr = max_low_pfn;
diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
index 77118bbf3d8b..4e5c8b36ad93 100644
--- a/arch/ia64/mm/numa.c
+++ b/arch/ia64/mm/numa.c
@@ -47,3 +47,27 @@ paddr_to_nid(unsigned long paddr)
47 47
48 return (i < num_node_memblks) ? node_memblk[i].nid : (num_node_memblks ? -1 : 0); 48 return (i < num_node_memblks) ? node_memblk[i].nid : (num_node_memblks ? -1 : 0);
49} 49}
50
51#if defined(CONFIG_SPARSEMEM) && defined(CONFIG_NUMA)
52/*
53 * Because of holes evaluate on section limits.
54 * If the section of memory exists, then return the node where the section
55 * resides. Otherwise return node 0 as the default. This is used by
56 * SPARSEMEM to allocate the SPARSEMEM sectionmap on the NUMA node where
57 * the section resides.
58 */
59int early_pfn_to_nid(unsigned long pfn)
60{
61 int i, section = pfn >> PFN_SECTION_SHIFT, ssec, esec;
62
63 for (i = 0; i < num_node_memblks; i++) {
64 ssec = node_memblk[i].start_paddr >> PA_SECTION_SHIFT;
65 esec = (node_memblk[i].start_paddr + node_memblk[i].size +
66 ((1L << PA_SECTION_SHIFT) - 1)) >> PA_SECTION_SHIFT;
67 if (section >= ssec && section < esec)
68 return node_memblk[i].nid;
69 }
70
71 return 0;
72}
73#endif
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index 464557e4ed82..41105d454423 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -8,6 +8,8 @@
8 * Modified RID allocation for SMP 8 * Modified RID allocation for SMP
9 * Goutham Rao <goutham.rao@intel.com> 9 * Goutham Rao <goutham.rao@intel.com>
10 * IPI based ptc implementation and A-step IPI implementation. 10 * IPI based ptc implementation and A-step IPI implementation.
11 * Rohit Seth <rohit.seth@intel.com>
12 * Ken Chen <kenneth.w.chen@intel.com>
11 */ 13 */
12#include <linux/config.h> 14#include <linux/config.h>
13#include <linux/module.h> 15#include <linux/module.h>
@@ -16,80 +18,83 @@
16#include <linux/sched.h> 18#include <linux/sched.h>
17#include <linux/smp.h> 19#include <linux/smp.h>
18#include <linux/mm.h> 20#include <linux/mm.h>
21#include <linux/bootmem.h>
19 22
20#include <asm/delay.h> 23#include <asm/delay.h>
21#include <asm/mmu_context.h> 24#include <asm/mmu_context.h>
22#include <asm/pgalloc.h> 25#include <asm/pgalloc.h>
23#include <asm/pal.h> 26#include <asm/pal.h>
24#include <asm/tlbflush.h> 27#include <asm/tlbflush.h>
28#include <asm/dma.h>
25 29
26static struct { 30static struct {
27 unsigned long mask; /* mask of supported purge page-sizes */ 31 unsigned long mask; /* mask of supported purge page-sizes */
28 unsigned long max_bits; /* log2() of largest supported purge page-size */ 32 unsigned long max_bits; /* log2 of largest supported purge page-size */
29} purge; 33} purge;
30 34
31struct ia64_ctx ia64_ctx = { 35struct ia64_ctx ia64_ctx = {
32 .lock = SPIN_LOCK_UNLOCKED, 36 .lock = SPIN_LOCK_UNLOCKED,
33 .next = 1, 37 .next = 1,
34 .limit = (1 << 15) - 1, /* start out with the safe (architected) limit */
35 .max_ctx = ~0U 38 .max_ctx = ~0U
36}; 39};
37 40
38DEFINE_PER_CPU(u8, ia64_need_tlb_flush); 41DEFINE_PER_CPU(u8, ia64_need_tlb_flush);
39 42
40/* 43/*
44 * Initializes the ia64_ctx.bitmap array based on max_ctx+1.
45 * Called after cpu_init() has setup ia64_ctx.max_ctx based on
46 * maximum RID that is supported by boot CPU.
47 */
48void __init
49mmu_context_init (void)
50{
51 ia64_ctx.bitmap = alloc_bootmem((ia64_ctx.max_ctx+1)>>3);
52 ia64_ctx.flushmap = alloc_bootmem((ia64_ctx.max_ctx+1)>>3);
53}
54
55/*
41 * Acquire the ia64_ctx.lock before calling this function! 56 * Acquire the ia64_ctx.lock before calling this function!
42 */ 57 */
43void 58void
44wrap_mmu_context (struct mm_struct *mm) 59wrap_mmu_context (struct mm_struct *mm)
45{ 60{
46 unsigned long tsk_context, max_ctx = ia64_ctx.max_ctx; 61 int i, cpu;
47 struct task_struct *tsk; 62 unsigned long flush_bit;
48 int i;
49 63
50 if (ia64_ctx.next > max_ctx) 64 for (i=0; i <= ia64_ctx.max_ctx / BITS_PER_LONG; i++) {
51 ia64_ctx.next = 300; /* skip daemons */ 65 flush_bit = xchg(&ia64_ctx.flushmap[i], 0);
52 ia64_ctx.limit = max_ctx + 1; 66 ia64_ctx.bitmap[i] ^= flush_bit;
67 }
68
69 /* use offset at 300 to skip daemons */
70 ia64_ctx.next = find_next_zero_bit(ia64_ctx.bitmap,
71 ia64_ctx.max_ctx, 300);
72 ia64_ctx.limit = find_next_bit(ia64_ctx.bitmap,
73 ia64_ctx.max_ctx, ia64_ctx.next);
53 74
54 /* 75 /*
55 * Scan all the task's mm->context and set proper safe range 76 * can't call flush_tlb_all() here because of race condition
77 * with O(1) scheduler [EF]
56 */ 78 */
57 79 cpu = get_cpu(); /* prevent preemption/migration */
58 read_lock(&tasklist_lock); 80 for_each_online_cpu(i)
59 repeat: 81 if (i != cpu)
60 for_each_process(tsk) { 82 per_cpu(ia64_need_tlb_flush, i) = 1;
61 if (!tsk->mm) 83 put_cpu();
62 continue;
63 tsk_context = tsk->mm->context;
64 if (tsk_context == ia64_ctx.next) {
65 if (++ia64_ctx.next >= ia64_ctx.limit) {
66 /* empty range: reset the range limit and start over */
67 if (ia64_ctx.next > max_ctx)
68 ia64_ctx.next = 300;
69 ia64_ctx.limit = max_ctx + 1;
70 goto repeat;
71 }
72 }
73 if ((tsk_context > ia64_ctx.next) && (tsk_context < ia64_ctx.limit))
74 ia64_ctx.limit = tsk_context;
75 }
76 read_unlock(&tasklist_lock);
77 /* can't call flush_tlb_all() here because of race condition with O(1) scheduler [EF] */
78 {
79 int cpu = get_cpu(); /* prevent preemption/migration */
80 for (i = 0; i < NR_CPUS; ++i)
81 if (cpu_online(i) && (i != cpu))
82 per_cpu(ia64_need_tlb_flush, i) = 1;
83 put_cpu();
84 }
85 local_flush_tlb_all(); 84 local_flush_tlb_all();
86} 85}
87 86
88void 87void
89ia64_global_tlb_purge (unsigned long start, unsigned long end, unsigned long nbits) 88ia64_global_tlb_purge (struct mm_struct *mm, unsigned long start,
89 unsigned long end, unsigned long nbits)
90{ 90{
91 static DEFINE_SPINLOCK(ptcg_lock); 91 static DEFINE_SPINLOCK(ptcg_lock);
92 92
93 if (mm != current->active_mm) {
94 flush_tlb_all();
95 return;
96 }
97
93 /* HW requires global serialization of ptc.ga. */ 98 /* HW requires global serialization of ptc.ga. */
94 spin_lock(&ptcg_lock); 99 spin_lock(&ptcg_lock);
95 { 100 {
@@ -129,36 +134,37 @@ local_flush_tlb_all (void)
129} 134}
130 135
131void 136void
132flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end) 137flush_tlb_range (struct vm_area_struct *vma, unsigned long start,
138 unsigned long end)
133{ 139{
134 struct mm_struct *mm = vma->vm_mm; 140 struct mm_struct *mm = vma->vm_mm;
135 unsigned long size = end - start; 141 unsigned long size = end - start;
136 unsigned long nbits; 142 unsigned long nbits;
137 143
144#ifndef CONFIG_SMP
138 if (mm != current->active_mm) { 145 if (mm != current->active_mm) {
139 /* this does happen, but perhaps it's not worth optimizing for? */
140#ifdef CONFIG_SMP
141 flush_tlb_all();
142#else
143 mm->context = 0; 146 mm->context = 0;
144#endif
145 return; 147 return;
146 } 148 }
149#endif
147 150
148 nbits = ia64_fls(size + 0xfff); 151 nbits = ia64_fls(size + 0xfff);
149 while (unlikely (((1UL << nbits) & purge.mask) == 0) && (nbits < purge.max_bits)) 152 while (unlikely (((1UL << nbits) & purge.mask) == 0) &&
153 (nbits < purge.max_bits))
150 ++nbits; 154 ++nbits;
151 if (nbits > purge.max_bits) 155 if (nbits > purge.max_bits)
152 nbits = purge.max_bits; 156 nbits = purge.max_bits;
153 start &= ~((1UL << nbits) - 1); 157 start &= ~((1UL << nbits) - 1);
154 158
155# ifdef CONFIG_SMP 159# ifdef CONFIG_SMP
156 platform_global_tlb_purge(start, end, nbits); 160 platform_global_tlb_purge(mm, start, end, nbits);
157# else 161# else
162 preempt_disable();
158 do { 163 do {
159 ia64_ptcl(start, (nbits<<2)); 164 ia64_ptcl(start, (nbits<<2));
160 start += (1UL << nbits); 165 start += (1UL << nbits);
161 } while (start < end); 166 } while (start < end);
167 preempt_enable();
162# endif 168# endif
163 169
164 ia64_srlz_i(); /* srlz.i implies srlz.d */ 170 ia64_srlz_i(); /* srlz.i implies srlz.d */
@@ -186,5 +192,5 @@ ia64_tlb_init (void)
186 local_cpu_data->ptce_stride[0] = ptce_info.stride[0]; 192 local_cpu_data->ptce_stride[0] = ptce_info.stride[0];
187 local_cpu_data->ptce_stride[1] = ptce_info.stride[1]; 193 local_cpu_data->ptce_stride[1] = ptce_info.stride[1];
188 194
189 local_flush_tlb_all(); /* nuke left overs from bootstrapping... */ 195 local_flush_tlb_all(); /* nuke left overs from bootstrapping... */
190} 196}
diff --git a/arch/ia64/oprofile/Kconfig b/arch/ia64/oprofile/Kconfig
index 56e6f614b04a..97271ab484dc 100644
--- a/arch/ia64/oprofile/Kconfig
+++ b/arch/ia64/oprofile/Kconfig
@@ -1,7 +1,3 @@
1
2menu "Profiling support"
3 depends on EXPERIMENTAL
4
5config PROFILING 1config PROFILING
6 bool "Profiling support (EXPERIMENTAL)" 2 bool "Profiling support (EXPERIMENTAL)"
7 help 3 help
@@ -22,5 +18,3 @@ config OPROFILE
22 18
23 If unsure, say N. 19 If unsure, say N.
24 20
25endmenu
26
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 9b5de589b82f..20d76fae24e8 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -95,7 +95,7 @@ pci_sal_write (unsigned int seg, unsigned int bus, unsigned int devfn,
95} 95}
96 96
97static struct pci_raw_ops pci_sal_ops = { 97static struct pci_raw_ops pci_sal_ops = {
98 .read = pci_sal_read, 98 .read = pci_sal_read,
99 .write = pci_sal_write 99 .write = pci_sal_write
100}; 100};
101 101
@@ -120,29 +120,6 @@ struct pci_ops pci_root_ops = {
120 .write = pci_write, 120 .write = pci_write,
121}; 121};
122 122
123#ifdef CONFIG_NUMA
124extern acpi_status acpi_map_iosapic(acpi_handle, u32, void *, void **);
125static void acpi_map_iosapics(void)
126{
127 acpi_get_devices(NULL, acpi_map_iosapic, NULL, NULL);
128}
129#else
130static void acpi_map_iosapics(void)
131{
132 return;
133}
134#endif /* CONFIG_NUMA */
135
136static int __init
137pci_acpi_init (void)
138{
139 acpi_map_iosapics();
140
141 return 0;
142}
143
144subsys_initcall(pci_acpi_init);
145
146/* Called by ACPI when it finds a new root bus. */ 123/* Called by ACPI when it finds a new root bus. */
147 124
148static struct pci_controller * __devinit 125static struct pci_controller * __devinit
@@ -160,35 +137,121 @@ alloc_pci_controller (int seg)
160 return controller; 137 return controller;
161} 138}
162 139
163static u64 __devinit 140struct pci_root_info {
164add_io_space (struct acpi_resource_address64 *addr) 141 struct pci_controller *controller;
142 char *name;
143};
144
145static unsigned int
146new_space (u64 phys_base, int sparse)
165{ 147{
166 u64 offset; 148 u64 mmio_base;
167 int sparse = 0;
168 int i; 149 int i;
169 150
170 if (addr->address_translation_offset == 0) 151 if (phys_base == 0)
171 return IO_SPACE_BASE(0); /* part of legacy IO space */ 152 return 0; /* legacy I/O port space */
172
173 if (addr->attribute.io.translation_attribute == ACPI_SPARSE_TRANSLATION)
174 sparse = 1;
175 153
176 offset = (u64) ioremap(addr->address_translation_offset, 0); 154 mmio_base = (u64) ioremap(phys_base, 0);
177 for (i = 0; i < num_io_spaces; i++) 155 for (i = 0; i < num_io_spaces; i++)
178 if (io_space[i].mmio_base == offset && 156 if (io_space[i].mmio_base == mmio_base &&
179 io_space[i].sparse == sparse) 157 io_space[i].sparse == sparse)
180 return IO_SPACE_BASE(i); 158 return i;
181 159
182 if (num_io_spaces == MAX_IO_SPACES) { 160 if (num_io_spaces == MAX_IO_SPACES) {
183 printk("Too many IO port spaces\n"); 161 printk(KERN_ERR "PCI: Too many IO port spaces "
162 "(MAX_IO_SPACES=%lu)\n", MAX_IO_SPACES);
184 return ~0; 163 return ~0;
185 } 164 }
186 165
187 i = num_io_spaces++; 166 i = num_io_spaces++;
188 io_space[i].mmio_base = offset; 167 io_space[i].mmio_base = mmio_base;
189 io_space[i].sparse = sparse; 168 io_space[i].sparse = sparse;
190 169
191 return IO_SPACE_BASE(i); 170 return i;
171}
172
173static u64 __devinit
174add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr)
175{
176 struct resource *resource;
177 char *name;
178 u64 base, min, max, base_port;
179 unsigned int sparse = 0, space_nr, len;
180
181 resource = kzalloc(sizeof(*resource), GFP_KERNEL);
182 if (!resource) {
183 printk(KERN_ERR "PCI: No memory for %s I/O port space\n",
184 info->name);
185 goto out;
186 }
187
188 len = strlen(info->name) + 32;
189 name = kzalloc(len, GFP_KERNEL);
190 if (!name) {
191 printk(KERN_ERR "PCI: No memory for %s I/O port space name\n",
192 info->name);
193 goto free_resource;
194 }
195
196 min = addr->min_address_range;
197 max = min + addr->address_length - 1;
198 if (addr->attribute.io.translation_attribute == ACPI_SPARSE_TRANSLATION)
199 sparse = 1;
200
201 space_nr = new_space(addr->address_translation_offset, sparse);
202 if (space_nr == ~0)
203 goto free_name;
204
205 base = __pa(io_space[space_nr].mmio_base);
206 base_port = IO_SPACE_BASE(space_nr);
207 snprintf(name, len, "%s I/O Ports %08lx-%08lx", info->name,
208 base_port + min, base_port + max);
209
210 /*
211 * The SDM guarantees the legacy 0-64K space is sparse, but if the
212 * mapping is done by the processor (not the bridge), ACPI may not
213 * mark it as sparse.
214 */
215 if (space_nr == 0)
216 sparse = 1;
217
218 resource->name = name;
219 resource->flags = IORESOURCE_MEM;
220 resource->start = base + (sparse ? IO_SPACE_SPARSE_ENCODING(min) : min);
221 resource->end = base + (sparse ? IO_SPACE_SPARSE_ENCODING(max) : max);
222 insert_resource(&iomem_resource, resource);
223
224 return base_port;
225
226free_name:
227 kfree(name);
228free_resource:
229 kfree(resource);
230out:
231 return ~0;
232}
233
234static acpi_status __devinit resource_to_window(struct acpi_resource *resource,
235 struct acpi_resource_address64 *addr)
236{
237 acpi_status status;
238
239 /*
240 * We're only interested in _CRS descriptors that are
241 * - address space descriptors for memory or I/O space
242 * - non-zero size
243 * - producers, i.e., the address space is routed downstream,
244 * not consumed by the bridge itself
245 */
246 status = acpi_resource_to_address64(resource, addr);
247 if (ACPI_SUCCESS(status) &&
248 (addr->resource_type == ACPI_MEMORY_RANGE ||
249 addr->resource_type == ACPI_IO_RANGE) &&
250 addr->address_length &&
251 addr->producer_consumer == ACPI_PRODUCER)
252 return AE_OK;
253
254 return AE_ERROR;
192} 255}
193 256
194static acpi_status __devinit 257static acpi_status __devinit
@@ -198,20 +261,13 @@ count_window (struct acpi_resource *resource, void *data)
198 struct acpi_resource_address64 addr; 261 struct acpi_resource_address64 addr;
199 acpi_status status; 262 acpi_status status;
200 263
201 status = acpi_resource_to_address64(resource, &addr); 264 status = resource_to_window(resource, &addr);
202 if (ACPI_SUCCESS(status)) 265 if (ACPI_SUCCESS(status))
203 if (addr.resource_type == ACPI_MEMORY_RANGE || 266 (*windows)++;
204 addr.resource_type == ACPI_IO_RANGE)
205 (*windows)++;
206 267
207 return AE_OK; 268 return AE_OK;
208} 269}
209 270
210struct pci_root_info {
211 struct pci_controller *controller;
212 char *name;
213};
214
215static __devinit acpi_status add_window(struct acpi_resource *res, void *data) 271static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
216{ 272{
217 struct pci_root_info *info = data; 273 struct pci_root_info *info = data;
@@ -221,13 +277,11 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
221 unsigned long flags, offset = 0; 277 unsigned long flags, offset = 0;
222 struct resource *root; 278 struct resource *root;
223 279
224 status = acpi_resource_to_address64(res, &addr); 280 /* Return AE_OK for non-window resources to keep scanning for more */
281 status = resource_to_window(res, &addr);
225 if (!ACPI_SUCCESS(status)) 282 if (!ACPI_SUCCESS(status))
226 return AE_OK; 283 return AE_OK;
227 284
228 if (!addr.address_length)
229 return AE_OK;
230
231 if (addr.resource_type == ACPI_MEMORY_RANGE) { 285 if (addr.resource_type == ACPI_MEMORY_RANGE) {
232 flags = IORESOURCE_MEM; 286 flags = IORESOURCE_MEM;
233 root = &iomem_resource; 287 root = &iomem_resource;
@@ -235,7 +289,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
235 } else if (addr.resource_type == ACPI_IO_RANGE) { 289 } else if (addr.resource_type == ACPI_IO_RANGE) {
236 flags = IORESOURCE_IO; 290 flags = IORESOURCE_IO;
237 root = &ioport_resource; 291 root = &ioport_resource;
238 offset = add_io_space(&addr); 292 offset = add_io_space(info, &addr);
239 if (offset == ~0) 293 if (offset == ~0)
240 return AE_OK; 294 return AE_OK;
241 } else 295 } else
@@ -245,7 +299,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
245 window->resource.name = info->name; 299 window->resource.name = info->name;
246 window->resource.flags = flags; 300 window->resource.flags = flags;
247 window->resource.start = addr.min_address_range + offset; 301 window->resource.start = addr.min_address_range + offset;
248 window->resource.end = addr.max_address_range + offset; 302 window->resource.end = window->resource.start + addr.address_length - 1;
249 window->resource.child = NULL; 303 window->resource.child = NULL;
250 window->offset = offset; 304 window->offset = offset;
251 305
@@ -743,7 +797,7 @@ int pci_vector_resources(int last, int nr_released)
743{ 797{
744 int count = nr_released; 798 int count = nr_released;
745 799
746 count += (IA64_LAST_DEVICE_VECTOR - last); 800 count += (IA64_LAST_DEVICE_VECTOR - last);
747 801
748 return count; 802 return count;
749} 803}
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c
index 45854c637e9c..dd73c0cb754b 100644
--- a/arch/ia64/sn/kernel/bte.c
+++ b/arch/ia64/sn/kernel/bte.c
@@ -87,7 +87,7 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification)
87 unsigned long irq_flags; 87 unsigned long irq_flags;
88 unsigned long itc_end = 0; 88 unsigned long itc_end = 0;
89 int nasid_to_try[MAX_NODES_TO_TRY]; 89 int nasid_to_try[MAX_NODES_TO_TRY];
90 int my_nasid = get_nasid(); 90 int my_nasid = cpuid_to_nasid(raw_smp_processor_id());
91 int bte_if_index, nasid_index; 91 int bte_if_index, nasid_index;
92 int bte_first, btes_per_node = BTES_PER_NODE; 92 int bte_first, btes_per_node = BTES_PER_NODE;
93 93
@@ -137,6 +137,7 @@ retry_bteop:
137 bte = bte_if_on_node(nasid_to_try[nasid_index],bte_if_index); 137 bte = bte_if_on_node(nasid_to_try[nasid_index],bte_if_index);
138 138
139 if (bte == NULL) { 139 if (bte == NULL) {
140 nasid_index++;
140 continue; 141 continue;
141 } 142 }
142 143
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index 906622d9f933..05e4ea889981 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -22,8 +22,6 @@
22#include "xtalk/hubdev.h" 22#include "xtalk/hubdev.h"
23#include "xtalk/xwidgetdev.h" 23#include "xtalk/xwidgetdev.h"
24 24
25nasid_t master_nasid = INVALID_NASID; /* Partition Master */
26
27static struct list_head sn_sysdata_list; 25static struct list_head sn_sysdata_list;
28 26
29/* sysdata list struct */ 27/* sysdata list struct */
@@ -165,7 +163,7 @@ static void sn_fixup_ionodes(void)
165 * Get SGI Specific HUB chipset information. 163 * Get SGI Specific HUB chipset information.
166 * Inform Prom that this kernel can support domain bus numbering. 164 * Inform Prom that this kernel can support domain bus numbering.
167 */ 165 */
168 for (i = 0; i < numionodes; i++) { 166 for (i = 0; i < num_cnodes; i++) {
169 hubdev = (struct hubdev_info *)(NODEPDA(i)->pdinfo); 167 hubdev = (struct hubdev_info *)(NODEPDA(i)->pdinfo);
170 nasid = cnodeid_to_nasid(i); 168 nasid = cnodeid_to_nasid(i);
171 hubdev->max_segment_number = 0xffffffff; 169 hubdev->max_segment_number = 0xffffffff;
@@ -351,7 +349,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
351 return; /*bus # does not exist */ 349 return; /*bus # does not exist */
352 prom_bussoft_ptr = __va(prom_bussoft_ptr); 350 prom_bussoft_ptr = __va(prom_bussoft_ptr);
353 351
354 controller = kcalloc(1,sizeof(struct pci_controller), GFP_KERNEL); 352 controller = kzalloc(sizeof(struct pci_controller), GFP_KERNEL);
355 controller->segment = segment; 353 controller->segment = segment;
356 if (!controller) 354 if (!controller)
357 BUG(); 355 BUG();
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index 6f8c5883716b..e510dce9971f 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -30,6 +30,7 @@
30#include <linux/root_dev.h> 30#include <linux/root_dev.h>
31#include <linux/nodemask.h> 31#include <linux/nodemask.h>
32#include <linux/pm.h> 32#include <linux/pm.h>
33#include <linux/efi.h>
33 34
34#include <asm/io.h> 35#include <asm/io.h>
35#include <asm/sal.h> 36#include <asm/sal.h>
@@ -59,8 +60,6 @@ DEFINE_PER_CPU(struct pda_s, pda_percpu);
59 60
60#define MAX_PHYS_MEMORY (1UL << IA64_MAX_PHYS_BITS) /* Max physical address supported */ 61#define MAX_PHYS_MEMORY (1UL << IA64_MAX_PHYS_BITS) /* Max physical address supported */
61 62
62lboard_t *root_lboard[MAX_COMPACT_NODES];
63
64extern void bte_init_node(nodepda_t *, cnodeid_t); 63extern void bte_init_node(nodepda_t *, cnodeid_t);
65 64
66extern void sn_timer_init(void); 65extern void sn_timer_init(void);
@@ -97,15 +96,15 @@ u8 sn_region_size;
97EXPORT_SYMBOL(sn_region_size); 96EXPORT_SYMBOL(sn_region_size);
98int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */ 97int sn_prom_type; /* 0=hardware, 1=medusa/realprom, 2=medusa/fakeprom */
99 98
100short physical_node_map[MAX_PHYSNODE_ID]; 99short physical_node_map[MAX_NUMALINK_NODES];
101static unsigned long sn_prom_features[MAX_PROM_FEATURE_SETS]; 100static unsigned long sn_prom_features[MAX_PROM_FEATURE_SETS];
102 101
103EXPORT_SYMBOL(physical_node_map); 102EXPORT_SYMBOL(physical_node_map);
104 103
105int numionodes; 104int num_cnodes;
106 105
107static void sn_init_pdas(char **); 106static void sn_init_pdas(char **);
108static void scan_for_ionodes(void); 107static void build_cnode_tables(void);
109 108
110static nodepda_t *nodepdaindr[MAX_COMPACT_NODES]; 109static nodepda_t *nodepdaindr[MAX_COMPACT_NODES];
111 110
@@ -140,19 +139,6 @@ char drive_info[4 * 16];
140#endif 139#endif
141 140
142/* 141/*
143 * Get nasid of current cpu early in boot before nodepda is initialized
144 */
145static int
146boot_get_nasid(void)
147{
148 int nasid;
149
150 if (ia64_sn_get_sapic_info(get_sapicid(), &nasid, NULL, NULL))
151 BUG();
152 return nasid;
153}
154
155/*
156 * This routine can only be used during init, since 142 * This routine can only be used during init, since
157 * smp_boot_data is an init data structure. 143 * smp_boot_data is an init data structure.
158 * We have to use smp_boot_data.cpu_phys_id to find 144 * We have to use smp_boot_data.cpu_phys_id to find
@@ -223,7 +209,6 @@ void __init early_sn_setup(void)
223} 209}
224 210
225extern int platform_intr_list[]; 211extern int platform_intr_list[];
226extern nasid_t master_nasid;
227static int __initdata shub_1_1_found = 0; 212static int __initdata shub_1_1_found = 0;
228 213
229/* 214/*
@@ -258,6 +243,135 @@ static void __init sn_check_for_wars(void)
258 } 243 }
259} 244}
260 245
246/*
247 * Scan the EFI PCDP table (if it exists) for an acceptable VGA console
248 * output device. If one exists, pick it and set sn_legacy_{io,mem} to
249 * reflect the bus offsets needed to address it.
250 *
251 * Since pcdp support in SN is not supported in the 2.4 kernel (or at least
252 * the one lbs is based on) just declare the needed structs here.
253 *
254 * Reference spec http://www.dig64.org/specifications/DIG64_PCDPv20.pdf
255 *
256 * Returns 0 if no acceptable vga is found, !0 otherwise.
257 *
258 * Note: This stuff is duped here because Altix requires the PCDP to
259 * locate a usable VGA device due to lack of proper ACPI support. Structures
260 * could be used from drivers/firmware/pcdp.h, but it was decided that moving
261 * this file to a more public location just for Altix use was undesireable.
262 */
263
264struct hcdp_uart_desc {
265 u8 pad[45];
266};
267
268struct pcdp {
269 u8 signature[4]; /* should be 'HCDP' */
270 u32 length;
271 u8 rev; /* should be >=3 for pcdp, <3 for hcdp */
272 u8 sum;
273 u8 oem_id[6];
274 u64 oem_tableid;
275 u32 oem_rev;
276 u32 creator_id;
277 u32 creator_rev;
278 u32 num_type0;
279 struct hcdp_uart_desc uart[0]; /* num_type0 of these */
280 /* pcdp descriptors follow */
281} __attribute__((packed));
282
283struct pcdp_device_desc {
284 u8 type;
285 u8 primary;
286 u16 length;
287 u16 index;
288 /* interconnect specific structure follows */
289 /* device specific structure follows that */
290} __attribute__((packed));
291
292struct pcdp_interface_pci {
293 u8 type; /* 1 == pci */
294 u8 reserved;
295 u16 length;
296 u8 segment;
297 u8 bus;
298 u8 dev;
299 u8 fun;
300 u16 devid;
301 u16 vendid;
302 u32 acpi_interrupt;
303 u64 mmio_tra;
304 u64 ioport_tra;
305 u8 flags;
306 u8 translation;
307} __attribute__((packed));
308
309struct pcdp_vga_device {
310 u8 num_eas_desc;
311 /* ACPI Extended Address Space Desc follows */
312} __attribute__((packed));
313
314/* from pcdp_device_desc.primary */
315#define PCDP_PRIMARY_CONSOLE 0x01
316
317/* from pcdp_device_desc.type */
318#define PCDP_CONSOLE_INOUT 0x0
319#define PCDP_CONSOLE_DEBUG 0x1
320#define PCDP_CONSOLE_OUT 0x2
321#define PCDP_CONSOLE_IN 0x3
322#define PCDP_CONSOLE_TYPE_VGA 0x8
323
324#define PCDP_CONSOLE_VGA (PCDP_CONSOLE_TYPE_VGA | PCDP_CONSOLE_OUT)
325
326/* from pcdp_interface_pci.type */
327#define PCDP_IF_PCI 1
328
329/* from pcdp_interface_pci.translation */
330#define PCDP_PCI_TRANS_IOPORT 0x02
331#define PCDP_PCI_TRANS_MMIO 0x01
332
333static void
334sn_scan_pcdp(void)
335{
336 u8 *bp;
337 struct pcdp *pcdp;
338 struct pcdp_device_desc device;
339 struct pcdp_interface_pci if_pci;
340 extern struct efi efi;
341
342 pcdp = efi.hcdp;
343 if (! pcdp)
344 return; /* no hcdp/pcdp table */
345
346 if (pcdp->rev < 3)
347 return; /* only support PCDP (rev >= 3) */
348
349 for (bp = (u8 *)&pcdp->uart[pcdp->num_type0];
350 bp < (u8 *)pcdp + pcdp->length;
351 bp += device.length) {
352 memcpy(&device, bp, sizeof(device));
353 if (! (device.primary & PCDP_PRIMARY_CONSOLE))
354 continue; /* not primary console */
355
356 if (device.type != PCDP_CONSOLE_VGA)
357 continue; /* not VGA descriptor */
358
359 memcpy(&if_pci, bp+sizeof(device), sizeof(if_pci));
360 if (if_pci.type != PCDP_IF_PCI)
361 continue; /* not PCI interconnect */
362
363 if (if_pci.translation & PCDP_PCI_TRANS_IOPORT)
364 vga_console_iobase =
365 if_pci.ioport_tra | __IA64_UNCACHED_OFFSET;
366
367 if (if_pci.translation & PCDP_PCI_TRANS_MMIO)
368 vga_console_membase =
369 if_pci.mmio_tra | __IA64_UNCACHED_OFFSET;
370
371 break; /* once we find the primary, we're done */
372 }
373}
374
261/** 375/**
262 * sn_setup - SN platform setup routine 376 * sn_setup - SN platform setup routine
263 * @cmdline_p: kernel command line 377 * @cmdline_p: kernel command line
@@ -269,7 +383,6 @@ static void __init sn_check_for_wars(void)
269void __init sn_setup(char **cmdline_p) 383void __init sn_setup(char **cmdline_p)
270{ 384{
271 long status, ticks_per_sec, drift; 385 long status, ticks_per_sec, drift;
272 int pxm;
273 u32 version = sn_sal_rev(); 386 u32 version = sn_sal_rev();
274 extern void sn_cpu_init(void); 387 extern void sn_cpu_init(void);
275 388
@@ -280,16 +393,35 @@ void __init sn_setup(char **cmdline_p)
280 393
281#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) 394#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
282 /* 395 /*
283 * If there was a primary vga adapter identified through the 396 * Handle SN vga console.
284 * EFI PCDP table, make it the preferred console. Otherwise 397 *
285 * zero out conswitchp. 398 * SN systems do not have enough ACPI table information
399 * being passed from prom to identify VGA adapters and the legacy
400 * addresses to access them. Until that is done, SN systems rely
401 * on the PCDP table to identify the primary VGA console if one
402 * exists.
403 *
404 * However, kernel PCDP support is optional, and even if it is built
405 * into the kernel, it will not be used if the boot cmdline contains
406 * console= directives.
407 *
408 * So, to work around this mess, we duplicate some of the PCDP code
409 * here so that the primary VGA console (as defined by PCDP) will
410 * work on SN systems even if a different console (e.g. serial) is
411 * selected on the boot line (or CONFIG_EFI_PCDP is off).
286 */ 412 */
287 413
414 if (! vga_console_membase)
415 sn_scan_pcdp();
416
288 if (vga_console_membase) { 417 if (vga_console_membase) {
289 /* usable vga ... make tty0 the preferred default console */ 418 /* usable vga ... make tty0 the preferred default console */
290 add_preferred_console("tty", 0, NULL); 419 if (!strstr(*cmdline_p, "console="))
420 add_preferred_console("tty", 0, NULL);
291 } else { 421 } else {
292 printk(KERN_DEBUG "SGI: Disabling VGA console\n"); 422 printk(KERN_DEBUG "SGI: Disabling VGA console\n");
423 if (!strstr(*cmdline_p, "console="))
424 add_preferred_console("ttySG", 0, NULL);
293#ifdef CONFIG_DUMMY_CONSOLE 425#ifdef CONFIG_DUMMY_CONSOLE
294 conswitchp = &dummy_con; 426 conswitchp = &dummy_con;
295#else 427#else
@@ -300,11 +432,10 @@ void __init sn_setup(char **cmdline_p)
300 432
301 MAX_DMA_ADDRESS = PAGE_OFFSET + MAX_PHYS_MEMORY; 433 MAX_DMA_ADDRESS = PAGE_OFFSET + MAX_PHYS_MEMORY;
302 434
303 memset(physical_node_map, -1, sizeof(physical_node_map)); 435 /*
304 for (pxm = 0; pxm < MAX_PXM_DOMAINS; pxm++) 436 * Build the tables for managing cnodes.
305 if (pxm_to_nid_map[pxm] != -1) 437 */
306 physical_node_map[pxm_to_nasid(pxm)] = 438 build_cnode_tables();
307 pxm_to_nid_map[pxm];
308 439
309 /* 440 /*
310 * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard 441 * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard
@@ -319,8 +450,6 @@ void __init sn_setup(char **cmdline_p)
319 450
320 printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); 451 printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF);
321 452
322 master_nasid = boot_get_nasid();
323
324 status = 453 status =
325 ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec, 454 ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec,
326 &drift); 455 &drift);
@@ -378,15 +507,6 @@ static void __init sn_init_pdas(char **cmdline_p)
378{ 507{
379 cnodeid_t cnode; 508 cnodeid_t cnode;
380 509
381 memset(sn_cnodeid_to_nasid, -1,
382 sizeof(__ia64_per_cpu_var(__sn_cnodeid_to_nasid)));
383 for_each_online_node(cnode)
384 sn_cnodeid_to_nasid[cnode] =
385 pxm_to_nasid(nid_to_pxm_map[cnode]);
386
387 numionodes = num_online_nodes();
388 scan_for_ionodes();
389
390 /* 510 /*
391 * Allocate & initalize the nodepda for each node. 511 * Allocate & initalize the nodepda for each node.
392 */ 512 */
@@ -402,7 +522,7 @@ static void __init sn_init_pdas(char **cmdline_p)
402 /* 522 /*
403 * Allocate & initialize nodepda for TIOs. For now, put them on node 0. 523 * Allocate & initialize nodepda for TIOs. For now, put them on node 0.
404 */ 524 */
405 for (cnode = num_online_nodes(); cnode < numionodes; cnode++) { 525 for (cnode = num_online_nodes(); cnode < num_cnodes; cnode++) {
406 nodepdaindr[cnode] = 526 nodepdaindr[cnode] =
407 alloc_bootmem_node(NODE_DATA(0), sizeof(nodepda_t)); 527 alloc_bootmem_node(NODE_DATA(0), sizeof(nodepda_t));
408 memset(nodepdaindr[cnode], 0, sizeof(nodepda_t)); 528 memset(nodepdaindr[cnode], 0, sizeof(nodepda_t));
@@ -411,7 +531,7 @@ static void __init sn_init_pdas(char **cmdline_p)
411 /* 531 /*
412 * Now copy the array of nodepda pointers to each nodepda. 532 * Now copy the array of nodepda pointers to each nodepda.
413 */ 533 */
414 for (cnode = 0; cnode < numionodes; cnode++) 534 for (cnode = 0; cnode < num_cnodes; cnode++)
415 memcpy(nodepdaindr[cnode]->pernode_pdaindr, nodepdaindr, 535 memcpy(nodepdaindr[cnode]->pernode_pdaindr, nodepdaindr,
416 sizeof(nodepdaindr)); 536 sizeof(nodepdaindr));
417 537
@@ -428,7 +548,7 @@ static void __init sn_init_pdas(char **cmdline_p)
428 * Initialize the per node hubdev. This includes IO Nodes and 548 * Initialize the per node hubdev. This includes IO Nodes and
429 * headless/memless nodes. 549 * headless/memless nodes.
430 */ 550 */
431 for (cnode = 0; cnode < numionodes; cnode++) { 551 for (cnode = 0; cnode < num_cnodes; cnode++) {
432 hubdev_init_node(nodepdaindr[cnode], cnode); 552 hubdev_init_node(nodepdaindr[cnode], cnode);
433 } 553 }
434} 554}
@@ -553,87 +673,58 @@ void __init sn_cpu_init(void)
553} 673}
554 674
555/* 675/*
556 * Scan klconfig for ionodes. Add the nasids to the 676 * Build tables for converting between NASIDs and cnodes.
557 * physical_node_map and the pda and increment numionodes.
558 */ 677 */
678static inline int __init board_needs_cnode(int type)
679{
680 return (type == KLTYPE_SNIA || type == KLTYPE_TIO);
681}
559 682
560static void __init scan_for_ionodes(void) 683void __init build_cnode_tables(void)
561{ 684{
562 int nasid = 0; 685 int nasid;
686 int node;
563 lboard_t *brd; 687 lboard_t *brd;
564 688
565 /* fakeprom does not support klgraph */ 689 memset(physical_node_map, -1, sizeof(physical_node_map));
566 if (IS_RUNNING_ON_FAKE_PROM()) 690 memset(sn_cnodeid_to_nasid, -1,
567 return; 691 sizeof(__ia64_per_cpu_var(__sn_cnodeid_to_nasid)));
568
569 /* Setup ionodes with memory */
570 for (nasid = 0; nasid < MAX_PHYSNODE_ID; nasid += 2) {
571 char *klgraph_header;
572 cnodeid_t cnodeid;
573
574 if (physical_node_map[nasid] == -1)
575 continue;
576 692
577 cnodeid = -1; 693 /*
578 klgraph_header = __va(ia64_sn_get_klconfig_addr(nasid)); 694 * First populate the tables with C/M bricks. This ensures that
579 if (!klgraph_header) { 695 * cnode == node for all C & M bricks.
580 BUG(); /* All nodes must have klconfig tables! */ 696 */
581 } 697 for_each_online_node(node) {
582 cnodeid = nasid_to_cnodeid(nasid); 698 nasid = pxm_to_nasid(nid_to_pxm_map[node]);
583 root_lboard[cnodeid] = (lboard_t *) 699 sn_cnodeid_to_nasid[node] = nasid;
584 NODE_OFFSET_TO_LBOARD((nasid), 700 physical_node_map[nasid] = node;
585 ((kl_config_hdr_t
586 *) (klgraph_header))->
587 ch_board_info);
588 } 701 }
589 702
590 /* Scan headless/memless IO Nodes. */ 703 /*
591 for (nasid = 0; nasid < MAX_PHYSNODE_ID; nasid += 2) { 704 * num_cnodes is total number of C/M/TIO bricks. Because of the 256 node
592 /* if there's no nasid, don't try to read the klconfig on the node */ 705 * limit on the number of nodes, we can't use the generic node numbers
593 if (physical_node_map[nasid] == -1) 706 * for this. Note that num_cnodes is incremented below as TIOs or
594 continue; 707 * headless/memoryless nodes are discovered.
595 brd = find_lboard_any((lboard_t *) 708 */
596 root_lboard[nasid_to_cnodeid(nasid)], 709 num_cnodes = num_online_nodes();
597 KLTYPE_SNIA);
598 if (brd) {
599 brd = KLCF_NEXT_ANY(brd); /* Skip this node's lboard */
600 if (!brd)
601 continue;
602 }
603
604 brd = find_lboard_any(brd, KLTYPE_SNIA);
605 710
606 while (brd) { 711 /* fakeprom does not support klgraph */
607 sn_cnodeid_to_nasid[numionodes] = brd->brd_nasid; 712 if (IS_RUNNING_ON_FAKE_PROM())
608 physical_node_map[brd->brd_nasid] = numionodes; 713 return;
609 root_lboard[numionodes] = brd;
610 numionodes++;
611 brd = KLCF_NEXT_ANY(brd);
612 if (!brd)
613 break;
614
615 brd = find_lboard_any(brd, KLTYPE_SNIA);
616 }
617 }
618 714
619 /* Scan for TIO nodes. */ 715 /* Find TIOs & headless/memoryless nodes and add them to the tables */
620 for (nasid = 0; nasid < MAX_PHYSNODE_ID; nasid += 2) { 716 for_each_online_node(node) {
621 /* if there's no nasid, don't try to read the klconfig on the node */ 717 kl_config_hdr_t *klgraph_header;
622 if (physical_node_map[nasid] == -1) 718 nasid = cnodeid_to_nasid(node);
623 continue; 719 if ((klgraph_header = ia64_sn_get_klconfig_addr(nasid)) == NULL)
624 brd = find_lboard_any((lboard_t *) 720 BUG();
625 root_lboard[nasid_to_cnodeid(nasid)], 721 brd = NODE_OFFSET_TO_LBOARD(nasid, klgraph_header->ch_board_info);
626 KLTYPE_TIO);
627 while (brd) { 722 while (brd) {
628 sn_cnodeid_to_nasid[numionodes] = brd->brd_nasid; 723 if (board_needs_cnode(brd->brd_type) && physical_node_map[brd->brd_nasid] < 0) {
629 physical_node_map[brd->brd_nasid] = numionodes; 724 sn_cnodeid_to_nasid[num_cnodes] = brd->brd_nasid;
630 root_lboard[numionodes] = brd; 725 physical_node_map[brd->brd_nasid] = num_cnodes++;
631 numionodes++; 726 }
632 brd = KLCF_NEXT_ANY(brd); 727 brd = find_lboard_next(brd);
633 if (!brd)
634 break;
635
636 brd = find_lboard_any(brd, KLTYPE_TIO);
637 } 728 }
638 } 729 }
639} 730}
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index 0a4ee50c302f..5d54f5f4e926 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -177,6 +177,7 @@ void sn_tlb_migrate_finish(struct mm_struct *mm)
177 177
178/** 178/**
179 * sn2_global_tlb_purge - globally purge translation cache of virtual address range 179 * sn2_global_tlb_purge - globally purge translation cache of virtual address range
180 * @mm: mm_struct containing virtual address range
180 * @start: start of virtual address range 181 * @start: start of virtual address range
181 * @end: end of virtual address range 182 * @end: end of virtual address range
182 * @nbits: specifies number of bytes to purge per instruction (num = 1<<(nbits & 0xfc)) 183 * @nbits: specifies number of bytes to purge per instruction (num = 1<<(nbits & 0xfc))
@@ -188,21 +189,22 @@ void sn_tlb_migrate_finish(struct mm_struct *mm)
188 * - cpu_vm_mask is a bit mask that indicates which cpus have loaded the context. 189 * - cpu_vm_mask is a bit mask that indicates which cpus have loaded the context.
189 * - cpu_vm_mask is converted into a nodemask of the nodes containing the 190 * - cpu_vm_mask is converted into a nodemask of the nodes containing the
190 * cpus in cpu_vm_mask. 191 * cpus in cpu_vm_mask.
191 * - if only one bit is set in cpu_vm_mask & it is the current cpu, 192 * - if only one bit is set in cpu_vm_mask & it is the current cpu & the
192 * then only the local TLB needs to be flushed. This flushing can be done 193 * process is purging its own virtual address range, then only the
193 * using ptc.l. This is the common case & avoids the global spinlock. 194 * local TLB needs to be flushed. This flushing can be done using
195 * ptc.l. This is the common case & avoids the global spinlock.
194 * - if multiple cpus have loaded the context, then flushing has to be 196 * - if multiple cpus have loaded the context, then flushing has to be
195 * done with ptc.g/MMRs under protection of the global ptc_lock. 197 * done with ptc.g/MMRs under protection of the global ptc_lock.
196 */ 198 */
197 199
198void 200void
199sn2_global_tlb_purge(unsigned long start, unsigned long end, 201sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
200 unsigned long nbits) 202 unsigned long end, unsigned long nbits)
201{ 203{
202 int i, opt, shub1, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0; 204 int i, opt, shub1, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0;
205 int mymm = (mm == current->active_mm);
203 volatile unsigned long *ptc0, *ptc1; 206 volatile unsigned long *ptc0, *ptc1;
204 unsigned long itc, itc2, flags, data0 = 0, data1 = 0; 207 unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value;
205 struct mm_struct *mm = current->active_mm;
206 short nasids[MAX_NUMNODES], nix; 208 short nasids[MAX_NUMNODES], nix;
207 nodemask_t nodes_flushed; 209 nodemask_t nodes_flushed;
208 210
@@ -216,9 +218,12 @@ sn2_global_tlb_purge(unsigned long start, unsigned long end,
216 i++; 218 i++;
217 } 219 }
218 220
221 if (i == 0)
222 return;
223
219 preempt_disable(); 224 preempt_disable();
220 225
221 if (likely(i == 1 && lcpu == smp_processor_id())) { 226 if (likely(i == 1 && lcpu == smp_processor_id() && mymm)) {
222 do { 227 do {
223 ia64_ptcl(start, nbits << 2); 228 ia64_ptcl(start, nbits << 2);
224 start += (1UL << nbits); 229 start += (1UL << nbits);
@@ -229,7 +234,7 @@ sn2_global_tlb_purge(unsigned long start, unsigned long end,
229 return; 234 return;
230 } 235 }
231 236
232 if (atomic_read(&mm->mm_users) == 1) { 237 if (atomic_read(&mm->mm_users) == 1 && mymm) {
233 flush_tlb_mm(mm); 238 flush_tlb_mm(mm);
234 __get_cpu_var(ptcstats).change_rid++; 239 __get_cpu_var(ptcstats).change_rid++;
235 preempt_enable(); 240 preempt_enable();
@@ -241,11 +246,13 @@ sn2_global_tlb_purge(unsigned long start, unsigned long end,
241 for_each_node_mask(cnode, nodes_flushed) 246 for_each_node_mask(cnode, nodes_flushed)
242 nasids[nix++] = cnodeid_to_nasid(cnode); 247 nasids[nix++] = cnodeid_to_nasid(cnode);
243 248
249 rr_value = (mm->context << 3) | REGION_NUMBER(start);
250
244 shub1 = is_shub1(); 251 shub1 = is_shub1();
245 if (shub1) { 252 if (shub1) {
246 data0 = (1UL << SH1_PTC_0_A_SHFT) | 253 data0 = (1UL << SH1_PTC_0_A_SHFT) |
247 (nbits << SH1_PTC_0_PS_SHFT) | 254 (nbits << SH1_PTC_0_PS_SHFT) |
248 ((ia64_get_rr(start) >> 8) << SH1_PTC_0_RID_SHFT) | 255 (rr_value << SH1_PTC_0_RID_SHFT) |
249 (1UL << SH1_PTC_0_START_SHFT); 256 (1UL << SH1_PTC_0_START_SHFT);
250 ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH1_PTC_0); 257 ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH1_PTC_0);
251 ptc1 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH1_PTC_1); 258 ptc1 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH1_PTC_1);
@@ -254,7 +261,7 @@ sn2_global_tlb_purge(unsigned long start, unsigned long end,
254 (nbits << SH2_PTC_PS_SHFT) | 261 (nbits << SH2_PTC_PS_SHFT) |
255 (1UL << SH2_PTC_START_SHFT); 262 (1UL << SH2_PTC_START_SHFT);
256 ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH2_PTC + 263 ptc0 = (long *)GLOBAL_MMR_PHYS_ADDR(0, SH2_PTC +
257 ((ia64_get_rr(start) >> 8) << SH2_PTC_RID_SHFT) ); 264 (rr_value << SH2_PTC_RID_SHFT));
258 ptc1 = NULL; 265 ptc1 = NULL;
259 } 266 }
260 267
@@ -275,7 +282,7 @@ sn2_global_tlb_purge(unsigned long start, unsigned long end,
275 data0 = (data0 & ~SH2_PTC_ADDR_MASK) | (start & SH2_PTC_ADDR_MASK); 282 data0 = (data0 & ~SH2_PTC_ADDR_MASK) | (start & SH2_PTC_ADDR_MASK);
276 for (i = 0; i < nix; i++) { 283 for (i = 0; i < nix; i++) {
277 nasid = nasids[i]; 284 nasid = nasids[i];
278 if ((!(sn2_ptctest & 3)) && unlikely(nasid == mynasid)) { 285 if ((!(sn2_ptctest & 3)) && unlikely(nasid == mynasid && mymm)) {
279 ia64_ptcga(start, nbits << 2); 286 ia64_ptcga(start, nbits << 2);
280 ia64_srlz_i(); 287 ia64_srlz_i();
281 } else { 288 } else {
@@ -485,6 +492,9 @@ static struct proc_dir_entry *proc_sn2_ptc;
485 492
486static int __init sn2_ptc_init(void) 493static int __init sn2_ptc_init(void)
487{ 494{
495 if (!ia64_platform_is("sn2"))
496 return -ENOSYS;
497
488 if (!(proc_sn2_ptc = create_proc_entry(PTC_BASENAME, 0444, NULL))) { 498 if (!(proc_sn2_ptc = create_proc_entry(PTC_BASENAME, 0444, NULL))) {
489 printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME); 499 printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME);
490 return -EINVAL; 500 return -EINVAL;
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 0513aacac8c1..19b54fbcd7ea 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -476,8 +476,8 @@ static int sn_topology_show(struct seq_file *s, void *d)
476 for_each_online_cpu(j) { 476 for_each_online_cpu(j) {
477 seq_printf(s, j ? ":%d" : ", dist %d", 477 seq_printf(s, j ? ":%d" : ", dist %d",
478 node_distance( 478 node_distance(
479 cpuid_to_cnodeid(i), 479 cpu_to_node(i),
480 cpuid_to_cnodeid(j))); 480 cpu_to_node(j)));
481 } 481 }
482 seq_putc(s, '\n'); 482 seq_putc(s, '\n');
483 } 483 }
@@ -743,13 +743,14 @@ sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, u64 arg)
743 if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) { 743 if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) {
744 memset(p, 0, a.sz); 744 memset(p, 0, a.sz);
745 for (i = 0; i < nobj; i++) { 745 for (i = 0; i < nobj; i++) {
746 int cpuobj_index = 0;
746 if (!SN_HWPERF_IS_NODE(objs + i)) 747 if (!SN_HWPERF_IS_NODE(objs + i))
747 continue; 748 continue;
748 node = sn_hwperf_obj_to_cnode(objs + i); 749 node = sn_hwperf_obj_to_cnode(objs + i);
749 for_each_online_cpu(j) { 750 for_each_online_cpu(j) {
750 if (node != cpu_to_node(j)) 751 if (node != cpu_to_node(j))
751 continue; 752 continue;
752 cpuobj = (struct sn_hwperf_object_info *) p + j; 753 cpuobj = (struct sn_hwperf_object_info *) p + cpuobj_index++;
753 slice = 'a' + cpuid_to_slice(j); 754 slice = 'a' + cpuid_to_slice(j);
754 cdata = cpu_data(j); 755 cdata = cpu_data(j);
755 cpuobj->id = j; 756 cpuobj->id = j;
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index b45db5133f55..0d8592a745a7 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -183,11 +183,12 @@ int cx_driver_unregister(struct cx_drv *cx_driver)
183 * @part_num: device's part number 183 * @part_num: device's part number
184 * @mfg_num: device's manufacturer number 184 * @mfg_num: device's manufacturer number
185 * @hubdev: hub info associated with this device 185 * @hubdev: hub info associated with this device
186 * @bt: board type of the device
186 * 187 *
187 */ 188 */
188int 189int
189cx_device_register(nasid_t nasid, int part_num, int mfg_num, 190cx_device_register(nasid_t nasid, int part_num, int mfg_num,
190 struct hubdev_info *hubdev) 191 struct hubdev_info *hubdev, int bt)
191{ 192{
192 struct cx_dev *cx_dev; 193 struct cx_dev *cx_dev;
193 194
@@ -200,6 +201,7 @@ cx_device_register(nasid_t nasid, int part_num, int mfg_num,
200 cx_dev->cx_id.mfg_num = mfg_num; 201 cx_dev->cx_id.mfg_num = mfg_num;
201 cx_dev->cx_id.nasid = nasid; 202 cx_dev->cx_id.nasid = nasid;
202 cx_dev->hubdev = hubdev; 203 cx_dev->hubdev = hubdev;
204 cx_dev->bt = bt;
203 205
204 cx_dev->dev.parent = NULL; 206 cx_dev->dev.parent = NULL;
205 cx_dev->dev.bus = &tiocx_bus_type; 207 cx_dev->dev.bus = &tiocx_bus_type;
@@ -238,7 +240,8 @@ static int cx_device_reload(struct cx_dev *cx_dev)
238{ 240{
239 cx_device_unregister(cx_dev); 241 cx_device_unregister(cx_dev);
240 return cx_device_register(cx_dev->cx_id.nasid, cx_dev->cx_id.part_num, 242 return cx_device_register(cx_dev->cx_id.nasid, cx_dev->cx_id.part_num,
241 cx_dev->cx_id.mfg_num, cx_dev->hubdev); 243 cx_dev->cx_id.mfg_num, cx_dev->hubdev,
244 cx_dev->bt);
242} 245}
243 246
244static inline uint64_t tiocx_intr_alloc(nasid_t nasid, int widget, 247static inline uint64_t tiocx_intr_alloc(nasid_t nasid, int widget,
@@ -365,26 +368,20 @@ static void tio_corelet_reset(nasid_t nasid, int corelet)
365 udelay(2000); 368 udelay(2000);
366} 369}
367 370
368static int tiocx_btchar_get(int nasid) 371static int is_fpga_tio(int nasid, int *bt)
369{ 372{
370 moduleid_t module_id; 373 int ioboard_type;
371 geoid_t geoid;
372 int cnodeid;
373
374 cnodeid = nasid_to_cnodeid(nasid);
375 geoid = cnodeid_get_geoid(cnodeid);
376 module_id = geo_module(geoid);
377 return MODULE_GET_BTCHAR(module_id);
378}
379 374
380static int is_fpga_brick(int nasid) 375 ioboard_type = ia64_sn_sysctl_ioboard_get(nasid);
381{ 376
382 switch (tiocx_btchar_get(nasid)) { 377 switch (ioboard_type) {
383 case L1_BRICKTYPE_SA: 378 case L1_BRICKTYPE_SA:
384 case L1_BRICKTYPE_ATHENA: 379 case L1_BRICKTYPE_ATHENA:
385 case L1_BRICKTYPE_DAYTONA: 380 case L1_BOARDTYPE_DAYTONA:
381 *bt = ioboard_type;
386 return 1; 382 return 1;
387 } 383 }
384
388 return 0; 385 return 0;
389} 386}
390 387
@@ -407,16 +404,22 @@ static int tiocx_reload(struct cx_dev *cx_dev)
407 404
408 if (bitstream_loaded(nasid)) { 405 if (bitstream_loaded(nasid)) {
409 uint64_t cx_id; 406 uint64_t cx_id;
410 407 int rv;
411 cx_id = 408
412 *(volatile uint64_t *)(TIO_SWIN_BASE(nasid, TIOCX_CORELET) + 409 rv = ia64_sn_sysctl_tio_clock_reset(nasid);
410 if (rv) {
411 printk(KERN_ALERT "CX port JTAG reset failed.\n");
412 } else {
413 cx_id = *(volatile uint64_t *)
414 (TIO_SWIN_BASE(nasid, TIOCX_CORELET) +
413 WIDGET_ID); 415 WIDGET_ID);
414 part_num = XWIDGET_PART_NUM(cx_id); 416 part_num = XWIDGET_PART_NUM(cx_id);
415 mfg_num = XWIDGET_MFG_NUM(cx_id); 417 mfg_num = XWIDGET_MFG_NUM(cx_id);
416 DBG("part= 0x%x, mfg= 0x%x\n", part_num, mfg_num); 418 DBG("part= 0x%x, mfg= 0x%x\n", part_num, mfg_num);
417 /* just ignore it if it's a CE */ 419 /* just ignore it if it's a CE */
418 if (part_num == TIO_CE_ASIC_PARTNUM) 420 if (part_num == TIO_CE_ASIC_PARTNUM)
419 return 0; 421 return 0;
422 }
420 } 423 }
421 424
422 cx_dev->cx_id.part_num = part_num; 425 cx_dev->cx_id.part_num = part_num;
@@ -436,10 +439,10 @@ static ssize_t show_cxdev_control(struct device *dev, struct device_attribute *a
436{ 439{
437 struct cx_dev *cx_dev = to_cx_dev(dev); 440 struct cx_dev *cx_dev = to_cx_dev(dev);
438 441
439 return sprintf(buf, "0x%x 0x%x 0x%x %d\n", 442 return sprintf(buf, "0x%x 0x%x 0x%x 0x%x\n",
440 cx_dev->cx_id.nasid, 443 cx_dev->cx_id.nasid,
441 cx_dev->cx_id.part_num, cx_dev->cx_id.mfg_num, 444 cx_dev->cx_id.part_num, cx_dev->cx_id.mfg_num,
442 tiocx_btchar_get(cx_dev->cx_id.nasid)); 445 cx_dev->bt);
443} 446}
444 447
445static ssize_t store_cxdev_control(struct device *dev, struct device_attribute *attr, const char *buf, 448static ssize_t store_cxdev_control(struct device *dev, struct device_attribute *attr, const char *buf,
@@ -486,13 +489,13 @@ static int __init tiocx_init(void)
486 489
487 bus_register(&tiocx_bus_type); 490 bus_register(&tiocx_bus_type);
488 491
489 for (cnodeid = 0; cnodeid < MAX_COMPACT_NODES; cnodeid++) { 492 for (cnodeid = 0; cnodeid < num_cnodes; cnodeid++) {
490 nasid_t nasid; 493 nasid_t nasid;
494 int bt;
491 495
492 if ((nasid = cnodeid_to_nasid(cnodeid)) < 0) 496 nasid = cnodeid_to_nasid(cnodeid);
493 break; /* No more nasids .. bail out of loop */
494 497
495 if ((nasid & 0x1) && is_fpga_brick(nasid)) { 498 if ((nasid & 0x1) && is_fpga_tio(nasid, &bt)) {
496 struct hubdev_info *hubdev; 499 struct hubdev_info *hubdev;
497 struct xwidget_info *widgetp; 500 struct xwidget_info *widgetp;
498 501
@@ -512,7 +515,7 @@ static int __init tiocx_init(void)
512 515
513 if (cx_device_register 516 if (cx_device_register
514 (nasid, widgetp->xwi_hwid.part_num, 517 (nasid, widgetp->xwi_hwid.part_num,
515 widgetp->xwi_hwid.mfg_num, hubdev) < 0) 518 widgetp->xwi_hwid.mfg_num, hubdev, bt) < 0)
516 return -ENXIO; 519 return -ENXIO;
517 else 520 else
518 found_tiocx_device++; 521 found_tiocx_device++;
diff --git a/arch/ia64/sn/kernel/xpc.h b/arch/ia64/sn/kernel/xpc.h
index d0ee635daf2e..5483a9f227d4 100644
--- a/arch/ia64/sn/kernel/xpc.h
+++ b/arch/ia64/sn/kernel/xpc.h
@@ -57,7 +57,7 @@
57#define XPC_NASID_FROM_W_B(_w, _b) (((_w) * 64 + (_b)) * 2) 57#define XPC_NASID_FROM_W_B(_w, _b) (((_w) * 64 + (_b)) * 2)
58 58
59#define XPC_HB_DEFAULT_INTERVAL 5 /* incr HB every x secs */ 59#define XPC_HB_DEFAULT_INTERVAL 5 /* incr HB every x secs */
60#define XPC_HB_CHECK_DEFAULT_TIMEOUT 20 /* check HB every x secs */ 60#define XPC_HB_CHECK_DEFAULT_INTERVAL 20 /* check HB every x secs */
61 61
62/* define the process name of HB checker and the CPU it is pinned to */ 62/* define the process name of HB checker and the CPU it is pinned to */
63#define XPC_HB_CHECK_THREAD_NAME "xpc_hb" 63#define XPC_HB_CHECK_THREAD_NAME "xpc_hb"
@@ -67,34 +67,82 @@
67#define XPC_DISCOVERY_THREAD_NAME "xpc_discovery" 67#define XPC_DISCOVERY_THREAD_NAME "xpc_discovery"
68 68
69 69
70#define XPC_HB_ALLOWED(_p, _v) ((_v)->heartbeating_to_mask & (1UL << (_p)))
71#define XPC_ALLOW_HB(_p, _v) (_v)->heartbeating_to_mask |= (1UL << (_p))
72#define XPC_DISALLOW_HB(_p, _v) (_v)->heartbeating_to_mask &= (~(1UL << (_p)))
73
74
75/* 70/*
76 * Reserved Page provided by SAL. 71 * the reserved page
72 *
73 * SAL reserves one page of memory per partition for XPC. Though a full page
74 * in length (16384 bytes), its starting address is not page aligned, but it
75 * is cacheline aligned. The reserved page consists of the following:
76 *
77 * reserved page header
78 *
79 * The first cacheline of the reserved page contains the header
80 * (struct xpc_rsvd_page). Before SAL initialization has completed,
81 * SAL has set up the following fields of the reserved page header:
82 * SAL_signature, SAL_version, partid, and nasids_size. The other
83 * fields are set up by XPC. (xpc_rsvd_page points to the local
84 * partition's reserved page.)
77 * 85 *
78 * SAL provides one page per partition of reserved memory. When SAL 86 * part_nasids mask
79 * initialization is complete, SAL_signature, SAL_version, partid, 87 * mach_nasids mask
80 * part_nasids, and mach_nasids are set. 88 *
89 * SAL also sets up two bitmaps (or masks), one that reflects the actual
90 * nasids in this partition (part_nasids), and the other that reflects
91 * the actual nasids in the entire machine (mach_nasids). We're only
92 * interested in the even numbered nasids (which contain the processors
93 * and/or memory), so we only need half as many bits to represent the
94 * nasids. The part_nasids mask is located starting at the first cacheline
95 * following the reserved page header. The mach_nasids mask follows right
96 * after the part_nasids mask. The size in bytes of each mask is reflected
97 * by the reserved page header field 'nasids_size'. (Local partition's
98 * mask pointers are xpc_part_nasids and xpc_mach_nasids.)
99 *
100 * vars
101 * vars part
102 *
103 * Immediately following the mach_nasids mask are the XPC variables
104 * required by other partitions. First are those that are generic to all
105 * partitions (vars), followed on the next available cacheline by those
106 * which are partition specific (vars part). These are setup by XPC.
107 * (Local partition's vars pointers are xpc_vars and xpc_vars_part.)
81 * 108 *
82 * Note: Until vars_pa is set, the partition XPC code has not been initialized. 109 * Note: Until vars_pa is set, the partition XPC code has not been initialized.
83 */ 110 */
84struct xpc_rsvd_page { 111struct xpc_rsvd_page {
85 u64 SAL_signature; /* SAL unique signature */ 112 u64 SAL_signature; /* SAL: unique signature */
86 u64 SAL_version; /* SAL specified version */ 113 u64 SAL_version; /* SAL: version */
87 u8 partid; /* partition ID from SAL */ 114 u8 partid; /* SAL: partition ID */
88 u8 version; 115 u8 version;
89 u8 pad[6]; /* pad to u64 align */ 116 u8 pad1[6]; /* align to next u64 in cacheline */
90 volatile u64 vars_pa; 117 volatile u64 vars_pa;
91 u64 part_nasids[XP_NASID_MASK_WORDS] ____cacheline_aligned; 118 struct timespec stamp; /* time when reserved page was setup by XPC */
92 u64 mach_nasids[XP_NASID_MASK_WORDS] ____cacheline_aligned; 119 u64 pad2[9]; /* align to last u64 in cacheline */
120 u64 nasids_size; /* SAL: size of each nasid mask in bytes */
93}; 121};
94#define XPC_RP_VERSION _XPC_VERSION(1,0) /* version 1.0 of the reserved page */
95 122
96#define XPC_RSVD_PAGE_ALIGNED_SIZE \ 123#define XPC_RP_VERSION _XPC_VERSION(1,1) /* version 1.1 of the reserved page */
97 (L1_CACHE_ALIGN(sizeof(struct xpc_rsvd_page))) 124
125#define XPC_SUPPORTS_RP_STAMP(_version) \
126 (_version >= _XPC_VERSION(1,1))
127
128/*
129 * compare stamps - the return value is:
130 *
131 * < 0, if stamp1 < stamp2
132 * = 0, if stamp1 == stamp2
133 * > 0, if stamp1 > stamp2
134 */
135static inline int
136xpc_compare_stamps(struct timespec *stamp1, struct timespec *stamp2)
137{
138 int ret;
139
140
141 if ((ret = stamp1->tv_sec - stamp2->tv_sec) == 0) {
142 ret = stamp1->tv_nsec - stamp2->tv_nsec;
143 }
144 return ret;
145}
98 146
99 147
100/* 148/*
@@ -115,17 +163,64 @@ struct xpc_vars {
115 u8 version; 163 u8 version;
116 u64 heartbeat; 164 u64 heartbeat;
117 u64 heartbeating_to_mask; 165 u64 heartbeating_to_mask;
118 u64 kdb_status; /* 0 = machine running */ 166 u64 heartbeat_offline; /* if 0, heartbeat should be changing */
119 int act_nasid; 167 int act_nasid;
120 int act_phys_cpuid; 168 int act_phys_cpuid;
121 u64 vars_part_pa; 169 u64 vars_part_pa;
122 u64 amos_page_pa; /* paddr of page of AMOs from MSPEC driver */ 170 u64 amos_page_pa; /* paddr of page of AMOs from MSPEC driver */
123 AMO_t *amos_page; /* vaddr of page of AMOs from MSPEC driver */ 171 AMO_t *amos_page; /* vaddr of page of AMOs from MSPEC driver */
124 AMO_t *act_amos; /* pointer to the first activation AMO */
125}; 172};
126#define XPC_V_VERSION _XPC_VERSION(3,0) /* version 3.0 of the cross vars */
127 173
128#define XPC_VARS_ALIGNED_SIZE (L1_CACHE_ALIGN(sizeof(struct xpc_vars))) 174#define XPC_V_VERSION _XPC_VERSION(3,1) /* version 3.1 of the cross vars */
175
176#define XPC_SUPPORTS_DISENGAGE_REQUEST(_version) \
177 (_version >= _XPC_VERSION(3,1))
178
179
180static inline int
181xpc_hb_allowed(partid_t partid, struct xpc_vars *vars)
182{
183 return ((vars->heartbeating_to_mask & (1UL << partid)) != 0);
184}
185
186static inline void
187xpc_allow_hb(partid_t partid, struct xpc_vars *vars)
188{
189 u64 old_mask, new_mask;
190
191 do {
192 old_mask = vars->heartbeating_to_mask;
193 new_mask = (old_mask | (1UL << partid));
194 } while (cmpxchg(&vars->heartbeating_to_mask, old_mask, new_mask) !=
195 old_mask);
196}
197
198static inline void
199xpc_disallow_hb(partid_t partid, struct xpc_vars *vars)
200{
201 u64 old_mask, new_mask;
202
203 do {
204 old_mask = vars->heartbeating_to_mask;
205 new_mask = (old_mask & ~(1UL << partid));
206 } while (cmpxchg(&vars->heartbeating_to_mask, old_mask, new_mask) !=
207 old_mask);
208}
209
210
211/*
212 * The AMOs page consists of a number of AMO variables which are divided into
213 * four groups, The first two groups are used to identify an IRQ's sender.
214 * These two groups consist of 64 and 128 AMO variables respectively. The last
215 * two groups, consisting of just one AMO variable each, are used to identify
216 * the remote partitions that are currently engaged (from the viewpoint of
217 * the XPC running on the remote partition).
218 */
219#define XPC_NOTIFY_IRQ_AMOS 0
220#define XPC_ACTIVATE_IRQ_AMOS (XPC_NOTIFY_IRQ_AMOS + XP_MAX_PARTITIONS)
221#define XPC_ENGAGED_PARTITIONS_AMO (XPC_ACTIVATE_IRQ_AMOS + XP_NASID_MASK_WORDS)
222#define XPC_DISENGAGE_REQUEST_AMO (XPC_ENGAGED_PARTITIONS_AMO + 1)
223
129 224
130/* 225/*
131 * The following structure describes the per partition specific variables. 226 * The following structure describes the per partition specific variables.
@@ -165,6 +260,16 @@ struct xpc_vars_part {
165#define XPC_VP_MAGIC2 0x0073726176435058L /* 'XPCvars\0'L (little endian) */ 260#define XPC_VP_MAGIC2 0x0073726176435058L /* 'XPCvars\0'L (little endian) */
166 261
167 262
263/* the reserved page sizes and offsets */
264
265#define XPC_RP_HEADER_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_rsvd_page))
266#define XPC_RP_VARS_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_vars))
267
268#define XPC_RP_PART_NASIDS(_rp) (u64 *) ((u8 *) _rp + XPC_RP_HEADER_SIZE)
269#define XPC_RP_MACH_NASIDS(_rp) (XPC_RP_PART_NASIDS(_rp) + xp_nasid_mask_words)
270#define XPC_RP_VARS(_rp) ((struct xpc_vars *) XPC_RP_MACH_NASIDS(_rp) + xp_nasid_mask_words)
271#define XPC_RP_VARS_PART(_rp) (struct xpc_vars_part *) ((u8 *) XPC_RP_VARS(rp) + XPC_RP_VARS_SIZE)
272
168 273
169/* 274/*
170 * Functions registered by add_timer() or called by kernel_thread() only 275 * Functions registered by add_timer() or called by kernel_thread() only
@@ -349,6 +454,9 @@ struct xpc_channel {
349 atomic_t n_on_msg_allocate_wq; /* #on msg allocation wait queue */ 454 atomic_t n_on_msg_allocate_wq; /* #on msg allocation wait queue */
350 wait_queue_head_t msg_allocate_wq; /* msg allocation wait queue */ 455 wait_queue_head_t msg_allocate_wq; /* msg allocation wait queue */
351 456
457 u8 delayed_IPI_flags; /* IPI flags received, but delayed */
458 /* action until channel disconnected */
459
352 /* queue of msg senders who want to be notified when msg received */ 460 /* queue of msg senders who want to be notified when msg received */
353 461
354 atomic_t n_to_notify; /* #of msg senders to notify */ 462 atomic_t n_to_notify; /* #of msg senders to notify */
@@ -358,7 +466,7 @@ struct xpc_channel {
358 void *key; /* pointer to user's key */ 466 void *key; /* pointer to user's key */
359 467
360 struct semaphore msg_to_pull_sema; /* next msg to pull serialization */ 468 struct semaphore msg_to_pull_sema; /* next msg to pull serialization */
361 struct semaphore teardown_sema; /* wait for teardown completion */ 469 struct semaphore wdisconnect_sema; /* wait for channel disconnect */
362 470
363 struct xpc_openclose_args *local_openclose_args; /* args passed on */ 471 struct xpc_openclose_args *local_openclose_args; /* args passed on */
364 /* opening or closing of channel */ 472 /* opening or closing of channel */
@@ -410,6 +518,8 @@ struct xpc_channel {
410 518
411#define XPC_C_DISCONNECTED 0x00002000 /* channel is disconnected */ 519#define XPC_C_DISCONNECTED 0x00002000 /* channel is disconnected */
412#define XPC_C_DISCONNECTING 0x00004000 /* channel is being disconnected */ 520#define XPC_C_DISCONNECTING 0x00004000 /* channel is being disconnected */
521#define XPC_C_DISCONNECTCALLOUT 0x00008000 /* chan disconnected callout made */
522#define XPC_C_WDISCONNECT 0x00010000 /* waiting for channel disconnect */
413 523
414 524
415 525
@@ -422,6 +532,8 @@ struct xpc_partition {
422 532
423 /* XPC HB infrastructure */ 533 /* XPC HB infrastructure */
424 534
535 u8 remote_rp_version; /* version# of partition's rsvd pg */
536 struct timespec remote_rp_stamp;/* time when rsvd pg was initialized */
425 u64 remote_rp_pa; /* phys addr of partition's rsvd pg */ 537 u64 remote_rp_pa; /* phys addr of partition's rsvd pg */
426 u64 remote_vars_pa; /* phys addr of partition's vars */ 538 u64 remote_vars_pa; /* phys addr of partition's vars */
427 u64 remote_vars_part_pa; /* phys addr of partition's vars part */ 539 u64 remote_vars_part_pa; /* phys addr of partition's vars part */
@@ -432,14 +544,18 @@ struct xpc_partition {
432 u32 act_IRQ_rcvd; /* IRQs since activation */ 544 u32 act_IRQ_rcvd; /* IRQs since activation */
433 spinlock_t act_lock; /* protect updating of act_state */ 545 spinlock_t act_lock; /* protect updating of act_state */
434 u8 act_state; /* from XPC HB viewpoint */ 546 u8 act_state; /* from XPC HB viewpoint */
547 u8 remote_vars_version; /* version# of partition's vars */
435 enum xpc_retval reason; /* reason partition is deactivating */ 548 enum xpc_retval reason; /* reason partition is deactivating */
436 int reason_line; /* line# deactivation initiated from */ 549 int reason_line; /* line# deactivation initiated from */
437 int reactivate_nasid; /* nasid in partition to reactivate */ 550 int reactivate_nasid; /* nasid in partition to reactivate */
438 551
552 unsigned long disengage_request_timeout; /* timeout in jiffies */
553 struct timer_list disengage_request_timer;
554
439 555
440 /* XPC infrastructure referencing and teardown control */ 556 /* XPC infrastructure referencing and teardown control */
441 557
442 volatile u8 setup_state; /* infrastructure setup state */ 558 volatile u8 setup_state; /* infrastructure setup state */
443 wait_queue_head_t teardown_wq; /* kthread waiting to teardown infra */ 559 wait_queue_head_t teardown_wq; /* kthread waiting to teardown infra */
444 atomic_t references; /* #of references to infrastructure */ 560 atomic_t references; /* #of references to infrastructure */
445 561
@@ -454,6 +570,7 @@ struct xpc_partition {
454 570
455 u8 nchannels; /* #of defined channels supported */ 571 u8 nchannels; /* #of defined channels supported */
456 atomic_t nchannels_active; /* #of channels that are not DISCONNECTED */ 572 atomic_t nchannels_active; /* #of channels that are not DISCONNECTED */
573 atomic_t nchannels_engaged;/* #of channels engaged with remote part */
457 struct xpc_channel *channels;/* array of channel structures */ 574 struct xpc_channel *channels;/* array of channel structures */
458 575
459 void *local_GPs_base; /* base address of kmalloc'd space */ 576 void *local_GPs_base; /* base address of kmalloc'd space */
@@ -518,6 +635,7 @@ struct xpc_partition {
518#define XPC_P_TORNDOWN 0x03 /* infrastructure is torndown */ 635#define XPC_P_TORNDOWN 0x03 /* infrastructure is torndown */
519 636
520 637
638
521/* 639/*
522 * struct xpc_partition IPI_timer #of seconds to wait before checking for 640 * struct xpc_partition IPI_timer #of seconds to wait before checking for
523 * dropped IPIs. These occur whenever an IPI amo write doesn't complete until 641 * dropped IPIs. These occur whenever an IPI amo write doesn't complete until
@@ -526,6 +644,13 @@ struct xpc_partition {
526#define XPC_P_DROPPED_IPI_WAIT (0.25 * HZ) 644#define XPC_P_DROPPED_IPI_WAIT (0.25 * HZ)
527 645
528 646
647/* number of seconds to wait for other partitions to disengage */
648#define XPC_DISENGAGE_REQUEST_DEFAULT_TIMELIMIT 90
649
650/* interval in seconds to print 'waiting disengagement' messages */
651#define XPC_DISENGAGE_PRINTMSG_INTERVAL 10
652
653
529#define XPC_PARTID(_p) ((partid_t) ((_p) - &xpc_partitions[0])) 654#define XPC_PARTID(_p) ((partid_t) ((_p) - &xpc_partitions[0]))
530 655
531 656
@@ -534,24 +659,20 @@ struct xpc_partition {
534extern struct xpc_registration xpc_registrations[]; 659extern struct xpc_registration xpc_registrations[];
535 660
536 661
537/* >>> found in xpc_main.c only */ 662/* found in xpc_main.c */
538extern struct device *xpc_part; 663extern struct device *xpc_part;
539extern struct device *xpc_chan; 664extern struct device *xpc_chan;
665extern int xpc_disengage_request_timelimit;
540extern irqreturn_t xpc_notify_IRQ_handler(int, void *, struct pt_regs *); 666extern irqreturn_t xpc_notify_IRQ_handler(int, void *, struct pt_regs *);
541extern void xpc_dropped_IPI_check(struct xpc_partition *); 667extern void xpc_dropped_IPI_check(struct xpc_partition *);
668extern void xpc_activate_partition(struct xpc_partition *);
542extern void xpc_activate_kthreads(struct xpc_channel *, int); 669extern void xpc_activate_kthreads(struct xpc_channel *, int);
543extern void xpc_create_kthreads(struct xpc_channel *, int); 670extern void xpc_create_kthreads(struct xpc_channel *, int);
544extern void xpc_disconnect_wait(int); 671extern void xpc_disconnect_wait(int);
545 672
546 673
547/* found in xpc_main.c and efi-xpc.c */
548extern void xpc_activate_partition(struct xpc_partition *);
549
550
551/* found in xpc_partition.c */ 674/* found in xpc_partition.c */
552extern int xpc_exiting; 675extern int xpc_exiting;
553extern int xpc_hb_interval;
554extern int xpc_hb_check_interval;
555extern struct xpc_vars *xpc_vars; 676extern struct xpc_vars *xpc_vars;
556extern struct xpc_rsvd_page *xpc_rsvd_page; 677extern struct xpc_rsvd_page *xpc_rsvd_page;
557extern struct xpc_vars_part *xpc_vars_part; 678extern struct xpc_vars_part *xpc_vars_part;
@@ -561,6 +682,7 @@ extern struct xpc_rsvd_page *xpc_rsvd_page_init(void);
561extern void xpc_allow_IPI_ops(void); 682extern void xpc_allow_IPI_ops(void);
562extern void xpc_restrict_IPI_ops(void); 683extern void xpc_restrict_IPI_ops(void);
563extern int xpc_identify_act_IRQ_sender(void); 684extern int xpc_identify_act_IRQ_sender(void);
685extern int xpc_partition_disengaged(struct xpc_partition *);
564extern enum xpc_retval xpc_mark_partition_active(struct xpc_partition *); 686extern enum xpc_retval xpc_mark_partition_active(struct xpc_partition *);
565extern void xpc_mark_partition_inactive(struct xpc_partition *); 687extern void xpc_mark_partition_inactive(struct xpc_partition *);
566extern void xpc_discovery(void); 688extern void xpc_discovery(void);
@@ -585,8 +707,8 @@ extern void xpc_connected_callout(struct xpc_channel *);
585extern void xpc_deliver_msg(struct xpc_channel *); 707extern void xpc_deliver_msg(struct xpc_channel *);
586extern void xpc_disconnect_channel(const int, struct xpc_channel *, 708extern void xpc_disconnect_channel(const int, struct xpc_channel *,
587 enum xpc_retval, unsigned long *); 709 enum xpc_retval, unsigned long *);
588extern void xpc_disconnected_callout(struct xpc_channel *); 710extern void xpc_disconnecting_callout(struct xpc_channel *);
589extern void xpc_partition_down(struct xpc_partition *, enum xpc_retval); 711extern void xpc_partition_going_down(struct xpc_partition *, enum xpc_retval);
590extern void xpc_teardown_infrastructure(struct xpc_partition *); 712extern void xpc_teardown_infrastructure(struct xpc_partition *);
591 713
592 714
@@ -674,6 +796,157 @@ xpc_part_ref(struct xpc_partition *part)
674 796
675 797
676/* 798/*
799 * This next set of inlines are used to keep track of when a partition is
800 * potentially engaged in accessing memory belonging to another partition.
801 */
802
803static inline void
804xpc_mark_partition_engaged(struct xpc_partition *part)
805{
806 unsigned long irq_flags;
807 AMO_t *amo = (AMO_t *) __va(part->remote_amos_page_pa +
808 (XPC_ENGAGED_PARTITIONS_AMO * sizeof(AMO_t)));
809
810
811 local_irq_save(irq_flags);
812
813 /* set bit corresponding to our partid in remote partition's AMO */
814 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_OR,
815 (1UL << sn_partition_id));
816 /*
817 * We must always use the nofault function regardless of whether we
818 * are on a Shub 1.1 system or a Shub 1.2 slice 0xc processor. If we
819 * didn't, we'd never know that the other partition is down and would
820 * keep sending IPIs and AMOs to it until the heartbeat times out.
821 */
822 (void) xp_nofault_PIOR((u64 *) GLOBAL_MMR_ADDR(NASID_GET(&amo->
823 variable), xp_nofault_PIOR_target));
824
825 local_irq_restore(irq_flags);
826}
827
828static inline void
829xpc_mark_partition_disengaged(struct xpc_partition *part)
830{
831 unsigned long irq_flags;
832 AMO_t *amo = (AMO_t *) __va(part->remote_amos_page_pa +
833 (XPC_ENGAGED_PARTITIONS_AMO * sizeof(AMO_t)));
834
835
836 local_irq_save(irq_flags);
837
838 /* clear bit corresponding to our partid in remote partition's AMO */
839 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_AND,
840 ~(1UL << sn_partition_id));
841 /*
842 * We must always use the nofault function regardless of whether we
843 * are on a Shub 1.1 system or a Shub 1.2 slice 0xc processor. If we
844 * didn't, we'd never know that the other partition is down and would
845 * keep sending IPIs and AMOs to it until the heartbeat times out.
846 */
847 (void) xp_nofault_PIOR((u64 *) GLOBAL_MMR_ADDR(NASID_GET(&amo->
848 variable), xp_nofault_PIOR_target));
849
850 local_irq_restore(irq_flags);
851}
852
853static inline void
854xpc_request_partition_disengage(struct xpc_partition *part)
855{
856 unsigned long irq_flags;
857 AMO_t *amo = (AMO_t *) __va(part->remote_amos_page_pa +
858 (XPC_DISENGAGE_REQUEST_AMO * sizeof(AMO_t)));
859
860
861 local_irq_save(irq_flags);
862
863 /* set bit corresponding to our partid in remote partition's AMO */
864 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_OR,
865 (1UL << sn_partition_id));
866 /*
867 * We must always use the nofault function regardless of whether we
868 * are on a Shub 1.1 system or a Shub 1.2 slice 0xc processor. If we
869 * didn't, we'd never know that the other partition is down and would
870 * keep sending IPIs and AMOs to it until the heartbeat times out.
871 */
872 (void) xp_nofault_PIOR((u64 *) GLOBAL_MMR_ADDR(NASID_GET(&amo->
873 variable), xp_nofault_PIOR_target));
874
875 local_irq_restore(irq_flags);
876}
877
878static inline void
879xpc_cancel_partition_disengage_request(struct xpc_partition *part)
880{
881 unsigned long irq_flags;
882 AMO_t *amo = (AMO_t *) __va(part->remote_amos_page_pa +
883 (XPC_DISENGAGE_REQUEST_AMO * sizeof(AMO_t)));
884
885
886 local_irq_save(irq_flags);
887
888 /* clear bit corresponding to our partid in remote partition's AMO */
889 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_AND,
890 ~(1UL << sn_partition_id));
891 /*
892 * We must always use the nofault function regardless of whether we
893 * are on a Shub 1.1 system or a Shub 1.2 slice 0xc processor. If we
894 * didn't, we'd never know that the other partition is down and would
895 * keep sending IPIs and AMOs to it until the heartbeat times out.
896 */
897 (void) xp_nofault_PIOR((u64 *) GLOBAL_MMR_ADDR(NASID_GET(&amo->
898 variable), xp_nofault_PIOR_target));
899
900 local_irq_restore(irq_flags);
901}
902
903static inline u64
904xpc_partition_engaged(u64 partid_mask)
905{
906 AMO_t *amo = xpc_vars->amos_page + XPC_ENGAGED_PARTITIONS_AMO;
907
908
909 /* return our partition's AMO variable ANDed with partid_mask */
910 return (FETCHOP_LOAD_OP(TO_AMO((u64) &amo->variable), FETCHOP_LOAD) &
911 partid_mask);
912}
913
914static inline u64
915xpc_partition_disengage_requested(u64 partid_mask)
916{
917 AMO_t *amo = xpc_vars->amos_page + XPC_DISENGAGE_REQUEST_AMO;
918
919
920 /* return our partition's AMO variable ANDed with partid_mask */
921 return (FETCHOP_LOAD_OP(TO_AMO((u64) &amo->variable), FETCHOP_LOAD) &
922 partid_mask);
923}
924
925static inline void
926xpc_clear_partition_engaged(u64 partid_mask)
927{
928 AMO_t *amo = xpc_vars->amos_page + XPC_ENGAGED_PARTITIONS_AMO;
929
930
931 /* clear bit(s) based on partid_mask in our partition's AMO */
932 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_AND,
933 ~partid_mask);
934}
935
936static inline void
937xpc_clear_partition_disengage_request(u64 partid_mask)
938{
939 AMO_t *amo = xpc_vars->amos_page + XPC_DISENGAGE_REQUEST_AMO;
940
941
942 /* clear bit(s) based on partid_mask in our partition's AMO */
943 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_AND,
944 ~partid_mask);
945}
946
947
948
949/*
677 * The following set of macros and inlines are used for the sending and 950 * The following set of macros and inlines are used for the sending and
678 * receiving of IPIs (also known as IRQs). There are two flavors of IPIs, 951 * receiving of IPIs (also known as IRQs). There are two flavors of IPIs,
679 * one that is associated with partition activity (SGI_XPC_ACTIVATE) and 952 * one that is associated with partition activity (SGI_XPC_ACTIVATE) and
@@ -722,13 +995,13 @@ xpc_IPI_send(AMO_t *amo, u64 flag, int nasid, int phys_cpuid, int vector)
722 * Flag the appropriate AMO variable and send an IPI to the specified node. 995 * Flag the appropriate AMO variable and send an IPI to the specified node.
723 */ 996 */
724static inline void 997static inline void
725xpc_activate_IRQ_send(u64 amos_page, int from_nasid, int to_nasid, 998xpc_activate_IRQ_send(u64 amos_page_pa, int from_nasid, int to_nasid,
726 int to_phys_cpuid) 999 int to_phys_cpuid)
727{ 1000{
728 int w_index = XPC_NASID_W_INDEX(from_nasid); 1001 int w_index = XPC_NASID_W_INDEX(from_nasid);
729 int b_index = XPC_NASID_B_INDEX(from_nasid); 1002 int b_index = XPC_NASID_B_INDEX(from_nasid);
730 AMO_t *amos = (AMO_t *) __va(amos_page + 1003 AMO_t *amos = (AMO_t *) __va(amos_page_pa +
731 (XP_MAX_PARTITIONS * sizeof(AMO_t))); 1004 (XPC_ACTIVATE_IRQ_AMOS * sizeof(AMO_t)));
732 1005
733 1006
734 (void) xpc_IPI_send(&amos[w_index], (1UL << b_index), to_nasid, 1007 (void) xpc_IPI_send(&amos[w_index], (1UL << b_index), to_nasid,
@@ -756,6 +1029,13 @@ xpc_IPI_send_reactivate(struct xpc_partition *part)
756 xpc_vars->act_nasid, xpc_vars->act_phys_cpuid); 1029 xpc_vars->act_nasid, xpc_vars->act_phys_cpuid);
757} 1030}
758 1031
1032static inline void
1033xpc_IPI_send_disengage(struct xpc_partition *part)
1034{
1035 xpc_activate_IRQ_send(part->remote_amos_page_pa, cnodeid_to_nasid(0),
1036 part->remote_act_nasid, part->remote_act_phys_cpuid);
1037}
1038
759 1039
760/* 1040/*
761 * IPIs associated with SGI_XPC_NOTIFY IRQ. 1041 * IPIs associated with SGI_XPC_NOTIFY IRQ.
@@ -836,6 +1116,7 @@ xpc_notify_IRQ_send_local(struct xpc_channel *ch, u8 ipi_flag,
836 1116
837/* given an AMO variable and a channel#, get its associated IPI flags */ 1117/* given an AMO variable and a channel#, get its associated IPI flags */
838#define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff)) 1118#define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff))
1119#define XPC_SET_IPI_FLAGS(_amo, _c, _f) (_amo) |= ((u64) (_f) << ((_c) * 8))
839 1120
840#define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & 0x0f0f0f0f0f0f0f0f) 1121#define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & 0x0f0f0f0f0f0f0f0f)
841#define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & 0x1010101010101010) 1122#define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & 0x1010101010101010)
@@ -903,17 +1184,18 @@ xpc_IPI_send_local_msgrequest(struct xpc_channel *ch)
903 * cacheable mapping for the entire region. This will prevent speculative 1184 * cacheable mapping for the entire region. This will prevent speculative
904 * reading of cached copies of our lines from being issued which will cause 1185 * reading of cached copies of our lines from being issued which will cause
905 * a PI FSB Protocol error to be generated by the SHUB. For XPC, we need 64 1186 * a PI FSB Protocol error to be generated by the SHUB. For XPC, we need 64
906 * (XP_MAX_PARTITIONS) AMO variables for message notification (xpc_main.c) 1187 * AMO variables (based on XP_MAX_PARTITIONS) for message notification and an
907 * and an additional 16 AMO variables for partition activation (xpc_hb.c). 1188 * additional 128 AMO variables (based on XP_NASID_MASK_WORDS) for partition
1189 * activation and 2 AMO variables for partition deactivation.
908 */ 1190 */
909static inline AMO_t * 1191static inline AMO_t *
910xpc_IPI_init(partid_t partid) 1192xpc_IPI_init(int index)
911{ 1193{
912 AMO_t *part_amo = xpc_vars->amos_page + partid; 1194 AMO_t *amo = xpc_vars->amos_page + index;
913 1195
914 1196
915 xpc_IPI_receive(part_amo); 1197 (void) xpc_IPI_receive(amo); /* clear AMO variable */
916 return part_amo; 1198 return amo;
917} 1199}
918 1200
919 1201
@@ -939,7 +1221,7 @@ xpc_map_bte_errors(bte_result_t error)
939 1221
940 1222
941static inline void * 1223static inline void *
942xpc_kmalloc_cacheline_aligned(size_t size, int flags, void **base) 1224xpc_kmalloc_cacheline_aligned(size_t size, gfp_t flags, void **base)
943{ 1225{
944 /* see if kmalloc will give us cachline aligned memory by default */ 1226 /* see if kmalloc will give us cachline aligned memory by default */
945 *base = kmalloc(size, flags); 1227 *base = kmalloc(size, flags);
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c
index 94698bea7be0..abf4fc2a87bb 100644
--- a/arch/ia64/sn/kernel/xpc_channel.c
+++ b/arch/ia64/sn/kernel/xpc_channel.c
@@ -57,6 +57,7 @@ xpc_initialize_channels(struct xpc_partition *part, partid_t partid)
57 57
58 spin_lock_init(&ch->lock); 58 spin_lock_init(&ch->lock);
59 sema_init(&ch->msg_to_pull_sema, 1); /* mutex */ 59 sema_init(&ch->msg_to_pull_sema, 1); /* mutex */
60 sema_init(&ch->wdisconnect_sema, 0); /* event wait */
60 61
61 atomic_set(&ch->n_on_msg_allocate_wq, 0); 62 atomic_set(&ch->n_on_msg_allocate_wq, 0);
62 init_waitqueue_head(&ch->msg_allocate_wq); 63 init_waitqueue_head(&ch->msg_allocate_wq);
@@ -166,6 +167,7 @@ xpc_setup_infrastructure(struct xpc_partition *part)
166 xpc_initialize_channels(part, partid); 167 xpc_initialize_channels(part, partid);
167 168
168 atomic_set(&part->nchannels_active, 0); 169 atomic_set(&part->nchannels_active, 0);
170 atomic_set(&part->nchannels_engaged, 0);
169 171
170 172
171 /* local_IPI_amo were set to 0 by an earlier memset() */ 173 /* local_IPI_amo were set to 0 by an earlier memset() */
@@ -555,8 +557,6 @@ xpc_allocate_msgqueues(struct xpc_channel *ch)
555 sema_init(&ch->notify_queue[i].sema, 0); 557 sema_init(&ch->notify_queue[i].sema, 0);
556 } 558 }
557 559
558 sema_init(&ch->teardown_sema, 0); /* event wait */
559
560 spin_lock_irqsave(&ch->lock, irq_flags); 560 spin_lock_irqsave(&ch->lock, irq_flags);
561 ch->flags |= XPC_C_SETUP; 561 ch->flags |= XPC_C_SETUP;
562 spin_unlock_irqrestore(&ch->lock, irq_flags); 562 spin_unlock_irqrestore(&ch->lock, irq_flags);
@@ -626,6 +626,55 @@ xpc_process_connect(struct xpc_channel *ch, unsigned long *irq_flags)
626 626
627 627
628/* 628/*
629 * Notify those who wanted to be notified upon delivery of their message.
630 */
631static void
632xpc_notify_senders(struct xpc_channel *ch, enum xpc_retval reason, s64 put)
633{
634 struct xpc_notify *notify;
635 u8 notify_type;
636 s64 get = ch->w_remote_GP.get - 1;
637
638
639 while (++get < put && atomic_read(&ch->n_to_notify) > 0) {
640
641 notify = &ch->notify_queue[get % ch->local_nentries];
642
643 /*
644 * See if the notify entry indicates it was associated with
645 * a message who's sender wants to be notified. It is possible
646 * that it is, but someone else is doing or has done the
647 * notification.
648 */
649 notify_type = notify->type;
650 if (notify_type == 0 ||
651 cmpxchg(&notify->type, notify_type, 0) !=
652 notify_type) {
653 continue;
654 }
655
656 DBUG_ON(notify_type != XPC_N_CALL);
657
658 atomic_dec(&ch->n_to_notify);
659
660 if (notify->func != NULL) {
661 dev_dbg(xpc_chan, "notify->func() called, notify=0x%p, "
662 "msg_number=%ld, partid=%d, channel=%d\n",
663 (void *) notify, get, ch->partid, ch->number);
664
665 notify->func(reason, ch->partid, ch->number,
666 notify->key);
667
668 dev_dbg(xpc_chan, "notify->func() returned, "
669 "notify=0x%p, msg_number=%ld, partid=%d, "
670 "channel=%d\n", (void *) notify, get,
671 ch->partid, ch->number);
672 }
673 }
674}
675
676
677/*
629 * Free up message queues and other stuff that were allocated for the specified 678 * Free up message queues and other stuff that were allocated for the specified
630 * channel. 679 * channel.
631 * 680 *
@@ -669,9 +718,6 @@ xpc_free_msgqueues(struct xpc_channel *ch)
669 ch->remote_msgqueue = NULL; 718 ch->remote_msgqueue = NULL;
670 kfree(ch->notify_queue); 719 kfree(ch->notify_queue);
671 ch->notify_queue = NULL; 720 ch->notify_queue = NULL;
672
673 /* in case someone is waiting for the teardown to complete */
674 up(&ch->teardown_sema);
675 } 721 }
676} 722}
677 723
@@ -683,7 +729,7 @@ static void
683xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags) 729xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags)
684{ 730{
685 struct xpc_partition *part = &xpc_partitions[ch->partid]; 731 struct xpc_partition *part = &xpc_partitions[ch->partid];
686 u32 ch_flags = ch->flags; 732 u32 channel_was_connected = (ch->flags & XPC_C_WASCONNECTED);
687 733
688 734
689 DBUG_ON(!spin_is_locked(&ch->lock)); 735 DBUG_ON(!spin_is_locked(&ch->lock));
@@ -701,12 +747,13 @@ xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags)
701 } 747 }
702 DBUG_ON(atomic_read(&ch->kthreads_assigned) != 0); 748 DBUG_ON(atomic_read(&ch->kthreads_assigned) != 0);
703 749
704 /* it's now safe to free the channel's message queues */ 750 if (part->act_state == XPC_P_DEACTIVATING) {
705 751 /* can't proceed until the other side disengages from us */
706 xpc_free_msgqueues(ch); 752 if (xpc_partition_engaged(1UL << ch->partid)) {
707 DBUG_ON(ch->flags & XPC_C_SETUP); 753 return;
754 }
708 755
709 if (part->act_state != XPC_P_DEACTIVATING) { 756 } else {
710 757
711 /* as long as the other side is up do the full protocol */ 758 /* as long as the other side is up do the full protocol */
712 759
@@ -724,16 +771,42 @@ xpc_process_disconnect(struct xpc_channel *ch, unsigned long *irq_flags)
724 } 771 }
725 } 772 }
726 773
774 /* wake those waiting for notify completion */
775 if (atomic_read(&ch->n_to_notify) > 0) {
776 /* >>> we do callout while holding ch->lock */
777 xpc_notify_senders(ch, ch->reason, ch->w_local_GP.put);
778 }
779
727 /* both sides are disconnected now */ 780 /* both sides are disconnected now */
728 781
729 ch->flags = XPC_C_DISCONNECTED; /* clear all flags, but this one */ 782 /* it's now safe to free the channel's message queues */
783 xpc_free_msgqueues(ch);
784
785 /* mark disconnected, clear all other flags except XPC_C_WDISCONNECT */
786 ch->flags = (XPC_C_DISCONNECTED | (ch->flags & XPC_C_WDISCONNECT));
730 787
731 atomic_dec(&part->nchannels_active); 788 atomic_dec(&part->nchannels_active);
732 789
733 if (ch_flags & XPC_C_WASCONNECTED) { 790 if (channel_was_connected) {
734 dev_info(xpc_chan, "channel %d to partition %d disconnected, " 791 dev_info(xpc_chan, "channel %d to partition %d disconnected, "
735 "reason=%d\n", ch->number, ch->partid, ch->reason); 792 "reason=%d\n", ch->number, ch->partid, ch->reason);
736 } 793 }
794
795 if (ch->flags & XPC_C_WDISCONNECT) {
796 spin_unlock_irqrestore(&ch->lock, *irq_flags);
797 up(&ch->wdisconnect_sema);
798 spin_lock_irqsave(&ch->lock, *irq_flags);
799
800 } else if (ch->delayed_IPI_flags) {
801 if (part->act_state != XPC_P_DEACTIVATING) {
802 /* time to take action on any delayed IPI flags */
803 spin_lock(&part->IPI_lock);
804 XPC_SET_IPI_FLAGS(part->local_IPI_amo, ch->number,
805 ch->delayed_IPI_flags);
806 spin_unlock(&part->IPI_lock);
807 }
808 ch->delayed_IPI_flags = 0;
809 }
737} 810}
738 811
739 812
@@ -754,6 +827,19 @@ xpc_process_openclose_IPI(struct xpc_partition *part, int ch_number,
754 827
755 spin_lock_irqsave(&ch->lock, irq_flags); 828 spin_lock_irqsave(&ch->lock, irq_flags);
756 829
830again:
831
832 if ((ch->flags & XPC_C_DISCONNECTED) &&
833 (ch->flags & XPC_C_WDISCONNECT)) {
834 /*
835 * Delay processing IPI flags until thread waiting disconnect
836 * has had a chance to see that the channel is disconnected.
837 */
838 ch->delayed_IPI_flags |= IPI_flags;
839 spin_unlock_irqrestore(&ch->lock, irq_flags);
840 return;
841 }
842
757 843
758 if (IPI_flags & XPC_IPI_CLOSEREQUEST) { 844 if (IPI_flags & XPC_IPI_CLOSEREQUEST) {
759 845
@@ -764,7 +850,7 @@ xpc_process_openclose_IPI(struct xpc_partition *part, int ch_number,
764 /* 850 /*
765 * If RCLOSEREQUEST is set, we're probably waiting for 851 * If RCLOSEREQUEST is set, we're probably waiting for
766 * RCLOSEREPLY. We should find it and a ROPENREQUEST packed 852 * RCLOSEREPLY. We should find it and a ROPENREQUEST packed
767 * with this RCLOSEQREUQEST in the IPI_flags. 853 * with this RCLOSEREQUEST in the IPI_flags.
768 */ 854 */
769 855
770 if (ch->flags & XPC_C_RCLOSEREQUEST) { 856 if (ch->flags & XPC_C_RCLOSEREQUEST) {
@@ -779,14 +865,22 @@ xpc_process_openclose_IPI(struct xpc_partition *part, int ch_number,
779 865
780 /* both sides have finished disconnecting */ 866 /* both sides have finished disconnecting */
781 xpc_process_disconnect(ch, &irq_flags); 867 xpc_process_disconnect(ch, &irq_flags);
868 DBUG_ON(!(ch->flags & XPC_C_DISCONNECTED));
869 goto again;
782 } 870 }
783 871
784 if (ch->flags & XPC_C_DISCONNECTED) { 872 if (ch->flags & XPC_C_DISCONNECTED) {
785 // >>> explain this section
786
787 if (!(IPI_flags & XPC_IPI_OPENREQUEST)) { 873 if (!(IPI_flags & XPC_IPI_OPENREQUEST)) {
788 DBUG_ON(part->act_state != 874 if ((XPC_GET_IPI_FLAGS(part->local_IPI_amo,
789 XPC_P_DEACTIVATING); 875 ch_number) & XPC_IPI_OPENREQUEST)) {
876
877 DBUG_ON(ch->delayed_IPI_flags != 0);
878 spin_lock(&part->IPI_lock);
879 XPC_SET_IPI_FLAGS(part->local_IPI_amo,
880 ch_number,
881 XPC_IPI_CLOSEREQUEST);
882 spin_unlock(&part->IPI_lock);
883 }
790 spin_unlock_irqrestore(&ch->lock, irq_flags); 884 spin_unlock_irqrestore(&ch->lock, irq_flags);
791 return; 885 return;
792 } 886 }
@@ -816,9 +910,13 @@ xpc_process_openclose_IPI(struct xpc_partition *part, int ch_number,
816 } 910 }
817 911
818 XPC_DISCONNECT_CHANNEL(ch, reason, &irq_flags); 912 XPC_DISCONNECT_CHANNEL(ch, reason, &irq_flags);
819 } else { 913
820 xpc_process_disconnect(ch, &irq_flags); 914 DBUG_ON(IPI_flags & XPC_IPI_CLOSEREPLY);
915 spin_unlock_irqrestore(&ch->lock, irq_flags);
916 return;
821 } 917 }
918
919 xpc_process_disconnect(ch, &irq_flags);
822 } 920 }
823 921
824 922
@@ -834,7 +932,20 @@ xpc_process_openclose_IPI(struct xpc_partition *part, int ch_number,
834 } 932 }
835 933
836 DBUG_ON(!(ch->flags & XPC_C_CLOSEREQUEST)); 934 DBUG_ON(!(ch->flags & XPC_C_CLOSEREQUEST));
837 DBUG_ON(!(ch->flags & XPC_C_RCLOSEREQUEST)); 935
936 if (!(ch->flags & XPC_C_RCLOSEREQUEST)) {
937 if ((XPC_GET_IPI_FLAGS(part->local_IPI_amo, ch_number)
938 & XPC_IPI_CLOSEREQUEST)) {
939
940 DBUG_ON(ch->delayed_IPI_flags != 0);
941 spin_lock(&part->IPI_lock);
942 XPC_SET_IPI_FLAGS(part->local_IPI_amo,
943 ch_number, XPC_IPI_CLOSEREPLY);
944 spin_unlock(&part->IPI_lock);
945 }
946 spin_unlock_irqrestore(&ch->lock, irq_flags);
947 return;
948 }
838 949
839 ch->flags |= XPC_C_RCLOSEREPLY; 950 ch->flags |= XPC_C_RCLOSEREPLY;
840 951
@@ -852,8 +963,14 @@ xpc_process_openclose_IPI(struct xpc_partition *part, int ch_number,
852 "channel=%d\n", args->msg_size, args->local_nentries, 963 "channel=%d\n", args->msg_size, args->local_nentries,
853 ch->partid, ch->number); 964 ch->partid, ch->number);
854 965
855 if ((ch->flags & XPC_C_DISCONNECTING) || 966 if (part->act_state == XPC_P_DEACTIVATING ||
856 part->act_state == XPC_P_DEACTIVATING) { 967 (ch->flags & XPC_C_ROPENREQUEST)) {
968 spin_unlock_irqrestore(&ch->lock, irq_flags);
969 return;
970 }
971
972 if (ch->flags & (XPC_C_DISCONNECTING | XPC_C_WDISCONNECT)) {
973 ch->delayed_IPI_flags |= XPC_IPI_OPENREQUEST;
857 spin_unlock_irqrestore(&ch->lock, irq_flags); 974 spin_unlock_irqrestore(&ch->lock, irq_flags);
858 return; 975 return;
859 } 976 }
@@ -867,8 +984,11 @@ xpc_process_openclose_IPI(struct xpc_partition *part, int ch_number,
867 * msg_size = size of channel's messages in bytes 984 * msg_size = size of channel's messages in bytes
868 * local_nentries = remote partition's local_nentries 985 * local_nentries = remote partition's local_nentries
869 */ 986 */
870 DBUG_ON(args->msg_size == 0); 987 if (args->msg_size == 0 || args->local_nentries == 0) {
871 DBUG_ON(args->local_nentries == 0); 988 /* assume OPENREQUEST was delayed by mistake */
989 spin_unlock_irqrestore(&ch->lock, irq_flags);
990 return;
991 }
872 992
873 ch->flags |= (XPC_C_ROPENREQUEST | XPC_C_CONNECTING); 993 ch->flags |= (XPC_C_ROPENREQUEST | XPC_C_CONNECTING);
874 ch->remote_nentries = args->local_nentries; 994 ch->remote_nentries = args->local_nentries;
@@ -906,7 +1026,13 @@ xpc_process_openclose_IPI(struct xpc_partition *part, int ch_number,
906 spin_unlock_irqrestore(&ch->lock, irq_flags); 1026 spin_unlock_irqrestore(&ch->lock, irq_flags);
907 return; 1027 return;
908 } 1028 }
909 DBUG_ON(!(ch->flags & XPC_C_OPENREQUEST)); 1029 if (!(ch->flags & XPC_C_OPENREQUEST)) {
1030 XPC_DISCONNECT_CHANNEL(ch, xpcOpenCloseError,
1031 &irq_flags);
1032 spin_unlock_irqrestore(&ch->lock, irq_flags);
1033 return;
1034 }
1035
910 DBUG_ON(!(ch->flags & XPC_C_ROPENREQUEST)); 1036 DBUG_ON(!(ch->flags & XPC_C_ROPENREQUEST));
911 DBUG_ON(ch->flags & XPC_C_CONNECTED); 1037 DBUG_ON(ch->flags & XPC_C_CONNECTED);
912 1038
@@ -960,8 +1086,8 @@ xpc_connect_channel(struct xpc_channel *ch)
960 struct xpc_registration *registration = &xpc_registrations[ch->number]; 1086 struct xpc_registration *registration = &xpc_registrations[ch->number];
961 1087
962 1088
963 if (down_interruptible(&registration->sema) != 0) { 1089 if (down_trylock(&registration->sema) != 0) {
964 return xpcInterrupted; 1090 return xpcRetry;
965 } 1091 }
966 1092
967 if (!XPC_CHANNEL_REGISTERED(ch->number)) { 1093 if (!XPC_CHANNEL_REGISTERED(ch->number)) {
@@ -1040,55 +1166,6 @@ xpc_connect_channel(struct xpc_channel *ch)
1040 1166
1041 1167
1042/* 1168/*
1043 * Notify those who wanted to be notified upon delivery of their message.
1044 */
1045static void
1046xpc_notify_senders(struct xpc_channel *ch, enum xpc_retval reason, s64 put)
1047{
1048 struct xpc_notify *notify;
1049 u8 notify_type;
1050 s64 get = ch->w_remote_GP.get - 1;
1051
1052
1053 while (++get < put && atomic_read(&ch->n_to_notify) > 0) {
1054
1055 notify = &ch->notify_queue[get % ch->local_nentries];
1056
1057 /*
1058 * See if the notify entry indicates it was associated with
1059 * a message who's sender wants to be notified. It is possible
1060 * that it is, but someone else is doing or has done the
1061 * notification.
1062 */
1063 notify_type = notify->type;
1064 if (notify_type == 0 ||
1065 cmpxchg(&notify->type, notify_type, 0) !=
1066 notify_type) {
1067 continue;
1068 }
1069
1070 DBUG_ON(notify_type != XPC_N_CALL);
1071
1072 atomic_dec(&ch->n_to_notify);
1073
1074 if (notify->func != NULL) {
1075 dev_dbg(xpc_chan, "notify->func() called, notify=0x%p, "
1076 "msg_number=%ld, partid=%d, channel=%d\n",
1077 (void *) notify, get, ch->partid, ch->number);
1078
1079 notify->func(reason, ch->partid, ch->number,
1080 notify->key);
1081
1082 dev_dbg(xpc_chan, "notify->func() returned, "
1083 "notify=0x%p, msg_number=%ld, partid=%d, "
1084 "channel=%d\n", (void *) notify, get,
1085 ch->partid, ch->number);
1086 }
1087 }
1088}
1089
1090
1091/*
1092 * Clear some of the msg flags in the local message queue. 1169 * Clear some of the msg flags in the local message queue.
1093 */ 1170 */
1094static inline void 1171static inline void
@@ -1240,6 +1317,7 @@ xpc_process_channel_activity(struct xpc_partition *part)
1240 u64 IPI_amo, IPI_flags; 1317 u64 IPI_amo, IPI_flags;
1241 struct xpc_channel *ch; 1318 struct xpc_channel *ch;
1242 int ch_number; 1319 int ch_number;
1320 u32 ch_flags;
1243 1321
1244 1322
1245 IPI_amo = xpc_get_IPI_flags(part); 1323 IPI_amo = xpc_get_IPI_flags(part);
@@ -1266,8 +1344,9 @@ xpc_process_channel_activity(struct xpc_partition *part)
1266 xpc_process_openclose_IPI(part, ch_number, IPI_flags); 1344 xpc_process_openclose_IPI(part, ch_number, IPI_flags);
1267 } 1345 }
1268 1346
1347 ch_flags = ch->flags; /* need an atomic snapshot of flags */
1269 1348
1270 if (ch->flags & XPC_C_DISCONNECTING) { 1349 if (ch_flags & XPC_C_DISCONNECTING) {
1271 spin_lock_irqsave(&ch->lock, irq_flags); 1350 spin_lock_irqsave(&ch->lock, irq_flags);
1272 xpc_process_disconnect(ch, &irq_flags); 1351 xpc_process_disconnect(ch, &irq_flags);
1273 spin_unlock_irqrestore(&ch->lock, irq_flags); 1352 spin_unlock_irqrestore(&ch->lock, irq_flags);
@@ -1278,9 +1357,9 @@ xpc_process_channel_activity(struct xpc_partition *part)
1278 continue; 1357 continue;
1279 } 1358 }
1280 1359
1281 if (!(ch->flags & XPC_C_CONNECTED)) { 1360 if (!(ch_flags & XPC_C_CONNECTED)) {
1282 if (!(ch->flags & XPC_C_OPENREQUEST)) { 1361 if (!(ch_flags & XPC_C_OPENREQUEST)) {
1283 DBUG_ON(ch->flags & XPC_C_SETUP); 1362 DBUG_ON(ch_flags & XPC_C_SETUP);
1284 (void) xpc_connect_channel(ch); 1363 (void) xpc_connect_channel(ch);
1285 } else { 1364 } else {
1286 spin_lock_irqsave(&ch->lock, irq_flags); 1365 spin_lock_irqsave(&ch->lock, irq_flags);
@@ -1305,8 +1384,8 @@ xpc_process_channel_activity(struct xpc_partition *part)
1305 1384
1306 1385
1307/* 1386/*
1308 * XPC's heartbeat code calls this function to inform XPC that a partition has 1387 * XPC's heartbeat code calls this function to inform XPC that a partition is
1309 * gone down. XPC responds by tearing down the XPartition Communication 1388 * going down. XPC responds by tearing down the XPartition Communication
1310 * infrastructure used for the just downed partition. 1389 * infrastructure used for the just downed partition.
1311 * 1390 *
1312 * XPC's heartbeat code will never call this function and xpc_partition_up() 1391 * XPC's heartbeat code will never call this function and xpc_partition_up()
@@ -1314,7 +1393,7 @@ xpc_process_channel_activity(struct xpc_partition *part)
1314 * at the same time. 1393 * at the same time.
1315 */ 1394 */
1316void 1395void
1317xpc_partition_down(struct xpc_partition *part, enum xpc_retval reason) 1396xpc_partition_going_down(struct xpc_partition *part, enum xpc_retval reason)
1318{ 1397{
1319 unsigned long irq_flags; 1398 unsigned long irq_flags;
1320 int ch_number; 1399 int ch_number;
@@ -1330,12 +1409,11 @@ xpc_partition_down(struct xpc_partition *part, enum xpc_retval reason)
1330 } 1409 }
1331 1410
1332 1411
1333 /* disconnect all channels associated with the downed partition */ 1412 /* disconnect channels associated with the partition going down */
1334 1413
1335 for (ch_number = 0; ch_number < part->nchannels; ch_number++) { 1414 for (ch_number = 0; ch_number < part->nchannels; ch_number++) {
1336 ch = &part->channels[ch_number]; 1415 ch = &part->channels[ch_number];
1337 1416
1338
1339 xpc_msgqueue_ref(ch); 1417 xpc_msgqueue_ref(ch);
1340 spin_lock_irqsave(&ch->lock, irq_flags); 1418 spin_lock_irqsave(&ch->lock, irq_flags);
1341 1419
@@ -1370,6 +1448,7 @@ xpc_teardown_infrastructure(struct xpc_partition *part)
1370 * this partition. 1448 * this partition.
1371 */ 1449 */
1372 1450
1451 DBUG_ON(atomic_read(&part->nchannels_engaged) != 0);
1373 DBUG_ON(atomic_read(&part->nchannels_active) != 0); 1452 DBUG_ON(atomic_read(&part->nchannels_active) != 0);
1374 DBUG_ON(part->setup_state != XPC_P_SETUP); 1453 DBUG_ON(part->setup_state != XPC_P_SETUP);
1375 part->setup_state = XPC_P_WTEARDOWN; 1454 part->setup_state = XPC_P_WTEARDOWN;
@@ -1428,19 +1507,11 @@ xpc_initiate_connect(int ch_number)
1428 if (xpc_part_ref(part)) { 1507 if (xpc_part_ref(part)) {
1429 ch = &part->channels[ch_number]; 1508 ch = &part->channels[ch_number];
1430 1509
1431 if (!(ch->flags & XPC_C_DISCONNECTING)) { 1510 /*
1432 DBUG_ON(ch->flags & XPC_C_OPENREQUEST); 1511 * Initiate the establishment of a connection on the
1433 DBUG_ON(ch->flags & XPC_C_CONNECTED); 1512 * newly registered channel to the remote partition.
1434 DBUG_ON(ch->flags & XPC_C_SETUP); 1513 */
1435 1514 xpc_wakeup_channel_mgr(part);
1436 /*
1437 * Initiate the establishment of a connection
1438 * on the newly registered channel to the
1439 * remote partition.
1440 */
1441 xpc_wakeup_channel_mgr(part);
1442 }
1443
1444 xpc_part_deref(part); 1515 xpc_part_deref(part);
1445 } 1516 }
1446 } 1517 }
@@ -1450,9 +1521,6 @@ xpc_initiate_connect(int ch_number)
1450void 1521void
1451xpc_connected_callout(struct xpc_channel *ch) 1522xpc_connected_callout(struct xpc_channel *ch)
1452{ 1523{
1453 unsigned long irq_flags;
1454
1455
1456 /* let the registerer know that a connection has been established */ 1524 /* let the registerer know that a connection has been established */
1457 1525
1458 if (ch->func != NULL) { 1526 if (ch->func != NULL) {
@@ -1465,10 +1533,6 @@ xpc_connected_callout(struct xpc_channel *ch)
1465 dev_dbg(xpc_chan, "ch->func() returned, reason=xpcConnected, " 1533 dev_dbg(xpc_chan, "ch->func() returned, reason=xpcConnected, "
1466 "partid=%d, channel=%d\n", ch->partid, ch->number); 1534 "partid=%d, channel=%d\n", ch->partid, ch->number);
1467 } 1535 }
1468
1469 spin_lock_irqsave(&ch->lock, irq_flags);
1470 ch->flags |= XPC_C_CONNECTCALLOUT;
1471 spin_unlock_irqrestore(&ch->lock, irq_flags);
1472} 1536}
1473 1537
1474 1538
@@ -1506,8 +1570,12 @@ xpc_initiate_disconnect(int ch_number)
1506 1570
1507 spin_lock_irqsave(&ch->lock, irq_flags); 1571 spin_lock_irqsave(&ch->lock, irq_flags);
1508 1572
1509 XPC_DISCONNECT_CHANNEL(ch, xpcUnregistering, 1573 if (!(ch->flags & XPC_C_DISCONNECTED)) {
1574 ch->flags |= XPC_C_WDISCONNECT;
1575
1576 XPC_DISCONNECT_CHANNEL(ch, xpcUnregistering,
1510 &irq_flags); 1577 &irq_flags);
1578 }
1511 1579
1512 spin_unlock_irqrestore(&ch->lock, irq_flags); 1580 spin_unlock_irqrestore(&ch->lock, irq_flags);
1513 1581
@@ -1523,8 +1591,9 @@ xpc_initiate_disconnect(int ch_number)
1523/* 1591/*
1524 * To disconnect a channel, and reflect it back to all who may be waiting. 1592 * To disconnect a channel, and reflect it back to all who may be waiting.
1525 * 1593 *
1526 * >>> An OPEN is not allowed until XPC_C_DISCONNECTING is cleared by 1594 * An OPEN is not allowed until XPC_C_DISCONNECTING is cleared by
1527 * >>> xpc_free_msgqueues(). 1595 * xpc_process_disconnect(), and if set, XPC_C_WDISCONNECT is cleared by
1596 * xpc_disconnect_wait().
1528 * 1597 *
1529 * THE CHANNEL IS TO BE LOCKED BY THE CALLER AND WILL REMAIN LOCKED UPON RETURN. 1598 * THE CHANNEL IS TO BE LOCKED BY THE CALLER AND WILL REMAIN LOCKED UPON RETURN.
1530 */ 1599 */
@@ -1532,7 +1601,7 @@ void
1532xpc_disconnect_channel(const int line, struct xpc_channel *ch, 1601xpc_disconnect_channel(const int line, struct xpc_channel *ch,
1533 enum xpc_retval reason, unsigned long *irq_flags) 1602 enum xpc_retval reason, unsigned long *irq_flags)
1534{ 1603{
1535 u32 flags; 1604 u32 channel_was_connected = (ch->flags & XPC_C_CONNECTED);
1536 1605
1537 1606
1538 DBUG_ON(!spin_is_locked(&ch->lock)); 1607 DBUG_ON(!spin_is_locked(&ch->lock));
@@ -1547,61 +1616,53 @@ xpc_disconnect_channel(const int line, struct xpc_channel *ch,
1547 1616
1548 XPC_SET_REASON(ch, reason, line); 1617 XPC_SET_REASON(ch, reason, line);
1549 1618
1550 flags = ch->flags; 1619 ch->flags |= (XPC_C_CLOSEREQUEST | XPC_C_DISCONNECTING);
1551 /* some of these may not have been set */ 1620 /* some of these may not have been set */
1552 ch->flags &= ~(XPC_C_OPENREQUEST | XPC_C_OPENREPLY | 1621 ch->flags &= ~(XPC_C_OPENREQUEST | XPC_C_OPENREPLY |
1553 XPC_C_ROPENREQUEST | XPC_C_ROPENREPLY | 1622 XPC_C_ROPENREQUEST | XPC_C_ROPENREPLY |
1554 XPC_C_CONNECTING | XPC_C_CONNECTED); 1623 XPC_C_CONNECTING | XPC_C_CONNECTED);
1555 1624
1556 ch->flags |= (XPC_C_CLOSEREQUEST | XPC_C_DISCONNECTING);
1557 xpc_IPI_send_closerequest(ch, irq_flags); 1625 xpc_IPI_send_closerequest(ch, irq_flags);
1558 1626
1559 if (flags & XPC_C_CONNECTED) { 1627 if (channel_was_connected) {
1560 ch->flags |= XPC_C_WASCONNECTED; 1628 ch->flags |= XPC_C_WASCONNECTED;
1561 } 1629 }
1562 1630
1631 spin_unlock_irqrestore(&ch->lock, *irq_flags);
1632
1633 /* wake all idle kthreads so they can exit */
1563 if (atomic_read(&ch->kthreads_idle) > 0) { 1634 if (atomic_read(&ch->kthreads_idle) > 0) {
1564 /* wake all idle kthreads so they can exit */
1565 wake_up_all(&ch->idle_wq); 1635 wake_up_all(&ch->idle_wq);
1566 } 1636 }
1567 1637
1568 spin_unlock_irqrestore(&ch->lock, *irq_flags);
1569
1570
1571 /* wake those waiting to allocate an entry from the local msg queue */ 1638 /* wake those waiting to allocate an entry from the local msg queue */
1572
1573 if (atomic_read(&ch->n_on_msg_allocate_wq) > 0) { 1639 if (atomic_read(&ch->n_on_msg_allocate_wq) > 0) {
1574 wake_up(&ch->msg_allocate_wq); 1640 wake_up(&ch->msg_allocate_wq);
1575 } 1641 }
1576 1642
1577 /* wake those waiting for notify completion */
1578
1579 if (atomic_read(&ch->n_to_notify) > 0) {
1580 xpc_notify_senders(ch, reason, ch->w_local_GP.put);
1581 }
1582
1583 spin_lock_irqsave(&ch->lock, *irq_flags); 1643 spin_lock_irqsave(&ch->lock, *irq_flags);
1584} 1644}
1585 1645
1586 1646
1587void 1647void
1588xpc_disconnected_callout(struct xpc_channel *ch) 1648xpc_disconnecting_callout(struct xpc_channel *ch)
1589{ 1649{
1590 /* 1650 /*
1591 * Let the channel's registerer know that the channel is now 1651 * Let the channel's registerer know that the channel is being
1592 * disconnected. We don't want to do this if the registerer was never 1652 * disconnected. We don't want to do this if the registerer was never
1593 * informed of a connection being made, unless the disconnect was for 1653 * informed of a connection being made.
1594 * abnormal reasons.
1595 */ 1654 */
1596 1655
1597 if (ch->func != NULL) { 1656 if (ch->func != NULL) {
1598 dev_dbg(xpc_chan, "ch->func() called, reason=%d, partid=%d, " 1657 dev_dbg(xpc_chan, "ch->func() called, reason=xpcDisconnecting,"
1599 "channel=%d\n", ch->reason, ch->partid, ch->number); 1658 " partid=%d, channel=%d\n", ch->partid, ch->number);
1600 1659
1601 ch->func(ch->reason, ch->partid, ch->number, NULL, ch->key); 1660 ch->func(xpcDisconnecting, ch->partid, ch->number, NULL,
1661 ch->key);
1602 1662
1603 dev_dbg(xpc_chan, "ch->func() returned, reason=%d, partid=%d, " 1663 dev_dbg(xpc_chan, "ch->func() returned, reason="
1604 "channel=%d\n", ch->reason, ch->partid, ch->number); 1664 "xpcDisconnecting, partid=%d, channel=%d\n",
1665 ch->partid, ch->number);
1605 } 1666 }
1606} 1667}
1607 1668
@@ -1848,7 +1909,7 @@ xpc_send_msg(struct xpc_channel *ch, struct xpc_msg *msg, u8 notify_type,
1848 xpc_notify_func func, void *key) 1909 xpc_notify_func func, void *key)
1849{ 1910{
1850 enum xpc_retval ret = xpcSuccess; 1911 enum xpc_retval ret = xpcSuccess;
1851 struct xpc_notify *notify = NULL; // >>> to keep the compiler happy!! 1912 struct xpc_notify *notify = notify;
1852 s64 put, msg_number = msg->number; 1913 s64 put, msg_number = msg->number;
1853 1914
1854 1915
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index ed7c21586e98..b617236524c6 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -54,8 +54,10 @@
54#include <linux/interrupt.h> 54#include <linux/interrupt.h>
55#include <linux/slab.h> 55#include <linux/slab.h>
56#include <linux/delay.h> 56#include <linux/delay.h>
57#include <linux/reboot.h>
57#include <asm/sn/intr.h> 58#include <asm/sn/intr.h>
58#include <asm/sn/sn_sal.h> 59#include <asm/sn/sn_sal.h>
60#include <asm/kdebug.h>
59#include <asm/uaccess.h> 61#include <asm/uaccess.h>
60#include "xpc.h" 62#include "xpc.h"
61 63
@@ -82,11 +84,17 @@ struct device *xpc_chan = &xpc_chan_dbg_subname;
82 84
83/* systune related variables for /proc/sys directories */ 85/* systune related variables for /proc/sys directories */
84 86
85static int xpc_hb_min = 1; 87static int xpc_hb_interval = XPC_HB_DEFAULT_INTERVAL;
86static int xpc_hb_max = 10; 88static int xpc_hb_min_interval = 1;
89static int xpc_hb_max_interval = 10;
87 90
88static int xpc_hb_check_min = 10; 91static int xpc_hb_check_interval = XPC_HB_CHECK_DEFAULT_INTERVAL;
89static int xpc_hb_check_max = 120; 92static int xpc_hb_check_min_interval = 10;
93static int xpc_hb_check_max_interval = 120;
94
95int xpc_disengage_request_timelimit = XPC_DISENGAGE_REQUEST_DEFAULT_TIMELIMIT;
96static int xpc_disengage_request_min_timelimit = 0;
97static int xpc_disengage_request_max_timelimit = 120;
90 98
91static ctl_table xpc_sys_xpc_hb_dir[] = { 99static ctl_table xpc_sys_xpc_hb_dir[] = {
92 { 100 {
@@ -99,7 +107,8 @@ static ctl_table xpc_sys_xpc_hb_dir[] = {
99 &proc_dointvec_minmax, 107 &proc_dointvec_minmax,
100 &sysctl_intvec, 108 &sysctl_intvec,
101 NULL, 109 NULL,
102 &xpc_hb_min, &xpc_hb_max 110 &xpc_hb_min_interval,
111 &xpc_hb_max_interval
103 }, 112 },
104 { 113 {
105 2, 114 2,
@@ -111,7 +120,8 @@ static ctl_table xpc_sys_xpc_hb_dir[] = {
111 &proc_dointvec_minmax, 120 &proc_dointvec_minmax,
112 &sysctl_intvec, 121 &sysctl_intvec,
113 NULL, 122 NULL,
114 &xpc_hb_check_min, &xpc_hb_check_max 123 &xpc_hb_check_min_interval,
124 &xpc_hb_check_max_interval
115 }, 125 },
116 {0} 126 {0}
117}; 127};
@@ -124,6 +134,19 @@ static ctl_table xpc_sys_xpc_dir[] = {
124 0555, 134 0555,
125 xpc_sys_xpc_hb_dir 135 xpc_sys_xpc_hb_dir
126 }, 136 },
137 {
138 2,
139 "disengage_request_timelimit",
140 &xpc_disengage_request_timelimit,
141 sizeof(int),
142 0644,
143 NULL,
144 &proc_dointvec_minmax,
145 &sysctl_intvec,
146 NULL,
147 &xpc_disengage_request_min_timelimit,
148 &xpc_disengage_request_max_timelimit
149 },
127 {0} 150 {0}
128}; 151};
129static ctl_table xpc_sys_dir[] = { 152static ctl_table xpc_sys_dir[] = {
@@ -148,10 +171,10 @@ static DECLARE_WAIT_QUEUE_HEAD(xpc_act_IRQ_wq);
148 171
149static unsigned long xpc_hb_check_timeout; 172static unsigned long xpc_hb_check_timeout;
150 173
151/* xpc_hb_checker thread exited notification */ 174/* notification that the xpc_hb_checker thread has exited */
152static DECLARE_MUTEX_LOCKED(xpc_hb_checker_exited); 175static DECLARE_MUTEX_LOCKED(xpc_hb_checker_exited);
153 176
154/* xpc_discovery thread exited notification */ 177/* notification that the xpc_discovery thread has exited */
155static DECLARE_MUTEX_LOCKED(xpc_discovery_exited); 178static DECLARE_MUTEX_LOCKED(xpc_discovery_exited);
156 179
157 180
@@ -161,6 +184,35 @@ static struct timer_list xpc_hb_timer;
161static void xpc_kthread_waitmsgs(struct xpc_partition *, struct xpc_channel *); 184static void xpc_kthread_waitmsgs(struct xpc_partition *, struct xpc_channel *);
162 185
163 186
187static int xpc_system_reboot(struct notifier_block *, unsigned long, void *);
188static struct notifier_block xpc_reboot_notifier = {
189 .notifier_call = xpc_system_reboot,
190};
191
192static int xpc_system_die(struct notifier_block *, unsigned long, void *);
193static struct notifier_block xpc_die_notifier = {
194 .notifier_call = xpc_system_die,
195};
196
197
198/*
199 * Timer function to enforce the timelimit on the partition disengage request.
200 */
201static void
202xpc_timeout_partition_disengage_request(unsigned long data)
203{
204 struct xpc_partition *part = (struct xpc_partition *) data;
205
206
207 DBUG_ON(jiffies < part->disengage_request_timeout);
208
209 (void) xpc_partition_disengaged(part);
210
211 DBUG_ON(part->disengage_request_timeout != 0);
212 DBUG_ON(xpc_partition_engaged(1UL << XPC_PARTID(part)) != 0);
213}
214
215
164/* 216/*
165 * Notify the heartbeat check thread that an IRQ has been received. 217 * Notify the heartbeat check thread that an IRQ has been received.
166 */ 218 */
@@ -214,12 +266,6 @@ xpc_hb_checker(void *ignore)
214 266
215 while (!(volatile int) xpc_exiting) { 267 while (!(volatile int) xpc_exiting) {
216 268
217 /* wait for IRQ or timeout */
218 (void) wait_event_interruptible(xpc_act_IRQ_wq,
219 (last_IRQ_count < atomic_read(&xpc_act_IRQ_rcvd) ||
220 jiffies >= xpc_hb_check_timeout ||
221 (volatile int) xpc_exiting));
222
223 dev_dbg(xpc_part, "woke up with %d ticks rem; %d IRQs have " 269 dev_dbg(xpc_part, "woke up with %d ticks rem; %d IRQs have "
224 "been received\n", 270 "been received\n",
225 (int) (xpc_hb_check_timeout - jiffies), 271 (int) (xpc_hb_check_timeout - jiffies),
@@ -240,6 +286,7 @@ xpc_hb_checker(void *ignore)
240 } 286 }
241 287
242 288
289 /* check for outstanding IRQs */
243 new_IRQ_count = atomic_read(&xpc_act_IRQ_rcvd); 290 new_IRQ_count = atomic_read(&xpc_act_IRQ_rcvd);
244 if (last_IRQ_count < new_IRQ_count || force_IRQ != 0) { 291 if (last_IRQ_count < new_IRQ_count || force_IRQ != 0) {
245 force_IRQ = 0; 292 force_IRQ = 0;
@@ -257,12 +304,18 @@ xpc_hb_checker(void *ignore)
257 xpc_hb_check_timeout = jiffies + 304 xpc_hb_check_timeout = jiffies +
258 (xpc_hb_check_interval * HZ); 305 (xpc_hb_check_interval * HZ);
259 } 306 }
307
308 /* wait for IRQ or timeout */
309 (void) wait_event_interruptible(xpc_act_IRQ_wq,
310 (last_IRQ_count < atomic_read(&xpc_act_IRQ_rcvd) ||
311 jiffies >= xpc_hb_check_timeout ||
312 (volatile int) xpc_exiting));
260 } 313 }
261 314
262 dev_dbg(xpc_part, "heartbeat checker is exiting\n"); 315 dev_dbg(xpc_part, "heartbeat checker is exiting\n");
263 316
264 317
265 /* mark this thread as inactive */ 318 /* mark this thread as having exited */
266 up(&xpc_hb_checker_exited); 319 up(&xpc_hb_checker_exited);
267 return 0; 320 return 0;
268} 321}
@@ -282,7 +335,7 @@ xpc_initiate_discovery(void *ignore)
282 335
283 dev_dbg(xpc_part, "discovery thread is exiting\n"); 336 dev_dbg(xpc_part, "discovery thread is exiting\n");
284 337
285 /* mark this thread as inactive */ 338 /* mark this thread as having exited */
286 up(&xpc_discovery_exited); 339 up(&xpc_discovery_exited);
287 return 0; 340 return 0;
288} 341}
@@ -309,7 +362,7 @@ xpc_make_first_contact(struct xpc_partition *part)
309 "partition %d\n", XPC_PARTID(part)); 362 "partition %d\n", XPC_PARTID(part));
310 363
311 /* wait a 1/4 of a second or so */ 364 /* wait a 1/4 of a second or so */
312 msleep_interruptible(250); 365 (void) msleep_interruptible(250);
313 366
314 if (part->act_state == XPC_P_DEACTIVATING) { 367 if (part->act_state == XPC_P_DEACTIVATING) {
315 return part->reason; 368 return part->reason;
@@ -336,7 +389,8 @@ static void
336xpc_channel_mgr(struct xpc_partition *part) 389xpc_channel_mgr(struct xpc_partition *part)
337{ 390{
338 while (part->act_state != XPC_P_DEACTIVATING || 391 while (part->act_state != XPC_P_DEACTIVATING ||
339 atomic_read(&part->nchannels_active) > 0) { 392 atomic_read(&part->nchannels_active) > 0 ||
393 !xpc_partition_disengaged(part)) {
340 394
341 xpc_process_channel_activity(part); 395 xpc_process_channel_activity(part);
342 396
@@ -360,7 +414,8 @@ xpc_channel_mgr(struct xpc_partition *part)
360 (volatile u64) part->local_IPI_amo != 0 || 414 (volatile u64) part->local_IPI_amo != 0 ||
361 ((volatile u8) part->act_state == 415 ((volatile u8) part->act_state ==
362 XPC_P_DEACTIVATING && 416 XPC_P_DEACTIVATING &&
363 atomic_read(&part->nchannels_active) == 0))); 417 atomic_read(&part->nchannels_active) == 0 &&
418 xpc_partition_disengaged(part))));
364 atomic_set(&part->channel_mgr_requests, 1); 419 atomic_set(&part->channel_mgr_requests, 1);
365 420
366 // >>> Does it need to wakeup periodically as well? In case we 421 // >>> Does it need to wakeup periodically as well? In case we
@@ -482,7 +537,7 @@ xpc_activating(void *__partid)
482 return 0; 537 return 0;
483 } 538 }
484 539
485 XPC_ALLOW_HB(partid, xpc_vars); 540 xpc_allow_hb(partid, xpc_vars);
486 xpc_IPI_send_activated(part); 541 xpc_IPI_send_activated(part);
487 542
488 543
@@ -492,6 +547,7 @@ xpc_activating(void *__partid)
492 */ 547 */
493 (void) xpc_partition_up(part); 548 (void) xpc_partition_up(part);
494 549
550 xpc_disallow_hb(partid, xpc_vars);
495 xpc_mark_partition_inactive(part); 551 xpc_mark_partition_inactive(part);
496 552
497 if (part->reason == xpcReactivating) { 553 if (part->reason == xpcReactivating) {
@@ -670,6 +726,7 @@ xpc_daemonize_kthread(void *args)
670 struct xpc_partition *part = &xpc_partitions[partid]; 726 struct xpc_partition *part = &xpc_partitions[partid];
671 struct xpc_channel *ch; 727 struct xpc_channel *ch;
672 int n_needed; 728 int n_needed;
729 unsigned long irq_flags;
673 730
674 731
675 daemonize("xpc%02dc%d", partid, ch_number); 732 daemonize("xpc%02dc%d", partid, ch_number);
@@ -680,11 +737,14 @@ xpc_daemonize_kthread(void *args)
680 ch = &part->channels[ch_number]; 737 ch = &part->channels[ch_number];
681 738
682 if (!(ch->flags & XPC_C_DISCONNECTING)) { 739 if (!(ch->flags & XPC_C_DISCONNECTING)) {
683 DBUG_ON(!(ch->flags & XPC_C_CONNECTED));
684 740
685 /* let registerer know that connection has been established */ 741 /* let registerer know that connection has been established */
686 742
687 if (atomic_read(&ch->kthreads_assigned) == 1) { 743 spin_lock_irqsave(&ch->lock, irq_flags);
744 if (!(ch->flags & XPC_C_CONNECTCALLOUT)) {
745 ch->flags |= XPC_C_CONNECTCALLOUT;
746 spin_unlock_irqrestore(&ch->lock, irq_flags);
747
688 xpc_connected_callout(ch); 748 xpc_connected_callout(ch);
689 749
690 /* 750 /*
@@ -699,16 +759,28 @@ xpc_daemonize_kthread(void *args)
699 !(ch->flags & XPC_C_DISCONNECTING)) { 759 !(ch->flags & XPC_C_DISCONNECTING)) {
700 xpc_activate_kthreads(ch, n_needed); 760 xpc_activate_kthreads(ch, n_needed);
701 } 761 }
762 } else {
763 spin_unlock_irqrestore(&ch->lock, irq_flags);
702 } 764 }
703 765
704 xpc_kthread_waitmsgs(part, ch); 766 xpc_kthread_waitmsgs(part, ch);
705 } 767 }
706 768
707 if (atomic_dec_return(&ch->kthreads_assigned) == 0 && 769 if (atomic_dec_return(&ch->kthreads_assigned) == 0) {
708 ((ch->flags & XPC_C_CONNECTCALLOUT) || 770 spin_lock_irqsave(&ch->lock, irq_flags);
709 (ch->reason != xpcUnregistering && 771 if ((ch->flags & XPC_C_CONNECTCALLOUT) &&
710 ch->reason != xpcOtherUnregistering))) { 772 !(ch->flags & XPC_C_DISCONNECTCALLOUT)) {
711 xpc_disconnected_callout(ch); 773 ch->flags |= XPC_C_DISCONNECTCALLOUT;
774 spin_unlock_irqrestore(&ch->lock, irq_flags);
775
776 xpc_disconnecting_callout(ch);
777 } else {
778 spin_unlock_irqrestore(&ch->lock, irq_flags);
779 }
780 if (atomic_dec_return(&part->nchannels_engaged) == 0) {
781 xpc_mark_partition_disengaged(part);
782 xpc_IPI_send_disengage(part);
783 }
712 } 784 }
713 785
714 786
@@ -740,12 +812,33 @@ xpc_create_kthreads(struct xpc_channel *ch, int needed)
740 unsigned long irq_flags; 812 unsigned long irq_flags;
741 pid_t pid; 813 pid_t pid;
742 u64 args = XPC_PACK_ARGS(ch->partid, ch->number); 814 u64 args = XPC_PACK_ARGS(ch->partid, ch->number);
815 struct xpc_partition *part = &xpc_partitions[ch->partid];
743 816
744 817
745 while (needed-- > 0) { 818 while (needed-- > 0) {
819
820 /*
821 * The following is done on behalf of the newly created
822 * kthread. That kthread is responsible for doing the
823 * counterpart to the following before it exits.
824 */
825 (void) xpc_part_ref(part);
826 xpc_msgqueue_ref(ch);
827 if (atomic_inc_return(&ch->kthreads_assigned) == 1 &&
828 atomic_inc_return(&part->nchannels_engaged) == 1) {
829 xpc_mark_partition_engaged(part);
830 }
831
746 pid = kernel_thread(xpc_daemonize_kthread, (void *) args, 0); 832 pid = kernel_thread(xpc_daemonize_kthread, (void *) args, 0);
747 if (pid < 0) { 833 if (pid < 0) {
748 /* the fork failed */ 834 /* the fork failed */
835 if (atomic_dec_return(&ch->kthreads_assigned) == 0 &&
836 atomic_dec_return(&part->nchannels_engaged) == 0) {
837 xpc_mark_partition_disengaged(part);
838 xpc_IPI_send_disengage(part);
839 }
840 xpc_msgqueue_deref(ch);
841 xpc_part_deref(part);
749 842
750 if (atomic_read(&ch->kthreads_assigned) < 843 if (atomic_read(&ch->kthreads_assigned) <
751 ch->kthreads_idle_limit) { 844 ch->kthreads_idle_limit) {
@@ -765,14 +858,6 @@ xpc_create_kthreads(struct xpc_channel *ch, int needed)
765 break; 858 break;
766 } 859 }
767 860
768 /*
769 * The following is done on behalf of the newly created
770 * kthread. That kthread is responsible for doing the
771 * counterpart to the following before it exits.
772 */
773 (void) xpc_part_ref(&xpc_partitions[ch->partid]);
774 xpc_msgqueue_ref(ch);
775 atomic_inc(&ch->kthreads_assigned);
776 ch->kthreads_created++; // >>> temporary debug only!!! 861 ch->kthreads_created++; // >>> temporary debug only!!!
777 } 862 }
778} 863}
@@ -781,87 +866,145 @@ xpc_create_kthreads(struct xpc_channel *ch, int needed)
781void 866void
782xpc_disconnect_wait(int ch_number) 867xpc_disconnect_wait(int ch_number)
783{ 868{
869 unsigned long irq_flags;
784 partid_t partid; 870 partid_t partid;
785 struct xpc_partition *part; 871 struct xpc_partition *part;
786 struct xpc_channel *ch; 872 struct xpc_channel *ch;
873 int wakeup_channel_mgr;
787 874
788 875
789 /* now wait for all callouts to the caller's function to cease */ 876 /* now wait for all callouts to the caller's function to cease */
790 for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) { 877 for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) {
791 part = &xpc_partitions[partid]; 878 part = &xpc_partitions[partid];
792 879
793 if (xpc_part_ref(part)) { 880 if (!xpc_part_ref(part)) {
794 ch = &part->channels[ch_number]; 881 continue;
882 }
795 883
796// >>> how do we keep from falling into the window between our check and going 884 ch = &part->channels[ch_number];
797// >>> down and coming back up where sema is re-inited?
798 if (ch->flags & XPC_C_SETUP) {
799 (void) down(&ch->teardown_sema);
800 }
801 885
886 if (!(ch->flags & XPC_C_WDISCONNECT)) {
802 xpc_part_deref(part); 887 xpc_part_deref(part);
888 continue;
889 }
890
891 (void) down(&ch->wdisconnect_sema);
892
893 spin_lock_irqsave(&ch->lock, irq_flags);
894 DBUG_ON(!(ch->flags & XPC_C_DISCONNECTED));
895 wakeup_channel_mgr = 0;
896
897 if (ch->delayed_IPI_flags) {
898 if (part->act_state != XPC_P_DEACTIVATING) {
899 spin_lock(&part->IPI_lock);
900 XPC_SET_IPI_FLAGS(part->local_IPI_amo,
901 ch->number, ch->delayed_IPI_flags);
902 spin_unlock(&part->IPI_lock);
903 wakeup_channel_mgr = 1;
904 }
905 ch->delayed_IPI_flags = 0;
803 } 906 }
907
908 ch->flags &= ~XPC_C_WDISCONNECT;
909 spin_unlock_irqrestore(&ch->lock, irq_flags);
910
911 if (wakeup_channel_mgr) {
912 xpc_wakeup_channel_mgr(part);
913 }
914
915 xpc_part_deref(part);
804 } 916 }
805} 917}
806 918
807 919
808static void 920static void
809xpc_do_exit(void) 921xpc_do_exit(enum xpc_retval reason)
810{ 922{
811 partid_t partid; 923 partid_t partid;
812 int active_part_count; 924 int active_part_count;
813 struct xpc_partition *part; 925 struct xpc_partition *part;
926 unsigned long printmsg_time;
814 927
815 928
816 /* now it's time to eliminate our heartbeat */ 929 /* a 'rmmod XPC' and a 'reboot' cannot both end up here together */
817 del_timer_sync(&xpc_hb_timer); 930 DBUG_ON(xpc_exiting == 1);
818 xpc_vars->heartbeating_to_mask = 0;
819
820 /* indicate to others that our reserved page is uninitialized */
821 xpc_rsvd_page->vars_pa = 0;
822
823 /*
824 * Ignore all incoming interrupts. Without interupts the heartbeat
825 * checker won't activate any new partitions that may come up.
826 */
827 free_irq(SGI_XPC_ACTIVATE, NULL);
828 931
829 /* 932 /*
830 * Cause the heartbeat checker and the discovery threads to exit. 933 * Let the heartbeat checker thread and the discovery thread
831 * We don't want them attempting to activate new partitions as we 934 * (if one is running) know that they should exit. Also wake up
832 * try to deactivate the existing ones. 935 * the heartbeat checker thread in case it's sleeping.
833 */ 936 */
834 xpc_exiting = 1; 937 xpc_exiting = 1;
835 wake_up_interruptible(&xpc_act_IRQ_wq); 938 wake_up_interruptible(&xpc_act_IRQ_wq);
836 939
837 /* wait for the heartbeat checker thread to mark itself inactive */ 940 /* ignore all incoming interrupts */
838 down(&xpc_hb_checker_exited); 941 free_irq(SGI_XPC_ACTIVATE, NULL);
839 942
840 /* wait for the discovery thread to mark itself inactive */ 943 /* wait for the discovery thread to exit */
841 down(&xpc_discovery_exited); 944 down(&xpc_discovery_exited);
842 945
946 /* wait for the heartbeat checker thread to exit */
947 down(&xpc_hb_checker_exited);
948
843 949
844 msleep_interruptible(300); 950 /* sleep for a 1/3 of a second or so */
951 (void) msleep_interruptible(300);
845 952
846 953
847 /* wait for all partitions to become inactive */ 954 /* wait for all partitions to become inactive */
848 955
956 printmsg_time = jiffies;
957
849 do { 958 do {
850 active_part_count = 0; 959 active_part_count = 0;
851 960
852 for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) { 961 for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) {
853 part = &xpc_partitions[partid]; 962 part = &xpc_partitions[partid];
854 if (part->act_state != XPC_P_INACTIVE) {
855 active_part_count++;
856 963
857 XPC_DEACTIVATE_PARTITION(part, xpcUnloading); 964 if (xpc_partition_disengaged(part) &&
965 part->act_state == XPC_P_INACTIVE) {
966 continue;
858 } 967 }
968
969 active_part_count++;
970
971 XPC_DEACTIVATE_PARTITION(part, reason);
859 } 972 }
860 973
861 if (active_part_count) 974 if (active_part_count == 0) {
862 msleep_interruptible(300); 975 break;
863 } while (active_part_count > 0); 976 }
864 977
978 if (jiffies >= printmsg_time) {
979 dev_info(xpc_part, "waiting for partitions to "
980 "deactivate/disengage, active count=%d, remote "
981 "engaged=0x%lx\n", active_part_count,
982 xpc_partition_engaged(1UL << partid));
983
984 printmsg_time = jiffies +
985 (XPC_DISENGAGE_PRINTMSG_INTERVAL * HZ);
986 }
987
988 /* sleep for a 1/3 of a second or so */
989 (void) msleep_interruptible(300);
990
991 } while (1);
992
993 DBUG_ON(xpc_partition_engaged(-1UL));
994
995
996 /* indicate to others that our reserved page is uninitialized */
997 xpc_rsvd_page->vars_pa = 0;
998
999 /* now it's time to eliminate our heartbeat */
1000 del_timer_sync(&xpc_hb_timer);
1001 DBUG_ON(xpc_vars->heartbeating_to_mask != 0);
1002
1003 /* take ourselves off of the reboot_notifier_list */
1004 (void) unregister_reboot_notifier(&xpc_reboot_notifier);
1005
1006 /* take ourselves off of the die_notifier list */
1007 (void) unregister_die_notifier(&xpc_die_notifier);
865 1008
866 /* close down protections for IPI operations */ 1009 /* close down protections for IPI operations */
867 xpc_restrict_IPI_ops(); 1010 xpc_restrict_IPI_ops();
@@ -876,6 +1019,118 @@ xpc_do_exit(void)
876} 1019}
877 1020
878 1021
1022/*
1023 * Called when the system is about to be either restarted or halted.
1024 */
1025static void
1026xpc_die_disengage(void)
1027{
1028 struct xpc_partition *part;
1029 partid_t partid;
1030 unsigned long engaged;
1031 long time, print_time, disengage_request_timeout;
1032
1033
1034 /* keep xpc_hb_checker thread from doing anything (just in case) */
1035 xpc_exiting = 1;
1036
1037 xpc_vars->heartbeating_to_mask = 0; /* indicate we're deactivated */
1038
1039 for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) {
1040 part = &xpc_partitions[partid];
1041
1042 if (!XPC_SUPPORTS_DISENGAGE_REQUEST(part->
1043 remote_vars_version)) {
1044
1045 /* just in case it was left set by an earlier XPC */
1046 xpc_clear_partition_engaged(1UL << partid);
1047 continue;
1048 }
1049
1050 if (xpc_partition_engaged(1UL << partid) ||
1051 part->act_state != XPC_P_INACTIVE) {
1052 xpc_request_partition_disengage(part);
1053 xpc_mark_partition_disengaged(part);
1054 xpc_IPI_send_disengage(part);
1055 }
1056 }
1057
1058 print_time = rtc_time();
1059 disengage_request_timeout = print_time +
1060 (xpc_disengage_request_timelimit * sn_rtc_cycles_per_second);
1061
1062 /* wait for all other partitions to disengage from us */
1063
1064 while ((engaged = xpc_partition_engaged(-1UL)) &&
1065 (time = rtc_time()) < disengage_request_timeout) {
1066
1067 if (time >= print_time) {
1068 dev_info(xpc_part, "waiting for remote partitions to "
1069 "disengage, engaged=0x%lx\n", engaged);
1070 print_time = time + (XPC_DISENGAGE_PRINTMSG_INTERVAL *
1071 sn_rtc_cycles_per_second);
1072 }
1073 }
1074 dev_info(xpc_part, "finished waiting for remote partitions to "
1075 "disengage, engaged=0x%lx\n", engaged);
1076}
1077
1078
1079/*
1080 * This function is called when the system is being rebooted.
1081 */
1082static int
1083xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)
1084{
1085 enum xpc_retval reason;
1086
1087
1088 switch (event) {
1089 case SYS_RESTART:
1090 reason = xpcSystemReboot;
1091 break;
1092 case SYS_HALT:
1093 reason = xpcSystemHalt;
1094 break;
1095 case SYS_POWER_OFF:
1096 reason = xpcSystemPoweroff;
1097 break;
1098 default:
1099 reason = xpcSystemGoingDown;
1100 }
1101
1102 xpc_do_exit(reason);
1103 return NOTIFY_DONE;
1104}
1105
1106
1107/*
1108 * This function is called when the system is being rebooted.
1109 */
1110static int
1111xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused)
1112{
1113 switch (event) {
1114 case DIE_MACHINE_RESTART:
1115 case DIE_MACHINE_HALT:
1116 xpc_die_disengage();
1117 break;
1118 case DIE_MCA_MONARCH_ENTER:
1119 case DIE_INIT_MONARCH_ENTER:
1120 xpc_vars->heartbeat++;
1121 xpc_vars->heartbeat_offline = 1;
1122 break;
1123 case DIE_MCA_MONARCH_LEAVE:
1124 case DIE_INIT_MONARCH_LEAVE:
1125 xpc_vars->heartbeat++;
1126 xpc_vars->heartbeat_offline = 0;
1127 break;
1128 }
1129
1130 return NOTIFY_DONE;
1131}
1132
1133
879int __init 1134int __init
880xpc_init(void) 1135xpc_init(void)
881{ 1136{
@@ -891,11 +1146,11 @@ xpc_init(void)
891 1146
892 /* 1147 /*
893 * xpc_remote_copy_buffer is used as a temporary buffer for bte_copy'ng 1148 * xpc_remote_copy_buffer is used as a temporary buffer for bte_copy'ng
894 * both a partition's reserved page and its XPC variables. Its size was 1149 * various portions of a partition's reserved page. Its size is based
895 * based on the size of a reserved page. So we need to ensure that the 1150 * on the size of the reserved page header and part_nasids mask. So we
896 * XPC variables will fit as well. 1151 * need to ensure that the other items will fit as well.
897 */ 1152 */
898 if (XPC_VARS_ALIGNED_SIZE > XPC_RSVD_PAGE_ALIGNED_SIZE) { 1153 if (XPC_RP_VARS_SIZE > XPC_RP_HEADER_SIZE + XP_NASID_MASK_BYTES) {
899 dev_err(xpc_part, "xpc_remote_copy_buffer is not big enough\n"); 1154 dev_err(xpc_part, "xpc_remote_copy_buffer is not big enough\n");
900 return -EPERM; 1155 return -EPERM;
901 } 1156 }
@@ -924,6 +1179,12 @@ xpc_init(void)
924 spin_lock_init(&part->act_lock); 1179 spin_lock_init(&part->act_lock);
925 part->act_state = XPC_P_INACTIVE; 1180 part->act_state = XPC_P_INACTIVE;
926 XPC_SET_REASON(part, 0, 0); 1181 XPC_SET_REASON(part, 0, 0);
1182
1183 init_timer(&part->disengage_request_timer);
1184 part->disengage_request_timer.function =
1185 xpc_timeout_partition_disengage_request;
1186 part->disengage_request_timer.data = (unsigned long) part;
1187
927 part->setup_state = XPC_P_UNSET; 1188 part->setup_state = XPC_P_UNSET;
928 init_waitqueue_head(&part->teardown_wq); 1189 init_waitqueue_head(&part->teardown_wq);
929 atomic_set(&part->references, 0); 1190 atomic_set(&part->references, 0);
@@ -980,6 +1241,19 @@ xpc_init(void)
980 } 1241 }
981 1242
982 1243
1244 /* add ourselves to the reboot_notifier_list */
1245 ret = register_reboot_notifier(&xpc_reboot_notifier);
1246 if (ret != 0) {
1247 dev_warn(xpc_part, "can't register reboot notifier\n");
1248 }
1249
1250 /* add ourselves to the die_notifier list (i.e., ia64die_chain) */
1251 ret = register_die_notifier(&xpc_die_notifier);
1252 if (ret != 0) {
1253 dev_warn(xpc_part, "can't register die notifier\n");
1254 }
1255
1256
983 /* 1257 /*
984 * Set the beating to other partitions into motion. This is 1258 * Set the beating to other partitions into motion. This is
985 * the last requirement for other partitions' discovery to 1259 * the last requirement for other partitions' discovery to
@@ -1001,6 +1275,12 @@ xpc_init(void)
1001 /* indicate to others that our reserved page is uninitialized */ 1275 /* indicate to others that our reserved page is uninitialized */
1002 xpc_rsvd_page->vars_pa = 0; 1276 xpc_rsvd_page->vars_pa = 0;
1003 1277
1278 /* take ourselves off of the reboot_notifier_list */
1279 (void) unregister_reboot_notifier(&xpc_reboot_notifier);
1280
1281 /* take ourselves off of the die_notifier list */
1282 (void) unregister_die_notifier(&xpc_die_notifier);
1283
1004 del_timer_sync(&xpc_hb_timer); 1284 del_timer_sync(&xpc_hb_timer);
1005 free_irq(SGI_XPC_ACTIVATE, NULL); 1285 free_irq(SGI_XPC_ACTIVATE, NULL);
1006 xpc_restrict_IPI_ops(); 1286 xpc_restrict_IPI_ops();
@@ -1024,7 +1304,7 @@ xpc_init(void)
1024 /* mark this new thread as a non-starter */ 1304 /* mark this new thread as a non-starter */
1025 up(&xpc_discovery_exited); 1305 up(&xpc_discovery_exited);
1026 1306
1027 xpc_do_exit(); 1307 xpc_do_exit(xpcUnloading);
1028 return -EBUSY; 1308 return -EBUSY;
1029 } 1309 }
1030 1310
@@ -1043,7 +1323,7 @@ module_init(xpc_init);
1043void __exit 1323void __exit
1044xpc_exit(void) 1324xpc_exit(void)
1045{ 1325{
1046 xpc_do_exit(); 1326 xpc_do_exit(xpcUnloading);
1047} 1327}
1048module_exit(xpc_exit); 1328module_exit(xpc_exit);
1049 1329
@@ -1060,3 +1340,7 @@ module_param(xpc_hb_check_interval, int, 0);
1060MODULE_PARM_DESC(xpc_hb_check_interval, "Number of seconds between " 1340MODULE_PARM_DESC(xpc_hb_check_interval, "Number of seconds between "
1061 "heartbeat checks."); 1341 "heartbeat checks.");
1062 1342
1343module_param(xpc_disengage_request_timelimit, int, 0);
1344MODULE_PARM_DESC(xpc_disengage_request_timelimit, "Number of seconds to wait "
1345 "for disengage request to complete.");
1346
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c
index 578265ea9e67..cdd6431853a1 100644
--- a/arch/ia64/sn/kernel/xpc_partition.c
+++ b/arch/ia64/sn/kernel/xpc_partition.c
@@ -44,16 +44,19 @@ static u64 xpc_sh2_IPI_access3;
44 44
45 45
46/* original protection values for each node */ 46/* original protection values for each node */
47u64 xpc_prot_vec[MAX_COMPACT_NODES]; 47u64 xpc_prot_vec[MAX_NUMNODES];
48 48
49 49
50/* this partition's reserved page */ 50/* this partition's reserved page pointers */
51struct xpc_rsvd_page *xpc_rsvd_page; 51struct xpc_rsvd_page *xpc_rsvd_page;
52 52static u64 *xpc_part_nasids;
53/* this partition's XPC variables (within the reserved page) */ 53static u64 *xpc_mach_nasids;
54struct xpc_vars *xpc_vars; 54struct xpc_vars *xpc_vars;
55struct xpc_vars_part *xpc_vars_part; 55struct xpc_vars_part *xpc_vars_part;
56 56
57static int xp_nasid_mask_bytes; /* actual size in bytes of nasid mask */
58static int xp_nasid_mask_words; /* actual size in words of nasid mask */
59
57 60
58/* 61/*
59 * For performance reasons, each entry of xpc_partitions[] is cacheline 62 * For performance reasons, each entry of xpc_partitions[] is cacheline
@@ -65,20 +68,16 @@ struct xpc_partition xpc_partitions[XP_MAX_PARTITIONS + 1];
65 68
66 69
67/* 70/*
68 * Generic buffer used to store a local copy of the remote partitions 71 * Generic buffer used to store a local copy of portions of a remote
69 * reserved page or XPC variables. 72 * partition's reserved page (either its header and part_nasids mask,
73 * or its vars).
70 * 74 *
71 * xpc_discovery runs only once and is a seperate thread that is 75 * xpc_discovery runs only once and is a seperate thread that is
72 * very likely going to be processing in parallel with receiving 76 * very likely going to be processing in parallel with receiving
73 * interrupts. 77 * interrupts.
74 */ 78 */
75char ____cacheline_aligned 79char ____cacheline_aligned xpc_remote_copy_buffer[XPC_RP_HEADER_SIZE +
76 xpc_remote_copy_buffer[XPC_RSVD_PAGE_ALIGNED_SIZE]; 80 XP_NASID_MASK_BYTES];
77
78
79/* systune related variables */
80int xpc_hb_interval = XPC_HB_DEFAULT_INTERVAL;
81int xpc_hb_check_interval = XPC_HB_CHECK_DEFAULT_TIMEOUT;
82 81
83 82
84/* 83/*
@@ -86,13 +85,16 @@ int xpc_hb_check_interval = XPC_HB_CHECK_DEFAULT_TIMEOUT;
86 * for that nasid. This function returns 0 on any error. 85 * for that nasid. This function returns 0 on any error.
87 */ 86 */
88static u64 87static u64
89xpc_get_rsvd_page_pa(int nasid, u64 buf, u64 buf_size) 88xpc_get_rsvd_page_pa(int nasid)
90{ 89{
91 bte_result_t bte_res; 90 bte_result_t bte_res;
92 s64 status; 91 s64 status;
93 u64 cookie = 0; 92 u64 cookie = 0;
94 u64 rp_pa = nasid; /* seed with nasid */ 93 u64 rp_pa = nasid; /* seed with nasid */
95 u64 len = 0; 94 u64 len = 0;
95 u64 buf = buf;
96 u64 buf_len = 0;
97 void *buf_base = NULL;
96 98
97 99
98 while (1) { 100 while (1) {
@@ -108,13 +110,22 @@ xpc_get_rsvd_page_pa(int nasid, u64 buf, u64 buf_size)
108 break; 110 break;
109 } 111 }
110 112
111 if (len > buf_size) { 113 if (L1_CACHE_ALIGN(len) > buf_len) {
112 dev_err(xpc_part, "len (=0x%016lx) > buf_size\n", len); 114 if (buf_base != NULL) {
113 status = SALRET_ERROR; 115 kfree(buf_base);
114 break; 116 }
117 buf_len = L1_CACHE_ALIGN(len);
118 buf = (u64) xpc_kmalloc_cacheline_aligned(buf_len,
119 GFP_KERNEL, &buf_base);
120 if (buf_base == NULL) {
121 dev_err(xpc_part, "unable to kmalloc "
122 "len=0x%016lx\n", buf_len);
123 status = SALRET_ERROR;
124 break;
125 }
115 } 126 }
116 127
117 bte_res = xp_bte_copy(rp_pa, ia64_tpa(buf), buf_size, 128 bte_res = xp_bte_copy(rp_pa, ia64_tpa(buf), buf_len,
118 (BTE_NOTIFY | BTE_WACQUIRE), NULL); 129 (BTE_NOTIFY | BTE_WACQUIRE), NULL);
119 if (bte_res != BTE_SUCCESS) { 130 if (bte_res != BTE_SUCCESS) {
120 dev_dbg(xpc_part, "xp_bte_copy failed %i\n", bte_res); 131 dev_dbg(xpc_part, "xp_bte_copy failed %i\n", bte_res);
@@ -123,6 +134,10 @@ xpc_get_rsvd_page_pa(int nasid, u64 buf, u64 buf_size)
123 } 134 }
124 } 135 }
125 136
137 if (buf_base != NULL) {
138 kfree(buf_base);
139 }
140
126 if (status != SALRET_OK) { 141 if (status != SALRET_OK) {
127 rp_pa = 0; 142 rp_pa = 0;
128 } 143 }
@@ -141,15 +156,15 @@ xpc_rsvd_page_init(void)
141{ 156{
142 struct xpc_rsvd_page *rp; 157 struct xpc_rsvd_page *rp;
143 AMO_t *amos_page; 158 AMO_t *amos_page;
144 u64 rp_pa, next_cl, nasid_array = 0; 159 u64 rp_pa, nasid_array = 0;
145 int i, ret; 160 int i, ret;
146 161
147 162
148 /* get the local reserved page's address */ 163 /* get the local reserved page's address */
149 164
150 rp_pa = xpc_get_rsvd_page_pa(cnodeid_to_nasid(0), 165 preempt_disable();
151 (u64) xpc_remote_copy_buffer, 166 rp_pa = xpc_get_rsvd_page_pa(cpuid_to_nasid(smp_processor_id()));
152 XPC_RSVD_PAGE_ALIGNED_SIZE); 167 preempt_enable();
153 if (rp_pa == 0) { 168 if (rp_pa == 0) {
154 dev_err(xpc_part, "SAL failed to locate the reserved page\n"); 169 dev_err(xpc_part, "SAL failed to locate the reserved page\n");
155 return NULL; 170 return NULL;
@@ -164,12 +179,19 @@ xpc_rsvd_page_init(void)
164 179
165 rp->version = XPC_RP_VERSION; 180 rp->version = XPC_RP_VERSION;
166 181
167 /* 182 /* establish the actual sizes of the nasid masks */
168 * Place the XPC variables on the cache line following the 183 if (rp->SAL_version == 1) {
169 * reserved page structure. 184 /* SAL_version 1 didn't set the nasids_size field */
170 */ 185 rp->nasids_size = 128;
171 next_cl = (u64) rp + XPC_RSVD_PAGE_ALIGNED_SIZE; 186 }
172 xpc_vars = (struct xpc_vars *) next_cl; 187 xp_nasid_mask_bytes = rp->nasids_size;
188 xp_nasid_mask_words = xp_nasid_mask_bytes / 8;
189
190 /* setup the pointers to the various items in the reserved page */
191 xpc_part_nasids = XPC_RP_PART_NASIDS(rp);
192 xpc_mach_nasids = XPC_RP_MACH_NASIDS(rp);
193 xpc_vars = XPC_RP_VARS(rp);
194 xpc_vars_part = XPC_RP_VARS_PART(rp);
173 195
174 /* 196 /*
175 * Before clearing xpc_vars, see if a page of AMOs had been previously 197 * Before clearing xpc_vars, see if a page of AMOs had been previously
@@ -221,33 +243,32 @@ xpc_rsvd_page_init(void)
221 amos_page = (AMO_t *) TO_AMO((u64) amos_page); 243 amos_page = (AMO_t *) TO_AMO((u64) amos_page);
222 } 244 }
223 245
246 /* clear xpc_vars */
224 memset(xpc_vars, 0, sizeof(struct xpc_vars)); 247 memset(xpc_vars, 0, sizeof(struct xpc_vars));
225 248
226 /*
227 * Place the XPC per partition specific variables on the cache line
228 * following the XPC variables structure.
229 */
230 next_cl += XPC_VARS_ALIGNED_SIZE;
231 memset((u64 *) next_cl, 0, sizeof(struct xpc_vars_part) *
232 XP_MAX_PARTITIONS);
233 xpc_vars_part = (struct xpc_vars_part *) next_cl;
234 xpc_vars->vars_part_pa = __pa(next_cl);
235
236 xpc_vars->version = XPC_V_VERSION; 249 xpc_vars->version = XPC_V_VERSION;
237 xpc_vars->act_nasid = cpuid_to_nasid(0); 250 xpc_vars->act_nasid = cpuid_to_nasid(0);
238 xpc_vars->act_phys_cpuid = cpu_physical_id(0); 251 xpc_vars->act_phys_cpuid = cpu_physical_id(0);
252 xpc_vars->vars_part_pa = __pa(xpc_vars_part);
253 xpc_vars->amos_page_pa = ia64_tpa((u64) amos_page);
239 xpc_vars->amos_page = amos_page; /* save for next load of XPC */ 254 xpc_vars->amos_page = amos_page; /* save for next load of XPC */
240 255
241 256
242 /* 257 /* clear xpc_vars_part */
243 * Initialize the activation related AMO variables. 258 memset((u64 *) xpc_vars_part, 0, sizeof(struct xpc_vars_part) *
244 */ 259 XP_MAX_PARTITIONS);
245 xpc_vars->act_amos = xpc_IPI_init(XP_MAX_PARTITIONS); 260
246 for (i = 1; i < XP_NASID_MASK_WORDS; i++) { 261 /* initialize the activate IRQ related AMO variables */
247 xpc_IPI_init(i + XP_MAX_PARTITIONS); 262 for (i = 0; i < xp_nasid_mask_words; i++) {
263 (void) xpc_IPI_init(XPC_ACTIVATE_IRQ_AMOS + i);
248 } 264 }
249 /* export AMO page's physical address to other partitions */ 265
250 xpc_vars->amos_page_pa = ia64_tpa((u64) xpc_vars->amos_page); 266 /* initialize the engaged remote partitions related AMO variables */
267 (void) xpc_IPI_init(XPC_ENGAGED_PARTITIONS_AMO);
268 (void) xpc_IPI_init(XPC_DISENGAGE_REQUEST_AMO);
269
270 /* timestamp of when reserved page was setup by XPC */
271 rp->stamp = CURRENT_TIME;
251 272
252 /* 273 /*
253 * This signifies to the remote partition that our reserved 274 * This signifies to the remote partition that our reserved
@@ -387,6 +408,11 @@ xpc_check_remote_hb(void)
387 remote_vars = (struct xpc_vars *) xpc_remote_copy_buffer; 408 remote_vars = (struct xpc_vars *) xpc_remote_copy_buffer;
388 409
389 for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) { 410 for (partid = 1; partid < XP_MAX_PARTITIONS; partid++) {
411
412 if (xpc_exiting) {
413 break;
414 }
415
390 if (partid == sn_partition_id) { 416 if (partid == sn_partition_id) {
391 continue; 417 continue;
392 } 418 }
@@ -401,7 +427,7 @@ xpc_check_remote_hb(void)
401 /* pull the remote_hb cache line */ 427 /* pull the remote_hb cache line */
402 bres = xp_bte_copy(part->remote_vars_pa, 428 bres = xp_bte_copy(part->remote_vars_pa,
403 ia64_tpa((u64) remote_vars), 429 ia64_tpa((u64) remote_vars),
404 XPC_VARS_ALIGNED_SIZE, 430 XPC_RP_VARS_SIZE,
405 (BTE_NOTIFY | BTE_WACQUIRE), NULL); 431 (BTE_NOTIFY | BTE_WACQUIRE), NULL);
406 if (bres != BTE_SUCCESS) { 432 if (bres != BTE_SUCCESS) {
407 XPC_DEACTIVATE_PARTITION(part, 433 XPC_DEACTIVATE_PARTITION(part,
@@ -410,14 +436,14 @@ xpc_check_remote_hb(void)
410 } 436 }
411 437
412 dev_dbg(xpc_part, "partid = %d, heartbeat = %ld, last_heartbeat" 438 dev_dbg(xpc_part, "partid = %d, heartbeat = %ld, last_heartbeat"
413 " = %ld, kdb_status = %ld, HB_mask = 0x%lx\n", partid, 439 " = %ld, heartbeat_offline = %ld, HB_mask = 0x%lx\n",
414 remote_vars->heartbeat, part->last_heartbeat, 440 partid, remote_vars->heartbeat, part->last_heartbeat,
415 remote_vars->kdb_status, 441 remote_vars->heartbeat_offline,
416 remote_vars->heartbeating_to_mask); 442 remote_vars->heartbeating_to_mask);
417 443
418 if (((remote_vars->heartbeat == part->last_heartbeat) && 444 if (((remote_vars->heartbeat == part->last_heartbeat) &&
419 (remote_vars->kdb_status == 0)) || 445 (remote_vars->heartbeat_offline == 0)) ||
420 !XPC_HB_ALLOWED(sn_partition_id, remote_vars)) { 446 !xpc_hb_allowed(sn_partition_id, remote_vars)) {
421 447
422 XPC_DEACTIVATE_PARTITION(part, xpcNoHeartbeat); 448 XPC_DEACTIVATE_PARTITION(part, xpcNoHeartbeat);
423 continue; 449 continue;
@@ -429,31 +455,31 @@ xpc_check_remote_hb(void)
429 455
430 456
431/* 457/*
432 * Get a copy of the remote partition's rsvd page. 458 * Get a copy of a portion of the remote partition's rsvd page.
433 * 459 *
434 * remote_rp points to a buffer that is cacheline aligned for BTE copies and 460 * remote_rp points to a buffer that is cacheline aligned for BTE copies and
435 * assumed to be of size XPC_RSVD_PAGE_ALIGNED_SIZE. 461 * is large enough to contain a copy of their reserved page header and
462 * part_nasids mask.
436 */ 463 */
437static enum xpc_retval 464static enum xpc_retval
438xpc_get_remote_rp(int nasid, u64 *discovered_nasids, 465xpc_get_remote_rp(int nasid, u64 *discovered_nasids,
439 struct xpc_rsvd_page *remote_rp, u64 *remote_rsvd_page_pa) 466 struct xpc_rsvd_page *remote_rp, u64 *remote_rp_pa)
440{ 467{
441 int bres, i; 468 int bres, i;
442 469
443 470
444 /* get the reserved page's physical address */ 471 /* get the reserved page's physical address */
445 472
446 *remote_rsvd_page_pa = xpc_get_rsvd_page_pa(nasid, (u64) remote_rp, 473 *remote_rp_pa = xpc_get_rsvd_page_pa(nasid);
447 XPC_RSVD_PAGE_ALIGNED_SIZE); 474 if (*remote_rp_pa == 0) {
448 if (*remote_rsvd_page_pa == 0) {
449 return xpcNoRsvdPageAddr; 475 return xpcNoRsvdPageAddr;
450 } 476 }
451 477
452 478
453 /* pull over the reserved page structure */ 479 /* pull over the reserved page header and part_nasids mask */
454 480
455 bres = xp_bte_copy(*remote_rsvd_page_pa, ia64_tpa((u64) remote_rp), 481 bres = xp_bte_copy(*remote_rp_pa, ia64_tpa((u64) remote_rp),
456 XPC_RSVD_PAGE_ALIGNED_SIZE, 482 XPC_RP_HEADER_SIZE + xp_nasid_mask_bytes,
457 (BTE_NOTIFY | BTE_WACQUIRE), NULL); 483 (BTE_NOTIFY | BTE_WACQUIRE), NULL);
458 if (bres != BTE_SUCCESS) { 484 if (bres != BTE_SUCCESS) {
459 return xpc_map_bte_errors(bres); 485 return xpc_map_bte_errors(bres);
@@ -461,8 +487,11 @@ xpc_get_remote_rp(int nasid, u64 *discovered_nasids,
461 487
462 488
463 if (discovered_nasids != NULL) { 489 if (discovered_nasids != NULL) {
464 for (i = 0; i < XP_NASID_MASK_WORDS; i++) { 490 u64 *remote_part_nasids = XPC_RP_PART_NASIDS(remote_rp);
465 discovered_nasids[i] |= remote_rp->part_nasids[i]; 491
492
493 for (i = 0; i < xp_nasid_mask_words; i++) {
494 discovered_nasids[i] |= remote_part_nasids[i];
466 } 495 }
467 } 496 }
468 497
@@ -489,10 +518,10 @@ xpc_get_remote_rp(int nasid, u64 *discovered_nasids,
489 518
490 519
491/* 520/*
492 * Get a copy of the remote partition's XPC variables. 521 * Get a copy of the remote partition's XPC variables from the reserved page.
493 * 522 *
494 * remote_vars points to a buffer that is cacheline aligned for BTE copies and 523 * remote_vars points to a buffer that is cacheline aligned for BTE copies and
495 * assumed to be of size XPC_VARS_ALIGNED_SIZE. 524 * assumed to be of size XPC_RP_VARS_SIZE.
496 */ 525 */
497static enum xpc_retval 526static enum xpc_retval
498xpc_get_remote_vars(u64 remote_vars_pa, struct xpc_vars *remote_vars) 527xpc_get_remote_vars(u64 remote_vars_pa, struct xpc_vars *remote_vars)
@@ -508,7 +537,7 @@ xpc_get_remote_vars(u64 remote_vars_pa, struct xpc_vars *remote_vars)
508 /* pull over the cross partition variables */ 537 /* pull over the cross partition variables */
509 538
510 bres = xp_bte_copy(remote_vars_pa, ia64_tpa((u64) remote_vars), 539 bres = xp_bte_copy(remote_vars_pa, ia64_tpa((u64) remote_vars),
511 XPC_VARS_ALIGNED_SIZE, 540 XPC_RP_VARS_SIZE,
512 (BTE_NOTIFY | BTE_WACQUIRE), NULL); 541 (BTE_NOTIFY | BTE_WACQUIRE), NULL);
513 if (bres != BTE_SUCCESS) { 542 if (bres != BTE_SUCCESS) {
514 return xpc_map_bte_errors(bres); 543 return xpc_map_bte_errors(bres);
@@ -524,7 +553,56 @@ xpc_get_remote_vars(u64 remote_vars_pa, struct xpc_vars *remote_vars)
524 553
525 554
526/* 555/*
527 * Prior code has determine the nasid which generated an IPI. Inspect 556 * Update the remote partition's info.
557 */
558static void
559xpc_update_partition_info(struct xpc_partition *part, u8 remote_rp_version,
560 struct timespec *remote_rp_stamp, u64 remote_rp_pa,
561 u64 remote_vars_pa, struct xpc_vars *remote_vars)
562{
563 part->remote_rp_version = remote_rp_version;
564 dev_dbg(xpc_part, " remote_rp_version = 0x%016lx\n",
565 part->remote_rp_version);
566
567 part->remote_rp_stamp = *remote_rp_stamp;
568 dev_dbg(xpc_part, " remote_rp_stamp (tv_sec = 0x%lx tv_nsec = 0x%lx\n",
569 part->remote_rp_stamp.tv_sec, part->remote_rp_stamp.tv_nsec);
570
571 part->remote_rp_pa = remote_rp_pa;
572 dev_dbg(xpc_part, " remote_rp_pa = 0x%016lx\n", part->remote_rp_pa);
573
574 part->remote_vars_pa = remote_vars_pa;
575 dev_dbg(xpc_part, " remote_vars_pa = 0x%016lx\n",
576 part->remote_vars_pa);
577
578 part->last_heartbeat = remote_vars->heartbeat;
579 dev_dbg(xpc_part, " last_heartbeat = 0x%016lx\n",
580 part->last_heartbeat);
581
582 part->remote_vars_part_pa = remote_vars->vars_part_pa;
583 dev_dbg(xpc_part, " remote_vars_part_pa = 0x%016lx\n",
584 part->remote_vars_part_pa);
585
586 part->remote_act_nasid = remote_vars->act_nasid;
587 dev_dbg(xpc_part, " remote_act_nasid = 0x%x\n",
588 part->remote_act_nasid);
589
590 part->remote_act_phys_cpuid = remote_vars->act_phys_cpuid;
591 dev_dbg(xpc_part, " remote_act_phys_cpuid = 0x%x\n",
592 part->remote_act_phys_cpuid);
593
594 part->remote_amos_page_pa = remote_vars->amos_page_pa;
595 dev_dbg(xpc_part, " remote_amos_page_pa = 0x%lx\n",
596 part->remote_amos_page_pa);
597
598 part->remote_vars_version = remote_vars->version;
599 dev_dbg(xpc_part, " remote_vars_version = 0x%x\n",
600 part->remote_vars_version);
601}
602
603
604/*
605 * Prior code has determined the nasid which generated an IPI. Inspect
528 * that nasid to determine if its partition needs to be activated or 606 * that nasid to determine if its partition needs to be activated or
529 * deactivated. 607 * deactivated.
530 * 608 *
@@ -542,8 +620,12 @@ xpc_identify_act_IRQ_req(int nasid)
542{ 620{
543 struct xpc_rsvd_page *remote_rp; 621 struct xpc_rsvd_page *remote_rp;
544 struct xpc_vars *remote_vars; 622 struct xpc_vars *remote_vars;
545 u64 remote_rsvd_page_pa; 623 u64 remote_rp_pa;
546 u64 remote_vars_pa; 624 u64 remote_vars_pa;
625 int remote_rp_version;
626 int reactivate = 0;
627 int stamp_diff;
628 struct timespec remote_rp_stamp = { 0, 0 };
547 partid_t partid; 629 partid_t partid;
548 struct xpc_partition *part; 630 struct xpc_partition *part;
549 enum xpc_retval ret; 631 enum xpc_retval ret;
@@ -553,7 +635,7 @@ xpc_identify_act_IRQ_req(int nasid)
553 635
554 remote_rp = (struct xpc_rsvd_page *) xpc_remote_copy_buffer; 636 remote_rp = (struct xpc_rsvd_page *) xpc_remote_copy_buffer;
555 637
556 ret = xpc_get_remote_rp(nasid, NULL, remote_rp, &remote_rsvd_page_pa); 638 ret = xpc_get_remote_rp(nasid, NULL, remote_rp, &remote_rp_pa);
557 if (ret != xpcSuccess) { 639 if (ret != xpcSuccess) {
558 dev_warn(xpc_part, "unable to get reserved page from nasid %d, " 640 dev_warn(xpc_part, "unable to get reserved page from nasid %d, "
559 "which sent interrupt, reason=%d\n", nasid, ret); 641 "which sent interrupt, reason=%d\n", nasid, ret);
@@ -561,6 +643,10 @@ xpc_identify_act_IRQ_req(int nasid)
561 } 643 }
562 644
563 remote_vars_pa = remote_rp->vars_pa; 645 remote_vars_pa = remote_rp->vars_pa;
646 remote_rp_version = remote_rp->version;
647 if (XPC_SUPPORTS_RP_STAMP(remote_rp_version)) {
648 remote_rp_stamp = remote_rp->stamp;
649 }
564 partid = remote_rp->partid; 650 partid = remote_rp->partid;
565 part = &xpc_partitions[partid]; 651 part = &xpc_partitions[partid];
566 652
@@ -586,44 +672,117 @@ xpc_identify_act_IRQ_req(int nasid)
586 "%ld:0x%lx\n", (int) nasid, (int) partid, part->act_IRQ_rcvd, 672 "%ld:0x%lx\n", (int) nasid, (int) partid, part->act_IRQ_rcvd,
587 remote_vars->heartbeat, remote_vars->heartbeating_to_mask); 673 remote_vars->heartbeat, remote_vars->heartbeating_to_mask);
588 674
675 if (xpc_partition_disengaged(part) &&
676 part->act_state == XPC_P_INACTIVE) {
589 677
590 if (part->act_state == XPC_P_INACTIVE) { 678 xpc_update_partition_info(part, remote_rp_version,
679 &remote_rp_stamp, remote_rp_pa,
680 remote_vars_pa, remote_vars);
591 681
592 part->remote_rp_pa = remote_rsvd_page_pa; 682 if (XPC_SUPPORTS_DISENGAGE_REQUEST(part->remote_vars_version)) {
593 dev_dbg(xpc_part, " remote_rp_pa = 0x%016lx\n", 683 if (xpc_partition_disengage_requested(1UL << partid)) {
594 part->remote_rp_pa); 684 /*
685 * Other side is waiting on us to disengage,
686 * even though we already have.
687 */
688 return;
689 }
690 } else {
691 /* other side doesn't support disengage requests */
692 xpc_clear_partition_disengage_request(1UL << partid);
693 }
595 694
596 part->remote_vars_pa = remote_vars_pa; 695 xpc_activate_partition(part);
597 dev_dbg(xpc_part, " remote_vars_pa = 0x%016lx\n", 696 return;
598 part->remote_vars_pa); 697 }
599 698
600 part->last_heartbeat = remote_vars->heartbeat; 699 DBUG_ON(part->remote_rp_version == 0);
601 dev_dbg(xpc_part, " last_heartbeat = 0x%016lx\n", 700 DBUG_ON(part->remote_vars_version == 0);
602 part->last_heartbeat); 701
702 if (!XPC_SUPPORTS_RP_STAMP(part->remote_rp_version)) {
703 DBUG_ON(XPC_SUPPORTS_DISENGAGE_REQUEST(part->
704 remote_vars_version));
705
706 if (!XPC_SUPPORTS_RP_STAMP(remote_rp_version)) {
707 DBUG_ON(XPC_SUPPORTS_DISENGAGE_REQUEST(remote_vars->
708 version));
709 /* see if the other side rebooted */
710 if (part->remote_amos_page_pa ==
711 remote_vars->amos_page_pa &&
712 xpc_hb_allowed(sn_partition_id,
713 remote_vars)) {
714 /* doesn't look that way, so ignore the IPI */
715 return;
716 }
717 }
603 718
604 part->remote_vars_part_pa = remote_vars->vars_part_pa; 719 /*
605 dev_dbg(xpc_part, " remote_vars_part_pa = 0x%016lx\n", 720 * Other side rebooted and previous XPC didn't support the
606 part->remote_vars_part_pa); 721 * disengage request, so we don't need to do anything special.
722 */
607 723
608 part->remote_act_nasid = remote_vars->act_nasid; 724 xpc_update_partition_info(part, remote_rp_version,
609 dev_dbg(xpc_part, " remote_act_nasid = 0x%x\n", 725 &remote_rp_stamp, remote_rp_pa,
610 part->remote_act_nasid); 726 remote_vars_pa, remote_vars);
727 part->reactivate_nasid = nasid;
728 XPC_DEACTIVATE_PARTITION(part, xpcReactivating);
729 return;
730 }
611 731
612 part->remote_act_phys_cpuid = remote_vars->act_phys_cpuid; 732 DBUG_ON(!XPC_SUPPORTS_DISENGAGE_REQUEST(part->remote_vars_version));
613 dev_dbg(xpc_part, " remote_act_phys_cpuid = 0x%x\n",
614 part->remote_act_phys_cpuid);
615 733
616 part->remote_amos_page_pa = remote_vars->amos_page_pa; 734 if (!XPC_SUPPORTS_RP_STAMP(remote_rp_version)) {
617 dev_dbg(xpc_part, " remote_amos_page_pa = 0x%lx\n", 735 DBUG_ON(!XPC_SUPPORTS_DISENGAGE_REQUEST(remote_vars->version));
618 part->remote_amos_page_pa);
619 736
620 xpc_activate_partition(part); 737 /*
738 * Other side rebooted and previous XPC did support the
739 * disengage request, but the new one doesn't.
740 */
741
742 xpc_clear_partition_engaged(1UL << partid);
743 xpc_clear_partition_disengage_request(1UL << partid);
621 744
622 } else if (part->remote_amos_page_pa != remote_vars->amos_page_pa || 745 xpc_update_partition_info(part, remote_rp_version,
623 !XPC_HB_ALLOWED(sn_partition_id, remote_vars)) { 746 &remote_rp_stamp, remote_rp_pa,
747 remote_vars_pa, remote_vars);
748 reactivate = 1;
749
750 } else {
751 DBUG_ON(!XPC_SUPPORTS_DISENGAGE_REQUEST(remote_vars->version));
624 752
753 stamp_diff = xpc_compare_stamps(&part->remote_rp_stamp,
754 &remote_rp_stamp);
755 if (stamp_diff != 0) {
756 DBUG_ON(stamp_diff >= 0);
757
758 /*
759 * Other side rebooted and the previous XPC did support
760 * the disengage request, as does the new one.
761 */
762
763 DBUG_ON(xpc_partition_engaged(1UL << partid));
764 DBUG_ON(xpc_partition_disengage_requested(1UL <<
765 partid));
766
767 xpc_update_partition_info(part, remote_rp_version,
768 &remote_rp_stamp, remote_rp_pa,
769 remote_vars_pa, remote_vars);
770 reactivate = 1;
771 }
772 }
773
774 if (!xpc_partition_disengaged(part)) {
775 /* still waiting on other side to disengage from us */
776 return;
777 }
778
779 if (reactivate) {
625 part->reactivate_nasid = nasid; 780 part->reactivate_nasid = nasid;
626 XPC_DEACTIVATE_PARTITION(part, xpcReactivating); 781 XPC_DEACTIVATE_PARTITION(part, xpcReactivating);
782
783 } else if (XPC_SUPPORTS_DISENGAGE_REQUEST(part->remote_vars_version) &&
784 xpc_partition_disengage_requested(1UL << partid)) {
785 XPC_DEACTIVATE_PARTITION(part, xpcOtherGoingDown);
627 } 786 }
628} 787}
629 788
@@ -643,14 +802,17 @@ xpc_identify_act_IRQ_sender(void)
643 u64 nasid; /* remote nasid */ 802 u64 nasid; /* remote nasid */
644 int n_IRQs_detected = 0; 803 int n_IRQs_detected = 0;
645 AMO_t *act_amos; 804 AMO_t *act_amos;
646 struct xpc_rsvd_page *rp = (struct xpc_rsvd_page *) xpc_rsvd_page;
647 805
648 806
649 act_amos = xpc_vars->act_amos; 807 act_amos = xpc_vars->amos_page + XPC_ACTIVATE_IRQ_AMOS;
650 808
651 809
652 /* scan through act AMO variable looking for non-zero entries */ 810 /* scan through act AMO variable looking for non-zero entries */
653 for (word = 0; word < XP_NASID_MASK_WORDS; word++) { 811 for (word = 0; word < xp_nasid_mask_words; word++) {
812
813 if (xpc_exiting) {
814 break;
815 }
654 816
655 nasid_mask = xpc_IPI_receive(&act_amos[word]); 817 nasid_mask = xpc_IPI_receive(&act_amos[word]);
656 if (nasid_mask == 0) { 818 if (nasid_mask == 0) {
@@ -668,7 +830,7 @@ xpc_identify_act_IRQ_sender(void)
668 * remote nasid in our reserved pages machine mask. 830 * remote nasid in our reserved pages machine mask.
669 * This is used in the event of module reload. 831 * This is used in the event of module reload.
670 */ 832 */
671 rp->mach_nasids[word] |= nasid_mask; 833 xpc_mach_nasids[word] |= nasid_mask;
672 834
673 835
674 /* locate the nasid(s) which sent interrupts */ 836 /* locate the nasid(s) which sent interrupts */
@@ -688,6 +850,55 @@ xpc_identify_act_IRQ_sender(void)
688 850
689 851
690/* 852/*
853 * See if the other side has responded to a partition disengage request
854 * from us.
855 */
856int
857xpc_partition_disengaged(struct xpc_partition *part)
858{
859 partid_t partid = XPC_PARTID(part);
860 int disengaged;
861
862
863 disengaged = (xpc_partition_engaged(1UL << partid) == 0);
864 if (part->disengage_request_timeout) {
865 if (!disengaged) {
866 if (jiffies < part->disengage_request_timeout) {
867 /* timelimit hasn't been reached yet */
868 return 0;
869 }
870
871 /*
872 * Other side hasn't responded to our disengage
873 * request in a timely fashion, so assume it's dead.
874 */
875
876 xpc_clear_partition_engaged(1UL << partid);
877 disengaged = 1;
878 }
879 part->disengage_request_timeout = 0;
880
881 /* cancel the timer function, provided it's not us */
882 if (!in_interrupt()) {
883 del_singleshot_timer_sync(&part->
884 disengage_request_timer);
885 }
886
887 DBUG_ON(part->act_state != XPC_P_DEACTIVATING &&
888 part->act_state != XPC_P_INACTIVE);
889 if (part->act_state != XPC_P_INACTIVE) {
890 xpc_wakeup_channel_mgr(part);
891 }
892
893 if (XPC_SUPPORTS_DISENGAGE_REQUEST(part->remote_vars_version)) {
894 xpc_cancel_partition_disengage_request(part);
895 }
896 }
897 return disengaged;
898}
899
900
901/*
691 * Mark specified partition as active. 902 * Mark specified partition as active.
692 */ 903 */
693enum xpc_retval 904enum xpc_retval
@@ -721,7 +932,6 @@ xpc_deactivate_partition(const int line, struct xpc_partition *part,
721 enum xpc_retval reason) 932 enum xpc_retval reason)
722{ 933{
723 unsigned long irq_flags; 934 unsigned long irq_flags;
724 partid_t partid = XPC_PARTID(part);
725 935
726 936
727 spin_lock_irqsave(&part->act_lock, irq_flags); 937 spin_lock_irqsave(&part->act_lock, irq_flags);
@@ -749,17 +959,27 @@ xpc_deactivate_partition(const int line, struct xpc_partition *part,
749 959
750 spin_unlock_irqrestore(&part->act_lock, irq_flags); 960 spin_unlock_irqrestore(&part->act_lock, irq_flags);
751 961
752 XPC_DISALLOW_HB(partid, xpc_vars); 962 if (XPC_SUPPORTS_DISENGAGE_REQUEST(part->remote_vars_version)) {
963 xpc_request_partition_disengage(part);
964 xpc_IPI_send_disengage(part);
753 965
754 dev_dbg(xpc_part, "bringing partition %d down, reason = %d\n", partid, 966 /* set a timelimit on the disengage request */
755 reason); 967 part->disengage_request_timeout = jiffies +
968 (xpc_disengage_request_timelimit * HZ);
969 part->disengage_request_timer.expires =
970 part->disengage_request_timeout;
971 add_timer(&part->disengage_request_timer);
972 }
973
974 dev_dbg(xpc_part, "bringing partition %d down, reason = %d\n",
975 XPC_PARTID(part), reason);
756 976
757 xpc_partition_down(part, reason); 977 xpc_partition_going_down(part, reason);
758} 978}
759 979
760 980
761/* 981/*
762 * Mark specified partition as active. 982 * Mark specified partition as inactive.
763 */ 983 */
764void 984void
765xpc_mark_partition_inactive(struct xpc_partition *part) 985xpc_mark_partition_inactive(struct xpc_partition *part)
@@ -792,9 +1012,10 @@ xpc_discovery(void)
792 void *remote_rp_base; 1012 void *remote_rp_base;
793 struct xpc_rsvd_page *remote_rp; 1013 struct xpc_rsvd_page *remote_rp;
794 struct xpc_vars *remote_vars; 1014 struct xpc_vars *remote_vars;
795 u64 remote_rsvd_page_pa; 1015 u64 remote_rp_pa;
796 u64 remote_vars_pa; 1016 u64 remote_vars_pa;
797 int region; 1017 int region;
1018 int region_size;
798 int max_regions; 1019 int max_regions;
799 int nasid; 1020 int nasid;
800 struct xpc_rsvd_page *rp; 1021 struct xpc_rsvd_page *rp;
@@ -804,7 +1025,8 @@ xpc_discovery(void)
804 enum xpc_retval ret; 1025 enum xpc_retval ret;
805 1026
806 1027
807 remote_rp = xpc_kmalloc_cacheline_aligned(XPC_RSVD_PAGE_ALIGNED_SIZE, 1028 remote_rp = xpc_kmalloc_cacheline_aligned(XPC_RP_HEADER_SIZE +
1029 xp_nasid_mask_bytes,
808 GFP_KERNEL, &remote_rp_base); 1030 GFP_KERNEL, &remote_rp_base);
809 if (remote_rp == NULL) { 1031 if (remote_rp == NULL) {
810 return; 1032 return;
@@ -812,13 +1034,13 @@ xpc_discovery(void)
812 remote_vars = (struct xpc_vars *) remote_rp; 1034 remote_vars = (struct xpc_vars *) remote_rp;
813 1035
814 1036
815 discovered_nasids = kmalloc(sizeof(u64) * XP_NASID_MASK_WORDS, 1037 discovered_nasids = kmalloc(sizeof(u64) * xp_nasid_mask_words,
816 GFP_KERNEL); 1038 GFP_KERNEL);
817 if (discovered_nasids == NULL) { 1039 if (discovered_nasids == NULL) {
818 kfree(remote_rp_base); 1040 kfree(remote_rp_base);
819 return; 1041 return;
820 } 1042 }
821 memset(discovered_nasids, 0, sizeof(u64) * XP_NASID_MASK_WORDS); 1043 memset(discovered_nasids, 0, sizeof(u64) * xp_nasid_mask_words);
822 1044
823 rp = (struct xpc_rsvd_page *) xpc_rsvd_page; 1045 rp = (struct xpc_rsvd_page *) xpc_rsvd_page;
824 1046
@@ -827,11 +1049,19 @@ xpc_discovery(void)
827 * nodes that can comprise an access protection grouping. The access 1049 * nodes that can comprise an access protection grouping. The access
828 * protection is in regards to memory, IOI and IPI. 1050 * protection is in regards to memory, IOI and IPI.
829 */ 1051 */
830//>>> move the next two #defines into either include/asm-ia64/sn/arch.h or 1052 max_regions = 64;
831//>>> include/asm-ia64/sn/addrs.h 1053 region_size = sn_region_size;
832#define SH1_MAX_REGIONS 64 1054
833#define SH2_MAX_REGIONS 256 1055 switch (region_size) {
834 max_regions = is_shub2() ? SH2_MAX_REGIONS : SH1_MAX_REGIONS; 1056 case 128:
1057 max_regions *= 2;
1058 case 64:
1059 max_regions *= 2;
1060 case 32:
1061 max_regions *= 2;
1062 region_size = 16;
1063 DBUG_ON(!is_shub2());
1064 }
835 1065
836 for (region = 0; region < max_regions; region++) { 1066 for (region = 0; region < max_regions; region++) {
837 1067
@@ -841,8 +1071,8 @@ xpc_discovery(void)
841 1071
842 dev_dbg(xpc_part, "searching region %d\n", region); 1072 dev_dbg(xpc_part, "searching region %d\n", region);
843 1073
844 for (nasid = (region * sn_region_size * 2); 1074 for (nasid = (region * region_size * 2);
845 nasid < ((region + 1) * sn_region_size * 2); 1075 nasid < ((region + 1) * region_size * 2);
846 nasid += 2) { 1076 nasid += 2) {
847 1077
848 if ((volatile int) xpc_exiting) { 1078 if ((volatile int) xpc_exiting) {
@@ -852,14 +1082,14 @@ xpc_discovery(void)
852 dev_dbg(xpc_part, "checking nasid %d\n", nasid); 1082 dev_dbg(xpc_part, "checking nasid %d\n", nasid);
853 1083
854 1084
855 if (XPC_NASID_IN_ARRAY(nasid, rp->part_nasids)) { 1085 if (XPC_NASID_IN_ARRAY(nasid, xpc_part_nasids)) {
856 dev_dbg(xpc_part, "PROM indicates Nasid %d is " 1086 dev_dbg(xpc_part, "PROM indicates Nasid %d is "
857 "part of the local partition; skipping " 1087 "part of the local partition; skipping "
858 "region\n", nasid); 1088 "region\n", nasid);
859 break; 1089 break;
860 } 1090 }
861 1091
862 if (!(XPC_NASID_IN_ARRAY(nasid, rp->mach_nasids))) { 1092 if (!(XPC_NASID_IN_ARRAY(nasid, xpc_mach_nasids))) {
863 dev_dbg(xpc_part, "PROM indicates Nasid %d was " 1093 dev_dbg(xpc_part, "PROM indicates Nasid %d was "
864 "not on Numa-Link network at reset\n", 1094 "not on Numa-Link network at reset\n",
865 nasid); 1095 nasid);
@@ -877,7 +1107,7 @@ xpc_discovery(void)
877 /* pull over the reserved page structure */ 1107 /* pull over the reserved page structure */
878 1108
879 ret = xpc_get_remote_rp(nasid, discovered_nasids, 1109 ret = xpc_get_remote_rp(nasid, discovered_nasids,
880 remote_rp, &remote_rsvd_page_pa); 1110 remote_rp, &remote_rp_pa);
881 if (ret != xpcSuccess) { 1111 if (ret != xpcSuccess) {
882 dev_dbg(xpc_part, "unable to get reserved page " 1112 dev_dbg(xpc_part, "unable to get reserved page "
883 "from nasid %d, reason=%d\n", nasid, 1113 "from nasid %d, reason=%d\n", nasid,
@@ -948,6 +1178,13 @@ xpc_discovery(void)
948 remote_vars->act_nasid, 1178 remote_vars->act_nasid,
949 remote_vars->act_phys_cpuid); 1179 remote_vars->act_phys_cpuid);
950 1180
1181 if (XPC_SUPPORTS_DISENGAGE_REQUEST(remote_vars->
1182 version)) {
1183 part->remote_amos_page_pa =
1184 remote_vars->amos_page_pa;
1185 xpc_mark_partition_disengaged(part);
1186 xpc_cancel_partition_disengage_request(part);
1187 }
951 xpc_IPI_send_activate(remote_vars); 1188 xpc_IPI_send_activate(remote_vars);
952 } 1189 }
953 } 1190 }
@@ -974,12 +1211,12 @@ xpc_initiate_partid_to_nasids(partid_t partid, void *nasid_mask)
974 return xpcPartitionDown; 1211 return xpcPartitionDown;
975 } 1212 }
976 1213
977 part_nasid_pa = part->remote_rp_pa + 1214 memset(nasid_mask, 0, XP_NASID_MASK_BYTES);
978 (u64) &((struct xpc_rsvd_page *) 0)->part_nasids; 1215
1216 part_nasid_pa = (u64) XPC_RP_PART_NASIDS(part->remote_rp_pa);
979 1217
980 bte_res = xp_bte_copy(part_nasid_pa, ia64_tpa((u64) nasid_mask), 1218 bte_res = xp_bte_copy(part_nasid_pa, ia64_tpa((u64) nasid_mask),
981 L1_CACHE_ALIGN(XP_NASID_MASK_BYTES), 1219 xp_nasid_mask_bytes, (BTE_NOTIFY | BTE_WACQUIRE), NULL);
982 (BTE_NOTIFY | BTE_WACQUIRE), NULL);
983 1220
984 return xpc_map_bte_errors(bte_res); 1221 return xpc_map_bte_errors(bte_res);
985} 1222}
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c
index 0e4b9ad9ef02..9bf9f23b9a1f 100644
--- a/arch/ia64/sn/pci/pci_dma.c
+++ b/arch/ia64/sn/pci/pci_dma.c
@@ -75,7 +75,7 @@ EXPORT_SYMBOL(sn_dma_set_mask);
75 * more information. 75 * more information.
76 */ 76 */
77void *sn_dma_alloc_coherent(struct device *dev, size_t size, 77void *sn_dma_alloc_coherent(struct device *dev, size_t size,
78 dma_addr_t * dma_handle, int flags) 78 dma_addr_t * dma_handle, gfp_t flags)
79{ 79{
80 void *cpuaddr; 80 void *cpuaddr;
81 unsigned long phys_addr; 81 unsigned long phys_addr;
@@ -326,6 +326,29 @@ int sn_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
326{ 326{
327 unsigned long addr; 327 unsigned long addr;
328 int ret; 328 int ret;
329 struct ia64_sal_retval isrv;
330
331 /*
332 * First, try the SN_SAL_IOIF_PCI_SAFE SAL call which can work
333 * around hw issues at the pci bus level. SGI proms older than
334 * 4.10 don't implment this.
335 */
336
337 SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE,
338 pci_domain_nr(bus), bus->number,
339 0, /* io */
340 0, /* read */
341 port, size, __pa(val));
342
343 if (isrv.status == 0)
344 return size;
345
346 /*
347 * If the above failed, retry using the SAL_PROBE call which should
348 * be present in all proms (but which cannot work round PCI chipset
349 * bugs). This code is retained for compatability with old
350 * pre-4.10 proms, and should be removed at some point in the future.
351 */
329 352
330 if (!SN_PCIBUS_BUSSOFT(bus)) 353 if (!SN_PCIBUS_BUSSOFT(bus))
331 return -ENODEV; 354 return -ENODEV;
@@ -349,6 +372,29 @@ int sn_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
349 int ret = size; 372 int ret = size;
350 unsigned long paddr; 373 unsigned long paddr;
351 unsigned long *addr; 374 unsigned long *addr;
375 struct ia64_sal_retval isrv;
376
377 /*
378 * First, try the SN_SAL_IOIF_PCI_SAFE SAL call which can work
379 * around hw issues at the pci bus level. SGI proms older than
380 * 4.10 don't implment this.
381 */
382
383 SAL_CALL(isrv, SN_SAL_IOIF_PCI_SAFE,
384 pci_domain_nr(bus), bus->number,
385 0, /* io */
386 1, /* write */
387 port, size, __pa(&val));
388
389 if (isrv.status == 0)
390 return size;
391
392 /*
393 * If the above failed, retry using the SAL_PROBE call which should
394 * be present in all proms (but which cannot work round PCI chipset
395 * bugs). This code is retained for compatability with old
396 * pre-4.10 proms, and should be removed at some point in the future.
397 */
352 398
353 if (!SN_PCIBUS_BUSSOFT(bus)) { 399 if (!SN_PCIBUS_BUSSOFT(bus)) {
354 ret = -ENODEV; 400 ret = -ENODEV;
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 7b03b8084ffc..1f500c81002c 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -212,13 +212,13 @@ void pcibr_target_interrupt(struct sn_irq_info *sn_irq_info)
212 pdi_pcibus_info; 212 pdi_pcibus_info;
213 213
214 /* Disable the device's IRQ */ 214 /* Disable the device's IRQ */
215 pcireg_intr_enable_bit_clr(pcibus_info, bit); 215 pcireg_intr_enable_bit_clr(pcibus_info, (1 << bit));
216 216
217 /* Change the device's IRQ */ 217 /* Change the device's IRQ */
218 pcireg_intr_addr_addr_set(pcibus_info, bit, xtalk_addr); 218 pcireg_intr_addr_addr_set(pcibus_info, bit, xtalk_addr);
219 219
220 /* Re-enable the device's IRQ */ 220 /* Re-enable the device's IRQ */
221 pcireg_intr_enable_bit_set(pcibus_info, bit); 221 pcireg_intr_enable_bit_set(pcibus_info, (1 << bit));
222 222
223 pcibr_force_interrupt(sn_irq_info); 223 pcibr_force_interrupt(sn_irq_info);
224 } 224 }
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_reg.c b/arch/ia64/sn/pci/pcibr/pcibr_reg.c
index 21426d02fbe6..5d534091262c 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_reg.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_reg.c
@@ -8,6 +8,7 @@
8 8
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/types.h> 10#include <linux/types.h>
11#include <asm/sn/io.h>
11#include <asm/sn/pcibr_provider.h> 12#include <asm/sn/pcibr_provider.h>
12#include <asm/sn/pcibus_provider_defs.h> 13#include <asm/sn/pcibus_provider_defs.h>
13#include <asm/sn/pcidev.h> 14#include <asm/sn/pcidev.h>
@@ -29,10 +30,10 @@ void pcireg_control_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits)
29 if (pcibus_info) { 30 if (pcibus_info) {
30 switch (pcibus_info->pbi_bridge_type) { 31 switch (pcibus_info->pbi_bridge_type) {
31 case PCIBR_BRIDGETYPE_TIOCP: 32 case PCIBR_BRIDGETYPE_TIOCP:
32 ptr->tio.cp_control &= ~bits; 33 __sn_clrq_relaxed(&ptr->tio.cp_control, bits);
33 break; 34 break;
34 case PCIBR_BRIDGETYPE_PIC: 35 case PCIBR_BRIDGETYPE_PIC:
35 ptr->pic.p_wid_control &= ~bits; 36 __sn_clrq_relaxed(&ptr->pic.p_wid_control, bits);
36 break; 37 break;
37 default: 38 default:
38 panic 39 panic
@@ -49,10 +50,10 @@ void pcireg_control_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
49 if (pcibus_info) { 50 if (pcibus_info) {
50 switch (pcibus_info->pbi_bridge_type) { 51 switch (pcibus_info->pbi_bridge_type) {
51 case PCIBR_BRIDGETYPE_TIOCP: 52 case PCIBR_BRIDGETYPE_TIOCP:
52 ptr->tio.cp_control |= bits; 53 __sn_setq_relaxed(&ptr->tio.cp_control, bits);
53 break; 54 break;
54 case PCIBR_BRIDGETYPE_PIC: 55 case PCIBR_BRIDGETYPE_PIC:
55 ptr->pic.p_wid_control |= bits; 56 __sn_setq_relaxed(&ptr->pic.p_wid_control, bits);
56 break; 57 break;
57 default: 58 default:
58 panic 59 panic
@@ -73,10 +74,10 @@ uint64_t pcireg_tflush_get(struct pcibus_info *pcibus_info)
73 if (pcibus_info) { 74 if (pcibus_info) {
74 switch (pcibus_info->pbi_bridge_type) { 75 switch (pcibus_info->pbi_bridge_type) {
75 case PCIBR_BRIDGETYPE_TIOCP: 76 case PCIBR_BRIDGETYPE_TIOCP:
76 ret = ptr->tio.cp_tflush; 77 ret = __sn_readq_relaxed(&ptr->tio.cp_tflush);
77 break; 78 break;
78 case PCIBR_BRIDGETYPE_PIC: 79 case PCIBR_BRIDGETYPE_PIC:
79 ret = ptr->pic.p_wid_tflush; 80 ret = __sn_readq_relaxed(&ptr->pic.p_wid_tflush);
80 break; 81 break;
81 default: 82 default:
82 panic 83 panic
@@ -103,10 +104,10 @@ uint64_t pcireg_intr_status_get(struct pcibus_info * pcibus_info)
103 if (pcibus_info) { 104 if (pcibus_info) {
104 switch (pcibus_info->pbi_bridge_type) { 105 switch (pcibus_info->pbi_bridge_type) {
105 case PCIBR_BRIDGETYPE_TIOCP: 106 case PCIBR_BRIDGETYPE_TIOCP:
106 ret = ptr->tio.cp_int_status; 107 ret = __sn_readq_relaxed(&ptr->tio.cp_int_status);
107 break; 108 break;
108 case PCIBR_BRIDGETYPE_PIC: 109 case PCIBR_BRIDGETYPE_PIC:
109 ret = ptr->pic.p_int_status; 110 ret = __sn_readq_relaxed(&ptr->pic.p_int_status);
110 break; 111 break;
111 default: 112 default:
112 panic 113 panic
@@ -127,10 +128,10 @@ void pcireg_intr_enable_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits)
127 if (pcibus_info) { 128 if (pcibus_info) {
128 switch (pcibus_info->pbi_bridge_type) { 129 switch (pcibus_info->pbi_bridge_type) {
129 case PCIBR_BRIDGETYPE_TIOCP: 130 case PCIBR_BRIDGETYPE_TIOCP:
130 ptr->tio.cp_int_enable &= ~bits; 131 __sn_clrq_relaxed(&ptr->tio.cp_int_enable, bits);
131 break; 132 break;
132 case PCIBR_BRIDGETYPE_PIC: 133 case PCIBR_BRIDGETYPE_PIC:
133 ptr->pic.p_int_enable &= ~bits; 134 __sn_clrq_relaxed(&ptr->pic.p_int_enable, bits);
134 break; 135 break;
135 default: 136 default:
136 panic 137 panic
@@ -147,10 +148,10 @@ void pcireg_intr_enable_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
147 if (pcibus_info) { 148 if (pcibus_info) {
148 switch (pcibus_info->pbi_bridge_type) { 149 switch (pcibus_info->pbi_bridge_type) {
149 case PCIBR_BRIDGETYPE_TIOCP: 150 case PCIBR_BRIDGETYPE_TIOCP:
150 ptr->tio.cp_int_enable |= bits; 151 __sn_setq_relaxed(&ptr->tio.cp_int_enable, bits);
151 break; 152 break;
152 case PCIBR_BRIDGETYPE_PIC: 153 case PCIBR_BRIDGETYPE_PIC:
153 ptr->pic.p_int_enable |= bits; 154 __sn_setq_relaxed(&ptr->pic.p_int_enable, bits);
154 break; 155 break;
155 default: 156 default:
156 panic 157 panic
@@ -171,14 +172,16 @@ void pcireg_intr_addr_addr_set(struct pcibus_info *pcibus_info, int int_n,
171 if (pcibus_info) { 172 if (pcibus_info) {
172 switch (pcibus_info->pbi_bridge_type) { 173 switch (pcibus_info->pbi_bridge_type) {
173 case PCIBR_BRIDGETYPE_TIOCP: 174 case PCIBR_BRIDGETYPE_TIOCP:
174 ptr->tio.cp_int_addr[int_n] &= ~TIOCP_HOST_INTR_ADDR; 175 __sn_clrq_relaxed(&ptr->tio.cp_int_addr[int_n],
175 ptr->tio.cp_int_addr[int_n] |= 176 TIOCP_HOST_INTR_ADDR);
176 (addr & TIOCP_HOST_INTR_ADDR); 177 __sn_setq_relaxed(&ptr->tio.cp_int_addr[int_n],
178 (addr & TIOCP_HOST_INTR_ADDR));
177 break; 179 break;
178 case PCIBR_BRIDGETYPE_PIC: 180 case PCIBR_BRIDGETYPE_PIC:
179 ptr->pic.p_int_addr[int_n] &= ~PIC_HOST_INTR_ADDR; 181 __sn_clrq_relaxed(&ptr->pic.p_int_addr[int_n],
180 ptr->pic.p_int_addr[int_n] |= 182 PIC_HOST_INTR_ADDR);
181 (addr & PIC_HOST_INTR_ADDR); 183 __sn_setq_relaxed(&ptr->pic.p_int_addr[int_n],
184 (addr & PIC_HOST_INTR_ADDR));
182 break; 185 break;
183 default: 186 default:
184 panic 187 panic
@@ -198,10 +201,10 @@ void pcireg_force_intr_set(struct pcibus_info *pcibus_info, int int_n)
198 if (pcibus_info) { 201 if (pcibus_info) {
199 switch (pcibus_info->pbi_bridge_type) { 202 switch (pcibus_info->pbi_bridge_type) {
200 case PCIBR_BRIDGETYPE_TIOCP: 203 case PCIBR_BRIDGETYPE_TIOCP:
201 ptr->tio.cp_force_pin[int_n] = 1; 204 writeq(1, &ptr->tio.cp_force_pin[int_n]);
202 break; 205 break;
203 case PCIBR_BRIDGETYPE_PIC: 206 case PCIBR_BRIDGETYPE_PIC:
204 ptr->pic.p_force_pin[int_n] = 1; 207 writeq(1, &ptr->pic.p_force_pin[int_n]);
205 break; 208 break;
206 default: 209 default:
207 panic 210 panic
@@ -222,10 +225,12 @@ uint64_t pcireg_wrb_flush_get(struct pcibus_info *pcibus_info, int device)
222 if (pcibus_info) { 225 if (pcibus_info) {
223 switch (pcibus_info->pbi_bridge_type) { 226 switch (pcibus_info->pbi_bridge_type) {
224 case PCIBR_BRIDGETYPE_TIOCP: 227 case PCIBR_BRIDGETYPE_TIOCP:
225 ret = ptr->tio.cp_wr_req_buf[device]; 228 ret =
229 __sn_readq_relaxed(&ptr->tio.cp_wr_req_buf[device]);
226 break; 230 break;
227 case PCIBR_BRIDGETYPE_PIC: 231 case PCIBR_BRIDGETYPE_PIC:
228 ret = ptr->pic.p_wr_req_buf[device]; 232 ret =
233 __sn_readq_relaxed(&ptr->pic.p_wr_req_buf[device]);
229 break; 234 break;
230 default: 235 default:
231 panic("pcireg_wrb_flush_get: unknown bridgetype bridge 0x%p", (void *)ptr); 236 panic("pcireg_wrb_flush_get: unknown bridgetype bridge 0x%p", (void *)ptr);
@@ -244,10 +249,10 @@ void pcireg_int_ate_set(struct pcibus_info *pcibus_info, int ate_index,
244 if (pcibus_info) { 249 if (pcibus_info) {
245 switch (pcibus_info->pbi_bridge_type) { 250 switch (pcibus_info->pbi_bridge_type) {
246 case PCIBR_BRIDGETYPE_TIOCP: 251 case PCIBR_BRIDGETYPE_TIOCP:
247 ptr->tio.cp_int_ate_ram[ate_index] = (uint64_t) val; 252 writeq(val, &ptr->tio.cp_int_ate_ram[ate_index]);
248 break; 253 break;
249 case PCIBR_BRIDGETYPE_PIC: 254 case PCIBR_BRIDGETYPE_PIC:
250 ptr->pic.p_int_ate_ram[ate_index] = (uint64_t) val; 255 writeq(val, &ptr->pic.p_int_ate_ram[ate_index]);
251 break; 256 break;
252 default: 257 default:
253 panic 258 panic
@@ -265,12 +270,10 @@ uint64_t *pcireg_int_ate_addr(struct pcibus_info *pcibus_info, int ate_index)
265 if (pcibus_info) { 270 if (pcibus_info) {
266 switch (pcibus_info->pbi_bridge_type) { 271 switch (pcibus_info->pbi_bridge_type) {
267 case PCIBR_BRIDGETYPE_TIOCP: 272 case PCIBR_BRIDGETYPE_TIOCP:
268 ret = 273 ret = &ptr->tio.cp_int_ate_ram[ate_index];
269 (uint64_t *) & (ptr->tio.cp_int_ate_ram[ate_index]);
270 break; 274 break;
271 case PCIBR_BRIDGETYPE_PIC: 275 case PCIBR_BRIDGETYPE_PIC:
272 ret = 276 ret = &ptr->pic.p_int_ate_ram[ate_index];
273 (uint64_t *) & (ptr->pic.p_int_ate_ram[ate_index]);
274 break; 277 break;
275 default: 278 default:
276 panic 279 panic
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index 19bced34d5f1..46b646a6d345 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -11,6 +11,7 @@
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <asm/sn/sn_sal.h> 12#include <asm/sn/sn_sal.h>
13#include <asm/sn/addrs.h> 13#include <asm/sn/addrs.h>
14#include <asm/sn/io.h>
14#include <asm/sn/pcidev.h> 15#include <asm/sn/pcidev.h>
15#include <asm/sn/pcibus_provider_defs.h> 16#include <asm/sn/pcibus_provider_defs.h>
16#include <asm/sn/tioca_provider.h> 17#include <asm/sn/tioca_provider.h>
@@ -37,7 +38,7 @@ tioca_gart_init(struct tioca_kernel *tioca_kern)
37 uint64_t offset; 38 uint64_t offset;
38 struct page *tmp; 39 struct page *tmp;
39 struct tioca_common *tioca_common; 40 struct tioca_common *tioca_common;
40 volatile struct tioca *ca_base; 41 struct tioca *ca_base;
41 42
42 tioca_common = tioca_kern->ca_common; 43 tioca_common = tioca_kern->ca_common;
43 ca_base = (struct tioca *)tioca_common->ca_common.bs_base; 44 ca_base = (struct tioca *)tioca_common->ca_common.bs_base;
@@ -174,27 +175,29 @@ tioca_gart_init(struct tioca_kernel *tioca_kern)
174 * DISABLE GART PREFETCHING due to hw bug tracked in SGI PV930029 175 * DISABLE GART PREFETCHING due to hw bug tracked in SGI PV930029
175 */ 176 */
176 177
177 ca_base->ca_control1 |= CA_AGPDMA_OP_ENB_COMBDELAY; /* PV895469 ? */ 178 __sn_setq_relaxed(&ca_base->ca_control1,
178 ca_base->ca_control2 &= ~(CA_GART_MEM_PARAM); 179 CA_AGPDMA_OP_ENB_COMBDELAY); /* PV895469 ? */
179 ca_base->ca_control2 |= (0x2ull << CA_GART_MEM_PARAM_SHFT); 180 __sn_clrq_relaxed(&ca_base->ca_control2, CA_GART_MEM_PARAM);
181 __sn_setq_relaxed(&ca_base->ca_control2,
182 (0x2ull << CA_GART_MEM_PARAM_SHFT));
180 tioca_kern->ca_gart_iscoherent = 1; 183 tioca_kern->ca_gart_iscoherent = 1;
181 ca_base->ca_control2 &= 184 __sn_clrq_relaxed(&ca_base->ca_control2,
182 ~(CA_GART_WR_PREFETCH_ENB | CA_GART_RD_PREFETCH_ENB); 185 (CA_GART_WR_PREFETCH_ENB | CA_GART_RD_PREFETCH_ENB));
183 186
184 /* 187 /*
185 * Unmask GART fetch error interrupts. Clear residual errors first. 188 * Unmask GART fetch error interrupts. Clear residual errors first.
186 */ 189 */
187 190
188 ca_base->ca_int_status_alias = CA_GART_FETCH_ERR; 191 writeq(CA_GART_FETCH_ERR, &ca_base->ca_int_status_alias);
189 ca_base->ca_mult_error_alias = CA_GART_FETCH_ERR; 192 writeq(CA_GART_FETCH_ERR, &ca_base->ca_mult_error_alias);
190 ca_base->ca_int_mask &= ~CA_GART_FETCH_ERR; 193 __sn_clrq_relaxed(&ca_base->ca_int_mask, CA_GART_FETCH_ERR);
191 194
192 /* 195 /*
193 * Program the aperature and gart registers in TIOCA 196 * Program the aperature and gart registers in TIOCA
194 */ 197 */
195 198
196 ca_base->ca_gart_aperature = ap_reg; 199 writeq(ap_reg, &ca_base->ca_gart_aperature);
197 ca_base->ca_gart_ptr_table = tioca_kern->ca_gart_coretalk_addr | 1; 200 writeq(tioca_kern->ca_gart_coretalk_addr|1, &ca_base->ca_gart_ptr_table);
198 201
199 return 0; 202 return 0;
200} 203}
@@ -211,7 +214,6 @@ void
211tioca_fastwrite_enable(struct tioca_kernel *tioca_kern) 214tioca_fastwrite_enable(struct tioca_kernel *tioca_kern)
212{ 215{
213 int cap_ptr; 216 int cap_ptr;
214 uint64_t ca_control1;
215 uint32_t reg; 217 uint32_t reg;
216 struct tioca *tioca_base; 218 struct tioca *tioca_base;
217 struct pci_dev *pdev; 219 struct pci_dev *pdev;
@@ -256,9 +258,7 @@ tioca_fastwrite_enable(struct tioca_kernel *tioca_kern)
256 */ 258 */
257 259
258 tioca_base = (struct tioca *)common->ca_common.bs_base; 260 tioca_base = (struct tioca *)common->ca_common.bs_base;
259 ca_control1 = tioca_base->ca_control1; 261 __sn_setq_relaxed(&tioca_base->ca_control1, CA_AGP_FW_ENABLE);
260 ca_control1 |= CA_AGP_FW_ENABLE;
261 tioca_base->ca_control1 = ca_control1;
262} 262}
263 263
264EXPORT_SYMBOL(tioca_fastwrite_enable); /* used by agp-sgi */ 264EXPORT_SYMBOL(tioca_fastwrite_enable); /* used by agp-sgi */
@@ -345,7 +345,7 @@ tioca_dma_d48(struct pci_dev *pdev, uint64_t paddr)
345 return 0; 345 return 0;
346 } 346 }
347 347
348 agp_dma_extn = ca_base->ca_agp_dma_addr_extn; 348 agp_dma_extn = __sn_readq_relaxed(&ca_base->ca_agp_dma_addr_extn);
349 if (node_upper != (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT)) { 349 if (node_upper != (agp_dma_extn >> CA_AGP_DMA_NODE_ID_SHFT)) {
350 printk(KERN_ERR "%s: coretalk upper node (%u) " 350 printk(KERN_ERR "%s: coretalk upper node (%u) "
351 "mismatch with ca_agp_dma_addr_extn (%lu)\n", 351 "mismatch with ca_agp_dma_addr_extn (%lu)\n",
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index 8e75db2b825d..dda196c9e324 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -11,6 +11,7 @@
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <asm/sn/sn_sal.h> 12#include <asm/sn/sn_sal.h>
13#include <asm/sn/addrs.h> 13#include <asm/sn/addrs.h>
14#include <asm/sn/io.h>
14#include <asm/sn/pcidev.h> 15#include <asm/sn/pcidev.h>
15#include <asm/sn/pcibus_provider_defs.h> 16#include <asm/sn/pcibus_provider_defs.h>
16#include <asm/sn/tioce_provider.h> 17#include <asm/sn/tioce_provider.h>
@@ -217,7 +218,7 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port,
217 if (i > last) 218 if (i > last)
218 return 0; 219 return 0;
219 220
220 map = kcalloc(1, sizeof(struct tioce_dmamap), GFP_ATOMIC); 221 map = kzalloc(sizeof(struct tioce_dmamap), GFP_ATOMIC);
221 if (!map) 222 if (!map)
222 return 0; 223 return 0;
223 224
@@ -227,7 +228,7 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port,
227 228
228 ate = ATE_MAKE(addr, pagesize); 229 ate = ATE_MAKE(addr, pagesize);
229 ate_shadow[i + j] = ate; 230 ate_shadow[i + j] = ate;
230 ate_reg[i + j] = ate; 231 writeq(ate, &ate_reg[i + j]);
231 addr += pagesize; 232 addr += pagesize;
232 } 233 }
233 234
@@ -268,10 +269,10 @@ tioce_dma_d32(struct pci_dev *pdev, uint64_t ct_addr)
268 pcidev_to_tioce(pdev, &ce_mmr, &ce_kern, &port); 269 pcidev_to_tioce(pdev, &ce_mmr, &ce_kern, &port);
269 270
270 if (ce_kern->ce_port[port].dirmap_refcnt == 0) { 271 if (ce_kern->ce_port[port].dirmap_refcnt == 0) {
271 volatile uint64_t tmp; 272 uint64_t tmp;
272 273
273 ce_kern->ce_port[port].dirmap_shadow = ct_upper; 274 ce_kern->ce_port[port].dirmap_shadow = ct_upper;
274 ce_mmr->ce_ure_dir_map[port] = ct_upper; 275 writeq(ct_upper, &ce_mmr->ce_ure_dir_map[port]);
275 tmp = ce_mmr->ce_ure_dir_map[port]; 276 tmp = ce_mmr->ce_ure_dir_map[port];
276 dma_ok = 1; 277 dma_ok = 1;
277 } else 278 } else
@@ -343,7 +344,7 @@ tioce_dma_unmap(struct pci_dev *pdev, dma_addr_t bus_addr, int dir)
343 if (TIOCE_D32_ADDR(bus_addr)) { 344 if (TIOCE_D32_ADDR(bus_addr)) {
344 if (--ce_kern->ce_port[port].dirmap_refcnt == 0) { 345 if (--ce_kern->ce_port[port].dirmap_refcnt == 0) {
345 ce_kern->ce_port[port].dirmap_shadow = 0; 346 ce_kern->ce_port[port].dirmap_shadow = 0;
346 ce_mmr->ce_ure_dir_map[port] = 0; 347 writeq(0, &ce_mmr->ce_ure_dir_map[port]);
347 } 348 }
348 } else { 349 } else {
349 struct tioce_dmamap *map; 350 struct tioce_dmamap *map;
@@ -554,7 +555,7 @@ tioce_kern_init(struct tioce_common *tioce_common)
554 struct tioce *tioce_mmr; 555 struct tioce *tioce_mmr;
555 struct tioce_kernel *tioce_kern; 556 struct tioce_kernel *tioce_kern;
556 557
557 tioce_kern = kcalloc(1, sizeof(struct tioce_kernel), GFP_KERNEL); 558 tioce_kern = kzalloc(sizeof(struct tioce_kernel), GFP_KERNEL);
558 if (!tioce_kern) { 559 if (!tioce_kern) {
559 return NULL; 560 return NULL;
560 } 561 }
@@ -582,18 +583,18 @@ tioce_kern_init(struct tioce_common *tioce_common)
582 */ 583 */
583 584
584 tioce_mmr = (struct tioce *)tioce_common->ce_pcibus.bs_base; 585 tioce_mmr = (struct tioce *)tioce_common->ce_pcibus.bs_base;
585 tioce_mmr->ce_ure_page_map &= ~CE_URE_PAGESIZE_MASK; 586 __sn_clrq_relaxed(&tioce_mmr->ce_ure_page_map, CE_URE_PAGESIZE_MASK);
586 tioce_mmr->ce_ure_page_map |= CE_URE_256K_PAGESIZE; 587 __sn_setq_relaxed(&tioce_mmr->ce_ure_page_map, CE_URE_256K_PAGESIZE);
587 tioce_kern->ce_ate3240_pagesize = KB(256); 588 tioce_kern->ce_ate3240_pagesize = KB(256);
588 589
589 for (i = 0; i < TIOCE_NUM_M40_ATES; i++) { 590 for (i = 0; i < TIOCE_NUM_M40_ATES; i++) {
590 tioce_kern->ce_ate40_shadow[i] = 0; 591 tioce_kern->ce_ate40_shadow[i] = 0;
591 tioce_mmr->ce_ure_ate40[i] = 0; 592 writeq(0, &tioce_mmr->ce_ure_ate40[i]);
592 } 593 }
593 594
594 for (i = 0; i < TIOCE_NUM_M3240_ATES; i++) { 595 for (i = 0; i < TIOCE_NUM_M3240_ATES; i++) {
595 tioce_kern->ce_ate3240_shadow[i] = 0; 596 tioce_kern->ce_ate3240_shadow[i] = 0;
596 tioce_mmr->ce_ure_ate3240[i] = 0; 597 writeq(0, &tioce_mmr->ce_ure_ate3240[i]);
597 } 598 }
598 599
599 return tioce_kern; 600 return tioce_kern;
@@ -665,7 +666,7 @@ tioce_force_interrupt(struct sn_irq_info *sn_irq_info)
665 default: 666 default:
666 return; 667 return;
667 } 668 }
668 ce_mmr->ce_adm_force_int = force_int_val; 669 writeq(force_int_val, &ce_mmr->ce_adm_force_int);
669} 670}
670 671
671/** 672/**
@@ -686,6 +687,7 @@ tioce_target_interrupt(struct sn_irq_info *sn_irq_info)
686 struct tioce_common *ce_common; 687 struct tioce_common *ce_common;
687 struct tioce *ce_mmr; 688 struct tioce *ce_mmr;
688 int bit; 689 int bit;
690 uint64_t vector;
689 691
690 pcidev_info = (struct pcidev_info *)sn_irq_info->irq_pciioinfo; 692 pcidev_info = (struct pcidev_info *)sn_irq_info->irq_pciioinfo;
691 if (!pcidev_info) 693 if (!pcidev_info)
@@ -696,11 +698,11 @@ tioce_target_interrupt(struct sn_irq_info *sn_irq_info)
696 698
697 bit = sn_irq_info->irq_int_bit; 699 bit = sn_irq_info->irq_int_bit;
698 700
699 ce_mmr->ce_adm_int_mask |= (1UL << bit); 701 __sn_setq_relaxed(&ce_mmr->ce_adm_int_mask, (1UL << bit));
700 ce_mmr->ce_adm_int_dest[bit] = 702 vector = (uint64_t)sn_irq_info->irq_irq << INTR_VECTOR_SHFT;
701 ((uint64_t)sn_irq_info->irq_irq << INTR_VECTOR_SHFT) | 703 vector |= sn_irq_info->irq_xtalkaddr;
702 sn_irq_info->irq_xtalkaddr; 704 writeq(vector, &ce_mmr->ce_adm_int_dest[bit]);
703 ce_mmr->ce_adm_int_mask &= ~(1UL << bit); 705 __sn_clrq_relaxed(&ce_mmr->ce_adm_int_mask, (1UL << bit));
704 706
705 tioce_force_interrupt(sn_irq_info); 707 tioce_force_interrupt(sn_irq_info);
706} 708}
@@ -725,7 +727,7 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
725 * Allocate kernel bus soft and copy from prom. 727 * Allocate kernel bus soft and copy from prom.
726 */ 728 */
727 729
728 tioce_common = kcalloc(1, sizeof(struct tioce_common), GFP_KERNEL); 730 tioce_common = kzalloc(sizeof(struct tioce_common), GFP_KERNEL);
729 if (!tioce_common) 731 if (!tioce_common)
730 return NULL; 732 return NULL;
731 733