aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig8
-rw-r--r--arch/ia64/configs/sn2_defconfig6
-rw-r--r--arch/ia64/configs/tiger_defconfig19
-rw-r--r--arch/ia64/defconfig144
-rw-r--r--arch/ia64/kernel/Makefile1
-rw-r--r--arch/ia64/kernel/efi.c32
-rw-r--r--arch/ia64/kernel/entry.S2
-rw-r--r--arch/ia64/kernel/entry.h2
-rw-r--r--arch/ia64/kernel/fsys.S4
-rw-r--r--arch/ia64/kernel/ivt.S13
-rw-r--r--arch/ia64/kernel/module.c10
-rw-r--r--arch/ia64/kernel/ptrace.c21
-rw-r--r--arch/ia64/kernel/setup.c3
-rw-r--r--arch/ia64/kernel/signal.c5
-rw-r--r--arch/ia64/kernel/smp.c2
-rw-r--r--arch/ia64/kernel/traps.c29
-rw-r--r--arch/ia64/kernel/uncached.c246
-rw-r--r--arch/ia64/mm/hugetlbpage.c158
-rw-r--r--arch/ia64/mm/init.c19
-rw-r--r--arch/ia64/pci/pci.c20
-rw-r--r--arch/ia64/sn/kernel/setup.c4
-rw-r--r--arch/ia64/sn/kernel/tiocx.c25
-rw-r--r--arch/ia64/sn/kernel/xpc_partition.c6
23 files changed, 503 insertions, 276 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 3ad2c4af09..ce4dfa8b83 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -50,6 +50,10 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER
50 bool 50 bool
51 default y 51 default y
52 52
53config IA64_UNCACHED_ALLOCATOR
54 bool
55 select GENERIC_ALLOCATOR
56
53choice 57choice
54 prompt "System type" 58 prompt "System type"
55 default IA64_GENERIC 59 default IA64_GENERIC
@@ -216,14 +220,14 @@ config IOSAPIC
216 220
217config IA64_SGI_SN_SIM 221config IA64_SGI_SN_SIM
218 bool "SGI Medusa Simulator Support" 222 bool "SGI Medusa Simulator Support"
219 depends on IA64_SGI_SN2 223 depends on IA64_SGI_SN2 || IA64_GENERIC
220 help 224 help
221 If you are compiling a kernel that will run under SGI's IA-64 225 If you are compiling a kernel that will run under SGI's IA-64
222 simulator (Medusa) then say Y, otherwise say N. 226 simulator (Medusa) then say Y, otherwise say N.
223 227
224config IA64_SGI_SN_XP 228config IA64_SGI_SN_XP
225 tristate "Support communication between SGI SSIs" 229 tristate "Support communication between SGI SSIs"
226 depends on MSPEC 230 select IA64_UNCACHED_ALLOCATOR
227 help 231 help
228 An SGI machine can be divided into multiple Single System 232 An SGI machine can be divided into multiple Single System
229 Images which act independently of each other and have 233 Images which act independently of each other and have
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig
index 6ff7107fee..a01bb02d07 100644
--- a/arch/ia64/configs/sn2_defconfig
+++ b/arch/ia64/configs/sn2_defconfig
@@ -588,6 +588,7 @@ CONFIG_SGI_MBCS=m
588CONFIG_SERIAL_CORE=y 588CONFIG_SERIAL_CORE=y
589CONFIG_SERIAL_CORE_CONSOLE=y 589CONFIG_SERIAL_CORE_CONSOLE=y
590CONFIG_SERIAL_SGI_L1_CONSOLE=y 590CONFIG_SERIAL_SGI_L1_CONSOLE=y
591CONFIG_SERIAL_SGI_IOC4=y
591CONFIG_UNIX98_PTYS=y 592CONFIG_UNIX98_PTYS=y
592CONFIG_LEGACY_PTYS=y 593CONFIG_LEGACY_PTYS=y
593CONFIG_LEGACY_PTY_COUNT=256 594CONFIG_LEGACY_PTY_COUNT=256
@@ -788,6 +789,11 @@ CONFIG_INFINIBAND_IPOIB=m
788# CONFIG_INFINIBAND_IPOIB_DEBUG is not set 789# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
789 790
790# 791#
792# SN Devices
793#
794CONFIG_SGI_IOC4=y
795
796#
791# File systems 797# File systems
792# 798#
793CONFIG_EXT2_FS=y 799CONFIG_EXT2_FS=y
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig
index 9086b789f6..47f45341ac 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.12-rc3 3# Linux kernel version: 2.6.12-20050621
4# Tue May 3 15:55:04 2005 4# Tue Jun 21 14:03:24 2005
5# 5#
6 6
7# 7#
@@ -67,6 +67,7 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
67CONFIG_TIME_INTERPOLATION=y 67CONFIG_TIME_INTERPOLATION=y
68CONFIG_EFI=y 68CONFIG_EFI=y
69CONFIG_GENERIC_IOMAP=y 69CONFIG_GENERIC_IOMAP=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
70# CONFIG_IA64_GENERIC is not set 71# CONFIG_IA64_GENERIC is not set
71CONFIG_IA64_DIG=y 72CONFIG_IA64_DIG=y
72# CONFIG_IA64_HP_ZX1 is not set 73# CONFIG_IA64_HP_ZX1 is not set
@@ -285,6 +286,7 @@ CONFIG_CHR_DEV_ST=m
285CONFIG_BLK_DEV_SR=m 286CONFIG_BLK_DEV_SR=m
286# CONFIG_BLK_DEV_SR_VENDOR is not set 287# CONFIG_BLK_DEV_SR_VENDOR is not set
287CONFIG_CHR_DEV_SG=m 288CONFIG_CHR_DEV_SG=m
289# CONFIG_CHR_DEV_SCH is not set
288 290
289# 291#
290# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 292# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -313,11 +315,8 @@ CONFIG_SCSI_FC_ATTRS=y
313# CONFIG_MEGARAID_NEWGEN is not set 315# CONFIG_MEGARAID_NEWGEN is not set
314# CONFIG_MEGARAID_LEGACY is not set 316# CONFIG_MEGARAID_LEGACY is not set
315# CONFIG_SCSI_SATA is not set 317# CONFIG_SCSI_SATA is not set
316# CONFIG_SCSI_BUSLOGIC is not set
317# CONFIG_SCSI_DMX3191D is not set 318# CONFIG_SCSI_DMX3191D is not set
318# CONFIG_SCSI_EATA is not set
319# CONFIG_SCSI_FUTURE_DOMAIN is not set 319# CONFIG_SCSI_FUTURE_DOMAIN is not set
320# CONFIG_SCSI_GDTH is not set
321# CONFIG_SCSI_IPS is not set 320# CONFIG_SCSI_IPS is not set
322# CONFIG_SCSI_INITIO is not set 321# CONFIG_SCSI_INITIO is not set
323# CONFIG_SCSI_INIA100 is not set 322# CONFIG_SCSI_INIA100 is not set
@@ -366,8 +365,10 @@ CONFIG_DM_ZERO=m
366# Fusion MPT device support 365# Fusion MPT device support
367# 366#
368CONFIG_FUSION=y 367CONFIG_FUSION=y
369CONFIG_FUSION_MAX_SGE=40 368CONFIG_FUSION_SPI=y
370# CONFIG_FUSION_CTL is not set 369CONFIG_FUSION_FC=y
370CONFIG_FUSION_MAX_SGE=128
371CONFIG_FUSION_CTL=y
371 372
372# 373#
373# IEEE 1394 (FireWire) support 374# IEEE 1394 (FireWire) support
@@ -506,9 +507,11 @@ CONFIG_E1000=y
506# CONFIG_HAMACHI is not set 507# CONFIG_HAMACHI is not set
507# CONFIG_YELLOWFIN is not set 508# CONFIG_YELLOWFIN is not set
508# CONFIG_R8169 is not set 509# CONFIG_R8169 is not set
510# CONFIG_SKGE is not set
509# CONFIG_SK98LIN is not set 511# CONFIG_SK98LIN is not set
510# CONFIG_VIA_VELOCITY is not set 512# CONFIG_VIA_VELOCITY is not set
511CONFIG_TIGON3=y 513CONFIG_TIGON3=y
514# CONFIG_BNX2 is not set
512 515
513# 516#
514# Ethernet (10000 Mbit) 517# Ethernet (10000 Mbit)
@@ -598,7 +601,6 @@ CONFIG_GAMEPORT=m
598# CONFIG_GAMEPORT_VORTEX is not set 601# CONFIG_GAMEPORT_VORTEX is not set
599# CONFIG_GAMEPORT_FM801 is not set 602# CONFIG_GAMEPORT_FM801 is not set
600# CONFIG_GAMEPORT_CS461X is not set 603# CONFIG_GAMEPORT_CS461X is not set
601CONFIG_SOUND_GAMEPORT=m
602 604
603# 605#
604# Character devices 606# Character devices
@@ -611,7 +613,6 @@ CONFIG_SERIAL_NONSTANDARD=y
611# CONFIG_CYCLADES is not set 613# CONFIG_CYCLADES is not set
612# CONFIG_MOXA_SMARTIO is not set 614# CONFIG_MOXA_SMARTIO is not set
613# CONFIG_ISI is not set 615# CONFIG_ISI is not set
614# CONFIG_SYNCLINK is not set
615# CONFIG_SYNCLINKMP is not set 616# CONFIG_SYNCLINKMP is not set
616# CONFIG_N_HDLC is not set 617# CONFIG_N_HDLC is not set
617# CONFIG_SPECIALIX is not set 618# CONFIG_SPECIALIX is not set
diff --git a/arch/ia64/defconfig b/arch/ia64/defconfig
index 7539e83bf0..7be8096e05 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.10 3# Linux kernel version: 2.6.12
4# Thu Jan 6 11:13:13 2005 4# Tue Jun 21 11:30:42 2005
5# 5#
6 6
7# 7#
@@ -10,6 +10,7 @@
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
@@ -21,24 +22,27 @@ CONFIG_POSIX_MQUEUE=y
21# CONFIG_BSD_PROCESS_ACCT is not set 22# CONFIG_BSD_PROCESS_ACCT is not set
22CONFIG_SYSCTL=y 23CONFIG_SYSCTL=y
23# CONFIG_AUDIT is not set 24# CONFIG_AUDIT is not set
24CONFIG_LOG_BUF_SHIFT=20
25CONFIG_HOTPLUG=y 25CONFIG_HOTPLUG=y
26CONFIG_KOBJECT_UEVENT=y 26CONFIG_KOBJECT_UEVENT=y
27CONFIG_IKCONFIG=y 27CONFIG_IKCONFIG=y
28CONFIG_IKCONFIG_PROC=y 28CONFIG_IKCONFIG_PROC=y
29# CONFIG_CPUSETS is not set
29# CONFIG_EMBEDDED is not set 30# CONFIG_EMBEDDED is not set
30CONFIG_KALLSYMS=y 31CONFIG_KALLSYMS=y
31CONFIG_KALLSYMS_ALL=y 32CONFIG_KALLSYMS_ALL=y
32# CONFIG_KALLSYMS_EXTRA_PASS is not set 33# CONFIG_KALLSYMS_EXTRA_PASS is not set
34CONFIG_PRINTK=y
35CONFIG_BUG=y
36CONFIG_BASE_FULL=y
33CONFIG_FUTEX=y 37CONFIG_FUTEX=y
34CONFIG_EPOLL=y 38CONFIG_EPOLL=y
35# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
36CONFIG_SHMEM=y 39CONFIG_SHMEM=y
37CONFIG_CC_ALIGN_FUNCTIONS=0 40CONFIG_CC_ALIGN_FUNCTIONS=0
38CONFIG_CC_ALIGN_LABELS=0 41CONFIG_CC_ALIGN_LABELS=0
39CONFIG_CC_ALIGN_LOOPS=0 42CONFIG_CC_ALIGN_LOOPS=0
40CONFIG_CC_ALIGN_JUMPS=0 43CONFIG_CC_ALIGN_JUMPS=0
41# CONFIG_TINY_SHMEM is not set 44# CONFIG_TINY_SHMEM is not set
45CONFIG_BASE_SMALL=0
42 46
43# 47#
44# Loadable module support 48# Loadable module support
@@ -63,9 +67,11 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
63CONFIG_TIME_INTERPOLATION=y 67CONFIG_TIME_INTERPOLATION=y
64CONFIG_EFI=y 68CONFIG_EFI=y
65CONFIG_GENERIC_IOMAP=y 69CONFIG_GENERIC_IOMAP=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
66CONFIG_IA64_GENERIC=y 71CONFIG_IA64_GENERIC=y
67# CONFIG_IA64_DIG is not set 72# CONFIG_IA64_DIG is not set
68# CONFIG_IA64_HP_ZX1 is not set 73# CONFIG_IA64_HP_ZX1 is not set
74# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
69# CONFIG_IA64_SGI_SN2 is not set 75# CONFIG_IA64_SGI_SN2 is not set
70# CONFIG_IA64_HP_SIM is not set 76# CONFIG_IA64_HP_SIM is not set
71# CONFIG_ITANIUM is not set 77# CONFIG_ITANIUM is not set
@@ -77,6 +83,7 @@ CONFIG_IA64_PAGE_SIZE_16KB=y
77CONFIG_IA64_L1_CACHE_SHIFT=7 83CONFIG_IA64_L1_CACHE_SHIFT=7
78CONFIG_NUMA=y 84CONFIG_NUMA=y
79CONFIG_VIRTUAL_MEM_MAP=y 85CONFIG_VIRTUAL_MEM_MAP=y
86CONFIG_HOLES_IN_ZONE=y
80CONFIG_DISCONTIGMEM=y 87CONFIG_DISCONTIGMEM=y
81CONFIG_IA64_CYCLONE=y 88CONFIG_IA64_CYCLONE=y
82CONFIG_IOSAPIC=y 89CONFIG_IOSAPIC=y
@@ -84,6 +91,7 @@ CONFIG_FORCE_MAX_ZONEORDER=18
84CONFIG_SMP=y 91CONFIG_SMP=y
85CONFIG_NR_CPUS=512 92CONFIG_NR_CPUS=512
86CONFIG_HOTPLUG_CPU=y 93CONFIG_HOTPLUG_CPU=y
94# CONFIG_SCHED_SMT is not set
87# CONFIG_PREEMPT is not set 95# CONFIG_PREEMPT is not set
88CONFIG_HAVE_DEC_LOCK=y 96CONFIG_HAVE_DEC_LOCK=y
89CONFIG_IA32_SUPPORT=y 97CONFIG_IA32_SUPPORT=y
@@ -135,6 +143,7 @@ CONFIG_PCI_DOMAINS=y
135# CONFIG_PCI_MSI is not set 143# CONFIG_PCI_MSI is not set
136CONFIG_PCI_LEGACY_PROC=y 144CONFIG_PCI_LEGACY_PROC=y
137CONFIG_PCI_NAMES=y 145CONFIG_PCI_NAMES=y
146# CONFIG_PCI_DEBUG is not set
138 147
139# 148#
140# PCI Hotplug Support 149# PCI Hotplug Support
@@ -144,7 +153,6 @@ CONFIG_HOTPLUG_PCI=m
144CONFIG_HOTPLUG_PCI_ACPI=m 153CONFIG_HOTPLUG_PCI_ACPI=m
145# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set 154# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
146# CONFIG_HOTPLUG_PCI_CPCI is not set 155# CONFIG_HOTPLUG_PCI_CPCI is not set
147# CONFIG_HOTPLUG_PCI_PCIE is not set
148# CONFIG_HOTPLUG_PCI_SHPC is not set 156# CONFIG_HOTPLUG_PCI_SHPC is not set
149 157
150# 158#
@@ -153,10 +161,6 @@ CONFIG_HOTPLUG_PCI_ACPI=m
153# CONFIG_PCCARD is not set 161# CONFIG_PCCARD is not set
154 162
155# 163#
156# PC-card bridges
157#
158
159#
160# Device Drivers 164# Device Drivers
161# 165#
162 166
@@ -190,6 +194,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
190# CONFIG_BLK_CPQ_CISS_DA is not set 194# CONFIG_BLK_CPQ_CISS_DA is not set
191# CONFIG_BLK_DEV_DAC960 is not set 195# CONFIG_BLK_DEV_DAC960 is not set
192# CONFIG_BLK_DEV_UMEM is not set 196# CONFIG_BLK_DEV_UMEM is not set
197# CONFIG_BLK_DEV_COW_COMMON is not set
193CONFIG_BLK_DEV_LOOP=m 198CONFIG_BLK_DEV_LOOP=m
194CONFIG_BLK_DEV_CRYPTOLOOP=m 199CONFIG_BLK_DEV_CRYPTOLOOP=m
195CONFIG_BLK_DEV_NBD=m 200CONFIG_BLK_DEV_NBD=m
@@ -209,6 +214,7 @@ CONFIG_IOSCHED_NOOP=y
209CONFIG_IOSCHED_AS=y 214CONFIG_IOSCHED_AS=y
210CONFIG_IOSCHED_DEADLINE=y 215CONFIG_IOSCHED_DEADLINE=y
211CONFIG_IOSCHED_CFQ=y 216CONFIG_IOSCHED_CFQ=y
217# CONFIG_ATA_OVER_ETH is not set
212 218
213# 219#
214# ATA/ATAPI/MFM/RLL support 220# ATA/ATAPI/MFM/RLL support
@@ -283,6 +289,7 @@ CONFIG_CHR_DEV_ST=m
283CONFIG_BLK_DEV_SR=m 289CONFIG_BLK_DEV_SR=m
284# CONFIG_BLK_DEV_SR_VENDOR is not set 290# CONFIG_BLK_DEV_SR_VENDOR is not set
285CONFIG_CHR_DEV_SG=m 291CONFIG_CHR_DEV_SG=m
292# CONFIG_CHR_DEV_SCH is not set
286 293
287# 294#
288# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 295# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -310,13 +317,21 @@ CONFIG_SCSI_FC_ATTRS=y
310# CONFIG_SCSI_AIC79XX is not set 317# CONFIG_SCSI_AIC79XX is not set
311# CONFIG_MEGARAID_NEWGEN is not set 318# CONFIG_MEGARAID_NEWGEN is not set
312# CONFIG_MEGARAID_LEGACY is not set 319# CONFIG_MEGARAID_LEGACY is not set
313# CONFIG_SCSI_SATA is not set 320CONFIG_SCSI_SATA=y
314# CONFIG_SCSI_BUSLOGIC is not set 321# CONFIG_SCSI_SATA_AHCI is not set
322# CONFIG_SCSI_SATA_SVW is not set
323# CONFIG_SCSI_ATA_PIIX is not set
324# CONFIG_SCSI_SATA_NV is not set
325# CONFIG_SCSI_SATA_PROMISE is not set
326# CONFIG_SCSI_SATA_QSTOR is not set
327# CONFIG_SCSI_SATA_SX4 is not set
328# CONFIG_SCSI_SATA_SIL is not set
329# CONFIG_SCSI_SATA_SIS is not set
330# CONFIG_SCSI_SATA_ULI is not set
331# CONFIG_SCSI_SATA_VIA is not set
332CONFIG_SCSI_SATA_VITESSE=y
315# CONFIG_SCSI_DMX3191D is not set 333# CONFIG_SCSI_DMX3191D is not set
316# CONFIG_SCSI_EATA is not set
317# CONFIG_SCSI_EATA_PIO is not set
318# CONFIG_SCSI_FUTURE_DOMAIN is not set 334# CONFIG_SCSI_FUTURE_DOMAIN is not set
319# CONFIG_SCSI_GDTH is not set
320# CONFIG_SCSI_IPS is not set 335# CONFIG_SCSI_IPS is not set
321# CONFIG_SCSI_INITIO is not set 336# CONFIG_SCSI_INITIO is not set
322# CONFIG_SCSI_INIA100 is not set 337# CONFIG_SCSI_INIA100 is not set
@@ -326,7 +341,6 @@ CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
326CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 341CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
327# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set 342# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
328# CONFIG_SCSI_IPR is not set 343# CONFIG_SCSI_IPR is not set
329# CONFIG_SCSI_QLOGIC_ISP is not set
330CONFIG_SCSI_QLOGIC_FC=y 344CONFIG_SCSI_QLOGIC_FC=y
331# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set 345# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
332CONFIG_SCSI_QLOGIC_1280=y 346CONFIG_SCSI_QLOGIC_1280=y
@@ -337,6 +351,7 @@ CONFIG_SCSI_QLA22XX=m
337CONFIG_SCSI_QLA2300=m 351CONFIG_SCSI_QLA2300=m
338CONFIG_SCSI_QLA2322=m 352CONFIG_SCSI_QLA2322=m
339# CONFIG_SCSI_QLA6312 is not set 353# CONFIG_SCSI_QLA6312 is not set
354# CONFIG_SCSI_LPFC is not set
340# CONFIG_SCSI_DC395x is not set 355# CONFIG_SCSI_DC395x is not set
341# CONFIG_SCSI_DC390T is not set 356# CONFIG_SCSI_DC390T is not set
342# CONFIG_SCSI_DEBUG is not set 357# CONFIG_SCSI_DEBUG is not set
@@ -359,12 +374,16 @@ CONFIG_DM_CRYPT=m
359CONFIG_DM_SNAPSHOT=m 374CONFIG_DM_SNAPSHOT=m
360CONFIG_DM_MIRROR=m 375CONFIG_DM_MIRROR=m
361CONFIG_DM_ZERO=m 376CONFIG_DM_ZERO=m
377CONFIG_DM_MULTIPATH=m
378# CONFIG_DM_MULTIPATH_EMC is not set
362 379
363# 380#
364# Fusion MPT device support 381# Fusion MPT device support
365# 382#
366CONFIG_FUSION=y 383CONFIG_FUSION=y
367CONFIG_FUSION_MAX_SGE=40 384CONFIG_FUSION_SPI=y
385CONFIG_FUSION_FC=m
386CONFIG_FUSION_MAX_SGE=128
368# CONFIG_FUSION_CTL is not set 387# CONFIG_FUSION_CTL is not set
369 388
370# 389#
@@ -387,7 +406,6 @@ CONFIG_NET=y
387# 406#
388CONFIG_PACKET=y 407CONFIG_PACKET=y
389# CONFIG_PACKET_MMAP is not set 408# CONFIG_PACKET_MMAP is not set
390CONFIG_NETLINK_DEV=y
391CONFIG_UNIX=y 409CONFIG_UNIX=y
392# CONFIG_NET_KEY is not set 410# CONFIG_NET_KEY is not set
393CONFIG_INET=y 411CONFIG_INET=y
@@ -447,7 +465,6 @@ CONFIG_DUMMY=m
447# CONFIG_BONDING is not set 465# CONFIG_BONDING is not set
448# CONFIG_EQUALIZER is not set 466# CONFIG_EQUALIZER is not set
449# CONFIG_TUN is not set 467# CONFIG_TUN is not set
450# CONFIG_ETHERTAP is not set
451 468
452# 469#
453# ARCnet devices 470# ARCnet devices
@@ -484,9 +501,7 @@ CONFIG_NET_PCI=y
484# CONFIG_FORCEDETH is not set 501# CONFIG_FORCEDETH is not set
485# CONFIG_DGRS is not set 502# CONFIG_DGRS is not set
486CONFIG_EEPRO100=m 503CONFIG_EEPRO100=m
487# CONFIG_EEPRO100_PIO is not set
488CONFIG_E100=m 504CONFIG_E100=m
489# CONFIG_E100_NAPI is not set
490# CONFIG_FEALNX is not set 505# CONFIG_FEALNX is not set
491# CONFIG_NATSEMI is not set 506# CONFIG_NATSEMI is not set
492# CONFIG_NE2K_PCI is not set 507# CONFIG_NE2K_PCI is not set
@@ -508,9 +523,11 @@ CONFIG_E1000=y
508# CONFIG_HAMACHI is not set 523# CONFIG_HAMACHI is not set
509# CONFIG_YELLOWFIN is not set 524# CONFIG_YELLOWFIN is not set
510# CONFIG_R8169 is not set 525# CONFIG_R8169 is not set
526# CONFIG_SKGE is not set
511# CONFIG_SK98LIN is not set 527# CONFIG_SK98LIN is not set
512# CONFIG_VIA_VELOCITY is not set 528# CONFIG_VIA_VELOCITY is not set
513CONFIG_TIGON3=y 529CONFIG_TIGON3=y
530# CONFIG_BNX2 is not set
514 531
515# 532#
516# Ethernet (10000 Mbit) 533# Ethernet (10000 Mbit)
@@ -568,25 +585,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
568# CONFIG_INPUT_EVBUG is not set 585# CONFIG_INPUT_EVBUG is not set
569 586
570# 587#
571# Input I/O drivers
572#
573CONFIG_GAMEPORT=m
574CONFIG_SOUND_GAMEPORT=m
575# CONFIG_GAMEPORT_NS558 is not set
576# CONFIG_GAMEPORT_L4 is not set
577# CONFIG_GAMEPORT_EMU10K1 is not set
578# CONFIG_GAMEPORT_VORTEX is not set
579# CONFIG_GAMEPORT_FM801 is not set
580# CONFIG_GAMEPORT_CS461x is not set
581CONFIG_SERIO=y
582CONFIG_SERIO_I8042=y
583# CONFIG_SERIO_SERPORT is not set
584# CONFIG_SERIO_CT82C710 is not set
585# CONFIG_SERIO_PCIPS2 is not set
586CONFIG_SERIO_LIBPS2=y
587# CONFIG_SERIO_RAW is not set
588
589#
590# Input Device Drivers 588# Input Device Drivers
591# 589#
592CONFIG_INPUT_KEYBOARD=y 590CONFIG_INPUT_KEYBOARD=y
@@ -604,6 +602,23 @@ CONFIG_MOUSE_PS2=y
604# CONFIG_INPUT_MISC is not set 602# CONFIG_INPUT_MISC is not set
605 603
606# 604#
605# Hardware I/O ports
606#
607CONFIG_SERIO=y
608CONFIG_SERIO_I8042=y
609# CONFIG_SERIO_SERPORT is not set
610# CONFIG_SERIO_PCIPS2 is not set
611CONFIG_SERIO_LIBPS2=y
612# CONFIG_SERIO_RAW is not set
613CONFIG_GAMEPORT=m
614# CONFIG_GAMEPORT_NS558 is not set
615# CONFIG_GAMEPORT_L4 is not set
616# CONFIG_GAMEPORT_EMU10K1 is not set
617# CONFIG_GAMEPORT_VORTEX is not set
618# CONFIG_GAMEPORT_FM801 is not set
619# CONFIG_GAMEPORT_CS461X is not set
620
621#
607# Character devices 622# Character devices
608# 623#
609CONFIG_VT=y 624CONFIG_VT=y
@@ -613,11 +628,15 @@ CONFIG_SERIAL_NONSTANDARD=y
613# CONFIG_ROCKETPORT is not set 628# CONFIG_ROCKETPORT is not set
614# CONFIG_CYCLADES is not set 629# CONFIG_CYCLADES is not set
615# CONFIG_MOXA_SMARTIO is not set 630# CONFIG_MOXA_SMARTIO is not set
616# CONFIG_SYNCLINK is not set 631# CONFIG_ISI is not set
617# CONFIG_SYNCLINKMP is not set 632# CONFIG_SYNCLINKMP is not set
618# CONFIG_N_HDLC is not set 633# CONFIG_N_HDLC is not set
634# CONFIG_SPECIALIX is not set
635# CONFIG_SX is not set
619# CONFIG_STALDRV is not set 636# CONFIG_STALDRV is not set
620CONFIG_SGI_SNSC=y 637CONFIG_SGI_SNSC=y
638CONFIG_SGI_TIOCX=y
639CONFIG_SGI_MBCS=m
621 640
622# 641#
623# Serial drivers 642# Serial drivers
@@ -638,6 +657,8 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
638CONFIG_SERIAL_CORE=y 657CONFIG_SERIAL_CORE=y
639CONFIG_SERIAL_CORE_CONSOLE=y 658CONFIG_SERIAL_CORE_CONSOLE=y
640CONFIG_SERIAL_SGI_L1_CONSOLE=y 659CONFIG_SERIAL_SGI_L1_CONSOLE=y
660CONFIG_SERIAL_SGI_IOC4=y
661# CONFIG_SERIAL_JSM is not set
641CONFIG_UNIX98_PTYS=y 662CONFIG_UNIX98_PTYS=y
642CONFIG_LEGACY_PTYS=y 663CONFIG_LEGACY_PTYS=y
643CONFIG_LEGACY_PTY_COUNT=256 664CONFIG_LEGACY_PTY_COUNT=256
@@ -663,6 +684,7 @@ CONFIG_EFI_RTC=y
663CONFIG_AGP=m 684CONFIG_AGP=m
664CONFIG_AGP_I460=m 685CONFIG_AGP_I460=m
665CONFIG_AGP_HP_ZX1=m 686CONFIG_AGP_HP_ZX1=m
687CONFIG_AGP_SGI_TIOCA=m
666CONFIG_DRM=m 688CONFIG_DRM=m
667CONFIG_DRM_TDFX=m 689CONFIG_DRM_TDFX=m
668CONFIG_DRM_R128=m 690CONFIG_DRM_R128=m
@@ -674,9 +696,15 @@ CONFIG_HPET=y
674# CONFIG_HPET_RTC_IRQ is not set 696# CONFIG_HPET_RTC_IRQ is not set
675CONFIG_HPET_MMAP=y 697CONFIG_HPET_MMAP=y
676CONFIG_MAX_RAW_DEVS=256 698CONFIG_MAX_RAW_DEVS=256
699# CONFIG_HANGCHECK_TIMER is not set
677CONFIG_MMTIMER=y 700CONFIG_MMTIMER=y
678 701
679# 702#
703# TPM devices
704#
705# CONFIG_TCG_TPM is not set
706
707#
680# I2C support 708# I2C support
681# 709#
682# CONFIG_I2C is not set 710# CONFIG_I2C is not set
@@ -760,6 +788,8 @@ CONFIG_SND_CS46XX=m
760CONFIG_SND_CS46XX_NEW_DSP=y 788CONFIG_SND_CS46XX_NEW_DSP=y
761CONFIG_SND_CS4281=m 789CONFIG_SND_CS4281=m
762CONFIG_SND_EMU10K1=m 790CONFIG_SND_EMU10K1=m
791# CONFIG_SND_EMU10K1X is not set
792# CONFIG_SND_CA0106 is not set
763# CONFIG_SND_KORG1212 is not set 793# CONFIG_SND_KORG1212 is not set
764# CONFIG_SND_MIXART is not set 794# CONFIG_SND_MIXART is not set
765# CONFIG_SND_NM256 is not set 795# CONFIG_SND_NM256 is not set
@@ -784,13 +814,14 @@ CONFIG_SND_FM801=m
784# CONFIG_SND_INTEL8X0M is not set 814# CONFIG_SND_INTEL8X0M is not set
785# CONFIG_SND_SONICVIBES is not set 815# CONFIG_SND_SONICVIBES is not set
786# CONFIG_SND_VIA82XX is not set 816# CONFIG_SND_VIA82XX is not set
817# CONFIG_SND_VIA82XX_MODEM is not set
787# CONFIG_SND_VX222 is not set 818# CONFIG_SND_VX222 is not set
819# CONFIG_SND_HDA_INTEL is not set
788 820
789# 821#
790# USB devices 822# USB devices
791# 823#
792# CONFIG_SND_USB_AUDIO is not set 824# CONFIG_SND_USB_AUDIO is not set
793# CONFIG_SND_USB_USX2Y is not set
794 825
795# 826#
796# Open Sound System 827# Open Sound System
@@ -800,6 +831,8 @@ CONFIG_SND_FM801=m
800# 831#
801# USB support 832# USB support
802# 833#
834CONFIG_USB_ARCH_HAS_HCD=y
835CONFIG_USB_ARCH_HAS_OHCI=y
803CONFIG_USB=m 836CONFIG_USB=m
804# CONFIG_USB_DEBUG is not set 837# CONFIG_USB_DEBUG is not set
805 838
@@ -811,8 +844,6 @@ CONFIG_USB_DEVICEFS=y
811# CONFIG_USB_DYNAMIC_MINORS is not set 844# CONFIG_USB_DYNAMIC_MINORS is not set
812# CONFIG_USB_SUSPEND is not set 845# CONFIG_USB_SUSPEND is not set
813# CONFIG_USB_OTG is not set 846# CONFIG_USB_OTG is not set
814CONFIG_USB_ARCH_HAS_HCD=y
815CONFIG_USB_ARCH_HAS_OHCI=y
816 847
817# 848#
818# USB Host Controller Drivers 849# USB Host Controller Drivers
@@ -821,6 +852,8 @@ CONFIG_USB_EHCI_HCD=m
821# CONFIG_USB_EHCI_SPLIT_ISO is not set 852# CONFIG_USB_EHCI_SPLIT_ISO is not set
822# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 853# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
823CONFIG_USB_OHCI_HCD=m 854CONFIG_USB_OHCI_HCD=m
855# CONFIG_USB_OHCI_BIG_ENDIAN is not set
856CONFIG_USB_OHCI_LITTLE_ENDIAN=y
824CONFIG_USB_UHCI_HCD=m 857CONFIG_USB_UHCI_HCD=m
825# CONFIG_USB_SL811_HCD is not set 858# CONFIG_USB_SL811_HCD is not set
826 859
@@ -838,12 +871,11 @@ CONFIG_USB_UHCI_HCD=m
838# 871#
839CONFIG_USB_STORAGE=m 872CONFIG_USB_STORAGE=m
840# CONFIG_USB_STORAGE_DEBUG is not set 873# CONFIG_USB_STORAGE_DEBUG is not set
841# CONFIG_USB_STORAGE_RW_DETECT is not set
842# CONFIG_USB_STORAGE_DATAFAB is not set 874# CONFIG_USB_STORAGE_DATAFAB is not set
843# CONFIG_USB_STORAGE_FREECOM is not set 875# CONFIG_USB_STORAGE_FREECOM is not set
844# CONFIG_USB_STORAGE_ISD200 is not set 876# CONFIG_USB_STORAGE_ISD200 is not set
845# CONFIG_USB_STORAGE_DPCM is not set 877# CONFIG_USB_STORAGE_DPCM is not set
846# CONFIG_USB_STORAGE_HP8200e is not set 878# CONFIG_USB_STORAGE_USBAT is not set
847# CONFIG_USB_STORAGE_SDDR09 is not set 879# CONFIG_USB_STORAGE_SDDR09 is not set
848# CONFIG_USB_STORAGE_SDDR55 is not set 880# CONFIG_USB_STORAGE_SDDR55 is not set
849# CONFIG_USB_STORAGE_JUMPSHOT is not set 881# CONFIG_USB_STORAGE_JUMPSHOT is not set
@@ -893,6 +925,7 @@ CONFIG_USB_HIDINPUT=y
893# CONFIG_USB_PEGASUS is not set 925# CONFIG_USB_PEGASUS is not set
894# CONFIG_USB_RTL8150 is not set 926# CONFIG_USB_RTL8150 is not set
895# CONFIG_USB_USBNET is not set 927# CONFIG_USB_USBNET is not set
928CONFIG_USB_MON=m
896 929
897# 930#
898# USB port drivers 931# USB port drivers
@@ -908,7 +941,6 @@ CONFIG_USB_HIDINPUT=y
908# 941#
909# CONFIG_USB_EMI62 is not set 942# CONFIG_USB_EMI62 is not set
910# CONFIG_USB_EMI26 is not set 943# CONFIG_USB_EMI26 is not set
911# CONFIG_USB_TIGL is not set
912# CONFIG_USB_AUERSWALD is not set 944# CONFIG_USB_AUERSWALD is not set
913# CONFIG_USB_RIO500 is not set 945# CONFIG_USB_RIO500 is not set
914# CONFIG_USB_LEGOTOWER is not set 946# CONFIG_USB_LEGOTOWER is not set
@@ -917,6 +949,8 @@ CONFIG_USB_HIDINPUT=y
917# CONFIG_USB_CYTHERM is not set 949# CONFIG_USB_CYTHERM is not set
918# CONFIG_USB_PHIDGETKIT is not set 950# CONFIG_USB_PHIDGETKIT is not set
919# CONFIG_USB_PHIDGETSERVO is not set 951# CONFIG_USB_PHIDGETSERVO is not set
952# CONFIG_USB_IDMOUSE is not set
953# CONFIG_USB_SISUSBVGA is not set
920# CONFIG_USB_TEST is not set 954# CONFIG_USB_TEST is not set
921 955
922# 956#
@@ -943,6 +977,11 @@ CONFIG_INFINIBAND_IPOIB=m
943# CONFIG_INFINIBAND_IPOIB_DEBUG is not set 977# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
944 978
945# 979#
980# SN Devices
981#
982CONFIG_SGI_IOC4=y
983
984#
946# File systems 985# File systems
947# 986#
948CONFIG_EXT2_FS=y 987CONFIG_EXT2_FS=y
@@ -964,7 +1003,12 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
964CONFIG_REISERFS_FS_SECURITY=y 1003CONFIG_REISERFS_FS_SECURITY=y
965# CONFIG_JFS_FS is not set 1004# CONFIG_JFS_FS is not set
966CONFIG_FS_POSIX_ACL=y 1005CONFIG_FS_POSIX_ACL=y
1006
1007#
1008# XFS support
1009#
967CONFIG_XFS_FS=y 1010CONFIG_XFS_FS=y
1011CONFIG_XFS_EXPORT=y
968# CONFIG_XFS_RT is not set 1012# CONFIG_XFS_RT is not set
969# CONFIG_XFS_QUOTA is not set 1013# CONFIG_XFS_QUOTA is not set
970# CONFIG_XFS_SECURITY is not set 1014# CONFIG_XFS_SECURITY is not set
@@ -1042,7 +1086,7 @@ CONFIG_NFSD_V4=y
1042CONFIG_NFSD_TCP=y 1086CONFIG_NFSD_TCP=y
1043CONFIG_LOCKD=m 1087CONFIG_LOCKD=m
1044CONFIG_LOCKD_V4=y 1088CONFIG_LOCKD_V4=y
1045CONFIG_EXPORTFS=m 1089CONFIG_EXPORTFS=y
1046CONFIG_SUNRPC=m 1090CONFIG_SUNRPC=m
1047CONFIG_SUNRPC_GSS=m 1091CONFIG_SUNRPC_GSS=m
1048CONFIG_RPCSEC_GSS_KRB5=m 1092CONFIG_RPCSEC_GSS_KRB5=m
@@ -1128,6 +1172,8 @@ CONFIG_NLS_UTF8=m
1128# CONFIG_CRC_CCITT is not set 1172# CONFIG_CRC_CCITT is not set
1129CONFIG_CRC32=y 1173CONFIG_CRC32=y
1130# CONFIG_LIBCRC32C is not set 1174# CONFIG_LIBCRC32C is not set
1175CONFIG_GENERIC_HARDIRQS=y
1176CONFIG_GENERIC_IRQ_PROBE=y
1131 1177
1132# 1178#
1133# HP Simulator drivers 1179# HP Simulator drivers
@@ -1144,14 +1190,17 @@ CONFIG_CRC32=y
1144# 1190#
1145# Kernel hacking 1191# Kernel hacking
1146# 1192#
1193# CONFIG_PRINTK_TIME is not set
1147CONFIG_DEBUG_KERNEL=y 1194CONFIG_DEBUG_KERNEL=y
1148CONFIG_MAGIC_SYSRQ=y 1195CONFIG_MAGIC_SYSRQ=y
1196CONFIG_LOG_BUF_SHIFT=20
1149# CONFIG_SCHEDSTATS is not set 1197# CONFIG_SCHEDSTATS is not set
1150# CONFIG_DEBUG_SLAB is not set 1198# CONFIG_DEBUG_SLAB is not set
1151# CONFIG_DEBUG_SPINLOCK is not set 1199# CONFIG_DEBUG_SPINLOCK is not set
1152# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1200# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1153# CONFIG_DEBUG_KOBJECT is not set 1201# CONFIG_DEBUG_KOBJECT is not set
1154# CONFIG_DEBUG_INFO is not set 1202# CONFIG_DEBUG_INFO is not set
1203# CONFIG_DEBUG_FS is not set
1155CONFIG_IA64_GRANULE_16MB=y 1204CONFIG_IA64_GRANULE_16MB=y
1156# CONFIG_IA64_GRANULE_64MB is not set 1205# CONFIG_IA64_GRANULE_64MB is not set
1157# CONFIG_IA64_PRINT_HAZARDS is not set 1206# CONFIG_IA64_PRINT_HAZARDS is not set
@@ -1178,6 +1227,7 @@ CONFIG_CRYPTO_MD5=m
1178# CONFIG_CRYPTO_SHA256 is not set 1227# CONFIG_CRYPTO_SHA256 is not set
1179# CONFIG_CRYPTO_SHA512 is not set 1228# CONFIG_CRYPTO_SHA512 is not set
1180# CONFIG_CRYPTO_WP512 is not set 1229# CONFIG_CRYPTO_WP512 is not set
1230# CONFIG_CRYPTO_TGR192 is not set
1181CONFIG_CRYPTO_DES=m 1231CONFIG_CRYPTO_DES=m
1182# CONFIG_CRYPTO_BLOWFISH is not set 1232# CONFIG_CRYPTO_BLOWFISH is not set
1183# CONFIG_CRYPTO_TWOFISH is not set 1233# CONFIG_CRYPTO_TWOFISH is not set
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index c1a02bbc25..4c73d8ba2e 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_SMP) += smp.o smpboot.o domain.o
20obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o 20obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o
21obj-$(CONFIG_IA64_CYCLONE) += cyclone.o 21obj-$(CONFIG_IA64_CYCLONE) += cyclone.o
22obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o 22obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o
23obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o
23mca_recovery-y += mca_drv.o mca_drv_asm.o 24mca_recovery-y += mca_drv.o mca_drv_asm.o
24 25
25# The gate DSO image is built using a special linker script. 26# The gate DSO image is built using a special linker script.
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 4a3b1aac43..179f230816 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -410,6 +410,38 @@ efi_memmap_walk (efi_freemem_callback_t callback, void *arg)
410} 410}
411 411
412/* 412/*
413 * Walk the EFI memory map to pull out leftover pages in the lower
414 * memory regions which do not end up in the regular memory map and
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 */
421void __init
422efi_memmap_walk_uc (efi_freemem_callback_t callback)
423{
424 void *efi_map_start, *efi_map_end, *p;
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}
442
443
444/*
413 * Look for the PAL_CODE region reported by EFI and maps it using an 445 * Look for the PAL_CODE region reported by EFI and maps it using an
414 * ITR to enable safe PAL calls in virtual mode. See IA-64 Processor 446 * ITR to enable safe PAL calls in virtual mode. See IA-64 Processor
415 * Abstraction Layer chapter 11 in ADAG 447 * Abstraction Layer chapter 11 in ADAG
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index d99316c9be..b1d5d3d527 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1579,7 +1579,7 @@ sys_call_table:
1579 data8 sys_keyctl 1579 data8 sys_keyctl
1580 data8 sys_ni_syscall 1580 data8 sys_ni_syscall
1581 data8 sys_ni_syscall // 1275 1581 data8 sys_ni_syscall // 1275
1582 data8 sys_ni_syscall 1582 data8 sys_set_zone_reclaim
1583 data8 sys_ni_syscall 1583 data8 sys_ni_syscall
1584 data8 sys_ni_syscall 1584 data8 sys_ni_syscall
1585 data8 sys_ni_syscall 1585 data8 sys_ni_syscall
diff --git a/arch/ia64/kernel/entry.h b/arch/ia64/kernel/entry.h
index 6d4ecec989..78eeb07934 100644
--- a/arch/ia64/kernel/entry.h
+++ b/arch/ia64/kernel/entry.h
@@ -60,7 +60,7 @@
60 .spillsp @priunat,SW(AR_UNAT)+16+(off); \ 60 .spillsp @priunat,SW(AR_UNAT)+16+(off); \
61 .spillsp ar.rnat,SW(AR_RNAT)+16+(off); \ 61 .spillsp ar.rnat,SW(AR_RNAT)+16+(off); \
62 .spillsp ar.bspstore,SW(AR_BSPSTORE)+16+(off); \ 62 .spillsp ar.bspstore,SW(AR_BSPSTORE)+16+(off); \
63 .spillsp pr,SW(PR)+16+(off)) 63 .spillsp pr,SW(PR)+16+(off)
64 64
65#define DO_SAVE_SWITCH_STACK \ 65#define DO_SAVE_SWITCH_STACK \
66 movl r28=1f; \ 66 movl r28=1f; \
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S
index 4f3cdef757..962b6c4e32 100644
--- a/arch/ia64/kernel/fsys.S
+++ b/arch/ia64/kernel/fsys.S
@@ -460,9 +460,9 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set
460 ;; 460 ;;
461 461
462 st8 [r2]=r14 // update current->blocked with new mask 462 st8 [r2]=r14 // update current->blocked with new mask
463 cmpxchg4.acq r14=[r9],r18,ar.ccv // current->thread_info->flags <- r18 463 cmpxchg4.acq r8=[r9],r18,ar.ccv // current->thread_info->flags <- r18
464 ;; 464 ;;
465 cmp.ne p6,p0=r17,r14 // update failed? 465 cmp.ne p6,p0=r17,r8 // update failed?
466(p6) br.cond.spnt.few 1b // yes -> retry 466(p6) br.cond.spnt.few 1b // yes -> retry
467 467
468#ifdef CONFIG_SMP 468#ifdef CONFIG_SMP
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index d9c05d5343..2bc085a73e 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -405,17 +405,22 @@ ENTRY(nested_dtlb_miss)
405 * r30: continuation address 405 * r30: continuation address
406 * r31: saved pr 406 * r31: saved pr
407 * 407 *
408 * Clobbered: b0, r18, r19, r21, psr.dt (cleared) 408 * Clobbered: b0, r18, r19, r21, r22, psr.dt (cleared)
409 */ 409 */
410 rsm psr.dt // switch to using physical data addressing 410 rsm psr.dt // switch to using physical data addressing
411 mov r19=IA64_KR(PT_BASE) // get the page table base address 411 mov r19=IA64_KR(PT_BASE) // get the page table base address
412 shl r21=r16,3 // shift bit 60 into sign bit 412 shl r21=r16,3 // shift bit 60 into sign bit
413 mov r18=cr.itir
413 ;; 414 ;;
414 shr.u r17=r16,61 // get the region number into r17 415 shr.u r17=r16,61 // get the region number into r17
416 extr.u r18=r18,2,6 // get the faulting page size
415 ;; 417 ;;
416 cmp.eq p6,p7=5,r17 // is faulting address in region 5? 418 cmp.eq p6,p7=5,r17 // is faulting address in region 5?
417 shr.u r18=r16,PGDIR_SHIFT // get bits 33-63 of faulting address 419 add r22=-PAGE_SHIFT,r18 // adjustment for hugetlb address
420 add r18=PGDIR_SHIFT-PAGE_SHIFT,r18
418 ;; 421 ;;
422 shr.u r22=r16,r22
423 shr.u r18=r16,r18
419(p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place 424(p7) dep r17=r17,r19,(PAGE_SHIFT-3),3 // put region number bits in place
420 425
421 srlz.d 426 srlz.d
@@ -428,7 +433,7 @@ ENTRY(nested_dtlb_miss)
428(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8 433(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8
429(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8) 434(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8)
430 cmp.eq p7,p6=0,r21 // unused address bits all zeroes? 435 cmp.eq p7,p6=0,r21 // unused address bits all zeroes?
431 shr.u r18=r16,PMD_SHIFT // shift L2 index into position 436 shr.u r18=r22,PMD_SHIFT // shift L2 index into position
432 ;; 437 ;;
433 ld8 r17=[r17] // fetch the L1 entry (may be 0) 438 ld8 r17=[r17] // fetch the L1 entry (may be 0)
434 ;; 439 ;;
@@ -436,7 +441,7 @@ ENTRY(nested_dtlb_miss)
436 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry 441 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry
437 ;; 442 ;;
438(p7) ld8 r17=[r17] // fetch the L2 entry (may be 0) 443(p7) ld8 r17=[r17] // fetch the L2 entry (may be 0)
439 shr.u r19=r16,PAGE_SHIFT // shift L3 index into position 444 shr.u r19=r22,PAGE_SHIFT // shift L3 index into position
440 ;; 445 ;;
441(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL? 446(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL?
442 dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry 447 dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index febc091c2f..f1aca7cffd 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -825,14 +825,16 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
825 * XXX Should have an arch-hook for running this after final section 825 * XXX Should have an arch-hook for running this after final section
826 * addresses have been selected... 826 * addresses have been selected...
827 */ 827 */
828 /* See if gp can cover the entire core module: */ 828 uint64_t gp;
829 uint64_t gp = (uint64_t) mod->module_core + MAX_LTOFF / 2; 829 if (mod->core_size > MAX_LTOFF)
830 if (mod->core_size >= MAX_LTOFF)
831 /* 830 /*
832 * This takes advantage of fact that SHF_ARCH_SMALL gets allocated 831 * This takes advantage of fact that SHF_ARCH_SMALL gets allocated
833 * at the end of the module. 832 * at the end of the module.
834 */ 833 */
835 gp = (uint64_t) mod->module_core + mod->core_size - MAX_LTOFF / 2; 834 gp = mod->core_size - MAX_LTOFF / 2;
835 else
836 gp = mod->core_size / 2;
837 gp = (uint64_t) mod->module_core + ((gp + 7) & -8);
836 mod->arch.gp = gp; 838 mod->arch.gp = gp;
837 DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp); 839 DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp);
838 } 840 }
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 08c8a5eb25..6d57aebad4 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -635,11 +635,17 @@ ia64_flush_fph (struct task_struct *task)
635{ 635{
636 struct ia64_psr *psr = ia64_psr(ia64_task_regs(task)); 636 struct ia64_psr *psr = ia64_psr(ia64_task_regs(task));
637 637
638 /*
639 * Prevent migrating this task while
640 * we're fiddling with the FPU state
641 */
642 preempt_disable();
638 if (ia64_is_local_fpu_owner(task) && psr->mfh) { 643 if (ia64_is_local_fpu_owner(task) && psr->mfh) {
639 psr->mfh = 0; 644 psr->mfh = 0;
640 task->thread.flags |= IA64_THREAD_FPH_VALID; 645 task->thread.flags |= IA64_THREAD_FPH_VALID;
641 ia64_save_fpu(&task->thread.fph[0]); 646 ia64_save_fpu(&task->thread.fph[0]);
642 } 647 }
648 preempt_enable();
643} 649}
644 650
645/* 651/*
@@ -939,6 +945,13 @@ access_uarea (struct task_struct *child, unsigned long addr,
939 *data = (pt->cr_ipsr & IPSR_MASK); 945 *data = (pt->cr_ipsr & IPSR_MASK);
940 return 0; 946 return 0;
941 947
948 case PT_AR_RSC:
949 if (write_access)
950 pt->ar_rsc = *data | (3 << 2); /* force PL3 */
951 else
952 *data = pt->ar_rsc;
953 return 0;
954
942 case PT_AR_RNAT: 955 case PT_AR_RNAT:
943 urbs_end = ia64_get_user_rbs_end(child, pt, NULL); 956 urbs_end = ia64_get_user_rbs_end(child, pt, NULL);
944 rnat_addr = (long) ia64_rse_rnat_addr((long *) 957 rnat_addr = (long) ia64_rse_rnat_addr((long *)
@@ -990,9 +1003,6 @@ access_uarea (struct task_struct *child, unsigned long addr,
990 case PT_AR_BSPSTORE: 1003 case PT_AR_BSPSTORE:
991 ptr = pt_reg_addr(pt, ar_bspstore); 1004 ptr = pt_reg_addr(pt, ar_bspstore);
992 break; 1005 break;
993 case PT_AR_RSC:
994 ptr = pt_reg_addr(pt, ar_rsc);
995 break;
996 case PT_AR_UNAT: 1006 case PT_AR_UNAT:
997 ptr = pt_reg_addr(pt, ar_unat); 1007 ptr = pt_reg_addr(pt, ar_unat);
998 break; 1008 break;
@@ -1228,7 +1238,7 @@ ptrace_getregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
1228static long 1238static long
1229ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr) 1239ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
1230{ 1240{
1231 unsigned long psr, ec, lc, rnat, bsp, cfm, nat_bits, val = 0; 1241 unsigned long psr, rsc, ec, lc, rnat, bsp, cfm, nat_bits, val = 0;
1232 struct unw_frame_info info; 1242 struct unw_frame_info info;
1233 struct switch_stack *sw; 1243 struct switch_stack *sw;
1234 struct ia64_fpreg fpval; 1244 struct ia64_fpreg fpval;
@@ -1261,7 +1271,7 @@ ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
1261 /* app regs */ 1271 /* app regs */
1262 1272
1263 retval |= __get_user(pt->ar_pfs, &ppr->ar[PT_AUR_PFS]); 1273 retval |= __get_user(pt->ar_pfs, &ppr->ar[PT_AUR_PFS]);
1264 retval |= __get_user(pt->ar_rsc, &ppr->ar[PT_AUR_RSC]); 1274 retval |= __get_user(rsc, &ppr->ar[PT_AUR_RSC]);
1265 retval |= __get_user(pt->ar_bspstore, &ppr->ar[PT_AUR_BSPSTORE]); 1275 retval |= __get_user(pt->ar_bspstore, &ppr->ar[PT_AUR_BSPSTORE]);
1266 retval |= __get_user(pt->ar_unat, &ppr->ar[PT_AUR_UNAT]); 1276 retval |= __get_user(pt->ar_unat, &ppr->ar[PT_AUR_UNAT]);
1267 retval |= __get_user(pt->ar_ccv, &ppr->ar[PT_AUR_CCV]); 1277 retval |= __get_user(pt->ar_ccv, &ppr->ar[PT_AUR_CCV]);
@@ -1359,6 +1369,7 @@ ptrace_setregs (struct task_struct *child, struct pt_all_user_regs __user *ppr)
1359 retval |= __get_user(nat_bits, &ppr->nat); 1369 retval |= __get_user(nat_bits, &ppr->nat);
1360 1370
1361 retval |= access_uarea(child, PT_CR_IPSR, &psr, 1); 1371 retval |= access_uarea(child, PT_CR_IPSR, &psr, 1);
1372 retval |= access_uarea(child, PT_AR_RSC, &rsc, 1);
1362 retval |= access_uarea(child, PT_AR_EC, &ec, 1); 1373 retval |= access_uarea(child, PT_AR_EC, &ec, 1);
1363 retval |= access_uarea(child, PT_AR_LC, &lc, 1); 1374 retval |= access_uarea(child, PT_AR_LC, &lc, 1);
1364 retval |= access_uarea(child, PT_AR_RNAT, &rnat, 1); 1375 retval |= access_uarea(child, PT_AR_RNAT, &rnat, 1);
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index b7e6b4cb37..d14692e092 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -720,7 +720,8 @@ cpu_init (void)
720 ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page))); 720 ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page)));
721 721
722 /* 722 /*
723 * Initialize default control register to defer all speculative faults. The 723 * Initialize default control register to defer speculative faults except
724 * for those arising from TLB misses, which are not deferred. The
724 * kernel MUST NOT depend on a particular setting of these bits (in other words, 725 * kernel MUST NOT depend on a particular setting of these bits (in other words,
725 * the kernel must have recovery code for all speculative accesses). Turn on 726 * the kernel must have recovery code for all speculative accesses). Turn on
726 * dcr.lc as per recommendation by the architecture team. Most IA-32 apps 727 * dcr.lc as per recommendation by the architecture team. Most IA-32 apps
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 499b7e5317..edd9f07860 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -94,7 +94,7 @@ sys_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, long arg2,
94static long 94static long
95restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr) 95restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
96{ 96{
97 unsigned long ip, flags, nat, um, cfm; 97 unsigned long ip, flags, nat, um, cfm, rsc;
98 long err; 98 long err;
99 99
100 /* Always make any pending restarted system calls return -EINTR */ 100 /* Always make any pending restarted system calls return -EINTR */
@@ -106,7 +106,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
106 err |= __get_user(ip, &sc->sc_ip); /* instruction pointer */ 106 err |= __get_user(ip, &sc->sc_ip); /* instruction pointer */
107 err |= __get_user(cfm, &sc->sc_cfm); 107 err |= __get_user(cfm, &sc->sc_cfm);
108 err |= __get_user(um, &sc->sc_um); /* user mask */ 108 err |= __get_user(um, &sc->sc_um); /* user mask */
109 err |= __get_user(scr->pt.ar_rsc, &sc->sc_ar_rsc); 109 err |= __get_user(rsc, &sc->sc_ar_rsc);
110 err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat); 110 err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat);
111 err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr); 111 err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr);
112 err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs); 112 err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs);
@@ -119,6 +119,7 @@ restore_sigcontext (struct sigcontext __user *sc, struct sigscratch *scr)
119 err |= __copy_from_user(&scr->pt.r15, &sc->sc_gr[15], 8); /* r15 */ 119 err |= __copy_from_user(&scr->pt.r15, &sc->sc_gr[15], 8); /* r15 */
120 120
121 scr->pt.cr_ifs = cfm | (1UL << 63); 121 scr->pt.cr_ifs = cfm | (1UL << 63);
122 scr->pt.ar_rsc = rsc | (3 << 2); /* force PL3 */
122 123
123 /* establish new instruction pointer: */ 124 /* establish new instruction pointer: */
124 scr->pt.cr_iip = ip & ~0x3UL; 125 scr->pt.cr_iip = ip & ~0x3UL;
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c
index 953095e2ce..b49d4ddaab 100644
--- a/arch/ia64/kernel/smp.c
+++ b/arch/ia64/kernel/smp.c
@@ -269,7 +269,7 @@ smp_call_function_single (int cpuid, void (*func) (void *info), void *info, int
269 int me = get_cpu(); /* prevent preemption and reschedule on another processor */ 269 int me = get_cpu(); /* prevent preemption and reschedule on another processor */
270 270
271 if (cpuid == me) { 271 if (cpuid == me) {
272 printk("%s: trying to call self\n", __FUNCTION__); 272 printk(KERN_INFO "%s: trying to call self\n", __FUNCTION__);
273 put_cpu(); 273 put_cpu();
274 return -EBUSY; 274 return -EBUSY;
275 } 275 }
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index e82ad78081..1861173bd4 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -111,6 +111,24 @@ ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
111 siginfo_t siginfo; 111 siginfo_t siginfo;
112 int sig, code; 112 int sig, code;
113 113
114 /* break.b always sets cr.iim to 0, which causes problems for
115 * debuggers. Get the real break number from the original instruction,
116 * but only for kernel code. User space break.b is left alone, to
117 * preserve the existing behaviour. All break codings have the same
118 * format, so there is no need to check the slot type.
119 */
120 if (break_num == 0 && !user_mode(regs)) {
121 struct ia64_psr *ipsr = ia64_psr(regs);
122 unsigned long *bundle = (unsigned long *)regs->cr_iip;
123 unsigned long slot;
124 switch (ipsr->ri) {
125 case 0: slot = (bundle[0] >> 5); break;
126 case 1: slot = (bundle[0] >> 46) | (bundle[1] << 18); break;
127 default: slot = (bundle[1] >> 23); break;
128 }
129 break_num = ((slot >> 36 & 1) << 20) | (slot >> 6 & 0xfffff);
130 }
131
114 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */ 132 /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */
115 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri); 133 siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri);
116 siginfo.si_imm = break_num; 134 siginfo.si_imm = break_num;
@@ -202,13 +220,21 @@ disabled_fph_fault (struct pt_regs *regs)
202 220
203 /* first, grant user-level access to fph partition: */ 221 /* first, grant user-level access to fph partition: */
204 psr->dfh = 0; 222 psr->dfh = 0;
223
224 /*
225 * Make sure that no other task gets in on this processor
226 * while we're claiming the FPU
227 */
228 preempt_disable();
205#ifndef CONFIG_SMP 229#ifndef CONFIG_SMP
206 { 230 {
207 struct task_struct *fpu_owner 231 struct task_struct *fpu_owner
208 = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER); 232 = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER);
209 233
210 if (ia64_is_local_fpu_owner(current)) 234 if (ia64_is_local_fpu_owner(current)) {
235 preempt_enable_no_resched();
211 return; 236 return;
237 }
212 238
213 if (fpu_owner) 239 if (fpu_owner)
214 ia64_flush_fph(fpu_owner); 240 ia64_flush_fph(fpu_owner);
@@ -226,6 +252,7 @@ disabled_fph_fault (struct pt_regs *regs)
226 */ 252 */
227 psr->mfh = 1; 253 psr->mfh = 1;
228 } 254 }
255 preempt_enable_no_resched();
229} 256}
230 257
231static inline int 258static inline int
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c
new file mode 100644
index 0000000000..490dfc9ab4
--- /dev/null
+++ b/arch/ia64/kernel/uncached.c
@@ -0,0 +1,246 @@
1/*
2 * Copyright (C) 2001-2005 Silicon Graphics, Inc. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License
6 * as published by the Free Software Foundation.
7 *
8 * A simple uncached page allocator using the generic allocator. This
9 * allocator first utilizes the spare (spill) pages found in the EFI
10 * memmap and will then start converting cached pages to uncached ones
11 * at a granule at a time. Node awareness is implemented by having a
12 * pool of pages per node.
13 */
14
15#include <linux/types.h>
16#include <linux/kernel.h>
17#include <linux/module.h>
18#include <linux/init.h>
19#include <linux/errno.h>
20#include <linux/string.h>
21#include <linux/slab.h>
22#include <linux/efi.h>
23#include <linux/genalloc.h>
24#include <asm/page.h>
25#include <asm/pal.h>
26#include <asm/system.h>
27#include <asm/pgtable.h>
28#include <asm/atomic.h>
29#include <asm/tlbflush.h>
30#include <asm/sn/arch.h>
31
32#define DEBUG 0
33
34#if DEBUG
35#define dprintk printk
36#else
37#define dprintk(x...) do { } while (0)
38#endif
39
40void __init efi_memmap_walk_uc (efi_freemem_callback_t callback);
41
42#define MAX_UNCACHED_GRANULES 5
43static int allocated_granules;
44
45struct gen_pool *uncached_pool[MAX_NUMNODES];
46
47
48static void uncached_ipi_visibility(void *data)
49{
50 int status;
51
52 status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);
53 if ((status != PAL_VISIBILITY_OK) &&
54 (status != PAL_VISIBILITY_OK_REMOTE_NEEDED))
55 printk(KERN_DEBUG "pal_prefetch_visibility() returns %i on "
56 "CPU %i\n", status, get_cpu());
57}
58
59
60static void uncached_ipi_mc_drain(void *data)
61{
62 int status;
63 status = ia64_pal_mc_drain();
64 if (status)
65 printk(KERN_WARNING "ia64_pal_mc_drain() failed with %i on "
66 "CPU %i\n", status, get_cpu());
67}
68
69
70static unsigned long
71uncached_get_new_chunk(struct gen_pool *poolp)
72{
73 struct page *page;
74 void *tmp;
75 int status, i;
76 unsigned long addr, node;
77
78 if (allocated_granules >= MAX_UNCACHED_GRANULES)
79 return 0;
80
81 node = poolp->private;
82 page = alloc_pages_node(node, GFP_KERNEL | __GFP_ZERO,
83 IA64_GRANULE_SHIFT-PAGE_SHIFT);
84
85 dprintk(KERN_INFO "get_new_chunk page %p, addr %lx\n",
86 page, (unsigned long)(page-vmem_map) << PAGE_SHIFT);
87
88 /*
89 * Do magic if no mem on local node! XXX
90 */
91 if (!page)
92 return 0;
93 tmp = page_address(page);
94
95 /*
96 * There's a small race here where it's possible for someone to
97 * access the page through /dev/mem halfway through the conversion
98 * to uncached - not sure it's really worth bothering about
99 */
100 for (i = 0; i < (IA64_GRANULE_SIZE / PAGE_SIZE); i++)
101 SetPageUncached(&page[i]);
102
103 flush_tlb_kernel_range(tmp, tmp + IA64_GRANULE_SIZE);
104
105 status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);
106
107 dprintk(KERN_INFO "pal_prefetch_visibility() returns %i on cpu %i\n",
108 status, get_cpu());
109
110 if (!status) {
111 status = smp_call_function(uncached_ipi_visibility, NULL, 0, 1);
112 if (status)
113 printk(KERN_WARNING "smp_call_function failed for "
114 "uncached_ipi_visibility! (%i)\n", status);
115 }
116
117 if (ia64_platform_is("sn2"))
118 sn_flush_all_caches((unsigned long)tmp, IA64_GRANULE_SIZE);
119 else
120 flush_icache_range((unsigned long)tmp,
121 (unsigned long)tmp+IA64_GRANULE_SIZE);
122
123 ia64_pal_mc_drain();
124 status = smp_call_function(uncached_ipi_mc_drain, NULL, 0, 1);
125 if (status)
126 printk(KERN_WARNING "smp_call_function failed for "
127 "uncached_ipi_mc_drain! (%i)\n", status);
128
129 addr = (unsigned long)tmp - PAGE_OFFSET + __IA64_UNCACHED_OFFSET;
130
131 allocated_granules++;
132 return addr;
133}
134
135
136/*
137 * uncached_alloc_page
138 *
139 * Allocate 1 uncached page. Allocates on the requested node. If no
140 * uncached pages are available on the requested node, roundrobin starting
141 * with higher nodes.
142 */
143unsigned long
144uncached_alloc_page(int nid)
145{
146 unsigned long maddr;
147
148 maddr = gen_pool_alloc(uncached_pool[nid], PAGE_SIZE);
149
150 dprintk(KERN_DEBUG "uncached_alloc_page returns %lx on node %i\n",
151 maddr, nid);
152
153 /*
154 * If no memory is availble on our local node, try the
155 * remaining nodes in the system.
156 */
157 if (!maddr) {
158 int i;
159
160 for (i = MAX_NUMNODES - 1; i >= 0; i--) {
161 if (i == nid || !node_online(i))
162 continue;
163 maddr = gen_pool_alloc(uncached_pool[i], PAGE_SIZE);
164 dprintk(KERN_DEBUG "uncached_alloc_page alternate search "
165 "returns %lx on node %i\n", maddr, i);
166 if (maddr) {
167 break;
168 }
169 }
170 }
171
172 return maddr;
173}
174EXPORT_SYMBOL(uncached_alloc_page);
175
176
177/*
178 * uncached_free_page
179 *
180 * Free a single uncached page.
181 */
182void
183uncached_free_page(unsigned long maddr)
184{
185 int node;
186
187 node = nasid_to_cnodeid(NASID_GET(maddr));
188
189 dprintk(KERN_DEBUG "uncached_free_page(%lx) on node %i\n", maddr, node);
190
191 if ((maddr & (0XFUL << 60)) != __IA64_UNCACHED_OFFSET)
192 panic("uncached_free_page invalid address %lx\n", maddr);
193
194 gen_pool_free(uncached_pool[node], maddr, PAGE_SIZE);
195}
196EXPORT_SYMBOL(uncached_free_page);
197
198
199/*
200 * uncached_build_memmap,
201 *
202 * Called at boot time to build a map of pages that can be used for
203 * memory special operations.
204 */
205static int __init
206uncached_build_memmap(unsigned long start, unsigned long end, void *arg)
207{
208 long length;
209 unsigned long vstart, vend;
210 int node;
211
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);
217
218 memset((char *)vstart, 0, length);
219
220 node = nasid_to_cnodeid(NASID_GET(start));
221
222 for (; vstart < vend ; vstart += PAGE_SIZE) {
223 dprintk(KERN_INFO "sticking %lx into the pool!\n", vstart);
224 gen_pool_free(uncached_pool[node], vstart, PAGE_SIZE);
225 }
226
227 return 0;
228}
229
230
231static int __init uncached_init(void) {
232 int i;
233
234 for (i = 0; i < MAX_NUMNODES; i++) {
235 if (!node_online(i))
236 continue;
237 uncached_pool[i] = gen_pool_create(0, IA64_GRANULE_SHIFT,
238 &uncached_get_new_chunk, i);
239 }
240
241 efi_memmap_walk_uc(uncached_build_memmap);
242
243 return 0;
244}
245
246__initcall(uncached_init);
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index df08ae7634..e0a776a304 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -24,7 +24,7 @@
24 24
25unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; 25unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT;
26 26
27static pte_t * 27pte_t *
28huge_pte_alloc (struct mm_struct *mm, unsigned long addr) 28huge_pte_alloc (struct mm_struct *mm, unsigned long addr)
29{ 29{
30 unsigned long taddr = htlbpage_to_page(addr); 30 unsigned long taddr = htlbpage_to_page(addr);
@@ -43,7 +43,7 @@ huge_pte_alloc (struct mm_struct *mm, unsigned long addr)
43 return pte; 43 return pte;
44} 44}
45 45
46static pte_t * 46pte_t *
47huge_pte_offset (struct mm_struct *mm, unsigned long addr) 47huge_pte_offset (struct mm_struct *mm, unsigned long addr)
48{ 48{
49 unsigned long taddr = htlbpage_to_page(addr); 49 unsigned long taddr = htlbpage_to_page(addr);
@@ -67,23 +67,6 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr)
67 67
68#define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; } 68#define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; }
69 69
70static void
71set_huge_pte (struct mm_struct *mm, struct vm_area_struct *vma,
72 struct page *page, pte_t * page_table, int write_access)
73{
74 pte_t entry;
75
76 add_mm_counter(mm, rss, HPAGE_SIZE / PAGE_SIZE);
77 if (write_access) {
78 entry =
79 pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
80 } else
81 entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot));
82 entry = pte_mkyoung(entry);
83 mk_pte_huge(entry);
84 set_pte(page_table, entry);
85 return;
86}
87/* 70/*
88 * This function checks for proper alignment of input addr and len parameters. 71 * This function checks for proper alignment of input addr and len parameters.
89 */ 72 */
@@ -99,68 +82,6 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
99 return 0; 82 return 0;
100} 83}
101 84
102int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
103 struct vm_area_struct *vma)
104{
105 pte_t *src_pte, *dst_pte, entry;
106 struct page *ptepage;
107 unsigned long addr = vma->vm_start;
108 unsigned long end = vma->vm_end;
109
110 while (addr < end) {
111 dst_pte = huge_pte_alloc(dst, addr);
112 if (!dst_pte)
113 goto nomem;
114 src_pte = huge_pte_offset(src, addr);
115 entry = *src_pte;
116 ptepage = pte_page(entry);
117 get_page(ptepage);
118 set_pte(dst_pte, entry);
119 add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE);
120 addr += HPAGE_SIZE;
121 }
122 return 0;
123nomem:
124 return -ENOMEM;
125}
126
127int
128follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
129 struct page **pages, struct vm_area_struct **vmas,
130 unsigned long *st, int *length, int i)
131{
132 pte_t *ptep, pte;
133 unsigned long start = *st;
134 unsigned long pstart;
135 int len = *length;
136 struct page *page;
137
138 do {
139 pstart = start & HPAGE_MASK;
140 ptep = huge_pte_offset(mm, start);
141 pte = *ptep;
142
143back1:
144 page = pte_page(pte);
145 if (pages) {
146 page += ((start & ~HPAGE_MASK) >> PAGE_SHIFT);
147 get_page(page);
148 pages[i] = page;
149 }
150 if (vmas)
151 vmas[i] = vma;
152 i++;
153 len--;
154 start += PAGE_SIZE;
155 if (((start & HPAGE_MASK) == pstart) && len &&
156 (start < vma->vm_end))
157 goto back1;
158 } while (len && start < vma->vm_end);
159 *length = len;
160 *st = start;
161 return i;
162}
163
164struct page *follow_huge_addr(struct mm_struct *mm, unsigned long addr, int write) 85struct page *follow_huge_addr(struct mm_struct *mm, unsigned long addr, int write)
165{ 86{
166 struct page *page; 87 struct page *page;
@@ -212,81 +133,6 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb,
212 free_pgd_range(tlb, addr, end, floor, ceiling); 133 free_pgd_range(tlb, addr, end, floor, ceiling);
213} 134}
214 135
215void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
216{
217 struct mm_struct *mm = vma->vm_mm;
218 unsigned long address;
219 pte_t *pte;
220 struct page *page;
221
222 BUG_ON(start & (HPAGE_SIZE - 1));
223 BUG_ON(end & (HPAGE_SIZE - 1));
224
225 for (address = start; address < end; address += HPAGE_SIZE) {
226 pte = huge_pte_offset(mm, address);
227 if (pte_none(*pte))
228 continue;
229 page = pte_page(*pte);
230 put_page(page);
231 pte_clear(mm, address, pte);
232 }
233 add_mm_counter(mm, rss, - ((end - start) >> PAGE_SHIFT));
234 flush_tlb_range(vma, start, end);
235}
236
237int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)
238{
239 struct mm_struct *mm = current->mm;
240 unsigned long addr;
241 int ret = 0;
242
243 BUG_ON(vma->vm_start & ~HPAGE_MASK);
244 BUG_ON(vma->vm_end & ~HPAGE_MASK);
245
246 spin_lock(&mm->page_table_lock);
247 for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) {
248 unsigned long idx;
249 pte_t *pte = huge_pte_alloc(mm, addr);
250 struct page *page;
251
252 if (!pte) {
253 ret = -ENOMEM;
254 goto out;
255 }
256 if (!pte_none(*pte))
257 continue;
258
259 idx = ((addr - vma->vm_start) >> HPAGE_SHIFT)
260 + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));
261 page = find_get_page(mapping, idx);
262 if (!page) {
263 /* charge the fs quota first */
264 if (hugetlb_get_quota(mapping)) {
265 ret = -ENOMEM;
266 goto out;
267 }
268 page = alloc_huge_page();
269 if (!page) {
270 hugetlb_put_quota(mapping);
271 ret = -ENOMEM;
272 goto out;
273 }
274 ret = add_to_page_cache(page, mapping, idx, GFP_ATOMIC);
275 if (! ret) {
276 unlock_page(page);
277 } else {
278 hugetlb_put_quota(mapping);
279 page_cache_release(page);
280 goto out;
281 }
282 }
283 set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE);
284 }
285out:
286 spin_unlock(&mm->page_table_lock);
287 return ret;
288}
289
290unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, 136unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
291 unsigned long pgoff, unsigned long flags) 137 unsigned long pgoff, unsigned long flags)
292{ 138{
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 547785e3cb..4eb2f52b87 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -305,8 +305,9 @@ setup_gate (void)
305 struct page *page; 305 struct page *page;
306 306
307 /* 307 /*
308 * Map the gate page twice: once read-only to export the ELF headers etc. and once 308 * Map the gate page twice: once read-only to export the ELF
309 * execute-only page to enable privilege-promotion via "epc": 309 * headers etc. and once execute-only page to enable
310 * privilege-promotion via "epc":
310 */ 311 */
311 page = virt_to_page(ia64_imva(__start_gate_section)); 312 page = virt_to_page(ia64_imva(__start_gate_section));
312 put_kernel_page(page, GATE_ADDR, PAGE_READONLY); 313 put_kernel_page(page, GATE_ADDR, PAGE_READONLY);
@@ -315,6 +316,20 @@ setup_gate (void)
315 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); 316 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE);
316#else 317#else
317 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); 318 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE);
319 /* Fill in the holes (if any) with read-only zero pages: */
320 {
321 unsigned long addr;
322
323 for (addr = GATE_ADDR + PAGE_SIZE;
324 addr < GATE_ADDR + PERCPU_PAGE_SIZE;
325 addr += PAGE_SIZE)
326 {
327 put_kernel_page(ZERO_PAGE(0), addr,
328 PAGE_READONLY);
329 put_kernel_page(ZERO_PAGE(0), addr + PERCPU_PAGE_SIZE,
330 PAGE_READONLY);
331 }
332 }
318#endif 333#endif
319 ia64_patch_gate(); 334 ia64_patch_gate();
320} 335}
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 88641e5095..e3fc4edea1 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -33,8 +33,6 @@
33#include <asm/hw_irq.h> 33#include <asm/hw_irq.h>
34 34
35 35
36static int pci_routeirq;
37
38/* 36/*
39 * Low-level SAL-based PCI configuration access functions. Note that SAL 37 * Low-level SAL-based PCI configuration access functions. Note that SAL
40 * calls are already serialized (via sal_lock), so we don't need another 38 * calls are already serialized (via sal_lock), so we don't need another
@@ -139,24 +137,8 @@ static void acpi_map_iosapics(void)
139static int __init 137static int __init
140pci_acpi_init (void) 138pci_acpi_init (void)
141{ 139{
142 struct pci_dev *dev = NULL;
143
144 printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
145
146 acpi_map_iosapics(); 140 acpi_map_iosapics();
147 141
148 if (pci_routeirq) {
149 /*
150 * PCI IRQ routing is set up by pci_enable_device(), but we
151 * also do it here in case there are still broken drivers that
152 * don't use pci_enable_device().
153 */
154 printk(KERN_INFO "PCI: Routing interrupts for all devices because \"pci=routeirq\" specified\n");
155 for_each_pci_dev(dev)
156 acpi_pci_irq_enable(dev);
157 } else
158 printk(KERN_INFO "PCI: If a device doesn't work, try \"pci=routeirq\". If it helps, post a report\n");
159
160 return 0; 142 return 0;
161} 143}
162 144
@@ -500,8 +482,6 @@ pcibios_align_resource (void *data, struct resource *res,
500char * __init 482char * __init
501pcibios_setup (char *str) 483pcibios_setup (char *str)
502{ 484{
503 if (!strcmp(str, "routeirq"))
504 pci_routeirq = 1;
505 return NULL; 485 return NULL;
506} 486}
507 487
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index e64cb8175f..44bfc7f318 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -222,7 +222,7 @@ void __init early_sn_setup(void)
222 222
223extern int platform_intr_list[]; 223extern int platform_intr_list[];
224extern nasid_t master_nasid; 224extern nasid_t master_nasid;
225static int shub_1_1_found __initdata; 225static int __initdata shub_1_1_found = 0;
226 226
227/* 227/*
228 * sn_check_for_wars 228 * sn_check_for_wars
@@ -251,7 +251,7 @@ static void __init sn_check_for_wars(void)
251 } else { 251 } else {
252 for_each_online_node(cnode) { 252 for_each_online_node(cnode) {
253 if (is_shub_1_1(cnodeid_to_nasid(cnode))) 253 if (is_shub_1_1(cnodeid_to_nasid(cnode)))
254 sn_hub_info->shub_1_1_found = 1; 254 shub_1_1_found = 1;
255 } 255 }
256 } 256 }
257} 257}
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index ab9b5f35c2..a087b27484 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -432,7 +432,7 @@ static int tiocx_reload(struct cx_dev *cx_dev)
432 return cx_device_reload(cx_dev); 432 return cx_device_reload(cx_dev);
433} 433}
434 434
435static ssize_t show_cxdev_control(struct device *dev, char *buf) 435static ssize_t show_cxdev_control(struct device *dev, struct device_attribute *attr, char *buf)
436{ 436{
437 struct cx_dev *cx_dev = to_cx_dev(dev); 437 struct cx_dev *cx_dev = to_cx_dev(dev);
438 438
@@ -442,7 +442,7 @@ static ssize_t show_cxdev_control(struct device *dev, char *buf)
442 tiocx_btchar_get(cx_dev->cx_id.nasid)); 442 tiocx_btchar_get(cx_dev->cx_id.nasid));
443} 443}
444 444
445static ssize_t store_cxdev_control(struct device *dev, const char *buf, 445static ssize_t store_cxdev_control(struct device *dev, struct device_attribute *attr, const char *buf,
446 size_t count) 446 size_t count)
447{ 447{
448 int n; 448 int n;
@@ -518,25 +518,22 @@ static int __init tiocx_init(void)
518 return 0; 518 return 0;
519} 519}
520 520
521static void __exit tiocx_exit(void) 521static int cx_remove_device(struct device * dev, void * data)
522{ 522{
523 struct device *dev; 523 struct cx_dev *cx_dev = to_cx_dev(dev);
524 struct device *tdev; 524 device_remove_file(dev, &dev_attr_cxdev_control);
525 cx_device_unregister(cx_dev);
526 return 0;
527}
525 528
529static void __exit tiocx_exit(void)
530{
526 DBG("tiocx_exit\n"); 531 DBG("tiocx_exit\n");
527 532
528 /* 533 /*
529 * Unregister devices. 534 * Unregister devices.
530 */ 535 */
531 list_for_each_entry_safe(dev, tdev, &tiocx_bus_type.devices.list, 536 bus_for_each_dev(&tiocx_bus_type, NULL, NULL, cx_remove_device);
532 bus_list) {
533 if (dev) {
534 struct cx_dev *cx_dev = to_cx_dev(dev);
535 device_remove_file(dev, &dev_attr_cxdev_control);
536 cx_device_unregister(cx_dev);
537 }
538 }
539
540 bus_unregister(&tiocx_bus_type); 537 bus_unregister(&tiocx_bus_type);
541} 538}
542 539
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c
index 2c3c4a8af5..cd7ed73f0e 100644
--- a/arch/ia64/sn/kernel/xpc_partition.c
+++ b/arch/ia64/sn/kernel/xpc_partition.c
@@ -22,6 +22,7 @@
22#include <linux/cache.h> 22#include <linux/cache.h>
23#include <linux/mmzone.h> 23#include <linux/mmzone.h>
24#include <linux/nodemask.h> 24#include <linux/nodemask.h>
25#include <asm/uncached.h>
25#include <asm/sn/bte.h> 26#include <asm/sn/bte.h>
26#include <asm/sn/intr.h> 27#include <asm/sn/intr.h>
27#include <asm/sn/sn_sal.h> 28#include <asm/sn/sn_sal.h>
@@ -183,7 +184,7 @@ xpc_rsvd_page_init(void)
183 * memory protections are never restricted. 184 * memory protections are never restricted.
184 */ 185 */
185 if ((amos_page = xpc_vars->amos_page) == NULL) { 186 if ((amos_page = xpc_vars->amos_page) == NULL) {
186 amos_page = (AMO_t *) mspec_kalloc_page(0); 187 amos_page = (AMO_t *) TO_AMO(uncached_alloc_page(0));
187 if (amos_page == NULL) { 188 if (amos_page == NULL) {
188 dev_err(xpc_part, "can't allocate page of AMOs\n"); 189 dev_err(xpc_part, "can't allocate page of AMOs\n");
189 return NULL; 190 return NULL;
@@ -200,7 +201,8 @@ xpc_rsvd_page_init(void)
200 if (ret != 0) { 201 if (ret != 0) {
201 dev_err(xpc_part, "can't change memory " 202 dev_err(xpc_part, "can't change memory "
202 "protections\n"); 203 "protections\n");
203 mspec_kfree_page((unsigned long) amos_page); 204 uncached_free_page(__IA64_UNCACHED_OFFSET |
205 TO_PHYS((u64) amos_page));
204 return NULL; 206 return NULL;
205 } 207 }
206 } 208 }