diff options
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r-- | arch/arm/kernel/smp.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 421329f5e18e..a07d202143c3 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/module.h> | ||
10 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
@@ -19,6 +20,7 @@ | |||
19 | #include <linux/cpu.h> | 20 | #include <linux/cpu.h> |
20 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
21 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/irq.h> | ||
22 | 24 | ||
23 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
24 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
@@ -474,25 +476,26 @@ void show_local_irqs(struct seq_file *p) | |||
474 | seq_putc(p, '\n'); | 476 | seq_putc(p, '\n'); |
475 | } | 477 | } |
476 | 478 | ||
477 | static void ipi_timer(struct pt_regs *regs) | 479 | static void ipi_timer(void) |
478 | { | 480 | { |
479 | int user = user_mode(regs); | ||
480 | |||
481 | irq_enter(); | 481 | irq_enter(); |
482 | profile_tick(CPU_PROFILING, regs); | 482 | profile_tick(CPU_PROFILING); |
483 | update_process_times(user); | 483 | update_process_times(user_mode(get_irq_regs())); |
484 | irq_exit(); | 484 | irq_exit(); |
485 | } | 485 | } |
486 | 486 | ||
487 | #ifdef CONFIG_LOCAL_TIMERS | 487 | #ifdef CONFIG_LOCAL_TIMERS |
488 | asmlinkage void do_local_timer(struct pt_regs *regs) | 488 | asmlinkage void do_local_timer(struct pt_regs *regs) |
489 | { | 489 | { |
490 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
490 | int cpu = smp_processor_id(); | 491 | int cpu = smp_processor_id(); |
491 | 492 | ||
492 | if (local_timer_ack()) { | 493 | if (local_timer_ack()) { |
493 | irq_stat[cpu].local_timer_irqs++; | 494 | irq_stat[cpu].local_timer_irqs++; |
494 | ipi_timer(regs); | 495 | ipi_timer(); |
495 | } | 496 | } |
497 | |||
498 | set_irq_regs(old_regs); | ||
496 | } | 499 | } |
497 | #endif | 500 | #endif |
498 | 501 | ||
@@ -551,6 +554,7 @@ asmlinkage void do_IPI(struct pt_regs *regs) | |||
551 | { | 554 | { |
552 | unsigned int cpu = smp_processor_id(); | 555 | unsigned int cpu = smp_processor_id(); |
553 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); | 556 | struct ipi_data *ipi = &per_cpu(ipi_data, cpu); |
557 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
554 | 558 | ||
555 | ipi->ipi_count++; | 559 | ipi->ipi_count++; |
556 | 560 | ||
@@ -574,7 +578,7 @@ asmlinkage void do_IPI(struct pt_regs *regs) | |||
574 | 578 | ||
575 | switch (nextmsg) { | 579 | switch (nextmsg) { |
576 | case IPI_TIMER: | 580 | case IPI_TIMER: |
577 | ipi_timer(regs); | 581 | ipi_timer(); |
578 | break; | 582 | break; |
579 | 583 | ||
580 | case IPI_RESCHEDULE: | 584 | case IPI_RESCHEDULE: |
@@ -599,6 +603,8 @@ asmlinkage void do_IPI(struct pt_regs *regs) | |||
599 | } | 603 | } |
600 | } while (msgs); | 604 | } while (msgs); |
601 | } | 605 | } |
606 | |||
607 | set_irq_regs(old_regs); | ||
602 | } | 608 | } |
603 | 609 | ||
604 | void smp_send_reschedule(int cpu) | 610 | void smp_send_reschedule(int cpu) |