~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/powerpc/kernel/time.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
#include <linux/irq.h>
55
55
#include <linux/delay.h>
56
56
#include <linux/irq_work.h>
57
 
#include <trace/trap.h>
58
57
#include <asm/trace.h>
59
58
 
60
59
#include <asm/io.h>
581
580
        struct clock_event_device *evt = &decrementer->event;
582
581
        u64 now;
583
582
 
 
583
        /* Ensure a positive value is written to the decrementer, or else
 
584
         * some CPUs will continue to take decrementer exceptions.
 
585
         */
 
586
        set_dec(DECREMENTER_MAX);
 
587
 
 
588
        /* Some implementations of hotplug will get timer interrupts while
 
589
         * offline, just ignore these
 
590
         */
 
591
        if (!cpu_online(smp_processor_id()))
 
592
                return;
 
593
 
584
594
        trace_timer_interrupt_entry(regs);
585
595
 
586
596
        __get_cpu_var(irq_stat).timer_irqs++;
587
597
 
588
 
        /* Ensure a positive value is written to the decrementer, or else
589
 
         * some CPUs will continuue to take decrementer exceptions */
590
 
        set_dec(DECREMENTER_MAX);
591
 
 
592
 
        trace_trap_entry(regs, regs->trap);
593
 
 
594
598
#if defined(CONFIG_PPC32) && defined(CONFIG_PMAC)
595
599
        if (atomic_read(&ppc_n_lost_interrupts) != 0)
596
600
                do_IRQ(regs);
637
641
        set_irq_regs(old_regs);
638
642
 
639
643
        trace_timer_interrupt_exit(regs);
640
 
        trace_trap_exit();
641
644
}
642
645
 
643
646
#ifdef CONFIG_SUSPEND