diff options
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/kernel/entry.S | 1 | ||||
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 7 | ||||
-rw-r--r-- | arch/alpha/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/alpha/kernel/sys_dp264.c | 41 | ||||
-rw-r--r-- | arch/alpha/kernel/traps.c | 15 |
5 files changed, 41 insertions, 27 deletions
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index 76cc0cb5fc2e..e38671c922bc 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S | |||
@@ -196,6 +196,7 @@ entUna: | |||
196 | stq $26, 208($sp) | 196 | stq $26, 208($sp) |
197 | stq $27, 216($sp) | 197 | stq $27, 216($sp) |
198 | stq $28, 224($sp) | 198 | stq $28, 224($sp) |
199 | mov $sp, $19 | ||
199 | stq $gp, 232($sp) | 200 | stq $gp, 232($sp) |
200 | lda $8, 0x3fff | 201 | lda $8, 0x3fff |
201 | stq $31, 248($sp) | 202 | stq $31, 248($sp) |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 0636116210d2..01fe990d3e54 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/namei.h> | 37 | #include <linux/namei.h> |
38 | #include <linux/uio.h> | 38 | #include <linux/uio.h> |
39 | #include <linux/vfs.h> | 39 | #include <linux/vfs.h> |
40 | #include <linux/rcupdate.h> | ||
40 | 41 | ||
41 | #include <asm/fpu.h> | 42 | #include <asm/fpu.h> |
42 | #include <asm/io.h> | 43 | #include <asm/io.h> |
@@ -975,6 +976,7 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
975 | long timeout; | 976 | long timeout; |
976 | int ret = -EINVAL; | 977 | int ret = -EINVAL; |
977 | struct fdtable *fdt; | 978 | struct fdtable *fdt; |
979 | int max_fdset; | ||
978 | 980 | ||
979 | timeout = MAX_SCHEDULE_TIMEOUT; | 981 | timeout = MAX_SCHEDULE_TIMEOUT; |
980 | if (tvp) { | 982 | if (tvp) { |
@@ -996,8 +998,11 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, | |||
996 | } | 998 | } |
997 | } | 999 | } |
998 | 1000 | ||
1001 | rcu_read_lock(); | ||
999 | fdt = files_fdtable(current->files); | 1002 | fdt = files_fdtable(current->files); |
1000 | if (n < 0 || n > fdt->max_fdset) | 1003 | max_fdset = fdt->max_fdset; |
1004 | rcu_read_unlock(); | ||
1005 | if (n < 0 || n > max_fdset) | ||
1001 | goto out_nofds; | 1006 | goto out_nofds; |
1002 | 1007 | ||
1003 | /* | 1008 | /* |
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index fa98dae3cd98..eb20c3afff58 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -127,6 +127,10 @@ common_shutdown_1(void *generic_ptr) | |||
127 | /* If booted from SRM, reset some of the original environment. */ | 127 | /* If booted from SRM, reset some of the original environment. */ |
128 | if (alpha_using_srm) { | 128 | if (alpha_using_srm) { |
129 | #ifdef CONFIG_DUMMY_CONSOLE | 129 | #ifdef CONFIG_DUMMY_CONSOLE |
130 | /* If we've gotten here after SysRq-b, leave interrupt | ||
131 | context before taking over the console. */ | ||
132 | if (in_interrupt()) | ||
133 | irq_exit(); | ||
130 | /* This has the effect of resetting the VGA video origin. */ | 134 | /* This has the effect of resetting the VGA video origin. */ |
131 | take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1); | 135 | take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1); |
132 | #endif | 136 | #endif |
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index 9e36b07fa940..d5da6b1b28ee 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c | |||
@@ -395,6 +395,22 @@ clipper_init_irq(void) | |||
395 | */ | 395 | */ |
396 | 396 | ||
397 | static int __init | 397 | static int __init |
398 | isa_irq_fixup(struct pci_dev *dev, int irq) | ||
399 | { | ||
400 | u8 irq8; | ||
401 | |||
402 | if (irq > 0) | ||
403 | return irq; | ||
404 | |||
405 | /* This interrupt is routed via ISA bridge, so we'll | ||
406 | just have to trust whatever value the console might | ||
407 | have assigned. */ | ||
408 | pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8); | ||
409 | |||
410 | return irq8 & 0xf; | ||
411 | } | ||
412 | |||
413 | static int __init | ||
398 | dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 414 | dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
399 | { | 415 | { |
400 | static char irq_tab[6][5] __initdata = { | 416 | static char irq_tab[6][5] __initdata = { |
@@ -407,25 +423,13 @@ dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
407 | { 16+ 3, 16+ 3, 16+ 2, 16+ 1, 16+ 0} /* IdSel 10 slot 3 */ | 423 | { 16+ 3, 16+ 3, 16+ 2, 16+ 1, 16+ 0} /* IdSel 10 slot 3 */ |
408 | }; | 424 | }; |
409 | const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5; | 425 | const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5; |
410 | |||
411 | struct pci_controller *hose = dev->sysdata; | 426 | struct pci_controller *hose = dev->sysdata; |
412 | int irq = COMMON_TABLE_LOOKUP; | 427 | int irq = COMMON_TABLE_LOOKUP; |
413 | 428 | ||
414 | if (irq > 0) { | 429 | if (irq > 0) |
415 | irq += 16 * hose->index; | 430 | irq += 16 * hose->index; |
416 | } else { | ||
417 | /* ??? The Contaq IDE controller on the ISA bridge uses | ||
418 | "legacy" interrupts 14 and 15. I don't know if anything | ||
419 | can wind up at the same slot+pin on hose1, so we'll | ||
420 | just have to trust whatever value the console might | ||
421 | have assigned. */ | ||
422 | |||
423 | u8 irq8; | ||
424 | pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8); | ||
425 | irq = irq8; | ||
426 | } | ||
427 | 431 | ||
428 | return irq; | 432 | return isa_irq_fixup(dev, irq); |
429 | } | 433 | } |
430 | 434 | ||
431 | static int __init | 435 | static int __init |
@@ -453,7 +457,8 @@ monet_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
453 | { 24, 24, 25, 26, 27} /* IdSel 15 slot 5 PCI2*/ | 457 | { 24, 24, 25, 26, 27} /* IdSel 15 slot 5 PCI2*/ |
454 | }; | 458 | }; |
455 | const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5; | 459 | const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5; |
456 | return COMMON_TABLE_LOOKUP; | 460 | |
461 | return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP); | ||
457 | } | 462 | } |
458 | 463 | ||
459 | static u8 __init | 464 | static u8 __init |
@@ -507,7 +512,8 @@ webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
507 | { 47, 47, 46, 45, 44}, /* IdSel 17 slot 3 */ | 512 | { 47, 47, 46, 45, 44}, /* IdSel 17 slot 3 */ |
508 | }; | 513 | }; |
509 | const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5; | 514 | const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5; |
510 | return COMMON_TABLE_LOOKUP; | 515 | |
516 | return isa_irq_fixup(dev, COMMON_TABLE_LOOKUP); | ||
511 | } | 517 | } |
512 | 518 | ||
513 | static int __init | 519 | static int __init |
@@ -524,14 +530,13 @@ clipper_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
524 | { -1, -1, -1, -1, -1} /* IdSel 7 ISA Bridge */ | 530 | { -1, -1, -1, -1, -1} /* IdSel 7 ISA Bridge */ |
525 | }; | 531 | }; |
526 | const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5; | 532 | const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5; |
527 | |||
528 | struct pci_controller *hose = dev->sysdata; | 533 | struct pci_controller *hose = dev->sysdata; |
529 | int irq = COMMON_TABLE_LOOKUP; | 534 | int irq = COMMON_TABLE_LOOKUP; |
530 | 535 | ||
531 | if (irq > 0) | 536 | if (irq > 0) |
532 | irq += 16 * hose->index; | 537 | irq += 16 * hose->index; |
533 | 538 | ||
534 | return irq; | 539 | return isa_irq_fixup(dev, irq); |
535 | } | 540 | } |
536 | 541 | ||
537 | static void __init | 542 | static void __init |
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c index 6f509a644bdd..f9d12319e0fb 100644 --- a/arch/alpha/kernel/traps.c +++ b/arch/alpha/kernel/traps.c | |||
@@ -446,16 +446,15 @@ struct unaligned_stat { | |||
446 | 446 | ||
447 | 447 | ||
448 | /* Macro for exception fixup code to access integer registers. */ | 448 | /* Macro for exception fixup code to access integer registers. */ |
449 | #define una_reg(r) (regs.regs[(r) >= 16 && (r) <= 18 ? (r)+19 : (r)]) | 449 | #define una_reg(r) (regs->regs[(r) >= 16 && (r) <= 18 ? (r)+19 : (r)]) |
450 | 450 | ||
451 | 451 | ||
452 | asmlinkage void | 452 | asmlinkage void |
453 | do_entUna(void * va, unsigned long opcode, unsigned long reg, | 453 | do_entUna(void * va, unsigned long opcode, unsigned long reg, |
454 | unsigned long a3, unsigned long a4, unsigned long a5, | 454 | struct allregs *regs) |
455 | struct allregs regs) | ||
456 | { | 455 | { |
457 | long error, tmp1, tmp2, tmp3, tmp4; | 456 | long error, tmp1, tmp2, tmp3, tmp4; |
458 | unsigned long pc = regs.pc - 4; | 457 | unsigned long pc = regs->pc - 4; |
459 | const struct exception_table_entry *fixup; | 458 | const struct exception_table_entry *fixup; |
460 | 459 | ||
461 | unaligned[0].count++; | 460 | unaligned[0].count++; |
@@ -636,7 +635,7 @@ got_exception: | |||
636 | printk("Forwarding unaligned exception at %lx (%lx)\n", | 635 | printk("Forwarding unaligned exception at %lx (%lx)\n", |
637 | pc, newpc); | 636 | pc, newpc); |
638 | 637 | ||
639 | (®s)->pc = newpc; | 638 | regs->pc = newpc; |
640 | return; | 639 | return; |
641 | } | 640 | } |
642 | 641 | ||
@@ -650,7 +649,7 @@ got_exception: | |||
650 | current->comm, current->pid); | 649 | current->comm, current->pid); |
651 | 650 | ||
652 | printk("pc = [<%016lx>] ra = [<%016lx>] ps = %04lx\n", | 651 | printk("pc = [<%016lx>] ra = [<%016lx>] ps = %04lx\n", |
653 | pc, una_reg(26), regs.ps); | 652 | pc, una_reg(26), regs->ps); |
654 | printk("r0 = %016lx r1 = %016lx r2 = %016lx\n", | 653 | printk("r0 = %016lx r1 = %016lx r2 = %016lx\n", |
655 | una_reg(0), una_reg(1), una_reg(2)); | 654 | una_reg(0), una_reg(1), una_reg(2)); |
656 | printk("r3 = %016lx r4 = %016lx r5 = %016lx\n", | 655 | printk("r3 = %016lx r4 = %016lx r5 = %016lx\n", |
@@ -670,10 +669,10 @@ got_exception: | |||
670 | una_reg(22), una_reg(23), una_reg(24)); | 669 | una_reg(22), una_reg(23), una_reg(24)); |
671 | printk("r25= %016lx r27= %016lx r28= %016lx\n", | 670 | printk("r25= %016lx r27= %016lx r28= %016lx\n", |
672 | una_reg(25), una_reg(27), una_reg(28)); | 671 | una_reg(25), una_reg(27), una_reg(28)); |
673 | printk("gp = %016lx sp = %p\n", regs.gp, ®s+1); | 672 | printk("gp = %016lx sp = %p\n", regs->gp, regs+1); |
674 | 673 | ||
675 | dik_show_code((unsigned int *)pc); | 674 | dik_show_code((unsigned int *)pc); |
676 | dik_show_trace((unsigned long *)(®s+1)); | 675 | dik_show_trace((unsigned long *)(regs+1)); |
677 | 676 | ||
678 | if (test_and_set_thread_flag (TIF_DIE_IF_KERNEL)) { | 677 | if (test_and_set_thread_flag (TIF_DIE_IF_KERNEL)) { |
679 | printk("die_if_kernel recursion detected.\n"); | 678 | printk("die_if_kernel recursion detected.\n"); |