diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2006-10-11 04:20:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:14:14 -0400 |
commit | 4e0fadfcf62e252d2b14de0e0927eb2830c0c28c (patch) | |
tree | eb88e5fe9c32e352dabb4e2d62e3492604565c7b | |
parent | 41716c7c21b15e7ecf14f0caf1eef3980707fb74 (diff) |
[PATCH] IRQ: Fix AVR32 breakage
Make the necessary changes to AVR32 required by the irq regs stuff.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/avr32/kernel/time.c | 10 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/extint.c | 5 | ||||
-rw-r--r-- | arch/avr32/mach-at32ap/intc.c | 7 | ||||
-rw-r--r-- | include/asm-avr32/irq_regs.h | 1 |
4 files changed, 14 insertions, 9 deletions
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index 3e56b9f4358a..5a247ba71a72 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c | |||
@@ -124,15 +124,15 @@ unsigned long long sched_clock(void) | |||
124 | * | 124 | * |
125 | * In UP mode, it is invoked from the (global) timer_interrupt. | 125 | * In UP mode, it is invoked from the (global) timer_interrupt. |
126 | */ | 126 | */ |
127 | static void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 127 | static void local_timer_interrupt(int irq, void *dev_id) |
128 | { | 128 | { |
129 | if (current->pid) | 129 | if (current->pid) |
130 | profile_tick(CPU_PROFILING, regs); | 130 | profile_tick(CPU_PROFILING); |
131 | update_process_times(user_mode(regs)); | 131 | update_process_times(user_mode(get_irq_regs())); |
132 | } | 132 | } |
133 | 133 | ||
134 | static irqreturn_t | 134 | static irqreturn_t |
135 | timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 135 | timer_interrupt(int irq, void *dev_id) |
136 | { | 136 | { |
137 | unsigned int count; | 137 | unsigned int count; |
138 | 138 | ||
@@ -157,7 +157,7 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
157 | * | 157 | * |
158 | * SMP is not supported yet. | 158 | * SMP is not supported yet. |
159 | */ | 159 | */ |
160 | local_timer_interrupt(irq, dev_id, regs); | 160 | local_timer_interrupt(irq, dev_id); |
161 | 161 | ||
162 | return IRQ_HANDLED; | 162 | return IRQ_HANDLED; |
163 | } | 163 | } |
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index 7da9c5f7a0eb..4dff1f988900 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c | |||
@@ -102,8 +102,7 @@ struct irq_chip eim_chip = { | |||
102 | .set_type = eim_set_irq_type, | 102 | .set_type = eim_set_irq_type, |
103 | }; | 103 | }; |
104 | 104 | ||
105 | static void demux_eim_irq(unsigned int irq, struct irq_desc *desc, | 105 | static void demux_eim_irq(unsigned int irq, struct irq_desc *desc) |
106 | struct pt_regs *regs) | ||
107 | { | 106 | { |
108 | struct at32_sm *sm = desc->handler_data; | 107 | struct at32_sm *sm = desc->handler_data; |
109 | struct irq_desc *ext_desc; | 108 | struct irq_desc *ext_desc; |
@@ -121,7 +120,7 @@ static void demux_eim_irq(unsigned int irq, struct irq_desc *desc, | |||
121 | 120 | ||
122 | ext_irq = i + sm->eim_first_irq; | 121 | ext_irq = i + sm->eim_first_irq; |
123 | ext_desc = irq_desc + ext_irq; | 122 | ext_desc = irq_desc + ext_irq; |
124 | ext_desc->handle_irq(ext_irq, ext_desc, regs); | 123 | ext_desc->handle_irq(ext_irq, ext_desc); |
125 | } | 124 | } |
126 | 125 | ||
127 | spin_unlock(&sm->lock); | 126 | spin_unlock(&sm->lock); |
diff --git a/arch/avr32/mach-at32ap/intc.c b/arch/avr32/mach-at32ap/intc.c index 74f8c9f2f03d..eb87a18ad7b2 100644 --- a/arch/avr32/mach-at32ap/intc.c +++ b/arch/avr32/mach-at32ap/intc.c | |||
@@ -52,16 +52,19 @@ static struct intc intc0 = { | |||
52 | asmlinkage void do_IRQ(int level, struct pt_regs *regs) | 52 | asmlinkage void do_IRQ(int level, struct pt_regs *regs) |
53 | { | 53 | { |
54 | struct irq_desc *desc; | 54 | struct irq_desc *desc; |
55 | struct pt_regs *old_regs; | ||
55 | unsigned int irq; | 56 | unsigned int irq; |
56 | unsigned long status_reg; | 57 | unsigned long status_reg; |
57 | 58 | ||
58 | local_irq_disable(); | 59 | local_irq_disable(); |
59 | 60 | ||
61 | old_regs = set_irq_regs(regs); | ||
62 | |||
60 | irq_enter(); | 63 | irq_enter(); |
61 | 64 | ||
62 | irq = intc_readl(&intc0, INTCAUSE0 - 4 * level); | 65 | irq = intc_readl(&intc0, INTCAUSE0 - 4 * level); |
63 | desc = irq_desc + irq; | 66 | desc = irq_desc + irq; |
64 | desc->handle_irq(irq, desc, regs); | 67 | desc->handle_irq(irq, desc); |
65 | 68 | ||
66 | /* | 69 | /* |
67 | * Clear all interrupt level masks so that we may handle | 70 | * Clear all interrupt level masks so that we may handle |
@@ -75,6 +78,8 @@ asmlinkage void do_IRQ(int level, struct pt_regs *regs) | |||
75 | sysreg_write(SR, status_reg); | 78 | sysreg_write(SR, status_reg); |
76 | 79 | ||
77 | irq_exit(); | 80 | irq_exit(); |
81 | |||
82 | set_irq_regs(old_regs); | ||
78 | } | 83 | } |
79 | 84 | ||
80 | void __init init_IRQ(void) | 85 | void __init init_IRQ(void) |
diff --git a/include/asm-avr32/irq_regs.h b/include/asm-avr32/irq_regs.h new file mode 100644 index 000000000000..3dd9c0b70270 --- /dev/null +++ b/include/asm-avr32/irq_regs.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/irq_regs.h> | |||