diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-10-06 02:31:16 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-10-06 02:31:16 -0400 |
commit | 35f3c5185b1e28e6591aa649db8bf4fa16f1a7f3 (patch) | |
tree | d3057d468d36664d1accf964e76f6d97a299b40d /arch/sh/kernel | |
parent | a700f3594d63a85af196ac64984f7375d903afad (diff) |
sh: Updates for IRQ handler changes.
Trivial fixes for build breakage introduced by IRQ handler changes.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/irq.c | 19 | ||||
-rw-r--r-- | arch/sh/kernel/time.c | 7 | ||||
-rw-r--r-- | arch/sh/kernel/timers/timer-tmu.c | 5 |
3 files changed, 19 insertions, 12 deletions
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index c7ebd6aec951..3b93682bf18b 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <asm/thread_info.h> | 17 | #include <asm/thread_info.h> |
18 | #include <asm/cpu/mmu_context.h> | 18 | #include <asm/cpu/mmu_context.h> |
19 | 19 | ||
20 | atomic_t irq_err_count; | ||
21 | |||
20 | /* | 22 | /* |
21 | * 'what should we do if we get a hw irq event on an illegal vector'. | 23 | * 'what should we do if we get a hw irq event on an illegal vector'. |
22 | * each architecture has to answer this themselves, it doesn't deserve | 24 | * each architecture has to answer this themselves, it doesn't deserve |
@@ -47,8 +49,10 @@ int show_interrupts(struct seq_file *p, void *v) | |||
47 | if (!action) | 49 | if (!action) |
48 | goto unlock; | 50 | goto unlock; |
49 | seq_printf(p, "%3d: ",i); | 51 | seq_printf(p, "%3d: ",i); |
50 | seq_printf(p, "%10u ", kstat_irqs(i)); | 52 | for_each_online_cpu(j) |
51 | seq_printf(p, " %14s", irq_desc[i].chip->typename); | 53 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
54 | seq_printf(p, " %14s", irq_desc[i].chip->name); | ||
55 | seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq)); | ||
52 | seq_printf(p, " %s", action->name); | 56 | seq_printf(p, " %s", action->name); |
53 | 57 | ||
54 | for (action=action->next; action; action = action->next) | 58 | for (action=action->next; action; action = action->next) |
@@ -56,7 +60,9 @@ int show_interrupts(struct seq_file *p, void *v) | |||
56 | seq_putc(p, '\n'); | 60 | seq_putc(p, '\n'); |
57 | unlock: | 61 | unlock: |
58 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 62 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
59 | } | 63 | } else if (i == NR_IRQS) |
64 | seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); | ||
65 | |||
60 | return 0; | 66 | return 0; |
61 | } | 67 | } |
62 | #endif | 68 | #endif |
@@ -78,6 +84,7 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, | |||
78 | unsigned long r6, unsigned long r7, | 84 | unsigned long r6, unsigned long r7, |
79 | struct pt_regs regs) | 85 | struct pt_regs regs) |
80 | { | 86 | { |
87 | struct pt_regs *old_regs = set_irq_regs(®s); | ||
81 | int irq = r4; | 88 | int irq = r4; |
82 | #ifdef CONFIG_4KSTACKS | 89 | #ifdef CONFIG_4KSTACKS |
83 | union irq_ctx *curctx, *irqctx; | 90 | union irq_ctx *curctx, *irqctx; |
@@ -139,7 +146,6 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, | |||
139 | 146 | ||
140 | __asm__ __volatile__ ( | 147 | __asm__ __volatile__ ( |
141 | "mov %0, r4 \n" | 148 | "mov %0, r4 \n" |
142 | "mov %1, r5 \n" | ||
143 | "mov r15, r9 \n" | 149 | "mov r15, r9 \n" |
144 | "jsr @%2 \n" | 150 | "jsr @%2 \n" |
145 | /* swith to the irq stack */ | 151 | /* swith to the irq stack */ |
@@ -147,17 +153,18 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, | |||
147 | /* restore the stack (ring zero) */ | 153 | /* restore the stack (ring zero) */ |
148 | "mov r9, r15 \n" | 154 | "mov r9, r15 \n" |
149 | : /* no outputs */ | 155 | : /* no outputs */ |
150 | : "r" (irq), "r" (®s), "r" (__do_IRQ), "r" (isp) | 156 | : "r" (irq), "r" (generic_handle_irq), "r" (isp) |
151 | /* XXX: A somewhat excessive clobber list? -PFM */ | 157 | /* XXX: A somewhat excessive clobber list? -PFM */ |
152 | : "memory", "r0", "r1", "r2", "r3", "r4", | 158 | : "memory", "r0", "r1", "r2", "r3", "r4", |
153 | "r5", "r6", "r7", "r8", "t", "pr" | 159 | "r5", "r6", "r7", "r8", "t", "pr" |
154 | ); | 160 | ); |
155 | } else | 161 | } else |
156 | #endif | 162 | #endif |
157 | __do_IRQ(irq, ®s); | 163 | generic_handle_irq(irq); |
158 | 164 | ||
159 | irq_exit(); | 165 | irq_exit(); |
160 | 166 | ||
167 | set_irq_regs(old_regs); | ||
161 | return 1; | 168 | return 1; |
162 | } | 169 | } |
163 | 170 | ||
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index 1fbb83c665dd..57e708d7b52d 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c | |||
@@ -109,13 +109,14 @@ static long last_rtc_update; | |||
109 | * handle_timer_tick() needs to keep up the real-time clock, | 109 | * handle_timer_tick() needs to keep up the real-time clock, |
110 | * as well as call the "do_timer()" routine every clocktick | 110 | * as well as call the "do_timer()" routine every clocktick |
111 | */ | 111 | */ |
112 | void handle_timer_tick(struct pt_regs *regs) | 112 | void handle_timer_tick(void) |
113 | { | 113 | { |
114 | do_timer(1); | 114 | do_timer(1); |
115 | #ifndef CONFIG_SMP | 115 | #ifndef CONFIG_SMP |
116 | update_process_times(user_mode(regs)); | 116 | update_process_times(user_mode(get_irq_regs())); |
117 | #endif | 117 | #endif |
118 | profile_tick(CPU_PROFILING, regs); | 118 | if (current->pid) |
119 | profile_tick(CPU_PROFILING); | ||
119 | 120 | ||
120 | #ifdef CONFIG_HEARTBEAT | 121 | #ifdef CONFIG_HEARTBEAT |
121 | if (sh_mv.mv_heartbeat != NULL) | 122 | if (sh_mv.mv_heartbeat != NULL) |
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index badfedb455a9..24927015dc31 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -80,8 +80,7 @@ static unsigned long tmu_timer_get_offset(void) | |||
80 | return count; | 80 | return count; |
81 | } | 81 | } |
82 | 82 | ||
83 | static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id, | 83 | static irqreturn_t tmu_timer_interrupt(int irq, void *dummy) |
84 | struct pt_regs *regs) | ||
85 | { | 84 | { |
86 | unsigned long timer_status; | 85 | unsigned long timer_status; |
87 | 86 | ||
@@ -98,7 +97,7 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id, | |||
98 | * locally disabled. -arca | 97 | * locally disabled. -arca |
99 | */ | 98 | */ |
100 | write_seqlock(&xtime_lock); | 99 | write_seqlock(&xtime_lock); |
101 | handle_timer_tick(regs); | 100 | handle_timer_tick(); |
102 | write_sequnlock(&xtime_lock); | 101 | write_sequnlock(&xtime_lock); |
103 | 102 | ||
104 | return IRQ_HANDLED; | 103 | return IRQ_HANDLED; |