diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-10-07 09:16:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-07 13:51:14 -0400 |
commit | 2850bc273776cbb1b510c5828e9e456dffb50a32 (patch) | |
tree | 340bd599b6efde40618ef89de59cbe957269eac2 /arch/m68k/kernel | |
parent | 00079e04fe478cd3c59ae2106ef2fbe779e67024 (diff) |
[PATCH] m68k pt_regs fixes
m68k_handle_int() split in two functions: __m68k_handle_int() takes
pt_regs * and does set_irq_regs(); m68k_handle_int() doesn't get pt_regs
*.
Places where we used to call m68k_handle_int() recursively with the same
pt_regs have simply lost the second argument, the rest is switched to
__m68k_handle_int().
The rest of patch is just dropping pt_regs * where needed.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m68k/kernel')
-rw-r--r-- | arch/m68k/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/m68k/kernel/ints.c | 20 | ||||
-rw-r--r-- | arch/m68k/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/m68k/kernel/time.c | 7 |
4 files changed, 21 insertions, 12 deletions
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index 9083c8b7659f..34bf7bd126d2 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S | |||
@@ -205,7 +205,7 @@ ENTRY(auto_inthandler) | |||
205 | movel %sp,%sp@- | 205 | movel %sp,%sp@- |
206 | movel %d0,%sp@- | put vector # on stack | 206 | movel %d0,%sp@- | put vector # on stack |
207 | auto_irqhandler_fixup = . + 2 | 207 | auto_irqhandler_fixup = . + 2 |
208 | jsr m68k_handle_int | process the IRQ | 208 | jsr __m68k_handle_int | process the IRQ |
209 | addql #8,%sp | pop parameters off stack | 209 | addql #8,%sp | pop parameters off stack |
210 | 210 | ||
211 | ret_from_interrupt: | 211 | ret_from_interrupt: |
@@ -239,7 +239,7 @@ user_irqvec_fixup = . + 2 | |||
239 | movel %sp,%sp@- | 239 | movel %sp,%sp@- |
240 | movel %d0,%sp@- | put vector # on stack | 240 | movel %d0,%sp@- | put vector # on stack |
241 | user_irqhandler_fixup = . + 2 | 241 | user_irqhandler_fixup = . + 2 |
242 | jsr m68k_handle_int | process the IRQ | 242 | jsr __m68k_handle_int | process the IRQ |
243 | addql #8,%sp | pop parameters off stack | 243 | addql #8,%sp | pop parameters off stack |
244 | 244 | ||
245 | subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) | 245 | subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) |
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index b33e37fb7b0e..6fa893fc5fd6 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <asm/page.h> | 39 | #include <asm/page.h> |
40 | #include <asm/machdep.h> | 40 | #include <asm/machdep.h> |
41 | #include <asm/cacheflush.h> | 41 | #include <asm/cacheflush.h> |
42 | #include <asm/irq_regs.h> | ||
42 | 43 | ||
43 | #ifdef CONFIG_Q40 | 44 | #ifdef CONFIG_Q40 |
44 | #include <asm/q40ints.h> | 45 | #include <asm/q40ints.h> |
@@ -104,7 +105,7 @@ void __init init_IRQ(void) | |||
104 | * @handler: called from auto vector interrupts | 105 | * @handler: called from auto vector interrupts |
105 | * | 106 | * |
106 | * setup the handler to be called from auto vector interrupts instead of the | 107 | * setup the handler to be called from auto vector interrupts instead of the |
107 | * standard m68k_handle_int(), it will be called with irq numbers in the range | 108 | * standard __m68k_handle_int(), it will be called with irq numbers in the range |
108 | * from IRQ_AUTO_1 - IRQ_AUTO_7. | 109 | * from IRQ_AUTO_1 - IRQ_AUTO_7. |
109 | */ | 110 | */ |
110 | void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)) | 111 | void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)) |
@@ -123,7 +124,7 @@ void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re | |||
123 | * setup user vector interrupts, this includes activating the specified range | 124 | * setup user vector interrupts, this includes activating the specified range |
124 | * of interrupts, only then these interrupts can be requested (note: this is | 125 | * of interrupts, only then these interrupts can be requested (note: this is |
125 | * different from auto vector interrupts). An optional handler can be installed | 126 | * different from auto vector interrupts). An optional handler can be installed |
126 | * to be called instead of the default m68k_handle_int(), it will be called | 127 | * to be called instead of the default __m68k_handle_int(), it will be called |
127 | * with irq numbers starting from IRQ_USER. | 128 | * with irq numbers starting from IRQ_USER. |
128 | */ | 129 | */ |
129 | void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | 130 | void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, |
@@ -215,7 +216,7 @@ int setup_irq(unsigned int irq, struct irq_node *node) | |||
215 | } | 216 | } |
216 | 217 | ||
217 | int request_irq(unsigned int irq, | 218 | int request_irq(unsigned int irq, |
218 | irqreturn_t (*handler) (int, void *, struct pt_regs *), | 219 | irqreturn_t (*handler) (int, void *), |
219 | unsigned long flags, const char *devname, void *dev_id) | 220 | unsigned long flags, const char *devname, void *dev_id) |
220 | { | 221 | { |
221 | struct irq_node *node; | 222 | struct irq_node *node; |
@@ -379,18 +380,25 @@ unsigned int irq_canonicalize(unsigned int irq) | |||
379 | 380 | ||
380 | EXPORT_SYMBOL(irq_canonicalize); | 381 | EXPORT_SYMBOL(irq_canonicalize); |
381 | 382 | ||
382 | asmlinkage void m68k_handle_int(unsigned int irq, struct pt_regs *regs) | 383 | asmlinkage void m68k_handle_int(unsigned int irq) |
383 | { | 384 | { |
384 | struct irq_node *node; | 385 | struct irq_node *node; |
385 | |||
386 | kstat_cpu(0).irqs[irq]++; | 386 | kstat_cpu(0).irqs[irq]++; |
387 | node = irq_list[irq]; | 387 | node = irq_list[irq]; |
388 | do { | 388 | do { |
389 | node->handler(irq, node->dev_id, regs); | 389 | node->handler(irq, node->dev_id); |
390 | node = node->next; | 390 | node = node->next; |
391 | } while (node); | 391 | } while (node); |
392 | } | 392 | } |
393 | 393 | ||
394 | asmlinkage void __m68k_handle_int(unsigned int irq, struct pt_regs *regs) | ||
395 | { | ||
396 | struct pt_regs *old_regs; | ||
397 | old_regs = set_irq_regs(regs); | ||
398 | m68k_handle_int(irq); | ||
399 | set_irq_regs(old_regs); | ||
400 | } | ||
401 | |||
394 | asmlinkage void handle_badint(struct pt_regs *regs) | 402 | asmlinkage void handle_badint(struct pt_regs *regs) |
395 | { | 403 | { |
396 | kstat_cpu(0).irqs[0]++; | 404 | kstat_cpu(0).irqs[0]++; |
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c index f2d7ee0ee18c..869c4861346e 100644 --- a/arch/m68k/kernel/setup.c +++ b/arch/m68k/kernel/setup.c | |||
@@ -64,7 +64,7 @@ static char m68k_command_line[CL_SIZE]; | |||
64 | 64 | ||
65 | char m68k_debug_device[6] = ""; | 65 | char m68k_debug_device[6] = ""; |
66 | 66 | ||
67 | void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)) __initdata = NULL; | 67 | void (*mach_sched_init) (irqreturn_t (*handler)(int, void *)) __initdata = NULL; |
68 | /* machine dependent irq functions */ | 68 | /* machine dependent irq functions */ |
69 | void (*mach_init_IRQ) (void) __initdata = NULL; | 69 | void (*mach_init_IRQ) (void) __initdata = NULL; |
70 | void (*mach_get_model) (char *model); | 70 | void (*mach_get_model) (char *model); |
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 28b2fefa4513..2a599c3ed787 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/irq_regs.h> | ||
24 | 25 | ||
25 | #include <linux/time.h> | 26 | #include <linux/time.h> |
26 | #include <linux/timex.h> | 27 | #include <linux/timex.h> |
@@ -37,13 +38,13 @@ static inline int set_rtc_mmss(unsigned long nowtime) | |||
37 | * timer_interrupt() needs to keep up the real-time clock, | 38 | * timer_interrupt() needs to keep up the real-time clock, |
38 | * as well as call the "do_timer()" routine every clocktick | 39 | * as well as call the "do_timer()" routine every clocktick |
39 | */ | 40 | */ |
40 | static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs) | 41 | static irqreturn_t timer_interrupt(int irq, void *dummy) |
41 | { | 42 | { |
42 | do_timer(1); | 43 | do_timer(1); |
43 | #ifndef CONFIG_SMP | 44 | #ifndef CONFIG_SMP |
44 | update_process_times(user_mode(regs)); | 45 | update_process_times(user_mode(get_irq_regs())); |
45 | #endif | 46 | #endif |
46 | profile_tick(CPU_PROFILING, regs); | 47 | profile_tick(CPU_PROFILING); |
47 | 48 | ||
48 | #ifdef CONFIG_HEARTBEAT | 49 | #ifdef CONFIG_HEARTBEAT |
49 | /* use power LED as a heartbeat instead -- much more useful | 50 | /* use power LED as a heartbeat instead -- much more useful |