diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-07 17:34:37 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-07 17:34:37 -0400 |
| commit | a44a553f827f28d46130c9818dbcb95f4262b96c (patch) | |
| tree | 44bd46b1604eb93f15196193a99725f94138af41 /arch/powerpc/kernel/time.c | |
| parent | ce7db282a3830f57f5b05ec48288c23a5c4d66d5 (diff) | |
| parent | 93f68f1ef787d97ab688f78a01f446e85bb9a496 (diff) | |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/pseries: Correct rtas_data_buf locking in dlpar code
powerpc/85xx: Add P1021 PCI IDs and quirks
arch/powerpc/sysdev/qe_lib/qe.c: Add of_node_put to avoid memory leak
arch/powerpc/platforms/83xx/mpc837x_mds.c: Add missing iounmap
fsl_rio: fix compile errors
powerpc/85xx: Fix compile issue with p1022_ds due to lmb rename to memblock
powerpc/85xx: Fix compilation of mpc85xx_mds.c
powerpc: Don't use kernel stack with translation off
powerpc/perf_event: Reduce latency of calling perf_event_do_pending
powerpc/kexec: Adds correct calling convention for kexec purgatory
Diffstat (limited to 'arch/powerpc/kernel/time.c')
| -rw-r--r-- | arch/powerpc/kernel/time.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index ce53dfa7130d..8533b3b83f5d 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
| @@ -577,20 +577,11 @@ void timer_interrupt(struct pt_regs * regs) | |||
| 577 | * some CPUs will continuue to take decrementer exceptions */ | 577 | * some CPUs will continuue to take decrementer exceptions */ |
| 578 | set_dec(DECREMENTER_MAX); | 578 | set_dec(DECREMENTER_MAX); |
| 579 | 579 | ||
| 580 | #ifdef CONFIG_PPC32 | 580 | #if defined(CONFIG_PPC32) && defined(CONFIG_PMAC) |
| 581 | if (atomic_read(&ppc_n_lost_interrupts) != 0) | 581 | if (atomic_read(&ppc_n_lost_interrupts) != 0) |
| 582 | do_IRQ(regs); | 582 | do_IRQ(regs); |
| 583 | #endif | 583 | #endif |
| 584 | 584 | ||
| 585 | now = get_tb_or_rtc(); | ||
| 586 | if (now < decrementer->next_tb) { | ||
| 587 | /* not time for this event yet */ | ||
| 588 | now = decrementer->next_tb - now; | ||
| 589 | if (now <= DECREMENTER_MAX) | ||
| 590 | set_dec((int)now); | ||
| 591 | trace_timer_interrupt_exit(regs); | ||
| 592 | return; | ||
| 593 | } | ||
| 594 | old_regs = set_irq_regs(regs); | 585 | old_regs = set_irq_regs(regs); |
| 595 | irq_enter(); | 586 | irq_enter(); |
| 596 | 587 | ||
| @@ -606,8 +597,16 @@ void timer_interrupt(struct pt_regs * regs) | |||
| 606 | get_lppaca()->int_dword.fields.decr_int = 0; | 597 | get_lppaca()->int_dword.fields.decr_int = 0; |
| 607 | #endif | 598 | #endif |
| 608 | 599 | ||
| 609 | if (evt->event_handler) | 600 | now = get_tb_or_rtc(); |
| 610 | evt->event_handler(evt); | 601 | if (now >= decrementer->next_tb) { |
| 602 | decrementer->next_tb = ~(u64)0; | ||
| 603 | if (evt->event_handler) | ||
| 604 | evt->event_handler(evt); | ||
| 605 | } else { | ||
| 606 | now = decrementer->next_tb - now; | ||
| 607 | if (now <= DECREMENTER_MAX) | ||
| 608 | set_dec((int)now); | ||
| 609 | } | ||
| 611 | 610 | ||
| 612 | #ifdef CONFIG_PPC_ISERIES | 611 | #ifdef CONFIG_PPC_ISERIES |
| 613 | if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) | 612 | if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) |
