aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.c12
-rw-r--r--arch/ia64/hp/sim/simscsi.c3
-rw-r--r--arch/ia64/kernel/irq_ia64.c28
-rw-r--r--arch/ia64/kernel/setup.c13
-rw-r--r--arch/ia64/kernel/smpboot.c6
-rw-r--r--arch/ia64/mm/contig.c3
-rw-r--r--arch/ia64/mm/discontig.c3
-rw-r--r--arch/ia64/sn/kernel/huberror.c14
-rw-r--r--arch/ia64/sn/kernel/irq.c15
-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/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
-rw-r--r--arch/powerpc/kernel/ibmebus.c30
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c24
-rw-r--r--arch/powerpc/platforms/ps3/platform.h1
-rw-r--r--arch/powerpc/platforms/ps3/repository.c29
-rw-r--r--arch/powerpc/platforms/ps3/spu.c2
-rw-r--r--drivers/ata/ata_piix.c5
-rw-r--r--drivers/ata/sata_via.c2
-rw-r--r--drivers/mtd/mtdsuper.c2
-rw-r--r--fs/jffs2/fs.c2
-rw-r--r--fs/nfs/file.c2
-rw-r--r--fs/nfs/namespace.c2
-rw-r--r--fs/nfs/nfs4proc.c4
-rw-r--r--fs/nfs/super.c20
-rw-r--r--fs/nfs/write.c44
-rw-r--r--include/asm-ia64/hpsim.h16
-rw-r--r--include/asm-ia64/sn/arch.h1
-rw-r--r--include/asm-ia64/sn/intr.h1
-rw-r--r--include/asm-ia64/sn/sn_feature_sets.h1
-rw-r--r--include/asm-powerpc/spu.h2
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--net/ipv4/tcp_input.c2
-rw-r--r--scripts/kconfig/conf.c21
38 files changed, 274 insertions, 95 deletions
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..4017696ada63 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{
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c
index e62694f8ef75..4552a1cf5b33 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/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/setup.c b/arch/ia64/kernel/setup.c
index 407efea04bf5..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,13 +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
392#ifdef CONFIG_HP_SIMSERIAL_CONSOLE 393 if (!simcons_register())
393 {
394 extern struct console hpsim_cons;
395 register_console(&hpsim_cons);
396 earlycons++; 394 earlycons++;
397 }
398#endif
399 395
400 return (earlycons) ? 0 : -1; 396 return (earlycons) ? 0 : -1;
401} 397}
@@ -960,6 +956,11 @@ cpu_init (void)
960 956
961 /* clear TPR & XTP to enable all interrupt classes: */ 957 /* clear TPR & XTP to enable all interrupt classes: */
962 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
963#ifdef CONFIG_SMP 964#ifdef CONFIG_SMP
964 normal_xtp(); 965 normal_xtp();
965#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/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/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 360047389449..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{
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/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
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 9a8c9af43b22..d6a38cd5018e 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -188,33 +188,21 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_node(
188 struct device_node *dn) 188 struct device_node *dn)
189{ 189{
190 struct ibmebus_dev *dev; 190 struct ibmebus_dev *dev;
191 const char *loc_code; 191 int i, len, bus_len;
192 int length;
193
194 loc_code = of_get_property(dn, "ibm,loc-code", NULL);
195 if (!loc_code) {
196 printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n",
197 __FUNCTION__, dn->name ? dn->name : "<unknown>");
198 return ERR_PTR(-EINVAL);
199 }
200
201 if (strlen(loc_code) == 0) {
202 printk(KERN_WARNING "%s: 'ibm,loc-code' is invalid\n",
203 __FUNCTION__);
204 return ERR_PTR(-EINVAL);
205 }
206 192
207 dev = kzalloc(sizeof(struct ibmebus_dev), GFP_KERNEL); 193 dev = kzalloc(sizeof(struct ibmebus_dev), GFP_KERNEL);
208 if (!dev) { 194 if (!dev)
209 return ERR_PTR(-ENOMEM); 195 return ERR_PTR(-ENOMEM);
210 }
211 196
212 dev->ofdev.node = of_node_get(dn); 197 dev->ofdev.node = of_node_get(dn);
213 198
214 length = strlen(loc_code); 199 len = strlen(dn->full_name + 1);
215 memcpy(dev->ofdev.dev.bus_id, loc_code 200 bus_len = min(len, BUS_ID_SIZE - 1);
216 + (length - min(length, BUS_ID_SIZE - 1)), 201 memcpy(dev->ofdev.dev.bus_id, dn->full_name + 1
217 min(length, BUS_ID_SIZE - 1)); 202 + (len - bus_len), bus_len);
203 for (i = 0; i < bus_len; i++)
204 if (dev->ofdev.dev.bus_id[i] == '/')
205 dev->ofdev.dev.bus_id[i] = '_';
218 206
219 /* Register with generic device framework. */ 207 /* Register with generic device framework. */
220 if (ibmebus_register_device_common(dev, dn->name) != 0) { 208 if (ibmebus_register_device_common(dev, dn->name) != 0) {
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 095a30304c56..106d2921e2d9 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -236,27 +236,34 @@ static irqreturn_t
236spu_irq_class_0(int irq, void *data) 236spu_irq_class_0(int irq, void *data)
237{ 237{
238 struct spu *spu; 238 struct spu *spu;
239 unsigned long stat, mask;
239 240
240 spu = data; 241 spu = data;
241 spu->class_0_pending = 1; 242
243 mask = spu_int_mask_get(spu, 0);
244 stat = spu_int_stat_get(spu, 0);
245 stat &= mask;
246
247 spin_lock(&spu->register_lock);
248 spu->class_0_pending |= stat;
249 spin_unlock(&spu->register_lock);
250
242 spu->stop_callback(spu); 251 spu->stop_callback(spu);
243 252
253 spu_int_stat_clear(spu, 0, stat);
254
244 return IRQ_HANDLED; 255 return IRQ_HANDLED;
245} 256}
246 257
247int 258int
248spu_irq_class_0_bottom(struct spu *spu) 259spu_irq_class_0_bottom(struct spu *spu)
249{ 260{
250 unsigned long stat, mask;
251 unsigned long flags; 261 unsigned long flags;
252 262 unsigned long stat;
253 spu->class_0_pending = 0;
254 263
255 spin_lock_irqsave(&spu->register_lock, flags); 264 spin_lock_irqsave(&spu->register_lock, flags);
256 mask = spu_int_mask_get(spu, 0); 265 stat = spu->class_0_pending;
257 stat = spu_int_stat_get(spu, 0); 266 spu->class_0_pending = 0;
258
259 stat &= mask;
260 267
261 if (stat & 1) /* invalid DMA alignment */ 268 if (stat & 1) /* invalid DMA alignment */
262 __spu_trap_dma_align(spu); 269 __spu_trap_dma_align(spu);
@@ -267,7 +274,6 @@ spu_irq_class_0_bottom(struct spu *spu)
267 if (stat & 4) /* error on SPU */ 274 if (stat & 4) /* error on SPU */
268 __spu_trap_error(spu); 275 __spu_trap_error(spu);
269 276
270 spu_int_stat_clear(spu, 0, stat);
271 spin_unlock_irqrestore(&spu->register_lock, flags); 277 spin_unlock_irqrestore(&spu->register_lock, flags);
272 278
273 return (stat & 0x7) ? -EIO : 0; 279 return (stat & 0x7) ? -EIO : 0;
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 87d52060fec0..2eb8f92704b4 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -83,6 +83,7 @@ enum ps3_dev_type {
83 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */ 83 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
84 PS3_DEV_TYPE_SB_GPIO = 6, 84 PS3_DEV_TYPE_SB_GPIO = 6,
85 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */ 85 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
86 PS3_DEV_TYPE_STOR_DUMMY = 32,
86 PS3_DEV_TYPE_NOACCESS = 255, 87 PS3_DEV_TYPE_NOACCESS = 255,
87}; 88};
88 89
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 8cc37cfea0f2..1c94824f7b63 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -349,6 +349,35 @@ int ps3_repository_find_device(struct ps3_repository_device *repo)
349 return result; 349 return result;
350 } 350 }
351 351
352 if (tmp.bus_type == PS3_BUS_TYPE_STORAGE) {
353 /*
354 * A storage device may show up in the repository before the
355 * hypervisor has finished probing its type and regions
356 */
357 unsigned int num_regions;
358
359 if (tmp.dev_type == PS3_DEV_TYPE_STOR_DUMMY) {
360 pr_debug("%s:%u storage device not ready\n", __func__,
361 __LINE__);
362 return -ENODEV;
363 }
364
365 result = ps3_repository_read_stor_dev_num_regions(tmp.bus_index,
366 tmp.dev_index,
367 &num_regions);
368 if (result) {
369 pr_debug("%s:%d read_stor_dev_num_regions failed\n",
370 __func__, __LINE__);
371 return result;
372 }
373
374 if (!num_regions) {
375 pr_debug("%s:%u storage device has no regions yet\n",
376 __func__, __LINE__);
377 return -ENODEV;
378 }
379 }
380
352 result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index, 381 result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
353 &tmp.dev_id); 382 &tmp.dev_id);
354 383
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index ac2a4b8a4c14..d1630a074acf 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -505,6 +505,8 @@ static void mfc_sr1_set(struct spu *spu, u64 sr1)
505 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK 505 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK
506 | MFC_STATE1_PROBLEM_STATE_MASK); 506 | MFC_STATE1_PROBLEM_STATE_MASK);
507 507
508 sr1 |= MFC_STATE1_MASTER_RUN_CONTROL_MASK;
509
508 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed)); 510 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed));
509 511
510 spu_pdata(spu)->cache.sr1 = sr1; 512 spu_pdata(spu)->cache.sr1 = sr1;
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index e40c94f5f59d..3b8bf1812dc8 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -955,7 +955,8 @@ static int piix_broken_suspend(void)
955 DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"), 955 DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"),
956 }, 956 },
957 }, 957 },
958 { } 958
959 { } /* terminate list */
959 }; 960 };
960 static const char *oemstrs[] = { 961 static const char *oemstrs[] = {
961 "Tecra M3,", 962 "Tecra M3,",
@@ -1187,6 +1188,8 @@ static void piix_iocfg_bit18_quirk(struct pci_dev *pdev)
1187 DMI_MATCH(DMI_PRODUCT_NAME, "M570U"), 1188 DMI_MATCH(DMI_PRODUCT_NAME, "M570U"),
1188 }, 1189 },
1189 }, 1190 },
1191
1192 { } /* terminate list */
1190 }; 1193 };
1191 u32 iocfg; 1194 u32 iocfg;
1192 1195
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index a4e631766eee..57fd30de8f0d 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -371,7 +371,7 @@ static void vt6421_set_dma_mode(struct ata_port *ap, struct ata_device *adev)
371{ 371{
372 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 372 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
373 static const u8 udma_bits[] = { 0xEE, 0xE8, 0xE6, 0xE4, 0xE2, 0xE1, 0xE0, 0xE0 }; 373 static const u8 udma_bits[] = { 0xEE, 0xE8, 0xE6, 0xE4, 0xE2, 0xE1, 0xE0, 0xE0 };
374 pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->pio_mode - XFER_UDMA_0]); 374 pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->dma_mode - XFER_UDMA_0]);
375} 375}
376 376
377static const unsigned int svia_bar_sizes[] = { 377static const unsigned int svia_bar_sizes[] = {
diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c
index aca331971201..9b430f20b640 100644
--- a/drivers/mtd/mtdsuper.c
+++ b/drivers/mtd/mtdsuper.c
@@ -70,6 +70,8 @@ static int get_sb_mtd_aux(struct file_system_type *fs_type, int flags,
70 DEBUG(1, "MTDSB: New superblock for device %d (\"%s\")\n", 70 DEBUG(1, "MTDSB: New superblock for device %d (\"%s\")\n",
71 mtd->index, mtd->name); 71 mtd->index, mtd->name);
72 72
73 sb->s_flags = flags;
74
73 ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0); 75 ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0);
74 if (ret < 0) { 76 if (ret < 0) {
75 up_write(&sb->s_umount); 77 up_write(&sb->s_umount);
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index 1d3b7a9fc828..8bc727b71696 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -627,7 +627,7 @@ unsigned char *jffs2_gc_fetch_page(struct jffs2_sb_info *c,
627 struct inode *inode = OFNI_EDONI_2SFFJ(f); 627 struct inode *inode = OFNI_EDONI_2SFFJ(f);
628 struct page *pg; 628 struct page *pg;
629 629
630 pg = read_cache_page(inode->i_mapping, offset >> PAGE_CACHE_SHIFT, 630 pg = read_cache_page_async(inode->i_mapping, offset >> PAGE_CACHE_SHIFT,
631 (void *)jffs2_do_readpage_unlock, inode); 631 (void *)jffs2_do_readpage_unlock, inode);
632 if (IS_ERR(pg)) 632 if (IS_ERR(pg))
633 return (void *)pg; 633 return (void *)pg;
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index c87dc713b5d7..579cf8a7d4a7 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -316,7 +316,7 @@ static void nfs_invalidate_page(struct page *page, unsigned long offset)
316 if (offset != 0) 316 if (offset != 0)
317 return; 317 return;
318 /* Cancel any unstarted writes on this page */ 318 /* Cancel any unstarted writes on this page */
319 nfs_wb_page_priority(page->mapping->host, page, FLUSH_INVALIDATE); 319 nfs_wb_page_cancel(page->mapping->host, page);
320} 320}
321 321
322static int nfs_release_page(struct page *page, gfp_t gfp) 322static int nfs_release_page(struct page *page, gfp_t gfp)
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index aea76d0e5fbd..acfc56f9edc0 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -176,7 +176,7 @@ static void nfs_expire_automounts(struct work_struct *work)
176void nfs_release_automount_timer(void) 176void nfs_release_automount_timer(void)
177{ 177{
178 if (list_empty(&nfs_automount_list)) 178 if (list_empty(&nfs_automount_list))
179 cancel_delayed_work_sync(&nfs_automount_task); 179 cancel_delayed_work(&nfs_automount_task);
180} 180}
181 181
182/* 182/*
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 62b3ae280310..4b90e17555a9 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -646,7 +646,7 @@ static int _nfs4_do_open_reclaim(struct nfs_open_context *ctx, struct nfs4_state
646 rcu_read_lock(); 646 rcu_read_lock();
647 delegation = rcu_dereference(NFS_I(state->inode)->delegation); 647 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
648 if (delegation != NULL && (delegation->flags & NFS_DELEGATION_NEED_RECLAIM) != 0) 648 if (delegation != NULL && (delegation->flags & NFS_DELEGATION_NEED_RECLAIM) != 0)
649 delegation_type = delegation->flags; 649 delegation_type = delegation->type;
650 rcu_read_unlock(); 650 rcu_read_unlock();
651 opendata->o_arg.u.delegation_type = delegation_type; 651 opendata->o_arg.u.delegation_type = delegation_type;
652 status = nfs4_open_recover(opendata, state); 652 status = nfs4_open_recover(opendata, state);
@@ -1434,7 +1434,7 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
1434 } 1434 }
1435 res = d_add_unique(dentry, igrab(state->inode)); 1435 res = d_add_unique(dentry, igrab(state->inode));
1436 if (res != NULL) 1436 if (res != NULL)
1437 dentry = res; 1437 path.dentry = res;
1438 nfs4_intent_set_file(nd, &path, state); 1438 nfs4_intent_set_file(nd, &path, state);
1439 return res; 1439 return res;
1440} 1440}
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 46139003ea0c..8ed593766f16 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -911,13 +911,13 @@ static int nfs_parse_mount_options(char *raw,
911 kfree(string); 911 kfree(string);
912 912
913 switch (token) { 913 switch (token) {
914 case Opt_udp: 914 case Opt_xprt_udp:
915 mnt->flags &= ~NFS_MOUNT_TCP; 915 mnt->flags &= ~NFS_MOUNT_TCP;
916 mnt->nfs_server.protocol = IPPROTO_UDP; 916 mnt->nfs_server.protocol = IPPROTO_UDP;
917 mnt->timeo = 7; 917 mnt->timeo = 7;
918 mnt->retrans = 5; 918 mnt->retrans = 5;
919 break; 919 break;
920 case Opt_tcp: 920 case Opt_xprt_tcp:
921 mnt->flags |= NFS_MOUNT_TCP; 921 mnt->flags |= NFS_MOUNT_TCP;
922 mnt->nfs_server.protocol = IPPROTO_TCP; 922 mnt->nfs_server.protocol = IPPROTO_TCP;
923 mnt->timeo = 600; 923 mnt->timeo = 600;
@@ -936,10 +936,10 @@ static int nfs_parse_mount_options(char *raw,
936 kfree(string); 936 kfree(string);
937 937
938 switch (token) { 938 switch (token) {
939 case Opt_udp: 939 case Opt_xprt_udp:
940 mnt->mount_server.protocol = IPPROTO_UDP; 940 mnt->mount_server.protocol = IPPROTO_UDP;
941 break; 941 break;
942 case Opt_tcp: 942 case Opt_xprt_tcp:
943 mnt->mount_server.protocol = IPPROTO_TCP; 943 mnt->mount_server.protocol = IPPROTO_TCP;
944 break; 944 break;
945 default: 945 default:
@@ -1153,20 +1153,20 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options,
1153 c = strchr(dev_name, ':'); 1153 c = strchr(dev_name, ':');
1154 if (c == NULL) 1154 if (c == NULL)
1155 return -EINVAL; 1155 return -EINVAL;
1156 len = c - dev_name - 1; 1156 len = c - dev_name;
1157 if (len > sizeof(data->hostname)) 1157 if (len > sizeof(data->hostname))
1158 return -EINVAL; 1158 return -ENAMETOOLONG;
1159 strncpy(data->hostname, dev_name, len); 1159 strncpy(data->hostname, dev_name, len);
1160 args.nfs_server.hostname = data->hostname; 1160 args.nfs_server.hostname = data->hostname;
1161 1161
1162 c++; 1162 c++;
1163 if (strlen(c) > NFS_MAXPATHLEN) 1163 if (strlen(c) > NFS_MAXPATHLEN)
1164 return -EINVAL; 1164 return -ENAMETOOLONG;
1165 args.nfs_server.export_path = c; 1165 args.nfs_server.export_path = c;
1166 1166
1167 status = nfs_try_mount(&args, mntfh); 1167 status = nfs_try_mount(&args, mntfh);
1168 if (status) 1168 if (status)
1169 return -EINVAL; 1169 return status;
1170 1170
1171 /* 1171 /*
1172 * Translate to nfs_mount_data, which nfs_fill_super 1172 * Translate to nfs_mount_data, which nfs_fill_super
@@ -1677,7 +1677,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
1677 /* while calculating len, pretend ':' is '\0' */ 1677 /* while calculating len, pretend ':' is '\0' */
1678 len = c - dev_name; 1678 len = c - dev_name;
1679 if (len > NFS4_MAXNAMLEN) 1679 if (len > NFS4_MAXNAMLEN)
1680 return -EINVAL; 1680 return -ENAMETOOLONG;
1681 *hostname = kzalloc(len, GFP_KERNEL); 1681 *hostname = kzalloc(len, GFP_KERNEL);
1682 if (*hostname == NULL) 1682 if (*hostname == NULL)
1683 return -ENOMEM; 1683 return -ENOMEM;
@@ -1686,7 +1686,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options,
1686 c++; /* step over the ':' */ 1686 c++; /* step over the ':' */
1687 len = strlen(c); 1687 len = strlen(c);
1688 if (len > NFS4_MAXPATHLEN) 1688 if (len > NFS4_MAXPATHLEN)
1689 return -EINVAL; 1689 return -ENAMETOOLONG;
1690 *mntpath = kzalloc(len + 1, GFP_KERNEL); 1690 *mntpath = kzalloc(len + 1, GFP_KERNEL);
1691 if (*mntpath == NULL) 1691 if (*mntpath == NULL)
1692 return -ENOMEM; 1692 return -ENOMEM;
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index ef97e0c0f5b1..0d7a77cc394b 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1396,6 +1396,50 @@ out:
1396 return ret; 1396 return ret;
1397} 1397}
1398 1398
1399int nfs_wb_page_cancel(struct inode *inode, struct page *page)
1400{
1401 struct nfs_page *req;
1402 loff_t range_start = page_offset(page);
1403 loff_t range_end = range_start + (loff_t)(PAGE_CACHE_SIZE - 1);
1404 struct writeback_control wbc = {
1405 .bdi = page->mapping->backing_dev_info,
1406 .sync_mode = WB_SYNC_ALL,
1407 .nr_to_write = LONG_MAX,
1408 .range_start = range_start,
1409 .range_end = range_end,
1410 };
1411 int ret = 0;
1412
1413 BUG_ON(!PageLocked(page));
1414 for (;;) {
1415 req = nfs_page_find_request(page);
1416 if (req == NULL)
1417 goto out;
1418 if (test_bit(PG_NEED_COMMIT, &req->wb_flags)) {
1419 nfs_release_request(req);
1420 break;
1421 }
1422 if (nfs_lock_request_dontget(req)) {
1423 nfs_inode_remove_request(req);
1424 /*
1425 * In case nfs_inode_remove_request has marked the
1426 * page as being dirty
1427 */
1428 cancel_dirty_page(page, PAGE_CACHE_SIZE);
1429 nfs_unlock_request(req);
1430 break;
1431 }
1432 ret = nfs_wait_on_request(req);
1433 if (ret < 0)
1434 goto out;
1435 }
1436 if (!PagePrivate(page))
1437 return 0;
1438 ret = nfs_sync_mapping_wait(page->mapping, &wbc, FLUSH_INVALIDATE);
1439out:
1440 return ret;
1441}
1442
1399int nfs_wb_page_priority(struct inode *inode, struct page *page, int how) 1443int nfs_wb_page_priority(struct inode *inode, struct page *page, int how)
1400{ 1444{
1401 loff_t range_start = page_offset(page); 1445 loff_t range_start = page_offset(page);
diff --git a/include/asm-ia64/hpsim.h b/include/asm-ia64/hpsim.h
new file mode 100644
index 000000000000..892ab198a9da
--- /dev/null
+++ b/include/asm-ia64/hpsim.h
@@ -0,0 +1,16 @@
1#ifndef _ASMIA64_HPSIM_H
2#define _ASMIA64_HPSIM_H
3
4#ifndef CONFIG_HP_SIMSERIAL_CONSOLE
5static inline int simcons_register(void) { return 1; }
6#else
7int simcons_register(void);
8#endif
9
10struct tty_driver;
11extern struct tty_driver *hp_simserial_driver;
12
13void ia64_ssc_connect_irq(long intr, long irq);
14void ia64_ctl_trace(long on);
15
16#endif
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h
index 16adc93d7a72..7caa1f44cd95 100644
--- a/include/asm-ia64/sn/arch.h
+++ b/include/asm-ia64/sn/arch.h
@@ -81,5 +81,6 @@ extern u8 sn_sharing_domain_size;
81extern u8 sn_region_size; 81extern u8 sn_region_size;
82 82
83extern void sn_flush_all_caches(long addr, long bytes); 83extern void sn_flush_all_caches(long addr, long bytes);
84extern bool sn_cpu_disable_allowed(int cpu);
84 85
85#endif /* _ASM_IA64_SN_ARCH_H */ 86#endif /* _ASM_IA64_SN_ARCH_H */
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h
index 12b54ddb06be..e0487aa97418 100644
--- a/include/asm-ia64/sn/intr.h
+++ b/include/asm-ia64/sn/intr.h
@@ -60,6 +60,7 @@ extern u64 sn_intr_alloc(nasid_t, int,
60 int, nasid_t, int); 60 int, nasid_t, int);
61extern void sn_intr_free(nasid_t, int, struct sn_irq_info *); 61extern void sn_intr_free(nasid_t, int, struct sn_irq_info *);
62extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int); 62extern struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *, nasid_t, int);
63extern void sn_set_err_irq_affinity(unsigned int);
63extern struct list_head **sn_irq_lh; 64extern struct list_head **sn_irq_lh;
64 65
65#define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector) 66#define CPU_VECTOR_TO_IRQ(cpuid,vector) (vector)
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h
index bfdc36273ed4..8e83ac117ace 100644
--- a/include/asm-ia64/sn/sn_feature_sets.h
+++ b/include/asm-ia64/sn/sn_feature_sets.h
@@ -31,6 +31,7 @@ extern int sn_prom_feature_available(int id);
31#define PRF_PAL_CACHE_FLUSH_SAFE 0 31#define PRF_PAL_CACHE_FLUSH_SAFE 0
32#define PRF_DEVICE_FLUSH_LIST 1 32#define PRF_DEVICE_FLUSH_LIST 1
33#define PRF_HOTPLUG_SUPPORT 2 33#define PRF_HOTPLUG_SUPPORT 2
34#define PRF_CPU_DISABLE_SUPPORT 3
34 35
35/* --------------------- OS Features -------------------------------*/ 36/* --------------------- OS Features -------------------------------*/
36 37
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 8836c0f1f2f7..5bde3980bf49 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -130,6 +130,7 @@ struct spu {
130 u64 flags; 130 u64 flags;
131 u64 dar; 131 u64 dar;
132 u64 dsisr; 132 u64 dsisr;
133 u64 class_0_pending;
133 size_t ls_size; 134 size_t ls_size;
134 unsigned int slb_replace; 135 unsigned int slb_replace;
135 struct mm_struct *mm; 136 struct mm_struct *mm;
@@ -138,7 +139,6 @@ struct spu {
138 unsigned long long timestamp; 139 unsigned long long timestamp;
139 pid_t pid; 140 pid_t pid;
140 pid_t tgid; 141 pid_t tgid;
141 int class_0_pending;
142 spinlock_t register_lock; 142 spinlock_t register_lock;
143 143
144 void (* wbox_callback)(struct spu *spu); 144 void (* wbox_callback)(struct spu *spu);
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 157dcb055b5c..7250eeadd7b5 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -431,6 +431,7 @@ extern int nfs_sync_mapping_range(struct address_space *, loff_t, loff_t, int);
431extern int nfs_wb_all(struct inode *inode); 431extern int nfs_wb_all(struct inode *inode);
432extern int nfs_wb_page(struct inode *inode, struct page* page); 432extern int nfs_wb_page(struct inode *inode, struct page* page);
433extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how); 433extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how);
434extern int nfs_wb_page_cancel(struct inode *inode, struct page* page);
434#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 435#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
435extern int nfs_commit_inode(struct inode *, int); 436extern int nfs_commit_inode(struct inode *, int);
436extern struct nfs_write_data *nfs_commit_alloc(void); 437extern struct nfs_write_data *nfs_commit_alloc(void);
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 1ee72127462b..bbad2cdb74b7 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -560,7 +560,7 @@ static u32 tcp_rto_min(struct sock *sk)
560 struct dst_entry *dst = __sk_dst_get(sk); 560 struct dst_entry *dst = __sk_dst_get(sk);
561 u32 rto_min = TCP_RTO_MIN; 561 u32 rto_min = TCP_RTO_MIN;
562 562
563 if (dst_metric_locked(dst, RTAX_RTO_MIN)) 563 if (dst && dst_metric_locked(dst, RTAX_RTO_MIN))
564 rto_min = dst->metrics[RTAX_RTO_MIN-1]; 564 rto_min = dst->metrics[RTAX_RTO_MIN-1];
565 return rto_min; 565 return rto_min;
566} 566}
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 8be6a4269e63..a38787a881ea 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -72,7 +72,7 @@ static void check_stdin(void)
72 } 72 }
73} 73}
74 74
75static void conf_askvalue(struct symbol *sym, const char *def) 75static int conf_askvalue(struct symbol *sym, const char *def)
76{ 76{
77 enum symbol_type type = sym_get_type(sym); 77 enum symbol_type type = sym_get_type(sym);
78 tristate val; 78 tristate val;
@@ -87,7 +87,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
87 printf("%s\n", def); 87 printf("%s\n", def);
88 line[0] = '\n'; 88 line[0] = '\n';
89 line[1] = 0; 89 line[1] = 0;
90 return; 90 return 0;
91 } 91 }
92 92
93 switch (input_mode) { 93 switch (input_mode) {
@@ -97,23 +97,23 @@ static void conf_askvalue(struct symbol *sym, const char *def)
97 case set_random: 97 case set_random:
98 if (sym_has_value(sym)) { 98 if (sym_has_value(sym)) {
99 printf("%s\n", def); 99 printf("%s\n", def);
100 return; 100 return 0;
101 } 101 }
102 break; 102 break;
103 case ask_new: 103 case ask_new:
104 case ask_silent: 104 case ask_silent:
105 if (sym_has_value(sym)) { 105 if (sym_has_value(sym)) {
106 printf("%s\n", def); 106 printf("%s\n", def);
107 return; 107 return 0;
108 } 108 }
109 check_stdin(); 109 check_stdin();
110 case ask_all: 110 case ask_all:
111 fflush(stdout); 111 fflush(stdout);
112 fgets(line, 128, stdin); 112 fgets(line, 128, stdin);
113 return; 113 return 1;
114 case set_default: 114 case set_default:
115 printf("%s\n", def); 115 printf("%s\n", def);
116 return; 116 return 1;
117 default: 117 default:
118 break; 118 break;
119 } 119 }
@@ -123,7 +123,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
123 case S_HEX: 123 case S_HEX:
124 case S_STRING: 124 case S_STRING:
125 printf("%s\n", def); 125 printf("%s\n", def);
126 return; 126 return 1;
127 default: 127 default:
128 ; 128 ;
129 } 129 }
@@ -174,6 +174,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
174 break; 174 break;
175 } 175 }
176 printf("%s", line); 176 printf("%s", line);
177 return 1;
177} 178}
178 179
179int conf_string(struct menu *menu) 180int conf_string(struct menu *menu)
@@ -187,7 +188,8 @@ int conf_string(struct menu *menu)
187 def = sym_get_string_value(sym); 188 def = sym_get_string_value(sym);
188 if (sym_get_string_value(sym)) 189 if (sym_get_string_value(sym))
189 printf("[%s] ", def); 190 printf("[%s] ", def);
190 conf_askvalue(sym, def); 191 if (!conf_askvalue(sym, def))
192 return 0;
191 switch (line[0]) { 193 switch (line[0]) {
192 case '\n': 194 case '\n':
193 break; 195 break;
@@ -240,7 +242,8 @@ static int conf_sym(struct menu *menu)
240 if (menu_has_help(menu)) 242 if (menu_has_help(menu))
241 printf("/?"); 243 printf("/?");
242 printf("] "); 244 printf("] ");
243 conf_askvalue(sym, sym_get_string_value(sym)); 245 if (!conf_askvalue(sym, sym_get_string_value(sym)))
246 return 0;
244 strip(line); 247 strip(line);
245 248
246 switch (line[0]) { 249 switch (line[0]) {