diff options
author | David Howells <dhowells@redhat.com> | 2006-10-05 09:55:46 -0400 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-10-05 10:10:12 -0400 |
commit | 7d12e780e003f93433d49ce78cfedf4b4c52adc5 (patch) | |
tree | 6748550400445c11a306b132009f3001e3525df8 /arch/powerpc | |
parent | da482792a6d1a3fbaaa25fae867b343fb4db3246 (diff) |
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.
The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).
Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.
Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.
I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.
This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);
I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().
Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.
(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.
(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.
Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_64.S | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/smp.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/time.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/interrupt.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spider-pic.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/low_i2c.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pfunc_base.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pic.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/ras.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.h | 3 | ||||
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 4 | ||||
-rw-r--r-- | arch/powerpc/xmon/xmon.c | 6 |
15 files changed, 47 insertions, 49 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index c3f58f2f9f52..5deaab3090b4 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -187,6 +187,7 @@ void fixup_irqs(cpumask_t map) | |||
187 | 187 | ||
188 | void do_IRQ(struct pt_regs *regs) | 188 | void do_IRQ(struct pt_regs *regs) |
189 | { | 189 | { |
190 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
190 | unsigned int irq; | 191 | unsigned int irq; |
191 | #ifdef CONFIG_IRQSTACKS | 192 | #ifdef CONFIG_IRQSTACKS |
192 | struct thread_info *curtp, *irqtp; | 193 | struct thread_info *curtp, *irqtp; |
@@ -230,18 +231,19 @@ void do_IRQ(struct pt_regs *regs) | |||
230 | handler = &__do_IRQ; | 231 | handler = &__do_IRQ; |
231 | irqtp->task = curtp->task; | 232 | irqtp->task = curtp->task; |
232 | irqtp->flags = 0; | 233 | irqtp->flags = 0; |
233 | call_handle_irq(irq, desc, regs, irqtp, handler); | 234 | call_handle_irq(irq, desc, irqtp, handler); |
234 | irqtp->task = NULL; | 235 | irqtp->task = NULL; |
235 | if (irqtp->flags) | 236 | if (irqtp->flags) |
236 | set_bits(irqtp->flags, &curtp->flags); | 237 | set_bits(irqtp->flags, &curtp->flags); |
237 | } else | 238 | } else |
238 | #endif | 239 | #endif |
239 | generic_handle_irq(irq, regs); | 240 | generic_handle_irq(irq); |
240 | } else if (irq != NO_IRQ_IGNORE) | 241 | } else if (irq != NO_IRQ_IGNORE) |
241 | /* That's not SMP safe ... but who cares ? */ | 242 | /* That's not SMP safe ... but who cares ? */ |
242 | ppc_spurious_interrupts++; | 243 | ppc_spurious_interrupts++; |
243 | 244 | ||
244 | irq_exit(); | 245 | irq_exit(); |
246 | set_irq_regs(old_regs); | ||
245 | 247 | ||
246 | #ifdef CONFIG_PPC_ISERIES | 248 | #ifdef CONFIG_PPC_ISERIES |
247 | if (get_lppaca()->int_dword.fields.decr_int) { | 249 | if (get_lppaca()->int_dword.fields.decr_int) { |
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index 41521b30c3cd..c70e20708a1f 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -52,12 +52,12 @@ _GLOBAL(call_do_softirq) | |||
52 | blr | 52 | blr |
53 | 53 | ||
54 | _GLOBAL(call_handle_irq) | 54 | _GLOBAL(call_handle_irq) |
55 | ld r8,0(r7) | 55 | ld r8,0(r6) |
56 | mflr r0 | 56 | mflr r0 |
57 | std r0,16(r1) | 57 | std r0,16(r1) |
58 | mtctr r8 | 58 | mtctr r8 |
59 | stdu r1,THREAD_SIZE-112(r6) | 59 | stdu r1,THREAD_SIZE-112(r5) |
60 | mr r1,r6 | 60 | mr r1,r5 |
61 | bctrl | 61 | bctrl |
62 | ld r1,0(r1) | 62 | ld r1,0(r1) |
63 | ld r0,16(r1) | 63 | ld r0,16(r1) |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 6a9bc9ce54e0..35c6309bdb76 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -115,7 +115,7 @@ void __devinit smp_generic_kick_cpu(int nr) | |||
115 | } | 115 | } |
116 | #endif | 116 | #endif |
117 | 117 | ||
118 | void smp_message_recv(int msg, struct pt_regs *regs) | 118 | void smp_message_recv(int msg) |
119 | { | 119 | { |
120 | switch(msg) { | 120 | switch(msg) { |
121 | case PPC_MSG_CALL_FUNCTION: | 121 | case PPC_MSG_CALL_FUNCTION: |
@@ -127,11 +127,11 @@ void smp_message_recv(int msg, struct pt_regs *regs) | |||
127 | break; | 127 | break; |
128 | case PPC_MSG_DEBUGGER_BREAK: | 128 | case PPC_MSG_DEBUGGER_BREAK: |
129 | if (crash_ipi_function_ptr) { | 129 | if (crash_ipi_function_ptr) { |
130 | crash_ipi_function_ptr(regs); | 130 | crash_ipi_function_ptr(get_irq_regs()); |
131 | break; | 131 | break; |
132 | } | 132 | } |
133 | #ifdef CONFIG_DEBUGGER | 133 | #ifdef CONFIG_DEBUGGER |
134 | debugger_ipi(regs); | 134 | debugger_ipi(get_irq_regs()); |
135 | break; | 135 | break; |
136 | #endif /* CONFIG_DEBUGGER */ | 136 | #endif /* CONFIG_DEBUGGER */ |
137 | /* FALLTHROUGH */ | 137 | /* FALLTHROUGH */ |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 85b9244a098c..d210d0a5006b 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <linux/rtc.h> | 51 | #include <linux/rtc.h> |
52 | #include <linux/jiffies.h> | 52 | #include <linux/jiffies.h> |
53 | #include <linux/posix-timers.h> | 53 | #include <linux/posix-timers.h> |
54 | #include <linux/irq.h> | ||
54 | 55 | ||
55 | #include <asm/io.h> | 56 | #include <asm/io.h> |
56 | #include <asm/processor.h> | 57 | #include <asm/processor.h> |
@@ -643,6 +644,7 @@ static void iSeries_tb_recal(void) | |||
643 | */ | 644 | */ |
644 | void timer_interrupt(struct pt_regs * regs) | 645 | void timer_interrupt(struct pt_regs * regs) |
645 | { | 646 | { |
647 | struct pt_regs *old_regs; | ||
646 | int next_dec; | 648 | int next_dec; |
647 | int cpu = smp_processor_id(); | 649 | int cpu = smp_processor_id(); |
648 | unsigned long ticks; | 650 | unsigned long ticks; |
@@ -653,9 +655,10 @@ void timer_interrupt(struct pt_regs * regs) | |||
653 | do_IRQ(regs); | 655 | do_IRQ(regs); |
654 | #endif | 656 | #endif |
655 | 657 | ||
658 | old_regs = set_irq_regs(regs); | ||
656 | irq_enter(); | 659 | irq_enter(); |
657 | 660 | ||
658 | profile_tick(CPU_PROFILING, regs); | 661 | profile_tick(CPU_PROFILING); |
659 | calculate_steal_time(); | 662 | calculate_steal_time(); |
660 | 663 | ||
661 | #ifdef CONFIG_PPC_ISERIES | 664 | #ifdef CONFIG_PPC_ISERIES |
@@ -715,6 +718,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
715 | #endif | 718 | #endif |
716 | 719 | ||
717 | irq_exit(); | 720 | irq_exit(); |
721 | set_irq_regs(old_regs); | ||
718 | } | 722 | } |
719 | 723 | ||
720 | void wakeup_decrementer(void) | 724 | void wakeup_decrementer(void) |
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index 8533f13a5ed1..434fb934dd20 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -190,11 +190,11 @@ struct irq_host *iic_get_irq_host(int node) | |||
190 | EXPORT_SYMBOL_GPL(iic_get_irq_host); | 190 | EXPORT_SYMBOL_GPL(iic_get_irq_host); |
191 | 191 | ||
192 | 192 | ||
193 | static irqreturn_t iic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) | 193 | static irqreturn_t iic_ipi_action(int irq, void *dev_id) |
194 | { | 194 | { |
195 | int ipi = (int)(long)dev_id; | 195 | int ipi = (int)(long)dev_id; |
196 | 196 | ||
197 | smp_message_recv(ipi, regs); | 197 | smp_message_recv(ipi); |
198 | 198 | ||
199 | return IRQ_HANDLED; | 199 | return IRQ_HANDLED; |
200 | } | 200 | } |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index b0e95d594c51..21a9ebd4978e 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -213,8 +213,7 @@ static struct irq_host_ops spider_host_ops = { | |||
213 | .xlate = spider_host_xlate, | 213 | .xlate = spider_host_xlate, |
214 | }; | 214 | }; |
215 | 215 | ||
216 | static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc, | 216 | static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc) |
217 | struct pt_regs *regs) | ||
218 | { | 217 | { |
219 | struct spider_pic *pic = desc->handler_data; | 218 | struct spider_pic *pic = desc->handler_data; |
220 | unsigned int cs, virq; | 219 | unsigned int cs, virq; |
@@ -225,7 +224,7 @@ static void spider_irq_cascade(unsigned int irq, struct irq_desc *desc, | |||
225 | else | 224 | else |
226 | virq = irq_linear_revmap(pic->host, cs); | 225 | virq = irq_linear_revmap(pic->host, cs); |
227 | if (virq != NO_IRQ) | 226 | if (virq != NO_IRQ) |
228 | generic_handle_irq(virq, regs); | 227 | generic_handle_irq(virq); |
229 | desc->chip->eoi(irq); | 228 | desc->chip->eoi(irq); |
230 | } | 229 | } |
231 | 230 | ||
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index c2c7cf75dd5f..bfc4829162f1 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -342,7 +342,7 @@ static void kw_i2c_handle_interrupt(struct pmac_i2c_host_kw *host, u8 isr) | |||
342 | } | 342 | } |
343 | 343 | ||
344 | /* Interrupt handler */ | 344 | /* Interrupt handler */ |
345 | static irqreturn_t kw_i2c_irq(int irq, void *dev_id, struct pt_regs *regs) | 345 | static irqreturn_t kw_i2c_irq(int irq, void *dev_id) |
346 | { | 346 | { |
347 | struct pmac_i2c_host_kw *host = dev_id; | 347 | struct pmac_i2c_host_kw *host = dev_id; |
348 | unsigned long flags; | 348 | unsigned long flags; |
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c index ee3b223ab17a..5c6c15c5f9a3 100644 --- a/arch/powerpc/platforms/powermac/pfunc_base.c +++ b/arch/powerpc/platforms/powermac/pfunc_base.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #define DBG(fmt...) | 15 | #define DBG(fmt...) |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | static irqreturn_t macio_gpio_irq(int irq, void *data, struct pt_regs *regs) | 18 | static irqreturn_t macio_gpio_irq(int irq, void *data) |
19 | { | 19 | { |
20 | pmf_do_irq(data); | 20 | pmf_do_irq(data); |
21 | 21 | ||
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 39f7ddb554ea..e93a115961aa 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -440,14 +440,13 @@ static void __init pmac_pic_probe_oldstyle(void) | |||
440 | } | 440 | } |
441 | #endif /* CONFIG_PPC32 */ | 441 | #endif /* CONFIG_PPC32 */ |
442 | 442 | ||
443 | static void pmac_u3_cascade(unsigned int irq, struct irq_desc *desc, | 443 | static void pmac_u3_cascade(unsigned int irq, struct irq_desc *desc) |
444 | struct pt_regs *regs) | ||
445 | { | 444 | { |
446 | struct mpic *mpic = desc->handler_data; | 445 | struct mpic *mpic = desc->handler_data; |
447 | 446 | ||
448 | unsigned int cascade_irq = mpic_get_one_irq(mpic, regs); | 447 | unsigned int cascade_irq = mpic_get_one_irq(mpic, get_irq_regs()); |
449 | if (cascade_irq != NO_IRQ) | 448 | if (cascade_irq != NO_IRQ) |
450 | generic_handle_irq(cascade_irq, regs); | 449 | generic_handle_irq(cascade_irq); |
451 | desc->chip->eoi(irq); | 450 | desc->chip->eoi(irq); |
452 | } | 451 | } |
453 | 452 | ||
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index 311ed1993fc0..b1d3d161249e 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c | |||
@@ -65,16 +65,14 @@ static int ras_check_exception_token; | |||
65 | #define EPOW_SENSOR_INDEX 0 | 65 | #define EPOW_SENSOR_INDEX 0 |
66 | #define RAS_VECTOR_OFFSET 0x500 | 66 | #define RAS_VECTOR_OFFSET 0x500 |
67 | 67 | ||
68 | static irqreturn_t ras_epow_interrupt(int irq, void *dev_id, | 68 | static irqreturn_t ras_epow_interrupt(int irq, void *dev_id); |
69 | struct pt_regs * regs); | 69 | static irqreturn_t ras_error_interrupt(int irq, void *dev_id); |
70 | static irqreturn_t ras_error_interrupt(int irq, void *dev_id, | ||
71 | struct pt_regs * regs); | ||
72 | 70 | ||
73 | /* #define DEBUG */ | 71 | /* #define DEBUG */ |
74 | 72 | ||
75 | 73 | ||
76 | static void request_ras_irqs(struct device_node *np, | 74 | static void request_ras_irqs(struct device_node *np, |
77 | irqreturn_t (*handler)(int, void *, struct pt_regs *), | 75 | irq_handler_t handler, |
78 | const char *name) | 76 | const char *name) |
79 | { | 77 | { |
80 | int i, index, count = 0; | 78 | int i, index, count = 0; |
@@ -166,8 +164,7 @@ __initcall(init_ras_IRQ); | |||
166 | * to examine the type of power failure and take appropriate action where | 164 | * to examine the type of power failure and take appropriate action where |
167 | * the time horizon permits something useful to be done. | 165 | * the time horizon permits something useful to be done. |
168 | */ | 166 | */ |
169 | static irqreturn_t | 167 | static irqreturn_t ras_epow_interrupt(int irq, void *dev_id) |
170 | ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs) | ||
171 | { | 168 | { |
172 | int status = 0xdeadbeef; | 169 | int status = 0xdeadbeef; |
173 | int state = 0; | 170 | int state = 0; |
@@ -210,8 +207,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs) | |||
210 | * For nonrecoverable errors, an error is logged and we stop all processing | 207 | * For nonrecoverable errors, an error is logged and we stop all processing |
211 | * as quickly as possible in order to prevent propagation of the failure. | 208 | * as quickly as possible in order to prevent propagation of the failure. |
212 | */ | 209 | */ |
213 | static irqreturn_t | 210 | static irqreturn_t ras_error_interrupt(int irq, void *dev_id) |
214 | ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs) | ||
215 | { | 211 | { |
216 | struct rtas_error_log *rtas_elog; | 212 | struct rtas_error_log *rtas_elog; |
217 | int status = 0xdeadbeef; | 213 | int status = 0xdeadbeef; |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index f82b13e531a3..ad9aec2c6fee 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -121,12 +121,11 @@ static void __init fwnmi_init(void) | |||
121 | fwnmi_active = 1; | 121 | fwnmi_active = 1; |
122 | } | 122 | } |
123 | 123 | ||
124 | void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc, | 124 | void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc) |
125 | struct pt_regs *regs) | ||
126 | { | 125 | { |
127 | unsigned int cascade_irq = i8259_irq(regs); | 126 | unsigned int cascade_irq = i8259_irq(get_irq_regs()); |
128 | if (cascade_irq != NO_IRQ) | 127 | if (cascade_irq != NO_IRQ) |
129 | generic_handle_irq(cascade_irq, regs); | 128 | generic_handle_irq(cascade_irq); |
130 | desc->chip->eoi(irq); | 129 | desc->chip->eoi(irq); |
131 | } | 130 | } |
132 | 131 | ||
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 253972e5479f..f6bd2f285153 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -324,7 +324,7 @@ static unsigned int xics_get_irq_lpar(struct pt_regs *regs) | |||
324 | 324 | ||
325 | #ifdef CONFIG_SMP | 325 | #ifdef CONFIG_SMP |
326 | 326 | ||
327 | static irqreturn_t xics_ipi_dispatch(int cpu, struct pt_regs *regs) | 327 | static irqreturn_t xics_ipi_dispatch(int cpu) |
328 | { | 328 | { |
329 | WARN_ON(cpu_is_offline(cpu)); | 329 | WARN_ON(cpu_is_offline(cpu)); |
330 | 330 | ||
@@ -332,47 +332,47 @@ static irqreturn_t xics_ipi_dispatch(int cpu, struct pt_regs *regs) | |||
332 | if (test_and_clear_bit(PPC_MSG_CALL_FUNCTION, | 332 | if (test_and_clear_bit(PPC_MSG_CALL_FUNCTION, |
333 | &xics_ipi_message[cpu].value)) { | 333 | &xics_ipi_message[cpu].value)) { |
334 | mb(); | 334 | mb(); |
335 | smp_message_recv(PPC_MSG_CALL_FUNCTION, regs); | 335 | smp_message_recv(PPC_MSG_CALL_FUNCTION); |
336 | } | 336 | } |
337 | if (test_and_clear_bit(PPC_MSG_RESCHEDULE, | 337 | if (test_and_clear_bit(PPC_MSG_RESCHEDULE, |
338 | &xics_ipi_message[cpu].value)) { | 338 | &xics_ipi_message[cpu].value)) { |
339 | mb(); | 339 | mb(); |
340 | smp_message_recv(PPC_MSG_RESCHEDULE, regs); | 340 | smp_message_recv(PPC_MSG_RESCHEDULE); |
341 | } | 341 | } |
342 | #if 0 | 342 | #if 0 |
343 | if (test_and_clear_bit(PPC_MSG_MIGRATE_TASK, | 343 | if (test_and_clear_bit(PPC_MSG_MIGRATE_TASK, |
344 | &xics_ipi_message[cpu].value)) { | 344 | &xics_ipi_message[cpu].value)) { |
345 | mb(); | 345 | mb(); |
346 | smp_message_recv(PPC_MSG_MIGRATE_TASK, regs); | 346 | smp_message_recv(PPC_MSG_MIGRATE_TASK); |
347 | } | 347 | } |
348 | #endif | 348 | #endif |
349 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) | 349 | #if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC) |
350 | if (test_and_clear_bit(PPC_MSG_DEBUGGER_BREAK, | 350 | if (test_and_clear_bit(PPC_MSG_DEBUGGER_BREAK, |
351 | &xics_ipi_message[cpu].value)) { | 351 | &xics_ipi_message[cpu].value)) { |
352 | mb(); | 352 | mb(); |
353 | smp_message_recv(PPC_MSG_DEBUGGER_BREAK, regs); | 353 | smp_message_recv(PPC_MSG_DEBUGGER_BREAK); |
354 | } | 354 | } |
355 | #endif | 355 | #endif |
356 | } | 356 | } |
357 | return IRQ_HANDLED; | 357 | return IRQ_HANDLED; |
358 | } | 358 | } |
359 | 359 | ||
360 | static irqreturn_t xics_ipi_action_direct(int irq, void *dev_id, struct pt_regs *regs) | 360 | static irqreturn_t xics_ipi_action_direct(int irq, void *dev_id) |
361 | { | 361 | { |
362 | int cpu = smp_processor_id(); | 362 | int cpu = smp_processor_id(); |
363 | 363 | ||
364 | direct_qirr_info(cpu, 0xff); | 364 | direct_qirr_info(cpu, 0xff); |
365 | 365 | ||
366 | return xics_ipi_dispatch(cpu, regs); | 366 | return xics_ipi_dispatch(cpu); |
367 | } | 367 | } |
368 | 368 | ||
369 | static irqreturn_t xics_ipi_action_lpar(int irq, void *dev_id, struct pt_regs *regs) | 369 | static irqreturn_t xics_ipi_action_lpar(int irq, void *dev_id) |
370 | { | 370 | { |
371 | int cpu = smp_processor_id(); | 371 | int cpu = smp_processor_id(); |
372 | 372 | ||
373 | lpar_qirr_info(cpu, 0xff); | 373 | lpar_qirr_info(cpu, 0xff); |
374 | 374 | ||
375 | return xics_ipi_dispatch(cpu, regs); | 375 | return xics_ipi_dispatch(cpu); |
376 | } | 376 | } |
377 | 377 | ||
378 | void xics_cause_IPI(int cpu) | 378 | void xics_cause_IPI(int cpu) |
diff --git a/arch/powerpc/platforms/pseries/xics.h b/arch/powerpc/platforms/pseries/xics.h index 6ee1055b0ffb..db0ec3ba3ae2 100644 --- a/arch/powerpc/platforms/pseries/xics.h +++ b/arch/powerpc/platforms/pseries/xics.h | |||
@@ -31,7 +31,6 @@ struct xics_ipi_struct { | |||
31 | extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; | 31 | extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; |
32 | 32 | ||
33 | struct irq_desc; | 33 | struct irq_desc; |
34 | extern void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc, | 34 | extern void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc); |
35 | struct pt_regs *regs); | ||
36 | 35 | ||
37 | #endif /* _POWERPC_KERNEL_XICS_H */ | 36 | #endif /* _POWERPC_KERNEL_XICS_H */ |
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 3ee03a9a98fa..195215560fd7 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -489,9 +489,9 @@ static inline void mpic_eoi(struct mpic *mpic) | |||
489 | } | 489 | } |
490 | 490 | ||
491 | #ifdef CONFIG_SMP | 491 | #ifdef CONFIG_SMP |
492 | static irqreturn_t mpic_ipi_action(int irq, void *dev_id, struct pt_regs *regs) | 492 | static irqreturn_t mpic_ipi_action(int irq, void *dev_id) |
493 | { | 493 | { |
494 | smp_message_recv(mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0, regs); | 494 | smp_message_recv(mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0); |
495 | return IRQ_HANDLED; | 495 | return IRQ_HANDLED; |
496 | } | 496 | } |
497 | #endif /* CONFIG_SMP */ | 497 | #endif /* CONFIG_SMP */ |
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 708236f34746..5a854f36383c 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/sysrq.h> | 22 | #include <linux/sysrq.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/irq.h> | ||
24 | 25 | ||
25 | #include <asm/ptrace.h> | 26 | #include <asm/ptrace.h> |
26 | #include <asm/string.h> | 27 | #include <asm/string.h> |
@@ -2577,12 +2578,11 @@ void xmon_init(int enable) | |||
2577 | } | 2578 | } |
2578 | 2579 | ||
2579 | #ifdef CONFIG_MAGIC_SYSRQ | 2580 | #ifdef CONFIG_MAGIC_SYSRQ |
2580 | static void sysrq_handle_xmon(int key, struct pt_regs *pt_regs, | 2581 | static void sysrq_handle_xmon(int key, struct tty_struct *tty) |
2581 | struct tty_struct *tty) | ||
2582 | { | 2582 | { |
2583 | /* ensure xmon is enabled */ | 2583 | /* ensure xmon is enabled */ |
2584 | xmon_init(1); | 2584 | xmon_init(1); |
2585 | debugger(pt_regs); | 2585 | debugger(get_irq_regs()); |
2586 | } | 2586 | } |
2587 | 2587 | ||
2588 | static struct sysrq_key_op sysrq_xmon_op = | 2588 | static struct sysrq_key_op sysrq_xmon_op = |