aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig2
-rw-r--r--arch/ia64/configs/sn2_defconfig78
-rw-r--r--arch/ia64/ia32/binfmt_elf32.c3
-rw-r--r--arch/ia64/ia32/ia32_entry.S2
-rw-r--r--arch/ia64/kernel/Makefile3
-rw-r--r--arch/ia64/kernel/entry.S2
-rw-r--r--arch/ia64/kernel/iosapic.c4
-rw-r--r--arch/ia64/kernel/irq.c1
-rw-r--r--arch/ia64/kernel/kprobes.c10
-rw-r--r--arch/ia64/kernel/mca.c10
-rw-r--r--arch/ia64/kernel/mca_drv.c54
-rw-r--r--arch/ia64/kernel/palinfo.c2
-rw-r--r--arch/ia64/kernel/ptrace.c4
-rw-r--r--arch/ia64/kernel/salinfo.c2
-rw-r--r--arch/ia64/kernel/topology.c9
-rw-r--r--arch/ia64/lib/memcpy_mck.S9
-rw-r--r--arch/ia64/mm/discontig.c66
-rw-r--r--arch/ia64/pci/pci.c3
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c8
-rw-r--r--arch/ia64/sn/kernel/xpc_partition.c8
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c6
21 files changed, 191 insertions, 95 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 9f40eeff0b5c..0f3076a820c3 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -413,6 +413,8 @@ config IA64_PALINFO
413config SGI_SN 413config SGI_SN
414 def_bool y if (IA64_SGI_SN2 || IA64_GENERIC) 414 def_bool y if (IA64_SGI_SN2 || IA64_GENERIC)
415 415
416source "drivers/sn/Kconfig"
417
416source "drivers/firmware/Kconfig" 418source "drivers/firmware/Kconfig"
417 419
418source "fs/Kconfig.binfmt" 420source "fs/Kconfig.binfmt"
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig
index a718034d68d0..9ea35398e10d 100644
--- a/arch/ia64/configs/sn2_defconfig
+++ b/arch/ia64/configs/sn2_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.16-rc5 3# Linux kernel version: 2.6.17-rc3
4# Mon Feb 27 16:06:38 2006 4# Thu Apr 27 11:48:23 2006
5# 5#
6 6
7# 7#
@@ -24,6 +24,7 @@ CONFIG_SYSCTL=y
24# CONFIG_AUDIT is not set 24# CONFIG_AUDIT is not set
25# CONFIG_IKCONFIG is not set 25# CONFIG_IKCONFIG is not set
26CONFIG_CPUSETS=y 26CONFIG_CPUSETS=y
27CONFIG_RELAY=y
27CONFIG_INITRAMFS_SOURCE="" 28CONFIG_INITRAMFS_SOURCE=""
28CONFIG_CC_OPTIMIZE_FOR_SIZE=y 29CONFIG_CC_OPTIMIZE_FOR_SIZE=y
29# CONFIG_EMBEDDED is not set 30# CONFIG_EMBEDDED is not set
@@ -38,10 +39,6 @@ CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y 39CONFIG_FUTEX=y
39CONFIG_EPOLL=y 40CONFIG_EPOLL=y
40CONFIG_SHMEM=y 41CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45CONFIG_SLAB=y 42CONFIG_SLAB=y
46# CONFIG_TINY_SHMEM is not set 43# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0 44CONFIG_BASE_SMALL=0
@@ -53,7 +50,6 @@ CONFIG_BASE_SMALL=0
53CONFIG_MODULES=y 50CONFIG_MODULES=y
54CONFIG_MODULE_UNLOAD=y 51CONFIG_MODULE_UNLOAD=y
55# CONFIG_MODULE_FORCE_UNLOAD is not set 52# CONFIG_MODULE_FORCE_UNLOAD is not set
56CONFIG_OBSOLETE_MODPARM=y
57# CONFIG_MODVERSIONS is not set 53# CONFIG_MODVERSIONS is not set
58# CONFIG_MODULE_SRCVERSION_ALL is not set 54# CONFIG_MODULE_SRCVERSION_ALL is not set
59CONFIG_KMOD=y 55CONFIG_KMOD=y
@@ -62,6 +58,7 @@ CONFIG_STOP_MACHINE=y
62# 58#
63# Block layer 59# Block layer
64# 60#
61# CONFIG_BLK_DEV_IO_TRACE is not set
65 62
66# 63#
67# IO Schedulers 64# IO Schedulers
@@ -84,8 +81,10 @@ CONFIG_64BIT=y
84CONFIG_MMU=y 81CONFIG_MMU=y
85CONFIG_SWIOTLB=y 82CONFIG_SWIOTLB=y
86CONFIG_RWSEM_XCHGADD_ALGORITHM=y 83CONFIG_RWSEM_XCHGADD_ALGORITHM=y
84CONFIG_GENERIC_FIND_NEXT_BIT=y
87CONFIG_GENERIC_CALIBRATE_DELAY=y 85CONFIG_GENERIC_CALIBRATE_DELAY=y
88CONFIG_TIME_INTERPOLATION=y 86CONFIG_TIME_INTERPOLATION=y
87CONFIG_DMI=y
89CONFIG_EFI=y 88CONFIG_EFI=y
90CONFIG_GENERIC_IOMAP=y 89CONFIG_GENERIC_IOMAP=y
91CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 90CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
@@ -116,7 +115,6 @@ CONFIG_IA64_SGI_SN_XP=m
116CONFIG_FORCE_MAX_ZONEORDER=17 115CONFIG_FORCE_MAX_ZONEORDER=17
117CONFIG_SMP=y 116CONFIG_SMP=y
118CONFIG_NR_CPUS=1024 117CONFIG_NR_CPUS=1024
119CONFIG_IA64_NR_NODES=256
120# CONFIG_HOTPLUG_CPU is not set 118# CONFIG_HOTPLUG_CPU is not set
121CONFIG_SCHED_SMT=y 119CONFIG_SCHED_SMT=y
122CONFIG_PREEMPT=y 120CONFIG_PREEMPT=y
@@ -136,6 +134,7 @@ CONFIG_ARCH_FLATMEM_ENABLE=y
136CONFIG_ARCH_SPARSEMEM_ENABLE=y 134CONFIG_ARCH_SPARSEMEM_ENABLE=y
137CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y 135CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
138CONFIG_NUMA=y 136CONFIG_NUMA=y
137CONFIG_NODES_SHIFT=10
139CONFIG_VIRTUAL_MEM_MAP=y 138CONFIG_VIRTUAL_MEM_MAP=y
140CONFIG_HOLES_IN_ZONE=y 139CONFIG_HOLES_IN_ZONE=y
141CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 140CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
@@ -187,7 +186,6 @@ CONFIG_ACPI_SYSTEM=y
187CONFIG_PCI=y 186CONFIG_PCI=y
188CONFIG_PCI_DOMAINS=y 187CONFIG_PCI_DOMAINS=y
189# CONFIG_PCI_MSI is not set 188# CONFIG_PCI_MSI is not set
190CONFIG_PCI_LEGACY_PROC=y
191# CONFIG_PCI_DEBUG is not set 189# CONFIG_PCI_DEBUG is not set
192 190
193# 191#
@@ -231,6 +229,7 @@ CONFIG_SYN_COOKIES=y
231# CONFIG_INET_AH is not set 229# CONFIG_INET_AH is not set
232# CONFIG_INET_ESP is not set 230# CONFIG_INET_ESP is not set
233# CONFIG_INET_IPCOMP is not set 231# CONFIG_INET_IPCOMP is not set
232# CONFIG_INET_XFRM_TUNNEL is not set
234# CONFIG_INET_TUNNEL is not set 233# CONFIG_INET_TUNNEL is not set
235CONFIG_INET_DIAG=m 234CONFIG_INET_DIAG=m
236CONFIG_INET_TCP_DIAG=m 235CONFIG_INET_TCP_DIAG=m
@@ -238,9 +237,11 @@ CONFIG_INET_TCP_DIAG=m
238CONFIG_TCP_CONG_BIC=y 237CONFIG_TCP_CONG_BIC=y
239CONFIG_IPV6=m 238CONFIG_IPV6=m
240# CONFIG_IPV6_PRIVACY is not set 239# CONFIG_IPV6_PRIVACY is not set
240# CONFIG_IPV6_ROUTER_PREF is not set
241# CONFIG_INET6_AH is not set 241# CONFIG_INET6_AH is not set
242# CONFIG_INET6_ESP is not set 242# CONFIG_INET6_ESP is not set
243# CONFIG_INET6_IPCOMP is not set 243# CONFIG_INET6_IPCOMP is not set
244# CONFIG_INET6_XFRM_TUNNEL is not set
244# CONFIG_INET6_TUNNEL is not set 245# CONFIG_INET6_TUNNEL is not set
245# CONFIG_IPV6_TUNNEL is not set 246# CONFIG_IPV6_TUNNEL is not set
246# CONFIG_NETFILTER is not set 247# CONFIG_NETFILTER is not set
@@ -468,9 +469,14 @@ CONFIG_SCSI_SATA_VITESSE=y
468# CONFIG_SCSI_INIA100 is not set 469# CONFIG_SCSI_INIA100 is not set
469# CONFIG_SCSI_SYM53C8XX_2 is not set 470# CONFIG_SCSI_SYM53C8XX_2 is not set
470# CONFIG_SCSI_IPR is not set 471# CONFIG_SCSI_IPR is not set
471# CONFIG_SCSI_QLOGIC_FC is not set
472CONFIG_SCSI_QLOGIC_1280=y 472CONFIG_SCSI_QLOGIC_1280=y
473# CONFIG_SCSI_QLA_FC is not set 473CONFIG_SCSI_QLA_FC=y
474CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE=y
475# CONFIG_SCSI_QLA21XX is not set
476CONFIG_SCSI_QLA22XX=y
477CONFIG_SCSI_QLA2300=y
478CONFIG_SCSI_QLA2322=y
479# CONFIG_SCSI_QLA24XX is not set
474# CONFIG_SCSI_LPFC is not set 480# CONFIG_SCSI_LPFC is not set
475# CONFIG_SCSI_DC395x is not set 481# CONFIG_SCSI_DC395x is not set
476# CONFIG_SCSI_DC390T is not set 482# CONFIG_SCSI_DC390T is not set
@@ -486,6 +492,7 @@ CONFIG_MD_RAID0=y
486CONFIG_MD_RAID1=y 492CONFIG_MD_RAID1=y
487# CONFIG_MD_RAID10 is not set 493# CONFIG_MD_RAID10 is not set
488CONFIG_MD_RAID5=y 494CONFIG_MD_RAID5=y
495# CONFIG_MD_RAID5_RESHAPE is not set
489# CONFIG_MD_RAID6 is not set 496# CONFIG_MD_RAID6 is not set
490CONFIG_MD_MULTIPATH=y 497CONFIG_MD_MULTIPATH=y
491# CONFIG_MD_FAULTY is not set 498# CONFIG_MD_FAULTY is not set
@@ -694,6 +701,7 @@ CONFIG_EFI_RTC=y
694# Ftape, the floppy tape device driver 701# Ftape, the floppy tape device driver
695# 702#
696CONFIG_AGP=y 703CONFIG_AGP=y
704# CONFIG_AGP_VIA is not set
697CONFIG_AGP_SGI_TIOCA=y 705CONFIG_AGP_SGI_TIOCA=y
698# CONFIG_DRM is not set 706# CONFIG_DRM is not set
699CONFIG_RAW_DRIVER=m 707CONFIG_RAW_DRIVER=m
@@ -735,10 +743,6 @@ CONFIG_MMTIMER=y
735# 743#
736 744
737# 745#
738# Multimedia Capabilities Port drivers
739#
740
741#
742# Multimedia devices 746# Multimedia devices
743# 747#
744# CONFIG_VIDEO_DEV is not set 748# CONFIG_VIDEO_DEV is not set
@@ -747,6 +751,7 @@ CONFIG_MMTIMER=y
747# Digital Video Broadcasting Devices 751# Digital Video Broadcasting Devices
748# 752#
749# CONFIG_DVB is not set 753# CONFIG_DVB is not set
754# CONFIG_USB_DABUSB is not set
750 755
751# 756#
752# Graphics support 757# Graphics support
@@ -757,6 +762,7 @@ CONFIG_MMTIMER=y
757# Console display driver support 762# Console display driver support
758# 763#
759CONFIG_VGA_CONSOLE=y 764CONFIG_VGA_CONSOLE=y
765# CONFIG_VGACON_SOFT_SCROLLBACK is not set
760CONFIG_DUMMY_CONSOLE=y 766CONFIG_DUMMY_CONSOLE=y
761 767
762# 768#
@@ -769,6 +775,7 @@ CONFIG_DUMMY_CONSOLE=y
769# 775#
770CONFIG_USB_ARCH_HAS_HCD=y 776CONFIG_USB_ARCH_HAS_HCD=y
771CONFIG_USB_ARCH_HAS_OHCI=y 777CONFIG_USB_ARCH_HAS_OHCI=y
778CONFIG_USB_ARCH_HAS_EHCI=y
772CONFIG_USB=m 779CONFIG_USB=m
773# CONFIG_USB_DEBUG is not set 780# CONFIG_USB_DEBUG is not set
774 781
@@ -829,9 +836,7 @@ CONFIG_USB_HIDINPUT=y
829# CONFIG_USB_ACECAD is not set 836# CONFIG_USB_ACECAD is not set
830# CONFIG_USB_KBTAB is not set 837# CONFIG_USB_KBTAB is not set
831# CONFIG_USB_POWERMATE is not set 838# CONFIG_USB_POWERMATE is not set
832# CONFIG_USB_MTOUCH is not set 839# CONFIG_USB_TOUCHSCREEN is not set
833# CONFIG_USB_ITMTOUCH is not set
834# CONFIG_USB_EGALAX is not set
835# CONFIG_USB_YEALINK is not set 840# CONFIG_USB_YEALINK is not set
836# CONFIG_USB_XPAD is not set 841# CONFIG_USB_XPAD is not set
837# CONFIG_USB_ATI_REMOTE is not set 842# CONFIG_USB_ATI_REMOTE is not set
@@ -846,15 +851,6 @@ CONFIG_USB_HIDINPUT=y
846# CONFIG_USB_MICROTEK is not set 851# CONFIG_USB_MICROTEK is not set
847 852
848# 853#
849# USB Multimedia devices
850#
851# CONFIG_USB_DABUSB is not set
852
853#
854# Video4Linux support is needed for USB Multimedia device support
855#
856
857#
858# USB Network Adapters 854# USB Network Adapters
859# 855#
860# CONFIG_USB_CATC is not set 856# CONFIG_USB_CATC is not set
@@ -905,15 +901,29 @@ CONFIG_USB_MON=y
905# CONFIG_MMC is not set 901# CONFIG_MMC is not set
906 902
907# 903#
904# LED devices
905#
906# CONFIG_NEW_LEDS is not set
907
908#
909# LED drivers
910#
911
912#
913# LED Triggers
914#
915
916#
908# InfiniBand support 917# InfiniBand support
909# 918#
910CONFIG_INFINIBAND=m 919CONFIG_INFINIBAND=m
911# CONFIG_INFINIBAND_USER_MAD is not set 920# CONFIG_INFINIBAND_USER_MAD is not set
912CONFIG_INFINIBAND_USER_ACCESS=m 921CONFIG_INFINIBAND_USER_ACCESS=m
913CONFIG_INFINIBAND_MTHCA=m 922CONFIG_INFINIBAND_MTHCA=m
914# CONFIG_INFINIBAND_MTHCA_DEBUG is not set 923CONFIG_INFINIBAND_MTHCA_DEBUG=y
915CONFIG_INFINIBAND_IPOIB=m 924CONFIG_INFINIBAND_IPOIB=m
916# CONFIG_INFINIBAND_IPOIB_DEBUG is not set 925CONFIG_INFINIBAND_IPOIB_DEBUG=y
926# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
917CONFIG_INFINIBAND_SRP=m 927CONFIG_INFINIBAND_SRP=m
918 928
919# 929#
@@ -923,8 +933,13 @@ CONFIG_SGI_IOC4=y
923CONFIG_SGI_IOC3=y 933CONFIG_SGI_IOC3=y
924 934
925# 935#
926# EDAC - error detection and reporting (RAS) 936# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
937#
938
939#
940# Real Time Clock
927# 941#
942# CONFIG_RTC_CLASS is not set
928 943
929# 944#
930# File systems 945# File systems
@@ -997,7 +1012,6 @@ CONFIG_TMPFS=y
997CONFIG_HUGETLBFS=y 1012CONFIG_HUGETLBFS=y
998CONFIG_HUGETLB_PAGE=y 1013CONFIG_HUGETLB_PAGE=y
999CONFIG_RAMFS=y 1014CONFIG_RAMFS=y
1000CONFIG_RELAYFS_FS=m
1001# CONFIG_CONFIGFS_FS is not set 1015# CONFIG_CONFIGFS_FS is not set
1002 1016
1003# 1017#
@@ -1145,7 +1159,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1145# CONFIG_SCHEDSTATS is not set 1159# CONFIG_SCHEDSTATS is not set
1146# CONFIG_DEBUG_SLAB is not set 1160# CONFIG_DEBUG_SLAB is not set
1147CONFIG_DEBUG_PREEMPT=y 1161CONFIG_DEBUG_PREEMPT=y
1148CONFIG_DEBUG_MUTEXES=y 1162# CONFIG_DEBUG_MUTEXES is not set
1149# CONFIG_DEBUG_SPINLOCK is not set 1163# CONFIG_DEBUG_SPINLOCK is not set
1150# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1164# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1151# CONFIG_DEBUG_KOBJECT is not set 1165# CONFIG_DEBUG_KOBJECT is not set
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
index 4e7a6a1ec6c7..da03c06744f1 100644
--- a/arch/ia64/ia32/binfmt_elf32.c
+++ b/arch/ia64/ia32/binfmt_elf32.c
@@ -35,6 +35,9 @@ extern void ia64_elf32_init (struct pt_regs *regs);
35 35
36static void elf32_set_personality (void); 36static void elf32_set_personality (void);
37 37
38static unsigned long __attribute ((unused))
39randomize_stack_top(unsigned long stack_top);
40
38#define setup_arg_pages(bprm,tos,exec) ia32_setup_arg_pages(bprm,exec) 41#define setup_arg_pages(bprm,tos,exec) ia32_setup_arg_pages(bprm,exec)
39#define elf_map elf32_map 42#define elf_map elf32_map
40 43
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S
index 95fe04400f6b..a32cd59b81ed 100644
--- a/arch/ia64/ia32/ia32_entry.S
+++ b/arch/ia64/ia32/ia32_entry.S
@@ -334,7 +334,7 @@ ia32_syscall_table:
334 data8 sys_setdomainname 334 data8 sys_setdomainname
335 data8 sys32_newuname 335 data8 sys32_newuname
336 data8 sys32_modify_ldt 336 data8 sys32_modify_ldt
337 data8 sys_ni_syscall /* adjtimex */ 337 data8 compat_sys_adjtimex
338 data8 sys32_mprotect /* 125 */ 338 data8 sys32_mprotect /* 125 */
339 data8 compat_sys_sigprocmask 339 data8 compat_sys_sigprocmask
340 data8 sys_ni_syscall /* create_module */ 340 data8 sys_ni_syscall /* create_module */
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 59e871dae742..09a0dbc17fb6 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds
7obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \ 7obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \
8 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \ 8 irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \
9 salinfo.o semaphore.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \ 9 salinfo.o semaphore.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \
10 unwind.o mca.o mca_asm.o topology.o dmi_scan.o 10 unwind.o mca.o mca_asm.o topology.o
11 11
12obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o 12obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o
13obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o 13obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o
@@ -30,7 +30,6 @@ obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o
30obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o 30obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o
31obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o 31obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o
32mca_recovery-y += mca_drv.o mca_drv_asm.o 32mca_recovery-y += mca_drv.o mca_drv_asm.o
33dmi_scan-y += ../../i386/kernel/dmi_scan.o
34 33
35# The gate DSO image is built using a special linker script. 34# The gate DSO image is built using a special linker script.
36targets += gate.so gate-syms.o 35targets += gate.so gate-syms.o
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 6e16f6b35bd3..bcb80ca5cf40 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1609,5 +1609,7 @@ sys_call_table:
1609 data8 sys_set_robust_list 1609 data8 sys_set_robust_list
1610 data8 sys_get_robust_list 1610 data8 sys_get_robust_list
1611 data8 sys_sync_file_range // 1300 1611 data8 sys_sync_file_range // 1300
1612 data8 sys_tee
1613 data8 sys_vmsplice
1612 1614
1613 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls 1615 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index 7956eb9058fc..d58c1c5c903a 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -416,7 +416,7 @@ iosapic_end_level_irq (unsigned int irq)
416 ia64_vector vec = irq_to_vector(irq); 416 ia64_vector vec = irq_to_vector(irq);
417 struct iosapic_rte_info *rte; 417 struct iosapic_rte_info *rte;
418 418
419 move_irq(irq); 419 move_native_irq(irq);
420 list_for_each_entry(rte, &iosapic_intr_info[vec].rtes, rte_list) 420 list_for_each_entry(rte, &iosapic_intr_info[vec].rtes, rte_list)
421 iosapic_eoi(rte->addr, vec); 421 iosapic_eoi(rte->addr, vec);
422} 422}
@@ -458,7 +458,7 @@ iosapic_ack_edge_irq (unsigned int irq)
458{ 458{
459 irq_desc_t *idesc = irq_descp(irq); 459 irq_desc_t *idesc = irq_descp(irq);
460 460
461 move_irq(irq); 461 move_native_irq(irq);
462 /* 462 /*
463 * Once we have recorded IRQ_PENDING already, we can mask the 463 * Once we have recorded IRQ_PENDING already, we can mask the
464 * interrupt for real. This prevents IRQ storms from unhandled 464 * interrupt for real. This prevents IRQ storms from unhandled
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 5ce908ef9c95..9c72ea3f6432 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -101,7 +101,6 @@ void set_irq_affinity_info (unsigned int irq, int hwid, int redir)
101 101
102 if (irq < NR_IRQS) { 102 if (irq < NR_IRQS) {
103 irq_affinity[irq] = mask; 103 irq_affinity[irq] = mask;
104 set_irq_info(irq, mask);
105 irq_redir[irq] = (char) (redir & 0xff); 104 irq_redir[irq] = (char) (redir & 0xff);
106 } 105 }
107} 106}
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 789881ca83d4..f9039f88d01d 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -251,7 +251,7 @@ static void __kprobes prepare_break_inst(uint template, uint slot,
251 update_kprobe_inst_flag(template, slot, major_opcode, kprobe_inst, p); 251 update_kprobe_inst_flag(template, slot, major_opcode, kprobe_inst, p);
252} 252}
253 253
254static inline void get_kprobe_inst(bundle_t *bundle, uint slot, 254static void __kprobes get_kprobe_inst(bundle_t *bundle, uint slot,
255 unsigned long *kprobe_inst, uint *major_opcode) 255 unsigned long *kprobe_inst, uint *major_opcode)
256{ 256{
257 unsigned long kprobe_inst_p0, kprobe_inst_p1; 257 unsigned long kprobe_inst_p0, kprobe_inst_p1;
@@ -278,7 +278,7 @@ static inline void get_kprobe_inst(bundle_t *bundle, uint slot,
278} 278}
279 279
280/* Returns non-zero if the addr is in the Interrupt Vector Table */ 280/* Returns non-zero if the addr is in the Interrupt Vector Table */
281static inline int in_ivt_functions(unsigned long addr) 281static int __kprobes in_ivt_functions(unsigned long addr)
282{ 282{
283 return (addr >= (unsigned long)__start_ivt_text 283 return (addr >= (unsigned long)__start_ivt_text
284 && addr < (unsigned long)__end_ivt_text); 284 && addr < (unsigned long)__end_ivt_text);
@@ -308,19 +308,19 @@ static int __kprobes valid_kprobe_addr(int template, int slot,
308 return 0; 308 return 0;
309} 309}
310 310
311static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) 311static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)
312{ 312{
313 kcb->prev_kprobe.kp = kprobe_running(); 313 kcb->prev_kprobe.kp = kprobe_running();
314 kcb->prev_kprobe.status = kcb->kprobe_status; 314 kcb->prev_kprobe.status = kcb->kprobe_status;
315} 315}
316 316
317static inline void restore_previous_kprobe(struct kprobe_ctlblk *kcb) 317static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb)
318{ 318{
319 __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp; 319 __get_cpu_var(current_kprobe) = kcb->prev_kprobe.kp;
320 kcb->kprobe_status = kcb->prev_kprobe.status; 320 kcb->kprobe_status = kcb->prev_kprobe.status;
321} 321}
322 322
323static inline void set_current_kprobe(struct kprobe *p, 323static void __kprobes set_current_kprobe(struct kprobe *p,
324 struct kprobe_ctlblk *kcb) 324 struct kprobe_ctlblk *kcb)
325{ 325{
326 __get_cpu_var(current_kprobe) = p; 326 __get_cpu_var(current_kprobe) = p;
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 5e6fdbe78bcd..6a0880639bc9 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -963,7 +963,7 @@ no_mod:
963 */ 963 */
964 964
965static void 965static void
966ia64_wait_for_slaves(int monarch) 966ia64_wait_for_slaves(int monarch, const char *type)
967{ 967{
968 int c, wait = 0, missing = 0; 968 int c, wait = 0, missing = 0;
969 for_each_online_cpu(c) { 969 for_each_online_cpu(c) {
@@ -989,7 +989,7 @@ ia64_wait_for_slaves(int monarch)
989 } 989 }
990 if (!missing) 990 if (!missing)
991 goto all_in; 991 goto all_in;
992 printk(KERN_INFO "OS MCA slave did not rendezvous on cpu"); 992 printk(KERN_INFO "OS %s slave did not rendezvous on cpu", type);
993 for_each_online_cpu(c) { 993 for_each_online_cpu(c) {
994 if (c == monarch) 994 if (c == monarch)
995 continue; 995 continue;
@@ -1000,7 +1000,7 @@ ia64_wait_for_slaves(int monarch)
1000 return; 1000 return;
1001 1001
1002all_in: 1002all_in:
1003 printk(KERN_INFO "All OS MCA slaves have reached rendezvous\n"); 1003 printk(KERN_INFO "All OS %s slaves have reached rendezvous\n", type);
1004 return; 1004 return;
1005} 1005}
1006 1006
@@ -1038,7 +1038,7 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
1038 if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, (long)&nd, 0, 0) 1038 if (notify_die(DIE_MCA_MONARCH_ENTER, "MCA", regs, (long)&nd, 0, 0)
1039 == NOTIFY_STOP) 1039 == NOTIFY_STOP)
1040 ia64_mca_spin(__FUNCTION__); 1040 ia64_mca_spin(__FUNCTION__);
1041 ia64_wait_for_slaves(cpu); 1041 ia64_wait_for_slaves(cpu, "MCA");
1042 1042
1043 /* Wakeup all the processors which are spinning in the rendezvous loop. 1043 /* Wakeup all the processors which are spinning in the rendezvous loop.
1044 * They will leave SAL, then spin in the OS with interrupts disabled 1044 * They will leave SAL, then spin in the OS with interrupts disabled
@@ -1429,7 +1429,7 @@ ia64_init_handler(struct pt_regs *regs, struct switch_stack *sw,
1429 */ 1429 */
1430 printk("Delaying for 5 seconds...\n"); 1430 printk("Delaying for 5 seconds...\n");
1431 udelay(5*1000000); 1431 udelay(5*1000000);
1432 ia64_wait_for_slaves(cpu); 1432 ia64_wait_for_slaves(cpu, "INIT");
1433 /* If nobody intercepts DIE_INIT_MONARCH_PROCESS then we drop through 1433 /* If nobody intercepts DIE_INIT_MONARCH_PROCESS then we drop through
1434 * to default_monarch_init_process() above and just print all the 1434 * to default_monarch_init_process() above and just print all the
1435 * tasks. 1435 * tasks.
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c
index 37c88eb55873..ca6666b51ccb 100644
--- a/arch/ia64/kernel/mca_drv.c
+++ b/arch/ia64/kernel/mca_drv.c
@@ -62,6 +62,11 @@ typedef enum {
62 ISOLATE_NONE 62 ISOLATE_NONE
63} isolate_status_t; 63} isolate_status_t;
64 64
65typedef enum {
66 MCA_NOT_RECOVERED = 0,
67 MCA_RECOVERED = 1
68} recovery_status_t;
69
65/* 70/*
66 * This pool keeps pointers to the section part of SAL error record 71 * This pool keeps pointers to the section part of SAL error record
67 */ 72 */
@@ -71,6 +76,18 @@ static struct {
71 int max_idx; /* Maximum index of section pointer list pool */ 76 int max_idx; /* Maximum index of section pointer list pool */
72} slidx_pool; 77} slidx_pool;
73 78
79static int
80fatal_mca(const char *fmt, ...)
81{
82 va_list args;
83
84 va_start(args, fmt);
85 vprintk(fmt, args);
86 va_end(args);
87
88 return MCA_NOT_RECOVERED;
89}
90
74/** 91/**
75 * mca_page_isolate - isolate a poisoned page in order not to use it later 92 * mca_page_isolate - isolate a poisoned page in order not to use it later
76 * @paddr: poisoned memory location 93 * @paddr: poisoned memory location
@@ -424,7 +441,7 @@ recover_from_read_error(slidx_table_t *slidx,
424 441
425 /* Is target address valid? */ 442 /* Is target address valid? */
426 if (!pbci->tv) 443 if (!pbci->tv)
427 return 0; 444 return fatal_mca(KERN_ALERT "MCA: target address not valid\n");
428 445
429 /* 446 /*
430 * cpu read or memory-mapped io read 447 * cpu read or memory-mapped io read
@@ -442,7 +459,7 @@ recover_from_read_error(slidx_table_t *slidx,
442 459
443 /* Is minstate valid? */ 460 /* Is minstate valid? */
444 if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate)) 461 if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate))
445 return 0; 462 return fatal_mca(KERN_ALERT "MCA: minstate not valid\n");
446 psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); 463 psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr);
447 psr2 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_xpsr); 464 psr2 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_xpsr);
448 465
@@ -476,12 +493,13 @@ recover_from_read_error(slidx_table_t *slidx,
476 psr2->bn = 1; 493 psr2->bn = 1;
477 psr2->i = 0; 494 psr2->i = 0;
478 495
479 return 1; 496 return MCA_RECOVERED;
480 } 497 }
481 498
482 } 499 }
483 500
484 return 0; 501 return fatal_mca(KERN_ALERT "MCA: kernel context not recovered,"
502 " iip 0x%lx\n", pmsa->pmsa_iip);
485} 503}
486 504
487/** 505/**
@@ -567,13 +585,13 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
567 * The machine check is corrected. 585 * The machine check is corrected.
568 */ 586 */
569 if (psp->cm == 1) 587 if (psp->cm == 1)
570 return 1; 588 return MCA_RECOVERED;
571 589
572 /* 590 /*
573 * The error was not contained. Software must be reset. 591 * The error was not contained. Software must be reset.
574 */ 592 */
575 if (psp->us || psp->ci == 0) 593 if (psp->us || psp->ci == 0)
576 return 0; 594 return fatal_mca(KERN_ALERT "MCA: error not contained\n");
577 595
578 /* 596 /*
579 * The cache check and bus check bits have four possible states 597 * The cache check and bus check bits have four possible states
@@ -584,20 +602,22 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
584 * 1 1 Memory error, attempt recovery 602 * 1 1 Memory error, attempt recovery
585 */ 603 */
586 if (psp->bc == 0 || pbci == NULL) 604 if (psp->bc == 0 || pbci == NULL)
587 return 0; 605 return fatal_mca(KERN_ALERT "MCA: No bus check\n");
588 606
589 /* 607 /*
590 * Sorry, we cannot handle so many. 608 * Sorry, we cannot handle so many.
591 */ 609 */
592 if (peidx_bus_check_num(peidx) > 1) 610 if (peidx_bus_check_num(peidx) > 1)
593 return 0; 611 return fatal_mca(KERN_ALERT "MCA: Too many bus checks\n");
594 /* 612 /*
595 * Well, here is only one bus error. 613 * Well, here is only one bus error.
596 */ 614 */
597 if (pbci->ib || pbci->cc) 615 if (pbci->ib)
598 return 0; 616 return fatal_mca(KERN_ALERT "MCA: Internal Bus error\n");
617 if (pbci->cc)
618 return fatal_mca(KERN_ALERT "MCA: Cache-cache error\n");
599 if (pbci->eb && pbci->bsi > 0) 619 if (pbci->eb && pbci->bsi > 0)
600 return 0; 620 return fatal_mca(KERN_ALERT "MCA: External bus check fatal status\n");
601 621
602 /* 622 /*
603 * This is a local MCA and estimated as recoverble external bus error. 623 * This is a local MCA and estimated as recoverble external bus error.
@@ -609,7 +629,7 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
609 /* 629 /*
610 * On account of strange SAL error record, we cannot recover. 630 * On account of strange SAL error record, we cannot recover.
611 */ 631 */
612 return 0; 632 return fatal_mca(KERN_ALERT "MCA: Strange SAL record\n");
613} 633}
614 634
615/** 635/**
@@ -638,12 +658,10 @@ mca_try_to_recover(void *rec, struct ia64_sal_os_state *sos)
638 658
639 /* Now, OS can recover when there is one processor error section */ 659 /* Now, OS can recover when there is one processor error section */
640 if (n_proc_err > 1) 660 if (n_proc_err > 1)
641 return 0; 661 return fatal_mca(KERN_ALERT "MCA: Too Many Errors\n");
642 else if (n_proc_err == 0) { 662 else if (n_proc_err == 0)
643 /* Weird SAL record ... We need not to recover */ 663 /* Weird SAL record ... We need not to recover */
644 664 return fatal_mca(KERN_ALERT "MCA: Weird SAL record\n");
645 return 1;
646 }
647 665
648 /* Make index of processor error section */ 666 /* Make index of processor error section */
649 mca_make_peidx((sal_log_processor_info_t*) 667 mca_make_peidx((sal_log_processor_info_t*)
@@ -654,7 +672,7 @@ mca_try_to_recover(void *rec, struct ia64_sal_os_state *sos)
654 672
655 /* Check whether MCA is global or not */ 673 /* Check whether MCA is global or not */
656 if (is_mca_global(&peidx, &pbci, sos)) 674 if (is_mca_global(&peidx, &pbci, sos))
657 return 0; 675 return fatal_mca(KERN_ALERT "MCA: global MCA\n");
658 676
659 /* Try to recover a processor error */ 677 /* Try to recover a processor error */
660 return recover_from_processor_error(platform_err, &slidx, &peidx, 678 return recover_from_processor_error(platform_err, &slidx, &peidx,
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index 6386f63c413e..859fb37ff49b 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -959,7 +959,7 @@ remove_palinfo_proc_entries(unsigned int hcpu)
959 } 959 }
960} 960}
961 961
962static int __devinit palinfo_cpu_callback(struct notifier_block *nfb, 962static int palinfo_cpu_callback(struct notifier_block *nfb,
963 unsigned long action, 963 unsigned long action,
964 void *hcpu) 964 void *hcpu)
965{ 965{
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 9887c8787e7a..e61e15e28d8b 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -1644,7 +1644,7 @@ syscall_trace_enter (long arg0, long arg1, long arg2, long arg3,
1644 arch = AUDIT_ARCH_IA64; 1644 arch = AUDIT_ARCH_IA64;
1645 } 1645 }
1646 1646
1647 audit_syscall_entry(current, arch, syscall, arg0, arg1, arg2, arg3); 1647 audit_syscall_entry(arch, syscall, arg0, arg1, arg2, arg3);
1648 } 1648 }
1649 1649
1650} 1650}
@@ -1662,7 +1662,7 @@ syscall_trace_leave (long arg0, long arg1, long arg2, long arg3,
1662 1662
1663 if (success != AUDITSC_SUCCESS) 1663 if (success != AUDITSC_SUCCESS)
1664 result = -result; 1664 result = -result;
1665 audit_syscall_exit(current, success, result); 1665 audit_syscall_exit(success, result);
1666 } 1666 }
1667 1667
1668 if (test_thread_flag(TIF_SYSCALL_TRACE) 1668 if (test_thread_flag(TIF_SYSCALL_TRACE)
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index 9d5a823479a3..663a186ad194 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -572,7 +572,7 @@ static struct file_operations salinfo_data_fops = {
572}; 572};
573 573
574#ifdef CONFIG_HOTPLUG_CPU 574#ifdef CONFIG_HOTPLUG_CPU
575static int __devinit 575static int
576salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) 576salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
577{ 577{
578 unsigned int i, cpu = (unsigned long)hcpu; 578 unsigned int i, cpu = (unsigned long)hcpu;
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index b47476d655f1..4f3a16b37f8f 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -305,13 +305,10 @@ static struct kobj_type cache_ktype_percpu_entry = {
305 305
306static void __cpuinit cpu_cache_sysfs_exit(unsigned int cpu) 306static void __cpuinit cpu_cache_sysfs_exit(unsigned int cpu)
307{ 307{
308 if (all_cpu_cache_info[cpu].cache_leaves) { 308 kfree(all_cpu_cache_info[cpu].cache_leaves);
309 kfree(all_cpu_cache_info[cpu].cache_leaves); 309 all_cpu_cache_info[cpu].cache_leaves = NULL;
310 all_cpu_cache_info[cpu].cache_leaves = NULL;
311 }
312 all_cpu_cache_info[cpu].num_cache_leaves = 0; 310 all_cpu_cache_info[cpu].num_cache_leaves = 0;
313 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); 311 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject));
314
315 return; 312 return;
316} 313}
317 314
@@ -429,7 +426,7 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev)
429 * When a cpu is hot-plugged, do a check and initiate 426 * When a cpu is hot-plugged, do a check and initiate
430 * cache kobject if necessary 427 * cache kobject if necessary
431 */ 428 */
432static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, 429static int cache_cpu_callback(struct notifier_block *nfb,
433 unsigned long action, void *hcpu) 430 unsigned long action, void *hcpu)
434{ 431{
435 unsigned int cpu = (unsigned long)hcpu; 432 unsigned int cpu = (unsigned long)hcpu;
diff --git a/arch/ia64/lib/memcpy_mck.S b/arch/ia64/lib/memcpy_mck.S
index 46c9331e7ab5..9e534d52b1d5 100644
--- a/arch/ia64/lib/memcpy_mck.S
+++ b/arch/ia64/lib/memcpy_mck.S
@@ -6,7 +6,9 @@
6 * in1: source address 6 * in1: source address
7 * in2: number of bytes to copy 7 * in2: number of bytes to copy
8 * Output: 8 * Output:
9 * 0 if success, or number of byte NOT copied if error occurred. 9 * for memcpy: return dest
10 * for copy_user: return 0 if success,
11 * or number of byte NOT copied if error occurred.
10 * 12 *
11 * Copyright (C) 2002 Intel Corp. 13 * Copyright (C) 2002 Intel Corp.
12 * Copyright (C) 2002 Ken Chen <kenneth.w.chen@intel.com> 14 * Copyright (C) 2002 Ken Chen <kenneth.w.chen@intel.com>
@@ -73,6 +75,7 @@ GLOBAL_ENTRY(memcpy)
73 and r28=0x7,in0 75 and r28=0x7,in0
74 and r29=0x7,in1 76 and r29=0x7,in1
75 mov f6=f0 77 mov f6=f0
78 mov retval=in0
76 br.cond.sptk .common_code 79 br.cond.sptk .common_code
77 ;; 80 ;;
78END(memcpy) 81END(memcpy)
@@ -84,7 +87,7 @@ GLOBAL_ENTRY(__copy_user)
84 mov f6=f1 87 mov f6=f1
85 mov saved_in0=in0 // save dest pointer 88 mov saved_in0=in0 // save dest pointer
86 mov saved_in1=in1 // save src pointer 89 mov saved_in1=in1 // save src pointer
87 mov saved_in2=in2 // save len 90 mov retval=r0 // initialize return value
88 ;; 91 ;;
89.common_code: 92.common_code:
90 cmp.gt p15,p0=8,in2 // check for small size 93 cmp.gt p15,p0=8,in2 // check for small size
@@ -92,7 +95,7 @@ GLOBAL_ENTRY(__copy_user)
92 cmp.ne p14,p0=0,r29 // check src alignment 95 cmp.ne p14,p0=0,r29 // check src alignment
93 add src0=0,in1 96 add src0=0,in1
94 sub r30=8,r28 // for .align_dest 97 sub r30=8,r28 // for .align_dest
95 mov retval=r0 // initialize return value 98 mov saved_in2=in2 // save len
96 ;; 99 ;;
97 add dst0=0,in0 100 add dst0=0,in0
98 add dst1=1,in0 // dest odd index 101 add dst1=1,in0 // dest odd index
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index ec9eeb89975d..b6bcc9fa3603 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -519,6 +519,68 @@ void __cpuinit *per_cpu_init(void)
519} 519}
520#endif /* CONFIG_SMP */ 520#endif /* CONFIG_SMP */
521 521
522#ifdef CONFIG_VIRTUAL_MEM_MAP
523static inline int find_next_valid_pfn_for_pgdat(pg_data_t *pgdat, int i)
524{
525 unsigned long end_address, hole_next_pfn;
526 unsigned long stop_address;
527
528 end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i];
529 end_address = PAGE_ALIGN(end_address);
530
531 stop_address = (unsigned long) &vmem_map[
532 pgdat->node_start_pfn + pgdat->node_spanned_pages];
533
534 do {
535 pgd_t *pgd;
536 pud_t *pud;
537 pmd_t *pmd;
538 pte_t *pte;
539
540 pgd = pgd_offset_k(end_address);
541 if (pgd_none(*pgd)) {
542 end_address += PGDIR_SIZE;
543 continue;
544 }
545
546 pud = pud_offset(pgd, end_address);
547 if (pud_none(*pud)) {
548 end_address += PUD_SIZE;
549 continue;
550 }
551
552 pmd = pmd_offset(pud, end_address);
553 if (pmd_none(*pmd)) {
554 end_address += PMD_SIZE;
555 continue;
556 }
557
558 pte = pte_offset_kernel(pmd, end_address);
559retry_pte:
560 if (pte_none(*pte)) {
561 end_address += PAGE_SIZE;
562 pte++;
563 if ((end_address < stop_address) &&
564 (end_address != ALIGN(end_address, 1UL << PMD_SHIFT)))
565 goto retry_pte;
566 continue;
567 }
568 /* Found next valid vmem_map page */
569 break;
570 } while (end_address < stop_address);
571
572 end_address = min(end_address, stop_address);
573 end_address = end_address - (unsigned long) vmem_map + sizeof(struct page) - 1;
574 hole_next_pfn = end_address / sizeof(struct page);
575 return hole_next_pfn - pgdat->node_start_pfn;
576}
577#else
578static inline int find_next_valid_pfn_for_pgdat(pg_data_t *pgdat, int i)
579{
580 return i + 1;
581}
582#endif
583
522/** 584/**
523 * show_mem - give short summary of memory stats 585 * show_mem - give short summary of memory stats
524 * 586 *
@@ -547,8 +609,10 @@ void show_mem(void)
547 struct page *page; 609 struct page *page;
548 if (pfn_valid(pgdat->node_start_pfn + i)) 610 if (pfn_valid(pgdat->node_start_pfn + i))
549 page = pfn_to_page(pgdat->node_start_pfn + i); 611 page = pfn_to_page(pgdat->node_start_pfn + i);
550 else 612 else {
613 i = find_next_valid_pfn_for_pgdat(pgdat, i) - 1;
551 continue; 614 continue;
615 }
552 if (PageReserved(page)) 616 if (PageReserved(page))
553 reserved++; 617 reserved++;
554 else if (PageSwapCache(page)) 618 else if (PageSwapCache(page))
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 9ba32b2d96d0..ab829a22f8a4 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -31,7 +31,6 @@
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/hw_irq.h> 32#include <asm/hw_irq.h>
33 33
34
35/* 34/*
36 * Low-level SAL-based PCI configuration access functions. Note that SAL 35 * Low-level SAL-based PCI configuration access functions. Note that SAL
37 * calls are already serialized (via sal_lock), so we don't need another 36 * calls are already serialized (via sal_lock), so we don't need another
@@ -707,7 +706,7 @@ int ia64_pci_legacy_read(struct pci_bus *bus, u16 port, u32 *val, u8 size)
707 * 706 *
708 * Simply writes @size bytes of @val to @port. 707 * Simply writes @size bytes of @val to @port.
709 */ 708 */
710int ia64_pci_legacy_write(struct pci_dev *bus, u16 port, u32 val, u8 size) 709int ia64_pci_legacy_write(struct pci_bus *bus, u16 port, u32 val, u8 size)
711{ 710{
712 int ret = size; 711 int ret = size;
713 712
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index d917afa30b27..739c948dc504 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -284,6 +284,8 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb
284 /* find nearest node with cpus and nearest memory */ 284 /* find nearest node with cpus and nearest memory */
285 for (router=NULL, j=0; j < op->ports; j++) { 285 for (router=NULL, j=0; j < op->ports; j++) {
286 dest = sn_hwperf_findobj_id(objbuf, nobj, ptdata[j].conn_id); 286 dest = sn_hwperf_findobj_id(objbuf, nobj, ptdata[j].conn_id);
287 if (dest && SN_HWPERF_IS_ROUTER(dest))
288 router = dest;
287 if (!dest || SN_HWPERF_FOREIGN(dest) || 289 if (!dest || SN_HWPERF_FOREIGN(dest) ||
288 !SN_HWPERF_IS_NODE(dest) || SN_HWPERF_IS_IONODE(dest)) { 290 !SN_HWPERF_IS_NODE(dest) || SN_HWPERF_IS_IONODE(dest)) {
289 continue; 291 continue;
@@ -299,8 +301,6 @@ static int sn_hwperf_get_nearest_node_objdata(struct sn_hwperf_object_info *objb
299 *near_mem_node = c; 301 *near_mem_node = c;
300 found_mem++; 302 found_mem++;
301 } 303 }
302 if (SN_HWPERF_IS_ROUTER(dest))
303 router = dest;
304 } 304 }
305 305
306 if (router && (!found_cpu || !found_mem)) { 306 if (router && (!found_cpu || !found_mem)) {
@@ -493,7 +493,7 @@ static int sn_topology_show(struct seq_file *s, void *d)
493 * numalink ports 493 * numalink ports
494 */ 494 */
495 sz = obj->ports * sizeof(struct sn_hwperf_port_info); 495 sz = obj->ports * sizeof(struct sn_hwperf_port_info);
496 if ((ptdata = vmalloc(sz)) == NULL) 496 if ((ptdata = kmalloc(sz, GFP_KERNEL)) == NULL)
497 return -ENOMEM; 497 return -ENOMEM;
498 e = ia64_sn_hwperf_op(sn_hwperf_master_nasid, 498 e = ia64_sn_hwperf_op(sn_hwperf_master_nasid,
499 SN_HWPERF_ENUM_PORTS, obj->id, sz, 499 SN_HWPERF_ENUM_PORTS, obj->id, sz,
@@ -541,7 +541,7 @@ static int sn_topology_show(struct seq_file *s, void *d)
541 (SN_HWPERF_IS_NL3ROUTER(obj) || 541 (SN_HWPERF_IS_NL3ROUTER(obj) ||
542 SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4"); 542 SN_HWPERF_IS_NL3ROUTER(p)) ? "LLP3" : "LLP4");
543 } 543 }
544 vfree(ptdata); 544 kfree(ptdata);
545 } 545 }
546 546
547 return 0; 547 return 0;
diff --git a/arch/ia64/sn/kernel/xpc_partition.c b/arch/ia64/sn/kernel/xpc_partition.c
index 94211429fd0c..2a89cfce4954 100644
--- a/arch/ia64/sn/kernel/xpc_partition.c
+++ b/arch/ia64/sn/kernel/xpc_partition.c
@@ -136,9 +136,7 @@ xpc_get_rsvd_page_pa(int nasid)
136 } 136 }
137 137
138 if (L1_CACHE_ALIGN(len) > buf_len) { 138 if (L1_CACHE_ALIGN(len) > buf_len) {
139 if (buf_base != NULL) { 139 kfree(buf_base);
140 kfree(buf_base);
141 }
142 buf_len = L1_CACHE_ALIGN(len); 140 buf_len = L1_CACHE_ALIGN(len);
143 buf = (u64) xpc_kmalloc_cacheline_aligned(buf_len, 141 buf = (u64) xpc_kmalloc_cacheline_aligned(buf_len,
144 GFP_KERNEL, &buf_base); 142 GFP_KERNEL, &buf_base);
@@ -159,9 +157,7 @@ xpc_get_rsvd_page_pa(int nasid)
159 } 157 }
160 } 158 }
161 159
162 if (buf_base != NULL) { 160 kfree(buf_base);
163 kfree(buf_base);
164 }
165 161
166 if (status != SALRET_OK) { 162 if (status != SALRET_OK) {
167 rp_pa = 0; 163 rp_pa = 0;
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index fa073cc4b565..833295624e5d 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -682,9 +682,6 @@ tioce_reserve_m32(struct tioce_kernel *ce_kern, u64 base, u64 limit)
682 int ate_index, last_ate, ps; 682 int ate_index, last_ate, ps;
683 struct tioce *ce_mmr; 683 struct tioce *ce_mmr;
684 684
685 if (!TIOCE_M32_ADDR(base))
686 return;
687
688 ce_mmr = (struct tioce *)ce_kern->ce_common->ce_pcibus.bs_base; 685 ce_mmr = (struct tioce *)ce_kern->ce_common->ce_pcibus.bs_base;
689 ps = ce_kern->ce_ate3240_pagesize; 686 ps = ce_kern->ce_ate3240_pagesize;
690 ate_index = ATE_PAGE(base, ps); 687 ate_index = ATE_PAGE(base, ps);
@@ -693,6 +690,9 @@ tioce_reserve_m32(struct tioce_kernel *ce_kern, u64 base, u64 limit)
693 if (ate_index < 64) 690 if (ate_index < 64)
694 ate_index = 64; 691 ate_index = 64;
695 692
693 if (last_ate >= TIOCE_NUM_M3240_ATES)
694 last_ate = TIOCE_NUM_M3240_ATES - 1;
695
696 while (ate_index <= last_ate) { 696 while (ate_index <= last_ate) {
697 u64 ate; 697 u64 ate;
698 698