diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-03-14 00:03:35 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-03-14 00:03:35 -0400 |
commit | 3afb209a43a4216ad4f1411922d47a44252926c6 (patch) | |
tree | 8c91a9edad3b09181bd290f33f3e14e3d7c01e2c /arch/sh | |
parent | ffe1b4e9f436fd7bb784f3bf7ee963c149fbca5f (diff) |
sh: Fix bogus regs pointer in do_IRQ().
SH-3 and SH-4 were trampling the register, and SH-2 wasn't even
setting it in the first place. This ended up with some rather
broken behaviour in the sysrq show_regs().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/cpu/sh2/entry.S | 1 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/entry.S | 5 | ||||
-rw-r--r-- | arch/sh/kernel/irq.c | 15 |
3 files changed, 7 insertions, 14 deletions
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S index 7f7d292f36ec..c16dc8fec489 100644 --- a/arch/sh/kernel/cpu/sh2/entry.S +++ b/arch/sh/kernel/cpu/sh2/entry.S | |||
@@ -165,6 +165,7 @@ ENTRY(exception_handler) | |||
165 | 165 | ||
166 | interrupt_entry: | 166 | interrupt_entry: |
167 | mov r9,r4 | 167 | mov r9,r4 |
168 | mov r15,r5 | ||
168 | mov.l 6f,r9 | 169 | mov.l 6f,r9 |
169 | mov.l 7f,r8 | 170 | mov.l 7f,r8 |
170 | jmp @r8 | 171 | jmp @r8 |
diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S index c19205b0f2c0..f3e827f29a46 100644 --- a/arch/sh/kernel/cpu/sh3/entry.S +++ b/arch/sh/kernel/cpu/sh3/entry.S | |||
@@ -514,13 +514,16 @@ skip_save: | |||
514 | 514 | ||
515 | interrupt_exception: | 515 | interrupt_exception: |
516 | mov.l 1f, r9 | 516 | mov.l 1f, r9 |
517 | mov.l 2f, r4 | ||
518 | mov.l @r4, r4 | ||
517 | jmp @r9 | 519 | jmp @r9 |
518 | nop | 520 | mov r15, r5 |
519 | rts | 521 | rts |
520 | nop | 522 | nop |
521 | 523 | ||
522 | .align 2 | 524 | .align 2 |
523 | 1: .long do_IRQ | 525 | 1: .long do_IRQ |
526 | 2: .long INTEVT | ||
524 | 527 | ||
525 | .align 2 | 528 | .align 2 |
526 | ENTRY(exception_none) | 529 | ENTRY(exception_none) |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 67be2b6e8cd1..9bdd8a00cd4a 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel_stat.h> | 12 | #include <linux/kernel_stat.h> |
13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <linux/io.h> | ||
15 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
16 | #include <asm/processor.h> | 15 | #include <asm/processor.h> |
17 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
@@ -82,13 +81,9 @@ static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly; | |||
82 | static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; | 81 | static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; |
83 | #endif | 82 | #endif |
84 | 83 | ||
85 | asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, | 84 | asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs) |
86 | unsigned long r6, unsigned long r7, | ||
87 | struct pt_regs __regs) | ||
88 | { | 85 | { |
89 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
90 | struct pt_regs *old_regs = set_irq_regs(regs); | 86 | struct pt_regs *old_regs = set_irq_regs(regs); |
91 | int irq; | ||
92 | #ifdef CONFIG_4KSTACKS | 87 | #ifdef CONFIG_4KSTACKS |
93 | union irq_ctx *curctx, *irqctx; | 88 | union irq_ctx *curctx, *irqctx; |
94 | #endif | 89 | #endif |
@@ -111,13 +106,7 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, | |||
111 | } | 106 | } |
112 | #endif | 107 | #endif |
113 | 108 | ||
114 | #ifdef CONFIG_CPU_HAS_INTEVT | 109 | irq = irq_demux(evt2irq(irq)); |
115 | irq = evt2irq(ctrl_inl(INTEVT)); | ||
116 | #else | ||
117 | irq = r4; | ||
118 | #endif | ||
119 | |||
120 | irq = irq_demux(irq); | ||
121 | 110 | ||
122 | #ifdef CONFIG_4KSTACKS | 111 | #ifdef CONFIG_4KSTACKS |
123 | curctx = (union irq_ctx *)current_thread_info(); | 112 | curctx = (union irq_ctx *)current_thread_info(); |