aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 12:23:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 12:23:17 -0400
commita87451052fb914744571fc3ab39fcbf4fa4ef944 (patch)
tree94d5d4edded03ffa4340d6486a9e9359abf1ef02
parent916bb6d76dfa49b540baa3f7262792d1de7f1c24 (diff)
parent797f6a684f28dbb00f9e9719315574e344fcbf53 (diff)
Merge tag 'please-pull-misc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux
Pull ia64 fixes from Tony Luck: "Bundle of miscellaneous ia64 fixes for 3.10 merge window." * tag 'please-pull-misc-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: Add size restriction to the kdump documentation Fix example error_injection_tool Fix build error for numa_clear_node() under IA64 Fix initialization of CMCI/CMCP interrupts Change "select DMAR" to "select INTEL_IOMMU" Wrong asm register contraints in the kvm implementation Wrong asm register contraints in the futex implementation Remove cast for kmalloc return value Fix kexec oops when iosapic was removed iosapic: fix a minor typo in comments Add WB/UC check for early_ioremap Fix broken fsys_getppid() tiocx: check retval from bus_register()
-rw-r--r--Documentation/ia64/err_inject.txt2
-rw-r--r--Documentation/kdump/kdump.txt1
-rw-r--r--arch/ia64/Kconfig2
-rw-r--r--arch/ia64/include/asm/futex.h5
-rw-r--r--arch/ia64/include/asm/mca.h1
-rw-r--r--arch/ia64/include/asm/numa.h5
-rw-r--r--arch/ia64/kernel/fsys.S49
-rw-r--r--arch/ia64/kernel/iosapic.c34
-rw-r--r--arch/ia64/kernel/irq.c8
-rw-r--r--arch/ia64/kernel/mca.c37
-rw-r--r--arch/ia64/kernel/mca_drv.c2
-rw-r--r--arch/ia64/kvm/vtlb.c2
-rw-r--r--arch/ia64/mm/ioremap.c14
-rw-r--r--arch/ia64/mm/numa.c5
-rw-r--r--arch/ia64/sn/kernel/tiocx.c5
15 files changed, 93 insertions, 79 deletions
diff --git a/Documentation/ia64/err_inject.txt b/Documentation/ia64/err_inject.txt
index 223e4f0582d0..9f651c181429 100644
--- a/Documentation/ia64/err_inject.txt
+++ b/Documentation/ia64/err_inject.txt
@@ -882,7 +882,7 @@ int err_inj()
882 cpu=parameters[i].cpu; 882 cpu=parameters[i].cpu;
883 k = cpu%64; 883 k = cpu%64;
884 j = cpu/64; 884 j = cpu/64;
885 mask[j]=1<<k; 885 mask[j] = 1UL << k;
886 886
887 if (sched_setaffinity(0, MASK_SIZE*8, mask)==-1) { 887 if (sched_setaffinity(0, MASK_SIZE*8, mask)==-1) {
888 perror("Error sched_setaffinity:"); 888 perror("Error sched_setaffinity:");
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index 13f1aa09b938..9c7fd988e299 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -297,6 +297,7 @@ Boot into System Kernel
297 On ia64, 256M@256M is a generous value that typically works. 297 On ia64, 256M@256M is a generous value that typically works.
298 The region may be automatically placed on ia64, see the 298 The region may be automatically placed on ia64, see the
299 dump-capture kernel config option notes above. 299 dump-capture kernel config option notes above.
300 If use sparse memory, the size should be rounded to GRANULE boundaries.
300 301
301 On s390x, typically use "crashkernel=xxM". The value of xx is dependent 302 On s390x, typically use "crashkernel=xxM". The value of xx is dependent
302 on the memory consumption of the kdump system. In general this is not 303 on the memory consumption of the kdump system. In general this is not
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 9a02f71c6b1f..e7e55a00f94f 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -187,7 +187,7 @@ config IA64_DIG
187 187
188config IA64_DIG_VTD 188config IA64_DIG_VTD
189 bool "DIG+Intel+IOMMU" 189 bool "DIG+Intel+IOMMU"
190 select DMAR 190 select INTEL_IOMMU
191 select PCI_MSI 191 select PCI_MSI
192 192
193config IA64_HP_ZX1 193config IA64_HP_ZX1
diff --git a/arch/ia64/include/asm/futex.h b/arch/ia64/include/asm/futex.h
index d2bf1fd5e44f..76acbcd5c060 100644
--- a/arch/ia64/include/asm/futex.h
+++ b/arch/ia64/include/asm/futex.h
@@ -106,16 +106,15 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
106 return -EFAULT; 106 return -EFAULT;
107 107
108 { 108 {
109 register unsigned long r8 __asm ("r8"); 109 register unsigned long r8 __asm ("r8") = 0;
110 unsigned long prev; 110 unsigned long prev;
111 __asm__ __volatile__( 111 __asm__ __volatile__(
112 " mf;; \n" 112 " mf;; \n"
113 " mov %0=r0 \n"
114 " mov ar.ccv=%4;; \n" 113 " mov ar.ccv=%4;; \n"
115 "[1:] cmpxchg4.acq %1=[%2],%3,ar.ccv \n" 114 "[1:] cmpxchg4.acq %1=[%2],%3,ar.ccv \n"
116 " .xdata4 \"__ex_table\", 1b-., 2f-. \n" 115 " .xdata4 \"__ex_table\", 1b-., 2f-. \n"
117 "[2:]" 116 "[2:]"
118 : "=r" (r8), "=r" (prev) 117 : "+r" (r8), "=&r" (prev)
119 : "r" (uaddr), "r" (newval), 118 : "r" (uaddr), "r" (newval),
120 "rO" ((long) (unsigned) oldval) 119 "rO" ((long) (unsigned) oldval)
121 : "memory"); 120 : "memory");
diff --git a/arch/ia64/include/asm/mca.h b/arch/ia64/include/asm/mca.h
index 43f96ab18fa0..8c7096168716 100644
--- a/arch/ia64/include/asm/mca.h
+++ b/arch/ia64/include/asm/mca.h
@@ -143,6 +143,7 @@ extern unsigned long __per_cpu_mca[NR_CPUS];
143extern int cpe_vector; 143extern int cpe_vector;
144extern int ia64_cpe_irq; 144extern int ia64_cpe_irq;
145extern void ia64_mca_init(void); 145extern void ia64_mca_init(void);
146extern void ia64_mca_irq_init(void);
146extern void ia64_mca_cpu_init(void *); 147extern void ia64_mca_cpu_init(void *);
147extern void ia64_os_mca_dispatch(void); 148extern void ia64_os_mca_dispatch(void);
148extern void ia64_os_mca_dispatch_end(void); 149extern void ia64_os_mca_dispatch_end(void);
diff --git a/arch/ia64/include/asm/numa.h b/arch/ia64/include/asm/numa.h
index 2e27ef175652..2db0a6c6daa5 100644
--- a/arch/ia64/include/asm/numa.h
+++ b/arch/ia64/include/asm/numa.h
@@ -67,14 +67,13 @@ extern int paddr_to_nid(unsigned long paddr);
67 67
68extern void map_cpu_to_node(int cpu, int nid); 68extern void map_cpu_to_node(int cpu, int nid);
69extern void unmap_cpu_from_node(int cpu, int nid); 69extern void unmap_cpu_from_node(int cpu, int nid);
70 70extern void numa_clear_node(int cpu);
71 71
72#else /* !CONFIG_NUMA */ 72#else /* !CONFIG_NUMA */
73#define map_cpu_to_node(cpu, nid) do{}while(0) 73#define map_cpu_to_node(cpu, nid) do{}while(0)
74#define unmap_cpu_from_node(cpu, nid) do{}while(0) 74#define unmap_cpu_from_node(cpu, nid) do{}while(0)
75
76#define paddr_to_nid(addr) 0 75#define paddr_to_nid(addr) 0
77 76#define numa_clear_node(cpu) do { } while (0)
78#endif /* CONFIG_NUMA */ 77#endif /* CONFIG_NUMA */
79 78
80#endif /* _ASM_IA64_NUMA_H */ 79#endif /* _ASM_IA64_NUMA_H */
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S
index c4cd45d97749..abc6dee3799c 100644
--- a/arch/ia64/kernel/fsys.S
+++ b/arch/ia64/kernel/fsys.S
@@ -90,53 +90,6 @@ ENTRY(fsys_getpid)
90 FSYS_RETURN 90 FSYS_RETURN
91END(fsys_getpid) 91END(fsys_getpid)
92 92
93ENTRY(fsys_getppid)
94 .prologue
95 .altrp b6
96 .body
97 add r17=IA64_TASK_GROUP_LEADER_OFFSET,r16
98 ;;
99 ld8 r17=[r17] // r17 = current->group_leader
100 add r9=TI_FLAGS+IA64_TASK_SIZE,r16
101 ;;
102
103 ld4 r9=[r9]
104 add r17=IA64_TASK_REAL_PARENT_OFFSET,r17 // r17 = &current->group_leader->real_parent
105 ;;
106 and r9=TIF_ALLWORK_MASK,r9
107
1081: ld8 r18=[r17] // r18 = current->group_leader->real_parent
109 ;;
110 cmp.ne p8,p0=0,r9
111 add r8=IA64_TASK_TGID_OFFSET,r18 // r8 = &current->group_leader->real_parent->tgid
112 ;;
113
114 /*
115 * The .acq is needed to ensure that the read of tgid has returned its data before
116 * we re-check "real_parent".
117 */
118 ld4.acq r8=[r8] // r8 = current->group_leader->real_parent->tgid
119#ifdef CONFIG_SMP
120 /*
121 * Re-read current->group_leader->real_parent.
122 */
123 ld8 r19=[r17] // r19 = current->group_leader->real_parent
124(p8) br.spnt.many fsys_fallback_syscall
125 ;;
126 cmp.ne p6,p0=r18,r19 // did real_parent change?
127 mov r19=0 // i must not leak kernel bits...
128(p6) br.cond.spnt.few 1b // yes -> redo the read of tgid and the check
129 ;;
130 mov r17=0 // i must not leak kernel bits...
131 mov r18=0 // i must not leak kernel bits...
132#else
133 mov r17=0 // i must not leak kernel bits...
134 mov r18=0 // i must not leak kernel bits...
135 mov r19=0 // i must not leak kernel bits...
136#endif
137 FSYS_RETURN
138END(fsys_getppid)
139
140ENTRY(fsys_set_tid_address) 93ENTRY(fsys_set_tid_address)
141 .prologue 94 .prologue
142 .altrp b6 95 .altrp b6
@@ -614,7 +567,7 @@ paravirt_fsyscall_table:
614 data8 0 // chown 567 data8 0 // chown
615 data8 0 // lseek // 1040 568 data8 0 // lseek // 1040
616 data8 fsys_getpid // getpid 569 data8 fsys_getpid // getpid
617 data8 fsys_getppid // getppid 570 data8 0 // getppid
618 data8 0 // mount 571 data8 0 // mount
619 data8 0 // umount 572 data8 0 // umount
620 data8 0 // setuid // 1045 573 data8 0 // setuid // 1045
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index ee33c3aaa2fc..19f107be734e 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -76,7 +76,7 @@
76 * PCI pin -> global system interrupt (GSI) -> IA-64 vector <-> IRQ 76 * PCI pin -> global system interrupt (GSI) -> IA-64 vector <-> IRQ
77 * 77 *
78 * Note: The term "IRQ" is loosely used everywhere in Linux kernel to 78 * Note: The term "IRQ" is loosely used everywhere in Linux kernel to
79 * describeinterrupts. Now we use "IRQ" only for Linux IRQ's. ISA IRQ 79 * describe interrupts. Now we use "IRQ" only for Linux IRQ's. ISA IRQ
80 * (isa_irq) is the only exception in this source code. 80 * (isa_irq) is the only exception in this source code.
81 */ 81 */
82 82
@@ -1010,6 +1010,26 @@ iosapic_check_gsi_range (unsigned int gsi_base, unsigned int ver)
1010 return 0; 1010 return 0;
1011} 1011}
1012 1012
1013static int
1014iosapic_delete_rte(unsigned int irq, unsigned int gsi)
1015{
1016 struct iosapic_rte_info *rte, *temp;
1017
1018 list_for_each_entry_safe(rte, temp, &iosapic_intr_info[irq].rtes,
1019 rte_list) {
1020 if (rte->iosapic->gsi_base + rte->rte_index == gsi) {
1021 if (rte->refcnt)
1022 return -EBUSY;
1023
1024 list_del(&rte->rte_list);
1025 kfree(rte);
1026 return 0;
1027 }
1028 }
1029
1030 return -EINVAL;
1031}
1032
1013int iosapic_init(unsigned long phys_addr, unsigned int gsi_base) 1033int iosapic_init(unsigned long phys_addr, unsigned int gsi_base)
1014{ 1034{
1015 int num_rte, err, index; 1035 int num_rte, err, index;
@@ -1069,7 +1089,7 @@ int iosapic_init(unsigned long phys_addr, unsigned int gsi_base)
1069 1089
1070int iosapic_remove(unsigned int gsi_base) 1090int iosapic_remove(unsigned int gsi_base)
1071{ 1091{
1072 int index, err = 0; 1092 int i, irq, index, err = 0;
1073 unsigned long flags; 1093 unsigned long flags;
1074 1094
1075 spin_lock_irqsave(&iosapic_lock, flags); 1095 spin_lock_irqsave(&iosapic_lock, flags);
@@ -1087,6 +1107,16 @@ int iosapic_remove(unsigned int gsi_base)
1087 goto out; 1107 goto out;
1088 } 1108 }
1089 1109
1110 for (i = gsi_base; i < gsi_base + iosapic_lists[index].num_rte; i++) {
1111 irq = __gsi_to_irq(i);
1112 if (irq < 0)
1113 continue;
1114
1115 err = iosapic_delete_rte(irq, i);
1116 if (err)
1117 goto out;
1118 }
1119
1090 iounmap(iosapic_lists[index].addr); 1120 iounmap(iosapic_lists[index].addr);
1091 iosapic_free(index); 1121 iosapic_free(index);
1092 out: 1122 out:
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index ad69606613eb..f2c418281130 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -23,6 +23,8 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/kernel_stat.h> 24#include <linux/kernel_stat.h>
25 25
26#include <asm/mca.h>
27
26/* 28/*
27 * 'what should we do if we get a hw irq event on an illegal vector'. 29 * 'what should we do if we get a hw irq event on an illegal vector'.
28 * each architecture has to answer this themselves. 30 * each architecture has to answer this themselves.
@@ -83,6 +85,12 @@ bool is_affinity_mask_valid(const struct cpumask *cpumask)
83 85
84#endif /* CONFIG_SMP */ 86#endif /* CONFIG_SMP */
85 87
88int __init arch_early_irq_init(void)
89{
90 ia64_mca_irq_init();
91 return 0;
92}
93
86#ifdef CONFIG_HOTPLUG_CPU 94#ifdef CONFIG_HOTPLUG_CPU
87unsigned int vectors_in_migration[NR_IRQS]; 95unsigned int vectors_in_migration[NR_IRQS];
88 96
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 65bf9cd39044..d7396dbb07bb 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -2074,22 +2074,16 @@ ia64_mca_init(void)
2074 printk(KERN_INFO "MCA related initialization done\n"); 2074 printk(KERN_INFO "MCA related initialization done\n");
2075} 2075}
2076 2076
2077
2077/* 2078/*
2078 * ia64_mca_late_init 2079 * These pieces cannot be done in ia64_mca_init() because it is called before
2079 * 2080 * early_irq_init() which would wipe out our percpu irq registrations. But we
2080 * Opportunity to setup things that require initialization later 2081 * cannot leave them until ia64_mca_late_init() because by then all the other
2081 * than ia64_mca_init. Setup a timer to poll for CPEs if the 2082 * processors have been brought online and have set their own CMC vectors to
2082 * platform doesn't support an interrupt driven mechanism. 2083 * point at a non-existant action. Called from arch_early_irq_init().
2083 *
2084 * Inputs : None
2085 * Outputs : Status
2086 */ 2084 */
2087static int __init 2085void __init ia64_mca_irq_init(void)
2088ia64_mca_late_init(void)
2089{ 2086{
2090 if (!mca_init)
2091 return 0;
2092
2093 /* 2087 /*
2094 * Configure the CMCI/P vector and handler. Interrupts for CMC are 2088 * Configure the CMCI/P vector and handler. Interrupts for CMC are
2095 * per-processor, so AP CMC interrupts are setup in smp_callin() (smpboot.c). 2089 * per-processor, so AP CMC interrupts are setup in smp_callin() (smpboot.c).
@@ -2108,6 +2102,23 @@ ia64_mca_late_init(void)
2108 /* Setup the CPEI/P handler */ 2102 /* Setup the CPEI/P handler */
2109 register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction); 2103 register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction);
2110#endif 2104#endif
2105}
2106
2107/*
2108 * ia64_mca_late_init
2109 *
2110 * Opportunity to setup things that require initialization later
2111 * than ia64_mca_init. Setup a timer to poll for CPEs if the
2112 * platform doesn't support an interrupt driven mechanism.
2113 *
2114 * Inputs : None
2115 * Outputs : Status
2116 */
2117static int __init
2118ia64_mca_late_init(void)
2119{
2120 if (!mca_init)
2121 return 0;
2111 2122
2112 register_hotcpu_notifier(&mca_cpu_notifier); 2123 register_hotcpu_notifier(&mca_cpu_notifier);
2113 2124
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c
index 9392e021c93b..94f8bf777afa 100644
--- a/arch/ia64/kernel/mca_drv.c
+++ b/arch/ia64/kernel/mca_drv.c
@@ -349,7 +349,7 @@ init_record_index_pools(void)
349 349
350 /* - 3 - */ 350 /* - 3 - */
351 slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1; 351 slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1;
352 slidx_pool.buffer = (slidx_list_t *) 352 slidx_pool.buffer =
353 kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL); 353 kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL);
354 354
355 return slidx_pool.buffer ? 0 : -ENOMEM; 355 return slidx_pool.buffer ? 0 : -ENOMEM;
diff --git a/arch/ia64/kvm/vtlb.c b/arch/ia64/kvm/vtlb.c
index 4332f7ee5203..a7869f8f49a6 100644
--- a/arch/ia64/kvm/vtlb.c
+++ b/arch/ia64/kvm/vtlb.c
@@ -256,7 +256,7 @@ u64 guest_vhpt_lookup(u64 iha, u64 *pte)
256 "srlz.d;;" 256 "srlz.d;;"
257 "ssm psr.i;;" 257 "ssm psr.i;;"
258 "srlz.d;;" 258 "srlz.d;;"
259 : "=r"(ret) : "r"(iha), "r"(pte):"memory"); 259 : "=&r"(ret) : "r"(iha), "r"(pte) : "memory");
260 260
261 return ret; 261 return ret;
262} 262}
diff --git a/arch/ia64/mm/ioremap.c b/arch/ia64/mm/ioremap.c
index 3dccdd8eb275..43964cde6214 100644
--- a/arch/ia64/mm/ioremap.c
+++ b/arch/ia64/mm/ioremap.c
@@ -16,7 +16,7 @@
16#include <asm/meminit.h> 16#include <asm/meminit.h>
17 17
18static inline void __iomem * 18static inline void __iomem *
19__ioremap (unsigned long phys_addr) 19__ioremap_uc(unsigned long phys_addr)
20{ 20{
21 return (void __iomem *) (__IA64_UNCACHED_OFFSET | phys_addr); 21 return (void __iomem *) (__IA64_UNCACHED_OFFSET | phys_addr);
22} 22}
@@ -24,7 +24,11 @@ __ioremap (unsigned long phys_addr)
24void __iomem * 24void __iomem *
25early_ioremap (unsigned long phys_addr, unsigned long size) 25early_ioremap (unsigned long phys_addr, unsigned long size)
26{ 26{
27 return __ioremap(phys_addr); 27 u64 attr;
28 attr = kern_mem_attribute(phys_addr, size);
29 if (attr & EFI_MEMORY_WB)
30 return (void __iomem *) phys_to_virt(phys_addr);
31 return __ioremap_uc(phys_addr);
28} 32}
29 33
30void __iomem * 34void __iomem *
@@ -47,7 +51,7 @@ ioremap (unsigned long phys_addr, unsigned long size)
47 if (attr & EFI_MEMORY_WB) 51 if (attr & EFI_MEMORY_WB)
48 return (void __iomem *) phys_to_virt(phys_addr); 52 return (void __iomem *) phys_to_virt(phys_addr);
49 else if (attr & EFI_MEMORY_UC) 53 else if (attr & EFI_MEMORY_UC)
50 return __ioremap(phys_addr); 54 return __ioremap_uc(phys_addr);
51 55
52 /* 56 /*
53 * Some chipsets don't support UC access to memory. If 57 * Some chipsets don't support UC access to memory. If
@@ -93,7 +97,7 @@ ioremap (unsigned long phys_addr, unsigned long size)
93 return (void __iomem *) (offset + (char __iomem *)addr); 97 return (void __iomem *) (offset + (char __iomem *)addr);
94 } 98 }
95 99
96 return __ioremap(phys_addr); 100 return __ioremap_uc(phys_addr);
97} 101}
98EXPORT_SYMBOL(ioremap); 102EXPORT_SYMBOL(ioremap);
99 103
@@ -103,7 +107,7 @@ ioremap_nocache (unsigned long phys_addr, unsigned long size)
103 if (kern_mem_attribute(phys_addr, size) & EFI_MEMORY_WB) 107 if (kern_mem_attribute(phys_addr, size) & EFI_MEMORY_WB)
104 return NULL; 108 return NULL;
105 109
106 return __ioremap(phys_addr); 110 return __ioremap_uc(phys_addr);
107} 111}
108EXPORT_SYMBOL(ioremap_nocache); 112EXPORT_SYMBOL(ioremap_nocache);
109 113
diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
index 3efea7d0a351..def782e31aac 100644
--- a/arch/ia64/mm/numa.c
+++ b/arch/ia64/mm/numa.c
@@ -73,6 +73,11 @@ int __meminit __early_pfn_to_nid(unsigned long pfn)
73 return -1; 73 return -1;
74} 74}
75 75
76void __cpuinit numa_clear_node(int cpu)
77{
78 unmap_cpu_from_node(cpu, NUMA_NO_NODE);
79}
80
76#ifdef CONFIG_MEMORY_HOTPLUG 81#ifdef CONFIG_MEMORY_HOTPLUG
77/* 82/*
78 * SRAT information is stored in node_memblk[], then we can use SRAT 83 * SRAT information is stored in node_memblk[], then we can use SRAT
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index 14c1711238c0..e35f6485c1fd 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -490,11 +490,14 @@ static int __init tiocx_init(void)
490{ 490{
491 cnodeid_t cnodeid; 491 cnodeid_t cnodeid;
492 int found_tiocx_device = 0; 492 int found_tiocx_device = 0;
493 int err;
493 494
494 if (!ia64_platform_is("sn2")) 495 if (!ia64_platform_is("sn2"))
495 return 0; 496 return 0;
496 497
497 bus_register(&tiocx_bus_type); 498 err = bus_register(&tiocx_bus_type);
499 if (err)
500 return err;
498 501
499 for (cnodeid = 0; cnodeid < num_cnodes; cnodeid++) { 502 for (cnodeid = 0; cnodeid < num_cnodes; cnodeid++) {
500 nasid_t nasid; 503 nasid_t nasid;