aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2005-10-02 15:49:52 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-02 17:32:49 -0400
commitd70ddac1bf3a8b102996588010ca87018c3a4a04 (patch)
treef1c2db0d79c3ccc357e2b837f7d0ec07977b6b39 /arch/alpha
parentb620cc2cd80393b9a0f9a76806cb7f9e91671dac (diff)
[PATCH] alpha: fix kernel alignment traps
Pass in the pointer to the on-stack registers rather than using them directly as the arguments. Ivan noticed that I missed a spot when purging the registers as first stack parameter idiom. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/kernel/entry.S1
-rw-r--r--arch/alpha/kernel/traps.c15
2 files changed, 8 insertions, 8 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/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
452asmlinkage void 452asmlinkage void
453do_entUna(void * va, unsigned long opcode, unsigned long reg, 453do_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 (&regs)->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, &regs+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 *)(&regs+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");