aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/Kconfig12
-rw-r--r--arch/ia64/configs/bigsur_defconfig2
-rw-r--r--arch/ia64/configs/gensparse_defconfig2
-rw-r--r--arch/ia64/configs/sim_defconfig2
-rw-r--r--arch/ia64/configs/sn2_defconfig2
-rw-r--r--arch/ia64/configs/tiger_defconfig2
-rw-r--r--arch/ia64/configs/zx1_defconfig2
-rw-r--r--arch/ia64/defconfig3
-rw-r--r--arch/ia64/hp/sim/boot/boot_head.S1
-rw-r--r--arch/ia64/hp/sim/hpsim_console.c16
-rw-r--r--arch/ia64/hp/sim/hpsim_setup.c9
-rw-r--r--arch/ia64/hp/sim/simeth.c15
-rw-r--r--arch/ia64/hp/sim/simscsi.c3
-rw-r--r--arch/ia64/ia32/audit.c2
-rw-r--r--arch/ia64/kernel/cpufreq/acpi-cpufreq.c8
-rw-r--r--arch/ia64/kernel/irq.c5
-rw-r--r--arch/ia64/kernel/irq_ia64.c28
-rw-r--r--arch/ia64/kernel/mca.c34
-rw-r--r--arch/ia64/kernel/process.c10
-rw-r--r--arch/ia64/kernel/ptrace.c11
-rw-r--r--arch/ia64/kernel/setup.c8
-rw-r--r--arch/ia64/kernel/smpboot.c6
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S12
-rw-r--r--arch/ia64/mm/contig.c3
-rw-r--r--arch/ia64/mm/discontig.c3
-rw-r--r--arch/ia64/mm/fault.c14
-rw-r--r--arch/ia64/mm/hugetlbpage.c6
-rw-r--r--arch/ia64/sn/kernel/huberror.c14
-rw-r--r--arch/ia64/sn/kernel/irq.c27
-rw-r--r--arch/ia64/sn/kernel/sn2/sn2_smp.c26
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c3
-rw-r--r--arch/ia64/sn/kernel/tiocx.c3
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c1
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c2
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c1
35 files changed, 204 insertions, 94 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 21aa4fc5f8ef..8c39913d1729 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -327,17 +327,7 @@ config FORCE_CPEI_RETARGET
327 This option it useful to enable this feature on older BIOS's as well. 327 This option it useful to enable this feature on older BIOS's as well.
328 You can also enable this by using boot command line option force_cpei=1. 328 You can also enable this by using boot command line option force_cpei=1.
329 329
330config PREEMPT 330source "kernel/Kconfig.preempt"
331 bool "Preemptible Kernel"
332 help
333 This option reduces the latency of the kernel when reacting to
334 real-time or interactive events by allowing a low priority process to
335 be preempted even if it is in kernel mode executing a system call.
336 This allows applications to run more reliably even when the system is
337 under load.
338
339 Say Y here if you are building a kernel for a desktop, embedded
340 or real-time system. Say N if you are unsure.
341 331
342source "mm/Kconfig" 332source "mm/Kconfig"
343 333
diff --git a/arch/ia64/configs/bigsur_defconfig b/arch/ia64/configs/bigsur_defconfig
index 9eb48c0927b0..6dd8655664f3 100644
--- a/arch/ia64/configs/bigsur_defconfig
+++ b/arch/ia64/configs/bigsur_defconfig
@@ -42,7 +42,7 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0 42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0 43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0 44CONFIG_CC_ALIGN_JUMPS=0
45CONFIG_SLAB=y 45CONFIG_SLUB=y
46# CONFIG_TINY_SHMEM is not set 46# CONFIG_TINY_SHMEM is not set
47CONFIG_BASE_SMALL=0 47CONFIG_BASE_SMALL=0
48# CONFIG_SLOB is not set 48# CONFIG_SLOB is not set
diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig
index 3a9ed951db08..e86fbd39c795 100644
--- a/arch/ia64/configs/gensparse_defconfig
+++ b/arch/ia64/configs/gensparse_defconfig
@@ -43,7 +43,7 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0 43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0 44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0 45CONFIG_CC_ALIGN_JUMPS=0
46CONFIG_SLAB=y 46CONFIG_SLUB=y
47# CONFIG_TINY_SHMEM is not set 47# CONFIG_TINY_SHMEM is not set
48CONFIG_BASE_SMALL=0 48CONFIG_BASE_SMALL=0
49# CONFIG_SLOB is not set 49# CONFIG_SLOB is not set
diff --git a/arch/ia64/configs/sim_defconfig b/arch/ia64/configs/sim_defconfig
index c420d9f3df98..546a772f438e 100644
--- a/arch/ia64/configs/sim_defconfig
+++ b/arch/ia64/configs/sim_defconfig
@@ -43,7 +43,7 @@ CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0 43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0 44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0 45CONFIG_CC_ALIGN_JUMPS=0
46CONFIG_SLAB=y 46CONFIG_SLUB=y
47# CONFIG_TINY_SHMEM is not set 47# CONFIG_TINY_SHMEM is not set
48CONFIG_BASE_SMALL=0 48CONFIG_BASE_SMALL=0
49# CONFIG_SLOB is not set 49# CONFIG_SLOB is not set
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig
index 4c9ffc47bc7a..9aecfceeb38c 100644
--- a/arch/ia64/configs/sn2_defconfig
+++ b/arch/ia64/configs/sn2_defconfig
@@ -46,7 +46,7 @@ CONFIG_BASE_FULL=y
46CONFIG_FUTEX=y 46CONFIG_FUTEX=y
47CONFIG_EPOLL=y 47CONFIG_EPOLL=y
48CONFIG_SHMEM=y 48CONFIG_SHMEM=y
49CONFIG_SLAB=y 49CONFIG_SLUB=y
50CONFIG_VM_EVENT_COUNTERS=y 50CONFIG_VM_EVENT_COUNTERS=y
51CONFIG_RT_MUTEXES=y 51CONFIG_RT_MUTEXES=y
52# CONFIG_TINY_SHMEM is not set 52# CONFIG_TINY_SHMEM is not set
diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig
index 3dbb3987df27..797acf9066c1 100644
--- a/arch/ia64/configs/tiger_defconfig
+++ b/arch/ia64/configs/tiger_defconfig
@@ -53,7 +53,7 @@ CONFIG_TIMERFD=y
53CONFIG_EVENTFD=y 53CONFIG_EVENTFD=y
54CONFIG_SHMEM=y 54CONFIG_SHMEM=y
55CONFIG_VM_EVENT_COUNTERS=y 55CONFIG_VM_EVENT_COUNTERS=y
56CONFIG_SLAB=y 56CONFIG_SLUB=y
57# CONFIG_SLUB is not set 57# CONFIG_SLUB is not set
58# CONFIG_SLOB is not set 58# CONFIG_SLOB is not set
59CONFIG_RT_MUTEXES=y 59CONFIG_RT_MUTEXES=y
diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig
index 4a060fc39934..0a06b1333c95 100644
--- a/arch/ia64/configs/zx1_defconfig
+++ b/arch/ia64/configs/zx1_defconfig
@@ -48,7 +48,7 @@ CONFIG_BASE_FULL=y
48CONFIG_FUTEX=y 48CONFIG_FUTEX=y
49CONFIG_EPOLL=y 49CONFIG_EPOLL=y
50CONFIG_SHMEM=y 50CONFIG_SHMEM=y
51CONFIG_SLAB=y 51CONFIG_SLUB=y
52CONFIG_VM_EVENT_COUNTERS=y 52CONFIG_VM_EVENT_COUNTERS=y
53CONFIG_RT_MUTEXES=y 53CONFIG_RT_MUTEXES=y
54# CONFIG_TINY_SHMEM is not set 54# CONFIG_TINY_SHMEM is not set
diff --git a/arch/ia64/defconfig b/arch/ia64/defconfig
index 03172dc8c403..0210545e7f61 100644
--- a/arch/ia64/defconfig
+++ b/arch/ia64/defconfig
@@ -53,8 +53,7 @@ CONFIG_TIMERFD=y
53CONFIG_EVENTFD=y 53CONFIG_EVENTFD=y
54CONFIG_SHMEM=y 54CONFIG_SHMEM=y
55CONFIG_VM_EVENT_COUNTERS=y 55CONFIG_VM_EVENT_COUNTERS=y
56CONFIG_SLAB=y 56CONFIG_SLUB=y
57# CONFIG_SLUB is not set
58# CONFIG_SLOB is not set 57# CONFIG_SLOB is not set
59CONFIG_RT_MUTEXES=y 58CONFIG_RT_MUTEXES=y
60# CONFIG_TINY_SHMEM is not set 59# CONFIG_TINY_SHMEM is not set
diff --git a/arch/ia64/hp/sim/boot/boot_head.S b/arch/ia64/hp/sim/boot/boot_head.S
index a9bd71ac78e2..8808565491fb 100644
--- a/arch/ia64/hp/sim/boot/boot_head.S
+++ b/arch/ia64/hp/sim/boot/boot_head.S
@@ -26,6 +26,7 @@ GLOBAL_ENTRY(_start)
26 movl sp = stack_mem+16384-16 26 movl sp = stack_mem+16384-16
27 bsw.1 27 bsw.1
28 br.call.sptk.many rp=start_bootloader 28 br.call.sptk.many rp=start_bootloader
290: nop 0 /* dummy nop to make unwinding work */
29END(_start) 30END(_start)
30 31
31/* 32/*
diff --git a/arch/ia64/hp/sim/hpsim_console.c b/arch/ia64/hp/sim/hpsim_console.c
index 6e149c8ab835..01663bc42b1a 100644
--- a/arch/ia64/hp/sim/hpsim_console.c
+++ b/arch/ia64/hp/sim/hpsim_console.c
@@ -21,6 +21,7 @@
21#include <asm/machvec.h> 21#include <asm/machvec.h>
22#include <asm/pgtable.h> 22#include <asm/pgtable.h>
23#include <asm/sal.h> 23#include <asm/sal.h>
24#include <asm/hpsim.h>
24 25
25#include "hpsim_ssc.h" 26#include "hpsim_ssc.h"
26 27
@@ -28,7 +29,7 @@ static int simcons_init (struct console *, char *);
28static void simcons_write (struct console *, const char *, unsigned); 29static void simcons_write (struct console *, const char *, unsigned);
29static struct tty_driver *simcons_console_device (struct console *, int *); 30static struct tty_driver *simcons_console_device (struct console *, int *);
30 31
31struct console hpsim_cons = { 32static struct console hpsim_cons = {
32 .name = "simcons", 33 .name = "simcons",
33 .write = simcons_write, 34 .write = simcons_write,
34 .device = simcons_console_device, 35 .device = simcons_console_device,
@@ -58,7 +59,18 @@ simcons_write (struct console *cons, const char *buf, unsigned count)
58 59
59static struct tty_driver *simcons_console_device (struct console *c, int *index) 60static struct tty_driver *simcons_console_device (struct console *c, int *index)
60{ 61{
61 extern struct tty_driver *hp_simserial_driver;
62 *index = c->index; 62 *index = c->index;
63 return hp_simserial_driver; 63 return hp_simserial_driver;
64} 64}
65
66int simcons_register(void)
67{
68 if (!ia64_platform_is("hpsim"))
69 return 1;
70
71 if (hpsim_cons.flags & CON_ENABLED)
72 return 1;
73
74 register_console(&hpsim_cons);
75 return 0;
76}
diff --git a/arch/ia64/hp/sim/hpsim_setup.c b/arch/ia64/hp/sim/hpsim_setup.c
index f2297192a582..f629e903ebc7 100644
--- a/arch/ia64/hp/sim/hpsim_setup.c
+++ b/arch/ia64/hp/sim/hpsim_setup.c
@@ -21,6 +21,7 @@
21#include <asm/machvec.h> 21#include <asm/machvec.h>
22#include <asm/pgtable.h> 22#include <asm/pgtable.h>
23#include <asm/sal.h> 23#include <asm/sal.h>
24#include <asm/hpsim.h>
24 25
25#include "hpsim_ssc.h" 26#include "hpsim_ssc.h"
26 27
@@ -41,11 +42,5 @@ hpsim_setup (char **cmdline_p)
41{ 42{
42 ROOT_DEV = Root_SDA1; /* default to first SCSI drive */ 43 ROOT_DEV = Root_SDA1; /* default to first SCSI drive */
43 44
44#ifdef CONFIG_HP_SIMSERIAL_CONSOLE 45 simcons_register();
45 {
46 extern struct console hpsim_cons;
47 if (ia64_platform_is("hpsim"))
48 register_console(&hpsim_cons);
49 }
50#endif
51} 46}
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c
index f26077a773d5..08b117e2c54b 100644
--- a/arch/ia64/hp/sim/simeth.c
+++ b/arch/ia64/hp/sim/simeth.c
@@ -22,6 +22,9 @@
22#include <linux/bitops.h> 22#include <linux/bitops.h>
23#include <asm/system.h> 23#include <asm/system.h>
24#include <asm/irq.h> 24#include <asm/irq.h>
25#include <asm/hpsim.h>
26
27#include "hpsim_ssc.h"
25 28
26#define SIMETH_RECV_MAX 10 29#define SIMETH_RECV_MAX 10
27 30
@@ -35,12 +38,6 @@
35#define SIMETH_FRAME_SIZE ETH_FRAME_LEN 38#define SIMETH_FRAME_SIZE ETH_FRAME_LEN
36 39
37 40
38#define SSC_NETDEV_PROBE 100
39#define SSC_NETDEV_SEND 101
40#define SSC_NETDEV_RECV 102
41#define SSC_NETDEV_ATTACH 103
42#define SSC_NETDEV_DETACH 104
43
44#define NETWORK_INTR 8 41#define NETWORK_INTR 8
45 42
46struct simeth_local { 43struct simeth_local {
@@ -124,9 +121,6 @@ simeth_probe (void)
124 return r; 121 return r;
125} 122}
126 123
127extern long ia64_ssc (long, long, long, long, int);
128extern void ia64_ssc_connect_irq (long intr, long irq);
129
130static inline int 124static inline int
131netdev_probe(char *name, unsigned char *ether) 125netdev_probe(char *name, unsigned char *ether)
132{ 126{
@@ -300,6 +294,9 @@ simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
300 return NOTIFY_DONE; 294 return NOTIFY_DONE;
301 } 295 }
302 296
297 if (dev->nd_net != &init_net)
298 return NOTIFY_DONE;
299
303 if ( event != NETDEV_UP && event != NETDEV_DOWN ) return NOTIFY_DONE; 300 if ( event != NETDEV_UP && event != NETDEV_DOWN ) return NOTIFY_DONE;
304 301
305 /* 302 /*
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c
index a43e1e1822ad..d62fa76e5a7d 100644
--- a/arch/ia64/hp/sim/simscsi.c
+++ b/arch/ia64/hp/sim/simscsi.c
@@ -14,6 +14,7 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/timer.h> 15#include <linux/timer.h>
16#include <asm/irq.h> 16#include <asm/irq.h>
17#include "hpsim_ssc.h"
17 18
18#include <scsi/scsi.h> 19#include <scsi/scsi.h>
19#include <scsi/scsi_cmnd.h> 20#include <scsi/scsi_cmnd.h>
@@ -59,8 +60,6 @@ struct disk_stat {
59 unsigned count; 60 unsigned count;
60}; 61};
61 62
62extern long ia64_ssc (long arg0, long arg1, long arg2, long arg3, int nr);
63
64static int desc[16] = { 63static int desc[16] = {
65 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 64 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
66}; 65};
diff --git a/arch/ia64/ia32/audit.c b/arch/ia64/ia32/audit.c
index 8850fe40ea34..5e901c75df1b 100644
--- a/arch/ia64/ia32/audit.c
+++ b/arch/ia64/ia32/audit.c
@@ -1,4 +1,4 @@
1#include <asm-i386/unistd.h> 1#include <asm-x86/unistd_32.h>
2 2
3unsigned ia32_dir_class[] = { 3unsigned ia32_dir_class[] = {
4#include <asm-generic/audit_dir_write.h> 4#include <asm-generic/audit_dir_write.h>
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
index 15c08d52f09f..b8498ea62068 100644
--- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
+++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
@@ -113,10 +113,8 @@ processor_get_freq (
113 113
114 saved_mask = current->cpus_allowed; 114 saved_mask = current->cpus_allowed;
115 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 115 set_cpus_allowed(current, cpumask_of_cpu(cpu));
116 if (smp_processor_id() != cpu) { 116 if (smp_processor_id() != cpu)
117 ret = -EAGAIN;
118 goto migrate_end; 117 goto migrate_end;
119 }
120 118
121 /* processor_get_pstate gets the instantaneous frequency */ 119 /* processor_get_pstate gets the instantaneous frequency */
122 ret = processor_get_pstate(&value); 120 ret = processor_get_pstate(&value);
@@ -125,7 +123,7 @@ processor_get_freq (
125 set_cpus_allowed(current, saved_mask); 123 set_cpus_allowed(current, saved_mask);
126 printk(KERN_WARNING "get performance failed with error %d\n", 124 printk(KERN_WARNING "get performance failed with error %d\n",
127 ret); 125 ret);
128 ret = -EAGAIN; 126 ret = 0;
129 goto migrate_end; 127 goto migrate_end;
130 } 128 }
131 clock_freq = extract_clock(data, value, cpu); 129 clock_freq = extract_clock(data, value, cpu);
@@ -323,8 +321,6 @@ acpi_cpufreq_cpu_init (
323 data->acpi_data.states[i].transition_latency * 1000; 321 data->acpi_data.states[i].transition_latency * 1000;
324 } 322 }
325 } 323 }
326 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
327
328 policy->cur = processor_get_freq(data, policy->cpu); 324 policy->cur = processor_get_freq(data, policy->cpu);
329 325
330 /* table init */ 326 /* table init */
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index cc3ee4ef37af..44be1c952b7c 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -33,6 +33,11 @@ void ack_bad_irq(unsigned int irq)
33} 33}
34 34
35#ifdef CONFIG_IA64_GENERIC 35#ifdef CONFIG_IA64_GENERIC
36ia64_vector __ia64_irq_to_vector(int irq)
37{
38 return irq_cfg[irq].vector;
39}
40
36unsigned int __ia64_local_vector_to_irq (ia64_vector vec) 41unsigned int __ia64_local_vector_to_irq (ia64_vector vec)
37{ 42{
38 return __get_cpu_var(vector_irq)[vec]; 43 return __get_cpu_var(vector_irq)[vec];
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index c47c8acc96e3..00a4599e5f47 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -82,7 +82,7 @@ struct irq_cfg irq_cfg[NR_IRQS] __read_mostly = {
82}; 82};
83 83
84DEFINE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq) = { 84DEFINE_PER_CPU(int[IA64_NUM_VECTORS], vector_irq) = {
85 [0 ... IA64_NUM_VECTORS - 1] = IA64_SPURIOUS_INT_VECTOR 85 [0 ... IA64_NUM_VECTORS - 1] = -1
86}; 86};
87 87
88static cpumask_t vector_table[IA64_NUM_VECTORS] = { 88static cpumask_t vector_table[IA64_NUM_VECTORS] = {
@@ -179,7 +179,7 @@ static void __clear_irq_vector(int irq)
179 domain = cfg->domain; 179 domain = cfg->domain;
180 cpus_and(mask, cfg->domain, cpu_online_map); 180 cpus_and(mask, cfg->domain, cpu_online_map);
181 for_each_cpu_mask(cpu, mask) 181 for_each_cpu_mask(cpu, mask)
182 per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR; 182 per_cpu(vector_irq, cpu)[vector] = -1;
183 cfg->vector = IRQ_VECTOR_UNASSIGNED; 183 cfg->vector = IRQ_VECTOR_UNASSIGNED;
184 cfg->domain = CPU_MASK_NONE; 184 cfg->domain = CPU_MASK_NONE;
185 irq_status[irq] = IRQ_UNUSED; 185 irq_status[irq] = IRQ_UNUSED;
@@ -249,7 +249,7 @@ void __setup_vector_irq(int cpu)
249 249
250 /* Clear vector_irq */ 250 /* Clear vector_irq */
251 for (vector = 0; vector < IA64_NUM_VECTORS; ++vector) 251 for (vector = 0; vector < IA64_NUM_VECTORS; ++vector)
252 per_cpu(vector_irq, cpu)[vector] = IA64_SPURIOUS_INT_VECTOR; 252 per_cpu(vector_irq, cpu)[vector] = -1;
253 /* Mark the inuse vectors */ 253 /* Mark the inuse vectors */
254 for (irq = 0; irq < NR_IRQS; ++irq) { 254 for (irq = 0; irq < NR_IRQS; ++irq) {
255 if (!cpu_isset(cpu, irq_cfg[irq].domain)) 255 if (!cpu_isset(cpu, irq_cfg[irq].domain))
@@ -432,10 +432,18 @@ ia64_handle_irq (ia64_vector vector, struct pt_regs *regs)
432 } else if (unlikely(IS_RESCHEDULE(vector))) 432 } else if (unlikely(IS_RESCHEDULE(vector)))
433 kstat_this_cpu.irqs[vector]++; 433 kstat_this_cpu.irqs[vector]++;
434 else { 434 else {
435 int irq = local_vector_to_irq(vector);
436
435 ia64_setreg(_IA64_REG_CR_TPR, vector); 437 ia64_setreg(_IA64_REG_CR_TPR, vector);
436 ia64_srlz_d(); 438 ia64_srlz_d();
437 439
438 generic_handle_irq(local_vector_to_irq(vector)); 440 if (unlikely(irq < 0)) {
441 printk(KERN_ERR "%s: Unexpected interrupt "
442 "vector %d on CPU %d is not mapped "
443 "to any IRQ!\n", __FUNCTION__, vector,
444 smp_processor_id());
445 } else
446 generic_handle_irq(irq);
439 447
440 /* 448 /*
441 * Disable interrupts and send EOI: 449 * Disable interrupts and send EOI:
@@ -483,6 +491,7 @@ void ia64_process_pending_intr(void)
483 kstat_this_cpu.irqs[vector]++; 491 kstat_this_cpu.irqs[vector]++;
484 else { 492 else {
485 struct pt_regs *old_regs = set_irq_regs(NULL); 493 struct pt_regs *old_regs = set_irq_regs(NULL);
494 int irq = local_vector_to_irq(vector);
486 495
487 ia64_setreg(_IA64_REG_CR_TPR, vector); 496 ia64_setreg(_IA64_REG_CR_TPR, vector);
488 ia64_srlz_d(); 497 ia64_srlz_d();
@@ -493,8 +502,15 @@ void ia64_process_pending_intr(void)
493 * it will work. I hope it works!. 502 * it will work. I hope it works!.
494 * Probably could shared code. 503 * Probably could shared code.
495 */ 504 */
496 vectors_in_migration[local_vector_to_irq(vector)]=0; 505 if (unlikely(irq < 0)) {
497 generic_handle_irq(local_vector_to_irq(vector)); 506 printk(KERN_ERR "%s: Unexpected interrupt "
507 "vector %d on CPU %d not being mapped "
508 "to any IRQ!!\n", __FUNCTION__, vector,
509 smp_processor_id());
510 } else {
511 vectors_in_migration[irq]=0;
512 generic_handle_irq(irq);
513 }
498 set_irq_regs(old_regs); 514 set_irq_regs(old_regs);
499 515
500 /* 516 /*
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index ff28620cb992..63b73f3d4c9f 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -2018,22 +2018,26 @@ ia64_mca_late_init(void)
2018 2018
2019 if (cpe_vector >= 0) { 2019 if (cpe_vector >= 0) {
2020 /* If platform supports CPEI, enable the irq. */ 2020 /* If platform supports CPEI, enable the irq. */
2021 cpe_poll_enabled = 0; 2021 irq = local_vector_to_irq(cpe_vector);
2022 for (irq = 0; irq < NR_IRQS; ++irq) 2022 if (irq > 0) {
2023 if (irq_to_vector(irq) == cpe_vector) { 2023 cpe_poll_enabled = 0;
2024 desc = irq_desc + irq; 2024 desc = irq_desc + irq;
2025 desc->status |= IRQ_PER_CPU; 2025 desc->status |= IRQ_PER_CPU;
2026 setup_irq(irq, &mca_cpe_irqaction); 2026 setup_irq(irq, &mca_cpe_irqaction);
2027 ia64_cpe_irq = irq; 2027 ia64_cpe_irq = irq;
2028 } 2028 ia64_mca_register_cpev(cpe_vector);
2029 ia64_mca_register_cpev(cpe_vector); 2029 IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n",
2030 IA64_MCA_DEBUG("%s: CPEI/P setup and enabled.\n", __FUNCTION__); 2030 __FUNCTION__);
2031 } else { 2031 return 0;
2032 /* If platform doesn't support CPEI, get the timer going. */
2033 if (cpe_poll_enabled) {
2034 ia64_mca_cpe_poll(0UL);
2035 IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __FUNCTION__);
2036 } 2032 }
2033 printk(KERN_ERR "%s: Failed to find irq for CPE "
2034 "interrupt handler, vector %d\n",
2035 __FUNCTION__, cpe_vector);
2036 }
2037 /* If platform doesn't support CPEI, get the timer going. */
2038 if (cpe_poll_enabled) {
2039 ia64_mca_cpe_poll(0UL);
2040 IA64_MCA_DEBUG("%s: CPEP setup and enabled.\n", __FUNCTION__);
2037 } 2041 }
2038 } 2042 }
2039#endif 2043#endif
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 4158906c45aa..c613fc0e91cc 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -198,9 +198,13 @@ default_idle (void)
198{ 198{
199 local_irq_enable(); 199 local_irq_enable();
200 while (!need_resched()) { 200 while (!need_resched()) {
201 if (can_do_pal_halt) 201 if (can_do_pal_halt) {
202 safe_halt(); 202 local_irq_disable();
203 else 203 if (!need_resched()) {
204 safe_halt();
205 }
206 local_irq_enable();
207 } else
204 cpu_relax(); 208 cpu_relax();
205 } 209 }
206} 210}
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index 00f803246948..2e96f17b2f3b 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -951,10 +951,14 @@ access_uarea (struct task_struct *child, unsigned long addr,
951 return 0; 951 return 0;
952 952
953 case PT_CR_IPSR: 953 case PT_CR_IPSR:
954 if (write_access) 954 if (write_access) {
955 pt->cr_ipsr = ((*data & IPSR_MASK) 955 unsigned long tmp = *data;
956 /* psr.ri==3 is a reserved value: SDM 2:25 */
957 if ((tmp & IA64_PSR_RI) == IA64_PSR_RI)
958 tmp &= ~IA64_PSR_RI;
959 pt->cr_ipsr = ((tmp & IPSR_MASK)
956 | (pt->cr_ipsr & ~IPSR_MASK)); 960 | (pt->cr_ipsr & ~IPSR_MASK));
957 else 961 } else
958 *data = (pt->cr_ipsr & IPSR_MASK); 962 *data = (pt->cr_ipsr & IPSR_MASK);
959 return 0; 963 return 0;
960 964
@@ -1573,7 +1577,6 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
1573 1577
1574 case PTRACE_DETACH: 1578 case PTRACE_DETACH:
1575 /* detach a process that was attached. */ 1579 /* detach a process that was attached. */
1576 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
1577 ret = ptrace_detach(child, data); 1580 ret = ptrace_detach(child, data);
1578 goto out_tsk; 1581 goto out_tsk;
1579 1582
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index cd9a37a552c3..9e392a30d197 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -60,6 +60,7 @@
60#include <asm/smp.h> 60#include <asm/smp.h>
61#include <asm/system.h> 61#include <asm/system.h>
62#include <asm/unistd.h> 62#include <asm/unistd.h>
63#include <asm/hpsim.h>
63 64
64#if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE) 65#if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
65# error "struct cpuinfo_ia64 too big!" 66# error "struct cpuinfo_ia64 too big!"
@@ -389,6 +390,8 @@ early_console_setup (char *cmdline)
389 if (!efi_setup_pcdp_console(cmdline)) 390 if (!efi_setup_pcdp_console(cmdline))
390 earlycons++; 391 earlycons++;
391#endif 392#endif
393 if (!simcons_register())
394 earlycons++;
392 395
393 return (earlycons) ? 0 : -1; 396 return (earlycons) ? 0 : -1;
394} 397}
@@ -953,6 +956,11 @@ cpu_init (void)
953 956
954 /* clear TPR & XTP to enable all interrupt classes: */ 957 /* clear TPR & XTP to enable all interrupt classes: */
955 ia64_setreg(_IA64_REG_CR_TPR, 0); 958 ia64_setreg(_IA64_REG_CR_TPR, 0);
959
960 /* Clear any pending interrupts left by SAL/EFI */
961 while (ia64_get_ivr() != IA64_SPURIOUS_INT_VECTOR)
962 ia64_eoi();
963
956#ifdef CONFIG_SMP 964#ifdef CONFIG_SMP
957 normal_xtp(); 965 normal_xtp();
958#endif 966#endif
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 62209dcf06d3..308772f7cddc 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -58,6 +58,7 @@
58#include <asm/system.h> 58#include <asm/system.h>
59#include <asm/tlbflush.h> 59#include <asm/tlbflush.h>
60#include <asm/unistd.h> 60#include <asm/unistd.h>
61#include <asm/sn/arch.h>
61 62
62#define SMP_DEBUG 0 63#define SMP_DEBUG 0
63 64
@@ -730,6 +731,11 @@ int __cpu_disable(void)
730 return (-EBUSY); 731 return (-EBUSY);
731 } 732 }
732 733
734 if (ia64_platform_is("sn2")) {
735 if (!sn_cpu_disable_allowed(cpu))
736 return -EBUSY;
737 }
738
733 cpu_clear(cpu, cpu_online_map); 739 cpu_clear(cpu, cpu_online_map);
734 740
735 if (migrate_platform_irqs(cpu)) { 741 if (migrate_platform_irqs(cpu)) {
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 83e80677de70..00232b4357ba 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -20,6 +20,8 @@ PHDRS {
20 code PT_LOAD; 20 code PT_LOAD;
21 percpu PT_LOAD; 21 percpu PT_LOAD;
22 data PT_LOAD; 22 data PT_LOAD;
23 note PT_NOTE;
24 unwind 0x70000001; /* PT_IA_64_UNWIND, but ld doesn't match the name */
23} 25}
24SECTIONS 26SECTIONS
25{ 27{
@@ -62,6 +64,9 @@ SECTIONS
62 64
63 /* Read-only data */ 65 /* Read-only data */
64 66
67 NOTES :code :note /* put .notes in text and mark in PT_NOTE */
68 code_continues : {} :code /* switch back to regular program... */
69
65 /* Exception table */ 70 /* Exception table */
66 . = ALIGN(16); 71 . = ALIGN(16);
67 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) 72 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET)
@@ -99,7 +104,8 @@ SECTIONS
99 __start_unwind = .; 104 __start_unwind = .;
100 *(.IA_64.unwind*) 105 *(.IA_64.unwind*)
101 __end_unwind = .; 106 __end_unwind = .;
102 } 107 } :code :unwind
108 code_continues2 : {} : code
103 109
104 RODATA 110 RODATA
105 111
@@ -276,10 +282,6 @@ SECTIONS
276 .debug_typenames 0 : { *(.debug_typenames) } 282 .debug_typenames 0 : { *(.debug_typenames) }
277 .debug_varnames 0 : { *(.debug_varnames) } 283 .debug_varnames 0 : { *(.debug_varnames) }
278 /* These must appear regardless of . */ 284 /* These must appear regardless of . */
279 /* Discard them for now since Intel SoftSDV cannot handle them.
280 .comment 0 : { *(.comment) }
281 .note 0 : { *(.note) }
282 */
283 /DISCARD/ : { *(.comment) } 285 /DISCARD/ : { *(.comment) }
284 /DISCARD/ : { *(.note) } 286 /DISCARD/ : { *(.note) }
285} 287}
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index 7ac8592a35b6..d3c538be466c 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -17,6 +17,7 @@
17#include <linux/bootmem.h> 17#include <linux/bootmem.h>
18#include <linux/efi.h> 18#include <linux/efi.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/nmi.h>
20#include <linux/swap.h> 21#include <linux/swap.h>
21 22
22#include <asm/meminit.h> 23#include <asm/meminit.h>
@@ -56,6 +57,8 @@ void show_mem(void)
56 present = pgdat->node_present_pages; 57 present = pgdat->node_present_pages;
57 for(i = 0; i < pgdat->node_spanned_pages; i++) { 58 for(i = 0; i < pgdat->node_spanned_pages; i++) {
58 struct page *page; 59 struct page *page;
60 if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
61 touch_nmi_watchdog();
59 if (pfn_valid(pgdat->node_start_pfn + i)) 62 if (pfn_valid(pgdat->node_start_pfn + i))
60 page = pfn_to_page(pgdat->node_start_pfn + i); 63 page = pfn_to_page(pgdat->node_start_pfn + i);
61 else { 64 else {
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 0dbf0e81f8c0..0d34585058c8 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/nmi.h>
19#include <linux/swap.h> 20#include <linux/swap.h>
20#include <linux/bootmem.h> 21#include <linux/bootmem.h>
21#include <linux/acpi.h> 22#include <linux/acpi.h>
@@ -533,6 +534,8 @@ void show_mem(void)
533 present = pgdat->node_present_pages; 534 present = pgdat->node_present_pages;
534 for(i = 0; i < pgdat->node_spanned_pages; i++) { 535 for(i = 0; i < pgdat->node_spanned_pages; i++) {
535 struct page *page; 536 struct page *page;
537 if (unlikely(i % MAX_ORDER_NR_PAGES == 0))
538 touch_nmi_watchdog();
536 if (pfn_valid(pgdat->node_start_pfn + i)) 539 if (pfn_valid(pgdat->node_start_pfn + i))
537 page = pfn_to_page(pgdat->node_start_pfn + i); 540 page = pfn_to_page(pgdat->node_start_pfn + i);
538 else { 541 else {
diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c
index 73ccb6010c05..9150ffaff9e8 100644
--- a/arch/ia64/mm/fault.c
+++ b/arch/ia64/mm/fault.c
@@ -112,11 +112,17 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
112 down_read(&mm->mmap_sem); 112 down_read(&mm->mmap_sem);
113 113
114 vma = find_vma_prev(mm, address, &prev_vma); 114 vma = find_vma_prev(mm, address, &prev_vma);
115 if (!vma) 115 if (!vma && !prev_vma )
116 goto bad_area; 116 goto bad_area;
117 117
118 /* find_vma_prev() returns vma such that address < vma->vm_end or NULL */ 118 /*
119 if (address < vma->vm_start) 119 * find_vma_prev() returns vma such that address < vma->vm_end or NULL
120 *
121 * May find no vma, but could be that the last vm area is the
122 * register backing store that needs to expand upwards, in
123 * this case vma will be null, but prev_vma will ne non-null
124 */
125 if (( !vma && prev_vma ) || (address < vma->vm_start) )
120 goto check_expansion; 126 goto check_expansion;
121 127
122 good_area: 128 good_area:
@@ -172,6 +178,8 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
172 178
173 check_expansion: 179 check_expansion:
174 if (!(prev_vma && (prev_vma->vm_flags & VM_GROWSUP) && (address == prev_vma->vm_end))) { 180 if (!(prev_vma && (prev_vma->vm_flags & VM_GROWSUP) && (address == prev_vma->vm_end))) {
181 if (!vma)
182 goto bad_area;
175 if (!(vma->vm_flags & VM_GROWSDOWN)) 183 if (!(vma->vm_flags & VM_GROWSDOWN))
176 goto bad_area; 184 goto bad_area;
177 if (REGION_NUMBER(address) != REGION_NUMBER(vma->vm_start) 185 if (REGION_NUMBER(address) != REGION_NUMBER(vma->vm_start)
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index d22861c5b04c..a9ff685aea25 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -75,10 +75,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
75 * Don't actually need to do any preparation, but need to make sure 75 * Don't actually need to do any preparation, but need to make sure
76 * the address is in the right region. 76 * the address is in the right region.
77 */ 77 */
78int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff) 78int prepare_hugepage_range(unsigned long addr, unsigned long len)
79{ 79{
80 if (pgoff & (~HPAGE_MASK >> PAGE_SHIFT))
81 return -EINVAL;
82 if (len & ~HPAGE_MASK) 80 if (len & ~HPAGE_MASK)
83 return -EINVAL; 81 return -EINVAL;
84 if (addr & ~HPAGE_MASK) 82 if (addr & ~HPAGE_MASK)
@@ -151,7 +149,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
151 149
152 /* Handle MAP_FIXED */ 150 /* Handle MAP_FIXED */
153 if (flags & MAP_FIXED) { 151 if (flags & MAP_FIXED) {
154 if (prepare_hugepage_range(addr, len, pgoff)) 152 if (prepare_hugepage_range(addr, len))
155 return -EINVAL; 153 return -EINVAL;
156 return addr; 154 return addr;
157 } 155 }
diff --git a/arch/ia64/sn/kernel/huberror.c b/arch/ia64/sn/kernel/huberror.c
index 2c3f9dfca78b..b663168da55c 100644
--- a/arch/ia64/sn/kernel/huberror.c
+++ b/arch/ia64/sn/kernel/huberror.c
@@ -185,11 +185,14 @@ void hubiio_crb_error_handler(struct hubdev_info *hubdev_info)
185 */ 185 */
186void hub_error_init(struct hubdev_info *hubdev_info) 186void hub_error_init(struct hubdev_info *hubdev_info)
187{ 187{
188
188 if (request_irq(SGI_II_ERROR, hub_eint_handler, IRQF_SHARED, 189 if (request_irq(SGI_II_ERROR, hub_eint_handler, IRQF_SHARED,
189 "SN_hub_error", (void *)hubdev_info)) 190 "SN_hub_error", (void *)hubdev_info)) {
190 printk("hub_error_init: Failed to request_irq for 0x%p\n", 191 printk("hub_error_init: Failed to request_irq for 0x%p\n",
191 hubdev_info); 192 hubdev_info);
192 return; 193 return;
194 }
195 sn_set_err_irq_affinity(SGI_II_ERROR);
193} 196}
194 197
195 198
@@ -202,11 +205,14 @@ void hub_error_init(struct hubdev_info *hubdev_info)
202 */ 205 */
203void ice_error_init(struct hubdev_info *hubdev_info) 206void ice_error_init(struct hubdev_info *hubdev_info)
204{ 207{
208
205 if (request_irq 209 if (request_irq
206 (SGI_TIO_ERROR, (void *)hub_eint_handler, IRQF_SHARED, "SN_TIO_error", 210 (SGI_TIO_ERROR, (void *)hub_eint_handler, IRQF_SHARED, "SN_TIO_error",
207 (void *)hubdev_info)) 211 (void *)hubdev_info)) {
208 printk("ice_error_init: request_irq() error hubdev_info 0x%p\n", 212 printk("ice_error_init: request_irq() error hubdev_info 0x%p\n",
209 hubdev_info); 213 hubdev_info);
210 return; 214 return;
215 }
216 sn_set_err_irq_affinity(SGI_TIO_ERROR);
211} 217}
212 218
diff --git a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
index 7f6d2360a262..0f9b12683bf3 100644
--- a/arch/ia64/sn/kernel/irq.c
+++ b/arch/ia64/sn/kernel/irq.c
@@ -19,6 +19,7 @@
19#include <asm/sn/pcidev.h> 19#include <asm/sn/pcidev.h>
20#include <asm/sn/shub_mmr.h> 20#include <asm/sn/shub_mmr.h>
21#include <asm/sn/sn_sal.h> 21#include <asm/sn/sn_sal.h>
22#include <asm/sn/sn_feature_sets.h>
22 23
23static void force_interrupt(int irq); 24static void force_interrupt(int irq);
24static void register_intr_pda(struct sn_irq_info *sn_irq_info); 25static void register_intr_pda(struct sn_irq_info *sn_irq_info);
@@ -233,6 +234,20 @@ static void sn_set_affinity_irq(unsigned int irq, cpumask_t mask)
233 (void)sn_retarget_vector(sn_irq_info, nasid, slice); 234 (void)sn_retarget_vector(sn_irq_info, nasid, slice);
234} 235}
235 236
237#ifdef CONFIG_SMP
238void sn_set_err_irq_affinity(unsigned int irq)
239{
240 /*
241 * On systems which support CPU disabling (SHub2), all error interrupts
242 * are targetted at the boot CPU.
243 */
244 if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT))
245 set_irq_affinity_info(irq, cpu_physical_id(0), 0);
246}
247#else
248void sn_set_err_irq_affinity(unsigned int irq) { }
249#endif
250
236static void 251static void
237sn_mask_irq(unsigned int irq) 252sn_mask_irq(unsigned int irq)
238{ 253{
@@ -256,6 +271,13 @@ struct irq_chip irq_type_sn = {
256 .set_affinity = sn_set_affinity_irq 271 .set_affinity = sn_set_affinity_irq
257}; 272};
258 273
274ia64_vector sn_irq_to_vector(int irq)
275{
276 if (irq >= IA64_NUM_VECTORS)
277 return 0;
278 return (ia64_vector)irq;
279}
280
259unsigned int sn_local_vector_to_irq(u8 vector) 281unsigned int sn_local_vector_to_irq(u8 vector)
260{ 282{
261 return (CPU_VECTOR_TO_IRQ(smp_processor_id(), vector)); 283 return (CPU_VECTOR_TO_IRQ(smp_processor_id(), vector));
@@ -398,7 +420,10 @@ sn_call_force_intr_provider(struct sn_irq_info *sn_irq_info)
398 struct sn_pcibus_provider *pci_provider; 420 struct sn_pcibus_provider *pci_provider;
399 421
400 pci_provider = sn_pci_provider[sn_irq_info->irq_bridge_type]; 422 pci_provider = sn_pci_provider[sn_irq_info->irq_bridge_type];
401 if (pci_provider && pci_provider->force_interrupt) 423
424 /* Don't force an interrupt if the irq has been disabled */
425 if (!(irq_desc[sn_irq_info->irq_irq].status & IRQ_DISABLED) &&
426 pci_provider && pci_provider->force_interrupt)
402 (*pci_provider->force_interrupt)(sn_irq_info); 427 (*pci_provider->force_interrupt)(sn_irq_info);
403} 428}
404 429
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index 033c8a9f000e..f3c69329e145 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -40,6 +40,7 @@
40#include <asm/sn/shub_mmr.h> 40#include <asm/sn/shub_mmr.h>
41#include <asm/sn/nodepda.h> 41#include <asm/sn/nodepda.h>
42#include <asm/sn/rw_mmr.h> 42#include <asm/sn/rw_mmr.h>
43#include <asm/sn/sn_feature_sets.h>
43 44
44DEFINE_PER_CPU(struct ptc_stats, ptcstats); 45DEFINE_PER_CPU(struct ptc_stats, ptcstats);
45DECLARE_PER_CPU(struct ptc_stats, ptcstats); 46DECLARE_PER_CPU(struct ptc_stats, ptcstats);
@@ -429,6 +430,31 @@ void sn2_send_IPI(int cpuid, int vector, int delivery_mode, int redirect)
429 sn_send_IPI_phys(nasid, physid, vector, delivery_mode); 430 sn_send_IPI_phys(nasid, physid, vector, delivery_mode);
430} 431}
431 432
433#ifdef CONFIG_HOTPLUG_CPU
434/**
435 * sn_cpu_disable_allowed - Determine if a CPU can be disabled.
436 * @cpu - CPU that is requested to be disabled.
437 *
438 * CPU disable is only allowed on SHub2 systems running with a PROM
439 * that supports CPU disable. It is not permitted to disable the boot processor.
440 */
441bool sn_cpu_disable_allowed(int cpu)
442{
443 if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT)) {
444 if (cpu != 0)
445 return true;
446 else
447 printk(KERN_WARNING
448 "Disabling the boot processor is not allowed.\n");
449
450 } else
451 printk(KERN_WARNING
452 "CPU disable is not supported on this system.\n");
453
454 return false;
455}
456#endif /* CONFIG_HOTPLUG_CPU */
457
432#ifdef CONFIG_PROC_FS 458#ifdef CONFIG_PROC_FS
433 459
434#define PTC_BASENAME "sgi_sn/ptc_statistics" 460#define PTC_BASENAME "sgi_sn/ptc_statistics"
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index df8d5bed6119..1a8e49607f11 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -66,7 +66,8 @@ static int sn_hwperf_enum_objects(int *nobj, struct sn_hwperf_object_info **ret)
66 } 66 }
67 67
68 sz = sn_hwperf_obj_cnt * sizeof(struct sn_hwperf_object_info); 68 sz = sn_hwperf_obj_cnt * sizeof(struct sn_hwperf_object_info);
69 if ((objbuf = (struct sn_hwperf_object_info *) vmalloc(sz)) == NULL) { 69 objbuf = vmalloc(sz);
70 if (objbuf == NULL) {
70 printk("sn_hwperf_enum_objects: vmalloc(%d) failed\n", (int)sz); 71 printk("sn_hwperf_enum_objects: vmalloc(%d) failed\n", (int)sz);
71 e = -ENOMEM; 72 e = -ENOMEM;
72 goto out; 73 goto out;
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index 5a289e4de838..a88eba3314d7 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -66,8 +66,7 @@ static int tiocx_match(struct device *dev, struct device_driver *drv)
66 66
67} 67}
68 68
69static int tiocx_uevent(struct device *dev, char **envp, int num_envp, 69static int tiocx_uevent(struct device *dev, struct kobj_uevent_env *env)
70 char *buffer, int buffer_size)
71{ 70{
72 return -ENODEV; 71 return -ENODEV;
73} 72}
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 42485ad50ceb..ab3eaf85fe4d 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -145,6 +145,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
145 printk(KERN_WARNING 145 printk(KERN_WARNING
146 "pcibr cannot allocate interrupt for error handler\n"); 146 "pcibr cannot allocate interrupt for error handler\n");
147 } 147 }
148 sn_set_err_irq_affinity(SGI_PCIASIC_ERROR);
148 149
149 /* 150 /*
150 * Update the Bridge with the "kernel" pagesize 151 * Update the Bridge with the "kernel" pagesize
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index d798dd4d0dc4..ef048a674772 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -654,6 +654,8 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
654 __FUNCTION__, SGI_TIOCA_ERROR, 654 __FUNCTION__, SGI_TIOCA_ERROR,
655 (int)tioca_common->ca_common.bs_persist_busnum); 655 (int)tioca_common->ca_common.bs_persist_busnum);
656 656
657 sn_set_err_irq_affinity(SGI_TIOCA_ERROR);
658
657 /* Setup locality information */ 659 /* Setup locality information */
658 controller->node = tioca_kern->ca_closest_node; 660 controller->node = tioca_kern->ca_closest_node;
659 return tioca_common; 661 return tioca_common;
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index 84b72b27e27f..cee9379d44e0 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -1034,6 +1034,7 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
1034 tioce_common->ce_pcibus.bs_persist_segment, 1034 tioce_common->ce_pcibus.bs_persist_segment,
1035 tioce_common->ce_pcibus.bs_persist_busnum); 1035 tioce_common->ce_pcibus.bs_persist_busnum);
1036 1036
1037 sn_set_err_irq_affinity(SGI_PCIASIC_ERROR);
1037 return tioce_common; 1038 return tioce_common;
1038} 1039}
1039 1040